content
stringlengths
1
15.9M
\section{Introduction} Let $\Omega\subset{\mathbb{R}}^3$ be Lipschitz bounded polygonal domain with a single connected boundary $ \partial\Omega$. We consider the following $\boldsymbol{H}(\boldsymbol{curl})$-elliptic problem \begin{eqnarray}\label{Equ:1.1} \nabla\times\mu\nabla\times \boldsymbol{u} + \kappa\boldsymbol{u}=\boldsymbol{f} \quad &\text{in}& \quad \Omega, \\\label{Equ:1.2} \boldsymbol{u}\times \boldsymbol{n}=0 \quad &\text{on}& \quad \partial\Omega, \end{eqnarray} where $\boldsymbol{n}$ is the unit normal vector of the boundary $ \partial\Omega$, $ \boldsymbol{f}\in \boldsymbol{L}^2(\Omega)$, $\mu$ and $\kappa$ are piecewise constants is consistent with the initial partition $\mathcal{T}_0$ for $\Omega$ and satisfy $\mu_1< \mu <\mu_2$ and $\kappa_1<\kappa<\kappa_2$, here, $\mu_i$ and $\kappa_i (i=1, 2)$ are positive constants. By introducing an auxiliary variable $ \boldsymbol{p}=\mu \nabla\times \boldsymbol{u}$, then we get the mixed scheme with the boundary value problem \eqref{Equ:1.1}-\eqref{Equ:1.2} \begin{eqnarray}\label{Equ:1.3.0} \boldsymbol{p}=\mu \nabla\times \boldsymbol{u}\quad &\text{in}& \quad \Omega, \\ \label{Equ:1.3} \nabla\times \boldsymbol{p}+ \kappa\boldsymbol{u}=\boldsymbol{f} \quad &\text{in}& \quad \Omega, \\\label{Equ:1.5} \boldsymbol{u}\times \boldsymbol{n}=0 \quad &\text{on}& \quad \partial\Omega. \end{eqnarray} The mixed finite element method is very convenient for processing high-order equations and equations containing two or more unknown functions, which has attracted widespread attention. For mixed finite element method, there are only few research results for Maxwell problem \cite{JogNan14:887} and Maxwell's eigenvalue problem \cite{JiangLiu14:159,Kik87:509,LiuTob15:458}. Adaptive finite element method automatically refines and optimizes meshes according to the singularity of solutions. It is a highly reliable and efficient numerical calculation method. At present, the convergence analysis research of the adaptive mixed finite element method for the elliptic equation is relatively complete. Chen, Holst and Xu \cite{ChenHol09:35} proved the convergence analysis of the adaptive mixed finite element algorithm for elliptic equations. Du and Xie \cite{DuXie15:1327} proved the convergence analysis of the adaptive mixed finite element algorithm for the convection diffusion equation. However, there are only few research results on the posterior error estimator of Maxwell's equations for the adaptive mixed finite element method. For example, Carstensen and Ma \cite{CarstensenMa21} establishes the convergence of adaptive mixed finite element methods for second-order linear non-self-adjoint indefinite elliptic problems. Carstensen, Hoppe, Sharma and Warburton \cite{CarHop11:13} designs and analyzes the posterior error estimation of the adaptive hybrid conforming finite element method of $\boldsymbol{H}(\boldsymbol{curl})$-elliptic problem. Recently, Chung, Yuen and Zhong \cite{ChungYuen14:613} present a-posteriori error analysis for the staggered discontinuous Galerkin method. As far as we know, there are not any published literatures for the convergence analysis of the adaptive mixed finite element method for the boundary value problem\eqref{Equ:1.3.0}-\eqref{Equ:1.5}. Our contributions in this paper are to \begin{itemize} \item construct a new error estimator, which does not include the negative power of the local mesh size in the jump term for the traditional DG method; \item get the convergence of the Adaptive Mixed Interior Penalty Discontinuous Galerkin (AMIPDG) method by using the similar technique used in \cite{BonitoNochetto10:734}. However, this technique in \cite{BonitoNochetto10:734} can not be used directly for mixed forms. \end{itemize} We present our main result in the following theorem. \begin{theorem} Let $\{ \mathcal{T}_k, \boldsymbol{U}_k, \boldsymbol{Q}_k, \boldsymbol{u}_{k}, \boldsymbol{p}_k, \eta( \boldsymbol{u}_{k}, \boldsymbol{p}_{k}; \mathcal{T}_{k})\}_{k\geq 0}$ be the sequence of meshes, finite element space, mixed discrete solution and posterior error estimate indicator produced by the \textbf{AMIPDG} algorithm. Then there exist constants $\rho>0$ and $\delta \in(0, 1)$, which depend on marking parameter and the shape regularity of the initial mesh $\mathcal{T}_{0}$, such that \begin{eqnarray}\nonumber \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 + \rho \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) \leq \delta\bigg(\|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2+ \rho \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k )\bigg). \end{eqnarray} Therefore, for a given precision, the \textbf{AMIPDG} method will terminate after a finite number of operations. \end{theorem} For convenience, we let $C$ denote a generic positive constant which may be different at different occurrences and adopt the following notation. The subscripted constant $C_i$ represents a particularly important constant. $a\lesssim b$ means $a\leq Cb$ for some constants $C$ which are independent of mesh sizes. The rest of this paper is organized as follows. In Section 2, we first present the continuous variational problem, the discrete variational problem, and the procedure of AMIPDG. In Section 3, we first show the upper bound estimate of the error, which is key to the convergence analysis, then we prove the indicator reduction and the convergence of AMIPDG algorithm. In Section 4, we provide some numerical experiments to illustrate the effectiveness of the AMIPDG. \section{Adaptive Mixed interior penalty discontinuous Galerkin method}\label{Sec:2} In this section, we introduce the continuous variational problem, the discrete variational problem of mixed internal penalty discontinuous finite element method, and the procedure of AMIPDG. \subsection{Continuous variational problem} For an open and connected bounded domain $D \subset \mathbb{R}^3$, we denote by ${L}^2(D)$ (resp. $\boldsymbol{L}^2(D):=(L^2(D))^{3}$) the spaces of square-integrable functions (resp. vector fields) on $D$ with inner product $(\cdot,\cdot)_{0,D}$. We define the spaces \begin{eqnarray*} && \boldsymbol{H} (\boldsymbol{curl};D)=\{ \boldsymbol{u}\in \boldsymbol{L}^2(D): \nabla\times\boldsymbol{u} \in \boldsymbol{L}^2(D) \}, \\ &&\boldsymbol{H} (div;D)=\{ \boldsymbol{u}\in \boldsymbol{L}^2(D): \nabla\cdot \boldsymbol{u} \in L^2(D) \}, \end{eqnarray*} with \begin{eqnarray*} && (\boldsymbol{u}, \boldsymbol{v})_{\boldsymbol{curl}, D}:=(\boldsymbol{u}, \boldsymbol{v})_{0, D}+(\nabla\times\boldsymbol{u}, \nabla\times \boldsymbol{v})_{0, D}, \quad \forall \boldsymbol{u}, \boldsymbol{v} \in \boldsymbol{H} (\boldsymbol{curl};D), \\ &&(\boldsymbol{u}, \boldsymbol{v})_{div, D}:=(\boldsymbol{u}, \boldsymbol{v})_{0, D}+(\nabla\cdot\boldsymbol{u}, \nabla\cdot\boldsymbol{v})_{0, D}, \quad \forall\boldsymbol{u}, \boldsymbol{v} \in \boldsymbol{H} (div;D), \end{eqnarray*} and the induced norm as: \begin{eqnarray*} &&\| \boldsymbol{u}\|^2_{\boldsymbol{curl}, D}:=\|\boldsymbol{u}\|^2_{0, D}+\|\nabla\times \boldsymbol{u}\|^2_{0, D}, \ \forall \boldsymbol{u}\in\boldsymbol{H}(\boldsymbol{curl},D), \\ &&\|\boldsymbol{u}\|^2_{div, D}:=\| \boldsymbol{u}\|^2_{0, D}+\|\nabla\cdot\boldsymbol{u}\|^2_{0, D}, \ \quad \forall \boldsymbol{u}\in\boldsymbol{H}(div,D), \end{eqnarray*} respectively, where $\|\cdot\|_{L^2(D)}:=(\cdot,\cdot)^{1/2}_D$ denotes the norm of the space $L^2(D)$ or $\boldsymbol{L}^2(D)$. We also define $ \boldsymbol{H}_0(\boldsymbol{curl};D)=\{ \boldsymbol{v}\in \boldsymbol{H}(\boldsymbol{curl};D): \boldsymbol{v}\times\boldsymbol{n}=0 \ on \ \partial D \}$ in the trace sense. Next, we first define two space $\boldsymbol{U}:= \boldsymbol{H}_0(curl;\Omega), \boldsymbol{Q}:=\boldsymbol{L}^2(\Omega)$. Then, the mixed variational problem of the mixed boundary value problem \eqref{Equ:1.3.0}-\eqref{Equ:1.5} reads as: find $ (\boldsymbol{u}, \boldsymbol{p})\in \boldsymbol{U}\times \boldsymbol{Q}$ such that: \begin{eqnarray}\label{Equ:3.6} && a(\boldsymbol{p}, \boldsymbol{q})-b(\boldsymbol{u}, \boldsymbol{q})=\ell_1(\boldsymbol{q}), \qquad \forall \boldsymbol{q}\in \boldsymbol{Q}, \\ \label{Equ:3.7} && d(\boldsymbol{v}, \boldsymbol{p})+c(\boldsymbol{u}, \boldsymbol{v})=\ell_2(\boldsymbol{v}), \qquad \forall \boldsymbol{v}\in\boldsymbol{U}. \end{eqnarray} The bilinear forms $a, b, c$ and the functionals $\ell_1(\cdot) , \ell_2(\cdot)$ are given by \begin{eqnarray}\label{Equ:3.8} && a(\boldsymbol{p}, \boldsymbol{q}):=(\boldsymbol{p}, \boldsymbol{q}), \\\label{Equ:3.9} && b(\boldsymbol{u}, \boldsymbol{q}):=(\mu\nabla\times \boldsymbol{u}, \boldsymbol{q}), \\ \label{Equ:3.10} && c(\boldsymbol{u}, \boldsymbol{v}):=( \kappa\boldsymbol{u}, \boldsymbol{v}), \\ \label{Eqn:3.10} && d(\boldsymbol{v},\boldsymbol{p}):=(\nabla\times \boldsymbol{v},\boldsymbol{p}) \\ \label{Equ:3.11} && \ell_1(\boldsymbol{q}):=0, \\\label{Equ:3.12} && \ell_2(\boldsymbol{v}):=(\boldsymbol{f}, \boldsymbol{v}). \end{eqnarray} The operator-theoretic framework involves operator $ \mathcal{A}:(\boldsymbol{U}\times \boldsymbol{Q})\rightarrow (\boldsymbol{U}\times \boldsymbol{Q})^*$ defined by \begin{equation}\label{Equ:3.13} ( \mathcal{A}(\boldsymbol{u}, \boldsymbol{p}) )(\boldsymbol{v}, \boldsymbol{q}) := a(\boldsymbol{p}, \boldsymbol{q})-b(\boldsymbol{u}, \boldsymbol{q})+d(\boldsymbol{v}, \boldsymbol{p})+c(\boldsymbol{u}, \boldsymbol{v}), \forall \boldsymbol{u}, \boldsymbol{v}\in \boldsymbol{U} , \boldsymbol{p, q} \in \boldsymbol{Q}, \end{equation} where $(\boldsymbol{Q} \times \boldsymbol{U})^*$ is the dual spaces of $(\boldsymbol{Q} \times \boldsymbol{U})$. Then we can rewrite \eqref{Equ:3.6}-\eqref{Equ:3.7} as \begin{equation}\label{Equ:3.14} ( \mathcal{A}(\boldsymbol{u}, \boldsymbol{p}) )(\boldsymbol{v}, \boldsymbol{q})=\ell( \boldsymbol{v}, \boldsymbol{q}), \end{equation} with $ \ell(\boldsymbol{v}, \boldsymbol{q})=\ell_1(\boldsymbol{q})+\ell_2(\boldsymbol{v})$, and $\ell_i$ are given by \eqref{Equ:3.11}-\eqref{Equ:3.12}. Then, we state the well-posedness of the variational problem \eqref{Equ:3.6}-\eqref{Equ:3.7} in the following lemma, and it can be found in section 3 of \cite{CarHop09:27}. \begin{lemma}\label{Lem:3.0} Under the assumptions on the problem of \eqref{Equ:1.1}-\eqref{Equ:1.2}, $\mathcal{A}$ is a continuous and bijective linear operator. Hence, for any $\ell = (\ell_1, \ell_2)\in (\boldsymbol{Q} \times \boldsymbol{U})^*$, the mixed variational problem \eqref{Equ:3.6}-\eqref{Equ:3.7} has a unique solution $(\boldsymbol{u}, \boldsymbol{p}) \in (\boldsymbol{U}\times \boldsymbol{Q})$, which satisfy the following continuously \begin{equation}\label{Equ:3.15} \|(\boldsymbol{u}, \boldsymbol{p})\|_{\boldsymbol{U}\times \boldsymbol{Q}} := (\|\boldsymbol{u}\|^2_{curl,\Omega}+\|\boldsymbol{p}\|^2_{0})^{1/2} \lesssim \|\ell_1 \|_{\boldsymbol{Q}^*}+\|\ell_2\|_{U^*}. \end{equation} \end{lemma} \subsection{Discrete variational problem} We suppose that $\mathcal{T}_h$ is a family of shape regularity, quasi-uniform and conform tetrahedral generation on $ \Omega$. Let $h_ {\tau}=\vert\tau\vert^{1/3}$ denote the mesh size with $\vert \tau \vert$ being the volume of $\tau \in \mathcal{T}_h$. Define the discontinuous finite element function space $\mathbb{V}(\mathcal{T}_h)$ as: \begin{eqnarray*} \mathbb{V}(\mathcal{T}_h) = \{ \boldsymbol{v}\in \boldsymbol{L}^2(\Omega):\boldsymbol{v}_\tau =\boldsymbol{v}\vert_\tau \in (P_l(\tau))^3, \quad \forall \tau\in \mathcal{T}_h \}, \end{eqnarray*} where $P_l(\tau)$ is the set of polynomials defined in the volume $\tau$ whose degree does not exceed $l$, where $l\geq1$ is an integer. Let $\mathcal{F}_h$, $\mathcal{F}_h^0$ and $\mathcal{F}_h^\partial$ denote the set of the all faces of its volumes, and the set of internal faces, and the set of boundary faces, respectively. Thus, $\mathcal{F}_h=\mathcal{F}_h^0\bigcup\mathcal{F}_h^\partial$. Let ${H}^1(\Omega; \mathcal{T}_{h})$ be the space of piecewise Sobolev functions defined by \begin{equation* {H}^1(\Omega; \mathcal{T}_{h})=\left\{\boldsymbol{v}\in{L}^2(\Omega) : \boldsymbol{v}_\tau=\boldsymbol{v}\vert_\tau\in{H}^1(\tau), \quad \forall\ \tau\in \mathcal{T}_{h}\right\}. \end{equation*} and $ \boldsymbol{H}^1(\Omega; \mathcal{T}_{h}) = ( {H}^1(\Omega; \mathcal{T}_{h}) )^3$. Let $\boldsymbol{L}^2(\mathcal{F}_h)$ be the set of $\boldsymbol{L}^2$ functions defined on $\mathcal{F}_h$. Moreover, we define the following inner products \begin{eqnarray*} (\boldsymbol{v},\boldsymbol{w})_{\mathcal{T}^{'}_h} &=& \sum\limits_{\tau\in\mathcal{T}^{'}_h}\int_{\tau}\boldsymbol{v}\cdot\boldsymbol{w} \mathrm{d}\boldsymbol{x}, \quad \forall \boldsymbol{v},\boldsymbol{w}\in \boldsymbol{L}^2(\Omega),\ \forall \mathcal{T}^{'}_h \subset \mathcal{T}_h, \\ <\boldsymbol{v},\boldsymbol{w} >_{\mathcal{F}^{'}_h} &=& \sum\limits_{f\in\mathcal{F}^{'}_h}\int_{f}\boldsymbol{v}\cdot\boldsymbol{w} \mathrm{d}\boldsymbol{s}, \quad \forall \boldsymbol{v},\boldsymbol{w}\in \boldsymbol{L}^2(\mathcal{F}_h),\ \forall \mathcal{F}^{'}_h \subset \mathcal{F}_h. \end{eqnarray*} For $f\in\mathcal{F}^0_h$, we have $\tau_i\in\mathcal{T}_h (i=1, 2)$, such that $f =\partial\tau_1\cap\partial\tau_2$. Then we denote the jump and average of $ \boldsymbol{v}$ as: \begin{eqnarray*} [[ \boldsymbol{v} ]] &=& \boldsymbol{v}_1\times \boldsymbol{n}_1+ \boldsymbol{v}_2\times \boldsymbol{n}_2, \quad \forall \boldsymbol{v} \in \boldsymbol{H}^1 (\Omega; \mathcal{T}_{h}), \\ \{\{ \boldsymbol{v} \}\} &=&\dfrac{\boldsymbol{v}_1 +\boldsymbol{v}_2}{2} , \quad \forall \boldsymbol{v} \in \boldsymbol{H}^1 (\Omega; \mathcal{T}_{h}), \end{eqnarray*} where $\boldsymbol{v}_i$ denote the values of $\boldsymbol{v}$ on $\boldsymbol{v}\vert_{\tau_i}(i=1, 2)$ and $\boldsymbol{n}_i$ denote the out unit normal vectors on $f$ exterior $\boldsymbol{v}\vert_{\tau_i}$. For $f\in\mathcal{F}^{\partial}_h$, we have $\tau\in\mathcal{T}_h$, such that $f = \partial\tau\cap\partial\Omega$. Then we denote the jump and average of $ \boldsymbol{v}$ as: \begin{equation} [[ \boldsymbol{v} ]]=\boldsymbol{v}_\tau \times \boldsymbol{n}_{\partial\Omega},\ \ \{\{ \boldsymbol{v} \}\}=\boldsymbol{v}_\tau. \end{equation} Next, we give the corresponding discrete scheme of \eqref{Equ:3.6}-\eqref{Equ:3.7}. Firstly, we define the corresponding discrete space as follow \begin{eqnarray*} &&\boldsymbol{U}_h:= \{ \boldsymbol{v}_h \in \mathbb{V}(\mathcal{T}_h)\vert \quad [[ \boldsymbol{v}_h]]\vert_{f}=0, \forall f \in \mathcal{F}^\partial_h\}, \\ &&\boldsymbol{Q}_h:= \mathbb{V}(\mathcal{T}_h). \end{eqnarray*} Then, the formulation of the discrete Mixed Interior Penalty Discontinuous Galerkin (MIPDG) method reads: find $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in( \boldsymbol{U}_h, \boldsymbol{Q}_h)$ such that \begin{eqnarray}\label{Equ:3.16} && a_h(\boldsymbol{p}_h, \boldsymbol{q}_h)-b_h(\boldsymbol{u}_h, \boldsymbol{q}_h)=\ell_{1, h}(\boldsymbol{q}_h)+d_{1,h}(\boldsymbol{u}_h, \boldsymbol{q}_h), \qquad \forall \boldsymbol{q}_h\in \boldsymbol{Q}_h, \\ \label{Equ:3.17} && d_h(\boldsymbol{v}_h, \boldsymbol{p}_h)+c_h(\boldsymbol{u}_h, \boldsymbol{v}_h)=\ell_{2, h}(\boldsymbol{v}_h)+d_{2,h}(\boldsymbol{u}_h, \boldsymbol{v}_h), \qquad \forall \boldsymbol {v}_h\in \boldsymbol{U}_h, \end{eqnarray} where \begin{eqnarray*} && a_h(\boldsymbol{p}_h, \boldsymbol{q}_h):=(\boldsymbol{p}_h, \boldsymbol{q}_h)_{\mathcal{T}_h}, \\ && b_h(\boldsymbol{u}_h, \boldsymbol{q}_h):=(\mu \nabla \times \boldsymbol{u}_h, \boldsymbol{q}_h )_{\mathcal{T}_h}, \\ && c_h(\boldsymbol{u}_h, \boldsymbol{v}_h):= (\kappa\boldsymbol{u}_h, \boldsymbol{v}_h)_{\mathcal{T}_h}, \\ && d_h(\boldsymbol{v}_h, \boldsymbol{p}_h):= (\nabla\times\boldsymbol{v}_h,\boldsymbol{p}_h)_{\mathcal{T}_h}, \\ && \ell_{1, h}(\boldsymbol{q}_h):=0, \\ && \ell_{2, h}(\boldsymbol{v}_h):=(\boldsymbol{f}, \boldsymbol{v}_h)_{\mathcal{T}_h}, \\ && d_{1,h}(\boldsymbol{u}_h, \boldsymbol{q}_h):=-< \{\{\mu \boldsymbol{q}_h \}\} , [[ \boldsymbol{u}_h ]] >_{\mathcal{F}_h}, \\ && d_{2,h}(\boldsymbol{u}_h, \boldsymbol{v}_h):=< ( \{\{ \mu \nabla \times \boldsymbol{u}_h \}\} -\alpha h^{-1}_f[[ \boldsymbol{u}_h ]]), [[ \boldsymbol{v}_h ]] >_{\mathcal{F}_h}, \end{eqnarray*} here the constant $\alpha>0$ denote the penalty parameter, $h_f$ denote the diameter of the circumcircle of $f$. Thus $h_\tau \approx h_f$. \begin{remark}\label{Rem:c} The calculation of $\nabla\times\boldsymbol{u}_h$ in the bilinear terms are piecewise derivations. \end{remark} The standard symmetric Interior Penalty Discontinuous Galerkin (IPDG) method of the boundary value problem \eqref{Equ:1.1}-\eqref{Equ:1.2} is to find $ \boldsymbol{u}_h \in \boldsymbol{U}_h $, such that \begin{eqnarray} \nonumber \lefteqn{ a_{IP}( \boldsymbol{u}_h, \boldsymbol{v}_h)}\\ \nonumber &&:= (\kappa\boldsymbol{u}_h, \boldsymbol{v}_h)_{\mathcal{T}_h} + (\mu\nabla\times \boldsymbol{u}_h, \nabla\times \boldsymbol{v}_h)_{\mathcal{T}_h} - <\{\{\mu \nabla\times \boldsymbol{v}_h \}\} , [[ \boldsymbol{u}_h ]] >_{\mathcal{F}_h} \\ \label{Equ:3.20} && \quad - < \{\{\mu \nabla\times \boldsymbol{u}_h \}\} , [[ \boldsymbol{v}_h]] >_{\mathcal{F}_h} + \alpha h^{-1}_f<[[ \boldsymbol{u}_h ]], [[ \boldsymbol{v}_h ]] >_{\mathcal{F}_h}\\ \nonumber &&=(\boldsymbol{f}, \boldsymbol{v}_h)_{\mathcal{T}_h}. \end{eqnarray} The following lemma shows that the discrete variational problems \eqref{Equ:3.16}-\eqref{Equ:3.17} and \eqref{Equ:3.20} are equivalent. \begin{lemma}\label{Lem:0}[\cite{CarHop09:27}, Theorem 4.1] The formulations \eqref{Equ:3.16}-\eqref{Equ:3.17} and \eqref{Equ:3.20} are formally equivalent in the following sense. If $ (\boldsymbol{u}_h, \boldsymbol{p}_h) \in (\boldsymbol{U}_h, \boldsymbol{Q}_h) $ are the solution of discrete variational problem \eqref{Equ:3.16}-\eqref{Equ:3.17}, then $\boldsymbol{u}_h \in \boldsymbol{U}_h $ solves \eqref{Equ:3.20}. Conversely, if $\boldsymbol{u}_h \in \boldsymbol{U}_h $ solves \eqref{Equ:3.20}, then there exists some $\boldsymbol{p}_h \in \boldsymbol{Q}_h$ such that $ (\boldsymbol{u}_h, \boldsymbol{p}_h) \in (\boldsymbol{U}_h, \boldsymbol{Q}_h) $ are the solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}. \end{lemma} Ayuso de Dios, Hiptmair and Pagliantini proved the well-posedness of \eqref{Equ:3.20} in section 2 of \cite{AyusoHiptmair17:646}. Therefore, by combining Lemma \ref{Lem:0}, we obtain the well-posedness of discrete variational problems \eqref{Equ:3.16}-\eqref{Equ:3.17}. \subsection{Adaptive Mixed Interior Penalty Discontinuous Galerkin method(\textbf{AMIPDG})} Our adaptive cycle can be implemented by the following algorithm: \begin{algorithm} \caption{Adaptive Mixed Interior Penalty Discontinuous Galerkin Method (AMIPDG) cycle} \label{ALG1} {\textbf{Input} initial triangulation $\mathcal{T}_0$; data $\boldsymbol{f}$; tolerance tol; marking parameter $\theta\in(0,1)$.} {\textbf{Output} a triangulation $\mathcal{T}_J$; MIPDG solution $(\boldsymbol{u}_J,\boldsymbol{p}_J)$.} {$\eta=1;k=0;$} {\textbf{while} $\eta\geq tol$} {~~~~\textbf{SOLVE} solve discrete varational problem \eqref{Equ:3.16}-\eqref{Equ:3.17} on $\mathcal{T}_k$ to get the solution $(\boldsymbol{u}_k,\boldsymbol{p}_k)$;} {~~\textbf{ESTIMATE} compute the posterior error estimator $\eta=\eta(\boldsymbol{u}_k,\boldsymbol{p}_k,\mathcal{T}_k)$ by using \eqref{Equ:3.24};} {~~~\textbf{MARK} seek a minimum cardinality $\mathcal{M}_{k} \subset \mathcal{T}_{k}$ such that \begin{equation*}\label{mark} \eta^{2}\left(\boldsymbol{u}_{k},\boldsymbol{p}_k, \mathcal{M}_{k}\right) \geq \theta \eta^{2}\left(\boldsymbol{u}_{k},\boldsymbol{p}_k, \mathcal{T}_{k}\right); \end{equation*}} {~~\textbf{REFINE} bisect elements in $\mathcal{M}_k$ and the neighboring elements to form a conforming $\mathcal{T}_{k+1}$;} { ~~~~$k=k+1$; } {\textbf{end}} {$\boldsymbol{u}_J=\boldsymbol{u}_k;~\boldsymbol{p}_J=\boldsymbol{p}_k;~\mathcal{T}_J=\mathcal{T}_k;$} \end{algorithm} Next, we will discuss each step in AEFEM in detail. \subsubsection{Procedure SOLVE} For $ \boldsymbol{f}\in \boldsymbol{L}^2(\Omega)$, and a shape regular mesh $\mathcal{T}_k$, Let $(\boldsymbol{u}_k,\boldsymbol{p}_k)$ be the exact MIPDG solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}. Here, we assume that the solutions $(\boldsymbol{u}_k,\boldsymbol{p}_k)$ can be solved accurately. \subsubsection{Procedure ESTIMATE} A posteriori error indicator is an essential ingredient of adaptivity. They are computable quantities depending on the computed solution(s) and data that provide information about the quality of approximation and may consequently be used to make judicious mesh modifications. Here, we design a new posteriori error estimation indicator for equations \eqref{Equ:3.16}-\eqref{Equ:3.17}, which is similar to that in \cite{XingZhong12}. For $\tau\in \mathcal{T}_h$, $f \in \mathcal{F}_h$ and $(\boldsymbol{v}_h, \boldsymbol{q}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$, the residual a posteriori error estimator for the symmetric AMIPDG method is given by \begin{eqnarray}\nonumber \eta^2( \boldsymbol{v}_h, \boldsymbol{q}_h;\tau) :&=& \|R_1 (\boldsymbol{v}_h, \boldsymbol{q}_h) \|^2_{L^2(\tau)} + h^2_\tau\big(\|R_2 (\boldsymbol{v}_h, \boldsymbol{q}_h)\|^2_{L^2(\tau)} +\|R_3(\boldsymbol{v}_h)\|^2_{L^2(\tau)} \big)\\ \label{Equ:3.23} && +\sum_{f\in \partial\tau} h_f \big(\| J_1(\boldsymbol{q}_h)\|^2_{L^2(f)}+ \|J_2(\boldsymbol{v}_h)\|^2_{L^2(f)}\big). \end{eqnarray} They consist of the element residuals and face jump residuals as \begin{eqnarray*} && R_1 (\boldsymbol{v}_h, \boldsymbol{q}_h)\vert_\tau := \boldsymbol{q}_h\vert_\tau- \mu\nabla \times \boldsymbol{v}_h\vert_\tau, \\ && R_2 (\boldsymbol{v}_h, \boldsymbol{q}_h)\vert_\tau := \boldsymbol{f}\vert_\tau- (\nabla \times \boldsymbol{q}_h+ \kappa\boldsymbol{v}_h)\vert_\tau, \\ && R_3(\boldsymbol{v}_h)\vert_\tau := \nabla\cdot (\boldsymbol{f}\vert_\tau- \kappa\boldsymbol{v}_h\vert_\tau), \\ && J_1(\boldsymbol{q}_h)\vert_f :=[[\boldsymbol{q}_h]] , \\ && J_2(\boldsymbol{v}_h)\vert_f :=[[ (\boldsymbol{f}-\kappa\boldsymbol{v}_h)]]. \end{eqnarray*} where $h_f$ denote the diameter of the circumcircle of $f$, and $h_\tau \approx h_f$. For any set $ \mathcal{T}'_h \subseteq \mathcal{T}_h$, the error indicator is defined as \begin{equation}\label{Equ:3.24} \eta^2( \boldsymbol{v}_h, \boldsymbol{q}_h;\mathcal{T}'_h)=\sum_{\tau\in\mathcal{T}'_h} \eta^2( \boldsymbol{v}_h, \boldsymbol{q}_h;\tau). \end{equation} \subsubsection{Procedure MARK} We use the D\"{o}rfler mark which was proposed by D\"{o}rfler \cite{Dor96:1106}. Set marking parameter $\theta \in(0, 1)$, the module MARK outputs a subset of marked elements $\mathcal{M}_k \subset \mathcal{T}_{k} $ with minimal cardinality, such that \begin{eqnarray}\label{Equ:4.1} \eta^2( \boldsymbol{v}_k, \boldsymbol{q}_k;\mathcal{M}_k) \geq \theta \eta^2( \boldsymbol{v}_k, \boldsymbol{q}_k;\mathcal{T}_k). \end{eqnarray} \subsubsection{Procedure REFINE} Our implementation of \textbf{REFINE} uses the longest edge bisection strategy. A detailed introduction about the longest edge bisection strategy was provided in \cite{ChenLiFEM}. To avoid confusion, the relationship between the two tetrahedral meshes $\mathcal{T}_h$ and $\mathcal{T}_{H}$ that are nested into each other is defined as: $\mathcal{T}_h$ is the new mesh division of $\mathcal{T}_{H}$ after one cycle of the above cycle process, abbreviated as $ \mathcal{T}_H \leq \mathcal{ T}_h$. \section{Convergence of \textbf{AMIPDG} algorithm } In this section, we establish the upper bound estimate of the error. Subsequently, we demonstrate that the sum of the energy error and the error estimator between two consecutive adaptive loops is a contraction. Finally, we proof that the AMIPDG is convergence. \subsection{The upper bound estimate of the error} In this subsection, before establishing the reliability of a posteriori error estimator, we need to define the corresponding DG norm, for any $(\boldsymbol{v}, \boldsymbol{q}) \in \boldsymbol{U}\times \boldsymbol{Q} $ and $(\boldsymbol{v}_h, \boldsymbol{q}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$, \begin{eqnarray}\nonumber \|(\boldsymbol{v}, \boldsymbol{q})&-&(\boldsymbol{v}_h, \boldsymbol{q}_h)\|^2_{DG}:= \|\boldsymbol{q}-\boldsymbol{q}_h\|^2_{L^2(\Omega)} + \|\kappa(\boldsymbol{v}-\boldsymbol{v}_h)\|^2_{L^2(\Omega)} \\ \label{Equ:3.25} &+& \sum\limits_{\tau\in\mathcal{T}_h} \|\mu\nabla\times(\boldsymbol{v}-\boldsymbol{v}_h)\|^2_{L^2(\tau)} + \sum\limits_{f\in\mathcal{F}_h}\alpha h_f^{-1} <[[ \boldsymbol{v}_h ]] , [[ \boldsymbol{v}_h ]] >_{f}. \end{eqnarray} \begin{remark}\label{Rem:3.3} For any $\boldsymbol{v}\in \boldsymbol{U}$ and $\boldsymbol{v}_h\in\boldsymbol{U}_h$, we have \begin{equation*} \|[[ \boldsymbol{v}_h ]] \|^2_{L^2(f)} = \|[[ ( \boldsymbol{v}-\boldsymbol{v}_h) ]] \|^2_{L^2(f)}, \quad \forall f\in \mathcal{F}_h. \end{equation*} In fact, $\boldsymbol{v}\in \boldsymbol{U}$ implies that $[[ \boldsymbol{v} ]] \vert_f=0$ (see Chapter 5 of \cite{Monk03Book}). \end{remark} We summarize our main result in this subsection as follows. \begin{theorem}\label{Thm:1} Let $(\boldsymbol{u}, \boldsymbol{p})\in \mathbf {U}\times \boldsymbol{Q}$ and $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ be the solutions of \eqref{Equ:3.6}-\eqref{Equ:3.7} and \eqref{Equ:3.16}-\eqref{Equ:3.17}, respectively. Let $\eta( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}_h)$ be the residual error indicator of \eqref{Equ:3.24}. Then we have the following estimate \begin{equation}\label{Equ:3.26} \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{DG} \leq C_1 \eta^2( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}_h), \end{equation} where the constant $C_1$ depending on the shape regularity of mesh. \end{theorem} Let $(\boldsymbol{u}_h,\boldsymbol{p}_h)\in\boldsymbol{U}_h\times\boldsymbol{Q}_h$ be the solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}, similarly to \cite{CarHop11:13}, we introduce the nonconformity of the MSIPDG method results in some consistency error: \begin{equation}\label{Equ:3.27} \zeta:=\min_{\tilde{\boldsymbol{v}}_h\in\boldsymbol{U}} \big(\sum_{\tau\in\mathcal{T}_h}(\|\boldsymbol{u}_h- \tilde{\boldsymbol{v}}_h\|^2_{ {L}^2(\tau)}+\|\nabla\times( \boldsymbol{u}_h- \tilde{\boldsymbol{v}}_h)\|^2_{ {L}^2(\tau)}) \big)^{1/2}. \end{equation} We denote that $\tilde{\boldsymbol{u}}_h\in \boldsymbol{U}$ is the unique minimizer of \eqref{Equ:3.27}, namely \begin{equation}\label{Eqn:zeta} \tilde{\zeta}=\big(\sum_{\tau\in\mathcal{T}_h}(\|\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h\|^2_{ {L}^2(\tau)}+\|\nabla\times( \boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h)\|^2_{ {L}^2(\tau)}) \big)^{1/2}. \end{equation} \begin{lemma}\label{Lem:3} Let $(\boldsymbol{u}, \boldsymbol{p})\in \mathbf {U}\times \boldsymbol{Q}$ and $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ be the solutions of \eqref{Equ:3.6}-\eqref{Equ:3.7} and \eqref{Equ:3.16}-\eqref{Equ:3.17}, respectively, let $\tilde{\boldsymbol{u}}_h$ be the unique minimizer of \eqref{Equ:3.27}, then \begin{equation*} \|(\boldsymbol{u}-\tilde{\boldsymbol{u}}_h, \boldsymbol{p}-\boldsymbol{p}_h)\|_{\boldsymbol{U}\times \boldsymbol{Q}} = (\|\boldsymbol{u}-\tilde{\boldsymbol{u}}_h \|^2_{curl,\Omega} + \|\boldsymbol{p}-\boldsymbol{p}_h\|^2_{0})^{1/2} \lesssim \|\tilde{\ell}_1\|_{\boldsymbol{Q}^*}+\|\tilde{\ell}_2\|_{\boldsymbol{U}^*}, \end{equation*} where the residuals $\tilde{\ell}_1\in \boldsymbol{Q }^*$ and $\tilde{\ell}_2\in \boldsymbol{U}^*$ defined by \begin{eqnarray}\label{Equ:3.28} \tilde{\ell}_1(\boldsymbol{q}) = \ell_1(\boldsymbol{q}) - a(\boldsymbol{p}_h, \boldsymbol{q}) + b(\tilde{\boldsymbol{u}}_h, \boldsymbol{q}), \quad \forall q\in \boldsymbol{Q}, \\\label{Equ:3.29} \tilde{\ell}_2(\boldsymbol{v}) = \ell_2(\boldsymbol{v}) - d(\boldsymbol{v}, \boldsymbol{p}_h) - c(\tilde{\boldsymbol{u}}_h, \boldsymbol{v}), \quad \forall \boldsymbol{v}\in \boldsymbol{U} . \end{eqnarray} \end{lemma} \begin{proof} For any $ \boldsymbol{q}_1, \boldsymbol{q}_2 , \boldsymbol{q}\in \boldsymbol{Q} $ and any $\boldsymbol{v}_1, \boldsymbol{v}_2 , \boldsymbol{v}\in \boldsymbol{U}$. we have the following property by \eqref{Equ:3.13} \begin{eqnarray*} \lefteqn { (\mathcal{A}(\boldsymbol{v}_1+\boldsymbol{v}_2, \boldsymbol{q}_1+\boldsymbol{q}_2))(\boldsymbol{v}, \boldsymbol{q}) }\\ && = a(\boldsymbol{q}_1+\boldsymbol{q}_2, \boldsymbol{q})-b(\boldsymbol{v}_1+\boldsymbol{v}_2, \boldsymbol{q})+d(\boldsymbol{v}, \boldsymbol{q}_1+\boldsymbol{q}_2)+c(\boldsymbol{v}_1+\boldsymbol{v}_2, \boldsymbol{v})\\ && = a(\boldsymbol{q}_1, \boldsymbol{q})-b(\boldsymbol{v}_1, \boldsymbol{q})+d(\boldsymbol{v}, \boldsymbol{q}_1)+c(\boldsymbol{v}_1, \boldsymbol{v})\\ &&\quad + a(\boldsymbol{q}_2, \boldsymbol{q})-b(\boldsymbol{v}_2, \boldsymbol{q})+d(\boldsymbol{v}, \boldsymbol{q}_2)+c(\boldsymbol{v}_2, \boldsymbol{v})\\ && = (\mathcal{A}(\boldsymbol{v}_1, \boldsymbol{q}_1))(\boldsymbol{v}, \boldsymbol{q})+(\mathcal{A}(\boldsymbol{v}_2, \boldsymbol{q}_2))(\boldsymbol{v}, \boldsymbol{q}). \end{eqnarray*} Thus, \begin{eqnarray*} \lefteqn{ (\mathcal{A}(\boldsymbol{u}-\tilde{\boldsymbol{u}}_h, \boldsymbol{p}-\boldsymbol{p}_h)) (\boldsymbol{v}, \boldsymbol{q}) }\\ && = (\mathcal{A}(\boldsymbol{u}, \boldsymbol{p}))(\boldsymbol{v}, \boldsymbol{q})-(\mathcal{A}(\tilde{\boldsymbol{u}}_h, \boldsymbol{p}_h))(\boldsymbol{v}, \boldsymbol{q})\\ && = (\ell_1(\boldsymbol{q})+\ell_2(\boldsymbol{v}))- (a(\boldsymbol{p}_h, \boldsymbol{q})-b(\tilde{\boldsymbol{u}}_h, \boldsymbol{q})+d(\boldsymbol{v}, \boldsymbol{p}_h)+c(\tilde{\boldsymbol{u}}_h,\boldsymbol{v}))\\ && = \tilde{\ell}_1(\boldsymbol{q}) +\tilde{\ell}_2(\boldsymbol{v}). \end{eqnarray*} In fact that $ (\boldsymbol{u}-\tilde{\boldsymbol{u}}_h, \boldsymbol{p}-\boldsymbol{p}_h)\in\boldsymbol{U}\times \boldsymbol{Q} $ and combining the Lemma \ref{Lem:3.0} can concludes the proof. \end{proof} Next, we will provide upper bounds for $\| \tilde{\ell}_1\|_{\boldsymbol{Q }^*}$ and $\| \tilde{\ell}_2\|_{\boldsymbol{U}^*}$ in Lemmas \ref{Lem:4} and \ref{Lem:5}, respectively. \begin{lemma}\label{Lem:4} Let $(\boldsymbol{u}_h, \boldsymbol{p}_h)\in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ be the solutions of \eqref{Equ:3.16}-\eqref{Equ:3.17}, and $\tilde{\boldsymbol{u}}_h$ be the unique minimizer of \eqref{Equ:3.27}. Then we get the estimate of the linear functional $\tilde{\ell}_1$ defined in \eqref{Equ:3.28} as following \begin{equation}\label{Eqn:l1t} \| \tilde{\ell}_1\|_{\boldsymbol{Q }^*} \lesssim \big( \sum_{\tau\in\mathcal{T}_h} \|R_1( \boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{L^2(\tau)} \big)^{1/2} + \big( \sum_{\tau\in\mathcal{T}_h}\|\nabla\times (\tilde{\boldsymbol{u}}_h-\boldsymbol{u}_h)\|^2_{L^2(\tau)}\big)^{1/2}. \end{equation} \end{lemma} \begin{proof} For any $\boldsymbol{q}\in\boldsymbol{Q}$, by the definition of $\tilde{\ell}_1$, we have \begin{equation*} \tilde{\ell}_1(\boldsymbol{q}) = \sum_{\tau\in\mathcal{T}_h}\int_\tau \big((\mu\nabla\times \boldsymbol{u}_h- \boldsymbol{p}_h) + \mu\nabla\times (\tilde{\boldsymbol{u}}_h-\boldsymbol{u}_h)\big)\cdot \boldsymbol{q} \mathrm{d} \boldsymbol{x}. \end{equation*} Then applying the H\"{o}lder inequality and the Cauchy-Schwarz inequality, \begin{eqnarray*} \lefteqn{\vert \tilde{\ell}_1(\boldsymbol{q})\vert \leq \sum_{\tau\in\mathcal{T}_h } \| \mu\nabla\times \boldsymbol{u}_h- \boldsymbol{p}_h\|_{L^2(\tau)}\|\boldsymbol{q}\|_{L^2(\Omega)} + \sum_{\tau\in\mathcal{T}_h }\|\mu\nabla\times (\tilde{\boldsymbol{u}}_h-\boldsymbol{u}_h)\|_{L^2(\tau)} \|\boldsymbol{q}\|_{L^2(\Omega)}}\\ & \lesssim & \bigg(\big( \sum_{\tau\in\mathcal{T}_h} \|R_1( \boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{L^2(\tau)} \big)^{1/2} + \big( \sum_{\tau\in\mathcal{T}_h }\|\nabla\times (\tilde{\boldsymbol{u}}_h-\boldsymbol{u}_h)\|^2_{L^2(\tau)}\big)^{1/2}\bigg)\|\boldsymbol{q}\|_{L^2(\Omega)}, \end{eqnarray*} conclude the proof. \end{proof} Before estimating the term $\|\tilde{\ell}_2\|_{\boldsymbol{U}^*}$, we need to introduce the following interpolation operator with the corresponding approximations. \begin{lemma}\label{Lem:4.1} [\cite{Sch08:633}, Theorem 1] Let $Nd^1_0(\Omega; \mathcal{T}_h)$ be the lowest order edge elements of N\'ed\'elec first family. Then there exists an operator $\Pi_h: \boldsymbol{H}_0(curl;\Omega) \to Nd^1_0(\Omega; \mathcal{T}_h)$ with the following properties: For every $\boldsymbol{v} \in \boldsymbol{H}_0(curl;\Omega)$, there exist $\varphi \in H_0^1(\Omega) $ and $ \boldsymbol{z}\in \boldsymbol{H}_0^1(\Omega)$, such that \begin{eqnarray*} \boldsymbol{v} -\Pi_h \boldsymbol{v} =\nabla \varphi+ \boldsymbol{z}. \end{eqnarray*} And for any $\tau \in \mathcal{T}_h$ and $f \in \mathcal{F}_h$, we have \begin{eqnarray*} h_\tau^{-1} \| \varphi\|_{L^2(\tau)} + \|\nabla \varphi\|_{L^2(\tau)} \lesssim h_\tau \| \boldsymbol{v}\|_{L^2(\Omega_\tau)}, \\ h_\tau^{-1} \| \boldsymbol{z} \|_{L^2(\tau)} + \| \nabla \boldsymbol{z}\|_{L^2(\tau)} \lesssim h_\tau \|\nabla\times \boldsymbol{v}\|_{L^2(\Omega_\tau)}, \end{eqnarray*} where $ \Omega_\tau=\bigcup\limits_{f\in\tau} \Omega_f$, $\Omega_f=\{ \tau' \in \mathcal{T}_h, f\in \tau' \} $, and the constants depending on the shape regularity of the mesh. \end{lemma} \begin{lemma}\label{Lem:5} Let $ (\boldsymbol{u}_h, \boldsymbol{p}_h)\in \boldsymbol{U}_h\times \boldsymbol{Q}_h $ be the solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}, and $\tilde{\boldsymbol{u}}_h$ be the unique solution of \eqref{Equ:3.27}. Then the linear functional $\tilde{\ell}_2$ defined in \eqref{Equ:3.29} satisfies the following estimate \begin{eqnarray}\nonumber \lefteqn{ \| \tilde{\ell}_2\|_{\boldsymbol{U}^*} \lesssim \bigg( \sum_{\tau\in\mathcal{T}} h^2_\tau(\|R_2( \boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{L^2(\tau)} + \|R_2( \boldsymbol{u}_h)\|^2_{L^2(\tau)}) } \\ \label{Eqn:l2t} &&\ \ \ \ + \sum_{f\in\mathcal{F} }h_f(\|J_1(\boldsymbol{p}_h)\|^2_{L^2(f)} + \|J_2(\boldsymbol{u}_h)\|^2_{L^2(f)}) + \sum_{\tau\in\mathcal{T}}\| \boldsymbol{u}_h-\tilde{\boldsymbol{u}}_h \|^2_{L^2(\tau)}\bigg)^{1/2}.\ \ \end{eqnarray} \end{lemma} \begin{proof} For any $\boldsymbol{v}\in\boldsymbol{U}$ and $\Pi_h$ given by Lemma \ref{Lem:4.1}, we have \begin{eqnarray}\label{Eqn:dec} \boldsymbol{v} -\Pi_h \boldsymbol{v} =\nabla \varphi+ \boldsymbol{z}, \end{eqnarray} where $\varphi \in H_0^1(\Omega) $ and $ \boldsymbol{z}\in \boldsymbol{H}_0^1(\Omega)$. According to linearity of the operator $\tilde{\ell}_2$ and \eqref{Eqn:dec}, we have \begin{eqnarray} \label{Equ:3.31} \tilde{\ell}_2(\boldsymbol{v}) = \tilde{\ell}_2(\Pi_h\boldsymbol{v})+\tilde{\ell}_2(\boldsymbol{v}-\Pi_h\boldsymbol{v}) = \tilde{\ell}_2(\Pi_h\boldsymbol{v}) + \tilde{\ell}_2( \nabla \varphi)+\tilde{\ell}_2( \boldsymbol{z} ). \end{eqnarray} We will next estimate the three terms on the right hand side of \eqref{Equ:3.31}. For the first term $\tilde{\ell}_2(\Pi_h\boldsymbol{v})$ of \eqref{Equ:3.31}, using the definition of $\tilde{\ell}_2$, we have \begin{eqnarray*} \tilde{\ell}_2(\Pi_h\boldsymbol{v}) &=& \ell_2(\Pi_h\boldsymbol{v}) - d(\Pi_h\boldsymbol{v}, \boldsymbol{p}_h) - c(\tilde{\boldsymbol{u}}_h, \Pi_h\boldsymbol{v})\\ &=& \ell_2(\Pi_h\boldsymbol{v}) - d(\Pi_h\boldsymbol{v}, \boldsymbol{p}_h) - c(\boldsymbol{u}_h, \Pi_h\boldsymbol{v}) + c(\boldsymbol{u}_h-\tilde{\boldsymbol{u}}_h, \Pi_h\boldsymbol{v}). \end{eqnarray*} Noting that $\Pi_h\boldsymbol{v}\in Nd^1_0(\Omega;\mathcal{T}_h)\subseteq \boldsymbol{U}_h$ has zero jumps, and combining \eqref{Equ:3.17}, we have \begin{eqnarray*} \ell_2(\Pi_h\boldsymbol{v}) - d(\Pi_h\boldsymbol{v}, \boldsymbol{p}_h) - c(\boldsymbol{u}_h, \Pi_h\boldsymbol{v}) = \ell_{2,h}(\Pi_h\boldsymbol{v}) - d_h(\Pi_h\boldsymbol{v}, \boldsymbol{p}_h) - c_h(\boldsymbol{u}_h, \Pi_h\boldsymbol{v}) =0. \end{eqnarray*} Thus, we have \begin{eqnarray*} \tilde{\ell}_2(\Pi_h\boldsymbol{v}) &=& c(\boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h, \Pi_h\boldsymbol{v})\\ &=& c(\boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h, \boldsymbol{v}) + c(\boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h, \Pi_h\boldsymbol{v}-\boldsymbol{v})\\ &\leq& \|\kappa \|_{0,\infty} \|\boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h\|_{0, \mathcal{T}_h}( \|\boldsymbol{v}\|_{0, \mathcal{T}_h} + \|\Pi_h\boldsymbol{v}-\boldsymbol{v}\|_{0, \mathcal{T}_h}). \end{eqnarray*} Then using \eqref{Eqn:dec}, triangle inequality and Lemma \ref{Lem:4.1}, we get \begin{eqnarray}\nonumber \tilde{\ell}_2(\Pi_h\boldsymbol{v}) &\leq& \|\kappa\|_{0,\infty}\|\boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h\|_{0, \mathcal{T}_h}( \|\boldsymbol{v}\|_{0, \mathcal{T}_h} + \|\nabla \varphi+ \boldsymbol{z}\|_{0, \mathcal{T}_h})\\ \nonumber &\leq& \|\kappa \|_{0,\infty} \| \boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h\|_{0, \mathcal{T}_h}( \|\boldsymbol{v}\|_{0, \mathcal{T}_h} +\|\nabla \varphi\|_{0, \mathcal{T}_h}+ \|\boldsymbol{z}\|_{0, \mathcal{T}_h} ) \\\label{Equ:3.32} &\leq& \|\kappa \|_{0,\infty} \| \boldsymbol{v}_h-\tilde{\boldsymbol{u}}_h\|_{0, \mathcal{T}_h} \|\boldsymbol{v}\|_{curl,\mathcal{T}_h}. \end{eqnarray} For the second term $\tilde{\ell}_2(\nabla\varphi)$ of \eqref{Equ:3.31}, using the definition of $\tilde{\ell}_2$, \eqref{Equ:3.12}, \eqref{Equ:3.9}, \eqref{Eqn:3.10} and the fact $\nabla\times\nabla\varphi = 0$, which implies \begin{eqnarray}\nonumber \tilde{\ell}_2( \nabla \varphi) &=&\ell_2( \nabla \varphi )-d( \nabla \varphi, \boldsymbol{p}_h)-c(\tilde{\boldsymbol{u}}_h, \nabla \varphi)\\ \nonumber &=&(\boldsymbol{f}, \nabla \varphi)- (\nabla\times \nabla \varphi, \boldsymbol{p}_h ) -(\kappa\tilde{\boldsymbol{u}}_h, \nabla \varphi )\\ \label{Eqn:var} &=&(\boldsymbol{f}, \nabla \varphi)-(\kappa\tilde{\boldsymbol{u}}_h, \nabla \varphi ). \end{eqnarray} By \eqref{Eqn:var} and Green's formula, we have \begin{eqnarray*} \tilde{\ell}_2( \nabla \varphi) &=&(\boldsymbol{f}, \nabla \varphi)- (\kappa\boldsymbol{u}_h, \nabla \varphi ) + ( \kappa(\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h), \nabla \varphi )\\ & \leq & \sum\limits_{\tau\in \mathcal{T}_h}(R_3(\boldsymbol{u}_h), \varphi)_{0, \tau} +\sum\limits_{f\in \mathcal{F}_h} <J_2(\boldsymbol{u}_h), \varphi>_{0, f} +( \kappa(\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h), \nabla \varphi ). \end{eqnarray*} Applying the Cauchy-Schwarz inequality, Lemma \ref{Lem:4.1} and trace inequality, we have \begin{eqnarray}\nonumber \tilde{\ell}_2 ( \nabla \varphi) \leq \bigg(\sum\limits_{\tau\in \mathcal{T}_h} h_\tau^2\|R_3(\boldsymbol{u}_h)\|^2_{0, \tau} +\sum\limits_{f\in \mathcal{F}_h}h_f \|J_2(\boldsymbol{u}_h)\|^2_{0, f} \bigg. \\ \label{Equ:3.34} \bigg. + \sum\limits_{\tau\in \mathcal{T}_h}\|\kappa \|_{0,\infty} \|\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h\|^2_{0, \tau} \bigg)^{1/2} \|\boldsymbol{v}\|_{curl, \mathcal{T}_h }. \end{eqnarray} Similarly, for the third term $\tilde{\ell}_2(\boldsymbol{z})$ of \eqref{Equ:3.31}, we have \begin{eqnarray} \nonumber \tilde{\ell}_2( \boldsymbol{z} ) &=& (\boldsymbol{f}, \boldsymbol{z} ) - (\nabla\times \boldsymbol{z} , \boldsymbol{p}_h ) - (\kappa\tilde{\boldsymbol{u}}_h, \boldsymbol{z} )\\ \nonumber &=& (\boldsymbol{f}, \boldsymbol{z} ) - (\nabla\times \boldsymbol{z} , \boldsymbol{p}_h ) - (\kappa\boldsymbol{u}_h, \boldsymbol{z} ) + ( \kappa(\boldsymbol{u}_h-\tilde{\boldsymbol{u}}_h), \boldsymbol{z} )\\\nonumber &\leq& \bigg(\sum\limits_{\tau\in \mathcal{T}_h} h_\tau^2\|R_2(\boldsymbol{u}_h,\boldsymbol{p}_h)\|^2_{0, \tau} + \sum\limits_{f\in \mathcal{F}_h}h_f \|J_1(\boldsymbol{p}_h)\|^2_{0, f} \bigg. \\\label{Equ:3.35} \bigg. && + \sum\limits_{\tau\in \mathcal{T}_h}\|\kappa \|_{0,\infty} \|\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h\|^2_{0, \tau}\bigg)^{1/2} \|\boldsymbol{v}\|_{curl, \mathcal{T}_h }. \end{eqnarray} Substituting \eqref{Equ:3.32}, \eqref{Equ:3.34} and \eqref{Equ:3.35} into \eqref{Equ:3.31}, the proof is completed. \end{proof} Notice that both \eqref{Eqn:l1t} and \eqref{Eqn:l2t} are related to the terms $\sum\limits_{\tau\in\mathcal{T}_h}\|\nabla\times (\tilde{\boldsymbol{u}}_h-\boldsymbol{u}_h)\|^2_{L^2(\tau)}$ and $\sum\limits_{\tau\in\mathcal{T}}\| \boldsymbol{u}_h-\tilde{\boldsymbol{u}}_h \|^2_{L^2(\tau)}$, which are a part of $\tilde{\zeta}$. Therefore, we prove upper bounds for $\tilde{\zeta}$ in the following Lemma. \begin{lemma}\label{Lem:3.2} Let $({\boldsymbol{u}}_h, {\boldsymbol{p}}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ be the solutions of \eqref{Equ:3.16}-\eqref{Equ:3.17} and $\tilde{\zeta}$ be consistency error of \eqref{Eqn:zeta}, we have \begin{equation}\label{Equ:3.30} \tilde{\zeta}^2 \lesssim \eta^2( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}_h). \end{equation} \end{lemma} \begin{proof} For any $\boldsymbol{v}_h \in \boldsymbol{U}_h $, there exit an interpolation operator $\mathcal{I}_h :\boldsymbol{H}^1(\Omega;\mathcal{T}_h )\to \boldsymbol{U}^c_h$, such that(see Proposition 4.5 of \cite{HouPer05:485}) \begin{eqnarray}\label{Eqn:uhIuh} \|\boldsymbol{v}_h- \mathcal{I}_h\boldsymbol{v}_h\|^2_{L^2(\Omega)} \lesssim \sum_{f \in \mathcal{F}_h} h_f \| [[ \boldsymbol{v}_h]] \|^2_{L^2(f)}, \\ \label{Eqn:nablauhIu} \sum_{ \tau \in \mathcal{T}_h} \|\nabla \times (\boldsymbol{v}_h-\mathcal{I}_h \boldsymbol{v}_h) \|^2_{L^2(\tau)} \lesssim\sum_{f \in \mathcal{F}_h} h_f^{-1} \| [[ \boldsymbol{v}_h]] \|^2_{L^2(f)}. \end{eqnarray} Then, combining \eqref{Equ:3.27}, \eqref{Eqn:zeta}, \eqref{Eqn:uhIuh}, \eqref{Eqn:nablauhIu}, and the fact $h_f<1$, we get \begin{eqnarray}\nonumber \tilde{\zeta}^2 &=& \sum_{\tau\in\mathcal{T}_h}(\|\boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h\|^2_{ {L}^2(\tau)} + \|\nabla\times( \boldsymbol{u}_h- \tilde{\boldsymbol{u}}_h)\|^2_{ {L}^2(\tau)}) \\ \nonumber \label{Eqn:7.1} &\leq& \sum_{\tau\in\mathcal{T}_h}(\|\boldsymbol{u}_h - \mathcal{I}_h \boldsymbol{u}_h\|^2_{ {L}^2(\tau)} + \|\nabla\times( \boldsymbol{u}_h - \mathcal{I}_h \boldsymbol{u}_h)\|^2_{ {L}^2(\tau)}) \\\nonumber &\lesssim& \sum_{f \in \mathcal{F}_h} h_f \| [[ \boldsymbol{u}_h]] \|^2_{L^2(f)} + \sum_{f \in \mathcal{F}_h} h_f^{-1} \| [[ \boldsymbol{u}_h]] \|^2_{L^2(f)} \\ \label{Eqn:7.2} &\lesssim& \sum_{f \in \mathcal{F}_h} h_f^{-1} \| [[ \boldsymbol{u}_h]] \|^2_{L^2(f)}. \end{eqnarray} Noting that $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h $ is the solution of discrete variational problem \eqref{Equ:3.16}-\eqref{Equ:3.17}. Then by using Lemma \ref{Lem:0}, we know that $\boldsymbol{u}_h$ is the solution of discrete variational problem \eqref{Equ:3.20}. Hence, we have ( see Lemma 5 of \cite{XingZhong12}) \begin{eqnarray}\label{Eqn:ajump} \alpha\| h_f^{-1/2}[[ \boldsymbol{u}_h]] \|_{L^2(\mathcal{F}_h)} \lesssim \eta( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}_h). \end{eqnarray} At last, combining \eqref{Eqn:7.2} and \eqref{Eqn:ajump}, we have \begin{eqnarray*} \tilde{\zeta}^2 & \lesssim &\eta^2( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}). \end{eqnarray*} \end{proof} Combining Lemmas \ref{Lem:3}, \ref{Lem:4}, \ref{Lem:5} and \ref{Lem:3.2}, we will prove Theorem \ref{Thm:1}. \begin{proof}[ \textbf{Proof of} Theorem \ref{Thm:1}:] By using \eqref{Equ:3.25}, the triangle inequality, \eqref{Eqn:zeta}, Lemmas \ref{Lem:3}, \ref{Lem:4}, \ref{Lem:5}, \ref{Lem:3.2} and \eqref{Eqn:ajump}, we get \begin{eqnarray*}\lefteqn{ \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{DG} }\\ &\lesssim& \|\boldsymbol{p}-\boldsymbol{p}_h\|^2_{L^2(\Omega)} + \|\kappa(\boldsymbol{u}-\boldsymbol{u}_h)\|^2_{L^2(\Omega)} \\ && + \sum\limits_{\tau\in\mathcal{T}_h}\|\nabla\times\mu({\boldsymbol{u}}-\boldsymbol{u}_h)\|^2_{L^2(\tau)} + \sum\limits_{f\in\mathcal{F}_h}\alpha h_f^{-1} <[[ \boldsymbol{u}_h ]] , [[ \boldsymbol{u}_h ]] >_{f}\\ &\lesssim& \|\boldsymbol{p}-\boldsymbol{p}_h\|^2_{L^2(\Omega)} + \|\boldsymbol{u}-\tilde{\boldsymbol{u}}_h\|^2_{\boldsymbol{curl}, \Omega} + \tilde{\zeta}^2 + \sum\limits_{f\in\mathcal{F}_h}\alpha h_f^{-1} <[[ \boldsymbol{u}_h ]] , [[ \boldsymbol{u}_h ]] >_{f} \\ &=& \|(\boldsymbol{u}-\tilde{\boldsymbol{u}}_h, \boldsymbol{p}-\boldsymbol{p}_h)\|_{\boldsymbol{U}\times \boldsymbol{Q}} + \tilde{\zeta}^2 + \sum\limits_{f\in\mathcal{F}_h}\alpha h_f^{-1} <[[ \boldsymbol{u}_h ]] , [[ \boldsymbol{u}_h ]] >_{f} \\ &\lesssim& \| \tilde{\ell}_1\|^2_{\mathbf {Q}^*} + \|\tilde{\ell}_2\|^2_{\boldsymbol{U}^*} + \tilde{\zeta}^2 + \sum\limits_{f\in\mathcal{F}_h}\alpha h_f^{-1} <[[ \boldsymbol{u}_h ]] , [[ \boldsymbol{u}_h ]] >_{f} \\ &\leq& C_1 \eta^2( \boldsymbol{u}_h, \boldsymbol{p}_h;\mathcal{T}_h). \end{eqnarray*} \end{proof} \subsection{The error reduces on two successive meshes} For convenience, for any $\boldsymbol{v}\in\boldsymbol{U}$ and $\boldsymbol{v}_h\in\boldsymbol{U}_h$, we denote \begin{eqnarray} \nonumber \|\vert\boldsymbol{v}-\boldsymbol{v}_h \vert\|_h^2 &=& \|\kappa(\boldsymbol{v}-\boldsymbol{v}_h)\|^2_{L^2(\Omega)} + \sum\limits_{\tau\in\mathcal{T}_h} \|\nabla\times\mu(\boldsymbol{v}-\boldsymbol{v}_h)\|^2_{L^2(\tau)} \\\label{Equ:4.0} &&+ \sum\limits_{f\in\mathcal{F}_h} \alpha h_f^{-1} <[[ \boldsymbol{v}_h ]] , [[ \boldsymbol{v}_h ]] >_{f}. \end{eqnarray} Let $\boldsymbol{U}^{c}_h$ be the $\boldsymbol{H}(\boldsymbol{curl})$ conforming subspace of $\boldsymbol{U}_h$ given by $$ \boldsymbol{U}^{c}_h := \boldsymbol{U}_h \cap \mathbf {H}_0(curl;\Omega). $$ Then, there is a subspace $\boldsymbol{U}^{\bot}_h$ which can orthogonally decompose $\boldsymbol{U}_h $ under $\boldsymbol{L}^2$ inner product such that $\boldsymbol{U}_h :=\boldsymbol{U}^{c}_h \oplus \boldsymbol{U}^{\bot}_h$. Especially, if $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h $ is the solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}, then we have \begin{equation}\label{Eqn:bot} \|\vert\boldsymbol{u}_h^\bot \vert\|^2_{h} \lesssim \alpha \sum\limits_{f \in \partial\tau } \|h_f^{-1/2} [[ \boldsymbol{u}_h]] \|^2_{L^2(f)}. \end{equation} In fact, from the Lemma \ref{Lem:0}, notice that $\boldsymbol{u}_h$ satisfies the IPDG scheme of \eqref{Equ:3.20}, and according to Lemma 2 in \cite{XingZhong12}, we can obtain \eqref{Eqn:bot}. In order to easily estimate the jump term of face $\mathcal{F}_h$, we need to introduce the lifting operators and the corresponding stability estimates, more details are referenced to Proposition 12 in \cite{PerSch02:4675}. Let $\mathcal{L}_h:\boldsymbol{H}^1(\Omega;\mathcal{T}_h )\to \boldsymbol{U}_h $ be the lifting operators, which satisfies the following equality \begin{equation}\label{Eqn:L} \int_\Omega \mathcal{L}_h(\boldsymbol{v} )\cdot \boldsymbol{w} \mathrm{d}x=<[[ \boldsymbol{v}]] , \{\{ \boldsymbol{w} \}\} >_{\mathcal{F}_h}, \quad \forall \boldsymbol{w} \in \boldsymbol{U}_h, \end{equation} and \begin{equation}\label{Eqn:se} \| \mathcal{L}_h(\boldsymbol{v} )\|_{L^2(\Omega)} \leq C_{\mathcal{L}}\| h^{-1/2} [[ \boldsymbol{v}]] \|_{L^2(\mathcal{F}_h)}, \end{equation} where the constant $C_{\mathcal{L}}$ depending on the shape regularity of mesh $\mathcal{T}_h$ and the degree of polynomial $l$. \begin{lemma}\label{Lem:add1} Let $(\boldsymbol{u}, \boldsymbol{p})\in \mathbf {U}\times \boldsymbol{Q}$ and $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ be the solutions of \eqref{Equ:3.6}-\eqref{Equ:3.7} and \eqref{Equ:3.16}-\eqref{Equ:3.17}, respectively, we have \begin{eqnarray} \label{Equ:add1} \|\boldsymbol{p}-\boldsymbol{p}_h \|_{L^2(\Omega)} &\lesssim& \| \nabla \times ( \boldsymbol{u}-\boldsymbol{u}_h) \|_{L^2(\Omega)}+ \eta( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}),\\\nonumber \|\boldsymbol{p}_h-\boldsymbol{p}_H \|_{L^2(\Omega)} &\lesssim& \| \nabla \times ( \boldsymbol{u}_h-\boldsymbol{u}_H) \|_{L^2(\Omega)} \\ &&+ \bigg(\eta( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})+ \eta( \boldsymbol{u}_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H})\bigg). \end{eqnarray} \end{lemma} \begin{proof} Noting that $\boldsymbol{Q}_h \subseteq \boldsymbol{Q}$, and using \eqref{Equ:3.6}, the definition of $R_1(\boldsymbol{u}_h, \boldsymbol{p}_h)$ and \eqref{Equ:3.23}, we have \begin{eqnarray*} \|\boldsymbol{p}-\boldsymbol{p}_h\|_{L^2(\mathcal{T}_h)} &\leq& \sup\limits_{\forall \boldsymbol{q} \in \boldsymbol{Q} } \frac{(\boldsymbol{p}-\boldsymbol{p}_h, \boldsymbol{q} )_{\mathcal{T}_h}}{\|\boldsymbol{q} \|_{L^2(\mathcal{T}_h)}} \\ &=& \sup\limits_{\forall \boldsymbol{q} \in \boldsymbol{Q} } \frac{(\mu\nabla \times \boldsymbol{u}, \boldsymbol{q} )_{\mathcal{T}_h} -\big(R_1(\boldsymbol{u}_h, \boldsymbol{p}_h)+ \mu\nabla \times \boldsymbol{u}_h, \boldsymbol{q}\big)_{\mathcal{T}_h} }{\|\boldsymbol{q} \|_{L^2(\mathcal{T}_h)}} \\ &\leq& \sup\limits_{\forall \boldsymbol{q} \in \boldsymbol{Q} } \frac{(\mu\nabla \times (\boldsymbol{u}-\boldsymbol{u}_h), \boldsymbol{q})_{\mathcal{T}_h}- \big(R_1(\boldsymbol{u}_h, \boldsymbol{p}_h), \boldsymbol{q}\big)_{\mathcal{T}_h}}{\|\boldsymbol{q}\|_{L^2(\mathcal{T}_h)}} \\ &\lesssim& \| \nabla \times (\boldsymbol{u}-\boldsymbol{u}_h)\|_{L^2(\mathcal{T}_h)}+\eta( u_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}). \end{eqnarray*} Similarly, using the definition of $R_1(\boldsymbol{u}_h, \boldsymbol{p}_h)$, \eqref{Equ:3.16}, \eqref{Eqn:bot}-\eqref{Eqn:se}, and the fact $[[\boldsymbol{u}_h]] = [[\boldsymbol{u}_h^c + \boldsymbol{u}_h^{\bot}]] = [[\boldsymbol{u}_h^{\bot}]]$, we have \begin{eqnarray*} \lefteqn{\|\boldsymbol{p}_h-\boldsymbol{p}_H \|_{L^2(\mathcal{T}_h)} \leq\sup\limits_{\forall \boldsymbol{q}_h \in \boldsymbol{Q}_h} \frac{(\boldsymbol{p}_h-\boldsymbol{p}_H, \boldsymbol{q}_h )_{\mathcal{T}_h}}{\|\boldsymbol{q}_h \|_{L^2(\mathcal{T}_h)}} }\\ &\leq& \sup\limits_{\forall \boldsymbol{q}_h \in \boldsymbol{Q}_h} \frac{(\boldsymbol{p}_h, \boldsymbol{q}_h )_{\mathcal{T}_h}- \big(R_1(\boldsymbol{u}_H, \boldsymbol{p}_H)+ \mu\nabla \times \boldsymbol{u}_H, \boldsymbol{q}_h\big)_{\mathcal{T}_h} }{\|\boldsymbol{q}_h \|_{L^2(\mathcal{T}_h)}} \\ &\leq& \sup\limits_{\forall \boldsymbol{q}_h \in \boldsymbol{Q}_h} \frac{(\mu\nabla \times \boldsymbol{u}_h, \boldsymbol{q}_h)_{\mathcal{T}_h}+ < \{\{ \boldsymbol{q}_h \}\} , [[\mu \boldsymbol{u}_h ]] >_{\mathcal{F}_h}- \big(R_1(\boldsymbol{u}_H, \boldsymbol{p}_H)+ \mu\nabla \times \boldsymbol{u}_H, \boldsymbol{q}_h\big)_{\mathcal{T}_h}}{\|\boldsymbol{q}_h \|_{L^2(\mathcal{T}_h)}} \\ &=& \sup\limits_{\forall \boldsymbol{q}_h \in \boldsymbol{Q}_h} \frac{(\mu\nabla \times (\boldsymbol{u}_h-\boldsymbol{u}_H ), \boldsymbol{q}_h)_{\mathcal{T}_h}+ < \{\{ \boldsymbol{q}_h \}\} , [[\mu \boldsymbol{u}_h ]] >_{\mathcal{F}_h}- \big(R_1(\boldsymbol{u}_H, \boldsymbol{p}_H), \boldsymbol{q}_h\big)_{\mathcal{T}_h} }{\|\boldsymbol{q}_h \|_{L^2(\mathcal{T}_h)}} \\ & \lesssim& \| \nabla \times (\boldsymbol{u}_h-\boldsymbol{u}_H)\|_{L^2(\mathcal{T}_h)} + \| h_\tau^{-1/2}[[ \boldsymbol{u}_h ]] \|_{L^2(\mathcal{T}_h)}+ \eta( u_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H})\\ & \lesssim & \| \nabla \times (\boldsymbol{u}_h-\boldsymbol{u}_H)\|_{L^2(\mathcal{T}_h)} + C_{\mathcal{L}}\| h_\tau^{-1/2}[[ \boldsymbol{u}_h^\bot ]] \|_{L^2(\mathcal{T}_h)}+\eta( u_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H}) \\ & \lesssim & \| \nabla \times ( \boldsymbol{u}_h-\boldsymbol{u}_H) \|_{L^2(\tau)}+ \bigg(\eta( u_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})+ \eta( u_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H})\bigg) . \end{eqnarray*} \end{proof} \begin{remark} \label{Rem:4} Noting that $\|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{DG} +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})$ and $ \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})$ are equivalent. In fact, by \eqref{Equ:add1}, we first know that \begin{eqnarray*} \lefteqn{ \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{DG} +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}) }\\ &&\quad = \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 + \|\boldsymbol{p}-\boldsymbol{p}_h \|^2_{L^2(\mathcal{T}_h)} + \eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})\\ && \quad \lesssim \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}). \end{eqnarray*} Secondly, it is shown by the definition of $\|\cdot\|_{DG}$ \begin{equation*} \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}) \leq \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_h, \boldsymbol{p}_h)\|^2_{DG} +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h}). \end{equation*} Thus, we next only need to consider the convergence of $ \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 +\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})$. \end{remark} We first show that the error plus some quantity reduces with a fixed factor on two successive meshes. \begin{lemma}\label{lem:tsm} Given $\boldsymbol{f}\in \boldsymbol{L}^2(\Omega)$ and two tetrahedral mesh $\mathcal{T}_h$ and $\mathcal{T}_{H}$, where $\mathcal{T}_{H}\leq\mathcal{T}_{h}$. Let $(\boldsymbol{u}, \boldsymbol{p})\in \boldsymbol{U}\times \boldsymbol{Q}$ be the solution of \eqref{Equ:3.6}-\eqref{Equ:3.7}, and $(\boldsymbol{u}_h, \boldsymbol{p}_h) \in \boldsymbol{U}_h\times \boldsymbol{Q}_h $, $(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\in \boldsymbol{U}_{H} \times \boldsymbol{Q}_{H}$ be the solutions of \eqref{Equ:3.16}-\eqref{Equ:3.17}, respectively. Then there exit two constants $ \delta_1 , \delta_2 \in(0,1)$, such that \begin{eqnarray} \nonumber \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 &\leq& ( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_H \vert\|_H^2 -\frac{1-\delta_2}{2} \|\vert\boldsymbol{u}_h -\boldsymbol{u}_H \vert\|_h^2\\ &&+ \frac{C_3}{ \delta_1\delta_2 \alpha} \bigg(\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})+ \eta^2( \boldsymbol{u}_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H})\bigg). \label{Equ:3.30.1} \end{eqnarray} where $C_3$ depending on the $C_\mathcal{L}$. \end{lemma} \begin{proof} Choosing that $\boldsymbol{q}=\nabla\times \boldsymbol{v}$, and subtracting \eqref{Equ:3.6} from \eqref{Equ:3.7}, we obtain \begin{equation} \label{Equ:4.7} (\kappa\boldsymbol{u} , \boldsymbol{v}) +( \mu\nabla\times \boldsymbol{u} , \nabla\times \boldsymbol{v} ) =(\boldsymbol{f}, \boldsymbol{v}). \end{equation} Subtracting \eqref{Equ:3.20} from \eqref{Equ:4.7} with $\boldsymbol{v} =\boldsymbol{v}_h=\boldsymbol{u}_h^c -\boldsymbol{u}_H^c$, and using $ [[ \boldsymbol{u}_h^c -\boldsymbol{u}_H^c]] =0$, we have \begin{eqnarray*} (\kappa(\boldsymbol{u} -\boldsymbol{u}_h), \boldsymbol{u}_h^c -\boldsymbol{u}_H^c)_{0 ,\mathcal{T}_h} + (\mu\nabla\times(\boldsymbol{u} -\boldsymbol{u}_h), \nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c))_{0 ,\mathcal{T}_h}\\ + <[[ \boldsymbol{u}_h]] , \{\{ \mu\nabla\times (\boldsymbol{u}_h^c -\boldsymbol{u}_H^c) \}\} >_{\mathcal{F}_h}=0, \end{eqnarray*} which leads to \begin{eqnarray}\label{Eqn:*1}\nonumber (\kappa(\boldsymbol{u} -\boldsymbol{u}_h), \boldsymbol{u}_h^c -\boldsymbol{u}_H^c)_{0 ,\mathcal{T}_h} + (\mu\nabla\times(\boldsymbol{u} -\boldsymbol{u}_h), \nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c))_{0 ,\mathcal{T}_h}\\ = -<[[ \boldsymbol{u}_h]] , \{\{ \mu\boldsymbol{u}_h^c -\boldsymbol{u}_H^c \}\} >_{\mathcal{F}_h}. \end{eqnarray} Using \eqref{Eqn:L} and \eqref{Eqn:se}, we have \begin{eqnarray}\nonumber <[[ \boldsymbol{u}_h]] , \{\{ \nabla\times (\boldsymbol{u}_h^c -\boldsymbol{u}_H^c) \}\} >_{\mathcal{F}_h} &=& (\mathcal{L}_h(\boldsymbol{u}_h ), \nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c))_{0 ,\mathcal{T}_h} \\ \label{Eqn:*2} & &~\hspace{-1.8cm} \leq C_{\mathcal{L}} \|h^{-1/2}[[ \boldsymbol{u}_h ]] \|_{0 ,\mathcal{T}_h} \|\nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c)\|_{0 ,\mathcal{T}_h}. \end{eqnarray} Let $\boldsymbol{u}_h = \boldsymbol{u}_h^c+\boldsymbol{u}_h^{\bot}$ and $\boldsymbol{u}_H = \boldsymbol{u}_H^c+\boldsymbol{u}_H^{\bot}$, we have \begin{equation}\label{Eqn:*3} \boldsymbol{u}_h+\boldsymbol{u}_H^c- \boldsymbol{u}_h^c= \boldsymbol{u}_H-\boldsymbol{u}_H^\bot + \boldsymbol{u}_h^\bot, \end{equation} where $\boldsymbol{u}^c_H\in\boldsymbol{U}_H^c$, $\boldsymbol{u}^c_h\in\boldsymbol{U}_h^c$, $\boldsymbol{u}^{\bot}_H\in\boldsymbol{U}_H^{\bot}$, $\boldsymbol{u}^{\bot}_h\in\boldsymbol{U}_h^{\bot}$. By \eqref{Eqn:*3}, \eqref{Eqn:*1}, \eqref{Eqn:*2} and Young's inequality, we get \begin{eqnarray*} &&\|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|_h^2 \\ && =\|\kappa (\boldsymbol{u}-\boldsymbol{u}_h)\|^2_{L^2(\Omega)} + \| \nabla\times\mu (\boldsymbol{u}-\boldsymbol{u}_h)\|^2_{L^2(\Omega)}\\ && \quad+ \sum\limits_{f\in\mathcal{F}_h} \alpha h_f^{-1} <[[( \boldsymbol{u}-\boldsymbol{u}_h)]] , [[ \boldsymbol{u}-\boldsymbol{u}_h]] >_{\mathcal{F}_h} \\ && = \|\vert \boldsymbol{u}-\boldsymbol{u}_h -\boldsymbol{u}_H^c+\boldsymbol{u}_h^c\vert\|_h^2 - \|\vert\boldsymbol{u}_h^c -\boldsymbol{u}_H^c\vert\|_h^2 - 2(\kappa(\boldsymbol{u} -\boldsymbol{u}_h), \boldsymbol{u}_h^c -\boldsymbol{u}_H^c)_{0 ,\mathcal{T}_h} \\ && \quad - 2(\mu\nabla\times(\boldsymbol{u} -\boldsymbol{u}_h), \nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c))_{0 ,\mathcal{T}_h} \\ && \quad -2 \sum\limits_{f\in\mathcal{F}_h} \alpha h_f^{-1}< [[ (\boldsymbol{u} -\boldsymbol{u}_h)]] , [[ \boldsymbol{u}_h^c -\boldsymbol{u}_H^c]] > \\ && \lesssim \|\vert \boldsymbol{u}-\boldsymbol{u}_H\vert\|_H^2 +2\|\vert \boldsymbol{u}-\boldsymbol{u}_H \vert\|_H \|\vert \boldsymbol{u}_h^\bot-\boldsymbol{u}_H^\bot \vert\|_h + \|\vert \boldsymbol{u}_h^\bot-\boldsymbol{u}_H^\bot \vert\|_h^2 - \|\vert\boldsymbol{u}_h^c -\boldsymbol{u}_H^c\vert\|_h^2 \\ && \quad +2 \|h^{-1/2}[[ \boldsymbol{u}_h ]] \|_{0 ,\mathcal{T}_h} \|\nabla\times(\boldsymbol{u}_h^c -\boldsymbol{u}_H^c)\|_{0 ,\mathcal{T}_h} \\ && \leq ( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_H\vert\|_H^2 +(1+\frac{1}{\delta_1}) \|\vert \boldsymbol{u}_h^\bot-\boldsymbol{u}_H^\bot \vert\|_h^2 -(1-\hat{\delta}_2C_{\mathcal{L}}) \|\vert\boldsymbol{u}_h^c -\boldsymbol{u}_H^c\vert\|_h^2 \\ && \quad + \frac{C_{\mathcal{L}}}{\hat{\delta}_2}\|h^{-1/2}[[ \boldsymbol{u}_h ]] \|^2_{0 ,\mathcal{T}_h}\\ &&=( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_H\vert\|_H^2 +(1+\frac{1}{\delta_1}) \|\vert \boldsymbol{u}_h^\bot-\boldsymbol{u}_H^\bot \vert\|_h^2 -(1-{\delta}_2) \|\vert\boldsymbol{u}_h^c -\boldsymbol{u}_H^c\vert\|_h^2 \\ && \quad + \frac{C^2_{\mathcal{L}}}{ {\delta}_2}\|h^{-1/2}[[ \boldsymbol{u}_h ]] \|^2_{0 ,\mathcal{T}_h}, \end{eqnarray*} where $\delta_2 = \hat{\delta}_2C_{\mathcal{L}}$. Using $\boldsymbol{u}_H^c =\boldsymbol{u}_H-\boldsymbol{u}_H^\bot$, $ \boldsymbol{u}_h^c =\boldsymbol{u}_h-\boldsymbol{u}_h^\bot$, triangle inequality and average inequality, we have \begin{eqnarray*} \|\vert\boldsymbol{u}_h^c -\boldsymbol{u}_H^c\vert\|_h^2 \geq \frac{1}{2}\|\vert\boldsymbol{u}_h -\boldsymbol{u}_H\vert\|_h^2- \|\vert\boldsymbol{u}_h^\bot -\boldsymbol{u}_H^\bot\vert\|_h^2. \end{eqnarray*} By triangle inequality and \eqref{Eqn:bot}, we obtain \begin{eqnarray*} \|\vert \boldsymbol{u}_h^\bot-\boldsymbol{u}_H^\bot \vert\|_h^2 & \leq & 2( \|\vert \boldsymbol{u}_h^\bot \vert\|_h^2+ \|\vert \boldsymbol{u}_H^\bot \vert\|_H^2)\\ & \leq& 2\alpha\|h^{-1/2}[[ \boldsymbol{u}_h^\bot ]] \|^2_{0 ,\mathcal{T}_h} +2\alpha\|h^{-1/2}[[ \boldsymbol{u}_H^\bot ]] \|^2_{0 ,\mathcal{T}_h} . \end{eqnarray*} Combining $[[ \boldsymbol{u}_H ]] =[[ \boldsymbol{u}_H^\bot+ \boldsymbol{u}_H^c ]] =[[ \boldsymbol{u}_H^\bot ]] $ and \eqref{Eqn:ajump}, we have \begin{eqnarray*} \|\vert\boldsymbol{u}-\boldsymbol{u}_h \vert\|^2_h &\leq& ( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_H\vert\|_H^2 -\frac{1-\delta_2}{2}\|\vert\boldsymbol{u}_h -\boldsymbol{u}_H\vert\|_h^2 \\ &&+ \frac{C_3}{ \delta_1\delta_2 \alpha} \bigg(\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h};\mathcal{T}_{h})+ \eta^2( \boldsymbol{u}_{H}, \boldsymbol{p}_{H};\mathcal{T}_{H})\bigg). \end{eqnarray*} \end{proof} \subsection{Contraction of the error estimator} In this subsection, we prove the reduction of error indicators. Let us first consider the effect of changing the finite element function used in the estimator. \begin{lemma}\label{Lem:3.8} Given $\boldsymbol{f}\in \boldsymbol{L}^2(\Omega)$ and two tetrahedral mesh $\mathcal{T}_h$, $\mathcal{T}_{H} $ with $\mathcal{T}_{H}\leq\mathcal{T}_{h}$. Let $(\boldsymbol{v}_h, \boldsymbol{q}_h)\in \boldsymbol{U}_h \times \boldsymbol{Q}_h $ and $(\boldsymbol{v}_H, \boldsymbol{q}_H)\in \boldsymbol{U}_H \times \boldsymbol{Q}_H $. For any $\epsilon >0$, we have \begin{eqnarray}\label{Equ:4.2} \eta^2( \boldsymbol{v}_{h}, \boldsymbol{q}_{h};\mathcal{T}_{h}) \leq (1+\epsilon) \eta^2( \boldsymbol{v}_{H}, \boldsymbol{q}_{H};\mathcal{T}_{h})+C_\epsilon \|(\boldsymbol{v}_{h}, \boldsymbol{q}_{h})-(\boldsymbol{v}_{H}, \boldsymbol{q}_{H})\|^2_{DG}, \end{eqnarray} where $ C_\epsilon$ depending on the $\epsilon$, and the mesh size $h<1$. \end{lemma} \begin{proof} For any $\tau_* \in \mathcal{T}_{h}$, we will discuss each of the five components of the mark $ \eta^2( \boldsymbol{v}_{h}, \boldsymbol{q}_{h};\mathcal{T}_{h})$. Firstly, using the definition of $R_1(\boldsymbol{v}_{h}, \boldsymbol{q}_{h})$ and triangle inequality, we have \begin{eqnarray}\label{Equ:3.41} \lefteqn{ \|R_1(\boldsymbol{v}_{h}, \boldsymbol{q}_{h})\|_{L^2(\tau_*)} }\\ \nonumber && =\|\boldsymbol{q}_{h}- \mu\nabla \times \boldsymbol{v}_{h}\|_{L^2(\tau_*)}\\\nonumber && =\|\boldsymbol{q}_{h}-\boldsymbol{q}_H + \mu\nabla \times (\boldsymbol{v}_{H} - \boldsymbol{v}_{h})+\boldsymbol{q}_H- \mu\nabla \times \boldsymbol{v}_{H}\|_{L^2(\tau_*)}\\\nonumber && \lesssim \|\boldsymbol{q}_H-\nabla \times \boldsymbol{v}_{H}\|_{L^2(\tau_*)}+\|\boldsymbol{q}_{h}-\boldsymbol{q}_H\|_{L^2(\tau_*)}+\|\nabla \times (\boldsymbol{v}_{h} - \boldsymbol{v}_{H})\|_{L^2(\tau_*)}. \end{eqnarray} Secondly, using the definition of $R_2(\boldsymbol{v}_h,\boldsymbol{q}_h)$, triangle inequality and inverse inequality, we get \begin{eqnarray}\label{Equ:3.42} \lefteqn{ h_{\tau_*}\|R_2(\boldsymbol{v}_{h}, \boldsymbol{q}_{h})\|_{L^2(\tau_*)}}\\ \nonumber &&=h_{\tau_*}(\|\boldsymbol{f} - \nabla\times \boldsymbol{q}_{h} - \kappa\boldsymbol{v}_{h}\|_{L^2(\tau_*)})\\\nonumber &&=h_{\tau_*}(\|\boldsymbol{f} - \nabla\times( \boldsymbol{q}_{h} -\boldsymbol{q}_H ) - \kappa(\boldsymbol{v}_{h}-\boldsymbol{v}_{H}) - \nabla\times \boldsymbol{q}_H - \kappa\boldsymbol{v}_{H}\|_{L^2(\tau_*)})\\\nonumber &&\leq h_{\tau_*}( \|\boldsymbol{f}-\nabla\times \boldsymbol{q}_{H}- \kappa\boldsymbol{v}_{H}\|_{L^2(\tau_*)} + \|\nabla\times( \boldsymbol{q}_h-\boldsymbol{q}_{H} )\|_{L^2(\tau_*)} + \|\kappa(\boldsymbol{v}_{h}-\boldsymbol{v}_{H})\|_{L^2(\tau_*)} )\\\nonumber &&\lesssim h_{\tau_*}(\|R_2(\boldsymbol{v}_{H}, \boldsymbol{q}_{H})\|_{L^2(\tau_*)} + h_{\tau_*}^{-1} \| (\boldsymbol{q}_h-\boldsymbol{q}_{H})\|_{L^2(\tau_*)} + \|\kappa(\boldsymbol{v}_{h}-\boldsymbol{v}_{H})\|_{L^2(\tau_*)} )\\\nonumber &&\lesssim h_{\tau_*}\|R_2(\boldsymbol{v}_{H}, \boldsymbol{q}_{H})\|_{L^2(\tau_*)} + \| (\boldsymbol{q}_h-\boldsymbol{q}_{H})\|_{L^2(\tau_*)} + h_{\tau_*}\|\kappa(\boldsymbol{v}_{h}-\boldsymbol{v}_{H})\|_{L^2(\tau_*)}. \end{eqnarray} Similarly, using the definition of $R_3(\boldsymbol{v}_h)$, triangle inequality and inverse inequality, we get \begin{eqnarray}\label{Equ:3.43} \lefteqn{ h_{\tau_*}\|R_3(\boldsymbol{v}_{h})\|_{L^2(\tau_*)} }\\ \nonumber &&=h_{\tau_*}\| \nabla\cdot (\boldsymbol{f}- \kappa \boldsymbol{v}_{h})\|_{L^2(\tau_*)}\\\nonumber &&=h_{\tau_*}\| \nabla\cdot (\boldsymbol{f}- \kappa\boldsymbol{v}_{H}+ \kappa\boldsymbol{v}_{H}- \kappa\boldsymbol{v}_{h})\|_{L^2(\tau_*)}\\\nonumber &&\leq h_{\tau_*}( \| \nabla\cdot (\boldsymbol{f}- \kappa\boldsymbol{v}_{H})\|_{L^2(\tau_*)}+\| \nabla\cdot\kappa ( \boldsymbol{v}_{H}- \boldsymbol{v}_{h})\|_{L^2(\tau_*)} )\\\nonumber &&\lesssim h_{\tau_*}(\|R_3(\boldsymbol{v}_{H})\|_{L^2(\tau_*)}+h_{\tau_*}^{-1} \|\kappa(\boldsymbol{v}_{H}-\boldsymbol{v}_{h})\|_{L^2(\tau_*)})\\\nonumber &&\lesssim h_{\tau_*}\|R_3(\boldsymbol{v}_{H})\|_{L^2(\tau_*)}+ \|\kappa(\boldsymbol{v}_{H}-\boldsymbol{v}_{h})\|_{L^2(\tau_*)} . \end{eqnarray} Next, we discuss the jump $ J_1(\boldsymbol{q}_{h})$ and $J_2(\boldsymbol{v}_{h})$. For any $f\in \mathcal{F}(\mathcal{T}_h)$, we let $f= \tau_*^1 \bigcap \tau_*^2$ with $ \tau_*^1 , \tau_*^2 \in \mathcal{T}_h.$ Furthermore, using the definition of $J_1(\boldsymbol{q}_h)$, triangle inequality and trace inequality, we have \begin{eqnarray}\label{Equ:3.44} \lefteqn{ h^{1/2}_f\|J_1(\boldsymbol{q}_{h})\|_{L^2(f)}}\\ \nonumber &&=h^{1/2}_f\|[[ \boldsymbol{q}_{h}]] \|_{L^2(f)}\\\nonumber &&=h^{1/2}_f\|[[ \boldsymbol{q}_{H}+\boldsymbol{q}_{h}-\boldsymbol{q}_H]] \|_{L^2(f)}\\\nonumber &&\leq h^{1/2}_f( \|[[ \boldsymbol{q}_{H}]] \|_{L^2(f)}+ \|[[ \boldsymbol{q}_{h}-\boldsymbol{q}_H]] \|_{L^2(f)} )\\\nonumber &&\leq h^{1/2}_f\|[[ \boldsymbol{q}_{H}]] \|_{L^2(f)}+h^{1/2}_f\|(\boldsymbol{q}_{h}-\boldsymbol{q}_H)\vert_{\tau_*^1}\|_{L^2(f)}+h^{1/2}_f\|(\boldsymbol{q}_{h}-\boldsymbol{q}_H)\vert_{\tau_*^2}\|_{L^2(f)}\\\nonumber &&\lesssim h^{1/2}_f\|J_1(\boldsymbol{q}_{H})\|_{L^2(f)}+ \|(\boldsymbol{q}_{h}-\boldsymbol{q}_H)\|_{L^2(\tau_*^1\cup \tau_*^2)}. \end{eqnarray} Similarly, using the definition of $J_2(\boldsymbol{v}_h)$, triangle inequality and trace inequality, we have \begin{eqnarray}\label{Equ:3.45} \lefteqn{ h^{1/2}_f\|J_2(\boldsymbol{v}_{h})\|_{L^2(f)} }\\ \nonumber &&=h^{1/2}_f\|[[ (\boldsymbol{f}-\kappa\boldsymbol{v}_{h})]] \|_{L^2(f)}\\\nonumber && =h^{1/2}_f\|[[ (\boldsymbol{f}-\kappa\boldsymbol{v}_{H}+\kappa\boldsymbol{v}_{H}-\kappa\boldsymbol{v}_{h})]] \|_{L^2(f)}\\\nonumber && \leq h^{1/2}_f(\|[[ (\boldsymbol{f}-\kappa\boldsymbol{v}_{H})]] \|_{L^2(f)}+\|[[ \kappa(\boldsymbol{v}_{H}-\boldsymbol{v}_{h})]] \|_{L^2(f)})\\\nonumber && \leq h^{1/2}_f \|J_2(\boldsymbol{v}_{H})\|_{L^2(f)} +h^{1/2}_f(\|\kappa(\boldsymbol{v}_{H}-\boldsymbol{v}_{h})\vert_{\tau_*^1}\|_{L^2(f)} +\|\kappa(\boldsymbol{v}_{H}-\boldsymbol{v}_{h})\vert_{\tau_*^2}\|_{L^2(f)})\\\nonumber && \lesssim h^{1/2}_f \|J_2(\boldsymbol{v}_{H})\|_{L^2(f)} +\|\kappa\boldsymbol{v}_{H}-\kappa\boldsymbol{v}_{h}\|_{L^2(\tau_*^1\cup \tau_*^2)}. \end{eqnarray} Finally, the desired result \eqref{Equ:4.2} is obtained by combining \eqref{Equ:3.41}-\eqref{Equ:3.45}, Young's inequality and the shape regularity of mesh $\mathcal{T}_h$. \end{proof} We then prove the contraction of the error estimator under the assumptions on the problem of \eqref{Equ:3.16}-\eqref{Equ:3.17}. \begin{lemma}\label{Lem:3.9} Given constant $\theta\in(0, 1)$ and two tetrahedral mesh $\mathcal{T}_h$, $\mathcal{T}_{H}(\mathcal{T}_{H}\leq\mathcal{T}_{h})$. Let $(\boldsymbol{u}_H, \boldsymbol{p}_H)\in \boldsymbol{U}_H\times \boldsymbol{Q}_H$ be the solution of \eqref{Equ:3.16}-\eqref{Equ:3.17}, and $\mathcal{R}_{\mathcal{T}_H \longrightarrow \mathcal{T}_{h}}=\mathcal{T}_H\setminus(\mathcal{T}_{h}\cap\mathcal{T}_H)$ be the set of all element refined into $\mathcal{T}_{h}$ on $\mathcal{T}_H$. Then, there is a constant $ \lambda\in (0, 1)$ independent of mesh size, such that \begin{equation} \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_{h} ) \leq \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H )- \lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}). \end{equation} \end {lemma} \begin{proof} Assume that the tetrahedral mesh $\tau\in \mathcal{T}_H$ is divided into two new tetrahedral mesh $\tau_*^1$ and $\tau_*^2$ with equal volumes, where $\tau_*^1, \tau_*^2 \in \mathcal{T}_{h}$. Thus, $h_{\tau_*^1}^3= \vert\tau_*^1\vert= \vert\tau_*^2\vert = h_{\tau_*^2}^3 = 2^{-1} h_{\tau}^3$ by the shape regularity of mesh, which implies $h_{\tau_*^1} = h_{\tau_*^2}=2^{-1/3} h_{\tau}$. Then, we have \begin{equation}\label{Equ:3.48} \|R_1(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\|^2_{L^2(\tau_*^1)} + \|R_1(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\|^2_{L^2(\tau_*^2)} \leq \|R_1(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\|^2_{L^2(\tau)}, \end{equation} and \begin{eqnarray}\nonumber && h^2_{\tau_*^1}(\|R_2 (\boldsymbol{u}_H, \boldsymbol{p}_H)\|^2_{L^2(\tau_*^1)} +\|R_3(\boldsymbol{u}_H)\|^2_{L^2(\tau_*^1)} )\\ &&~+h^2_{\tau_*^2}(\|R_2 (\boldsymbol{u}_H, \boldsymbol{p}_H)\|^2_{L^2(\tau_*^2)} +\|R_3(\boldsymbol{u}_H)\|^2_{L^2(\tau_*^2)} )\nonumber \\\label{Equ:3.49} && \quad \leq 2^{-2/3} h^2_{\tau}(\|R_2 (\boldsymbol{u}_H, \boldsymbol{p}_H)\|^2_{L^2(\tau)} +\|R_3(\boldsymbol{u}_H)\|^2_{L^2(\tau)} ) . \end{eqnarray} For any $f\in \partial (\tau_*^1\cup\tau_*^2)$, which can be divided into three parts; (1) For the first part, there are two of the faces are constant and belong to $\tau$ . (2) For the second part, there are two new faces that overlap and are used to divide the mesh $\tau$. Since $(\boldsymbol{u}_H, \boldsymbol{p}_h)\in \boldsymbol{U}_H\times \boldsymbol{Q}_H$ is a continuous polynomial in the region $\tau$, it follows that the value of $[[ \boldsymbol{p}_h]]$ and $[[ (\boldsymbol{f}-\kappa\boldsymbol{u}_H)]] $ on this surface is equal to zero. (3) For the third part, there are four faces that are obtained by dividing the two faces in the $\tau$ into two. Furthermore, we obtain \begin{equation}\label{Equ:3.51} \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\tau_*^1)+ \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\tau_*^2)\leq \overline{\gamma} \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\tau). \end{equation} where constant $\overline{\gamma} \in (0, 1)$ independent of mesh $\tau$. Next, since $\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}$ represents the part of the set in the tetrahedral set $\mathcal{T}_H $ that will be used to be refined, it follows that $\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}} \subset \mathcal{T}_H $. Let $ \overline{\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}} $ denote the part of the cell set that has been refined in the tetrahedral set $\mathcal{T}_{H} $, we have $\overline{\mathcal{R}_{\mathcal{T}_h\rightarrow \mathcal{T}_{H}}} \in \mathcal{T}_{h}$. Obviously, $\mathcal{T}_H \setminus \mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}} =\mathcal{T}_{h} \setminus \overline{\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}}$. Then combining the \eqref{Equ:3.51}, and the marking strategy \eqref{Equ:4.1}, we have \begin{eqnarray*} \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_{h} ) &=& \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_{h} \setminus \overline{\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}})+\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \overline{\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}})\\ &\leq& \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H \setminus \mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}} )+ \gamma \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}} )\\ &\leq& \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H )+(\overline{\gamma }-1) \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}} )\\ &\leq& \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H )- \lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}), \end{eqnarray*} where $ \lambda =1-\overline{\gamma} \in(0, 1)$ independent of mesh size. \end{proof} Now, we combine the Lemmas \ref{Lem:add1}, \ref{Lem:3.8} and \ref{Lem:3.9} to prove the reduction of error indicators. \begin{lemma}\label{Lem:3.11} Given a constant $\theta\in(0, 1)$ and two tetrahedral mesh $\mathcal{T}_h$, $\mathcal{T}_{H} (\mathcal{T}_{H}\leq\mathcal{T}_{h})$. Let $(\boldsymbol{u}_h, \boldsymbol{p}_h)\in \boldsymbol{U}_h\times \boldsymbol{Q}_h$ and $(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\in \boldsymbol{U}_{H}\times \boldsymbol{Q}_{H}$ be the solutions of \eqref{Equ:3.16}-\eqref{Equ:3.17}, respectively. For any $\epsilon>0$ and $\lambda\in(0,1)$, we have \begin{eqnarray}\nonumber (1-\frac{C_\epsilon}{\alpha} ) \eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h}; \mathcal{T}_{h} ) &\leq& ( 1+\epsilon+ \frac{C_\epsilon}{\alpha} )\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H ) \\ \label{Equ:3.47} &&~\hspace{-1.8cm} -(1+\epsilon)\lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}}) + C_\epsilon \|\vert\boldsymbol{u}_{h}-\boldsymbol{u}_{H}\vert\|^2_h, \end{eqnarray} where constant $C_\epsilon$ depending on the $\epsilon$ and mesh size. \end{lemma} \begin{proof} Using the Lemmas \ref{Lem:add1}, \ref{Lem:3.8} and \ref{Lem:3.9}, we have \begin{eqnarray*} \eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h}; \mathcal{T}_{h}) &\leq& (1+\epsilon) \bigg(\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H ) -\lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}})\bigg) \\ &&+C_\epsilon \|(\boldsymbol{u}_{h}, \boldsymbol{p}_{h})-(\boldsymbol{u}_{H}, \boldsymbol{p}_{H})\|^2_{DG}\\ &\leq& (1+\epsilon) \bigg(\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H ) -\lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}})\bigg) \\ &&+ C_\epsilon \|\vert\boldsymbol{u}_{h}-\boldsymbol{u}_{H}\vert\|_h^2+ \|\boldsymbol{p}_h-\boldsymbol{p}_H\|^2_{L^2(\Omega)}\\ &\leq& (1+\epsilon) \bigg(\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H ) -\lambda \eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H;\mathcal{R}_{\mathcal{T}_H\rightarrow \mathcal{T}_{h}})\bigg)\\ &&+ C_\epsilon \|\vert\boldsymbol{u}_{h}-\boldsymbol{u}_{H}\vert\|_h^2 + \frac{C_\epsilon}{\alpha} \bigg(\eta^2( \boldsymbol{u}_{h}, \boldsymbol{p}_{h}; \mathcal{T}_{h} ) +\eta^2( \boldsymbol{u}_H, \boldsymbol{p}_H; \mathcal{T}_H )\bigg), \end{eqnarray*} which completes the proof. \end{proof} \subsection{Convergence result} Now, we proved that the sum of the norm of the error and the scaled error indicator is attenuated. \begin{theorem}\label{Thm:3.3} For a given $\theta\in (0,1)$,let $\{ \mathcal{T}_k , \boldsymbol{U}_k,\boldsymbol{Q}_k, \boldsymbol{u}_{k}, \boldsymbol{p}_k, \eta( \boldsymbol{u}_{k}, \boldsymbol{p}_{k}; \mathcal{T}_{k} ) \}_{k\geq 0}$ be the sequence of meshes, Mixed discrete solution (defined by \eqref{Equ:3.16}-\eqref{Equ:3.17}), and the estimate indicator produced by the \textbf{AMIPDG} algorithm. Then there exist constants $\rho>0$, $\delta \in(0, 1)$, which depend on marking parameter $\theta$ and the shape regularity of the initial mesh $\mathcal{T}_0$, such that \begin{equation*} \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 + \rho \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) \leq \delta\bigg(\|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2+ \rho \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k )\bigg). \end{equation*} \end{theorem} \begin{proof} Setting $ \widetilde{\rho}=\frac{1-\delta_2 }{2C_{\epsilon}} $, then multiply the both sides of the \eqref{Equ:3.47} inequality by $\widetilde{\rho}$, we get \begin{eqnarray} \nonumber \lefteqn{ \widetilde{\rho} (1-\frac{C_\epsilon}{\alpha} ) \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) }\\ \nonumber &&\leq \widetilde{\rho}( 1+\epsilon+ \frac{C_\epsilon}{\alpha} ) \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k ) -\widetilde{\rho}(1+\epsilon)\lambda \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k;\mathcal{R}_{\mathcal{T}_k\rightarrow \mathcal{T}_{k+1}}) \\\label{Equ:4.15} && \quad +\frac{1-\delta_2}{2} \|\vert\boldsymbol{u}_{k+1}-\boldsymbol{u}_{k}\vert\|^2_h. \end{eqnarray} Next, by the \eqref{Equ:3.30.1} and \eqref{Equ:4.15}, we have \begin{eqnarray}\nonumber \lefteqn{ \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 + \widetilde{\rho} (1-\frac{C_\epsilon}{\alpha} ) \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} )}\\\nonumber && \leq ( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_{k}^2 + \frac{C_3}{ \delta_1\delta_2 \alpha} \bigg(\eta^2( \boldsymbol{v}_{k+1}, \boldsymbol{q}_{k+1};\mathcal{T}_{k+1})+ \eta^2( \boldsymbol{v}_{k}, \boldsymbol{q}_{k};\mathcal{T}_{k})\bigg)\\\label{Equ:3.50} && \quad + \widetilde{\rho}( 1+\epsilon+ \frac{C_\epsilon}{\alpha} ) \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k ) -\widetilde{\rho}(1+\epsilon)\lambda \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k;\mathcal{R}_{\mathcal{T}_k\rightarrow \mathcal{T}_{k+1}}) . \end{eqnarray} First move the term and then according to D\"orfler marking strategy \eqref{Equ:4.1}, the Theorem \ref{Thm:1} and $\|\vert\cdot\vert\|_h \leq \|\cdot\|_{DG}$, we know $ -\eta^2( \boldsymbol{v}_k, \boldsymbol{q}_k;\mathcal{R}_{\mathcal{T}_k\rightarrow \mathcal{T}_{k+1}}) \leq -\theta \eta^2( \boldsymbol{v}_k, \boldsymbol{q}_k;\mathcal{T}_k) $, then \begin{eqnarray*}\nonumber \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 &+& \widetilde{\rho} (1-\frac{C_\epsilon}{\alpha} - \frac{C_3}{ \widetilde{\rho}\delta_1\delta_2 \alpha} ) \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) \\\nonumber &\leq& ( 1+\delta_1) \|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2 - \frac{\widetilde{\rho}(1+\epsilon)\lambda \theta }{2} \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k )\\ && \quad + \widetilde{\rho} \bigg( 1+\epsilon+ \frac{C_\epsilon}{\alpha} +\frac{C_3}{ \widetilde{\rho}\delta_1\delta_2 \alpha} - \frac{(1+\epsilon)\lambda \theta }{2} \bigg) \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k ) \\ &\leq& ( 1+\delta_1- \frac{\widetilde{\rho}(1+\epsilon)\lambda \theta C_1^{-1}}{2} )\|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2 \\ && \quad + \widetilde{\rho} \bigg( 1+\epsilon+ \frac{C_\epsilon}{\alpha} +\frac{C_3}{ \widetilde{\rho}\delta_1\delta_2 \alpha} - \frac{(1+\epsilon)\lambda \theta }{2} \bigg) \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k ). \end{eqnarray*} For convenience, denote \begin{eqnarray*} \beta_1 &=&1-\frac{C_\epsilon}{\alpha} - \frac{C_3}{ \widetilde{\rho}\delta_1\delta_2 \alpha} , \\ \beta_2 &=& 1+\delta_1- \frac{\widetilde{\rho}(1+\epsilon)\lambda \theta C_1^{-1} }{2} , \\ \beta_3&=& (1+\epsilon)(1 -\frac{\lambda \theta }{2}) +\frac{C_\epsilon}{\alpha} +\frac{C_3}{ \widetilde{\rho}\delta_1\delta_2 \alpha} . \end{eqnarray*} Thus \begin{equation*} \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 + \widetilde{\rho} \beta_1 \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) \leq \beta_2 \|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2+ \widetilde{\rho}\beta_3 \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k ). \end{equation*} Next, we firstly choose $ \delta_1=\frac{\widetilde{\rho}(1+\epsilon)\lambda \theta C_1^{-1} }{4}$, then select the appropriate $\delta_2$ to make $\widetilde{\rho}=\frac{1-\delta_2 }{2C_{\epsilon}} $ smaller to ensure $0< \delta_1<1$, Secondly, we let $\epsilon>0$ and $ (1+\epsilon)(1 -\frac{\lambda \theta }{2})=1-\frac{\lambda \theta }{4}$ ( $\lambda \theta\in(0,1) $), therefore \begin{eqnarray*} \beta_2=1- \delta_1 \in(0,1), \ (1+\epsilon)(1 -\frac{\lambda \theta }{2})<1. \end{eqnarray*} Furthermore, we choose a sufficiently large penalty parameter $\alpha$ such that $$\beta_1 >\beta_3.$$ Finally, there is a constant $\delta=\max\{\beta_2,\frac{\beta_1}{\beta_3} \} $. Then, we let $\rho= \widetilde{\rho} \beta_1$, and obtain \begin{equation*} \|\vert\boldsymbol{u}-\boldsymbol{u}_{k+1} \vert\|_{k+1}^2 + \rho \eta^2( \boldsymbol{u}_{k+1}, \boldsymbol{p}_{k+1}; \mathcal{T}_{k+1} ) \leq \delta\bigg(\|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2+ \rho \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k )\bigg). \end{equation*} \end{proof} \begin{corollary} Under the conditions of Theorem \ref{Thm:3.3}, we have \begin{eqnarray*} \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_{k}, \boldsymbol{p}_{k})\|^2_{DG} + \rho \eta^2( \boldsymbol{u}_{k}, \boldsymbol{p}_{k}; \mathcal{T}_{k} ) \leq \delta^k\widetilde{C}_\delta. \end{eqnarray*} where $ \widetilde{C}_\delta = C \bigg( \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_{0}, \boldsymbol{p}_{0})\|^2_{DG} + \rho \eta^2( \boldsymbol{u}_{0}, \boldsymbol{p}_{0}; \mathcal{T}_{0} ) \bigg) $. Therefore, for a given precision, the \textbf{AMIPDG} method will terminate after a finite number of operations. \end{corollary} \begin{proof} Using the Remark \ref{Rem:4} and Theorem \ref{Thm:3.3}, we have \begin{eqnarray*} \|(\boldsymbol{u}, \boldsymbol{p})-(\boldsymbol{u}_{k}, \boldsymbol{p}_{k})\|^2_{DG} + \rho \eta^2( \boldsymbol{u}_{k}, \boldsymbol{p}_{k}; \mathcal{T}_{k} ) &\leq& C \bigg(\|\vert \boldsymbol{u}-\boldsymbol{u}_k\vert\|_k^2+ \rho \eta^2( \boldsymbol{u}_k, \boldsymbol{p}_k; \mathcal{T}_k )\bigg)\\ &\leq& \delta^k\widetilde{C}_\delta. \end{eqnarray*} \end{proof} \section{Numerical experiments} In this section, we test some numerical experiments to show the efficiency and the robustness of AMIPDG. We carry out these numerical experiments by using the MATLAB software package iFEM \cite{ChenLiFEM}. In Experiments \ref{Exa:ex1} and \ref{Exa:ex2}, we take $\boldsymbol{p}=\nabla\times\boldsymbol{u}$. In Example \ref{Exa:ex1}, we discuss the influence of the penalty parameter $\alpha$ on the error in $\|\cdot\|_{DG}$ norm, and observe the dependency of the condition number of stiffness matrix on $\alpha$. \begin{example}\label{Exa:ex1} Let $\Omega:=[0,1] \times[0,1] \times [0,1]$, we construct the following analytical solution of the model \eqref{Equ:1.1}-\eqref{Equ:1.2}: $$ \boldsymbol{u}=\left(\begin{array}{c} x(x-1)y(y-1)z(z-1) \\ \sin (\pi x) \sin (\pi y) \sin (\pi z) \\ (1-e^x)(1-e^{x-1})(1-e^{y})(1-e^{y-1})(1-e^{z})(1-e^{z-1}) \end{array}\right). $$ It is easy to see that the solution $\boldsymbol{u}$ satisfies the boundary condition $\boldsymbol{u} \times \boldsymbol{n}=0$ on $\partial \Omega$. \end{example} In this example, we get a uniform mesh by partitioning the $x-$, $y-$ and $z-$axes into equally distributed $M(M\geq 2)$ subintervals, and then dividing one cube into six tetrahedrons. Let $h=1/M$ be mesh sizes for different tetrahedrons meshes. We fixed mesh with $h=1/4$ and report the error estimates in $\|\cdot\|_{DG}$ norm and condition number of stiffness matrices for different penalty parameters $ \alpha = 1, 10, 100, 500$ and $1000$ in Table \ref{Tab_111}. We note that $\left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0}$ increases at first and then decreases as the penalty parameter $\alpha$ increases. The condition numbers of stiffness matrices increase with the increase of penalty parameters $\alpha$. \begin{table}[ht] \centering\caption{The error in $\|\cdot\|_{DG}$ norms and condition number of stiffness matrices with $h=1/4$.}\label{Tab_111} \begin{tabular}{ccccccc} \hline $\alpha$ & 1 & 10 & 100 & 500 & 1000 \\ \hline $\|\left(\boldsymbol{p}-\boldsymbol{p}_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ & 3.949e+00 & 1.133e-00 & 8.614e-01 & 8.649e-01 & 8.659e-01 \\ Cond &3.235e+04 & 7.021e+04 & 5.959e+05 & 2.995e+06 & 6.150e+06\\ \hline \end{tabular} \end{table} As a way to balance, in the following numerical tests, we always choose $\alpha=100$. Noting that we only consider uniform meshes in Example \ref{Exa:ex1}. Next we test adaptive meshes. \begin{example}\label{Exa:ex2} Let $\Omega:=[0,1] \times[0,1] \times [0, 1]$, we construct the following analytical solution of the model \eqref{Equ:1.1}-\eqref{Equ:1.2} $$ \boldsymbol{u}=\left(\begin{array}{c} \frac{x(x-1)y(y-1)z(z-1)}{x^2+y^2+z^2+0.001} \\ \frac{x(x-1)y(y-1)z(z-1)}{x^2+y^2+z^2+0.001} \\ -\frac{x(x-1)y(y-1)z(z-1)}{x^2+y^2+z^2+0.001} \end{array}\right). $$ Note that the solution $\boldsymbol{u}$ satisfies the condition $ \boldsymbol{u}\times\boldsymbol{n}=0$ on $\partial \Omega$. \end{example} The right of Figure \ref{fig:ex2_mesh_figure} shows an adaptively refined mesh with marking parameter- $\theta=0.7$ after $k=18$. The grid is locally refined near the origin. \begin{figure}[ht] \begin{minipage}[t]{0.45\linewidth} \centering \includegraphics[height=4cm,width=5cm]{init.jpg} \end{minipage} \begin{minipage}[t]{0.45\linewidth} \centering \includegraphics[height=4cm,width=5cm]{ini_3.jpg} \end{minipage} \caption{Left: the initial mesh with 1152 DoFs. Right: the adaptive mesh($\theta=0.7$) with 181104 DoFs after 18 refinements.}\label{fig:ex2_mesh_figure} \end{figure} The Figure \ref{fig:ex2_res} shows the curves of $\log N -\log\eta\left(\boldsymbol{u}_{k}, \boldsymbol{p}_{k} ; \mathcal{T}_{k}\right)$ for parameters $\theta=0.3,0.5,0.7$. The curves indicate the convergence and the quasi-optimality of the adaptive algorithm AMIPDG of $\eta\left(\boldsymbol{u}_{k}, \boldsymbol{p}_{k} ; \mathcal{T}_{k}\right)$. \begin{figure}[ht] \centering \includegraphics[height=8cm,width=12cm]{yita_3_2.jpg} \caption{Quasi optimality of the AMIPDG of the error $\eta\left(\boldsymbol{u}_{k}, \boldsymbol{p}_{k} ; \mathcal{T}_{k}\right)$ with different marking parameters $\theta$.}\label{fig:ex2_res} \end{figure} \section*{Acknowledgment} The first author is supported by the East China University of Technology (DHBK2019209) and Jiangxi Province Education Department (GJJ200755). The second, third and fourth authors are supported by the National Natural Science Foundation of China (Grant No. 12071160). The third author is also supported by the National Natural Science Foundation of China (Grant No. 11901212).
\section{Introduction}\label{sec:01_intro} Comprehending properties of QCD matter under a strong magnetic field is of essential importance to further investigate the evolution of the early universe \cite{Vachaspati:1991nm}, non-central heavy-ion collisions \cite{Skokov:2009qp,Deng:2012pc,Mo:2013qya,Zhong:2014cda}, neutron-star merges \cite{Kiuchi:2015sga,Baiotti:2016qnr}, and the interior of magnestar \cite{Tatsumi:2006wr,Duncan:1992hi}. The exploration of the QCD vacuum and strongly interacting matter under external strong magnetic fields has fascinated much attention, see reviews, e.g., Refs.~\cite{Bzdak:2019pkr,Kharzeev:2015znc,Huang:2015oca,Andersen:2014xxa,Miransky:2015ava}. Here we stress the study of the magnetic field of non-central heavy-ion collisions, which comes from the laboratory of mankind. The magnetic field reaches up to $\sqrt{eB} \sim 0.1\mathrm{GeV}$ for \textrm{RHIC} and $\sqrt{eB} \sim 0.5~\mathrm{GeV}$ for LHC in non-central heavy-ion collisions. This magnetic field is external since it is generated by the spectators, and though it has a very short lifetime(of the order of 1 $\textrm{fm}/c $). However, as taken in Refs.~\cite{Gursoy:2014aka,She:2017icp,Chen:2019qoe,Chen:2017lsf}, the presence of the quark-gluon plasma (QGP) medium response effect, substantially delays the decay of these time-dependent magnetic fields. This is why in the most cases, the effect of constant and uniform magnetic fields on quark matter is discussed in the literature. The magnetic field coincides with the production of the \textrm{QGP} and thus may have a fairly important effect on the properties of the phase transition. For example, the chiral magnetic effect (\textrm{CME}) \cite{Kharzeev:2007jp,Fukushima:2008xe,She:2017icp,Guo:2019joy,Deng:2021kyd}, magnetic catalysis (MC) in the vacuum \cite{Gusynin:1999pq,Gusynin:1995nb,Klevansky:1989vi}, inverse magnetic catalysis (\textrm{IMC}) around the chiral phase transition~\cite{Bali:2013esa,Bali:2012zg,Bali:2011qj,DElia:2018xwo}. The magnetic field can lead to spin polarization, that is, the condensation of quark anti-quark $\left ( \bar{q} q \right ) $ pairs with spin parallel. Ref.\cite{Ferrer:2013noa} shows that a tensor-type interaction $\sim \left ( \bar\psi \Sigma^{3} \psi \right)^{2} +\left ( \bar\psi i\gamma ^{5} \Sigma^{3} \psi \right)^{2}$ produces a spin polarization (SP) $\left \langle \bar{\psi} i\gamma ^{1} \gamma ^{2} \psi \right \rangle $ , which is very similar to the anomalous magnetic moment (AMM) produced by quarks in a magnetic field. The tensor polarization operator $\bar{\psi}\sigma ^{\mu \nu } \psi $ can also be named as the spin polarization operator, or the spin density since $\bar{\psi} \sigma ^{12 } \psi =\psi\gamma ^{0} \Sigma ^{3} \psi$. If the quark spinor $\psi$ is projected into the sub-spin space $\psi ={{\psi }_{\uparrow }}+{{\psi }_{\downarrow }}$ , corresponding to $\bar{\psi }{{\sigma }^{12}}\psi \sim \left\langle {{{\bar{\psi }}}_{\uparrow }}{{\psi }_{\uparrow }} \right\rangle -\left\langle {{{\bar{\psi }}}_{\downarrow }}{{\psi }_{\downarrow }} \right\rangle $, which can be used to measure the difference between the spin-up quark pair and the spin-down quark pair. We investigate the magnetized QCD matter in a (2 + 1)-flavor Nambu--Jona-Lasinio (NJL) model at finite temperature and chemical potential by comparing the contributions from the tensor spin polarization (TSP) and AMM of quarks. For a particle with charge $e$, mass $m$ and spin $\vec{s}$, its corresponding magnetic moment (MM) is $\mu$. Corresponding to $\bar{q} q $ pair with antiparallel spin pairs, it has a net magnetic moment (MM), so the chiral condensation triggers a dynamic \textrm{AMM}. Under the action of the magnetic field, the net MM tends to be parallel to the magnetic field. For SP with $\bar{q} q $ pair parallel spin pairing, the MM of spin-aligned quarks and anti-quarks cancel each other, and the spin polarization pairing does not present a net MM. Therefore, compared with the chiral condensation with a nonzero net MM, the total MM of the system considering SP condensation will reduce. Therefore, systems with spin polarization are expected to exhibit relative diamagnetism. At high temperatures, the pair of $\bar{q} q $ dissociates, and all charged quarks become a single small magnet, which is arranged in turn along the magnetic field; Therefore, \textrm{QCD} matter at high temperature manifests paramagnetism. The catalysis of chiral symmetry breaking induced by a magnetic field, namely the MC effect, can be easily understood from dimension reduction. On the other hand, \textrm{IMC} effect, the critical temperature of the chiral phase transition decreases with the increasing magnetic field, which is intuitively contradictory to the MC effect and is still a puzzle. Although there are many publications trying to explain \textrm{IMC} by considering running coupling constant generated by the magnetic field \cite{Ferrer:2014qka} and chiral imbalance caused by sphaleron transition or instanton anti-instanton pairing \cite{Chao:2013qpa}. Some interesting and novel properties of magnetized QCD materials have recently been presented by lattice calculations, for example, magnetized materials exhibit paramagnetism (positive susceptibility) at high temperatures and diamagnetism (negative susceptibility) at low temperatures \cite{Bali:2012jv,Bali:2020bcn}. The effect of an \textrm{AMM} of quark has drawn quite a lot of interest recently \cite{Fayazbakhsh:2014mca,Ferrer:2015wca,Chaudhuri:2019lbw,Ghosh:2020xwp,Chaudhuri:2020lga,Mao:2018jdo,Mei:2020jzn} in order to investigate the IMC effect. The dynamical chiral symmetry broken is known as one of the most important characteristics of QCD, which makes quarks achieve a dynamical mass of QCD. Refs. \cite{Ferrer:2009nq,Chang:2010hb} pointed out that quarks' AMM can also be dynamically produced like the dynamic quark mass. Therefore, once quarks achieve dynamic mass, they should also achieve dynamical AMM \cite{Ferrer:2008dy,Preis:2010cq,Ferrer:2009nq,Bicudo:1998qb}. The coefficient $\kappa $ of quarks' AMM in the magnetic field by the effective interaction $\frac{1}{2} q\kappa F_{\mu \nu } \bar{\psi} \sigma ^{\mu \nu }\psi=\frac{1}{2}\left [ \gamma ^{\mu } ,\gamma ^{\nu } \right ] $ is introduced and the \textrm{IMC} effect at finite temperature is proposed by Ref. \cite{Xu:2020yag}. For \textrm{QCD}, both explicit and spontaneous chiral symmetry breaking is dedicated to the \textrm{AMM} of quarks, which is also called dynamical \textrm{AMM} \cite{Chang:2010hb}. In this paper, we investigate the magnetism of \textrm{QCD} matter and chiral phase transition under a magnetic field with the contribution from the \textrm{TSP} and the \textrm{AMM} of quarks respectively. This paper is organized as follows: in Sec. II, we introduce the (2 + 1)-flavor \textrm{NJL} models by including the \textrm{AMM} and the \textrm{TSP} in the external magnetic field respectively. in Sec. III, we investigate \textrm{MC} and \textrm{IMC} by the \textrm{AMM} and \textrm{TSP}, respectively. Then the dependencies of dynamical mass, entropy, sound-velocity, and critical point on the magnetic field by comparing the contributions from the \textrm{TSP} and the \textrm{AMM} of quarks are studied in Sec. III. Finally, we make the summaries and conclusions in Sec. IV. \section{THE 2 + 1 FLAVORS NJL MODEL UNDER A MAGNETIC FIELD}\label{sec:02 setup} The Lagrangian density of the (2 + 1)-flavor \textrm{NJL} model \cite{Buballa:2003qv,Hatsuda:1994pi} in the presence of an external magnetic field is given as: \begin{equation}\label{eq:01} \begin{split} \mathcal{L}=& \bar{\psi }\left( i{{\gamma }^{\mu }}{{D}_{\mu }}+{{\gamma }^{0}}\mu -m \right)\psi + {{G}_{s}}\sum\limits_{a=0}^{8}{\left[ {{\left( \bar{\psi }{{\lambda }_{a}}\psi \right)}^{2}}+{{\left( \bar{\psi }i{{\gamma }^{5}}{{\lambda }_{a}}\psi \right)}^{2}} \right]} \\ & -K \left[ \det \bar{\psi }\left( 1+{{\gamma }_{5}} \right)\psi +\det \bar{\psi }\left( 1-{{\gamma }_{5}} \right)\psi \right],\\ \end{split} \end{equation} where the quark field $\psi $ carries three flavors ($f=u,\,d,\,s$) and three colors ($c=r,g,b$ ), and ${{\lambda }_{a}}(a=1,\cdots N_{f}^{2}-1)$ represents the SU(3) Gell-Mann matrices in the three flavor space. Current quark mass $m$ is considered as ${{m}_{u}}={{m}_{d}}$ for isospin symmetry of light quarks, strange quark mass ${{m}_{s}}$ is different from the other light quark ($m_u$ and $m_d$) masses. The difference between the strange and non-strange quark masses obviously breaks the SU(3) flavor symmetry. $\mu$ is the quark chemical potential, and we assume that the quark chemical potentials of the strange and non-strange quarks are the same. A covariant derivative with magnetic field is introduced as ${{D}_{u}}={{\partial }_{\mu }}+\operatorname{i}QA_{\mu }^{\operatorname{ext}}$, and the charge matrix in flavor space is \begin{equation}\label{eq:02} Q=\operatorname{diag}\left( {{q}_{u}},{{q}_{d}},{{q}_{\text{s}}} \right)=\operatorname{diag}\left( \frac{2}{3},-\frac{1}{3},-\frac{1}{3} \right). \end{equation} In general, if one chooses the gauge field $A_{\mu }^{ext}=\left( 0,0,B{{x}_{1}},0 \right)$, a constant magnetic field should point at the ${{x}^{3}}$-direction. The $K$ term of Eq. (1) is the term of Kobayashi-Maskawa-t'Hooft interaction \cite{Hatsuda:1994pi,Vogl:1991qt,Rehberg:1995kh}. \subsection{The introduction of a (2 + 1)- flavors NJL model with TSP} It is shown that \cite{Ferrer:2013noa,Fayazbakhsh:2014mca} the breaking of the rotational symmetry by a uniform magnetic field induces a separation between longitudinal and transverse fermion modes along the direction of the magnetic field. This separation gives rise to the effective splitting of the couplings in the one-gluon exchange interactions on which the \textrm{NJL} models are usually based. This splitting is therefore reported in the four-fermion couplings of a \textrm{QCD}-inspired \textrm{NJL} model in a magnetic field, and we can use the Fierz identities in a magnetic field \cite{Ferrer:2013noa,Ferrer:2014qka,Lin:2022ied} to propose the interactions of scalar and tensor of the (2 + 1)-flavor \textrm{NJL} Lagrangian: \begin{equation}\label{eq:03} \begin{split} {{\mathcal{L}}_{\text{TSP}}}= & \bar{\psi }\left( i{{\gamma }^{\mu }}{{D}_{\mu }}+{{\gamma }^{0}}\mu -m \right)\psi +{{G}_{s}}\sum\limits_{a=0}^{8}{\left[ {{\left( \bar{\psi }{{\lambda }_{a}}\psi \right)}^{2}}+{{\left( \bar{\psi }i{{\gamma }^{5}}{{\lambda }_{a}}\psi \right)}^{2}} \right]} + {{G}_{t}}\sum\limits_{a=0}^{8} \\ & {\left\{ {{\left( \bar{\psi }{{\Sigma }_{3}}{{\lambda }_{a}}\psi \right)}^{2}}+{{\left( \bar{\psi }{{\Sigma }_{3}}i{{\gamma }^{5}}{{\lambda }_{a}}\psi \right)}^{2}} \right\}}-K \left\{ \det [\bar{\psi }\left( 1+{{\gamma }_{5}} \right)\psi] +\det [\bar{\psi }\left( 1-{{\gamma }_{5}} \right)\psi] \right\}. \end{split} \end{equation} The coupling constant ${{G}_{s}}$ in the scalar/pseudo-scalar channel is closely related to the spontaneously chiral symmetry breaking, which produces a dynamical quark mass, and the tensor/ pseudo-tensor channels term ${{G}_{t}}\sum\limits_{a=0}^{8}{\left[ {{\left( \bar{\psi }_{f}^{c}{{\Sigma }^{3}}{{\lambda }_{a}}\psi _{f}^{c} \right)}^{2}}+{{\left( \bar{\psi }_{f}^{c}i{{\Sigma }^{3}}{{\gamma }^{5}}{{\lambda }_{a}}\psi _{f}^{c} \right)}^{2}} \right]}$ is closely related to the spin-spin interaction, which causes spin polarization condensation. For the (2 + 1)-flavor NJL model, tensor-type interaction at the mean field level leads to two types of spin polarization as \begin{equation}\label{eq:04} \begin{split} & {{F}_{3}}=-2{{G}_{t}}\left\langle \bar{\psi }{{\Sigma }^{3}}{{\lambda }_{3}}\psi \right\rangle , \\ & {{F}_{8}}=-2{{G}_{t}}\left\langle \bar{\psi }{{\Sigma }^{3}}{{\lambda }_{8}}\psi \right\rangle. \end{split} \end{equation} In general, $F_{3}$ contains only $u$ and $d$ quark spin polarization condensates, on the other hand, $F_{8}$ is associated with the strange quark spin polarization condensate. The running coupling constants are divided into longitudinal (${{g}_{\parallel }}$) and transverse (${{g}_{\bot }}$) components due to the existence of the magnetic field. In our current study, the couplings of the above \textrm{NJL} interactions relevant to quark gluon vertex coupling are expressed as ${{G}_{s}}=\left( g_{||}^{2}+g_{\bot }^{2} \right)/{{\Lambda }^{2}}$ and ${{G}_{t}}=\left( g_{||}^{2}-g_{\bot }^{2} \right)/{{\Lambda }^{2}}$. The distinguishing transverse and parallel Fierz identities automatically create a new channel of four-fermion interaction term with second order tensor structure in Lagrangian density during the transformation from splitting quark-gluon coupling to the scalar and pseudoscalar bilinear quantity \cite{Ferrer:2013noa}. ${{G}_{s}}$ and ${{G}_{t}}$ can be considered as the scalar and tensor channel interaction couplings, respectively. The effective potential by using standardized process is given \begin{equation}\label{eq:05} \begin{split} {{\Omega }_{\text{TSP}}}=&{{G}_{s}}\sum\limits_{f=u,d,s}{\left\langle \overline{\psi }\psi \right\rangle }_{f}^{2}+{{G}_{t}}{{\left\langle \overline{\psi }{{\lambda }_{3}}{{\Sigma }^{3}}\psi \right\rangle }^{2}}+{{G}_{t}}{{\left\langle \overline{\psi }{{\lambda }_{8}}{{\Sigma }^{3}}\psi \right\rangle }^{2}} -\frac{{N}_{c}}{2\pi } \sum\limits_{f=u,d,s}{\left| {{q}_{f}}B \right|}\sum\limits_{l=0}^{\infty }{{{\alpha }_{l}}} \mathop{\int }_{-\infty }^{\infty }\frac{d{{p}_{z}}}{2\pi} \\ & \times \left\{ {{\varepsilon }_{f,l,\eta }}+ T \ln \left[ 1+\exp \left( \frac{-{{\varepsilon }_{f,l,\eta }}-\mu }{T} \right) \right] + T \ln \left[ 1+\exp \left( \frac{-{{\varepsilon }_{f,l,\eta }}+\mu }{T} \right) \right] \right\} \\ &+ 4K{{\left\langle \overline{\psi }\psi \right\rangle }_{u}}{{\left\langle \overline{\psi }\psi \right\rangle }_{d}}{{\left\langle \overline{\psi }\psi \right\rangle }_{s}} \end{split} \end{equation} where $l$= 0, 1, 2 ... represents the quantum number of Landau level,and $\eta =\pm 1$ corresponds to the two kinds of spin direction of quark-antiquark($\bar{q}q$) pair. Contribution of non-degenerate particles due to spin difference at non-lowest Landau energy levels can be taken into account with the definition of this new operator ${{\alpha }_{l}}={{\delta }_{0,l}}+\Delta \left( l \right)\sum\limits_{\eta =\pm 1}{{}}$, where $\Delta \left( l \right)$ is denoted by \begin{equation}\label{eq:06} \begin{split} \Delta \left( l \right)=\left\{ \begin{matrix} 0 \\ 1 \\ \end{matrix} \right.\quad \quad \begin{matrix} l=0 \\ l>0 \\ \end{matrix} \end{split} \end{equation} and the energy spectrum of the lowest Landau Level ( LLL) $\left( l=0 \right)$ and non-LLL ($l\ne 0$) are given as \begin{equation} \label{eq:07} \begin{split} & \varepsilon _{_{u,l=\text{0}}}^{2}=p_{z}^{2}+{{\left( {{M}_{f}}+\left( {{F}_{3}}+\frac{{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}, \\ & \varepsilon _{_{u,l\ne 0,\eta = \pm 1}}^{2} = p_{z}^{2}+{{\left( \sqrt{{{M}_{f}}^{2}+2|{{q}_{f}}B|l}+\eta \left( {{F}_{3}}+\frac{{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}, \\ & \varepsilon _{_{d,l=0}}^{2}=p_{z}^{2}+{{\left( {{M}_{f}}+\left( {{F}_{3}}-\frac{{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}, \\ & \varepsilon _{_{d,l\ne 0,\eta = \pm 1}}^{2}=p_{z}^{2}+{{\left( \sqrt{{{M}_{f}}^{2}+2|{{q}_{f}}B|l}+\eta \left( {{F}_{3}}-\frac{{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}, \\ & \varepsilon _{_{s,l=0}}^{2}=p_{z}^{2}+{{\left( {{M}_{f}}+\left( \frac{2{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}, \\ & \varepsilon _{_{s,l\ne 0,\eta=\pm 1 }}^{2}=p_{z}^{2}+{{\left( \sqrt{{{M}_{f}}^{2}+2|{{q}_{f}}B|l}+\eta \left( \frac{2{{F}_{8}}}{\sqrt{\text{3}}} \right) \right)}^{2}}.\\ \end{split} \end{equation} Note that the breaking of energy spectrum degeneracy caused by spin known as Zeeman effect. Therefore, the contributions of spin come not only from the ground state of Landau level, but also from the whole excited states of Landau level. The tensor condensate parameter ${{F}_{3}}$ and ${{F}_{\text{8}}}$ are self-consistently satisfied the minimum of the thermodynamic potential, which are similar to dynamical quark mass ${{M}_{f}}$. At first, one can obtain three gap equations for ${{M}_{f}}$ ($f = u, d, s$) \begin{equation}\label{eq:08} \frac{\partial {{\Omega }_{\text{TSP}}}\left( {{M}_{f}},{{F}_{3}},{{F}_{8}} \right)}{\partial {{M}_{f}}}=0, \end{equation} \noindent and the other two gap equations for $F_{3}$ and $F_{8}$ is given as \begin{equation}\label{eq:09} \begin{split} & \frac{\partial {{\Omega }_{\text{TSP}}}\left( {{M}_{f}},{{F}_{3}},{{F}_{8}} \right)}{\partial {{F}_{3}}} = 0, \\ & \frac{\partial {{\Omega }_{\text{TSP}}}\left( {{M}_{f}},{{F}_{3}},{{F}_{8}} \right)}{\partial {{F}_{8}}} = 0 . \\ \end{split} \end{equation} To ensure that the thermodynamic potential in vacuum returns to zero, we define the normalized thermodynamic potential as effective potential \begin{equation}\label{eq:010} {{\Omega }_{\text{eff}}}\left( T,\mu ,eB \right)=\Omega \left( T,\mu ,eB \right)-\Omega \left( 0,0,eB \right). \end{equation} Some of the relevant thermodynamical quantities can be evaluated by the effective potential. The quark number density is \begin{equation}\label{eq:011} {{\rho }_{f}}=\sum\limits_{l,\eta}{\frac{{{N}_{c}}\left| {{q}_{f}}eB \right|}{\text{4}{{\pi }^{2}}}}\int\limits_{\text{-}\infty }^{\infty }{d{{p}_{z}}}\left( {{n}^{+}}-{{n}^{-}} \right)\ , \end{equation} where ${{n}^{\pm }}={1}/{\left( \exp \left[ \left( {{\varepsilon }_{f, l,\eta}}\mp \mu \right)/T \right]+1 \right)} $ is quark (antiquark) number distribution. The entropy density $S_{f} = -\frac{\partial {{\Omega }_{\text{eff}}}}{\partial T}$ is given as \begin{equation}\label{eq:012} \begin{split} S_{f} = -\sum\limits_{l,\eta}{\frac{{{N}_{c}}\left| {{q}_{f}}eB \right|}{\text{4}{{\pi }^{2}}}}\int\limits_{\text{-}\infty }^{\infty }{d{{p}_{z}}} \left[ \ln \left( 1-{{n}^{+}} \right)+ \ln \left( 1-{{n}^{-}} \right)-\frac{{\varepsilon_{f,l,\eta}}}{T}\left( {{n}^{+}}+{{n}^{-}} \right)\text{+}\frac{\mu }{T}({{n}^{+}}-{{n}^{-}}) \right]. \end{split} \end{equation} The energy density is given as \begin{equation}\label{eq:013} \varepsilon =T\frac{\partial P}{\partial T}\text{+}\mu \frac{\partial P}{\partial \mu }-P, \end{equation} where $P$ is pressure. The square of sound-speed are defined as \begin{equation}\label{eq:014} c_{s}^{2}=\frac{\partial P}{\partial \varepsilon }={{\left( \frac{\mu }{{{S}_{f}}}\frac{\partial {{\rho }_{f}}}{\partial T}\text{+}\frac{T}{{{S}_{f}}}\frac{\partial {{S}_{f}}}{\partial T} \right)}^{\text{-1}}}. \end{equation} \subsection{the introduction of the (2 + 1)- flavor NJL model with AMM} The effective Lagrangian density of the (2 + 1)- flavor with \textrm{AMM} \cite{Buballa:2003qv,Hatsuda:1994pi} is given as \begin{equation}\label{eq:015} \begin{split} & {{\mathcal{L}}_{\text{AMM}}}=\bar{\psi }\left( i{{\gamma }^{\mu }}{{D}_{\mu }}+{{\gamma }^{0}}\mu -m\text{+}\frac{\text{1}}{\text{2}}{{q}_{f}}\kappa {{\sigma }^{\mu \nu }}{{F}_{\mu \nu }} \right)\psi \\ & +{{G}_{s}}\sum\limits_{a=0}^{8}{\left[ {{\left( \bar{\psi }{{\lambda }_{a}}\psi \right)}^{2}}+{{\left( \bar{\psi }i{{\gamma }^{5}}{{\lambda }_{a}}\psi \right)}^{2}} \right]}-K\left[ \det \bar{\psi }\left( 1+{{\gamma }_{5}} \right)\psi +\det \bar{\psi }\left( 1-{{\gamma }_{5}} \right)\psi \right]. \end{split} \end{equation} The effective potential with \textrm{AMM} can be taken as \begin{equation}\label{eq:016} \begin{split} {{\Omega }_{\text{AMM}}}=& {{G}_{s}}\sum\limits_{f=u,d,s}{\left\langle \overline{\psi }\psi \right\rangle }_{f}^{2}+4K{{\left\langle \overline{\psi }\psi \right\rangle }_{u}}{{\left\langle \overline{\psi }\psi \right\rangle }_{d}}{{\left\langle \overline{\psi }\psi \right\rangle }_{s}} -\frac{{N}_{c}}{2\pi } \sum\limits_{f=u,d,s}{\left| {{q}_{f}}B \right|} \sum\limits_{l=0}^{\infty } \sum\limits_{t=\pm 1} {\mathop{\int }_{-\infty }^{\infty }}\frac{d{{p}_{z}}}{2\pi } \\ & \times \left\{ {{E}_{f,l,t}}+T\ln \left[ 1+\exp \left( \frac{-{{E}_{f,l,t}}-\mu }{T} \right) \right]+T\ln \left[ 1+\exp \left( \frac{-{{E}_{f,l,t}}+\mu }{T} \right) \right] \right\}, \end{split} \end{equation} where \begin{equation}\label{eq:017} {{E}_{_{f,l,t}}}=\sqrt{p_{z}^{2}+{{\left( {{\left( {{M}_{f}}^{2}+2|{{q}_{f}}B|l \right)}^{1/2}}-t{{\kappa }_{f}}{{q}_{f}}eB \right)}^{2}}} \end{equation} is the energy spectrum under different Landau energy levels, and $t=\pm 1$ corresponds to the two kinds of spin direction of $\bar{q} q $ pair. One can obtain three coupling gap equations for each order parameter as \begin{equation}\label{eq:018} \frac{\partial {{\Omega }_{AMM}}}{\partial {{M}_{f}}}=0, \end{equation} where $f = u, d, s$ for the three different flavors. Thus we can obtain three dynamical quark masses of $u, d$, and $s$ as \begin{equation}\label{eq:019} \begin{split} & {{M}_{u}}={{m}_{u}}-4{{G}_{s}}{{\left\langle \bar{\psi }\psi \right\rangle }_{u}}+2K{{\left\langle \overline{\psi }\psi \right\rangle }_{d}}{{\left\langle \overline{\psi }\psi \right\rangle }_{s}}, \\ & {{M}_{d}}={{m}_{d}}-4{{G}_{s}}{{\left\langle \bar{\psi }\psi \right\rangle }_{d}}+2K{{\left\langle \overline{\psi }\psi \right\rangle }_{u}}{{\left\langle \overline{\psi }\psi \right\rangle }_{s}}, \\ & {{M}_{s}}={{m}_{s}}-4{{G}_{s}}{{\left\langle \bar{\psi }\psi \right\rangle }_{s}}+2K{{\left\langle \overline{\psi }\psi \right\rangle }_{u}}{{\left\langle \overline{\psi }\psi \right\rangle }_{d}}, \end{split} \end{equation} \noindent where \begin{equation}\label{eq:020} {{\left\langle \bar{\psi }\psi \right\rangle }_{f}}=\frac{{{N}_{c}}{{G}_{s}}}{2\pi }\underset{l=0}{\overset{\infty }{\mathop \sum }}\,{{\alpha }_{l}}|{{q}_{f}}B|\mathop{\int }_{-\infty }^{+\infty }\frac{d{{p}_{z}}}{2\pi }\frac{{{M}_{f}}}{{{\varepsilon }_{f,l,t}}}\left( 1-\frac{s{{\kappa }_{f}}{{q}_{f}}B}{{{{\hat{M}}}_{f,l,t}}} \right)\left\{ 1-\frac{1}{{{e}^{\frac{{{\varepsilon }_{f,l,t}}+\mu }{T}}}+1}-\frac{1}{{{e}^{\frac{{{\varepsilon }_{f,l,t}}-\mu }{T}}}+1} \right\} \end{equation} \noindent corresponds to chiral condensation of different quark flavors. \section{RESULTS AND DISCUSSIONS}\label{sec:03 contents} To calibrate sets of parameters to applicable observable, parameters are referred \cite{Hatsuda:1994pi,Kohyama:2016fif} to be chosen as: $\Lambda =631.4~\mathrm{MeV}$, ${{m}_{u}}={{m}_{d}}=5.6~\mathrm{MeV}$, ${{m}_{s}}=135.7~\mathrm{MeV}$, ${{\Lambda }^{2}}{{G}_{s}}=1.835$ and $K{{\Lambda }^{5}}=9.29$. The empirical values are given as ${{f}_{\pi }}=93~\mathrm{MeV}$, ${{m}_{\pi }}=138~\mathrm{MeV}$, ${{m}_{K}}=495.7~\mathrm{MeV}$, and ${{m}_{\eta '}} = 957.5~\mathrm{MeV}$. The tensor channel coupling constant $G_{t}$ restricted by the magnetic fields ought to be zero in the case of the vanished magnetic field, and equals the value of $G_{s}$ when $eB\to \infty $. At the following study, the value of $G_{t}$ is taken as $G_{t}=G_{s}/2$. \begin{figure}[H] \centering \includegraphics[width=0.50\textwidth]{fig1.eps} \caption{\label{fig1} The dependence of dynamical quark mass (M) on temperature (T) for four different magnetic fields ( $eB$ = 0.05, 0.10, 0.15 and 0.20 $\mathrm{GeV}^{2}$ ) , which does not consider \textrm{TSP} and \textrm{AMM}. Fig 1.(a) is for $\mu =0.0~\mathrm{GeV}$; and Fig 1.(b) is for $\mu =0.25~\mathrm{GeV}$.} \end{figure} In order to investigate the effect of \textrm{AMM} on the phase transition, we make comparisons between the two \textrm{AMM} sets. The compatible results obtained in \cite{Mekhfi:2005pn} we define it as AMM1 set as ${{\kappa }_{u}}={{\kappa }_{d}}=0.38,\ {{\kappa }_{s}}=0.25$, while the defined AMM2 set chosen as ${{\kappa }_{u}}=\text{0}\text{.123,} ~{{\kappa }_{d}}=0.555,\ {{\kappa }_{s}}=0.329$ fixed by \cite{Dothan:1981ex}. Due to the \textrm{NJL} model is non-renormalizable, the divergent vacuum terms merged in gap equation regularized by using the magnetic-field-independent regularization (MIFR) scheme \cite{Menezes:2008qt,Aguirre:2020tiy}, which gets rid of the nonphysical part by separating the vacuum term form the integrals. The scheme dealing with the sums of all Landau level within the integrals by means of Hurwitz zeta function are presented. \begin{figure}[H] \centering \includegraphics[width=0.45\textwidth]{fig2.eps} \caption{\label{fig2} The dependence of dynamical quark mass (M) on temperature (T) for four different magnetic fields ( $eB$ = 0.05, 0.10, 0.15 and 0.20 $\mathrm{GeV}^{2}$ ) by considering \textrm{TSP}. Fig 2.(a) is for $\mu =0.0~\mathrm{GeV}$; and Fig 2.(b) is for $\mu =0.25~\mathrm{GeV}$.} \end{figure} The dynamical mass or the quark condensate plays as an order parameter for the chiral phase transition. Chiral restoration happens at high temperatures and/or high chemical potentials. In Fig. 1(a, b), the dynamical quark masses $M$ of $u$, $d$ and $s$ quarks without considering \textrm{AMM} and \textrm{TSP} are manifested as decreasing smooth functions of temperatures at $\mu =0$ and $\mu =0.25~\mathrm{GeV}$, which indicates a chiral crossover. The dynamical mass $M$ is apparently enhanced by increasing the magnetic field. The magnetic field is shown at $eB$ = 0.05, 0.1, 0.15, and 0.2 $\mathrm{GeV}^{2}$ with $\mu =0$ and $\mu =0.25~\mathrm{GeV}$ respectively. Since we have considered non-vanishing current quark mass, the chiral symmetry is never restored fully. Since the dynamical mass is proportional to chiral condensate, it can be seen from Fig.1 that the larger the magnetic field is, the larger the corresponding chiral condensation is. This phenomenon is manifested as magnetic catalysis \cite{Kharzeev:2007jp,Gusynin:1999pq,Gusynin:1995nb,Gusynin:1994re}, which accounts for the magnetic field has a strong tendency to enhance (or catalyze) spin-zero $\bar{q} q$ condensates. By considering \textrm{TSP} of quarks, we investigate the temperature dependence of constituent quark mass for $eB$ = 0.05, 0.10, 0.15 and 0.20 ~$\mathrm{GeV}^{2}$ respectively shown in Fig.2(a, b). The dynamical mass $M$ by considering \textrm{TSP} of quarks is manifested as a decreasing smooth function of temperatures for different magnetic fields and chemical potentials, which corresponds to a chiral crossover. The dynamical mass $M$ is apparently enhanced with the increase of magnetic field, It is suggested that the introduction of \textrm{TSP} will enhance the magnetic catalysis effect. \begin{figure}[H] \centering \includegraphics[width=0.85\textwidth]{fig3.eps} \caption{\label{fig3} Fig.3(a, b) shows the contour plots of the ${{F}_{3}}$ and ${{F}_{8}}$ distributions with zero chemical potential in the $T - eB$ plane, and Fig.3(c, d) shows similar plots of the ${{F}_{3}}$ and ${{F}_{8}}$ distributions but with non-zero chemical potential $\mu =0.25~\mathrm{GeV}$.} \end{figure} In the $T- eB$ plane of the Fig.3, the corresponding temperature range is ~$0\le T\le 0.3~\mathrm{GeV}$, and the magnetic field range is $0\le eB\le 0.5\,\text{Ge}{{\text{V}}^{2}}$. Fig.3 (a, b) displays the contour plots of the $F_{3}$ and $F_{8}$ distributions with zero chemical potential in the $T- eB$ plane, and Fig.3 (c, d) shows similar plots of the $F_{3}$ and $F_{8}$ distributions but with non-zero chemical potential $\mu = 0.25~\mathrm{GeV}$. The (2 + 1)-flavor spin polarization is different from that of two flavor spin polarization because of an additional term $F_{8} = -2G_{t}\left\langle \bar{\psi} \Sigma^{3}\lambda_{8}\psi \right\rangle$ associated with the $\lambda_{8}$ flavor generator. The spin condensates affect dynamical quark masses and quark dispersion relation. It is found that the nonzero values of the two spin condensates $F_{3}$ and $F_{8}$ exist in the restored chiral symmetry phase with high temperature and large magnetic field, but $F_{3}$ and $F_{8}$ are almost zero in the chiral symmetry broken phase. We also noticed that $F_{8}$ decreases sharply with the increase of chemical potential, but $F_{3}$ changes slightly with the chemical potential. \begin{figure}[H] \centering \includegraphics[width=0.75\textwidth]{fig4.eps} \caption{\label{fig4} The dynamical quark mass (M) as a function of temperature ($T$) for four different magnetic fields ($eB$ = 0.05, 0.10, 0.15 and 0.20 $\text{Ge}{{\text{V}}^{2}}$) by considering the different sets of \textrm{AMM}. Fig.4(a, b) are for $\mu =0$ and $\mu =0.25 ~\mathrm{GeV}$ respectively with AMM1 set as $\kappa _{u}=\kappa_{d} = 0.38$, $\kappa_{s} = 0.25$. Fig.4(c, d) is same as Fig.4 (a, b) but for AMM2 set as $\kappa_{u}=0.123, \kappa_{d} = 0.555$, $\kappa_{s}=0.329$.} \end{figure} Figure 4. displays the dependence of dynamical quark mass ($M$) on temperature ($T$) for four different magnetic fields ($eB$ = 0.05, 0.10, 0.15 and 0.20 $\mathrm{GeV}^{2}$) by considering the two AMM's sets. Fig.4(a, b) are for $\mu =0~\mathrm{GeV}$ and $\mu =0.25 ~\mathrm{GeV}$ with AMM1 set as $\kappa _{u}=\kappa_{d} = 0.38$ and ${{\kappa }_{s}}=0.25$. Fig.4(c, d) is same as Fig.4(a, b) but with AMM2 set as $\kappa_{u}=0.123, \kappa_{d} = 0.555$ and $\ {{\kappa }_{s}}=0.329$. Contrary to the behavior of the zero AMM in Fig.1, the mass-decreasing behavior of $u$ and $d$ quarks in the chiral restoration is not a smooth slope but a sudden drop, which indicates the existence of a first-order transition. However, the smooth slope of the dynamical mass for the crossover can be still present in the weak field $eB$ = 0.05 $\mathrm{GeV}^{2}$ for the non-zero AMM. The mass-decreasing behavior of $s$ quark in the chiral restoration is still a smooth slope, which suggests a chiral crossover for $s$ quark. From Fig.4, it is found that the dynamical quark mass of $u$ and $d$ quarks have the characteristics of inverse magnetic catalysis in the chiral restoration phase ($T\ge T_{\textrm{C}}$) by using the \textrm{AMM} sets. \begin{figure}[H] \centering \includegraphics[width=0.85\textwidth]{fig5.eps} \caption{\label{fig5} The critical temperature of $u$ and $d$ quarks as a function of the magnetic field at $\mu$ = 0 (a) and $=0.25~\mathrm{GeV}$ (b).} \end{figure} In Fig. 5, the critical temperature is shown as a function of the magnetic field with the chemical potentials $\mu$ = 0 and $0.25~\mathrm{GeV}$ respectively. It is found that the critical temperature decreases with the magnetic field for the AMM1 and AMM2 sets, which indicates an inverse magnetic catalysis which qualitatively agrees with lattice result in~\cite{Bali:2012jv}. On the contrary, with the \textrm{TSP}, $T_{\textrm{C}}$ enhances as a function of the magnetic field, which is the extension of the magnetic catalysis effect from vacuum to finite temperature. The different effects of \textrm{AMM} and \textrm{TSP} on chiral condensate can be easily understood from the dispersion relations in Eq. (7) and Eq. (17), the \textrm{AMM} reduces the LLL energy and the \textrm{TSP} lifts up the \textrm{LLL} energy, which causes the different effects. \begin{figure}[H] \centering \includegraphics[width=0.95\textwidth]{fig6.eps} \caption{\label{fig6} The same as Fig. 5, but for the $s$-quark.} \end{figure} The critical temperature of chiral phase transition of $s$ quark as a function of $eB$ is manifested in Fig.6. Compared with light quarks of $u$ and $d$, the phase transition temperature $T_{\textrm{C}}$ of s quark with \textrm{TSP} increases significantly with the increase of magnetic field, which corresponds to the characteristics of magnetic catalysis. The introduction of AMM sets corresponds to inverse magnetic catalytic characteristics. Figure 7 displays the dependencies of the entropy density of $u$ , $d$ and $s$ quarks on temperature at zero chemical potential. It can be noted that the introduction of the \textrm{AMM} makes the crossover phase transition sharp. It is worth noting that the \textrm{AMM} in Fig.7 corresponds to three different settings, which are AMM0, AMM1 and AMM2, respectively. AMM0 means that the \textrm{AMM} is not considered, that is, all $\kappa $ values in Eq. (17) are set to zero. AMM1 and AMM2 sets have been mentioned above. When $eB = 0.05~\mathrm{GeV}^{2}$, the magnetic field is not big enough to excite the effect on entropy. When $eB = 0.2~\mathrm{GeV}^{2}$, some of the effects of the magnetic field on entropy for different AMM sets and TSP can be excited. It is found that the entropy shows a sharp change near the phase transition temperature after adding \textrm{AMM} sets, and this sharp change is more obvious with the magnetic field increases and chemical potential, showing a first-order phase characteristic. The change of entropy with temperature near the phase transition temperature is relatively smooth after adding \textrm{TSP}, and it behaves like the crossover transition. \begin{figure}[H] \centering \includegraphics[width=0.5\textwidth]{fig7.eps} \caption{\label{fig7} The dependence of ${S}/{{{T}^{3}}}$ on temperature $T$ at $\mu = 0 \mathrm{GeV}$ with different magnetic field. Fig.7 (a) is for $eB = 0.05~\mathrm{GeV}^{2}$ and Fig.7 (b) is for $eB = 0.2~\mathrm{GeV}^{2}$.} \end{figure} The dependence of square of sound-velocity $c_{\textrm{s}}^{2}$ on temperature $T$ is manifested in Fig.8. Fig.8(a) and Fig.8(b) are for zero chemical potential $\mu$ = 0 and $\mu = 0.25~\mathrm{GeV}$ respectively. The square of sound-velocity shows a sudden rapid rise inflection near the phase transition after adding \textrm{AMM} sets, and this rapid rise is more obvious with the magnetic field increases, showing a obviously first-order phase characteristic. On the other hands, the change of square of sound-velocity with temperature near the phase transition is relatively smooth inflection after adding \textrm{TSP}, showing a obviously cross-over transition characteristic. The result obtained by using the square of sound velocity is completely consistent with the result of entropy analysis. Compared with $u$ and $d$ quarks, the square of sound-velocity of $s$ quark with temperature is relatively smooth inflection after adding \textrm{TSP} and \textrm{AMM} sets. It is proposed that $s$ quarks have always maintained obvious cross-over characteristics. In the high-temperature region, the square of sound-velocity $c_{\textrm{s}}^{2}$ increases with temperature and obtains the saturation value $c_{\textrm{s}}^{2}=1/3$ to satisfy the relativistic requirement. This suggests that the equation of state in the chiral restoration phase at high temperatures is close to the Stefan-Boltzmann limit $\varepsilon = 3P$. \begin{figure}[H] \centering \includegraphics[width=0.85\textwidth]{fig8.eps} \caption{\label{fig8} The sound-velocity square $C_{\textrm{s}}^{2}$ of $u$ and $d$ with $s$ quarks as a function of the temperature $T$ with different chemical potential. Fig.8 (a, b) is for $u$ and $d$ quarks with zero chemical potential $\mu$ = 0, and $\mu = 0.25~\mathrm{GeV}$, and Fig.8 (c, d) is for $s$ quarks} \end{figure} \section{SUMMARY AND CONCLUSIONS}\label{sec:04 contents} In this work, we thoroughly study the effect from \textrm{TSP} and \textrm{AMM} on the vacuum, phase transition and thermal magnetized \textrm{QCD} in the (2 + 1)-flavor Nambu-Jona-Lasinio (NJL) model with nonzero current quark masses at finite temperature and chemical potential. An unified physical mechanism to illustrate the novel consequences from recent lattice \textrm{QCD} as magnetic catalysis and inverse magnetic catalysis effect proposed in the paper. We focus on two topics: the \textrm{AMM} and \textrm{TSP}. For these two topics, we should pay special attention to the dispersion relation, especially the lowest Landau level, which determines the properties of the magnetized quark matter system. The \textrm{TSP} lifts up the \textrm{LLL} energy: ${{E}_{\text{LLL}}}={{ \left( p_{z}^{2}+ (M + F_{3}+\frac{F_{8}}{\sqrt{\text{3}}})^{2} \right)}^{\frac{1}{2}}}$, while the \textrm{AMM} effect diminishes the \textrm{LLL} energy: ${{E}_{\text{LLL}}}={{\left( p_{z}^{2}+{{(M-\kappa \left| {{q}_{f}} \right|B)}^{2}} \right)}^{1/2}}$ therefore, the \textrm{TSP} and the \textrm{AMM} take almost opposite effects on magnetized quark matter. When the \textrm{AMM} and \textrm{TSP} contributions are not considered, the corresponding phase transition temperature increases with the magnetic field, showing the characteristics of magnetic catalysis. When considering only the contribution of \textrm{TSP}, the phase transition temperature also increases with the magnetic field, showing the characteristics of magnetic catalysis. On the other hand, when \textrm{AMM} are introduced, the phase transition temperature decreases with the magnetic field, showing the characteristics of inverse magnetic catalysis. It is found that the square of sound-velocity shows a sudden rapid rise inflection near the phase transition after adding \textrm{AMM} sets, and this rapid rise is more obvious with the magnetic field increases, showing a obviously first-order phase characteristic. On the other hands, after adding \textrm{TSP}, the change of square of sound-velocity with temperature near the phase transition is relatively smooth inflection, showing a obviously cross-over transition characteristic. The result obtained by using the square of sound velocity is completely consistent with the result of entropy analysis. The (2 + 1)-flavor spin polarization is different from that of two flavor because of an additional $F_{8} = -2G_{t}\left\langle \bar{\psi} \Sigma^{3}\lambda_{8}\psi \right\rangle$ associated with the $\lambda_{8}$ flavor generator. The spin condensates affect the dynamical quark masses, chiral phase transition,and quark dispersion relation. It is found that the nonzero values of the two spin condensates $F_{3}$ and $F_{8}$ exist in the restored chiral symmetry phase with high temperature and large magnetic field, but $F_{3}$ and $F_{8}$ are almost zero in the chiral symmetry broken phase. \section*{Acknowledgments} This work was supported by National Natural Science Foundation of China (Grants No. 11875178, No. 11475068, No. 11747115). \section*{References}
\section{Introduction}\label{sec1}\setcounter{equation}{0} \subsection{The model} Let $\mathbb{T}^{d}=\big(\mathbb{R}/\mathrm{L}\mathbb{Z}\big)^{d}$ be a $d$-dimensional torus ($d=2,3$). The convective Brinkman-Forchheimer (CBF) equations describe the motion of incompressible fluid flows in a saturated porous medium (\cite{MTT}). With control applications in mind, we consider the following CBF equations with potential (perturbed by a subdifferential, see Hypothesis \ref{hyp1} below): \begin{equation}\label{1} \left\{ \begin{aligned} \frac{\partial \boldsymbol{y}}{\partial t}-\mu \Delta\boldsymbol{y}+(\boldsymbol{y}\cdot\nabla)\boldsymbol{y}+\alpha\boldsymbol{y}+\beta|\boldsymbol{y}|^{r-1}\boldsymbol{y}+\nabla p+\Psi(\boldsymbol{y})&\ni\boldsymbol{g}, \ \text{ in } \ \mathbb{T}^{d}\times(0,\infty), \\ \nabla\cdot\boldsymbol{y}&=0, \ \text{ in } \ \mathbb{T}^{d}\times(0,\infty), \\ \boldsymbol{y}(0)&=\boldsymbol{y}_0 \ \text{ in } \ \mathbb{T}^{d}, \end{aligned} \right. \end{equation} where $\boldsymbol{y}(x,t):\mathbb{T}^{d}\times(0,\infty)\to\mathbb{R}^d$ represents the velocity field at time $t$ and position $x$, $p(x,t):\mathbb{T}^{d}\times(0,\infty)\to\mathbb{R}$ denotes the pressure field, $\boldsymbol{g}(x,t):\mathbb{T}^{d}\times(0,\infty)\to\mathbb{R}^d$ is an external forcing and $\Psi(\cdot)\subset\mathbb{L}^2(\mathbb{T}^d)\times\mathbb{L}^2(\mathbb{T}^d)$ is a multivalued map. Moreover, $\boldsymbol{y}(\cdot,\cdot)$, $p(\cdot,\cdot)$ and $\boldsymbol{g}(\cdot,\cdot)$ satisfies the following periodic conditions: \begin{align}\label{2} \boldsymbol{y}(x+\mathrm{L}e_{i},\cdot) = \boldsymbol{y}(x,\cdot), \ p(x+\mathrm{L}e_{i},\cdot) = p(x,\cdot) \ \text{and} \ \boldsymbol{g}(x+\mathrm{L}e_{i},\cdot) = \boldsymbol{g}(x,\cdot), \end{align} for every $x\in\mathbb{R}^{d}$ and $i=1,\ldots,d,$ where $\{e_{1},\dots,e_{d}\}$ is the canonical basis of $\mathbb{R}^{d}.$ The constant $\mu>0$ denotes the \emph{Brinkman coefficient} (effective viscosity), the positive constants $\alpha$ and $\beta$ represent the \emph{Darcy} (permeability of porous medium) and \emph{Forchheimer} (proportional to the porosity of the material) coefficients, respectively. The absorption exponent $r\in[1,\infty)$ and $r=3$ is known as the \emph{critical exponent}. The critical homogeneous CBF equations (\eqref{1} without potential, $r=3$ and $\boldsymbol{g}=\mathbf{0}$) have the same scaling as Navier-Stokes (NS) equations only when $\alpha=0$ (\cite{KWH}). We refer the case $r<3$ as \emph{subcritical} and $r>3$ as \emph{supercritical} (or fast growing nonlinearities). The model is accurate when the flow velocity is too large for Darcy's law to be valid, and apart from that the porosity is not too small (\cite{MTT}). If one considers \eqref{1} without potential and if $\alpha=\beta=0$, then we obtain the classical NS equations, and if $\alpha, \beta>0$, then it can be considered as damped NS equations. A discussion on NS equations with potential can be accessed from \cite{AIL}. \subsection{Literature survey} In the literature, CBF equations are also known as tamed Navier-Stokes equations or Navier-Stokes equations modified with an absorption term, cf. \cite{SNA,MRXZ} etc., and references therein. The damping $\alpha\boldsymbol{y}+\beta|\boldsymbol{y}|^{r-1}\boldsymbol{y}$ arises from the resistance to the motion of the flow, which describes several physical phenomena such as drag or friction effects, porous media flow, some dissipative mechanisms, cf. \cite{ZCQJ,KWH,MTT,ZZXW} etc., and references therein. The continuous data assimilation problem for CBF model is described in \cite{MTT}. The global solvability results for CBF model (for fast growing nonlinearities in 3D) can be accessed from \cite{SNA,KT2,MTT,KWH,MT1}, etc. Similar to 3D Navier-Stokes equations, the existence of a unique global (in time) weak solution of 3D CBF equations with $r\in[1,3)$ (for any $\beta,\mu>0$) and $r=3$ (for $2\beta\mu<1$) is also an open problem. The theory of monotone operators is an important tool in the study of nonlinear operator equations, we refer the readers to \cite{VB1,VB2,ZdSmP, Hu}, etc., for more details. When the operator has some kind of monotonicity properties, then one can pass the limit in the Galerkin and Faedo-Galerkin approximations of the original equation, with a-priori estimates that are in general weaker than those necessary in the compactness methods (\cite{BPWFSS}). In particular, monotone operators are suitable tools for studying variational inequalities (\cite{VB2}). Local and global solvability of NS equations with potential (or perturbed by a subdifferential) is established in \cite{AIL}. Control of ordinary/partial differential equations associated with fluid flow motions have numerous applications in science, engineering and technology. Behavior and control of turbulent flows are some of the most difficult problems in fluid mechanics. By control of turbulent flows, we meant to determine an optimal action which \emph{minimizes the turbulence} inside the flow, (cf. \cite{F.T.,Fu,G,OpVf}). One of the interesting control problem is the flow invariance preserving feedback controllers for fluid flows. The authors in \cite{VBSS} developed a procedure to design feedback controllers that ensure the resultant dynamics of turbulence preserve some prescribed physical constraints such as enstrophy, helicity, etc. Flow invariance of controlled flux sets with respect to Navier-Stokes equations is discussed in \cite{VBNH}. The existence problem of the variational inequality for Stokes and Navier-Stokes equations with constraints of obstacle type is considered in \cite{TFu,MGNK}, respectively. An another interesting feedback control problem is the time optimal control problem, where one finds a control of bang-bang type to reach a fixed state from an arbitrary state in minimal time (cf. \cite{VB2,wwxz}). As far as the time optimal control of fluid flow models are concerned, the time optimal control problem for 2D NS equations, Boussinesq equations, 3D Navier-Stokes-Voigt equations, 2D CBF equations with $r\in[1,3],$ and 3D NS-$\alpha$ model is considered in \cite{TiOp1,SlGw,CTATMN,TiOp2,DsLt}, respectively, and references therein. Stabilization of NS equations is dealt to stabilize the equilibrium solution of NS equations by using finite dimensional feedback controllers having support either in interior or on the boundary of the domain (cf. \cite{VB6, VB7,VBLT}, etc.). The internal stabilizability of NS equations (with slip and non-slip Dirichlet boundary conditions) is developed in \cite{VBL, VBT}. The author in \cite{AIL2} discussed the feedback stabilization of NS equations preserving the invariance of a given convex set. Recently the authors in \cite{BKP} established feedback stabilization of 2D NS equations by using the Taylor approximation of the value function. \subsection{Main results} The main objective of this work is to establish the solvability results of the inclusion problem \eqref{1} and discuss their applications in the context of control problems. Since $\alpha$ is not playing a major role in this work, so we fix $\alpha=0$ in the rest of the paper. Let us state the main results of this work for the problem \eqref{1} in an abstract framework (see \eqref{1p4} below). We will prove these results in the subsequent sections. Let us denote $\boldsymbol{f}=\mathcal{P}\boldsymbol{g}$ and $\Phi(\cdot)=\mathcal{P}\Psi(\cdot)$, where $\mathcal{P}$ is the Helmholtz-Hodge (or Leray) projection. The functional setting has been provided in Section \ref{sec2}. The following assumption is imposed on $\Phi(\cdot)$ to achieve our goals. \begin{hypothesis}\label{hyp1} Let $\Phi$ be a maximal monotone operator on $\mathbb{H}\times\mathbb{H}$ satisfying the following hypothesis \cite{AIL}: \begin{enumerate} \item[(H.1)] $\Phi = \partial\varphi$, where $\varphi: \mathbb{H}\to\overline{\mathbb{R}}:=\mathbb{R}\cup\{+\infty\}$ is a lower semicontinuous proper convex function. \item[(H.2)] $\boldsymbol{0}\in\mathrm{D}(\Phi)$. \item[(H.3)] There exists two constants $\gamma\geq 0,\ \varsigma\in(0,\frac{1}{\mu})$ such that \begin{align*} (\mathrm{A}\boldsymbol{y},\Phi_{\lambda}(\boldsymbol{y}))&\geq -\gamma(1+\|\boldsymbol{y}\|_{\mathbb{H}}^{2})\nonumber\\&\quad- \begin{cases} \varsigma\|\Phi_{\lambda}(\boldsymbol{y})\|_{\mathbb{H}}^{2}, &\text{ for } d=2 \text{ with } r\in[1,\infty)\text{ and } d=3 \text{ with } r\in[1,5),\\ 0, &\text{ for } d=3 \text{ with } r\in[5,\infty), \end{cases} \end{align*} \end{enumerate} for all $\lambda>0$ and $\boldsymbol{y}\in\mathrm{D}(\mathrm{A})$, where $ \Phi_{\lambda} = \frac{1}{\lambda}(\mathrm{I}-(\mathrm{I}+\lambda\Phi)^{-1}):\mathbb{H}\to\mathbb{H}$ is the Yosida approximation of $\Phi$. We observe from here that $$\Phi_\lambda(\boldsymbol{y})\in\Phi((\mathrm{I}+\lambda\Phi)^{-1})(\boldsymbol{y})),$$ for every $\boldsymbol{y}\in\mathbb{H}$ and $\lambda>0.$ \end{hypothesis} \begin{remark} \begin{enumerate} \item The results of this work hold true if one replaces $(1+\|\boldsymbol{y}\|_{\mathbb{H}}^{2})$ by $(1+\|\boldsymbol{y}\|_{\mathbb{V}}^{2})$ in $\mathrm{(H.3)}$. \item Using condition $\mathrm{(H.1)}$, the system \eqref{1p4} can be considered as \textsl{CBF equations perturbed by a subdifferential. } \end{enumerate} \end{remark} \begin{theorem}\label{thm1.1} Let $T>0$ and assume that $\Phi\subset\mathbb{H}\times\mathbb{H}$ satisfies Hypothesis \ref{hyp1}. Let $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\boldsymbol{f} \in \mathrm{W}^{1,1}(0,T;\mathbb{H})$. For $d=2$ with $r\in[1,\infty)$ and $d=3$ with $r\in[3,\infty)$ ($2\beta\mu\geq1$ for $r=3$), there exists a unique strong solution \begin{align}\label{1p.4} \boldsymbol{y}\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap\mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V}), \end{align} such that in $\mathbb{H}$ \begin{equation}\label{1p4} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\Phi(\boldsymbol{y}(t))&\ni \boldsymbol{f}(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation} Furthermore, $\boldsymbol{y}$ is right differentiable, $\frac{\d^+\boldsymbol{y}}{\d t} $ is right continuous, and \begin{equation}\label{1p5} \frac{\d^+ \boldsymbol{y}(t)}{\d t}+\left(\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\Phi(\boldsymbol{y}(t))-\boldsymbol{f}(t)\right)^0= \mathbf{0}, \ \text{ for all } \ t\in[0,T]. \end{equation} For $d=3$ with $r\in[1,3]$ and $2\beta\mu<1$ for $r=3$ the solution $\boldsymbol{y}$ exists on some interval $[0,T_0)$, where $$T_0=T_0\left(\|\boldsymbol{y}_0\|_{\mathbb{V}},\|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})}\right)\leq T.$$ \end{theorem} \begin{theorem}\label{thm1.2} Let $T>0$ and assume that $\Phi\subset\mathbb{H}\times\mathbb{H}$ satisfies Hypothesis \ref{hyp1}. Let $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\boldsymbol{f} \in \mathrm{W}^{1,2}(0,T;\mathbb{H})$ ($\boldsymbol{y}_0\in\mathbb{V}\cap\mathrm{D}(\Phi)$ and $\boldsymbol{f}\in\mathrm{L}^2(0,T;\mathbb{H})$ for $d=2,3$ and $r\in[1,3]$). For $d=2$ with $r\in[1,\infty)$ and $d=3$ with $r\in[3,\infty)$, there exists a unique strong solution $$\boldsymbol{y}\in \mathrm{C}([0,T];\mathbb{V})\cap \mathrm{L}^{2}(0,T;\mathrm{D}(\mathrm{A}))\cap\mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{3(r+1)})\cap\mathrm{W}^{1,2}(0,T;\mathbb{V}),$$ with $\frac{\d\boldsymbol{y}}{\d t}, \mathcal{B}(\boldsymbol{y}), \mathcal{C}(\boldsymbol{y})\in\mathrm{L}^2(0,T;\mathbb{H})$ such that in $\mathbb{H}$ \begin{equation}\label{1p7} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\Phi(\boldsymbol{y}(t))&\ni \boldsymbol{f}(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation} For $d=3$ with $r\in[1,3)$, there exists a time $T_0=T_0\left(\|\boldsymbol{y}_0\|_{\mathbb{V}},\|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})}\right)\leq T$ such that the solution $\boldsymbol{y}$ exists on some interval $[0,T_0)$. \end{theorem} \subsection{Difficulties, approaches and novelties} The main concern for considering the CBF equations \eqref{1} in a $d$-dimensional torus is as follows. In the torus $\mathbb{T}^d$, the Helmholtz-Hodge projection $\mathcal{P}$ and $-\Delta$ is commute (\cite[Theorem 2.22]{JCR4}). So, the equality (\cite[Lemma 2.1]{KWH}) \begin{align}\label{3} &\int_{\mathbb{T}^{d}}(-\Delta \boldsymbol{y}(x))\cdot|\boldsymbol{y}(x)|^{r-1}\boldsymbol{y}(x)\d x\nonumber\\&=\int_{\mathbb{T}^{d}}|\nabla \boldsymbol{y}(x)|^2|\boldsymbol{y}(x)|^{r-1}\d x+4\left[\frac{r-1}{(r+1)^2}\right]\int_{\mathbb{T}^{d}}|\nabla|\boldsymbol{y}(x)|^{\frac{r+1}{2}}|^2\d x, \end{align} is quite useful in obtaining regularity results. It is also noticed in the literature that the above equality may not be useful in domains other than the whole domain or a $d$-dimensional torus (see \cite{KT2,MT1}, etc. for a detailed discussion). Recently, the authors in \cite{DsSz} addressed this regularity problem for Dirichlet's boundary conditions and the well-posedness of CBF equations with potential in bounded domains will be a future work. The main difficulty with nonlinear terms arises when we multiply them by a generalized function to get $m$-accretivity. In the literature for NS equations with potential (cf. \cite{AIL,AIL2}) or for feedback control problems (cf. \cite{VBSS,TiOp1}), $\mathbb{V}$-quantization of the nonlinear term $(\boldsymbol{y}\cdot\nabla)\boldsymbol{y}$ is used to obtain the $m$-accretivity of the operators. Whereas, for the supercritical CBF equations \eqref{1} (that is, for $r>3$), one can handle the NS nonlinearity $(\boldsymbol{y}\cdot\nabla)\boldsymbol{y}$ by the Forchheimer nonlinearity $|\boldsymbol{y}|^{r-1}\boldsymbol{y}$ (see steps \eqref{2.30}, \eqref{3.744}, etc. below). Along with this fact, the monotonicity of the nonlinear term $|\boldsymbol{y}|^{r-1}\boldsymbol{y}$ helps to obtain the $m$-accretivity of the operators without using a quantization technique (see Proposition \ref{prop33} below). The same results hold true for $r=3$ with $2\beta\mu\geq 1$ also without quantization, but for $r\in[1,3]$ ($2\beta\mu<1$ for $r=3$), we need an $\widetilde\mathbb{L}^4$-quantization technique (Appendix \ref{Appen.}). The condition $(\mathrm{A}\boldsymbol{y},\Phi_{\lambda}(\boldsymbol{y}))\geq -\gamma(1+\|\boldsymbol{y}\|_{\mathbb{H}}^{2})$ is considered in Hypothesis \ref{hyp1} (H.3) for the case $d=3$ with $r\in[5,\infty)$. This is required to handle the term $|(\mathcal{C}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))|$ in Proposition \ref{prop3.3}, while taking the inner product with $\Phi_{\lambda}(\boldsymbol{y}_{\lambda})$ for the Yoisida approximated stationary problem. The Sobolev embedding of $\mathbb{V}\subset\widetilde\mathbb{L}^p$ for any $p\in[1,\infty)$ helps us to resolve this problem in 2D, whereas in 3D, the embedding is true only for $p\in[2,6]$. Moreover, for the supercritical case, by choosing $ \mathcal{F}^{1}(\cdot) = \mu(1-\delta_1)\mathrm{A}+\beta(1-\delta_2)\mathcal{C}(\cdot)\ \text{ and }\ \mathcal{F}^{2}(\cdot) = \mu\delta_1\mathrm{A}+\mathcal{B}(\cdot)+\beta\delta_2\mathcal{C}(\cdot)+\kappa\mathrm{I},$ for some $\delta_1, \delta_2\in(0,1)$ and $\kappa\geq\varrho=\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}},$ we used the well-known perturbation theorem for nonlinear $m$-accretive operators (\cite[Theorem 3.5, Chapter II]{VB1}) to show that the operator $\mathcal{F}^{1}+\mathcal{F}^{2}=\mu\mathrm{A}+\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\kappa\mathrm{I}$ with the domain $\mathrm{D}(\mathrm{A})$ is $m$-accretive in $\mathbb{H}$. For NS equations with potential, the authors in \cite{AIL} proved a result similar to Theorem \ref{thm1.2} by assuming that $\boldsymbol{y}_0\in\mathbb{V}\cap\mathrm{D}(\Phi)$ and $\boldsymbol{f}\in\mathrm{L}^2(0,T;\mathbb{H})$. Under the same assumptions, we are able to prove Theorem \ref{thm1.2} for the case $d=2,3$ and $r\in[1,3]$ only (Appendix \ref{Appen.}). For $d=2,3$ and $r\in(3,\infty)$, we need $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\boldsymbol{f}\in\mathrm{W}^{1,2}(0,T;\mathbb{H})$ to control the term $\int_0^T \|\Phi_\lambda(\boldsymbol{y}(t))\|_{\mathbb{H}}^2 \d t$ (Step IV, Proposition \ref{prop4.1}). In order to do this, we first obtain the regularity estimates for $\left\|\frac{\d^+\boldsymbol{y}_\lambda(\cdot)}{\d t}\right\|_{\mathbb{H}}$ and $\int_0^T \left\|\frac{\d\boldsymbol{y}_\lambda(t)}{\d t}\right\|_{\mathbb{V}}^2 \d t$ (Step II, Proposition \ref{prop4.1}) by taking the difference of Yosida approximated CBF equations (see \eqref{3.29} below) at $t+h$ and $t$ for $h>0$ and $t\in[0,T]$ and then using the monotonicity of $\Phi_\lambda(\cdot)$. Due to the lack of Gateaux derivative of $\Phi_{\lambda}(\boldsymbol{y}(\cdot))$, one cannot differentiate the equation \eqref{3.29} and get the required estimates by taking inner product with $\frac{\d\boldsymbol{y}_\lambda(\cdot)}{\d t}$ in the resulting equation. This kind of difficulty is not appearing in the case of NS equations. Flow invraince preserving feedback controllers for 2D as well 3D NS equations with normal cone as potential were considered in \cite{VBSS}. The results obtained in the work \cite{VBSS} were global for $d=2$ and local for $d=3$. But the presence of the damping term $|\boldsymbol{y}|^{r-1}\boldsymbol{y}$ helps us to obtain global results in 3D as well for supercritical CBF equations. The author in \cite{TiOp2} discussed the time optimal control problem for 2D CBF equations with $r\in[1,3]$ by using a $\mathbb{V}$-quantization and $m$-accretivity of the nonlinear operators. Hypothesis \ref{hyp1} and the results in Theorems \ref{thm1.1}-\ref{thm1.2} help us to study the time optimal control problem of CBF equations for $d=2,3$ with $r>3$ also. Moreover, the author in \cite{AIL2} examined the feedback stabilization of 2D and 3D NS equations preserving the invariance of a given convex set by deducing the existence of weak solutions (uniqueness only in 2D) for the NS system perturbed by a subdifferential. Whereas, for the CBF equations \eqref{1p4}, one can address similar problems for $d=2,3$ with $r>3$ by establishing uniqueness results also. \subsection{Outline of the paper} The rest of the paper is organized as follows: The next section is devoted for the functional settings, definition and properties of linear, bilinear and nonlinear operators. Proof of Theorem \ref{thm1.1} for the case $r\in[3,\infty)$ ($2\beta\mu\geq 1$ for $r=3$) is provided in Section \ref{sec3}. In order to do this, we apply the abstract theory of $m$-accretive operators available in \cite{VB1,VB2}, etc., in Propositions \ref{prop33} and \ref{prop3.3}. We prove the $m$-accretivity of the operator $\mathcal{F}(\cdot)=\mu\mathrm{A}+\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\kappa\mathrm{I}$ for some $\kappa>0$ in Proposition \ref{prop33} by showing the monotonicity, demicontinuity and coercivity of operator $\mathcal{F}(\cdot)$. Furthermore, in Proposition \ref{prop3.3}, we establish the maximal monotonicity of the multivalued operator $\mathfrak{A}(\cdot),$ where $\mathfrak{A}(\cdot):=\mu\mathrm{A}+\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\Phi(\cdot)+\kappa\mathrm{I}$, by showing the range condition $\mathrm{R}(\mathrm{I}+\mathfrak{A})=\mathbb{H}$. The primary tool in establishing the range condition is the well-posedness of a Yosida approximated problem (see \eqref{Y2} below for $\boldsymbol{y}_{\lambda}$). Then we establish the necessary stationary energy estimates and obtain uniform bounds of the sequence $\{\boldsymbol{y}_{\lambda}\}_{\lambda>0}$ (see Step II). By passing to limit and applying the abstract theory for maximal monotone operators (cf. \cite{VB1,VB2}, etc.), we finally deduce the $m$-accretivity of the operator $\mathfrak{A}(\cdot)$ (see Step III). A result similar to Theorem \ref{thm1.1} for the Yosida approximated problem \eqref{3.29} is established in Proposition \ref{prop3.5}. We first derive necessary higher order energy estimates to prove Theorem \ref{thm1.2} in Section \ref{sec44} (see Proposition \ref{prop4.1}). Then we prove some convergence results using the Banach-Alaoaglu theorem and Aubin-Lions compactness lemma (see Proposition \ref{soln}). Lastly, we conclude the proof of Theorem \ref{thm1.2} by using Proposition \ref{prop3.5}, and the uniqueness result is provided in Proposition \ref{unique}. In Section \ref{sec5}, we discuss three applications of Theorems \ref{thm1.1} and \ref{thm1.2}, namely, flow invariance feedback controllers, time optimal control problem and feedback stabilization. A brief sketch of proofs of Theorems \ref{thm1.1} and \ref{thm1.2} is provided for the case $r\in[1,3]$ in Appendix \ref{Appen.} by using a quantization of the NS nonlinearity $(\boldsymbol{y}\cdot\nabla)\boldsymbol{y}$ and the abstract theory of $m$-accretive operators. \section{Functional settings and Preliminaries}\label{sec2}\setcounter{equation}{0} In this section, we provide the necessary functional setting needed to obtain the results of this work. We consider the problem \eqref{1} on a $d$-dimensional torus $\mathbb{T}^{d}=\big(\mathbb{R}/\mathrm{L}\mathbb{Z}\big)^{d}$ $(d=2,3)$, with periodic boundary conditions and zero-mean value constraint for the functions, that is, $\int_{\mathbb{T}^{d}}^{}\boldsymbol{y}(x) \d x =0.$ \subsection{Function spaces} Let \ $\dot{\mathrm{C}}_p^{\infty}(\mathbb{T}^d;\mathbb{R}^d)$ denote the space of all infinitely differentiable functions ($\mathbb{R}^d$-valued) such that $\int_{\mathbb{T}^d}\boldsymbol{y}(x)\d x=0$ and satisfy periodic boundary conditions \eqref{2}. The Sobolev space $\dot{\mathbb{H}}_p^k(\mathbb{T}^d):=\dot{\mathrm{H}}_p^k(\mathbb{T}^d;\mathbb{R}^d)$ is the completion of $\dot{\mathrm{C}}_p^{\infty}(\mathbb{T}^d;\mathbb{R}^d)$ with respect to the $\mathbb{H}^s$ norm $$\|\boldsymbol{y}\|_{\dot{\mathbb{H}}^s_p}:=\left(\sum_{0\leq|\alpha|\leq s}\|\mathrm{D}^{\alpha}\boldsymbol{y}\|_{\mathbb{L}^2(\mathbb{T}^d)}^2\right)^{1/2}.$$ The Sobolev space of periodic functions with zero mean $\dot{\mathbb{H}}_p^k(\mathbb{T}^d)$ is the same as \cite[Proposition 5.39]{JCR} $$\left\{\boldsymbol{y}:\boldsymbol{y}=\sum_{\boldsymbol{k}\in\mathbb{Z}^d}\boldsymbol{y}_{\boldsymbol{k}} e^{2\pi i \boldsymbol{k}\cdot\boldsymbol{x} / \mathrm{L}},\boldsymbol{y}_0=\mathbf{0},\ \bar{\boldsymbol{y}}_{\boldsymbol{k}}=\boldsymbol{y}_{-\boldsymbol{k}},\ \|\boldsymbol{y}\|_{\dot{\mathbb{H}}^s_f}:=\sum_{k\in\mathbb{Z}^d}|\boldsymbol{k}|^{2s}|\boldsymbol{y}_{\boldsymbol{k}}|^2<\infty\right\}.$$ From \cite[Proposition 5.38]{JCR}, we infer that the norms $\|\cdot\|_{\dot{\mathbb{H}}^s_p}$ and $\|\cdot\|_{\dot{\mathbb{H}}^s_f}$ are equivalent. Let us define \begin{align*} \mathcal{V}&:=\{\boldsymbol{y}\in\dot{\mathrm{C}}_p^{\infty}(\mathbb{T}^d;\mathbb{R}^d):\nabla\cdot\boldsymbol{y}=0\}. \end{align*} The spaces $\mathbb{H}$ and $\widetilde{\mathbb{L}}^{p}$ are the closure of $\mathcal{V}$ in the Lebesgue spaces $\mathrm{L}^2(\mathbb{T}^d;\mathbb{R}^d)$ and $\mathrm{L}^p(\mathbb{T}^d;\mathbb{R}^d)$ for $p\in(2,\infty)$, respectively. The space $\mathbb{V}$ is the closure of $\mathcal{V}$ in the Sobolev space $\mathrm{H}^1(\mathbb{T}^d;\mathbb{R}^d)$. The zero mean condition provides the well-known \textsl{Poincar\'{e} inequality}, \begin{align}\label{poin} \lambda_1\|\boldsymbol{y}\|_{\mathbb{H}}^2\leq\|\boldsymbol{y}\|^2_{\mathbb{V}}, \end{align} where $\lambda_1=\frac{4\pi^2}{\mathrm{L}^2}$ (\cite[Lemma 5.40]{JCR}). Then, we characterize the spaces $\mathbb{H}$, $\widetilde{\mathbb{L}}^p$ and $\mathbb{V}$ with the norms $$\|\boldsymbol{y}\|_{\mathbb{H}}^2:=\int_{\mathbb{T}^d}|\boldsymbol{y}(x)|^2\d x,\quad \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^p}^p=\int_{\mathbb{T}^d}|\boldsymbol{y}(x)|^p\d x\ \text{ and }\ \|\boldsymbol{y}\|_{\mathbb{V}}^2:=\int_{\mathbb{T}^d}|\nabla\boldsymbol{y}(x)|^2\d x,$$ respectively. Let $(\cdot,\cdot)$ denote the inner product in the Hilbert space $\mathbb{H}$ and $\langle \cdot,\cdot\rangle $ represent the induced duality between the spaces $\mathbb{V}$ and its dual $\mathbb{V}'$ as well as $\widetilde{\mathbb{L}}^p$ and its dual $\widetilde{\mathbb{L}}^{p'}$, where $\frac{1}{p}+\frac{1}{p'}=1$. Note that $\mathbb{H}$ can be identified with its own dual $\mathbb{H}'$. The sum space $\mathbb{V}'+\widetilde{\mathbb{L}}^{p'}$ is well defined (see \cite[Subsection 2.1]{FKS}). Furthermore, we have \begin{align*} (\mathbb{V}'+\widetilde{\mathbb{L}}^{p'})'= \mathbb{V}\cap\widetilde{\mathbb{L}}^p \ \text{and} \ (\mathbb{V}\cap\widetilde{\mathbb{L}}^p)'=\mathbb{V}'+\widetilde{\mathbb{L}}^{p'}, \end{align*} where $\|\boldsymbol{y}\|_{\mathbb{V}\cap\widetilde\mathbb{L}^{p}}=\max\{\|\boldsymbol{y}\|_{\mathbb{V}},\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^p}\},$ which is equivalent to the norms $\|\boldsymbol{y}\|_{\mathbb{V}}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{p}}$ and $\sqrt{\|\boldsymbol{y}\|_{\mathbb{V}}^2+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{p}}^2}$, and \begin{align*} \|\boldsymbol{y}\|_{\mathbb{V}'+\widetilde{\mathbb{L}}^{p'}}&=\inf\{\|\boldsymbol{y}_1\|_{\mathbb{V}'}+\|\boldsymbol{y}_2\|_{\widetilde\mathbb{L}^{p'}}:\boldsymbol{y}=\boldsymbol{y}_1+\boldsymbol{y}_2, \boldsymbol{y}_1\in\mathbb{V}' \ \text{and} \ \boldsymbol{y}_2\in\widetilde\mathbb{L}^{p'}\}\nonumber\\&= \sup\left\{\frac{|\langle\boldsymbol{y}_1+\boldsymbol{y}_2,\boldsymbol{f}\rangle|}{\|\boldsymbol{f}\|_{\mathbb{V}\cap\widetilde{\mathbb{L}}^p}}:\boldsymbol{0}\neq\boldsymbol{f}\in\mathbb{V}\cap\widetilde{\mathbb{L}}^p\right\}. \end{align*} Note that $\mathbb{V}\cap\widetilde{\mathbb{L}}^p$ and $\mathbb{V}'+\widetilde{\mathbb{L}}^{p'}$ are Banach spaces. Moreover, we have the continuous embedding $\mathbb{V}\cap\widetilde{\mathbb{L}}^p\hookrightarrow\mathbb{V}\hookrightarrow\mathbb{H}\hookrightarrow\mathbb{V}'\hookrightarrow\mathbb{V}'+\widetilde{\mathbb{L}}^{p'}$. \subsection{Linear operator} Let $\mathcal{P}_p: \mathbb{L}^p(\mathbb{T}^d) \to\widetilde\mathbb{L}^p,$ $p\in[1,\infty)$ be the Helmholtz-Hodge (or Leray) projection (cf. \cite{JBPCK,DFHM}, etc.). Note that $\mathcal{P}_p$ is a bounded linear operator and for $p=2$, $\mathcal{P}:=\mathcal{P}_2$ is an orthogonal projection (\cite[Section 2.1]{JCR4}). We define the Stokes operator \begin{equation*} \mathrm{A}\boldsymbol{y}:=-\mathcal{P}\Delta\boldsymbol{y},\;\boldsymbol{y}\in\mathrm{D}(\mathrm{A}):=\mathbb{V}\cap\dot{\mathbb{H}}^{2}_p(\mathbb{T}^d). \end{equation*} Note that $\mathrm{D}(\mathrm{A})$ can also be written as $\mathrm{D}(\mathrm{A})=\big\{\boldsymbol{y}\in\dot{\mathbb{H}}^{2}_p(\mathbb{T}^d):\nabla\cdot\boldsymbol{y}=0\big\}$. It should be noted that $\mathcal{P}$ and $\Delta$ commutes in a {torus} (\cite[Lemma 2.9]{JCR4}). \begin{remark} Note that for $d\leq4$, by Sobolev's inequality, one has $\mathrm{D}(\mathrm{A})\subset\mathbb{H}^2\subset\mathbb{L}^p$, for all $p\in[1,\infty)$. \end{remark} \iffalse For the Fourier expansion $\boldsymbol{y}=\sum\limits_{\boldsymbol{k}\in\mathbb{Z}^n} e^{2\pi i \boldsymbol{k}\cdot\boldsymbol{x} / \mathrm{L}}\boldsymbol{y}_{\boldsymbol{k}},$ one obtains $$-\Delta\boldsymbol{y}=\frac{4\pi^2}{\mathrm{L}^2}\sum_{\boldsymbol{k}\in\mathbb{Z}^n} e^{2\pi i \boldsymbol{k}\cdot\boldsymbol{x} / \mathrm{L}}|\boldsymbol{k}|^2\boldsymbol{y}_{\boldsymbol{k}}.$$ It is easy to observe that $\mathrm{D}(\mathrm{A}^{s/2})=\big\{\boldsymbol{y}\in \dot{\mathbb{H}}^{s}_p(\mathbb{T}^d):\nabla\cdot\boldsymbol{y}=0\big\}$ and $\|\mathrm{A}^{s/2}\boldsymbol{y}\|_{\mathbb{H}}=C\|\boldsymbol{y}\|_{\dot{\mathbb{H}}^{s}_p},$ for all $\boldsymbol{y}\in\mathrm{D}(\mathrm{A}^{s/2})$, $s\geq 0$ (see \cite{JCR}). Note that the operator $\mathrm{A}$ is a non-negative self-adjoint operator in $\mathbb{H}$ with a compact resolvent and \begin{align}\label{2.7a}\langle \mathrm{A}\boldsymbol{y},\boldsymbol{y}\rangle =\|\boldsymbol{y}\|_{\mathbb{V}}^2,\ \textrm{ for all }\ \boldsymbol{y}\in\mathbb{V}, \ \text{ so that }\ \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{V}'}\leq \|\boldsymbol{y}\|_{\mathbb{V}}.\end{align} Since $\mathrm{A}^{-1}$ is a compact self-adjoint operator in $\mathbb{H}$, we obtain a complete family of orthonormal eigenfunctions $\{w_i\}_{i=1}^{\infty}\subset\dot{\mathrm{C}}_p^{\infty}(\mathbb{T}^d;\mathbb{R}^d)$ such that $\mathrm{A} w_i=\lambda_i w_i$, for $i=1,2,\ldots,$ and $0<\lambda_1\leq \lambda_2\leq \ldots\to\infty$ are the eigenvalues of $\mathrm{A}$. Note that $\lambda_1=\frac{4\pi^2}{\mathrm{L}^2}$ is the smallest eigenvalue of $\mathrm{A}$ appearing in the Poincar\'e inequality \eqref{poin}. We also deduce that \begin{align}\label{poin_1} \|\mathrm{A}\boldsymbol{y}\|^2_{\mathbb{H}}=(\mathrm{A}\boldsymbol{y}, \mathrm{A}\boldsymbol{y})&=\sum_{k=1}^{\infty}\lambda_k^2|( \boldsymbol{y},w_k)|^2\geq\lambda_1\sum_{k=1}^{\infty}\lambda_k|(\boldsymbol{y},w_k)|^2 =\lambda_1\|\nabla\boldsymbol{y}\|_{\mathbb{H}}^2, \end{align} for all $\boldsymbol{y}\in\mathrm{D}(\mathrm{A})$. \fi \subsection{Bilinear operator} Let us define the \textsl{trilinear form} $b(\cdot,\cdot,\cdot):\mathbb{V}\times\mathbb{V}\times\mathbb{V}\to\mathbb{R}$ by $$b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w})=\int_{\mathbb{T}^d}(\boldsymbol{y}(x)\cdot\nabla)\boldsymbol{z}(x)\cdot\boldsymbol{w}(x)\d x=\sum_{i,j=1}^d\int_{\mathbb{T}^d}\boldsymbol{y}_i(x)\frac{\partial \boldsymbol{z}_j(x)}{\partial x_i}\boldsymbol{w}_j(x)\d x.$$ If $\boldsymbol{y}, \boldsymbol{z}$ are such that the linear map $b(\boldsymbol{y}, \boldsymbol{z}, \cdot) $ is continuous on $\mathbb{V}$, the corresponding element of $\mathbb{V}'$ is denoted by $\mathcal{B}(\boldsymbol{y}, \boldsymbol{z})$. We also denote $\mathcal{B}(\boldsymbol{y}) = \mathcal{B}(\boldsymbol{y}, \boldsymbol{y})=\mathcal{P}[(\boldsymbol{y}\cdot\nabla)\boldsymbol{y}]$. An integration by parts yields \begin{equation}\label{b0} \left\{ \begin{aligned} b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w}) &= -b(\boldsymbol{y},\boldsymbol{w},\boldsymbol{z}),\ \text{ for all }\ \boldsymbol{y},\boldsymbol{z},\boldsymbol{w}\in \boldsymbol{z},\\ b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{z}) &= 0,\ \text{ for all }\ \boldsymbol{y},\boldsymbol{z} \in\boldsymbol{z}. \end{aligned} \right.\end{equation} \iffalse For $d=2,3$ and $r\in[3,\infty)$, one can estimate $| b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w})|$ using H\"older's and interpolation inequalities as \begin{align}\label{25} | b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w})|\leq \|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}\|\boldsymbol{z}\|_{\mathbb{V}}\|\boldsymbol{w}\|_{\widetilde\mathbb{L}^{\frac{2(r+1)}{r-1}}}\leq \|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}\|\boldsymbol{z}\|_{\mathbb{V}}\|\boldsymbol{w}\|_{\widetilde\mathbb{L}^{r+1}}^{\frac{2}{r-1}}\|\boldsymbol{w}\|_{\mathbb{H}}^{\frac{r-3}{r-1}}, \end{align} for all $\boldsymbol{y},\boldsymbol{w}\in\widetilde\mathbb{L}^{r+1}$ and $\boldsymbol{z}\in\mathbb{V}$. \fi \begin{remark} We need the following estimates on the trilinear form $b(\cdot,\cdot,\cdot)$ in the sequel (see \cite[Chapter 2, Section 2.3]{Te1}): \begin{itemize} \item [(i)] For $d=2$, \begin{align}\label{b2} |b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w})|&\leq C\times\begin{cases} \|\boldsymbol{y}\|^{1/2}_{\mathbb{H}}\|\boldsymbol{y}\|^{1/2}_{\mathbb{V}}\|\boldsymbol{z}\|_{\mathbb{V}}\|\boldsymbol{w}\|^{1/2}_{\mathbb{H}}\|\boldsymbol{w}\|^{1/2}_{\mathbb{V}}, &\text{for all }\ \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{w}\in \mathbb{V},\\ \|\boldsymbol{y}\|^{1/2}_{\mathbb{H}}\|\boldsymbol{y}\|^{1/2}_{\mathbb{V}}\|\boldsymbol{z}\|^{1/2}_{\mathbb{V}}\|\mathrm{A}\boldsymbol{z}\|^{1/2}_{\mathbb{H}}\|\boldsymbol{w}\|_{\mathbb{H}}, &\text{for all }\ \boldsymbol{y}\in \mathbb{V}, \boldsymbol{z}\in \mathrm{D}(\mathrm{A}), \boldsymbol{w}\in \mathbb{H}. \end{cases} \end{align} \item[(ii)] For $d=3$, \begin{align}\label{b4} |b(\boldsymbol{y},\boldsymbol{z},\boldsymbol{w})|&\leq C\times\begin{cases} \|\boldsymbol{y}\|^{1/4}_{\mathbb{H}}\|\boldsymbol{y}\|^{3/4}_{\mathbb{V}}\|\boldsymbol{z}\|_{\mathbb{V}}\|\boldsymbol{w}\|^{1/4}_{\mathbb{H}}\|\boldsymbol{w}\|^{3/4}_{\mathbb{V}}, &\text{for all }\ \boldsymbol{y}, \boldsymbol{z}, \boldsymbol{w}\in \mathbb{V},\\ \|\boldsymbol{y}\|_{\mathbb{V}}\|\boldsymbol{z}\|_{\mathbb{V}}^{1/2}\|\mathrm{A}\boldsymbol{z}\|_{\mathbb{H}}^{1/2}\|\boldsymbol{w}\|_{\mathbb{H}}, &\text{for all }\ \boldsymbol{y}\in\mathbb{V}, \boldsymbol{z}\in\mathrm{D}(\mathrm{A}), \boldsymbol{w}\in\mathbb{H}. \end{cases} \end{align} \end{itemize} \end{remark} \subsection{Nonlinear operator} Let us now consider the operator $\mathcal{C}(\boldsymbol{y}):=\mathcal{P}(|\boldsymbol{y}|^{r-1}\boldsymbol{y})$. It is immediate that $\langle\mathcal{C}(\boldsymbol{y}),\boldsymbol{y}\rangle =\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}^{r+1}$ and the map $\mathcal{C}(\cdot):\widetilde{\mathbb{L}}^{r+1}\to\widetilde{\mathbb{L}}^{\frac{r+1}{r}}$ is Gateaux differentiable with Gateaux derivative \begin{align}\label{29} \mathcal{C}'(\boldsymbol{y})\boldsymbol{z}&=\left\{\begin{array}{cl}\mathcal{P}(\boldsymbol{z}),&\text{ for }r=1,\\ \left\{\begin{array}{cc}\mathcal{P}(|\boldsymbol{y}|^{r-1}\boldsymbol{z})+(r-1)\mathcal{P}\left(\frac{\boldsymbol{y}}{|\boldsymbol{y}|^{3-r}}(\boldsymbol{y}\cdot\boldsymbol{z})\right),&\text{ if }\boldsymbol{y}\neq \mathbf{0},\\\mathbf{0},&\text{ if }\boldsymbol{y}=\mathbf{0},\end{array}\right.&\text{ for } 1<r<3,\\ \mathcal{P}(|\boldsymbol{y}|^{r-1}\boldsymbol{z})+(r-1)\mathcal{P}(\boldsymbol{y}|\boldsymbol{y}|^{r-3}(\boldsymbol{y}\cdot\boldsymbol{z})), &\text{ for }r\geq 3,\end{array}\right. \end{align} for all $\boldsymbol{y},\boldsymbol{z}\in\widetilde{\mathbb{L}}^{r+1}$. \iffalse Using Taylor's formula (Theorem 7.9.1, \cite{PGC}), we have \begin{align}\label{213} \langle \mathcal{P}(|\boldsymbol{y}|^{r-1}\boldsymbol{y})-\mathcal{P}(|\boldsymbol{z}|^{r-1}\boldsymbol{z}),\boldsymbol{w}\rangle&\leq\sup_{0<\theta<1} r\|\theta\boldsymbol{y}+(1-\theta)\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}^{r-1}\|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}\|\boldsymbol{w}\|_{\widetilde{\mathbb{L}}^{r+1}}\nonumber\\&\leq r\left(\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}+\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}\right)^{r-1}\|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}\|\boldsymbol{w}\|_{\widetilde{\mathbb{L}}^{r+1}}, \end{align} for all $\boldsymbol{y},\boldsymbol{z},\boldsymbol{w}\in\widetilde{\mathbb{L}}^{r+1}$. Moreover, for any $r\in[1,\infty)$, we have \begin{align}\label{2pp11} &\langle \mathcal{P}(\boldsymbol{y}|\boldsymbol{y}|^{r-1})-\mathcal{P}(\boldsymbol{z}|\boldsymbol{z}|^{r-1}),\boldsymbol{y}-\boldsymbol{z}\rangle\nonumber\\&=\int_{\mathbb{T}^d}\left(\boldsymbol{y}(x)|\boldsymbol{y}(x)|^{r-1}-\boldsymbol{z}(x)|\boldsymbol{z}(x)|^{r-1}\right)\cdot(\boldsymbol{y}(x)-\boldsymbol{z}(x))\d x\nonumber\\&=\int_{\mathbb{T}^d}\left(|\boldsymbol{y}(x)|^{r+1}-|\boldsymbol{y}(x)|^{r-1}\boldsymbol{y}(x)\cdot\boldsymbol{z}(x)-|\boldsymbol{z}(x)|^{r-1}\boldsymbol{y}(x)\cdot\boldsymbol{z}(x)+|\boldsymbol{z}(x)|^{r+1}\right)\d x\nonumber\\&\geq\int_{\mathbb{T}^d}\left(|\boldsymbol{y}(x)|^{r+1}-|\boldsymbol{y}(x)|^{r}|\boldsymbol{z}(x)|-|\boldsymbol{z}(x)|^{r}|\boldsymbol{y}(x)|+|\boldsymbol{z}(x)|^{r+1}\right)\d x\nonumber\\&=\int_{\mathbb{T}^d}\left(|\boldsymbol{y}(x)|^r-|\boldsymbol{z}(x)|^r\right)(|\boldsymbol{y}(x)|-|\boldsymbol{z}(x)|)\d x\geq 0. \end{align} Furthermore, we find \begin{align}\label{224} &\langle\mathcal{P}(\boldsymbol{y}|\boldsymbol{y}|^{r-1})-\mathcal{P}(\boldsymbol{z}|\boldsymbol{z}|^{r-1}),\boldsymbol{y}-\boldsymbol{z}\rangle\nonumber\\&=\langle|\boldsymbol{y}|^{r-1},|\boldsymbol{y}-\boldsymbol{z}|^2\rangle+\langle|\boldsymbol{z}|^{r-1},|\boldsymbol{y}-\boldsymbol{z}|^2\rangle+\langle\boldsymbol{z}|\boldsymbol{y}|^{r-1}-\boldsymbol{y}|\boldsymbol{z}|^{r-1},\boldsymbol{y}-\boldsymbol{z}\rangle\nonumber\\&=\||\boldsymbol{y}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2\nonumber\\&\quad+\langle\boldsymbol{y}\cdot\boldsymbol{z},|\boldsymbol{y}|^{r-1}+|\boldsymbol{z}|^{r-1}\rangle-\langle|\boldsymbol{y}|^2,|\boldsymbol{z}|^{r-1}\rangle-\langle|\boldsymbol{z}|^2,|\boldsymbol{y}|^{r-1}\rangle. \end{align} But, we know that \begin{align*} &\langle\boldsymbol{y}\cdot\boldsymbol{z},|\boldsymbol{y}|^{r-1}+|\boldsymbol{z}|^{r-1}\rangle-\langle|\boldsymbol{y}|^2,|\boldsymbol{z}|^{r-1}\rangle-\langle|\boldsymbol{z}|^2,|\boldsymbol{y}|^{r-1}\rangle\nonumber\\&=-\frac{1}{2}\||\boldsymbol{y}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2-\frac{1}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\frac{1}{2}\langle\left(|\boldsymbol{y}|^{r-1}-|\boldsymbol{z}|^{r-1}\right),\left(|\boldsymbol{y}|^2-|\boldsymbol{z}|^2\right)\rangle \nonumber\\&\geq -\frac{1}{2}\||\boldsymbol{y}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2-\frac{1}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2. \end{align*} \fi From \cite[Subsection 2.4]{MT2}, we have \begin{align}\label{2.23} \langle\mathcal{C}(\boldsymbol{y})-\mathcal{C}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle&\geq \frac{1}{2}\||\boldsymbol{y}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\frac{1}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2\nonumber\\&\geq \frac{1}{2^{r-1}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\geq 0, \end{align} for $r\geq 1$. \begin{remark}\label{e.2222} In periodic domain (cf. \cite[Subsection 3.5]{MT2}), we have \begin{align}\label{P.11} \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{3(r+1)}}^{r+1}\leq C\int_{\mathbb{T}^d}|\nabla \boldsymbol{y}(x)|^2|\boldsymbol{y}(x)|^{r-1}\d x, \end{align} for $d=3$ and $r\geq 1$. Also from \cite[Lemma 2.2]{LSM}, we obtain \begin{align}\label{P.22} \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{p(r+1)}}^{r+1}=\||\boldsymbol{y}|^{\frac{r+1}{2}}\|_{\widetilde\mathbb{L}^{2p}(\mathbb{T}^d)}^{2}\leq C \int_ {\mathbb{T}^d}|\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|^{2}\d xC\int_{\mathbb{T}^d}|\nabla \boldsymbol{y}(x)|^2|\boldsymbol{y}(x)|^{r-1}\d x, \end{align} for $d=2$ and for all $p\in[2,\infty).$ \iffalse From Lemma 2.2 of \cite{LSM}, we infer that $$|\nabla|\boldsymbol{y}|^\frac{r+1}{2}|^2\leq\left(\frac{r+1}{2}\right) |\boldsymbol{y}|^{r-1}|\nabla\boldsymbol{y}|^2.$$ Therefore we further have \begin{align*} \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{p(r+1)}}^{r+1}\leq C\int_{\mathbb{T}^d}|\nabla \boldsymbol{y}(x)|^2|\boldsymbol{y}(x)|^{r-1}\d x, \end{align*} for all $p\in[2,\infty).$ \fi \end{remark} \section{Proof of Theorem \ref{thm1.1}}\label{sec3} We prove Theorem \ref{thm1.1} in this section for the case $r\in[3,\infty)$ ($2\beta\mu\geq 1$ for $r=3$) by using the abstract theory available in the works \cite{VB1,VB2}, etc. \begin{proposition}\label{prop33} For $d=2,3$ with $r>3$, define the operator $\mathcal{G}(\cdot):\mathrm{D}(\mathcal{G})\to\mathbb{H}$ by \begin{align*} \mathcal{G}(\cdot)=\mu\mathrm{A}+\mathrm{B}(\cdot)+\beta\mathcal{C}(\cdot), \end{align*} where $\mathrm{D}(\mathcal{G})=\{\boldsymbol{y}\in\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}:\mathrm{A}\boldsymbol{y}\in\mathbb{H}\}.$ Then $\mathcal{G}+\kappa\mathrm{I}$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}$ for some $\kappa\geq\varrho,$ where \begin{align} \label{215}\varrho=\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}}. \end{align} \end{proposition} \begin{proof} We shall first show that $\mathcal{G}+\kappa\mathrm{I}$ is a monotone operator for $\kappa\geq\varrho>0$. Then we will show that $\mathcal{G}+\kappa\mathrm{I}$ is coercive and demicontinuous, which imply the $m$-accretivity of the operator $\mathcal{G}+\kappa\mathrm{I}$. The proof is divided into following steps: \vskip 2mm \noindent \textbf{Step I:} \textsl{$\mathcal{G}+\kappa\mathrm{I}$ is monotone for some $\kappa>0$.} We estimate $ \langle\mathrm{A}\boldsymbol{y}-\mathrm{A}\boldsymbol{z},\boldsymbol{y}-\boldsymbol{z}\rangle $ by using an integration by parts as \begin{align}\label{ae} \langle\mathrm{A}\boldsymbol{y}-\mathrm{A}\boldsymbol{z},\boldsymbol{y}-\boldsymbol{z}\rangle =\|\boldsymbol{y}-\boldsymbol{z}\|^2_{\mathbb{V}}. \end{align} Note that $\langle\mathcal{B}(\boldsymbol{y},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle=0$ which implies along with H\"older's and Young's inequalities that \begin{align}\label{2..28} |\langle \mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle| &=|\langle\mathcal{B}(\boldsymbol{y}-\boldsymbol{z},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z}\rangle|\leq \frac{\mu }{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2+\frac{1}{2\mu }\|\boldsymbol{z}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2. \end{align} We take the term $\|\boldsymbol{z}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2$ from \eqref{2..28} and use H\"older's and Young's inequalities to estimate it as (see \cite{KWH} also) \begin{align}\label{2..29} \int_{\mathbb{T}^d}|\boldsymbol{z}(x)|^2|\boldsymbol{y}(x)-\boldsymbol{z}(x)|^2\d x&=\int_{\mathbb{T}^d}|\boldsymbol{z}(x)|^2|\boldsymbol{y}(x)-\boldsymbol{z}(x)|^{\frac{4}{r-1}}|\boldsymbol{y}(x)-\boldsymbol{z}(x)|^{\frac{2(r-3)}{r-1}}\d x\nonumber\\&\leq\left(\int_{\mathbb{T}^d}|\boldsymbol{z}(x)|^{r-1}|\boldsymbol{y}(x)-\boldsymbol{z}(x)|^2\d x\right)^{\frac{2}{r-1}}\left(\int_{\mathbb{T}^d}|\boldsymbol{y}(x)-\boldsymbol{z}(x)|^2\d x\right)^{\frac{r-3}{r-1}}\nonumber\\&\leq{\beta\mu }\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\frac{r-3}{r-1}\left[\frac{2}{\beta\mu (r-1)}\right]^{\frac{2}{r-3}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^2, \end{align} for $r>3$. Using \eqref{2..29} in \eqref{2..28}, we find \begin{align}\label{2.30} &|\langle\mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle|\nonumber\\&\leq\frac{\mu }{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2+\frac{\beta}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\frac{r-3}{2\mu(r-1)}\left[\frac{2}{\beta\mu (r-1)}\right]^{\frac{2}{r-3}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^2. \end{align} From \eqref{2.23}, we easily have \begin{align}\label{2.27} \beta \langle\mathcal{C}(\boldsymbol{y})-\mathcal{C}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle \geq \frac{\beta}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2. \end{align} \iffalse Also from \eqref{2..28}, we have \begin{align} &|\langle\mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle|\nonumber\\&\leq\frac{\mu }{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2+\frac{\beta}{2}\||\boldsymbol{z}|^{\frac{r-1}{2}}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2+\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^2. \end{align} \fi Combining \eqref{ae} and \eqref{2.30}-\eqref{2.27}, we conclude that \begin{align} \langle(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{y})-(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle&\geq\frac{\mu }{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2+(\kappa-\varrho)\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^2\geq\frac{\mu }{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2, \end{align} for $\kappa\geq\varrho$ and $r>3$. Thus $\mathcal{G}+\kappa\mathrm{I}$ is monotone. \vskip 2mm \noindent \textbf{Step II:} \textsl{$\mathcal{G}+\kappa\mathrm{I}$ is demicontinuous.} Let us take a sequence $\boldsymbol{y}^n\to \boldsymbol{y}$ in $\mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1},$ so that $\|\boldsymbol{y}^n-\boldsymbol{y}\|_{\mathbb{V}}+\|\boldsymbol{y}^n-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}\to 0$ as $n\to\infty$. For any $\boldsymbol{z}\in\mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1}$, we consider \begin{align}\label{214} &\langle(\mathcal{F}+\kappa\mathrm{I})(\boldsymbol{y}^n)-(\mathcal{F}+\kappa\mathrm{I})(\boldsymbol{y}),\boldsymbol{z}\rangle\nonumber\\ &=\mu \langle \mathrm{A}(\boldsymbol{y}^n)-\mathrm{A}(\boldsymbol{y}),\boldsymbol{z}\rangle+\langle\mathrm{B}(\boldsymbol{y}^n)-\mathcal{B}(\boldsymbol{y}),\boldsymbol{z}\rangle-\beta\langle \mathcal{C}(\boldsymbol{y}^n)-\mathcal{C}(\boldsymbol{y}),\boldsymbol{z}\rangle+\kappa\langle\boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{z}\rangle. \end{align} Note that \begin{align*} & |\mu\langle \mathrm{A}(\boldsymbol{y}_{n}-\boldsymbol{y}),\boldsymbol{z}\rangle+\kappa\langle \boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{z}\rangle|\leq\mu\|\boldsymbol{y}_n-\boldsymbol{y}\|_{\mathbb{V}}\|\boldsymbol{z}\|_{\mathbb{V}}+\kappa\|\boldsymbol{y}_n-\boldsymbol{y}\|_{\mathbb{H}}\|\boldsymbol{z}\|_{\mathbb{H}}\to 0\ \text{ as }\ n\to\infty, \end{align*} since $\boldsymbol{y}^n\to \boldsymbol{y}$ strongly in $\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}$. We estimate the term $ |\langle\mathrm{B}(\boldsymbol{y}^n)-\mathcal{B}(\boldsymbol{y}),\boldsymbol{z}\rangle| $ by using the H\"older's and interpolation inequalities \begin{align*} |\langle\mathrm{B}(\boldsymbol{y}^n)-\mathrm{B}(\boldsymbol{y}),\boldsymbol{z}\rangle|&=|\langle\mathrm{B}(\boldsymbol{y}^n,\boldsymbol{y}^n-\boldsymbol{y}),\boldsymbol{z}\rangle+\langle\mathrm{B}(\boldsymbol{y}^n-\boldsymbol{y},\boldsymbol{y}),\boldsymbol{z}\rangle|\nonumber\\& \leq|\langle\mathrm{B}(\boldsymbol{y}^n,\boldsymbol{z}),\boldsymbol{y}^n-\boldsymbol{y}\rangle|+|\langle\mathrm{B}(\boldsymbol{y}^n-\boldsymbol{y},\boldsymbol{z}),\boldsymbol{y}\rangle|\nonumber\\&\leq\left(\|\boldsymbol{y}^n\|_{\widetilde{\mathbb{L}}^{\frac{2(r+1)}{r-1}}}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{\frac{2(r+1)}{r-1}}}\right)\|\boldsymbol{y}^n-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq \left(\|\boldsymbol{y}^n\|_{\mathbb{H}}^{\frac{r-3}{r-1}}\|\boldsymbol{y}^n\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{2}{r-1}}+\|\boldsymbol{y}\|_{\mathbb{H}}^{\frac{r-3}{r-1}}\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{2}{r-1}}\right)\|\boldsymbol{y}^n-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\& \to 0, \ \text{ as } \ n\to\infty, \end{align*} since $\boldsymbol{y}^n\to\boldsymbol{y}$ strongly in $\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}$ and $\boldsymbol{y}^n,\boldsymbol{y}\in\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}$. We estimate the term $|\langle \mathcal{C}(\boldsymbol{y}^n)-\mathcal{C}(\boldsymbol{y}),\boldsymbol{z}\rangle|$ using the Taylor's formula (\cite[Theorem 7.9.1]{PGC}) as \begin{align*} |\langle \mathcal{C}(\boldsymbol{y}^n)-\mathcal{C}(\boldsymbol{y}),\boldsymbol{z}\rangle|&\leq \sup_{0<\theta<1} r\|(\boldsymbol{y}^n-\boldsymbol{y})|\theta\boldsymbol{y}^n+(1-\theta)\boldsymbol{y}|^{r-1}\|_{\widetilde{\mathbb{L}}^{\frac{r+1}{r}}}\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}\nonumber\\&\leq r\|\boldsymbol{y}^n-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}\left(\|\boldsymbol{y}^n\|_{\widetilde{\mathbb{L}}^{r+1}}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{r+1}}\right)^{r-1}\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{r+1}}\to 0 \text{ as } n\to\infty, \end{align*} \iffalse \begin{align} |\langle \mathcal{C}(\boldsymbol{y}^n)-\mathcal{C}(\boldsymbol{y}),\boldsymbol{z}\rangle|\to 0, \ \text{ as } \ n\to\infty, \end{align} \fi since $\boldsymbol{y}_n\to\boldsymbol{y}$ strongly in $\mathbb{V}\cap{\widetilde{\mathbb{L}}^{r+1}}$ and $\boldsymbol{y}_n, \boldsymbol{y}\in\mathbb{V}\cap{\widetilde{\mathbb{L}}^{r+1}}$. From the above convergences, it is immediate that $\langle(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{y}^n)-(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{y}),\boldsymbol{z}\rangle \to 0$, for all $\boldsymbol{z}\in \mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1}$. Hence the operator $\mathcal{G}+\kappa\mathrm{I}:\mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1}\to \mathbb{V}'+\widetilde{\mathbb{L}}^{\frac{r+1}{r}}$ is demicontinuous and hence it is hemicontinuous. \vskip 2mm \noindent \textbf{Step III:} \textsl{$\mathcal{G}+\kappa\mathrm{I}$ is coercive.} We consider \begin{align*} \frac{\langle(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{y}),\boldsymbol{y}\rangle}{\|\boldsymbol{y}\|_{\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}}}&=\frac{\mu\|\boldsymbol{y}\|_{\mathbb{V}}^{2}+\beta\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\kappa\|\boldsymbol{y}\|_{\mathbb{H}}^{2}}{\sqrt{\|\boldsymbol{y}\|_{\mathbb{V}}^{2}+\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}^2}}\nonumber\geq\frac{\min\{\mu,\beta\}\left(\|\boldsymbol{y}\|_{\mathbb{V}}^{2}+\|\boldsymbol{y}\|^2_{\widetilde\mathbb{L}^{r+1}}\right)-1}{\sqrt{\|\boldsymbol{y}\|_{\mathbb{V}}^{2}+\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}^2}}, \end{align*} where we have used the fact that $x^{2}\leq x^{r+1}+1,$ for $x\geq0$ and $r\geq1.$ Thus, we have \begin{align*} \lim\limits_{\|\boldsymbol{y}\|_{\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}}\to\infty} \frac{\langle(\mathcal{G}+\kappa\mathrm{I})(\boldsymbol{y}),\boldsymbol{y}\rangle}{\|\boldsymbol{y}\|_{\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}}}=\infty, \end{align*} and it shows that the operator $\mathcal{G}+\kappa\mathrm{I}$ is coercive. \vskip 2mm \noindent \textbf{Step IV:} \textsl{$\mathcal{F}(\cdot):=\mathcal{G}(\cdot)+\kappa\mathrm{I}$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}$}. Let us define an operator $$\mathcal{F}(\boldsymbol{y})=\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}(\boldsymbol{y})+\beta\mathcal{C}(\boldsymbol{y})+\kappa\boldsymbol{y},$$ where $\mathrm{D}(\mathrm{A})=\{\boldsymbol{y}\in\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}:\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}(\boldsymbol{y})+\beta\mathcal{C}(\boldsymbol{y})\in\mathbb{H}\}.$ Note that the space $\mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1}$ is reflexive. Since $\mathcal{G}+\kappa\mathrm{I}$ is monotone, hemicontinuous and coercive from $\mathbb{V}\cap\widetilde{\mathbb{L}}^{r+1}$ to $\mathbb{V}'+\widetilde{\mathbb{L}}^{\frac{r+1}{r}}$, then by an application of \cite[Example 2.3.7]{OPHB}, we obtain that $\mathcal{G}+\kappa\mathrm{I}$ is maximal monotone in $\mathbb{H}$ with domain $\mathrm{D}(\mathcal{F})\supseteq\mathrm{D}(\mathrm{A}).$ In fact, we shall prove that $\mathcal{F}$ is $m$-accretive for $\kappa$ sufficiently large with $\mathrm{D}(\mathcal{F})=\mathrm{D}(\mathrm{A}).$ Let us consider the operators for some $\delta_1, \delta_2\in(0,1)$ as \begin{align} \mathcal{F}^{1}(\cdot) &= \mu(1-\delta_1)\mathrm{A}+\beta(1-\delta_2)\mathcal{C}(\cdot),\label{3.3.2}\\ \mathcal{F}^{2}(\cdot) &= \mu\delta_1\mathrm{A}+\mathcal{B}(\cdot)+\beta\delta_2\mathcal{C}(\cdot)+\kappa\mathrm{I},\label{3.3.33} \end{align} where $\mathrm{D}(\mathcal{F}^{1})=\{\boldsymbol{y}\in\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}:\mathcal{F}^1(\cdot)\in\mathbb{H}\}$ and $\mathrm{D}(\mathcal{F}^{2}) = \{\boldsymbol{y}\in\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}:\mathcal{F}^{2}(\cdot)\in\mathbb{H}\}.$ Taking the inner product with $\boldsymbol{y}$ in \eqref{3.3.2}, we obtain \begin{align*} \mu(1-\delta_1)\|\boldsymbol{y}\|_{\mathbb{V}}^2+\beta(1-\delta_2)\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\leq(\mathcal{F}^{1}(\boldsymbol{y}),\boldsymbol{y})\leq \|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\|\boldsymbol{y}\|_{\mathbb{H}}, \end{align*} so that \begin{align}\label{3.3.5} \|\boldsymbol{y}\|_{\mathbb{V}}^2\leq\frac{1}{\mu(1-\delta_1)}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\|\boldsymbol{y}\|_{\mathbb{H}}. \end{align} Taking the inner product with $\mathrm{A}\boldsymbol{y}$ in \eqref{3.3.2} and using \eqref{3}, we get \begin{align*} \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{2}+\beta(1-\delta_2) \left[\||\boldsymbol{y}|^{\frac{r-1}{2}}\nabla\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{4(r-1)}{(r+1)^2}\||\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^2\right]=(\mathcal{F}^{1}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y}). \end{align*} Therefore, we have \begin{align}\label{3.147} \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq\frac{1}{\mu(1-\delta_1)}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\ \text{ which implies }\ \mathrm{D}(\mathcal{F}^{1})\subseteq\mathrm{D}(\mathrm{A}). \end{align} Moreover, using Sobolev's inequality, we infer \begin{align*} \|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}&\leq \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C\beta(1-\delta_2)\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{2r}}^r\nonumber\\&\leq \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C\beta(1-\delta_2)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^r, \end{align*} which gives $\mathrm{D}(\mathcal{F}^{1})\supseteq\mathrm{D}(\mathrm{A})$ and therefore $\mathrm{D}(\mathrm{A})=\mathrm{D}(\mathcal{F}^1).$ Taking the inner product with $\mathcal{C}(\boldsymbol{y})$ in \eqref{3.3.2}, we find \begin{align*} \mu(1-\delta_1)\left[\||\boldsymbol{y}|^{\frac{r-1}{2}}\nabla\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{4(r-1)}{(r+1)^2}\||\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^2\right]+\beta(1-\delta_2)\|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}^2=(\mathcal{F}^{1}(\boldsymbol{y}),\mathcal{C}(\boldsymbol{y})), \end{align*} so that \begin{align}\label{3.149} \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}\leq\frac{1}{\beta(1-\delta_2)}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}. \end{align} For $r>3$, we estimate $\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}$ using H\"older's inequality as follows: \begin{align}\label{3.3.4} \|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}^2&\leq \int_{\mathbb{T}^d} |\boldsymbol{y}(x)|^2|\nabla\boldsymbol{y}(x)|^2\d x= \int_{\mathbb{T}^d} |\boldsymbol{y}(x)|^2|\nabla\boldsymbol{y}(x)|^\frac{4}{r-1}|\nabla\boldsymbol{y}(x)|^\frac{2(r-3)}{r-1}\d x \nonumber\\&\leq \||\boldsymbol{y}|^\frac{r-1}{2}\nabla\boldsymbol{y}\|_{\mathbb{H}}^{\frac{4}{r-1}}\|\boldsymbol{y}\|_{\mathbb{V}}^\frac{2(r-3)}{r-1}. \end{align} Note that $(\mathcal{C}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y})=\int_{\mathbb{T}^{d}}(-\Delta \boldsymbol{y}(x))\cdot|\boldsymbol{y}(x)|^{r-1}\boldsymbol{y}(x)\d x$. Using the estimate \eqref{3.3.5} and the equality \eqref{3} in \eqref{3.3.4}, we find \begin{align*} \|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}^2\leq\left[(\mathcal{C}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y})\right]^\frac{2}{r-1}\left[\frac{1}{\mu(1-\delta_1)}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\|\boldsymbol{y}\|_{\mathbb{H}}\right]^\frac{r-3}{r-1}. \end{align*} Therefore, we estimate $\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}$ as \begin{align}\label{3p36} \|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}\leq\|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}^\frac{1}{r-1}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^\frac{1}{r-1}\left[\frac{1}{\mu(1-\delta_1)}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\|\boldsymbol{y}\|_{\mathbb{H}}\right]^\frac{r-3}{2(r-1)}. \end{align} Using the estimates \eqref{3.147}-\eqref{3.149} in \eqref{3p36}, then using Young's inequality, we get \begin{align}\label{3.3.6} \|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}&\leq\left[\frac{\|\mathcal{F}^1(\boldsymbol{y})\|_{\mathbb{H}}^2}{\beta\mu(1-\delta_1)(1-\delta_2)}\right]^\frac{1}{r-1}\left[\frac{\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}\|\boldsymbol{y}\|_{\mathbb{H}}}{\mu(1-\delta_1)}\right]^\frac{r-3}{2(r-1)}\nonumber\\&= \frac{1}{\sqrt{\mu(1-\delta_1)}}\left[\frac{1}{\beta(1-\delta_2)}\right]^\frac{1}{r-1}\|\mathcal{F}^1(\boldsymbol{y})\|_{\mathbb{H}}^\frac{r+1}{2(r-1)}\|\boldsymbol{y}\|_{\mathbb{H}}^\frac{r-3}{2(r-1)}\nonumber\\&\leq \frac{\delta_1}{1-\delta_1}\|\mathcal{F}^{1}(\boldsymbol{y})\|_{\mathbb{H}}+C_{\delta_1,\delta_2,\mu,\beta}\|\boldsymbol{y}\|_{\mathbb{H}} , \end{align} where $C_{\delta_1,\delta_2,\mu,\beta}=\frac{r-3}{2(r-1)}\left(\frac{1-\delta_1}{\mu^{\frac{r-1}{2}}\beta(1-\delta_2)}\right)^{\frac{2}{r-3}}\left(\frac{r+1}{2\delta_1(r-1)}\right)^{\frac{r+1}{r-3}}$. Now using the estimates \eqref{3.147}-\eqref{3.149} and \eqref{3.3.6} in \eqref{3.3.33}, we deduce \begin{align*} \|\mathcal{F}^{2}(\boldsymbol{y})\|_{\mathbb{H}}&\leq\mu\delta_1\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+\beta\delta_2 \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}+\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}+\kappa\|\boldsymbol{y}\|_{\mathbb{H}}\nonumber\\&\leq \left[\frac{2\delta_1}{1-\delta_1}+\frac{\delta_2}{1-\delta_2}\right]\|\mathcal{F}^1(\boldsymbol{y})\|_{\mathbb{H}}+(C_{\delta_1,\delta_2,\mu,\beta}+\kappa)\|\boldsymbol{y}\|_{\mathbb{H}}. \end{align*} Let us choose $\delta_1$ and $\delta_2$ in such a way that $\rho=\frac{2\delta_1}{1-\delta_1}+\frac{\delta_2}{1-\delta_2}<1,$ for example, one can choose $\delta_1=\frac{1}{9}$, $\delta_2=\frac{1}{5}$, so that $\rho=\frac{1}{2}.$ Then by the well-known perturbation theorem for nonlinear $m$-accretive operators (\cite[Chapter II, Theorem 3.5]{VB1}), we conclude that the operator $\mathcal{F}^{1}+\mathcal{F}^{2}$ with the domain $\mathrm{D}(\mathrm{A})$ is $m$-accretive in $\mathbb{H}$. Since $\mathcal{F}^{1}+\mathcal{F}^{2}=\mathcal{G}+\kappa\mathrm{I}$ , the operator $\mathcal{G}+\kappa\mathrm{I}$ is $m$-accretive in $\mathbb{H}$. \end{proof} \begin{remark} 1. For $d=2$ with $r\in[1,\infty)$ and $d=3$ with $r\in[1,5]$, Sobolev's embedding yields $\mathbb{V}\subset\widetilde\mathbb{L}^{r+1}$, so that $\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}=\mathbb{V}$. 2. For $d=r=3$ and $2\beta\mu\geq 1$, one can obtain global monotonicity of the operator $\mathcal{G}(\cdot):\mathbb{V}\to\mathbb{V}'$ in the following way: We estimate $|\langle\mathcal{B}(\boldsymbol{y}-\boldsymbol{z},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z}\rangle|$ using H\"older's and Young's inequalities as \begin{align}\label{ae.} |\langle\mathcal{B}(\boldsymbol{y}-\boldsymbol{z},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z}\rangle|\leq\|\boldsymbol{z}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}} \leq\mu \|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^2+\frac{1}{4\mu }\|\boldsymbol{z}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2. \end{align} Combining \eqref{ae}, \eqref{2.27} and \eqref{ae.}, we obtain \begin{align}\label{gm} \langle\mathcal{G}(\boldsymbol{y})-\mathcal{G}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle\geq\frac{1}{2}\left(\beta-\frac{1}{2\mu }\right)\|\boldsymbol{z}(\boldsymbol{y}-\boldsymbol{z})\|_{\mathbb{H}}^2\geq 0, \end{align} provided $2\beta\mu \geq 1$. Moreover, other properties like demicontinuity and coercivity can be proved in similar way as $r>3$ case (see the proof of Proposition \ref{prop33}). \end{remark} \begin{proposition}\label{prop3.3} Let $\Phi\subset\mathbb{H}\times\mathbb{H}$ be a maximal monotone operator satisfying Hypothesis \ref{hyp1}. Define the multivalued operator $\mathfrak{A}:\mathrm{D}(\mathfrak{A})\to\mathbb{H}$ by \begin{equation*} \mathfrak{A}(\cdot) = \mu\mathrm{A} +\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\Phi(\cdot)+\kappa\mathrm{I}, \end{equation*} with the domain $\mathrm{D}(\mathfrak{A})=\{\boldsymbol{y}\in\mathbb{H}: \varnothing \neq \mathfrak{A}(\boldsymbol{y})\subset\mathbb{H}\}$. Then $\mathrm{D}(\mathfrak{A}) = \mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\mathfrak{A}$ is a maximal monotone operator in $\mathbb{H}\times\mathbb{H},$ where $\kappa$ is as in Proposition \ref{prop33}. Furthermore, the following estimates holds \begin{align}\label{3.3838} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^2\leq C(1+\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_\lambda(\boldsymbol{w})\|_{\mathbb{H}}^2)^{\vartheta}, \end{align} for every $\boldsymbol{w}\in\mathrm{D}(\mathrm{A}), \lambda>0$ and \begin{align}\label{3.3939} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^2\leq C(1+\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\xi\|_{\mathbb{H}}^2)^{\vartheta}, \end{align} for every $\boldsymbol{w}\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\xi\in\Phi(\boldsymbol{w}),$ where \begin{align}\label{vartheta} \vartheta= \begin{cases} r, &\text{when} \ d=2 \ \text{with} \ r\in(3,\infty),\\ \frac{r+3}{5-r}, &\text{when} \ d=3 \ \text{with} \ r\in(3,5),\\ 3, &\text{when} \ d=r=3 \ \text{with} \ 2\beta\mu\geq1,\\ 1, &\text{when} \ d=3 \ \text{with} \ r\in[5,\infty). \end{cases} \end{align} \end{proposition} \begin{proof} It has been shown in Proposition \ref{prop33} that the operator $\mathcal{F}(\cdot)=\mu\mathrm{A} +\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\kappa\mathrm{I}$ is maximal monotone with domain $\mathrm{D}(\mathcal{F})=\mathrm{D}(\mathrm{A})$ in $\mathbb{H}\times\mathbb{H}.$ Note that $\mathfrak{A}=\mathcal{F}+\Phi$ implies $\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)\subseteq\mathrm{D}(\mathfrak{A})$ and since $\mathfrak{A}$ is the sum of two monotone operators, it is monotone. In order to prove $\mathfrak{A}$ is maximal monotone, we need to show that \begin{align}\label{316} \mathrm{R}(\mathrm{I}+\mathfrak{A})=\mathbb{H}. \end{align} \vskip 0.2 cm \noindent \textbf{Step I:} \texttt{Well-posedness of the Yosida approximated problem.} Let $\boldsymbol{f}\in\mathbb{H}$ be arbitrary but fixed. We approximate the inclusion problem \begin{equation} \boldsymbol{y}+\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}(\boldsymbol{y})+\beta\mathcal{C}(\boldsymbol{y})+\Phi(\boldsymbol{y})+\kappa\boldsymbol{y}\ni \boldsymbol{f}, \end{equation} by the equation \begin{equation}\label{Y1} \boldsymbol{y}_{\lambda}+\mu\mathrm{A}\boldsymbol{y}_{\lambda}+\mathcal{B}(\boldsymbol{y}_{\lambda})+\beta\mathcal{C}(\boldsymbol{y}_{\lambda})+\Phi_{\lambda}(\boldsymbol{y}_{\lambda})+\kappa\boldsymbol{y}_{\lambda}=\boldsymbol{f}, \end{equation} where $\Phi_{\lambda}$ is the Yosida approximation of $\Phi$. By the properties of Yosida approximation, $\Phi_{\lambda}$ is demicontinuous and monotone (see \cite[Chapter 2, Proposition 1.3]{VB1}). Therefore the sum $\mathcal{F}(\cdot)+\Phi_{\lambda}(\cdot)$ is maximal monotone (see \cite[Chapter 2, Corollary 1.1]{VB2}). This guarantees the existence of a solution $\boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A})$ for \eqref{Y1}. Let $\widetilde{\kappa}=\kappa+1. $ Then \eqref{Y1} can be written as \begin{equation}\label{Y2} \mu\mathrm{A}\boldsymbol{y}_{\lambda}+\mathcal{B}(\boldsymbol{y}_{\lambda})+\beta\mathcal{C}(\boldsymbol{y}_{\lambda})+\Phi_{\lambda}(\boldsymbol{y}_{\lambda})+\widetilde{\kappa}\boldsymbol{y}_{\lambda}=\boldsymbol{f}. \end{equation} We shall now prove the uniqueness. Let $\boldsymbol{y}_{\lambda}$ and $\boldsymbol{z}_{\lambda}$ be two solutions of the equation \eqref{Y2} with the same data $\boldsymbol{f}$ and let $\boldsymbol{w}_{\lambda}=\boldsymbol{y}_{\lambda}-\boldsymbol{z}_{\lambda}.$ Then we have \begin{equation}\label{Z1} \mu\mathrm{A}\boldsymbol{w}_{\lambda}+\mathcal{B}(\boldsymbol{y}_{\lambda})-\mathcal{B}(\boldsymbol{z}_{\lambda})+\beta(\mathcal{C}(\boldsymbol{y}_{\lambda})-\mathcal{C}(\boldsymbol{z}_{\lambda}))+\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\lambda}(\boldsymbol{z}_{\lambda})+\widetilde{\kappa}\boldsymbol{w}_{\lambda}=\mathbf{0}. \end{equation} Taking the inner product with $\boldsymbol{w}_{\lambda}$ in \eqref{Z1}, we get \begin{align}\label{Z6} \mu\|\boldsymbol{w}_{\lambda}\|_{\mathbb{V}}^{2}&+(\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\lambda}(\boldsymbol{z}_{\lambda}),\boldsymbol{w}_{\lambda)}+\widetilde{\kappa}\|\boldsymbol{w}_{\lambda}\|_{\mathbb{H}}^{2}\nonumber\\&=-(\mathcal{B}(\boldsymbol{y}_{\lambda})-\mathcal{B}(\boldsymbol{z}_{\lambda}),\boldsymbol{w}_{\lambda})-\beta(\mathcal{C}(\boldsymbol{y}_{\lambda})-\mathcal{C}(\boldsymbol{z}_{\lambda}),\boldsymbol{w}_{\lambda}). \end{align} By similar calculations as in \eqref{2.30} and \eqref{2.23}, we obtain \begin{align}\label{Z6..} -(\mathcal{B}(\boldsymbol{y}_{\lambda})-\mathcal{B}(\boldsymbol{z}_{\lambda})-\beta(\mathcal{C}(\boldsymbol{y}_{\lambda})-\mathcal{C}(\boldsymbol{z}_{\lambda})),\boldsymbol{w}_{\lambda})\leq \frac{\mu}{2}\|\boldsymbol{w}_{\lambda}\|_{\mathbb{V}}^{2}+\eta\|\boldsymbol{w}_{\lambda}\|_{\mathbb{H}}^{2}, \end{align} where $\varrho=\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}}.$ By \cite[Chapter 2, Proposition 1.3, part (i)]{VB2}, we know that $\Phi_{\lambda}$ is monotone, so that $(\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\lambda}(\boldsymbol{z}_{\lambda}),\boldsymbol{w}_{\lambda})\geq 0$ for any $\lambda>0$. Therefore, we conclude from \eqref{Z6} that \begin{align*} \frac{\mu}{2}\|\boldsymbol{w}_{\lambda}\|_{\mathbb{V}}^{2}+\left(\widetilde{\kappa}-\varrho\right)\|\boldsymbol{w}_{\lambda}\|_{\mathbb{H}}^{2}\leq 0. \end{align*} Since $\varrho<\widetilde{\kappa}$, we get $\boldsymbol{w}_{\lambda}=\boldsymbol{0}$ and thus $\boldsymbol{y}_{\lambda}=\boldsymbol{z}_{\lambda}.$ \vskip 0.2 cm \noindent \textbf{Step II:} \texttt{Uniform bounds for $\boldsymbol{y}_{\lambda}$.} Let us take the inner product with $\boldsymbol{y}_{\lambda}$ in \eqref{Y2} to get \begin{equation}\label{P1} \mu\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^{2} +\beta(\mathcal{C}(\boldsymbol{y}_{\lambda}),\boldsymbol{y}_{\lambda})+(\Phi_{\lambda}(\boldsymbol{y}_{\lambda}),\boldsymbol{y}_{\lambda})+\widetilde{\kappa}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2} = (\boldsymbol{f},\boldsymbol{y}_{\lambda}), \end{equation} since $(\mathcal{B}(\boldsymbol{y}_{\lambda}),\boldsymbol{y}_{\lambda})=0$. As the operator $\Phi_{\lambda}$ is monotone with $\boldsymbol{0}\in\mathrm{D}(\Phi_{\lambda})=\mathbb{H}$, we infer \begin{equation} (\Phi_{\lambda}(\boldsymbol{y}_{\lambda}),\boldsymbol{y}_{\lambda})\geq(\Phi_{\lambda}(\boldsymbol{0}),\boldsymbol{y}_{\lambda}). \end{equation} By applying Young's inequality and by of \cite[Chapter 2, Proposition 1.3, part (ii)]{VB2}, we have \begin{equation}\label{M1} -(\Phi_{\lambda}(\boldsymbol{0}),\boldsymbol{y}_{\lambda})\leq\|\Phi_{\lambda}(\boldsymbol{0})\|_{\mathbb{H}}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}\leq\frac{1}{\widetilde{\kappa}}\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}+\frac{\widetilde{\kappa}}{4}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2}. \end{equation} Then equation \eqref{P1} yields \begin{equation*} \mu\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^{2}+\frac{\widetilde{\kappa}}{2}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2}+\beta\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{r+1}}^{r+1}\leq \frac{1}{\widetilde{\kappa}}\|\boldsymbol{f}\|_{\mathbb{H}}^{2}+\frac{1}{\widetilde{\kappa}}\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}, \end{equation*} which gives \begin{equation}\label{e1.2} \|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2}+ \|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^{2} + \|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{r+1}}^{r+1} \leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2}), \ \text{ for all } \ \lambda>0, \end{equation} where the constant $C=C(\mu,\beta,\widetilde{\kappa},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}})$ does not depend on $\lambda$. Taking the inner product of \eqref{Y2} with $\mathrm{A\boldsymbol{y}_{\lambda}},$ we get \begin{equation}\label{e1.3} \mu\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2} +(\mathcal{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})+\beta(\mathcal{C}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})+(\Phi_{\lambda}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})+\widetilde{\kappa}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^{2} = (\boldsymbol{f},\mathrm{A}\boldsymbol{y}_{\lambda}). \end{equation} By \cite[Chapter VI, pp. 404]{RT1}, we have $(\mathcal{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda}) =0$ for $d=2.$ For $d=3$, we consider the cases $r>3$ and $r=3$ with $2\beta\mu\geq1$ separately. \vskip 2mm \noindent \textbf{Case I:} \textsl{$r>3.$} From Cauchy-Schwarz and Young's inequalities, we obtain \begin{align}\label{f1} (\boldsymbol{f},\mathrm{A}\boldsymbol{y}_{\lambda})\leq\|\boldsymbol{f}\|_{\mathbb{H}}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq\frac{\mu}{4}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{1}{\mu}\|\boldsymbol{f}\|_{\mathbb{H}}^2. \end{align} We estimate $|(\mathrm{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|$ using H\"older's, and Young's inequalities as \begin{align}\label{373} |(\mathrm{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|&\leq\||\boldsymbol{y}_{\lambda}||\nabla\boldsymbol{y}_{\lambda}|\|_{\mathbb{H}}\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}\leq\frac{\mu}{2}\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^2+\frac{1}{2\mu }\||\boldsymbol{y}_{\lambda}||\nabla\boldsymbol{y}_{\lambda}|\|_{\mathbb{H}}^2. \end{align} We estimate the final term from \eqref{373} using H\"older's and Young's inequalities as \begin{align}\label{3.744} \int_{\mathbb{T}^d}|\boldsymbol{y}_{\lambda}(x)|^2|\nabla\boldsymbol{y}_{\lambda}(x)|^2\d x&=\int_{\mathbb{T}^d}|\boldsymbol{y}_{\lambda}(x)|^2|\nabla\boldsymbol{y}_{\lambda}(x)|^{\frac{4}{r-1}}|\nabla\boldsymbol{y}_{\lambda}(x)|^{\frac{2(r-3)}{r-1}}\d x\nonumber\\&\leq\left(\int_{\mathbb{T}^d}|\boldsymbol{y}_{\lambda}(x)|^{r-1}|\nabla\boldsymbol{y}_{\lambda}(x)|^2\d x\right)^{\frac{2}{r-1}}\left(\int_{\mathbb{T}^d}|\nabla\boldsymbol{y}_{\lambda}(x)|^2\d x\right)^{\frac{r-3}{r-1}}\nonumber\\&\leq{\beta\mu }\left(\int_{\mathbb{T}^d}|\boldsymbol{y}_{\lambda}(x)|^{r-1}|\nabla\boldsymbol{y}_{\lambda}(x)|^2\d x\right)+2\mu\varrho\left(\int_{\mathbb{T}^d}|\nabla\boldsymbol{y}_{\lambda}(x)|^2\d x\right), \end{align} where $\varrho=\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}}$. From \eqref{3}, we can write \begin{align}\label{327.} (\mathcal{C}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda}) &=\||\nabla \boldsymbol{y}_{\lambda}||\boldsymbol{y}_{\lambda}|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+4\left[\frac{r-1}{(r+1)^2}\right]\||\nabla|\boldsymbol{y}_{\lambda}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^{2}. \end{align} Using the condition (H.3) of Hypothesis \ref{hyp1}, estimates \eqref{e1.2}, \eqref{f1}-\eqref{373} and \eqref{327.} in \eqref{e1.3}, it yields for all $\lambda>0$ \begin{align}\label{phi1} & \frac{\mu}{4}\|\mathrm{A\boldsymbol{y}_{\lambda}}\|_{\mathbb{H}}^{2}+\frac{\beta}{2}\||\nabla \boldsymbol{y}_{\lambda}||\boldsymbol{y}_{\lambda}|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+4\beta\left[\frac{r-1}{(r+1)^2}\right]\||\nabla|\boldsymbol{y}_{\lambda}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^{2}\nonumber\\&\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2})+ \begin{cases} \varsigma\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}, &\text{ for } d=2 \text{ with } r\in(3,\infty)\text{ and } d=3 \text{ with } r\in(3,5),\\ 0, &\text{ for } d=3 \text{ with } r\in[5,\infty). \end{cases} \end{align} This completes the proof of energy estimates for $d=3$ with $r\in[5,\infty).$ \vskip 2mm \noindent \textbf{Case II:} \textsl{$r=3$ with $2\beta\mu\geq1.$} From \eqref{3} and Cauchy-Schwarz and Young's inequalities, we calculate \begin{align} |(\mathrm{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|&\leq\||\boldsymbol{y}_\lambda||\nabla\boldsymbol{y}_\lambda|\|_{\mathbb{H}}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}\leq\frac{\mu}{2}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\frac{1}{2\mu}\||\boldsymbol{y}_\lambda||\nabla\boldsymbol{y}_\lambda|\|_{\mathbb{H}}^2\label{r3B},\\ (\mathcal{C}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})&=\||\boldsymbol{y}_{\lambda}||\nabla \boldsymbol{y}_{\lambda}|\|_{\mathbb{H}}^{2}+\frac{1}{2}\||\nabla|\boldsymbol{y}_{\lambda}|^2|\|_{\mathbb{H}}^{2}\label{r3C},\\ |(\boldsymbol{f},\mathrm{A}\boldsymbol{y}_\lambda)|&\leq\|\boldsymbol{f}\|_{\mathbb{H}}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}\leq\frac{\mu}{8}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\frac{1}{2\mu}\|\boldsymbol{f}\|_{\mathbb{H}}^2\label{r3f}. \end{align} Using \eqref{e1.2} and \eqref{r3B}-\eqref{r3f} in \eqref{e1.3}, we get \begin{align}\label{r3e} &\frac{3\mu}{8}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\left(\beta-\frac{1}{2\mu}\right)\||\boldsymbol{y}_\lambda||\nabla\boldsymbol{y}_\lambda|\|_{\mathbb{H}}^2+\frac{\beta}{2}\||\nabla|\boldsymbol{y}_{\lambda}|^2|\|_{\mathbb{H}}^{2}\nonumber\\&\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2})+\varsigma\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}. \end{align} \vskip 2mm \noindent \textsl{Estimate for $\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}.$} Taking the inner product with $\Phi_{\lambda}(\boldsymbol{y}_{\lambda})$ in \eqref{Y2}, we have \begin{align}\label{329} \|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}&=(\boldsymbol{f},\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))-(\mathcal{B}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))-\beta(\mathcal{C}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))-\mu(\mathrm{A\boldsymbol{y}_{\lambda}},\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))\nonumber\\&\quad-\widetilde{\kappa}(\boldsymbol{y}_{\lambda},\Phi_{\lambda}(\boldsymbol{y}_{\lambda})) . \end{align} Similar to \eqref{M1}, we have \begin{align}\label{m} (\boldsymbol{y}_{\lambda},\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))\geq-\frac{1}{2}(\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}+\|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{2}). \end{align} We calculate $|(\mathcal{B}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda})|$ using \eqref{b2}, Agmon's and Young's inequalities as \begin{align}\label{e1.4} |(\mathcal{B}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda})|&=|b(\boldsymbol{y}_{\lambda},\boldsymbol{y}_{\lambda},\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))|\nonumber\\ &\leq C\begin{cases} \|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{\frac{1}{2}}\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{\frac{1}{2}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}, &\text{for} \ d=2,\\ \|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^{\frac{3}{2}}\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{\frac{1}{2}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}, &\text{for} \ d=3, \end{cases}\nonumber\\ &\leq\frac{1-\mu\varsigma}{8}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}+\frac{\mu(1-\mu\varsigma)}{8\varsigma}\|\mathrm{A\boldsymbol{y}_{\lambda}}\|_{\mathbb{H}}^{2}+C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2})^{3}. \end{align} For $d=3$ with $r\in(3,5)$, by using the Cauchy-Schwarz, interpolation and Young's inequalities, and \eqref{e1.2} and \eqref{phi1}, we obtain \begin{align}\label{3.5555} |(\mathcal{C}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))|&\leq\|\mathcal{C}(\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq\|\boldsymbol{y}_{\lambda}\|_{\widetilde\mathbb{L}^{2r}}^r\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\nonumber\\&\leq \|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{r+3}{4}}\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{3(r+1)}}^{\frac{3(r-1)}{4}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\nonumber\\&\leq C\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{r+3}{4}}\||\boldsymbol{y}_{\lambda}|^\frac{r-1}{2}\nabla\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^\frac{3(r-1)}{2(r+1)}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\nonumber\\&\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{4(r+1)}\left[\frac{2\varsigma}{\beta}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}+\frac{2C}{\beta}(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2})\right]^\frac{3(r-1)}{4(r+1)}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}} \nonumber\\&\leq C \left[\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{\frac{5r-1}{2(r+1)}}(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{4(r+1)}+\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r}{r+1}\right]\nonumber\\&\leq \frac{1-\mu\varsigma}{8\beta}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}+C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{5-r} +C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{2r}{r+1}\nonumber\\&\leq \frac{1-\mu\varsigma}{8\beta}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}+C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{5-r}, \end{align} where we have used the fact that $\frac{r+3}{5-r}>\frac{2r}{r+1}$. Using the Sobolev embedding (for $d=2$), we deduce \begin{align}\label{3.6666} |(\mathcal{C}(\boldsymbol{y}_{\lambda}),\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))|&\leq\|\mathcal{C}(\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq\|\boldsymbol{y}_{\lambda}\|_{\widetilde\mathbb{L}^{2r}}^r\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\nonumber\\&\leq \|\boldsymbol{y}_\lambda\|_{\mathbb{V}}^r\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r}{2}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\nonumber\\&\leq \frac{1-\mu\varsigma}{8\beta}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}+C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^r, \end{align} for $d=2$ with $r\in(3,\infty)$. Also, by the Cauchy-Schwarz and Young's inequalities, we get \begin{align}\label{3.7777} |(\boldsymbol{f},\Phi_{\lambda}(\boldsymbol{y}_{\lambda}))|\leq\frac{1}{1-\mu\varsigma}\|\boldsymbol{f}\|_{\mathbb{H}}^{2}+\frac{1-\mu\varsigma}{4}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}. \end{align} Using the estimates \eqref{e1.2} and \eqref{m}-\eqref{3.7777} in \eqref{329}, we arrive at \begin{align}\label{3.5959} \varsigma\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{2}\leq\frac{\mu}{4}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2+ \begin{cases} C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^r, \ &\text{for} \ d=2 \text{ with } r\in(3,\infty),\\ C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{5-r}, \ &\text{for} \ d=3 \text{ with } r\in(3,5),\\ C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^3, \ &\text{for} \ d=r=3. \end{cases} \end{align} \textsl{Uniform boundedness of sequqences.} It implies from \eqref{phi1} and \eqref{3.5959} that \begin{align}\label{3.6060} &\frac{\mu}{4}\|\mathrm{A\boldsymbol{y}_{\lambda}}\|_{\mathbb{H}}^{2}+\frac{\beta}{2}\||\nabla \boldsymbol{y}_{\lambda}||\boldsymbol{y}_{\lambda}|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+4\beta\left[\frac{r-1}{(r+1)^2}\right]\||\nabla|\boldsymbol{y}_{\lambda}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^{2}\nonumber\\&\leq \begin{cases} C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^r, \ &\text{for} \ d=2 \ \text{with} \ r\in(3,\infty),\\ C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^2)^\frac{r+3}{5-r}, \ &\text{for} \ d=3 \ \text{with} \ r\in(3,5),\\ C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2}), \ &\text{for} \ d=3 \ \text{with} \ r\in(5,\infty).\\ \end{cases} \end{align} For $d=r=3$ with $2\beta\mu\geq1$, using \eqref{3.5959} in \eqref{r3e}, we obtain \begin{align}\label{r3e.} &\frac{\mu}{8}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\left(\beta-\frac{1}{2\mu}\right)\||\boldsymbol{y}_\lambda||\nabla\boldsymbol{y}_\lambda|\|_{\mathbb{H}}^2+\frac{\beta}{2}\||\nabla|\boldsymbol{y}_{\lambda}|^2|\|_{\mathbb{H}}^{2}\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}})^{3}. \end{align} Thus under Hypothesis \ref{hyp1} (condition (H.3)), we have \begin{align}\label{336} \|\mathrm{A\boldsymbol{y}_{\lambda}}\|_{\mathbb{H}}\leq C, \ \||\nabla \boldsymbol{y}_{\lambda}||\boldsymbol{y}_{\lambda}|^{\frac{r-1}{2}}\|_{\mathbb{H}}\leq C \ \text{ and } \ \||\nabla|\boldsymbol{y}_{\lambda}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}\leq C, \end{align} for $d=2,3$ with $r\in(3,\infty)$ and $d=r=3$ with $2\beta\mu\geq1$ for all $\boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A}).$ Using interpolation inequality and estimates \eqref{P.11} and \eqref{P.22}, we have \begin{align*} \|\mathcal{C}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{2r}}^{r}\leq\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{r+3}{4}}\|\boldsymbol{y}_{\lambda}\|_{\widetilde{\mathbb{L}}^{3(r+1)}}^{\frac{3(r-1)}{4}}\leq C, \ \text{ for all }\ \boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A}). \end{align*} Also, by using H\"older's and Agmon's inequalities, we obtain \begin{align*} \|\mathcal{B}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq\|(\boldsymbol{y}_{\lambda}\cdot\nabla) \boldsymbol{y}_{\lambda}\|_{\mathbb{H}}\leq\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}} \|\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^{1-\frac{d}{4}}\|\mathrm{A}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}^{\frac{d}{4}}\leq C , \ \text{ for all }\ \boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A}). \end{align*} \iffalse This also implies \begin{align*} \|\mathcal{B}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq C, \ \text{ for all }\ \boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A}). \end{align*} \fi Now, the equation \eqref{Y1} can be rewritten as \begin{equation}\label{Y3} \boldsymbol{y}_{\lambda}+\mathcal{F}(\boldsymbol{y}_{\lambda})+\Phi_{\lambda}(\boldsymbol{y}_{\lambda})=\boldsymbol{f}, \end{equation} where $\mathcal{F}(\cdot)=\mu\mathrm{A} +\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\widetilde{\kappa}\mathrm{I}$. Hence from \eqref{336}, we conclude that \begin{align}\label{338} \|\mathcal{F}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq C\ \text{ and } \ \|\Phi_{\lambda}(\boldsymbol{y}_{\lambda})\|_{\mathbb{H}}\leq C , \ \text{ for all }\ \boldsymbol{y}_{\lambda}\in\mathrm{D}(\mathrm{A}). \end{align} \vskip 0.2 cm \noindent \textbf{Step III:} \textsl{Convergence of $\boldsymbol{y}_{\lambda}$ and proof of \eqref{316}.} The estimates \eqref{e1.2}, \eqref{336} and \eqref{338}, and the Banach-Alaoglu theorem guarantee the existence of a weakly convergent subsequence $\{\boldsymbol{y}_{\lambda_j}\}$ of $\{\boldsymbol{y}_{\lambda}\}$ such that as $j\to\infty$ \begin{equation}\label{3p4} \left\{ \begin{aligned} \boldsymbol{y}_{\lambda_{j}}&\rightharpoonup \boldsymbol{y}, \ \text{ in } \ \mathbb{V}, \\ \mathrm{A}\boldsymbol{y}_{\lambda_{j}}&\rightharpoonup \mathrm{A}\boldsymbol{y}, \ \text{ in }\ \mathbb{H} , \end{aligned} \right. \ \ \left\{ \begin{aligned} \Phi_{\lambda}(\boldsymbol{y}_{\lambda_{j}})&\rightharpoonup \boldsymbol{f}_{1}, \ \text{ in }\ \mathbb{H} , \\ \mathcal{F}(\boldsymbol{y}_{\lambda_{j}})&\rightharpoonup \boldsymbol{f}_{2}, \ \text{ in }\ \mathbb{H} . \end{aligned} \right. \end{equation} Since the embedding $\mathrm{D}(\mathrm{A})\hookrightarrow\mathbb{V}$ is compact, we get the following strong convergence also: \begin{align}\label{3p5}\boldsymbol{y}_{\lambda_{j}}\to \boldsymbol{y}\ \text{ in }\ \mathbb{V}.\end{align} Passing weak limit in \eqref{Y3}, we get \begin{align} \boldsymbol{y} + \boldsymbol{f}_{1}+\boldsymbol{f}_{2} = \boldsymbol{f} \ \text{ in }\ \mathbb{H}. \end{align} In order to prove \eqref{316}, we need to show that $\boldsymbol{f}_{2}=\mathcal{F}(\boldsymbol{y})$ and $\boldsymbol{f}_{1}\in\Phi(\boldsymbol{y})$. For this, we rewrite equation \eqref{Y3} for $\lambda$ and $\widetilde{\lambda}$, subtract and then take the inner product with $\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}}$ to find \begin{align}\label{340} (\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\widetilde{\lambda}}(\boldsymbol{y}_{\widetilde{\lambda}}),\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}})+ ((\mathcal{F}+\mathrm{I})(\boldsymbol{y}_{\lambda})-(\mathcal{F}+\mathrm{I})(\boldsymbol{y}_{\widetilde{\lambda}}),\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}})=0. \end{align} By the monotonicity of $\mathcal{F}+\mathrm{I}$ (cf. Proposition \ref{prop33}), we conclude that \begin{align}\label{3p6} (\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\widetilde{\lambda}}(\boldsymbol{y}_{\widetilde{\lambda}}),\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}})\leq 0, \end{align} for all $\lambda, \widetilde{\lambda}>0.$ By \cite[Proposition 1.3, part (iv), pp. 49]{VB2} (see \eqref{3p4}-\eqref{3p5} and \eqref{3p6}), we conclude that $(\boldsymbol{y},\boldsymbol{f}_{1})\in\Phi$ and \begin{align*} \lim\limits_{\lambda,\widetilde{\lambda}\to 0} (\Phi_{\lambda}(\boldsymbol{y}_{\lambda})-\Phi_{\widetilde{\lambda}}(\boldsymbol{y}_{\widetilde{\lambda}}),\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}})=0. \end{align*} This also implies from \eqref{340} that \begin{align}\label{345} \lim\limits_{\lambda,\widetilde{\lambda}\to 0} ((\mathcal{F}+\mathrm{I})(\boldsymbol{y}_{\lambda})-(\mathcal{F}+\mathrm{I})(\boldsymbol{y}_{\widetilde{\lambda}}),\boldsymbol{y}_{\lambda}-\boldsymbol{y}_{\widetilde{\lambda}})=0. \end{align} Since $\boldsymbol{y}_{\lambda}\to \boldsymbol{y}, \ \mathcal{F}(\boldsymbol{y}_{\lambda})\rightharpoonup \boldsymbol{f}_{2}$ in $\mathbb{H}$ (see \eqref{3p4}-\eqref{3p5}), $\mathcal{F}+\mathrm{I}$ is maximal monotone (cf. Proposition \ref{prop33}) and \eqref{345} holds, then by \cite[Lemma 1.3, pp. 49] {VB2}, we deduce that $(\boldsymbol{y},\boldsymbol{y}+\boldsymbol{f}_{2})\in\mathcal{F}+\mathrm{I},$ and this implies that $\mathcal{F}(\boldsymbol{y})=\boldsymbol{f}_{2}.$ Hence it follows that $\boldsymbol{f}\in \boldsymbol{y}+\mathcal{F}(\boldsymbol{y})+\Phi(\boldsymbol{y}),$ as claimed in \eqref{316}. It also follows that $\boldsymbol{y}\in\mathrm{D}(\mathcal{F})\cap\mathrm{D}(\Phi)=\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and hence $\mathrm{D}(\mathfrak{A})=\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi).$ \vskip 0.2 cm \noindent \textbf{Step IV:} \textsl{Proof of \eqref{3.3838} and \eqref{3.3939}.} From \eqref{3.6060}, it implies that \begin{align}\label{a3} \|\mathrm{A\boldsymbol{y}_{\lambda}}\|_{\mathbb{H}}^{2}\leq C(1+\|\boldsymbol{f}\|_{\mathbb{H}}^{2})^\vartheta, \end{align} where $\vartheta$ is given as in \eqref{vartheta}. For a fixed $\lambda>0$ and $\boldsymbol{w}\in\mathrm{D}(\mathrm{A})$, let \begin{align}\label{3.725} \boldsymbol{g}_{\lambda}=\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})+\widetilde{\kappa}\boldsymbol{w}. \end{align} Then \begin{align}\label{3.7171} \|\boldsymbol{g}_\lambda\|_{\mathbb{H}}^2\leq 2 \widetilde\kappa^2\|\boldsymbol{w}\|_{\mathbb{H}}^2+ 2\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})\|_{\mathbb{H}}^2. \end{align} Analogous to \eqref{a3} (for the solution $\boldsymbol{y}_{\lambda}$ of \eqref{Y1} with $\boldsymbol{f}\in\mathbb{H}$), it yields from \eqref{3.7171} that the solution $\boldsymbol{w}$ of \eqref{3.725} with $\boldsymbol{g}_{\lambda}\in\mathbb{H}$ satiesfies \eqref{3.3838}. \iffalse \begin{align}\label{3.7272} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^{2}&\leq \begin{cases} C(1+\widetilde\kappa^2\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})\|_{\mathbb{H}}^2)^r, \\ \hspace{85mm} \text{for} \ d=2 \ \text{with} \ r\in(3,\infty),\\ C(1+\widetilde\kappa^2\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})\|_{\mathbb{H}}^2)^\frac{r+3}{5-r}, \\ \hspace{85mm} \text{for} \ d=3 \ \text{with} \ r\in(3,5),\\ C(1+\widetilde\kappa^2\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})\|_{\mathbb{H}}^2), \\ \hspace{85mm} \text{for} \ d=3 \ \text{with} \ r\in[5,\infty),\\ \end{cases} \end{align} which proves \eqref{3.3838}. \fi Now, for $\boldsymbol{w}\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\xi\in\Phi(\boldsymbol{w})$, let $$\boldsymbol{g}=\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\xi+\widetilde{\kappa}\boldsymbol{w}.$$ Since $\boldsymbol{g}\in\mathbb{H}$, we obtain a sequence $\{\boldsymbol{w}_{\lambda}\}_{\lambda>0}\subset \mathbb{H}$ such that $\boldsymbol{w}_{\lambda}$ is a solution of \begin{align*} \mu\mathrm{A}\boldsymbol{w}_{\lambda}+\mathcal{B}(\boldsymbol{w}_{\lambda})+\beta\mathcal{C}(\boldsymbol{w}_{\lambda})+\Phi_{\lambda}(\boldsymbol{w}_{\lambda})+\widetilde{\kappa}\boldsymbol{w}_{\lambda}=\boldsymbol{g}, \ \text{ for all }\ \lambda>0. \end{align*} Then as similar to Step III, we get $\boldsymbol{w}_{\lambda}\to\boldsymbol{w}$ in $\mathbb{V}$ and $\mathrm{A}\boldsymbol{w}_{\lambda}\rightharpoonup\mathrm{A}\boldsymbol{w}$ in $\mathbb{H}$. Now we calculate the estimate $\|\mathrm{A}\boldsymbol{w}_\lambda\|_{\mathbb{H}}^2$ as we calculate above and then passing the limit as $\lambda\to 0$, we obtain that \begin{align*} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^{2}\leq C(1+\|\boldsymbol{w}\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{w}+\mathcal{B}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\xi\|_{\mathbb{H}}^2)^\vartheta, \end{align*} where $\vartheta$ is defined as in \eqref{vartheta} and this completes the proof of \eqref{3.3939}. \end{proof} \iffalse Using Proposition \ref{prop3.3} and the abstract theory (\cite{VB1},\cite{VB2}), one can obtain the following existence and uniqueness result for the system \eqref{3.27}. \begin{proposition}\label{prop3.4} Let $\Phi\subset \mathbb{H}\times \mathbb{H}$ satisfy Hypothesis \ref{hyp1}. Let $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$. Then there exists a unique strong solution \begin{align}\label{350}\boldsymbol{y}\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V})\end{align}to the problem \eqref{3.27}. Furthermore, $\boldsymbol{y}$ is right differentiable, $\frac{\d^+\boldsymbol{y}}{\d t} $ is right continuous, and \begin{equation}\label{3.28} \frac{\d^+ \boldsymbol{y}(t)}{\d t}+\left(\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\Phi(\boldsymbol{y}(t))-\boldsymbol{f}(t)\right)^0= \mathbf{0}, \ \text{ for all } \ t\in[0,T]. \end{equation} \end{proposition} \fi \subsection{Proof of Theorem \ref{thm1.1}} From Proposition \ref{prop3.3} and \cite[Theorems 1.4-1.6, pp. 214-216]{VB2}, the problem \eqref{1p4} has unique solution $\boldsymbol{y}\in\mathrm{W}^{1,\infty}(0,T;\mathbb{H})$ satisfying the equation \eqref{1p5}. Let $\xi(t)\in\Phi(\boldsymbol{y}(t))$ be such that \begin{align}\label{A1} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\xi(t)=\boldsymbol{f}(t), \end{align} for a.e. $t\in[0,T]$. Since $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$, so $\boldsymbol{f}$ is absolutely continuous and subsequently $\boldsymbol{f}\in\mathrm{L}^\infty(0,T;\mathbb{H})$ and therefore $\boldsymbol{f}-\frac{\d \boldsymbol{y}}{\d t}\in\mathrm{L}^\infty(0,T;\mathbb{H}).$ Then from \eqref{A1}, we have $$\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\xi(t)\in\mathrm{L}^\infty(0,T;\mathbb{H}),$$ and thus from \eqref{3.3939}, we conclude that $\mathrm{A}\boldsymbol{y}\in\mathrm{L}^\infty(0,T;\mathbb{H})$. Moreover, we have the Gelfand triplet $\mathrm{D}(\mathrm{A})\subset\mathbb{V}\subset\mathbb{H},$ and \begin{align*} \boldsymbol{y}\in\mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A})) \ \text{and} \ \frac{\d \boldsymbol{y}(t)}{\d t}\in\mathrm{L}^\infty(0,T;\mathbb{H}), \end{align*} which imply that $\boldsymbol{y}\in\mathrm{C}([0,T];\mathbb{V}).$ A similar result holds for the system \eqref{1p4}, when one replaces $\Phi$ with the Yosida approximation $\Phi_\lambda$. \begin{proposition}\label{prop3.5} Let $\Phi\subset \mathbb{H}\times \mathbb{H}$ satisfy Hypothesis \ref{hyp1}. Let $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$. Then there exists a unique strong solution \begin{align}\label{355}\boldsymbol{y}_\lambda\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V})\end{align} to the problem \begin{equation}\label{3.29} \left\{ \begin{aligned} \frac{\d\boldsymbol{y}_\lambda(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_\lambda(t)+\mathcal{B}(\boldsymbol{y}_\lambda(t))+\beta\mathcal{C}(\boldsymbol{y}_\lambda(t))+\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))&=\boldsymbol{f}(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}_\lambda(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation} Furthermore, $\boldsymbol{y}_\lambda$ is right differentiable, $\frac{\d^+\boldsymbol{y}_\lambda}{\d t} $ is right continuous, and \begin{equation}\label{3p55} \frac{\d^+\boldsymbol{y}_\lambda(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_\lambda(t)+\mathcal{B}(\boldsymbol{y}_\lambda(t))+\beta\mathcal{C}(\boldsymbol{y}_\lambda(t))+\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))= \boldsymbol{f}(t), \ \text{ for all } \ t\in[0,T). \end{equation} \end{proposition} \begin{proof} From Proposition \ref{prop33}, we know that the operator $\boldsymbol{y}\mapsto\mathcal{F}(\boldsymbol{y})=\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}(\boldsymbol{y})+\beta\mathcal{C}(\boldsymbol{y})+\kappa\boldsymbol{y}$ is maximal monotone (for $\kappa$ sufficiently large) in $\mathbb{H}\times\mathbb{H}$. Since $\Phi_{\lambda}(\cdot)$ is single-valued, monotone and demicontinuous in $\mathbb{H}\times\mathbb{H}$ (cf. \cite[Proposition 1.3]{VB2}), then by \cite[Chapter 2, Corollary 1.1]{VB2} (see \cite{VB1} also), then the sum $\mathcal{F}(\cdot)+\Phi_{\lambda}(\cdot)=\mu\mathrm{A}+\mathcal{B}(\cdot)+\beta\mathcal{C}(\cdot)+\kappa\mathrm{I}+\Phi_{\lambda}(\cdot)$ is maximal monotone in $\mathbb{H}\times\mathbb{H}$. Since $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$, an application of \cite[Chapter 4, Theorem 1.8]{VB2} yields the existence of a unique solution $\boldsymbol{y}_{\lambda}\in\mathrm{W}^{1,\infty}(0,T;\mathbb{H})$ to the problem \eqref{3.29}. Arguing similarly as in the proof of Theorem \ref{thm1.1} and using the estimate \eqref{3.3838}, one can conclude the proof of \eqref{355}-\eqref{3p55}. \end{proof} \section{Proof of Theorem \ref{thm1.2}} \label{sec44}\setcounter{equation}{0} The aim of this section is to prove Theorem \ref{thm1.2} using the solvability results obtained in Theorem \ref{thm1.1}. We first provide some uniform energy estimates for the solutions of the problem \eqref{3.29}. \subsection{Energy estimates for the solution of the problem \eqref{3.29}} From Theorem \ref{thm1.1}, we infer that the problem \eqref{1p4} has a unique strong solution with the regularity given in \eqref{1p.4}. Our aim in this subsection is to obtain some energy estimates for the solution of the problem \eqref{1p7}. In order to do this, we first obtain suitable energy estimates for the solution $\boldsymbol{y}_{\lambda}(\cdot)$ for the approximate problem \eqref{3.29}, which also has a unique strong solution with the regularity given in \eqref{1p.4}. \begin{proposition}\label{prop4.1} Let $\boldsymbol{y}_\lambda(\cdot)$ be the unique strong solution of the problem \eqref{3.29} obtained in Proposition \ref{prop3.5}. Then for $\boldsymbol{f}\in\mathrm{W}^{1,2}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$, the solution $\boldsymbol{y}_\lambda(\cdot)$ satisfies the following energy estimates: \begin{align}\label{356} & \sup_{t\in[0,T]} \|\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+\mu\int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2\d t+\beta\int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\d t\nonumber\\&\leq C\left(\|\boldsymbol{y}_0\|_{\mathbb{H}}, \|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}\right), \end{align} where $C$ is independent of $\lambda$. Furthermore, we have \begin{align}\label{357} & \sup_{t\in[0,T]} \|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\mu\int_0^T\|\mathrm{A}\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2\d t+\beta\int_0^T\||\nabla \boldsymbol{y}_{\lambda}(t)||\boldsymbol{y}_{\lambda}(t)|^{\frac{r-1}{2}}\|_{\mathbb{H}}\d t\nonumber\\&\leq C\left(\mu,\beta,T,\|\mathrm{A}\boldsymbol{y}_0\|_{\mathbb{H}},\varphi(\boldsymbol{y}_0),\|\Phi(\boldsymbol{y}_0)\|_{\mathbb{H}},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}},\|\boldsymbol{f}(0)\|_{\mathbb{H}},\|\boldsymbol{f}\|_{\mathrm{W}^{1,2}(0,T;\mathbb{H})}\right), \end{align} where $C$ is independent of $\lambda$. \end{proposition} \begin{proof} We prove \eqref{356} and \eqref{357} in the following steps: \vskip 0.2 cm \noindent \textbf{Step I:} \textsl{Proof of \eqref{356}.} Taking the inner product with $\boldsymbol{y}_\lambda(\cdot)$ in \eqref{3.29}, we get for a.e. $t\in[0,T]$, \begin{align}\label{e.1} \frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^{2}+\mu\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2} +\beta\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1} + (\Phi_{\lambda}(\boldsymbol{y}_\lambda(t)),\boldsymbol{y}_\lambda(t)) = (\boldsymbol{f}(t),\boldsymbol{y}_\lambda(t)), \end{align} since $(\mathcal{B}(\boldsymbol{y}_\lambda),\boldsymbol{y}_\lambda)=0$. By the monotonicity of $\Phi_{\lambda}(\cdot),$ \cite[Chapter 2, Proposition 1.3, part(ii)]{VB2} and using the Cauchy-Schwarz and Young's inequalities, we have \begin{align}\label{e.2} (\Phi_{\lambda}(\boldsymbol{y}_\lambda(\cdot)),\boldsymbol{y}_\lambda(\cdot)) \geq (\Phi_{\lambda}(\boldsymbol{0}),\boldsymbol{y}_\lambda(\cdot))\geq -\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}-\frac{1}{4}\|\boldsymbol{y}_\lambda(\cdot)\|_{\mathbb{H}}^{2}. \end{align} Using the estimate \eqref{e.2} and \eqref{poin}, and Cauchy-Schwarz and Young's inequalities in \eqref{e.1}, we deduce \begin{align}\label{e.3} & \|\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^{2}+\mu\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\mathbb{V}} ^{2} \d s+2\beta\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\d s\nonumber\\&\leq\|\boldsymbol{y}_0\|_{\mathbb{H}}^2+ \frac{1}{\mu\lambda_1}\int_0^t\|\boldsymbol{f}(s)\|_{\mathbb{H}}^{2}\d s+t\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}, \end{align} for all $t\in[0,T]$. \vskip 0.2 cm \noindent \textbf{Step II:} \textsl{Regularity estimates.} In order to obtain the energy estimate \eqref{357}, we first need further regularity estimates on the solution. This is due to the (H.3) assumption in Hypothesis \ref{hyp1}. We observe that $\boldsymbol{y}_\lambda(\cdot)$ satisfies for any $h>0$ \begin{align*} \frac{\d\boldsymbol{y}_\lambda(t+h)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_\lambda(t+h)+\mathcal{B}(\boldsymbol{y}_\lambda(t+h))+\beta\mathcal{C}(\boldsymbol{y}_\lambda(t+h))+\Phi_{\lambda}(\boldsymbol{y}_\lambda(t+h))&=\boldsymbol{f}(t+h), \end{align*} for a.e. $t\in (0,T)$. Then subtracting above equation from \eqref{3.29}, and taking the inner product with $\boldsymbol{y}_\lambda(\cdot+h)-\boldsymbol{y}_{\lambda}(\cdot)$ and then using \eqref{2.23}, we get for a.e. $t\in (0,T)$ \begin{align}\label{d.1} &\frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+\mu\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\frac{\beta}{2}\||\boldsymbol{y}(t)|^{\frac{r-1}{2}}(\boldsymbol{y}(t+h)-\boldsymbol{y}(t))\|_{\mathbb{H}}^2\nonumber\\&\leq (\boldsymbol{f}(t+h)-\boldsymbol{f}(t),\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t))-(\mathcal{B}(\boldsymbol{y}_\lambda(t+h))-\mathcal{B}(\boldsymbol{y}_\lambda(t)),\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)), \end{align} where we have used the monotonicity property of the Yosida approximation $\Phi_{\lambda}(\cdot)$ also, that is, $(\Phi_{\lambda}(\boldsymbol{y}_\lambda(\cdot+h))-\Phi_{\lambda}(\boldsymbol{y}_\lambda(\cdot)),\boldsymbol{y}_\lambda(\cdot+h)-\boldsymbol{y}_\lambda(\cdot))\geq 0.$ We consider the follwing cases: \vskip 0.2cm \textsl{For $r>3.$} From \eqref{2.30} and the Cauchy-Schwarz inequality, \eqref{d.1} yields \begin{align}\label{mr1} &\frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+\frac{\mu}{2}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2\nonumber\\&\leq \frac{1}{2}\|\boldsymbol{f}(t+h)-\boldsymbol{f}(t)\|_{\mathbb{H}}^2+\frac{1}{2}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+\varrho\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2, \end{align} or we can write \begin{align*} \frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2\leq \|\boldsymbol{f}(t+h)-\boldsymbol{f}(t)\|_{\mathbb{H}}^2+(2\varrho+1)\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2, \end{align*} for a.e. $t\in(0,T)$. By Gronwall's inequality, we have \begin{align*} \|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2\leq e^{(2\varrho+1)t} \left(\|\boldsymbol{y}_\lambda(h)-\boldsymbol{y}_\lambda(0)\|_{\mathbb{H}}^2+\int_0^t \|\boldsymbol{f}(s+h)-\boldsymbol{f}(s)\|_{\mathbb{H}}^2 \d s\right), \end{align*} for all $t\in[0,T]$. On dividing by $h^2$ and then taking limit as $h\to 0$, we obtain for all $t\in[0,T]$ \begin{align}\label{mr2} \left\|\frac{\d^+\boldsymbol{y}_\lambda(t)}{\d t}\right\|_{\mathbb{H}}^2&\leq e^{(2\varrho+1)T} \left(\left\|\frac{\d^+\boldsymbol{y}_\lambda(0)}{\d t}\right\|_{\mathbb{H}}^2+\int_0^T\left\|\frac{\d\boldsymbol{f}}{\d t}(t)\right\|_{\mathbb{H}}^2 \d t\right)\nonumber\\&\leq C e^{(2\varrho+1)T} \left(\mu\|\mathrm{A}\boldsymbol{y}_\lambda(0)\|_{\mathbb{H}}^2+\|\mathcal{B}(\boldsymbol{y}_\lambda(0))\|_{\mathbb{H}}^2+\beta\|\mathcal{C}(\boldsymbol{y}_\lambda(0))\|_{\mathbb{H}}^2+\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(0))\|_{\mathbb{H}}^2\right.\nonumber\\&\quad\left.+\|\boldsymbol{f}(0)\|_{\mathbb{H}}^2+\|\boldsymbol{f}\|_{\mathrm{W}^{1,2}(0,T;\mathbb{H})}\right)\nonumber\\&\leq C\left(\mu,\beta,T,\|\mathrm{A}\boldsymbol{y}_0\|_{\mathbb{H}},\|\Phi(\boldsymbol{y}_0)\|_{\mathbb{H}},\|\boldsymbol{f}(0)\|_{\mathbb{H}},\|\boldsymbol{f}\|_{\mathrm{W}^{1,2}(0,T;\mathbb{H})}\right), \end{align} where we have used \eqref{3p55} and the fact that $\boldsymbol{f}\in\mathrm{W}^{1,2}(0,T;\mathbb{H})$ implies $\boldsymbol{f}\in\mathrm{C}([0,T];\mathbb{H})$. Now on integrating \eqref{mr1}, we get \begin{align*} &\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2 +\mu\int_0^t \|\boldsymbol{y}_\lambda(s+h)-\boldsymbol{y}_\lambda(s)\|_{\mathbb{V}}^2 \d s\nonumber\\&\leq \|\boldsymbol{y}_\lambda(h)-\boldsymbol{y}_\lambda(0)\|_{\mathbb{H}}^2+(2\varrho+1)\int_0^t \|\boldsymbol{y}_\lambda(s+h)-\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2 \d s+\int_0^t \|\boldsymbol{f}(s+h)-\boldsymbol{f}(s)\|_{\mathbb{H}}^2 \d s, \end{align*} or we can write \begin{align*} &\mu\int_0^t \|\boldsymbol{y}_\lambda(s+h)-\boldsymbol{y}_\lambda(s)\|_{\mathbb{V}}^2 \d s\nonumber\\&\leq \|\boldsymbol{y}_\lambda(h)-\boldsymbol{y}_\lambda(0)\|_{\mathbb{H}}^2+(2\varrho+1)\int_0^t \|\boldsymbol{y}_\lambda(s+h)-\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2 \d s+\int_0^t \|\boldsymbol{f}(s+h)-\boldsymbol{f}(s)\|_{\mathbb{H}}^2 \d s. \end{align*} On dividing both sides by $h^2$ and then passing limit as $h\to 0$, we get \begin{align}\label{3.8989} \int_0^T \left\|\frac{\d\boldsymbol{y}_\lambda(s)}{\d s}\right\|_{\mathbb{V}}^2 \d s\leq C\left(\mu,\beta,T,\|\mathrm{A}\boldsymbol{y}_0\|_{\mathbb{H}},\|\Phi(\boldsymbol{y}_0)\|_{\mathbb{H}},\|\boldsymbol{f}(0)\|_{\mathbb{H}},\|\boldsymbol{f}\|_{\mathrm{W}^{1,2}(0,T;\mathbb{H})}\right). \end{align} \vskip 0.2cm \textsl{For $r=3$ with $2\beta\mu\geq1.$} Once again by using Cauchy-Schwarz and Young's inequalities, we get \begin{align*} &|(\mathcal{B}(\boldsymbol{y}_\lambda(t+h))-\mathcal{B}(\boldsymbol{y}_\lambda(t)),\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t))|\nonumber\\&\leq \|\boldsymbol{y}_\lambda(t)(\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}\nonumber\\&\leq\frac{1}{2\beta} \|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\frac{\beta}{2}\|\boldsymbol{y}_\lambda(t)(\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}^2. \end{align*} Thus we get from \eqref{d.1} \begin{align*} &\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+2\left(\mu-\frac{1}{2\beta}\right)\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2\nonumber\\&\leq \|\boldsymbol{f}(t+h)-\boldsymbol{f}(t)\|_{\mathbb{H}}^2+\|\boldsymbol{y}_\lambda(t+h)-\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2. \end{align*} Using the similar calculations as we have done in the case $r>3$, we get the similar estimates as in \eqref{3.8989}. Taking the inner product with $\frac{\d \boldsymbol{y}_\lambda}{\d t}$ in \eqref{3.29} and then using the Cauchy-Schwarz and Young's inequalities, we get for a.e. $t\in(0,T)$ \begin{align}\label{389} \left\|\frac{\d \boldsymbol{y}_\lambda(t)}{\d t}\right\|_{\mathbb{H}}^2&+\frac{\mu}{2}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\frac{\beta}{r+1}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\left(\frac{\d \boldsymbol{y}_\lambda(t)}{\d t},\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))\right)\nonumber\\&=\left(\boldsymbol{f}(t),\frac{\d \boldsymbol{y}_\lambda(t)}{\d t}\right)+\left(\mathcal{B}(\boldsymbol{y}_\lambda(t)),\frac{\d \boldsymbol{y}_\lambda(t)}{\d t}\right). \end{align} We calculate $\left(\mathcal{B}(\boldsymbol{y}_\lambda),\frac{\d \boldsymbol{y}_\lambda}{\d t}\right)$ by using the interpolation, H\"older's and Young's inequalities as \begin{align*} \left(\mathcal{B}(\boldsymbol{y}_\lambda),\frac{\d \boldsymbol{y}_\lambda}{\d t}\right)&=-b\left(\boldsymbol{y}_\lambda,\frac{\d \boldsymbol{y}_\lambda}{\d t},\boldsymbol{y}_\lambda\right)\leq \|\boldsymbol{y}_\lambda\|_{\widetilde\mathbb{L}^4}^2\left\|\frac{\d \boldsymbol{y}_\lambda}{\d t}\right\|_{\mathbb{V}}\nonumber\\&\leq\frac{1}{2}\left\|\frac{\d \boldsymbol{y}_\lambda}{\d t}\right\|_{\mathbb{V}}^2+\frac{1}{2}\|\boldsymbol{y}_\lambda\|_{\widetilde\mathbb{L}^{r+1}}^{\frac{2(r+1)}{r-1}}\|\boldsymbol{y}_\lambda\|_{\mathbb{H}}^{\frac{2(r-3)}{r-1}}. \end{align*} Therefore from \eqref{389}, it is immediate that \begin{align} &\frac{\mu}{2}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\frac{\beta}{r+1}\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\frac{1}{2} \int_0^t \left\|\frac{\d \boldsymbol{y}_\lambda(s)}{\d s}\right\|_{\mathbb{H}}^2\d s+\int_0^t\left(\frac{\d \boldsymbol{y}_\lambda(s)}{\d s},\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\right)\d s\nonumber\\&\leq \frac{\mu}{2}\|\boldsymbol{y}_0\|_{\mathbb{V}}^2+\frac{\beta}{r+1}\|\boldsymbol{y}_0\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\frac{1}{2}\int_0^t\|\boldsymbol{f}(s)\|_{\mathbb{H}}^2\d s+\frac{1}{2}\int_0^t\left\|\frac{\d \boldsymbol{y}_\lambda(s)}{\d s}\right\|_{\mathbb{V}}^2\d s\nonumber\\&\quad+\frac{1}{2}t^{\frac{r-3}{r-1}}\sup_{s\in[0,t]}\|\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^{\frac{2(r-3)}{r-1}}\left(\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\d s\right)^{\frac{2}{r-1}}, \end{align} for all $t\in[0,T]$. From Hypothesis \ref{hyp1}, we know that $\Phi=\partial\varphi,$ where $\varphi:\mathbb{H}\to\bar{\mathbb{R}}$ is a lower semicontinuous proper convex function. Then by an application of \cite[Chapter 2, Theorem 2.2]{VB2} yields that the Yosida approximation $\Phi_{\lambda}$ is the Gateaux derivative of $\varphi_{\lambda}$, for all $\lambda>0$, that is, $\Phi_{\lambda}=\nabla\varphi_{\lambda}$, where $\varphi_{\lambda}$ is the regularization of $\varphi$ \cite[pp. 64]{VB2}, given by \begin{align}\label{e.9} \varphi_{\lambda}(\boldsymbol{y})=\inf\left\{\frac{\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}}{2\lambda}+\varphi(\boldsymbol{z}): \boldsymbol{z}\in\mathbb{H}\right\}, \ \ \text{for all} \ \boldsymbol{y}\in\mathbb{H}. \end{align} Moreover by a standard calculation, we have \begin{align}\label{e.10} \frac{\d}{\d s}\left[\varphi_{\lambda}(\boldsymbol{y}_\lambda(\cdot))\right] = \left(\frac{\d \boldsymbol{y}_\lambda(\cdot)}{\d s},(\nabla\varphi_{\lambda})(\boldsymbol{y}_\lambda(\cdot))\right), \end{align} and \begin{align}\label{e..10} \int_0^t\left(\frac{\d \boldsymbol{y}_\lambda(s)}{\d s},\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\right)\d s=\varphi_{\lambda}(\boldsymbol{y}_\lambda(t))-\varphi_{\lambda}(\boldsymbol{y}_{0}), \end{align} for all $t\in[0,T]$. From \cite[Chapter 2, Proposition 1.3]{VB2}, we infer that $\mathrm{J}_{\lambda}:=(\mathrm{I}+\lambda\Phi)^{-1}$ is bounded on bounded subsets of $\mathbb{H}$. Furthermore, from \cite[Chapter 2, Theorem 2.2]{VB2}, we also have \begin{align}\label{e.12} \varphi(\mathrm{J}_{\lambda}(\boldsymbol{y}))\leq\varphi_{\lambda}(\boldsymbol{y})\leq\varphi(\boldsymbol{y}), \ \text{ for all } \ \lambda>0,\ \boldsymbol{y}\in\mathbb{H}. \end{align} From \cite[Chapter 2, Proposition 2.1]{VB2}, we know that any proper lower semicontinuous convex function is bounded from below by an affine function. Therefore, there exists $\boldsymbol{w}\in\mathbb{H}$ and $q\in\mathbb{R}$ such that \begin{align}\label{e.13} \varphi(\boldsymbol{y})\geq(\boldsymbol{y},\boldsymbol{w})+q, \ \ \text{for all} \ \boldsymbol{y}\in\mathbb{H}. \end{align} From \eqref{e.12}, \eqref{e.13} and application of the Cauchy-Schwarz inequality yield \begin{align}\label{e.14} -\varphi_{\lambda}(\boldsymbol{y}_\lambda)\leq-\varphi(\mathrm{J}_{\lambda}(\boldsymbol{y}_\lambda))&\leq-(\mathrm{J}_{\lambda}(\boldsymbol{y}_\lambda),\boldsymbol{w})-q\leq \|\mathrm{J}_{\lambda}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}\|\boldsymbol{w}\|_{\mathbb{H}}+|q|\leq C, \end{align} where $C$ is independent of $\lambda$. Thus using $\varphi_{\lambda}(\boldsymbol{y}_0)\leq\varphi(\boldsymbol{y}_0)$ in \eqref{e..10}, we deduce \begin{align}\label{e..14} -\int_0^t\left(\frac{\d \boldsymbol{y}_\lambda(s)}{\d s},\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\right)\d s\leq C, \end{align} where the constant $C$ depends on $\varphi(\boldsymbol{y}_0).$ Thus from \eqref{356}, \eqref{3.8989} and \eqref{e..14}, we get for all $t\in[0,T]$ \begin{align}\label{e.15.} \frac{\mu}{2}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^2+\frac{\beta}{r+1}\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\frac{1}{2} \int_0^t \left\|\frac{\d \boldsymbol{y}_\lambda(s)}{\d s}\right\|_{\mathbb{H}}^2\d s\leq C, \end{align} where $C=C\left(\mu,\beta,T,\|\mathrm{A}\boldsymbol{y}_0\|_{\mathbb{H}},\varphi(\boldsymbol{y}_0),\|\Phi(\boldsymbol{y}_0)\|_{\mathbb{H}},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}},\|\boldsymbol{f}(0)\|_{\mathbb{H}},\|\boldsymbol{f}\|_{\mathrm{W}^{1,2}(0,T;\mathbb{H})}\right)$. \vskip 0.2 cm \noindent \textbf{Step III:} \textsl{Proof of \eqref{357}.} We take the inner product with $\mathrm{A}\boldsymbol{y}_{\lambda}(\cdot)$ in \eqref{3.29} to obtain \begin{align}\label{e.4} &\frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}^{2}+\mu\|\mathrm{A}\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^{2} +\beta(\mathcal{C}(\boldsymbol{y}_\lambda(t)),\mathrm{A}\boldsymbol{y}_\lambda(t))\nonumber\\& =(\boldsymbol{f}(t),\mathrm{A}\boldsymbol{y}_\lambda(t))-(\mathcal{B}(\boldsymbol{y}_\lambda(t)),\mathrm{A}\boldsymbol{y}_\lambda(t))-(\Phi_{\lambda}(\boldsymbol{y}_\lambda(t)),\mathrm{A}\boldsymbol{y}_\lambda(t)), \end{align} for a.e. $t\in[0,T]$. This yields \begin{align}\label{e.55.e} &\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2} + 2\mu\int_0^t\|\mathrm{A}\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2\d s+2\beta\int_0^t (\mathcal{C}(\boldsymbol{y}_\lambda(s)),\mathrm{A}\boldsymbol{y}_\lambda(s)) \d s\nonumber\\&=\|\boldsymbol{y}_0\|_{\mathbb{V}}^2+2 \int_0^t (\boldsymbol{f}(s),\mathrm{A}\boldsymbol{y}_\lambda(s)) \d s-2\int_0^t (\mathcal{B}(\boldsymbol{y}_\lambda(s)),\mathrm{A}\boldsymbol{y}_\lambda(s)) \d s\nonumber\\&\quad-2\int_0^t (\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)),\mathrm{A}\boldsymbol{y}_\lambda(s)) \d s, \end{align}for all $t\in[0,T]$. We consider the cases $r>3$ and for $d=r=3$ separately. \textsl{Case I: For $r>3.$} From the equality \eqref{3}, we infer \begin{align}\label{e.5} (\mathcal{C}(\boldsymbol{y}_\lambda),\mathrm{A}\boldsymbol{y}_\lambda)= \||\nabla \boldsymbol{y}_\lambda||\boldsymbol{y}_\lambda|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+4\left[\frac{r-1}{(r+1)^2}\right]\||\nabla|\boldsymbol{y}_\lambda|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^{2}. \end{align} From \cite[Lemma 3.1, pp. 404]{RT1}, for $d=2$, we have $(\mathcal{B}(\boldsymbol{y}_\lambda),\mathrm{A}\boldsymbol{y}_\lambda)=0.$ For $d=3$ with $r\in(3,\infty)$, we estimate $|(\mathcal{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|$ as in \eqref{373}-\eqref{3.744} as \begin{align}\label{3.9191} |(\mathcal{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|&\leq\frac{\mu}{2}\|\mathrm{A}\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^2+\frac{\beta}{2} \||\nabla \boldsymbol{y}_\lambda||\boldsymbol{y}_\lambda|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+\varrho\|\boldsymbol{y}_{\lambda}\|_{\mathbb{V}}^2 , \end{align} where $\varrho=\frac{r-3}{2\mu(r-1)}\left(\frac{2}{\beta\mu (r-1)}\right)^{\frac{2}{r-3}}$. From condition (H.3) of Hypothesis \ref{hyp1}, \eqref{e.3} and \eqref{e.5}-\eqref{3.9191}, we obtain from \eqref{e.55.e} that \begin{align}\label{3104} &\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2}+\frac{\mu}{2}\int_0^t\|\mathrm{A}\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2\d s+\frac{3\beta}{2}\int_0^t \||\nabla \boldsymbol{y}_\lambda(s)||\boldsymbol{y}_\lambda(s)|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2} \d s\nonumber\\&\leq C+ \begin{cases} \varsigma\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s, \ &\text{for } d=2 \text{ with } r\in(3,\infty)\text{ and } d=3 \text{ with } r\in(3,5),\\ 0, &\text{for} \ d=3 \ \text{with} \ r\in[5,\infty). \end{cases} \end{align} where $C=C(\mu,\beta,T,\|\boldsymbol{y}_0\|_{\mathbb{H}},\|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}).$ This completes the proof of \eqref{357} for $d=3$ with $r\in[5,\infty).$ \textsl{Case II: For $d=r=3$ with $2\beta\mu\geq1.$} We calculate \begin{align*} (\mathcal{C}(\boldsymbol{y}_\lambda),\mathrm{A}\boldsymbol{y}_\lambda)&= \||\nabla \boldsymbol{y}_\lambda||\boldsymbol{y}_\lambda|\|_{\mathbb{H}}^{2}+\frac{1}{2}\||\nabla|\boldsymbol{y}_\lambda|^2|\|_{\mathbb{H}}^{2},\\ |(\mathcal{B}(\boldsymbol{y}_{\lambda}),\mathrm{A}\boldsymbol{y}_{\lambda})|&\leq\frac{\mu}{2}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\frac{1}{2\mu}\||\boldsymbol{y}_\lambda||\nabla\boldsymbol{y}_\lambda|\|_{\mathbb{H}}^2,\\ |(\boldsymbol{f},\mathrm{A}\boldsymbol{y}_\lambda)|&\leq\frac{\mu}{8}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^2+\frac{1}{2\mu}\|\boldsymbol{f}\|_{\mathbb{H}}^2. \end{align*} Using above estimates and Hypothesis \ref{hyp1} in \eqref{e.55.e}, we obtain \begin{align}\label{r31.} &\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2}+\frac{3\mu}{4}\int_0^t\|\mathrm{A}\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2\d s+2\left(\beta-\frac{1}{2\mu}\right)\int_0^t \||\nabla \boldsymbol{y}_\lambda(s)||\boldsymbol{y}_\lambda(s)|\|_{\mathbb{H}}^{2} \d s\nonumber\\&\leq C+ \varsigma\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s, \end{align} where constant $C$ is same as given in \eqref{3104}. \vskip 0.2 cm \noindent \textbf{Step IV:} \textsl{An estimate for $\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^{2} \d s$.} Let us now find a bound for $\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^{2} \d s$. For this, taking the inner product of \eqref{3.29} with $\Phi_{\lambda}(\boldsymbol{y}_\lambda(\cdot))$, we get for a.e. $t\in(0,T)$ \begin{align}\label{e.8} & \left(\frac{\d \boldsymbol{y}_\lambda(t)}{\d s},\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))\right)+ \mu(\Phi_{\lambda}(\boldsymbol{y}_\lambda(t)),\mathrm{A}\boldsymbol{y}_\lambda(t))+(\mathcal{B}(\boldsymbol{y}_\lambda(t)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))\nonumber\\&\qquad+\beta(\mathcal{C}(\boldsymbol{y}_\lambda(t)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))) +\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}^{2}=(\boldsymbol{f}(t),\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))). \end{align} Integrating \eqref{e.8} and using the condition (H3) of Hypothesis \ref{hyp1} and \eqref{e..14}, we obtain \begin{align}\label{3.105.} (1-\mu\varsigma)\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^{2} \d s&\leq C+ \int_{0}^{t} (\boldsymbol{f}(s),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)))\d s-\int_{0}^{t}(\mathcal{B}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)) \d s\nonumber\\&\quad-\beta\int_{0}^{t} (\mathcal{C}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)))\d s, \end{align} for all $t\in[0,T]$. A calculation similar to \eqref{e1.4} yields \begin{align}\label{e.15} \left|\int_{0}^{t}(\mathcal{B}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)) \d s\right|&\leq C+\frac{1-\mu\varsigma}{8}\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2} \d s\nonumber\\&\quad +\frac{\mu(1-\mu\varsigma)}{8\varsigma}\int_0^t \|\mathrm{A\boldsymbol{y}_{\lambda}}(s)\|_{\mathbb{H}}^{2} \d s, \end{align} where we have used \eqref{e.15.} also. Using the estimates \eqref{e.15.} and \eqref{3104}, we find \begin{align}\label{e.16.} \left|\int_0^t(\mathcal{C}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)))\d s\right|&\leq C\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\widetilde\mathbb{L}^{2r}}^r\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}\d s\nonumber\\&\leq C\sup_{s\in[0,t]}\|\boldsymbol{y}_{\lambda}(s)\|_{\widetilde{\mathbb{L}}^{r+1}}^{\frac{r+3}{4}}\int_0^t \|\boldsymbol{y}_{\lambda}(s)\|_{\widetilde{\mathbb{L}}^{3(r+1)}}^{\frac{3(r-1)}{4}}\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}\d s\nonumber\\&\leq C t^{\frac{5-r}{4(r+1)}}\left(\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^2\d s\right)^{\frac{1}{2}}\left(\int_0^t\|\boldsymbol{y}_{\lambda}(s)\|_{\widetilde{\mathbb{L}}^{3(r+1)}}^{r+1}\d s\right)^{\frac{3(r-1)}{4(r+1)}}\nonumber\\&\leq C\left(C+\varsigma\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^2\d s\right)^{\frac{3(r-1)}{4(r+1)}}\left(\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^2\d s\right)^{\frac{1}{2}}\nonumber\\&\leq \frac{1-\mu\varsigma}{8\beta}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2}\d s+C, \end{align} for $d=3$ and $r\in(3,5)$. We further calculate by using Sobolev's embedding $\mathbb{V}\subset\widetilde\mathbb{L}^{2r}$ and \eqref{e.15.}, for $d=2$ with $r\in(3,\infty)$ as \begin{align}\label{e.17.} \left|\int_0^t(\mathcal{C}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)))\d s\right|&\leq C\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\widetilde\mathbb{L}^{2r}}^r\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}\d s\nonumber\\&\leq C\int_0^t\|\boldsymbol{y}_\lambda(s)\|_{\mathbb{V}}^{2r} \d s+ \frac{1-\mu\varsigma}{8\beta}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2}\d s\nonumber\\&\leq C+\frac{1-\mu\varsigma}{8\beta}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2}\d s. \end{align} Using the Cauchy-Schwarz and Young's inequailities, we further have \begin{align}\label{e.18.} \left|\int_{0}^{t} (\boldsymbol{f}(s),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s)))\d s\right|\leq C\int_0^t \|\boldsymbol{f}(s)\|_{\mathbb{H}}^2\d s+\frac{1-\mu\varsigma}{4}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2}\d s. \end{align} By using \eqref{e.15}-\eqref{e.18.}, we conclude from \eqref{3.105.} that \begin{align*} (1-\mu\varsigma)\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^{2} \d s&\leq C+C\int_0^t \|\boldsymbol{f}(s)\|_{\mathbb{H}}^2\d s+ \frac{1-\mu\varsigma}{2}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\lambda}(s))\|_{\mathbb{H}}^{2}\d s\nonumber\\&\quad+\frac{\mu(1-\mu\varsigma)}{8\varsigma}\int_0^t \|\mathrm{A\boldsymbol{y}_{\lambda}}(s)\|_{\mathbb{H}}^{2} \d s, \end{align*} or we can write \begin{align}\label{3.108.} \varsigma\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s\leq C+C\int_0^t \|\boldsymbol{f}(s)\|_{\mathbb{H}}^2\d s+\frac{\mu}{4}\int_0^t \|\mathrm{A\boldsymbol{y}_{\lambda}}(s)\|_{\mathbb{H}}^{2} \d s. \end{align} Thus from \eqref{3104}, for $d=2,3$ with $r>3$, we get \begin{align}\label{3.109.} \|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2}+\frac{\mu}{4}\int_0^t\|\mathrm{A}\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2\d s+\frac{3\beta}{2}\int_0^t \||\nabla \boldsymbol{y}_\lambda(s)||\boldsymbol{y}_\lambda(s)|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2} \d s\leq C. \end{align} Also from \eqref{r31.}, for $d=r=3$ with $2\beta\mu\geq1$, we find \begin{align}\label{3.109..} &\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}} ^{2}+\frac{\mu}{2}\int_0^t\|\mathrm{A}\boldsymbol{y}_\lambda(s)\|_{\mathbb{H}}^2\d s+2\left(\beta-\frac{1}{2\mu}\right)\int_0^t \||\nabla \boldsymbol{y}_\lambda(s)||\boldsymbol{y}_\lambda(s)|\|_{\mathbb{H}}^{2} \d s\leq C. \end{align} Combining the above estimates with \eqref{3.108.}, we deduce \begin{align}\label{3.110.} \int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s\leq C, \end{align} which completes the proof. \iffalse Taking the inner product with $\mathcal{C}(\boldsymbol{y}_\lambda)$ in \eqref{3.29} and using Cauchy-Schwarz inequality, we get \begin{align*} &\frac{1}{r+1}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\mu(\mathcal{C}(\boldsymbol{y}_\lambda),\mathrm{A}\boldsymbol{y}_\lambda)+\beta\|\mathcal{C}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2 \nonumber\\&=(\boldsymbol{f},\mathcal{C}(\boldsymbol{y}_\lambda))-(\mathcal{B}(\boldsymbol{y}_\lambda),\mathcal{C}(\boldsymbol{y}_\lambda))-(\mathcal{C}(\boldsymbol{y}_\lambda),\Phi_{\lambda}(\boldsymbol{y}_\lambda)\nonumber\\&\leq \frac{\beta(\theta+\theta_1+\theta_2)}{2}\|\mathcal{C}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2+\frac{1}{2\theta\beta}\|\boldsymbol{f}\|_{\mathbb{H}}^2+\frac{1}{2\theta_1\beta}\|\mathcal{B}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2+\frac{1}{2\theta_2\beta}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2 \end{align*} From \eqref{3} and \eqref{3.744}, we get \begin{align*} &\frac{1}{r+1}\frac{\d}{\d t}\|\boldsymbol{y}_\lambda\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}+\mu\left(1-\frac{1}{2\theta_1}\right)\||\boldsymbol{y}_{\lambda}|^\frac{r-1}{2}|\nabla\boldsymbol{y}_{\lambda}\|_{\mathbb{H}}^2+\beta\left(1-\frac{\theta+\theta_1+\theta_2}{2}\right)\|\mathcal{C}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2\nonumber\\&\leq \frac{1}{2\theta\beta}\|\boldsymbol{f}\|_{\mathbb{H}}^2+\frac{\mu\varrho}{\theta_1\beta}\|\boldsymbol{y}_\lambda\|_{\mathbb{V}}^2+\frac{1}{2\theta_2\beta}\|\Phi_{\lambda}(\boldsymbol{y}_\lambda)\|_{\mathbb{H}}^2 \end{align*} On integrating both sides and using Step I, we get \begin{align*} \int_0^t \|\mathcal{C}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s\leq C+\frac{1}{K}\int_0^t \|\Phi_\lambda(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s \end{align*} where $C=C(\|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})},\|\boldsymbol{y}_0\|_{\mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{r+1})},\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^2{0,T;\mathbb{V}}}),$ and $K = \theta_2\beta^2(2-(\theta_1+\theta_2+\theta)).$ From the Cauchy-Schwarz, interpolation and Young's inequality, we get \begin{align*} \int_0^t (\mathcal{C}(\boldsymbol{y}_\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\d s &\leq\beta\int_0^t \|\mathcal{C}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2\d s +\frac{1}{4\beta}\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s\nonumber\\& \leq\frac{C\beta}{1-\mu\varsigma}+\frac{1}{\theta_2\beta(1-\mu\varsigma)(2-(\theta_1+\theta_2+\theta))}\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s\nonumber\\&\quad+\frac{1-\mu\varsigma}{4\beta}\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}_\lambda(s))\|_{\mathbb{H}}^2 \d s \end{align*} Let $\boldsymbol{v}_\lambda=\frac{\d\boldsymbol{y}_\lambda}{\d t}.$ Then $\Phi_{\lambda}=\nabla\varphi_\lambda$ and differentiating \eqref{3.29} to get \begin{align*} \frac{\d\boldsymbol{v}_\lambda(t)}{\d t}+\mu\mathrm{A}\boldsymbol{v}_\lambda(t)+\mathcal{B'}(\boldsymbol{y}_\lambda(t))(\boldsymbol{v}_\lambda(t))+\beta\mathcal{C'}(\boldsymbol{y}_\lambda(t))\boldsymbol{v}_\lambda(t)+\nabla\frac{\d}{\d t}\varphi_{\lambda}(t)&=\frac{\d\boldsymbol{f}(t)}{\d t} \end{align*} We calculate \begin{align}\label{????} \left(\frac{\d}{\d t}(\Phi_{\lambda}(\boldsymbol{y}_\lambda)),\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)&=\left(\frac{\d}{\d t}\nabla\varphi_\lambda(\boldsymbol{y}_\lambda),\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)\nonumber\\&= \left(\nabla\left(\frac{\d}{\d t}\varphi_\lambda(\boldsymbol{y}_\lambda)\right),\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)\nonumber\\&= -\left(\frac{\d}{\d t}\varphi_\lambda(\boldsymbol{y}_\lambda),\nabla\cdot\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)\nonumber\\&= \left(\nabla\varphi_\lambda(\boldsymbol{y}_\lambda)\frac{\d\boldsymbol{y}_\lambda}{\d t},\frac{\d}{\d t}\nabla\cdot\boldsymbol{y}_\lambda\right)\nonumber\\&=0 \end{align} Taking inner product with $\boldsymbol{v}_\lambda$ to obtain \begin{align*} &\frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{v}_\lambda(t)\|_{\mathbb{H}}^2+\|\boldsymbol{v}_\lambda(t)\|_{\mathbb{V}}^2+(\mathcal{B}(\boldsymbol{y}_\lambda,\boldsymbol{v}_\lambda),\boldsymbol{v}_\lambda)+(\mathcal{B}(\boldsymbol{v}_\lambda,\boldsymbol{y}_\lambda),\boldsymbol{v}_\lambda)+\beta(\mathcal{C'}(\boldsymbol{y}_\lambda(t))\boldsymbol{v}_\lambda(t),\boldsymbol{v}_\lambda)\nonumber\\&=\left(\frac{\d\boldsymbol{f}(t)}{\d t},\boldsymbol{v}_\lambda(t)\right) \end{align*} \fi \end{proof} \subsection{Passing to the limit as $\lambda\to 0$} Let us now pass $\lambda\to 0$ and obtain the energy estimates for the solution of the problem \eqref{1p7}. \begin{proposition}\label{soln} The limit of the sequence $(\boldsymbol{y}_\lambda)_{\lambda>0}$ satisfies the problem \eqref{1p7} for a.e. $t\in(0,T)$ in $\mathbb{H}$. \end{proposition} \begin{proof} We prove $(\boldsymbol{y}_\lambda)$ satisfies the problem \eqref{1p7} for a.e. $t\in(0,T)$ in $\mathbb{H}$ in the following steps: \vskip 0.2 cm \noindent \textbf{Step I:} \textsl{For $d=2$ with $r\in(3,\infty)$ and $d=3$ with $r\in(3,5).$} From the Proposition \ref{prop3.5}, we have \begin{align}\label{c.1} \boldsymbol{y}_\lambda\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V}). \end{align} From \eqref{3.109.}-\eqref{3.110.}, we have uniform bounds for the sequences \begin{align*} (\mathrm{A}\boldsymbol{y}_\lambda)_{\lambda>0} \ \text{and} \ (\Phi_{\lambda}(\boldsymbol{y}_\lambda))_{\lambda>0 }\ \text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}). \end{align*} Then from \eqref{b2}-\eqref{b4}, we have the sequence $(\mathcal{B}(\boldsymbol{y}_\lambda))_\lambda$ is bounded in $\mathrm{L}^2(0,T;\mathbb{H}),$ since \begin{align}\label{3115} \int_0^T\|\mathrm{B}(\boldsymbol{y}_{\lambda}(t))\|_{\mathbb{H}}^2\d t&\leq C\left\{\begin{array}{ll}T^{1/2}\sup\limits_{t\in[0,T]}\left(\|\boldsymbol{y}_{\lambda}(t)\|_{\mathbb{H}}\|\boldsymbol{y}_{\lambda}(t)\|_{\mathbb{V}}^2\right)\left(\int_0^T\|\mathrm{A}\boldsymbol{y}_{\lambda}(t)\|_{\mathbb{H}}^2\d t\right)^{1/2},&\text{ for }d=2,\\ T^{1/2}\sup\limits_{t\in[0,T]}\|\boldsymbol{y}_{\lambda}(t)\|_{\mathbb{V}}^3\left(\int_0^T\|\mathrm{A}\boldsymbol{y}_{\lambda}(t)\|_{\mathbb{H}}^2\d t\right)^{1/2},&\text{ for }d=3, \end{array}\right. \nonumber\\&\leq C. \end{align} Moreover, from \eqref{e.15.}, we have $\left(\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)_{\lambda>0}$ is uniformly bounded in $\mathrm{L}^2(0,T;\mathbb{H}).$ Using \eqref{3.29} and the energy estimates \eqref{e.15.}, \eqref{3.109.}-\eqref{3.110.} and \eqref{3115}, we find \begin{align*} \int_0^T\|\mathcal{C}(\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}^2\d t&\leq C\int_0^T\bigg(\left\|\frac{\d\boldsymbol{y}_\lambda(t)}{\d t}\right\|_{\mathbb{H}}^2+\|\mathrm{A}\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^2+\|\mathcal{B}(\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}^2+\|\Phi_{\lambda}(\boldsymbol{y}_\lambda(t))\|_{\mathbb{H}}^2\nonumber\\&\qquad+\|\boldsymbol{f}(t)\|_{\mathbb{H}}^2\bigg)\d t\nonumber\\&\leq C. \end{align*} Therefore the sequence $(\mathcal{C}(\boldsymbol{y}_\lambda))_{\lambda>0}$ is bounded in $\mathrm{L}^2(0,T;\mathbb{H}).$ Thus by making the use of the Banach-Alaoglu theorem, we infer \begin{equation}\label{c2} \left\{ \begin{aligned} \boldsymbol{y}_\lambda&\stackrel{\ast}{\rightharpoonup}\ \boldsymbol{y} \ &&\text{ in } \ \mathrm{L}^{\infty}(0,T;\mathbb{V}\cap\widetilde\mathbb{L}^{r+1}),\\ \boldsymbol{y}_\lambda&\rightharpoonup\boldsymbol{y} \ &&\text{ in } \ \mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{3(r+1)}),\\ \frac{\d\boldsymbol{y}_\lambda}{\d t}&\rightharpoonup \ \frac{\d\boldsymbol{y}}{\d t} \ &&\text{ in } \ \mathrm{L}^2(0,T;\mathbb{V}), \end{aligned}\right. \left\{ \begin{aligned} \mathrm{A}\boldsymbol{y}_\lambda&\rightharpoonup\ \mathrm{A}\boldsymbol{y} \ &&\text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}),\\ \mathcal{B}(\boldsymbol{y}_\lambda)&\rightharpoonup\ \zeta \ &&\text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}),\\ \mathcal{C}(\boldsymbol{y}_\lambda)&\rightharpoonup\ \vartheta \ &&\text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}),\\ \Phi_{\lambda}(\boldsymbol{y}_\lambda)&\rightharpoonup\ \phi \ &&\text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}). \end{aligned}\right. \end{equation} Since $\mathbb{V}\hookrightarrow\mathbb{H}\hookrightarrow\mathbb{V}'$, the embedding of $\mathbb{V}\hookrightarrow\mathbb{H}$ is compact, and the fact that $\boldsymbol{y} \in\mathrm{L}^{\infty}(0,T;\mathbb{V})$, $\frac{\d\boldsymbol{y}}{\d t} \in\mathrm{L}^2(0,T;\mathbb{H})\hookrightarrow\mathrm{L}^2(0,T;\mathbb{V}')$ imply \begin{align}\label{c3} \boldsymbol{y}_\lambda\to\boldsymbol{y} \ \text{ in } \ \mathrm{C}([0,T];\mathbb{H}), \end{align} by an application of the Aubin-Lions compactness lemma. Since $\mathrm{D}(\mathrm{A})\hookrightarrow\mathbb{V}\hookrightarrow\mathbb{H}$, $(\boldsymbol{y}_\lambda)_{\lambda>0}$ is bounded in $\mathrm{L}^2(0,T;\mathrm{D}(\mathrm{A}))$ and $\left(\frac{\d\boldsymbol{y}_\lambda}{\d t}\right)_{\lambda>0}$ is bounded in $\mathrm{L}^2(0,T;\mathbb{H})$, and the embedding $\mathrm{D}(\mathrm{A})\hookrightarrow\mathbb{V}$ is compact, it implies once again from Aubin-Lions compactness lemma that \begin{align}\label{c3.} \boldsymbol{y}_\lambda\to\boldsymbol{y} \ \text{ in } \ \mathrm{L}^2(0,T;\mathbb{V}). \end{align} From \cite[Chapter 2, Proposition 1.4, part(i)]{VB2}, we know that $(\mathrm{I}+\lambda\Phi)^{-1}$ is nonexpansive, that is, Lipschitz with Lipschitz constant $1$ and from \cite[Chapter 2, Proposition 1.3, part (iii)]{VB2}, we have \begin{align*} & \int_0^T \|(\mathrm{I}+\lambda\Phi)^{-1}\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^2\d t\nonumber\\&\leq 2\int_0^T\|(\mathrm{I}+\lambda\Phi)^{-1}(\boldsymbol{y}_\lambda(t))-(\mathrm{I}+\lambda\Phi)^{-1}\boldsymbol{y}(t)\|_{\mathbb{H}}^2\d t+2\int_0^T\|(\mathrm{I}+\lambda\Phi)^{-1}\boldsymbol{y}(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^2\d t\nonumber\\&\leq 2\int_0^T\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^2\d t+2\int_0^T\|(\mathrm{I}+\lambda\Phi)^{-1}\boldsymbol{y}(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^2\d t\nonumber\\&\to 0\ \text{ as }\ \lambda\to 0, \end{align*} so that $(\mathrm{I}+\lambda\Phi)^{-1}(\boldsymbol{y}_\lambda)\to \boldsymbol{y}$ in $\mathrm{L}^2(0,T;\mathbb{H})$ and $(\mathrm{I}+\lambda\Phi)^{-1}(\boldsymbol{y}_\lambda)\to (\mathrm{I}+\lambda\Phi)^{-1}\boldsymbol{y}$, for a.e. $t\in(0,T)$ in $\mathbb{H}$ (along a subsequence, which is still denoted by the same). From \cite[Chapter 2, Proposition 1.1, part (i)]{VB2} and \cite[Proposition 1.7]{JPSS}, we know that the maximal monotone operator $\Phi$ is weak-strong and strong-weak closed in $\mathbb{H}\times\mathbb{H},$ that is, if $\Phi_{\lambda}(\boldsymbol{y}_\lambda)\in\Phi(\mathrm{I}+\lambda\Phi)^{-1}(\boldsymbol{y}_\lambda), $ $ (\mathrm{I}+\lambda\Phi)^{-1}(\boldsymbol{y}_\lambda)\to \boldsymbol{y}$ in $\mathrm{L}^2(0,T;\mathbb{H})$ and $\Phi_{\lambda}(\boldsymbol{y}_\lambda)\rightharpoonup\ \phi \ \text{ in } \ \mathrm{L}^2(0,T;\mathbb{H}), $ then $\phi\in\Phi(\boldsymbol{y})$ for a.e. $t\in(0,T)$ in $\mathbb{H}$. \vskip 0.2 cm \noindent \textsl{Convergence of Bilinear operator $\mathcal{B}(\cdot)$}. We have from \eqref{b2} and \eqref{b4} \begin{align*} &\|(\mathcal{B}(\boldsymbol{y}_\lambda)-\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}\leq C\times \begin{cases} \|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathbb{H}}^{\frac{1}{2}}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathbb{V}}^{\frac{1}{2}}\|\boldsymbol{y}_\lambda\|_{\mathbb{V}}^{\frac{1}{2}}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^{\frac{1}{2}}\\ \quad+\|\boldsymbol{y}\|_{\mathbb{H}}^{\frac{1}{2}}\|\boldsymbol{y}\|_{\mathbb{V}}^{\frac{1}{2}}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathbb{V}}^{\frac{1}{2}}\|\mathrm{A}\boldsymbol{y}_\lambda-\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{\frac{1}{2}}, &\text{for} \ d=2, \vspace{2mm}\\ \|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathbb{H}}\|\boldsymbol{y}_\lambda\|_{\mathbb{V}}^{\frac{1}{2}}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathbb{H}}^{\frac{1}{2}}\\ \quad+\|\boldsymbol{y}\|_{\mathbb{H}}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathbb{V}}^{\frac{1}{2}}\|\mathrm{A}\boldsymbol{y}_\lambda-\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{\frac{1}{2}}, &\text{for} \ d=3. \end{cases} \end{align*} For $d=2$, we calculate \begin{align}\label{c4} &\int_0^T \|\mathcal{B}(\boldsymbol{y}_\lambda(t))-\mathcal{B}(\boldsymbol{y}(t))\|_{\mathbb{H}}^2 \d t\nonumber\\&\leq C \int_0^T \|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{V}}\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}\|\mathrm{A}\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}\d t\nonumber\\&\quad+ C\int_0^T \|\boldsymbol{y}(t)\|_{\mathbb{H}}\|\boldsymbol{y}(t)\|_{\mathbb{V}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{V}}\|\mathrm{A}\boldsymbol{y}_\lambda(t)-\mathrm{A}\boldsymbol{y}(t)\|_{\mathbb{H}}\d t\nonumber\\&\leq C\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^{\infty}(0,T;\mathbb{H})}\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^{\infty}(0,T;\mathbb{V})}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^2(0,T;\mathbb{V})}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathrm{L}^2(0,T;\mathbb{H})}\nonumber\\&\quad+ \|\boldsymbol{y}\|_{\mathrm{L}^{\infty}(0,T;\mathbb{H})}\|\boldsymbol{y}\|_{\mathrm{L}^{\infty}(0,T;\mathbb{V})}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^2(0,T;\mathbb{V})}\|\mathrm{A}\boldsymbol{y}_\lambda-\mathrm{A}\boldsymbol{y}\|_{\mathrm{L}^2(0,T;\mathbb{H})}\nonumber\\&\to0, \ \text{as} \ \lambda\to0, \end{align} where we have used the H\"older's inequality, strong convergences \eqref{c3}-\eqref{c3.} and \eqref{357}. For $d=3,$ we estimate \begin{align}\label{c5} \int_0^T \|\mathcal{B}(\boldsymbol{y}_\lambda(t))-\mathcal{B}(\boldsymbol{y}(t))\|_{\mathbb{H}}^2 \d t&\leq C \int_0^T \|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{V}}^2\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{V}}\|\mathrm{A}\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}\d t\nonumber\\& \quad+ C\int_0^T \|\boldsymbol{y}(t)\|_{\mathbb{V}}^2\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{V}}\|\mathrm{A}\boldsymbol{y}_\lambda(t)-\mathrm{A}\boldsymbol{y}(t)\|_{\mathbb{H}}\d t \nonumber\\&\leq \|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^{\infty}(0,T;\mathbb{V})}^2\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^{2}(0,T;\mathbb{V})}\|\mathrm{A}\boldsymbol{y}_\lambda\|_{\mathrm{L}^2(0,T;\mathbb{H})}\nonumber\\&\quad+ \|\boldsymbol{y}\|_{\mathrm{L}^{\infty}(0,T;\mathbb{V})}^2\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^2(0,T;\mathbb{V})}\|\mathrm{A}\boldsymbol{y}_\lambda-\mathrm{A}\boldsymbol{y}\|_{\mathrm{L}^2(0,T;\mathbb{H})}\nonumber\\&\to0 \ \text{ as } \ \lambda\to0, \end{align} where we have used the H\"older's inequality, strong convergences \eqref{c3}-\eqref{c3.} and \eqref{357}. \vskip 0.2 cm \noindent \textsl{Convergence of nonlinear operator $\mathcal{C}(\cdot)$}. By using Taylor's formula \cite[Theorem 7.9.1]{PGC} and H\"older's inequality, we have \begin{align}\label{c6} &\int_0^T\|\mathcal{C}(\boldsymbol{y}_\lambda(t))-\mathcal{C}(\boldsymbol{y}(t))\|_{\mathbb{H}}^{\frac{r+1}{r}}\d t \nonumber\\&\leq\int_0^T\left(\int_0^1\|\mathcal{C}'(\theta\boldsymbol{y}_\lambda(t)+(1-\theta)\boldsymbol{y}(t))(\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t))\|_{\mathbb{H}}^{\frac{r+1}{r}}\d\theta\right)\d t\nonumber\\&\leq r\int_0^T\left[\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{2r}}^{r-1}+\|\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{2r}}^{r-1}\right]^{\frac{r+1}{r}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{r+1}{r}}\d t\nonumber\\&\leq C\left[\int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{(r-1)(r+1)}{r}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_ {\widetilde\mathbb{L}^{2r}}^{\frac{r+1}{r}}\d t +\int_0^T\|\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{(r-1)(r+1)}{r}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{r+1}{r}}\d t\right]. \end{align} Using the interpolation in $2\leq 2r \leq 3(r+1)$ and H\"older's inequalities, we obtain \begin{align*} &\int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{(r-1)(r+1)}{r}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_ {\widetilde\mathbb{L}^{2r}}^{\frac{r+1}{r}}\d t \nonumber\\&\leq \int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\mathbb{H}}^{\frac{(r+3)(r-1)(r+1)}{r^2(3r+1)}}\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{3(r+1)}}^{\frac{3(r-1)^2(r+1)^2}{r^2(3r+1)}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^{\frac{(r+3)(r+1)}{r^2(3r+1)}}\nonumber\\&\qquad\times\|\boldsymbol{y}(t)_\lambda-\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{3(r+1)}}^{\frac{3(r-1)(r+1)^2}{r^2(3r+1)}}\d t\nonumber\\&\leq \left(\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^{\infty}(0,T;\mathbb{H})}^{\frac{(r+3)(r-1)(r+1)}{r^2(3r+1)}}\right)\left(\sup_{t\in[0,T]}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^{\frac{(r+3)(r+1)}{r^2(3r+1)}}\right)\nonumber\\&\qquad\times\int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{3(r+1)}}^{\frac{3(r-1)^2(r+1)^2}{r^2(3r+1)}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\widetilde\mathbb{L}^{3(+1)}}^{\frac{3(r-1)(r+1)^2}{r^2(3r+1)}}\d t\nonumber\\&\leq \left(\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^{\infty}(0,T;\mathbb{H})}^{\frac{(r+3)(r-1)(r+1)}{r^2(3r+1)}}\right)\left(\sup_{t\in[0,T]}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_{\mathbb{H}}^{\frac{(r+3)(r+1)}{r^2(3r+1)}}\right)\nonumber\\&\qquad\times T^{\frac{r(3r+1)}{r+3}}\|\boldsymbol{y}_\lambda\|_{\mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{3(r+1)})}\|\boldsymbol{y}_\lambda-\boldsymbol{y}\|_{\mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{3(r+1)})}\nonumber\\&\to0 \ \text{ as } \ \lambda\to0, \end{align*} where we have used the H\"older's inequality, strong convergence \eqref{c3} and energy estimates \eqref{356}-\eqref{357}, and for H\"older's inequality, we use the exponents $\frac{3(r-1)^2(r+1)}{r^2(3r+1)}+\frac{3(r-1)(r+1)}{r^2(3r+1)}+\frac{r+3}{r(3r+1)}=1.$ Similarly, \begin{align*} \int_0^T\|\boldsymbol{y}_\lambda(t)\|_{\widetilde\mathbb{L}^{2r}}^{\frac{(r-1)(r+1)}{r}}\|\boldsymbol{y}_\lambda(t)-\boldsymbol{y}(t)\|_ {\widetilde\mathbb{L}^{2r}}^{\frac{r+1}{r}}\d t \to0, \ \text{as} \ \lambda\to0. \end{align*} Hence from \eqref{c6}, we conclude that \begin{align}\label{c6.} \mathcal{C}(\boldsymbol{y}_\lambda)\to\mathcal{C}(\boldsymbol{y}) \ \text{ strongly in} \ \mathrm{L}^{\frac{r+1}{r}}(0,T;\mathbb{H}). \end{align} Letting $\lambda\to 0$ in \eqref{3.29}, we obtain that $\boldsymbol{y}$ satisfies the problem \eqref{1p7}. \end{proof} \subsection{Uniqueness of solution to the problem \eqref{1p7}} Let us now prove that the solution obtained by passing to the limit with $\lambda\to 0$ is unique. \begin{proposition}\label{unique} The solution for the problem \eqref{1p7} is unique. \end{proposition} \begin{proof} Let $\boldsymbol{y}_1(\cdot)$ and $\boldsymbol{y}_2(\cdot)$ be two solutions of \eqref{1p7} satisfying \eqref{356}-\eqref{357}. Then we have $ \text{for a.e.} \ t\in(0,T),$ \begin{align*} &\frac{1}{2}\frac{\d}{\d t} \|\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t)\|_{\mathbb{H}}^2+\mu\|\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t)\|_{\mathbb{V}}^2 + (\mathcal{B}(\boldsymbol{y}_1(t))-\mathcal{B}(\boldsymbol{y}_2(t)),\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t))\nonumber\\&\quad+\beta(\mathcal{C}(\boldsymbol{y}_1(t))-\mathcal{C}(\boldsymbol{y}_2(t)),\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t))+(\xi_1(t)-\xi_2(t),\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t))=0, \end{align*} where $\xi_j(\cdot)\in\Phi(\boldsymbol{y}_j(\cdot)),$ for $j=1,2.$ Integrating the above equality and using the monotonicity of $\Phi$, we can write \begin{align}\label{u1} &\|\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t)\|_{\mathbb{H}}^2+2\mu\int_0^t\|\boldsymbol{y}_1(s)-\boldsymbol{y}_2(s)\|_{\mathbb{V}}^2 \d s\nonumber\\&\leq\|\boldsymbol{y}_1(0)-\boldsymbol{y}_2(0)\|_{\mathbb{H}}^2-2\int_0^t (\mathcal{B}(\boldsymbol{y}_1(s))-\mathcal{B}(\boldsymbol{y}_2(s)),\boldsymbol{y}_1(s)-\boldsymbol{y}_2(s))\d s\nonumber\\&\quad-2\beta\int_0^t (\mathcal{C}(\boldsymbol{y}_1(s))-\mathcal{C}(\boldsymbol{y}_2(s)),\boldsymbol{y}_1(s)-\boldsymbol{y}_2(s))\d s. \end{align} Using calculations similar to \eqref{2..29}-\eqref{2.30}, we find \begin{align}\label{u2} |(\mathcal{B}(\boldsymbol{y}_1)-\mathcal{B}(\boldsymbol{y}_2),\boldsymbol{y}_1-\boldsymbol{y}_2)|&\leq\frac{\mu }{2}\|\boldsymbol{y}_1-\boldsymbol{y}_2\|_{\mathbb{V}}^2+\frac{\beta}{2}\||\boldsymbol{y}_2|^{\frac{r-1}{2}}(\boldsymbol{y}_1-\boldsymbol{y}_2)\|_{\mathbb{H}}^2+\varrho\|\boldsymbol{y}_1-\boldsymbol{y}_2\|_{\mathbb{H}}^2. \end{align} Also calculation similar to \eqref{2.23} gives \begin{align}\label{u3} \beta(\mathcal{C}(\boldsymbol{y}_1)-\mathcal{C}(\boldsymbol{y}_2),\boldsymbol{y}_1-\boldsymbol{y}_2)\geq\frac{\beta}{2}\||\boldsymbol{y}_2|^{\frac{r-1}{2}}(\boldsymbol{y}_1-\boldsymbol{y}_2)\|_{\mathbb{H}}^2. \end{align} Using \eqref{u2}-\eqref{u3} in \eqref{u1}, we get \begin{align}\label{u4} & \|\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t)\|_{\mathbb{H}}^2+\mu\int_0^t\|\boldsymbol{y}_1(s)-\boldsymbol{y}_2(s)\|_{\mathbb{V}}^2 \d s\nonumber\\&\leq\|\boldsymbol{y}_1(0)-\boldsymbol{y}_2(0)\|_{\mathbb{H}}^2+\varrho\int_0^t \|\boldsymbol{y}_1(s)-\boldsymbol{y}_2(s)\|_{\mathbb{H}}^2\d s, \end{align} for all $t\in(0,T)$. Applying Gronwall's inequality in \eqref{u4}, we obtain for all $t\in(0,T)$ \begin{align*} \|\boldsymbol{y}_1(t)-\boldsymbol{y}_2(t)\|_{\mathbb{H}}^2\leq\|\boldsymbol{y}_1(0)-\boldsymbol{y}_2(0)\|_{\mathbb{H}}^2e^{\varrho T}, \end{align*} which proves the uniqueness. \end{proof} \subsection{Proof of Theorem \ref{thm1.2}} From Proposition \ref{prop3.3}, we know that the operator $\mathfrak{A}(\cdot)$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}$ for sufficiently large $\kappa\geq\varrho$. So by using the abstract theory, we obtain the regularity \eqref{1p.4} given in Theorem \ref{thm1.1}. Moreover, from Proposition \ref{soln}, the solution $$\boldsymbol{y}\in\mathrm{L}^{2}(0,T;\mathrm{D}(\mathrm{A}))\cap\mathrm{L}^{r+1}(0,T;\widetilde\mathbb{L}^{3(r+1)})\cap\mathrm{W}^{1,2}(0,T;\mathbb{V})$$ satisfies \eqref{1p7} in $\mathbb{H}$ for a.e. in $t\in(0,T).$ The uniqueness of the problem \eqref{1p7} follows from Proposition \ref{unique} and this completes the proof. \iffalse \section{Proof of Theorem \ref{thm1.2}} \label{sec4}\setcounter{equation}{0} We use the denseness property here. Let $(\boldsymbol{y}_{0,j})_{j\in\mathbb{N}}$ be a sequence in $\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ which approximates the initial data $\boldsymbol{y}_0.$ Also let $(\boldsymbol{f}_j)_{j\in\mathbb{N}}$ be a sequence in $\mathrm{W}^{1,2}(0,T;\mathbb{H})$ that approximates $\boldsymbol{f}$ in $\mathrm{L}^2(0,T;\mathbb{H}).$ Consider the following approximated inclusion problem: \begin{equation}\label{3.27d} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}_j(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_j(t)+\mathcal{B}(\boldsymbol{y}_j(t))+\beta\mathcal{C}(\boldsymbol{y}_j(t))+\Phi(\boldsymbol{y}_j(t))&\ni \boldsymbol{f}_j(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}_j(0)&=\boldsymbol{y}_{0,j}. \end{aligned} \right. \end{equation} Then one can apply the Theorem \ref{thm1.1} to obtain unique solution $\boldsymbol{y}_j\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V}).$ Let $\eta_j(t)\in\Phi(\boldsymbol{y}_j(t))$ such that \begin{align*} \frac{\d \boldsymbol{y}_j(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_j(t)+\mathcal{B}(\boldsymbol{y}_j(t))+\beta\mathcal{C}(\boldsymbol{y}_j(t))+\eta_j(t)=\boldsymbol{f}_j(t) \end{align*} \fi \section{Applications}\label{sec5}\setcounter{equation}{0} We discuss some applications of the results obtained in Theorems \ref{thm1.1} and \ref{thm1.2}. These include flow invariance preserving feedback controllers, a time optimal control problem and stabilizing feedback controllers for 2D and 3D CBF equations, etc. \subsection{Flow invariance preserving feedback controllers (\cite{VBSS})} Let us consider the following controlled CBF equations: \begin{equation}\label{appl1.1} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))&= \boldsymbol{f}(t)+\mathbf{U}(t), \ t\in(0,T],\\ \boldsymbol{y}(0)&=\boldsymbol{y}_0, \end{aligned} \right. \end{equation} where $\mathbf{U}(\cdot)$ is distributed control acting on the system, $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})$. Consider a closed and convex set $\mathcal{K}\subset\mathbb{H}$ such that $\boldsymbol{0}\in\mathcal{K}$ and \begin{align}\label{appl1..1} (\mathrm{I}+\lambda\mathrm{A})^{-1}\mathcal{K}\subset\mathcal{K}, \ \text{for all} \ \lambda>0. \end{align} Our aim is to search for a feedback control $\mathbf{U}=\Psi(\boldsymbol{y})$ such that $\boldsymbol{y}(t)\in\mathcal{K}, $ for all $t\in[0,T],$ if $\boldsymbol{y}_0\in\mathcal{K}.$ That is, we have to find a feedback controller for which the set $\mathcal{K}$ is invariant with respect to CBF flow. We establish this by solving the following CBF inclusion problem: \begin{align}\label{appl1.2} \frac{\d\boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathrm{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))-\boldsymbol{f}(t)+N_{\mathcal{K}}(\boldsymbol{y}(t))\ni \mathbf{0}, \ t\in(0,T], \end{align} where $N_{\mathcal{K}}(\boldsymbol{y})=\{\boldsymbol{w}\in\mathbb{H}:(\boldsymbol{w},\boldsymbol{y}-\boldsymbol{z})\geq0,\ \text{for all} \ \boldsymbol{z}\in\mathcal{K}\}$ is the well-known \textsl{Clark's normal cone} to $\mathcal{K}$ at $\boldsymbol{y}$. We consider the indicator function $\mathrm{I}_{\mathcal{K}}:\mathbb{H}\to\overline{\mathbb{R}}$ (\cite{VB2}) given by \begin{align*} \mathrm{I}_{\mathcal{K}}(\boldsymbol{x})= \begin{cases} \boldsymbol{0}, &\text{if} \ \boldsymbol{x}\in\mathcal{K},\\ +\infty, &\text{if} \ \boldsymbol{x}\notin\mathcal{K}, \end{cases} \end{align*} whose subdifferential is given by \begin{align*} \partial\mathrm{I}_{\mathcal{K}}(\boldsymbol{x})= \begin{cases} \emptyset, &\text{if} \ \boldsymbol{x}\notin\mathcal{K},\\ \{0\}, &\text{if} \ \boldsymbol{x}\in \mathrm{int}(\mathcal{K}),\\ N_{\mathcal{K}}(\boldsymbol{x})=\{\boldsymbol{y}\in\mathbb{H}:(\boldsymbol{y},\boldsymbol{x}-\boldsymbol{z})\geq0,\ \text{for all} \ \boldsymbol{z}\in\mathcal{K}\}, &\text{if} \ \boldsymbol{x}\in\boldsymbol{\partial}\mathcal{K}, \end{cases} \end{align*} where $\mathrm{int}(\mathcal{K})$ and $\boldsymbol{\partial}\mathcal{K}$ denote the interior and boundary of $\mathcal{K}$, respectively. Then regularization of $\mathrm{I}_{\mathcal{K}}$ is given by \cite[Chapter 2, Theorem 2.2]{VB2} $$(\mathrm{I}_{\mathcal{K}})_{\lambda}(\boldsymbol{x})=\frac{1}{2\lambda}\|\boldsymbol{x}-\mathrm{P}_{\mathcal{K}}(\boldsymbol{x})\|_{\mathbb{H}}^2,$$ and its Gateaux derivative $$(\partial\mathrm{I}_{\mathcal{K}})_{\lambda}(\boldsymbol{x})=\frac{1}{\lambda}(\boldsymbol{x}-\mathrm{P}_{\mathcal{K}}(\boldsymbol{x})),$$ where $\mathrm{P}_{\mathcal{K}}:\mathbb{L}^2(\mathbb{T}^d)\to\mathcal{K}$ is the projection operator of $\boldsymbol{x}$ onto $\mathcal{K}$ which is equal to the resolvent $(\mathrm{I}+\lambda\partial\mathrm{I}_{\mathcal{K}})^{-1}.$ It implies that the above derivative is equal to the Yosida approximation of $\partial\mathrm{I}_{\mathcal{K}},$ that is $$(\partial\mathrm{I}_{\mathcal{K}})_{\lambda}(\boldsymbol{x})=\frac{1}{\lambda}(\boldsymbol{x}-(\mathrm{I}+\lambda\partial\mathrm{I}_{\mathcal{K}})^{-1}(\boldsymbol{x})), \ \text{for all} \ \boldsymbol{x}\in\mathbb{H}.$$ We observe that the multi valued operator $\Phi:=N_{\mathcal{K}}$ is a maximal monotone operator with $\boldsymbol{0}\in\mathrm{D}(\Phi)=\mathrm{D}(\partial\mathrm{I}_{\mathcal{K}})=\mathcal{K}.$ Also, the operator $\mathrm{A}$ is single-valued maximal monotone, and thus from \cite[Chapter IV, Proposition 1.1, part(iv)]{VB1}, we have \begin{align*} (\mathrm{A}\boldsymbol{y},(\partial\mathrm{I}_{\mathcal{K}})_{\lambda}(\boldsymbol{y}))\geq0, \ \text{ for all } \ \boldsymbol{y}\in\mathrm{D}(\mathrm{A}),\ \lambda>0. \end{align*} Thus the multi valued operator $N_{\mathcal{K}}=\partial\mathrm{I}_{\mathcal{K}}$ satisfies all the assumptions (H1)-(H3) of Hypothesis \ref{hyp1} and therefore we can apply the main result Theorem \ref{thm1.1} to the inclusion problem \eqref{appl1.2} to determine a feedback controller $\mathbf{U}\in\mathrm{L}^{\infty}(0,T;\mathbb{H})$ with $\mathbf{U}(t)\in-N_{\mathcal{K}}(\boldsymbol{y}(t))$ for a.e. $t\in[0,T]$ which is given by \begin{align}\label{appl1.3} \mathbf{U}(t)=&-\boldsymbol{f}(t)+\mu\mathrm{A}\boldsymbol{y}(t)+\mathrm{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))\nonumber\\&-(-\boldsymbol{f}(t)+\mu\mathrm{A}\boldsymbol{y}(t)+\mathrm{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+N_{\mathcal{K}}(\boldsymbol{y}(t)))^0, \ \ \ \ \text{for all} \ t\in[0,T), \end{align} where $N_{\mathcal{K}}(\boldsymbol{y})$ is the $\mathbb{H}$-valued normal cone to $\mathcal{K}$ at $\boldsymbol{y}.$ \textsl{Flow invariance for the estrophy of the system.} We consider the constraint set \begin{align*} \mathcal{K}=\{\boldsymbol{y}\in\mathbb{V}:\|\nabla\times\boldsymbol{y}\|_{\mathbb{H}}=\|\nabla\boldsymbol{y}\|_{\mathbb{H}}=\|\mathrm{A}^{\frac{1}{2}}\boldsymbol{y}\|_{\mathbb{H}}\leq \varpi \}. \end{align*} Let $\boldsymbol{f}$ be any arbitrary element of $\mathcal{K}$ such that $\boldsymbol{y}+\lambda\mathrm{A}\boldsymbol{y}=\boldsymbol{f}.$ Taking the inner product with $\mathrm{A}\boldsymbol{y}$ and using the Cauchy-Schwarz and Young's inequalities, we obtain \begin{align*} \|\boldsymbol{y}\|_{\mathbb{V}}^2+\lambda\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2&\leq\frac{1}{2}\|\boldsymbol{f}\|_{\mathbb{V}}^2+\frac{1}{2}\|\boldsymbol{y}\|_{\mathbb{V}}^2\Rightarrow \|\boldsymbol{y}\|_{\mathbb{V}}\leq\|\boldsymbol{f}\|_{\mathbb{V}}, \end{align*} for all $\lambda>0.$ Thus from the definition of $\mathcal{K}$ we have $\boldsymbol{y}\in\mathcal{K}$ and this imply $(\mathrm{I}+\lambda\mathrm{A})^{-1}\mathcal{K}\subset\mathcal{K}.$ We will find a feedback control so that enstrophy of the system kept inside this constraint set $\mathcal{K}.$ The normal cone corresponding to the convex set $\mathcal{K}$ is \begin{align*} N_{\mathcal{K}}(\boldsymbol{y})= \begin{cases} \boldsymbol{0}, &\text{ if } \ \|\nabla\boldsymbol{y}\|_{\mathbb{H}}<\varpi ,\\ \bigcup\limits_{\lambda>0} \lambda\mathrm{A}\boldsymbol{y}, &\text{ if } \ \|\nabla\boldsymbol{y}\|_{\mathbb{H}}=\varpi . \end{cases} \end{align*} The feedback control is given by $$\mathbf{U}(\cdot)\in-N_{\mathcal{K}}(\boldsymbol{y}(\cdot)).$$ For $\|\nabla\boldsymbol{y}\|_{\mathbb{H}}<\varpi$, that is, when the flow remain inside the constraint set $\mathcal{K}$, we have $\mathbf{U}(t)=\boldsymbol{0}.$ For $\|\nabla\boldsymbol{y}\|_{\mathbb{H}}=\varpi$, \begin{align}\label{appl1.4} \mathbf{U}(t)=-\lambda_0\mathrm{A}\boldsymbol{y}(t), \ \text{for a.e.} \ t\in[0,T], \end{align} for some $\lambda_0>0$. Then from \eqref{appl1.3}, we have \begin{align*} \mathbf{U}(t)=&-\boldsymbol{f}(t)+\mu\mathrm{A}\boldsymbol{y}(t)+\mathrm{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+ \frac{\d^+ \boldsymbol{y}(t)}{\d t}. \end{align*} Taking the inner product with $\mathrm{A}\boldsymbol{y}$ and using \eqref{appl1.4}, we obtain \begin{align*} \lambda_0=\frac{-1}{\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2}\left[(\boldsymbol{f},\mathrm{A}\boldsymbol{y})-\mu\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2-b(\boldsymbol{y},\boldsymbol{y},\mathrm{A}\boldsymbol{y})-(\mathcal{C}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y})\right], \end{align*} where we have used the fact that \begin{align*} \left(\frac{\d^+ \boldsymbol{y}(t)}{\d t},\mathrm{A}\boldsymbol{y}(t)\right)=\frac{\d^+}{\d t}\|\nabla\boldsymbol{y}(t)\|_{\mathbb{H}}^2=0. \end{align*} Therefore the feedback control becomes \begin{align*} \mathbf{U}(t)=\frac{-\mathrm{A}\boldsymbol{y}(t)}{\|\mathrm{A}\boldsymbol{y}(t)\|_{\mathbb{H}}^2}\left\{(\boldsymbol{f}(t),\mathrm{A}\boldsymbol{y}(t))-\mu\|\mathrm{A}\boldsymbol{y}(t)\|_{\mathbb{H}}^2-b(\boldsymbol{y}(t),\boldsymbol{y}(t),\mathrm{A}\boldsymbol{y}(t))-(\mathcal{C}(\boldsymbol{y}(t)),\mathrm{A}\boldsymbol{y}(t))\right\}, \end{align*} for all $t\in[0,T)$. Thus, for $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathcal{K}$ and $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$, and the feedback control given above, the closed loop problem \eqref{appl1.1} has a unique solution $\boldsymbol{y}\in\mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap\mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))$ which satisfies $$\boldsymbol{y}(t)\in\mathcal{K},\ \text{ for all }\ t\in[0,T].$$ We refer the interested readers to \cite{VBSS} for some other important flow invariance problems like localized dissipation, pointwise velocity constraints, pointwise vorticity contraint, helicity invariance, etc. \subsection{A time optimal control problem (\cite{TiOp1,TiOp2})} Let us discuss the following time optimal control for CBF equations \begin{equation}\label{appl2.1} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))&= \mathbf{U}(t), \ \text{for a.e.} \ t>0, \ \text{in} \ \mathbb{H},\\ \boldsymbol{y}(0)&=\boldsymbol{y}_0, \end{aligned} \right. \end{equation} Let $\kappa>0$ and we define the \textsl{class of controls} \begin{align*} \mathcal{U}_\kappa=\{\mathbf{U}(\cdot)\in\mathrm{L}^{\infty}(\mathbb{R}^+;\mathbb{H}):\|\mathbf{U}(t)\|_{\mathbb{H}}\leq\kappa, \ \text{a.e.} \ t>0\}. \end{align*} Let $\boldsymbol{y}_0$ and $\boldsymbol{y}_1$ be arbitrary but fixed. A control $\mathbf{U}(\cdot)\in\mathcal{U}_\kappa$ is said to be admissible if it steers from the (initial state) $\boldsymbol{y}_0$ to the (target) $\boldsymbol{y}_1$ in a finite time $T$ along the trajectory $\boldsymbol{y}(t;\boldsymbol{y}_0,\mathbf{U}(\cdot))$ of \eqref{appl2.1} which starts from $\boldsymbol{y}_0.$ We assume that the class of all such controls (\textsl{admissible class}) is nonempty. Let $T(\boldsymbol{y}_0,\boldsymbol{y}_1)$ be the infimum of all such times and it is called \textsl{minimal time}, that is, \begin{align*} T(\boldsymbol{y}_0,\boldsymbol{y}_1):= \inf_{T\in\mathbb{R}^+}\{T:\boldsymbol{y}(T;\boldsymbol{y}_0,\mathbf{U}(\cdot))=\boldsymbol{y}_1,\mathbf{U}(\cdot)\in\mathcal{U}_\kappa\}. \end{align*} A control $\mathbf{U}^*(\cdot)$ such that $\boldsymbol{y}(T(\boldsymbol{y}_0,\boldsymbol{y}_1);\boldsymbol{y}_0,\mathbf{U}^*(\cdot))=\boldsymbol{y}_1$ is called \textsl{time optimal control} and the time $T(\boldsymbol{y}_0,\boldsymbol{y}_1)$ is said to be \textsl{optimal time.} The pair $(\boldsymbol{y}^*,\mathbf{U}^*)$ is called the \textsl{time optimal pair}, where $\boldsymbol{y}^*=\boldsymbol{y}(t;\boldsymbol{y}_0,\mathbf{U}^*).$ We define a multivalued operator $\mathrm{sgn}:\mathbb{H}\to\mathbb{H}$ by \begin{align*} \mathrm{sgn}\boldsymbol{y}= \begin{cases} \frac{\boldsymbol{y}}{\|\boldsymbol{y}\|_{\mathbb{H}}}, &\text{ if } \ \boldsymbol{y}\neq\mathbf{0},\\ \{\boldsymbol{z}\in\mathbb{H}:\|\boldsymbol{z}\|_{\mathbb{H}}\leq 1\}, &\text{ if } \ \boldsymbol{y}=\mathbf{0}, \end{cases} \end{align*} which is the subdifferential of $\|\boldsymbol{y}\|_{\mathbb{H}}$ and hence it is maximal monotone in $\mathbb{H}\times\mathbb{H}$ (\cite[Theorem 2.1, Chapter 2]{VB2}). From \cite[Proposition 2.4, Chapter 4]{VB2}, the Yosida approximation of $\mathrm{B}:=\kappa\ \mathrm{sgn}(\cdot)$ is given by \begin{align*} \mathrm{B}_\lambda(\boldsymbol{y})=\frac{1}{\lambda}\left(\boldsymbol{y}-\left(\mathrm{I}+\lambda\mathrm{B}\right)^{-1}\boldsymbol{y}\right)= \begin{cases} \frac{\kappa\boldsymbol{y}}{\|\boldsymbol{y}\|_{\mathbb{H}}}, &\text{ if } \ \|y\|_{\mathbb{H}}\geq\lambda,\\ \frac{\kappa}{\lambda}\boldsymbol{y}, &\text{ if } \ \|y\|_{\mathbb{H}}<\lambda. \end{cases} \end{align*} From the above definition, we conclude that \begin{align*} (\mathrm{A}\boldsymbol{y},\mathrm{B}_\lambda(\boldsymbol{y}-\boldsymbol{y}_1))\geq0, \ \text{ for all } \ \boldsymbol{y}\in\mathrm{D}(\mathrm{A}), \ \lambda>0, \end{align*} and therefore all the assumptions of Hypothesis \ref{hyp1} are satisfied. Thus we can apply the existence and uniqueness result (see Theorem \ref{thm1.1}) of strong solutions for the system \begin{equation}\label{appl2.2} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))+\kappa(\mathrm{sgn}(\boldsymbol{y}(t)-\boldsymbol{y}_1))&\ni\boldsymbol{0}, \ \text{for a.e.} \ t>0, \\ \boldsymbol{y}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation} Then the feedback law $\mathbf{U}(t)\in-\kappa(\mathrm{sgn}(\boldsymbol{y}(t)-\boldsymbol{y}_1)),$ for $t>0,$ ensures the existence of an admissible control $\mathbf{U}(\cdot)\in\mathcal{U}_\kappa$ for the system \eqref{appl2.1}, under the assumption that \begin{align}\label{appl2.3*} \|\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1)\|_{\mathbb{H}}<\kappa, \end{align} and \begin{align}\label{appl2.3} \|\boldsymbol{y}_0-\boldsymbol{y}_1\|_{\mathbb{H}}\leq\frac{\kappa-\|\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1)\|_{\mathbb{H}}}{\varrho}, \end{align} for $\boldsymbol{y}_0,\boldsymbol{y}_1\in\mathrm{D}(\mathrm{A}),$ where $\varrho$ is given as in $\eqref{prop33}.$ In order to prove this, we show that the system \eqref{appl2.2} has finite extinction property in $\mathbb{H},$ that is, $\boldsymbol{y}(T)=\boldsymbol{y}_1$ for some $T>0$ (see \cite[section 5.3, Chapter 5]{VB2}). Let us set $\boldsymbol{z}(\cdot)=\boldsymbol{y}(\cdot)-\boldsymbol{y}_1.$ Then $\boldsymbol{z}(\cdot)$ satisfies \begin{equation*} \left\{ \begin{aligned} \frac{\d \boldsymbol{z}(t)}{\d t} +\mu\mathrm{A}\boldsymbol{z}(t) &+\mathcal{B}(\boldsymbol{z}(t)+\boldsymbol{y}_1)-\mathcal{B}(\boldsymbol{y}_1) +\beta(\mathcal{C}(\boldsymbol{z}(t)+\boldsymbol{y}_1)-\mathcal{C}(\boldsymbol{y}_1))\nonumber\\+ \kappa\ \mathrm{sgn}(\boldsymbol{z}(t))&\ni-(\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1)),\ \text{for a.e.} \ t>0, \\ \boldsymbol{z}(0)&=\boldsymbol{y}_0-\boldsymbol{y}_1. \end{aligned} \right. \end{equation*} We assume that there exists no $T$ such that $\boldsymbol{z}(T)=\boldsymbol{0}.$ Taking the inner product with $\mathrm{sgn}(\boldsymbol{z}(\cdot))$ (using a smooth approximation of $\mathrm{sgn}(\boldsymbol{z}(\cdot))$ \cite{VB2}, one can justify), we get \begin{align*} &\frac{1}{2}\frac{\d }{\d t}\|\boldsymbol{z}(t)\|_{\mathbb{H}}^2+\mu\|\boldsymbol{z}(t)\|_{\mathbb{V}}^2+\kappa\|\boldsymbol{z}(t)\|_{\mathbb{H}}+(\mathcal{C}(\boldsymbol{z}(t)+\boldsymbol{y}_1)-\mathcal{C}(\boldsymbol{y}_1),\boldsymbol{z}(t))\nonumber\\&=(\mathcal{B}(\boldsymbol{y}_1)-\mathcal{B}(\boldsymbol{z}(t)+\boldsymbol{y}_1),\boldsymbol{z}(t))- (\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1),\boldsymbol{z}(t)). \end{align*} From \eqref{2.30}, \eqref{2.23} and using a calculation similar to \eqref{Z6..}, we obtain \begin{align*} \frac{1}{2}\frac{\d }{\d t}\|\boldsymbol{z}(t)\|_{\mathbb{H}}^2+\frac{\mu}{2}\|\boldsymbol{z}(t)\|_{\mathbb{V}}^2+\kappa\|\boldsymbol{z}(t)\|_{\mathbb{H}}\leq \varrho\|\boldsymbol{z}(t)\|_{\mathbb{H}}^2+\|\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1)\|_{\mathbb{H}}\|\boldsymbol{z}(t)\|_{\mathbb{H}}, \end{align*} and we can rewrite \begin{align*} \frac{\d }{\d t}\|\boldsymbol{z}(t)\|_{\mathbb{H}}+\eta\leq\varrho\|\boldsymbol{z}(t)\|_{\mathbb{H}}, \end{align*} where $\eta=\kappa-\|\mu\mathrm{A}\boldsymbol{y}_1+\mathcal{B}(\boldsymbol{y}_1)+\beta\mathcal{C}(\boldsymbol{y}_1)\|_{\mathbb{H}}>0$ and $\varrho$ is given in $\eqref{prop33}.$ By using variation of constant formula, we get \begin{align*} e^{-\varrho t}\|\boldsymbol{z}(t)\|_{\mathbb{H}}\leq\left(\|\boldsymbol{z}(0)\|_{\mathbb{H}}-\frac{\eta}{\varrho}\right)+\frac{\eta}{\varrho} e^{-\varrho t}. \end{align*} This shows as $t\to\infty$ we are getting contradiction to the assumption \eqref{appl2.3}. This implies that $\boldsymbol{z}=\boldsymbol{z}(t)$ has finite extinction property in time $T>0$ and this proves the existence of an admissible control $\mathbf{U}(\cdot)\in\mathcal{U}_{\kappa}.$ \subsection{Stabilizing feedback controllers} Let us consider the following controlled CBF equations: \begin{equation}\label{appl3.1} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}(t)+\mathcal{B}(\boldsymbol{y}(t))+\beta\mathcal{C}(\boldsymbol{y}(t))&= \boldsymbol{f}_e+\mathbf{U}(t), \ \text{for a.e.} \ t>0,\\ \boldsymbol{y}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation} Let $\boldsymbol{y}_e\in\mathrm{D}(\mathrm{A})$ be the steady-state (equilibrium) solution of \eqref{appl3.1}, that is, $\boldsymbol{y}_e$ satisfies \begin{equation}\label{appl3.2} \mu\mathrm{A}\boldsymbol{y}_e+\mathcal{B}(\boldsymbol{y}_e)+\beta\mathcal{C}(\boldsymbol{y}_e)= \boldsymbol{f}_e \ \text{ in } \ \mathbb{T}^{d}, \end{equation} whose solvability results are available in \cite[Theorem 4.1]{MT4}. Let $\mathcal{K}\subset\mathbb{H}$ be a closed and convex set with $\boldsymbol{0}\in\mathcal{K}$ such that \eqref{appl1..1} is satisfied. We set $\boldsymbol{z}(\cdot)=\boldsymbol{y}(\cdot)-\boldsymbol{y}_e,$ then \eqref{appl3.1} becomes \begin{equation}\label{appl3.3} \left\{ \begin{aligned} \frac{\d \boldsymbol{z}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{z}(t)+\mathcal{B}(\boldsymbol{z}(t)+\boldsymbol{y}_e)-\mathcal{B}(\boldsymbol{y}_e)+\beta\mathcal{C}(\boldsymbol{z}(t)+\boldsymbol{y}_e)-\mathcal{C}(\boldsymbol{y}_e)&= \mathbf{U}(t),\ \text{for a.e.} \ t>0,\\ \boldsymbol{z}(0)&=\boldsymbol{y}_0-\boldsymbol{y}_e. \end{aligned} \right. \end{equation} Let $\widetilde{\mathcal{B}}(\boldsymbol{z}(\cdot)):=\mathcal{B}(\boldsymbol{z}(\cdot)+\boldsymbol{y}_e)-\mathcal{B}(\boldsymbol{y}_e)$ and $\widetilde{\mathcal{C}}(\boldsymbol{z}(\cdot)):=\mathcal{C}(\boldsymbol{z}(\cdot)+\boldsymbol{y}_e)-\mathcal{C}(\boldsymbol{y}_e).$ Then \eqref{appl3.3} becomes \begin{equation}\label{appl3.3.} \left\{ \begin{aligned} \frac{\d \boldsymbol{z}(t)}{\d t} +\mu\mathrm{A}\boldsymbol{z}(t)+\widetilde{\mathcal{B}}(\boldsymbol{z}(t))+\widetilde{\mathcal{C}}(\boldsymbol{z}(t))&= \mathbf{U}(t), \ \text{for a.e.} \ t>0,\\ \boldsymbol{z}(0)&=\boldsymbol{y}_0-\boldsymbol{y}_e. \end{aligned} \right. \end{equation} Using Step IV in the proof of Proposition \ref{prop33}, it is clear that $\widetilde{\mathcal{B}}(\cdot)$ and $\widetilde{\mathcal{C}}(\cdot)$ map from $\mathrm{D}(\mathrm{A})$ to $\mathbb{H}$. Therefore the operator $$\mu\mathrm{A}+\widetilde{\mathcal{B}}(\cdot)+\beta\widetilde{\mathcal{C}}(\cdot)+\theta\mathrm{I}+\partial\mathrm{I}_{\mathcal{K}}(\cdot),$$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}$ for $\theta>0$ is sufficiently large. Let $$\Phi(\boldsymbol{w}):=\theta\boldsymbol{w}+\partial\mathrm{I}_{\mathcal{K}}(\boldsymbol{w}),$$ for all $\boldsymbol{w}\in\mathbb{H}.$ Since $\mathrm{D}(\partial\mathrm{I}_{\mathcal{K}})=\mathcal{K}$ and $\mathcal{K}\subset\mathbb{H}$, then from \cite[Chapter 2, Theorem 2.3]{VB2}, we can write for all $\boldsymbol{w}\in\mathbb{H}$ $$\Phi(\boldsymbol{w})=\partial\left(\frac{\theta}{2}\|\boldsymbol{w}\|_{\mathbb{H}}^2+\mathrm{I}_{\mathcal{K}}(\boldsymbol{w})\right).$$ Clearly $\mathbf{0}\in\mathrm{D}(\Phi)=\mathcal{K}$. Also, from \cite[Chapter IV, Proposition 1.1, part (iv)]{VB1}, we have $$(\Phi(\boldsymbol{w}),\mathrm{A}\boldsymbol{w})\geq0.$$ Thus the Hypothesis \ref{hyp1} is satisfied. Therefore, we can apply the existence and uniqueness result (see Theorem \ref{thm1.1}) for the inclusion problem \begin{equation}\label{appl3.4} \left\{ \begin{aligned} \frac{\d \boldsymbol{z}(t)}{\d t} +\mu\mathrm{A}\boldsymbol{z}(t)+\widetilde{\mathcal{B}}(\boldsymbol{z}(t))+\widetilde{\mathcal{C}}(\boldsymbol{z}(t))+\theta\boldsymbol{z}(t)+\partial\mathrm{I}_{\mathcal{K}}(\boldsymbol{z}(t))&\ni \boldsymbol{0}, \ \text{for a.e.} \ t>0,\\ \boldsymbol{z}(0)&=\boldsymbol{y}_0-\boldsymbol{y}_e. \end{aligned} \right. \end{equation} We intend to find a feedback controller $\mathbf{U}(\cdot)$ given by $\mathbf{U}(t)\in-\theta\boldsymbol{z}(t)-\partial\mathrm{I}_{\mathcal{K}}(\boldsymbol{z}(t)$ which statbilizes the equilibrium solution $\boldsymbol{y}_e$ exponentially under the invariance condition that $\boldsymbol{y}_0-\boldsymbol{y}_e\in\mathcal{K},$ then $\boldsymbol{y}(t)-\boldsymbol{y}_e\in\mathcal{K}$ for all $t\geq0.$ The stability part will be discussed in a future work. \begin{appendix} \renewcommand{\thesection}{\Alph{section}} \numberwithin{equation}{section} \section{The case of $d=2,3$ and $r\in[1,3]$} \label{Appen.}\setcounter{equation}{0} The case of $d=2,3$ and $r\in[1,3]$ is considered in this section. We quantize the Navier-Stokes nonlinearity $\mathcal{B}(\cdot)$ and prove monotonicity property. The authors in \cite{VBSS} took a $\mathbb{V}$-ball for quantization, while we are taking an $\widetilde\mathbb{L}^4$-ball. Define the quantized nonlinearity as \begin{equation}\label{Q1} \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}) = \begin{cases} \mathcal{B}(\boldsymbol{y}), \ & \text{ if } \ \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}} \leq \mathrm{N},\\ \biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\mathcal{B}(\boldsymbol{y}), \ &\text{ if } \ \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}} > \mathrm{N}, \end{cases} \end{equation} where $\mathrm{N}\in\mathbb{N}^*:=\mathbb{N}\cup\{0\}.$ \begin{lemma}\label{lem3.1} The operator $\mathcal{B}_{\mathrm{N}}(\cdot):\mathbb{V}\to\mathbb{V}'$ satisfies \begin{align}\label{3.3} |\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{z}), \boldsymbol{y}-\boldsymbol{z} \rangle|\leq\frac{\mu}{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+C_\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}, \ \text{ for all } \ \boldsymbol{y}, \boldsymbol{z}\in\mathbb{V}, \end{align} where $\mu>0$ is the same as in \eqref{1}. \end{lemma} \begin{proof} \vskip 2mm \noindent Without loss of generality, one may assume that $\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^4}\leq \|\boldsymbol{z}\|_{\widetilde\mathbb{L}^4}. $ Therefore, we need to consider the following three cases: \vskip 2mm \noindent \textsl{Case I}: \textit{$\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}},\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}} \leq \mathrm{N}.$} Using \eqref{b0}, H\"older's, Ladyzhenskaya's and Young's inequalities, we have \begin{align}\label{35} &|\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{z}), \boldsymbol{y}-\boldsymbol{z} \rangle| \nonumber\\&=|\langle\mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\rangle|= |\langle\mathcal{B}(\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z}\rangle|\nonumber\\&\leq C\|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}} \|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}} \|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}\leq C\mathrm{N} \|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}} \nonumber\\&\leq C\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{1-\frac{d}{4}}\|\boldsymbol{y}-\boldsymbol{z}\|^{1+\frac{d}{4}}_{\mathbb{V}} \leq \frac{\mu}{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+C_\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}. \end{align} \vskip 2mm \noindent \textsl{Case II: $\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}},\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}} > \mathrm{N}.$} Let us first consider \begin{align}\label{e0} & \langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{z}), \boldsymbol{y}-\boldsymbol{z} \rangle\nonumber\\& = \biggl \langle\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\mathcal{B}(\boldsymbol{y})-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\biggl\rangle\nonumber \\&=\biggl[\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr]\langle\mathcal{B}(\boldsymbol{y}),\boldsymbol{y}-\boldsymbol{z}\rangle+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4} \langle \mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}) , \boldsymbol{y}-\boldsymbol{z} \rangle. \end{align} Now by using \eqref{b0} and H\"older's inequality, we calculate \begin{align}\label{e1} |\langle \mathcal{B}(\boldsymbol{y}),\boldsymbol{y}-\boldsymbol{z} \rangle| &= |\langle \mathcal{B}(\boldsymbol{y},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z} \rangle| \leq \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}, \end{align} By Taylor's formula, \eqref{e1}, H\"older's, Ladyzhenskaya's and Young's inequalities, we obtain \begin{align*} & \biggl|\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}- \biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr| |\langle \mathcal{B}(\boldsymbol{y}),\boldsymbol{y}-\boldsymbol{z} \rangle|\nonumber\\&\leq 4\left(\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)\right)^3\left|\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}-\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\right||\langle\mathrm{B}(\boldsymbol{y},\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{z}\rangle|\nonumber\\&\leq C\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\widetilde\mathbb{L}^4}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq \frac{\mu}{4}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+C_\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}. \end{align*} A calculation similar to \eqref{35} yields \begin{align} & \left|\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4} \langle \mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}) , \boldsymbol{y}-\boldsymbol{z} \rangle\right|\leq \frac{\mu}{4}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+C_\mathrm{N}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}. \end{align} Combining the above estimates imply \eqref{3.3}. \vskip 2mm \noindent \textsl{Case III: $\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\leq\mathrm{N}$ and $\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}} > \mathrm{N}.$} One can rewrite \begin{align*} & \langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{z}), \boldsymbol{y}-\boldsymbol{z} \rangle \nonumber\\& = \biggl \langle\mathcal{B}(\boldsymbol{y})-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\mathcal{B}(\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z}\biggr\rangle\nonumber \\&=\biggl[1-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr]\langle\mathcal{B}(\boldsymbol{y}),\boldsymbol{y}-\boldsymbol{z}\rangle+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4} \langle \mathcal{B}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{z}) , \boldsymbol{y}-\boldsymbol{z} \rangle. \end{align*} As $1-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}=\frac{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}^{4}-\mathrm{N}^{4}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}\leq\frac{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}^{4}-\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}{\|\boldsymbol{z}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}$, one can use the estimates in the previous cases to conclude \eqref{3.3}. \end{proof} \begin{proposition}\label{prop3.2} For $d=2,3$ and $1\leq r\leq 3$, define the operator $\Upsilon_{\mathrm{N}}:\mathrm{D}(\Upsilon_{\mathrm{N}})\to\mathbb{H}$ by $$\Upsilon_{\mathrm{N}}(\cdot):= \mu\mathrm{A}+\mathcal{B}_{\mathrm{N}}(\cdot)+\beta\mathcal{C}(\cdot),$$with $\mathrm{D}(\Upsilon_{\mathrm{N}})=\mathrm{D}(\mathrm{A})$. Moreover, there exists $\eta_{\mathrm{N}}>0$ such that $\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}.$ \end{proposition} \begin{proof} Using Lemma \ref{lem3.1}, proof follows in a similar way as the proof of Proposition \ref{prop33} with some minor modifications. \end{proof} \iffalse \begin{proof} First, we show that the operator $\Upsilon_{\mathrm{N}}:\mathrm{D}(\Upsilon_{\mathrm{N}})\to\mathbb{H}$ is well defined. Further, we show that $\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$ is monotone, demicontinuous and coercive operator for some $\eta_{\mathrm{N}}>0$. Finally, prove the $m$-accretivity of the operator $\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$ by using the abstract theory available in \cite{VB1,VB2,OPHB}, etc. The proof is divided into the following steps: \vskip 2mm \noindent \textbf{Step I:} \textsl{$ \Upsilon_{\mathrm{N}}(\cdot)$ is well defined.} For $d=2,3$ and $1\leq r\leq 3$, H\"older's and Gagliardo-Nirenberg's inequalities yield for all $\boldsymbol{y}\in\mathrm{D}(\mathrm{A})$ \begin{equation}\label{37} \left\{ \begin{aligned} \|\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}&\leq\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\|\nabla \boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\leq C \|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{\frac{4+d}{8}}\|\boldsymbol{y}\|_{\mathbb{H}}^{\frac{4-d}{8}},\\ \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}&\leq\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{2r}}^{r}\leq C\|\boldsymbol{u}\|_{\mathbb{V}}^r. \end{aligned} \right. \end{equation} Hence the operator $\Upsilon_{\mathrm{N}}(\cdot)$ is well defined on $\mathrm{D}(\mathrm{A})$ and $\mathrm{D}(\mathrm{A})\subseteq\mathrm{D}(\Upsilon_{\mathrm{N}})$. Let us now show that $\mathrm{D}(\Upsilon_{\mathrm{N}})\subseteq\mathrm{D}(\mathrm{A})$. From the definition of $\Upsilon_N(\cdot)$, we have $\mathrm{A}\boldsymbol{y}=\frac{1}{\mu}\left[\Upsilon_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}(\boldsymbol{y})-\beta\mathcal{C}(\boldsymbol{y})\right]$ and \begin{align*} &\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{\beta}{\mu}\||\boldsymbol{y}|^{\frac{r-1}{2}}\nabla\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{4\beta(r-1)}{\mu(r+1)^2}\||\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^2\nonumber\\&=\frac{1}{\mu}(\Upsilon_{\mathrm{N}}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y})-\frac{1}{\mu}\left\{\begin{array}{ll}0&\text{ for }d=2,\\ (\mathcal{B}(\boldsymbol{y}),\mathrm{A}\boldsymbol{y})&\text{ for } d=3,\end{array}\right. \end{align*} Therefore, for $d=2$, we immediately have $\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq \frac{1}{\mu}\|\Upsilon_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}.$ For the case $d=3$, we infer from the above expression that \begin{align}\label{3.8} \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq \frac{1}{\mu}\left[\|\Upsilon_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}\right] \leq \frac{1}{\mu}\|\Upsilon_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+ \epsilon\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C_{\epsilon,\mu,\mathrm{N}}, \end{align} for $\epsilon\in(0,1)$, where we have used \eqref{37}. Therefore, we conclude that $\mathrm{D}(\Upsilon_{\mathrm{N}})=\mathrm{D}(\mathrm{A})$. From the definition, using the above estimates, and Young's inequality, we infer \begin{align*} \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}&\leq\frac{1}{\mu}\left[\|\Upsilon_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}+\beta\|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}\right]\nonumber\\&\leq \frac{1}{\mu}\|\Upsilon_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+\epsilon\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C_{\epsilon,\mu,\beta,\mathrm{N}}, \end{align*} for some $\epsilon\in(0,1)$. Let us now show that $ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}:\mathbb{V}\to\mathbb{V}'$ is monotone, demicontinuous and coercive. Then an application of Example 2.3.7, \cite{OPHB} implies that the restriction of $ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ to $\mathbb{H}$ with domain $\mathrm{D}(\Upsilon_{\mathrm{N}})$ is maximal monotone in $\mathbb{H}$. \vskip 2mm \noindent \textbf{Step II:} \textsl{$ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is monotone for some $\eta_{\mathrm{N}}>0$.} We first note that \begin{align*} \langle \mu \mathrm{A}(\boldsymbol{y}-\boldsymbol{z})+\eta_{\mathrm{N}}(\boldsymbol{y}-\boldsymbol{z}),\boldsymbol{y}-\boldsymbol{z} \rangle = \mu\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+\eta_{\mathrm{N}}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}. \end{align*} By Lemma \ref{lem3.1} (see \eqref{3.3}) and \eqref{2pp11}, we infer that $\Upsilon_{\mathrm{N}}(\cdot)$ satisfies \begin{align}\label{3p10} \langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}-(\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{z}, \boldsymbol{y}-\boldsymbol{z} \rangle &\geq\frac{\mu}{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}+(\eta_{\mathrm{N}}-C_{\mathrm{N}})\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{H}}^{2}\nonumber\\ &\geq\frac{\mu}{2}\|\boldsymbol{y}-\boldsymbol{z}\|_{\mathbb{V}}^{2}, \end{align} for sufficiently large $\eta_{\mathrm{N}}\geq C_{\mathrm{N}}.$ Hence $\Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is a monotone operator. \vskip 2mm \noindent \textbf{Step III:} \textsl{$ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is demicontinuous.} Let ${\boldsymbol{y}_{n}}$ be a sequence in $\mathbb{V}$ such that $\boldsymbol{y}_{n}\to \boldsymbol{y}$ in $\mathbb{V}$. Using Sobolev's inequality, we know that the embedding $\mathbb{V}\subset\widetilde\mathbb{L}^{r+1}$ is continuous for $d=2,3$ with $r\in[1,3]$. Therefore the convergence $\boldsymbol{y}_{n}\to \boldsymbol{y}$ in $\mathbb{V}$ implies that $\boldsymbol{y}_{n}\to \boldsymbol{y}$ in $\widetilde\mathbb{L}^{r+1}$ also. In order to prove $ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is demicontinuous, we need to show that $\langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}_{n}-(\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}, \boldsymbol{z} \rangle \to 0$ as $n\to\infty,$ for all $\boldsymbol{z}\in\mathbb{V}.$ Let us consider \begin{align}\label{M11} &\langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}_{n}-(\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}, \boldsymbol{z} \rangle\nonumber\\ &= \mu\langle \mathrm{A}(\boldsymbol{y}_{n}-\boldsymbol{y}),\boldsymbol{z}\rangle +\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z}\rangle+\beta\langle \mathcal{C}(\boldsymbol{y}_{n})-\mathcal{C}(\boldsymbol{y}),\boldsymbol{z}\rangle+\eta_{\mathrm{N}}\langle \boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{z}\rangle. \end{align} Note that \begin{align}\label{311} & |\mu\langle \mathrm{A}(\boldsymbol{y}_{n}-\boldsymbol{y}),\boldsymbol{z}\rangle+\eta_{\mathrm{N}}\langle \boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{z}\rangle|\nonumber\\&\leq\mu\|\boldsymbol{y}_n-\boldsymbol{y}\|_{\mathbb{V}}\|\boldsymbol{z}\|_{\mathbb{V}}+\eta_{\mathrm{N}}\|\boldsymbol{y}_n-\boldsymbol{y}\|_{\mathbb{H}}\|\boldsymbol{z}\|_{\mathbb{H}}\to 0\ \text{ as }\ n\to\infty. \end{align} Let us first now show that \begin{align}\label{312} |\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z}\rangle|\to0\ \text{ as }\ n\to\infty,\ \text{ for all }\ \boldsymbol{z}\in\mathbb{V}. \end{align} We divide the proof into the following cases: \vskip 2mm \noindent \textsl{Case I}: \textit{$\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}},\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}} \leq \mathrm{N}.$} We calculate $|\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z}\rangle|$ using H\"older's and Young's inequalities as \begin{align}\label{313} |\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z} \rangle| &=|\langle\mathcal{B}(\boldsymbol{y}_{n})-\mathcal{B}(\boldsymbol{y}),\boldsymbol{z}\rangle| \nonumber\\ &\leq |b(\boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{y}_{n},\boldsymbol{z})|+|b(\boldsymbol{y},\boldsymbol{y}_{n}-\boldsymbol{y},\boldsymbol{z})|\nonumber\\& \leq C\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}(\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq C_{\mathrm{N}}\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\|\boldsymbol{z}\|_{\mathbb{V}}, \end{align} which shows that $\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z} \rangle\to 0$ as $n\to\infty,$ for all $\boldsymbol{z}\in\mathbb{V}.$ \vskip 2mm \noindent \textsl{Case II}: \textit{$\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}},\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}>\mathrm{N}.$} We write as in case II of Lemma \ref{lem3.1} \begin{align}\label{Z3} \langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}), \boldsymbol{z} \rangle&=\biggl[\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr]\langle\mathcal{B}(\boldsymbol{y}_{n}),\boldsymbol{z}\rangle\nonumber \\ &\qquad+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4} \langle \mathcal{B}(\boldsymbol{y}_{n})-\mathcal{B}(\boldsymbol{y}) , \boldsymbol{z} \rangle. \end{align} Now, by using Taylor's formula, H\"older's, Gagliardo-Nirenberg's and Young's inequalities, we obtain \begin{align}\label{Z4} & \biggl|\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}- \biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr| |\langle \mathcal{B}(\boldsymbol{y}_{n}),\boldsymbol{z} \rangle|\nonumber\\&\leq 4\left(\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)\right)^3\left|\frac{\mathrm{N}}{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}}-\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\right||\langle\mathrm{B}(\boldsymbol{y}_{n},\boldsymbol{z}),\boldsymbol{y}_{n}\rangle|\nonumber\\&\leq\frac{C\mathrm{N}\|\boldsymbol{y}_{n}\|_{\widetilde\mathbb{L}^{4}}}{\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}}\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq \frac{C\mathrm{N}(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}+\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}})}{\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}}\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq C(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}}^{2}+\mathrm{N}\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde\mathbb{L}^{4}})\|\boldsymbol{z}\|_{\mathbb{V}}. \end{align} From the estimate \eqref{Z4} together with case I, we get from \eqref{Z3} that $\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z} \rangle\to 0$ as $n\to\infty,$ for all $\boldsymbol{z}\in\mathbb{V}.$ \vskip 2mm \noindent \textsl{Case III}: \textit{$\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}\leq\mathrm{N},\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}>\mathrm{N}.$} It can be easily seen that \begin{align*} \langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z} \rangle &=\biggl[1-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\biggr]\langle\mathcal{B}(\boldsymbol{y}_{n}),\boldsymbol{z}\rangle+\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4} \langle \mathcal{B}(\boldsymbol{y}_{n})-\mathcal{B}(\boldsymbol{y}),\boldsymbol{z}\rangle. \end{align*} As $1-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}=\frac{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}-\mathrm{N}^{4}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}\leq\frac{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}-\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}$, we have \begin{align*} &\left|1-\biggl(\frac{\mathrm{N}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\biggr)^{4}\right||\langle\mathcal{B}(\boldsymbol{y}_{n}),\boldsymbol{z}\rangle|\nonumber\\& \leq\frac{4(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})(\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})^3}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}\|\boldsymbol{y}_{n}\|_{\widetilde\mathbb{L}^{4}}^{2}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq \frac{C(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})(\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}^{3}+\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{3})}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}\|\boldsymbol{y}_{n}\|_{\widetilde\mathbb{L}^{4}}^{2}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq C(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})\left(\frac{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}^{3}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}+\frac{1}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\right)\|\boldsymbol{y}_{n}\|_{\widetilde\mathbb{L}^{4}}^{2}\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq C(\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}})\left(\frac{\|\boldsymbol{y}_{n}\|_{\widetilde{\mathbb{L}}^{4}}^{5}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}^{4}}+\frac{\|\boldsymbol{y}_{n}\|_{\widetilde\mathbb{L}^{4}}^{2}}{\|\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}}\right)\|\boldsymbol{z}\|_{\mathbb{V}}\nonumber\\&\leq C_{\mathrm{N}}\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\widetilde{\mathbb{L}}^{4}}\|\boldsymbol{z}\|_{\mathbb{V}}, \end{align*} which clearly implies that $\langle \mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{n})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}),\boldsymbol{z} \rangle\to 0$ as $n\to\infty,$ for all $\boldsymbol{z}\in\mathbb{V}.$ Hence from \eqref{M11}, we immediately have $$\langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}_{n}-(\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})\boldsymbol{y}, \boldsymbol{z} \rangle\to 0 \ \text{ as } \ n\to\infty,$$ whenever $\|\boldsymbol{y}_{n}-\boldsymbol{y}\|_{\mathbb{V}}\to 0$ as $n\to\infty.$ Thus the operator $\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}:\mathbb{V}\to\mathbb{V}'$ is demicontinuous and hence it is hemicontinuous. \vskip 2mm \noindent \textbf{Step IV:} \textsl{$ \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is coercive.} We have to show that $\lim\limits_{\|\boldsymbol{y}\|_{\mathbb{V}}\to\infty}\frac{\langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})(\boldsymbol{y}),\boldsymbol{y}\rangle}{\|\boldsymbol{y}\|_{\mathbb{V}}}=\infty.$ From \eqref{3p10}, it can be easily seen that \begin{align*} \langle (\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I})(\boldsymbol{y}),\boldsymbol{y}\rangle\geq\frac{\mu}{2}\|\boldsymbol{y}\|_{\mathbb{V}}^{2} , \end{align*} so that the operator $\Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is coercive. \vskip 2mm \noindent \textbf{Step V:} \textsl{$\mathrm{F}_{\mathrm{N}}(\cdot):= \Upsilon_{\mathrm{N}}(\cdot)+\eta_{\mathrm{N}}\mathrm{I}$ is $m$-accretive in $\mathbb{H}\times\mathbb{H}.$} Let us consider the operator $$\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})=\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})+\beta\mathcal{C}(\boldsymbol{y})+\eta_{\mathrm{N}}\boldsymbol{y},\ \text{ for all }\ \boldsymbol{y}\in\mathrm{D}(\mathrm{F}_{\mathrm{N}}),$$ where $\mathrm{D}(\mathrm{F}_{\mathrm{N}})=\{\boldsymbol{y}\in\mathbb{V}:\mu\mathrm{A}\boldsymbol{y}+\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})+\mathcal{C}(\boldsymbol{y})\in\mathbb{H}\}.$ Since $\mathrm{F}_{\mathrm{N}}$ is monotone, hemicontinuous and coercive from $\mathbb{V}$ to $\mathbb{V}'$, by an application of Example 2.3.7, \cite{OPHB}, we obtain that $\mathrm{F}_{\mathrm{N}}$ is maximal monotone in $\mathbb{H}$ with domain $\mathrm{D}(\mathrm{F}_{\mathrm{N}})\supseteq\mathrm{D}(\mathrm{A}).$ In fact, we shall prove that $\mathrm{F}_{\mathrm{N}}$ is $m$-accretive for $\eta_{\mathrm{N}}$ sufficiently large with $\mathrm{D}(\mathrm{F}_{\mathrm{N}})=\mathrm{D}(\mathrm{A}).$ For $d=2,3$, with $1\leq r\leq3$, by using H\"older's, Gagliardo-Nirenberg's, and Young's inequalities, we have \begin{align*} \|\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}&\leq C\|\boldsymbol{y}\|_{\mathbb{L}^{4}}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{\frac{d+4}{8}}\|\boldsymbol{y}\|_{\mathbb{H}}^{\frac{4-d}{8}} \leq\frac{\delta\mu}{2}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C_{\mathrm{N},\delta,\mu}\|\boldsymbol{y}\|_{\mathbb{H}},\\ \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}&\leq\|\boldsymbol{y}\|_{\mathbb{L}^{2r}}^{r}\leq\left\{\begin{array}{ll}\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^4}^r\leq C_{\mathrm{N}},&\text{ for } 1\leq r\leq 2,\\ C\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{\frac{d(r-2)}{8-d}}\|\boldsymbol{y}\|_{\mathbb{L}^{4}}^{\frac{2r(4-d)+2d}{8-d}} \leq\frac{\delta\mu}{2\beta}\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C_{\mathrm{N},\delta,\mu,\beta},&\text{ for } 2\leq r\leq 3,\end{array}\right. \end{align*} for every $\delta>0$. We further have \begin{align*} \mathrm{A}\boldsymbol{y}&=\frac{1}{\mu}\left(\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})-\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})-\beta\mathcal{C}(\boldsymbol{y})-\eta_{\mathrm{N}}\boldsymbol{y}\right), \end{align*} and \begin{align*} \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}&\leq\frac{1}{\mu}\left(\|\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+\|\mathcal{B}_{\mathrm{N}}(\boldsymbol{y})\| +\beta\|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}+\eta_{\mathrm{N}}\|\boldsymbol{y}\|_{\mathbb{H}}\right)\nonumber\\&\leq \frac{1}{\mu}\|\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+\delta\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C_{\mathrm{N},\delta,\mu,\beta},\nonumber \end{align*} for $\delta\in(0,1).$ Therefore, we obtain \begin{align*} (1-\delta)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq\frac{1}{\mu}\|\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+C_{\mathrm{N},\delta,\mu,\beta}, \end{align*} and hence $\mathrm{D}(\mathrm{F}_{\mathrm{N}})=\mathrm{D}(\mathrm{A})$. Since, $\mathrm{F}_{\mathrm{N}}=\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$, from \eqref{3.8}, we conclude for $\epsilon\in(0,1)$ \begin{align*} (1-\epsilon)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq\frac{1}{\mu}\|\mathrm{F}_{\mathrm{N}}(\boldsymbol{y})\|_{\mathbb{H}}+C_{\epsilon,\mu,\mathrm{N}}, \end{align*} so that $\mathrm{D}(\mathrm{F}_{\mathrm{N}})\subseteq\mathrm{D}(\mathrm{A}).$ Let us consider the operators for some $\delta_1, \delta_2\in(0,1)$ as \begin{align} \mathrm{F}_{\mathrm{N}}^{1}(\cdot) &= \mu(1-\delta_1)\mathrm{A}+\beta(1-\delta_2)\mathcal{C}(\cdot),\label{3.145}\\ \mathrm{F}_{\mathrm{N}}^{2}(\cdot) &= \mu\delta_1\mathrm{A}+\mathcal{B}_{\mathrm{N}}(\cdot)+\beta\delta_2\mathcal{C}(\cdot)+\eta_{\mathrm{N}}\mathrm{I},\label{3.146} \end{align} where $\mathrm{D}(\mathrm{F}_{\mathrm{N}}^{1})=\{\boldsymbol{y}\in\mathbb{V}:\mathrm{F}_{\mathrm{N}}^1(\cdot)\in\mathbb{H}\}$ and $\mathrm{D}(\mathrm{F}_{\mathrm{N}}^{2}) = \{\boldsymbol{y}\in\mathbb{V}:\mathrm{F}_{\mathrm{N}}^{2}(\cdot)\in\mathbb{H}\}.$ Taking the inner product with $\mathrm{A}\boldsymbol{y}$ in \eqref{3.145} and using \eqref{3}, we get \begin{align*} \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^{2}+\beta(1-\delta_2) \left[\||\boldsymbol{y}|^{\frac{r-1}{2}}\nabla\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{4(r-1)}{(r+1)^2}\||\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^2\right]=(\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y}),\mathrm{A}\boldsymbol{y}). \end{align*} Therefore, we have \begin{align} \|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}\leq\frac{1}{\mu(1-\delta_1)}\|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}},\ \text{ and }\ \mathrm{D}(\mathrm{F}_{\mathrm{N}}^1)\subseteq\mathrm{D}(\mathrm{A}). \end{align} Moreover, using Sobolev's inequality, we infer \begin{align*} \|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}}&\leq \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C\beta(1-\delta_2)\|\boldsymbol{y}\|_{\widetilde\mathbb{L}^{2r}}^r\nonumber\\&\leq \mu(1-\delta_1)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+C\beta(1-\delta_2)\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}^r, \end{align*} and $\mathrm{D}(\mathrm{F}_{\mathrm{N}}^1)\supseteq\mathrm{D}(\mathrm{A}). $ Taking the inner product with $\mathcal{C}(\boldsymbol{y})$ in \eqref{3.145}, we find \begin{align*} \mu(1-\delta_1)\left[\||\boldsymbol{y}|^{\frac{r-1}{2}}\nabla\boldsymbol{y}\|_{\mathbb{H}}^2+\frac{4(r-1)}{(r+1)^2}\||\nabla|\boldsymbol{y}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^2\right]+\beta(1-\delta_2)\|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}^2=(\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y}),\mathcal{C}(\boldsymbol{y})), \end{align*} so that \begin{align} \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}\leq\frac{1}{\beta(1-\delta_2)}\|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}}. \end{align} Now from \eqref{3.146}, we have \begin{align*} \|\mathrm{F}_{\mathrm{N}}^2(\boldsymbol{y})\|_{\mathbb{H}}\leq\mu\delta_1\|\mathrm{A}\boldsymbol{y}\|_{\mathbb{H}}+\|\mathcal{B}(\boldsymbol{y})\|_{\mathbb{H}}+\beta\delta_2 \|\mathcal{C}(\boldsymbol{y})\|_{\mathbb{H}}+\eta_{\mathrm{N}}\|\boldsymbol{y}\|_{\mathbb{H}} \end{align*} Using calculations similar to \eqref{3.8}, \eqref{3.147} and \eqref{3.149}, we deduce \begin{align*} \|\mathrm{F}_{\mathrm{N}}^2(\boldsymbol{y})\|_{\mathbb{H}}&\leq\frac{\mu\delta_1+\epsilon^*}{\mu(1-\delta_1)}\|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}}+\frac{\delta_2}{1-\delta_2}\|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}}+\eta_{\mathrm{N}}\|\boldsymbol{y}\|_{\mathbb{H}}+C_{\epsilon^*,\mu,\mathrm{N}}\nonumber\\&\leq \left(\frac{\mu\delta_1+\epsilon^*}{\mu(1-\delta_1)}+\frac{\delta_2}{1-\delta_2}\right)\|\mathrm{F}_{\mathrm{N}}^1(\boldsymbol{y})\|_{\mathbb{H}}+\eta_{\mathrm{N}}\|\boldsymbol{y}\|_{\mathbb{H}}+C_{\epsilon^*,\mu,\mathrm{N}}, \end{align*} for some $\varepsilon^*>0$. Let us choose $\varepsilon^*$, $\delta_1$ and $\delta_2$ in such a way that $\rho=\frac{\mu\delta_1+\epsilon^*}{\mu(1-\delta_1)}+\frac{\delta_2}{1-\delta_2}<1$. For example, one can take $\delta_1=\frac{1}{6},$ $ \delta_2=\frac{1}{5}$ and $\epsilon^*=\frac{\mu}{4}$, so that $\rho=\frac{3}{4}$. Then by the celebrated perturbation theorem for nonlinear $m$-accretive operators (\cite[Theorem 3.5, Chapter II]{VB1}), we obtain that the operator $\mathrm{F}_{\mathrm{N}}^{1}+\mathrm{F}_{\mathrm{N}}^{2}$ with the domain $\mathrm{D}(\mathrm{A})$ is $m$-accretive in $\mathbb{H}$. Since $\mathrm{F}_{\mathrm{N}}^{1}+\mathrm{F}_{\mathrm{N}}^{2}=\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$ , the operator $\Upsilon_{\mathrm{N}}+\eta_{\mathrm{N}}\mathrm{I}$ is $m$-accretive in $\mathbb{H}$. \end{proof} \fi One can prove the following result similar to Proposition \ref{prop3.3}. \begin{proposition}\label{propA3} Let $\mathrm{N}\in\mathbb{N}^{*}$ be fixed. Let $\Phi\subset\mathbb{H}\times\mathbb{H}$ be a maximal monotone operator satisfying Hypothesis \ref{hyp1}. Define the multi-valued operator $\mathfrak{A}_\mathrm{N}:\mathrm{D}(\mathfrak{A}_\mathrm{N})\to\mathbb{H}$ by \begin{equation*} \mathfrak{A}_\mathrm{N}(\cdot) = \mu\mathrm{A} +\mathcal{B}_\mathrm{N}(\cdot)+\beta\mathcal{C}(\cdot)+\Phi(\cdot)+\eta_\mathrm{N}\mathrm{I} \end{equation*} with domain $\mathrm{D}(\mathfrak{A}_\mathrm{N})=\{y\in\mathbb{H}: \varnothing \neq \mathfrak{A}_\mathrm{N}(\boldsymbol{y})\subset\mathbb{H}\}$. Then $\mathrm{D}(\mathfrak{A}_\mathrm{N}) = \mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and $\mathfrak{A}_\mathrm{N}$ is a maximal monotone operator in $\mathbb{H}\times\mathbb{H},$ where $\eta_{\mathrm{N}}$ is as in Proposition \ref{prop3.2}. Moreover, there exists a constant $C$ such that \begin{align}\label{111} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^{2}&\leq C(1+\|\boldsymbol{w}\|_{\mathbb{H}}^{2}+\|\mu\mathrm{A}\boldsymbol{w} +\mathcal{B}_{\mathrm{N}}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\Phi_{\lambda}(\boldsymbol{w})\|_{\mathbb{H}}^{2})^{3}, \end{align} for every $\boldsymbol{w}\in\mathrm{D}(\mathrm{A}) \ \text{and for every} \ \lambda>0.$ Furthermore, we have \begin{align}\label{222} \|\mathrm{A}\boldsymbol{w}\|_{\mathbb{H}}^{2}&\leq C(1+\|\boldsymbol{w}\|_{\mathbb{H}}^{2}+\|\mu\mathrm{A}\boldsymbol{w} +\mathcal{B}_{\mathrm{N}}(\boldsymbol{w})+\beta\mathcal{C}(\boldsymbol{w})+\xi\|_{\mathbb{H}}^{2})^{3}, \end{align} for every $\boldsymbol{w}\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$ and for every $\xi\in\Phi(\boldsymbol{w}).$ \end{proposition} Let us now consider the following approximate equation: \begin{equation*} \left\{ \begin{aligned} \frac{\d \boldsymbol{y}_{\mathrm{N}}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}(t)+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}(t))+\Phi(\boldsymbol{y}_{\mathrm{N}}(t))&\ni \boldsymbol{f}(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}_{\mathrm{N}}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation*} Using Proposition \ref{propA3}, one can establish the following results in a similar way as in the proof of Proposition \ref{prop3.5}. \begin{proposition} Let $\Phi\subset \mathbb{H}\times \mathbb{H}$ satisfy Hypothesis \ref{hyp1}. Let $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$. Then there exists a unique strong solution \begin{align*}\boldsymbol{y}_{\mathrm{N}}\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V})\end{align*}to the problem. Furthermore, $\boldsymbol{y}_{\mathrm{N}}$ is right differentiable, $\frac{\d^+\boldsymbol{y}_{\mathrm{N}}}{\d t} $ is right continuous, and \begin{equation*} \frac{\d^+ \boldsymbol{y}_{\mathrm{N}}(t)}{\d t}+\left(\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}(t)+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}(t))+\Phi(\boldsymbol{y}_{\mathrm{N}}(t))-\boldsymbol{f}(t)\right)^0= \mathbf{0}, \ \text{ for all } \ t\in[0,T]. \end{equation*} \end{proposition} \iffalse \begin{proof} From Proposition and \cite[Theorem 1.4-1.6, pg. 214-216]{VB2}, the problem has unique solution $\boldsymbol{y}_\mathrm{N}\in\mathrm{W}^{1,\infty}(0,T;\mathbb{H})$ satisfying the equation. Let $\xi_{\mathrm{N}}(t)\in\Phi(\boldsymbol{y}_\mathrm{N}(t))$ be such that \begin{align*} \frac{\d \boldsymbol{y}_{\mathrm{N}}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}(t)+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}(t))+\xi_{\mathrm{N}}(t)=\boldsymbol{f}(t), \end{align*} for a.e. $t\in[0,T]$. Since $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$, so $\boldsymbol{f}$ is absolutely continuous and subsequently $\boldsymbol{f}\in\mathrm{L}^\infty(0,T;\mathbb{H})$ and therefore $\boldsymbol{f}-\frac{\d \boldsymbol{y}_{\mathrm{N}}}{\d t}\in\mathrm{L}^\infty(0,T;\mathbb{H}).$ So from, we conclude that $\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}})+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}})+\xi_{\mathrm{N}}\in\mathrm{L}^\infty(0,T;\mathbb{H}).$ Using the estimate for $\boldsymbol{y}_{\mathrm{N}}(\cdot)$ and $\xi_{\mathrm{N}}(\cdot)\in\Phi(\boldsymbol{y}_{\mathrm{N}}(\cdot)),$ we conclude that $\mathrm{A}\boldsymbol{y}_{\mathrm{N}}\in\mathrm{L}^\infty(0,T;\mathbb{H}).$ Moreover, we have the Gelfand triple $\mathrm{D}(\mathrm{A})\subset\mathbb{V}\subset\mathbb{H},$ and \begin{align*} \boldsymbol{y}_{\mathrm{N}}\in\mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A})) \ \text{and} \ \frac{\d \boldsymbol{y}_{\mathrm{N}}(t)}{\d t}\in\mathrm{L}^\infty(0,T;\mathbb{H}), \end{align*} imply that $\boldsymbol{y}_{\mathrm{N}}\in\mathrm{C}([0,T];\mathbb{V}).$ \end{proof} A similar result holds for the system, when one replaces $\Phi$ with the Yosida approximation $\Phi_\lambda$. \fi \begin{proposition} Let $\Phi\subset \mathbb{H}\times \mathbb{H}$ satisfy Hypothesis \ref{hyp1}. Let $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$. Then there exists a unique strong solution \begin{align*} \boldsymbol{y}_{\mathrm{N}}^{\lambda}\in \mathrm{W}^{1,\infty}(0,T;\mathbb{H})\cap \mathrm{L}^{\infty}(0,T;\mathrm{D}(\mathrm{A}))\cap \mathrm{C}([0,T];\mathbb{V}) \end{align*} to the problem \begin{equation*} \left\{ \begin{aligned} \frac{\d\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))&=\boldsymbol{f}(t), \ \text{ a.e. } \ t\in(0,T), \\ \boldsymbol{y}_{\mathrm{N}}^{\lambda}(0)&=\boldsymbol{y}_0. \end{aligned} \right. \end{equation*} Furthermore, $\boldsymbol{y}_{\mathrm{N}}^{\lambda}$ is right differentiable, $\frac{\d^+\boldsymbol{y}_{\mathrm{N}}^{\lambda}}{\d t} $ is right continuous, and \begin{equation*} \frac{\d^+\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)}{\d t}+\mu\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)+\mathrm{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))= \boldsymbol{f}(t), \ \text{ for all } \ t\in[0,T). \end{equation*} \end{proposition} \iffalse \begin{proof} From Proposition \ref{prop3.2}, we know that the operator $\boldsymbol{u}\mapsto\mathrm{F}_{\mathrm{N}}(\boldsymbol{u})=\mu\mathrm{A}\boldsymbol{u}+\mathrm{B}_{\mathrm{N}}(\boldsymbol{u})+\beta\mathcal{C}(\boldsymbol{u})+\alpha_{\mathrm{N}}\boldsymbol{u}$ is maximal monotone (for $\alpha_{\mathrm{N}}$ sufficiently large) in $\mathbb{H}\times\mathbb{H}$. Since $\Phi_{\lambda}(\cdot)$ is single-valued, monotone and demicontinuous in $\mathbb{H}\times\mathbb{H}$ (cf. \cite[Proposition 1.3]{VB2}), then by \cite[Corollary 1.1, Chapter 2]{VB2} (see \cite{VB1} also), then the sum $\mathrm{F}_{\mathrm{N}}(\cdot)+\Phi_{\lambda}(\cdot)=\mu\mathrm{A}+\mathrm{B}_{\mathrm{N}}(\cdot)+\beta\mathcal{C}(\cdot)+\alpha_{\mathrm{N}}\mathrm{I}+\Phi_{\lambda}(\cdot)$ is maximal monotone in $\mathbb{H}\times\mathbb{H}$. Since $\boldsymbol{f}\in\mathrm{W}^{1,1}(0,T;\mathbb{H})$ and $\boldsymbol{y}_0\in\mathrm{D}(\mathrm{A})\cap\mathrm{D}(\Phi)$, an application of \cite[Theorem 1.8, Chapter 4]{VB2} yields the existence of a unique solution $\boldsymbol{y}_{\mathrm{N}}^{\lambda}\in\mathrm{W}^{1,\infty}(0,T;\mathbb{H})$ to the problem \eqref{}. Arguing similarly as in the proof of Proposition \ref{} and using the estimate \eqref{}, one can conclude the proof of \eqref{}-\eqref{}. \end{proof} \fi \begin{proof}[Proofs of Theorems \ref{thm1.1} and \ref{thm1.2}] For the case $d=2,3$ and $r\in[1,3]$, calculations similar to the energy estimates \eqref{356} yields \begin{align}\label{A9} & \|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{H}}^{2}+\mu\int_0^t\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{V}} ^{2} \d s+2\beta\int_0^t\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\widetilde\mathbb{L}^{r+1}}^{r+1}\d s\nonumber\\&\leq\|\boldsymbol{y}_0\|_{\mathbb{H}}^2+ \frac{1}{\mu\lambda_1}\int_0^t\|\boldsymbol{f}(s)\|_{\mathbb{H}}^{2}\d s+t\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}^{2}, \end{align} for all $t\in[0,T]$. We take the inner product with $\mathrm{A}\boldsymbol{y}_\mathrm{N}^{\lambda}(\cdot)$ in \eqref{3.29} to obtain \begin{align*} &\frac{1}{2}\frac{\d}{\d t}\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{V}}^{2}+\mu\|\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{H}}^{2} + (\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\beta\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))+\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)),\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t))\nonumber\\& =(\boldsymbol{f}(t),\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)), \end{align*} for a.e. $t\in[0,T]$. From \eqref{3}, we infer that \begin{align*} (\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}),\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda})= \||\nabla \boldsymbol{y}_{\mathrm{N}}^{\lambda}||\boldsymbol{y}_{\mathrm{N}}^{\lambda}|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}+4\left[\frac{r-1}{(r+1)^2}\right]\||\nabla|\boldsymbol{y}_{\mathrm{N}}^{\lambda}|^{\frac{r+1}{2}}|\|_{\mathbb{H}}^{2}. \end{align*} Using \cite[Lemma 3.1, pp. 404]{RT1} and \eqref{b4}, we find \begin{align*} |(\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}),\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda})|&\leq \begin{cases} 0, \ &\text{for} \ d=2,\\ \frac{\mu}{4}\|\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}\|_{\mathbb{H}}^{2}+C\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}\|_{\mathbb{V}}^{6},\ &\text{for} \ d=3. \end{cases} \end{align*} Using Hypothesis \ref{hyp1} (H.3), and the above estimates, we deduce \begin{align*} &\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{V}}^{2}+\mu\int_{0}^{t}\|\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{H}}^{2}+2\beta\int_{0}^{t}\||\nabla \boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)||\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}\d s\nonumber\\&\leq \|\boldsymbol{y}_{0}\|_{\mathbb{V}}^{2}+ 2\gamma\int_{0}^{t}(1+\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{H}}^{2})+2\varsigma\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s))\|_{\mathbb{H}}^{2} \d s+\frac{2}{\mu}\int_{0}^{t}\|\boldsymbol{f}(s)\|_{\mathbb{H}}^{2} \d s\nonumber\\&\quad+ \begin{cases} 0, &\ \text{for} \ d=2, \\ \int_{0}^{t}\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{V}}^{6}\d s, &\ \text{for} \ d=3, \end{cases} \end{align*} for all $t\in[0,T]$. From \eqref{e.3}, we obtain \begin{align}\label{A10} &\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{V}}^{2}+\mu\int_{0}^{t}\|\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{H}}^{2}+2\beta\int_{0}^{t}\||\nabla \boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)||\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}\d s\nonumber\\&\leq C+\varsigma\int_{0}^{t}\|\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s))\|_{\mathbb{H}}^{2} \d s+\begin{cases} 0, &\ \text{for} \ d=2, \\ \int_{0}^{t}\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{V}}^{6}\d s, &\ \text{for} \ d=3, \end{cases} \end{align} where $C= C\left(\|\boldsymbol{y}_0\|_{\mathbb{V}}, \|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}\right).$ Calculation similar to \eqref{e.16.} and \eqref{3.108.} yield \begin{align*} &\left|\int_0^t(\mathcal{C}(\boldsymbol{y}_{\mathrm{N}}^\lambda(s)),\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^\lambda(s)))\d s\right|\nonumber\\&\leq C\int_0^t\|\boldsymbol{y}_{\mathrm{N}}^\lambda(s)\|_{\widetilde\mathbb{L}^{2r}}^r\|\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^\lambda(s))\|_{\mathbb{H}}\d s\nonumber\\&\leq \frac{1-\mu\varsigma}{8\beta}\int_0^t\|\Phi_{\lambda}(\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s))\|_{\mathbb{H}}^{2}\d s+C\sup_{s\in[0,t]}\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{H}}^{r(2-d)+d}\int_0^t\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{V}}^{(r-1)d}\d s, \end{align*} and \begin{align*} \varsigma\int_0^t \|\Phi_{\lambda}(\boldsymbol{y}^\lambda_{\mathrm{N}}(s))\|_{\mathbb{H}}^2 \d s&\leq C+C\sup_{s\in[0,t]}\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{H}}^{r(2-d)+d}\int_0^t\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{V}}^{(r-1)d}\d s\nonumber\\&\quad+C\int_0^t \|\boldsymbol{f}(s)\|_{\mathbb{H}}^2\d s+\frac{\mu}{4}\int_0^t \|\mathrm{A\boldsymbol{y}_{\mathrm{N}}^{\lambda}}(s)\|_{\mathbb{H}}^{2} \d s. \end{align*} Therefore, from \eqref{A10} one can conclude \begin{align} &\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(t)\|_{\mathbb{V}}^{2}+\mu\int_{0}^{t}\|\mathrm{A}\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{H}}^{2}+2\beta\int_{0}^{t}\||\nabla \boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)||\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)|^{\frac{r-1}{2}}\|_{\mathbb{H}}^{2}\d s\nonumber\\&\leq C+\begin{cases} C\sup\limits_{s\in[0,t]}\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{H}}^{2}\int_0^t\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{V}}^{2(r-1)}\d s, &\ \text{for} \ d=2, \\ C\sup\limits_{s\in[0,t]}\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{H}}^{3-r}\int_0^t\|\boldsymbol{y}^{\lambda}_{\mathrm{N}}(s)\|_{\mathbb{V}}^{3(r-1)}\d s+\int_{0}^{t}\|\boldsymbol{y}_{\mathrm{N}}^{\lambda}(s)\|_{\mathbb{V}}^{6}\d s, &\ \text{for} \ d=3, \end{cases} \end{align} where $C= C\left(\|\boldsymbol{y}_0\|_{\mathbb{V}}, \|\boldsymbol{f}\|_{\mathrm{L}^2(0,T;\mathbb{H})},\|\Phi(\boldsymbol{0})\|_{\mathbb{H}}\right).$ Then one can use the similar techniques as in the proof \cite[Theorem 2.1]{AIL} to pass $\lambda\to 0$ and then use Gronwall's inequality to obtain \begin{align}\label{Q2} \|\boldsymbol{y}_{\mathrm{N}}(t)\|_{\mathbb{V}}\leq C , \ \text{ for all } \ t\in[0,T_0], \end{align} where constant $C$ is independent of $\mathrm{N}$ and $T_0=T$ for $d=2$ and $T_0<T$ for $d=3.$ Hence for large $\mathrm{N}$, we can choose $\mathrm{N}\geq C$ so that $\mathcal{B}_{\mathrm{N}}(\boldsymbol{y}_\mathrm{N})=\mathcal{B}(\boldsymbol{y}_{\mathrm{N}})$ and therefore $\boldsymbol{y}_\mathrm{N}=\boldsymbol{y}$ is a solution of \eqref{1p4} with the regularity properties given in Theorems \ref{thm1.1} and \ref{thm1.2}. So, $\boldsymbol{y}_\mathrm{N}$ satisfies \eqref{1p4} on the set \begin{align}\label{Q3} \mathrm{E}_\mathrm{N}=\{t\in[0,T]:\|\boldsymbol{y}_\mathrm{N}(t)\|_{\mathbb{V}}\leq\mathrm{N}\}. \end{align} By using Markov's inequality, we have \begin{align}\label{Q4} m([0,T]/\mathrm{E}_\mathrm{N})\leq\frac{C}{\mathrm{N}^2}, \end{align} where $m$ is the Lebesgue measure. Since $ m([0,T])=m(\mathrm{E}_\mathrm{N})+m([0,T]/\mathrm{E}_\mathrm{N}), $ for large $\mathrm{N}$, from \eqref{Q3} and \eqref{Q4}, we conclude that $m([0,T])=m(\mathrm{E_\mathrm{N}})$ and $\boldsymbol{y}(\cdot)$ satisfies \eqref{1p4} for a.e. $t\in[0,T]$. The case of $\boldsymbol{y}_0\in\mathbb{V}\cap\mathrm{D}(\Phi)$ in Theorem \ref{thm1.2} can be completed by a density argument as in the proof of \cite[Theorems 2.2 and 2.3]{AIL}. \end{proof} \end{appendix} \medskip\noindent \textbf{Acknowledgments:} The first author would like to thank Ministry of Education, Government of India - MHRD for financial assistance. K. Kinra would like to thank the Council of Scientific $\&$ Industrial Research (CSIR), India for financial assistance (File No. 09/143(0938)/2019-EMR-I). M. T. Mohan would like to thank the Department of Science and Technology (DST), India for Innovation in Science Pursuit for Inspired Research (INSPIRE) Faculty Award (IFA17-MA110). \medskip\noindent {\bf Declarations:} \noindent {\bf Ethical Approval:} Not applicable. \noindent {\bf Competing interests: } The authors declare no competing interests. \noindent {\bf Authors' contributions: } All authors have contributed equally. \noindent {\bf Funding: } CSIR, India, 09/143(0938)/2019-EMR-I (K. Kinra), DST, India, IFA17-MA110 (M. T. Mohan).
\section{Introduction} \input{introduction} \section{Study Area} \label{sec:data} \input{data} \section{Proposed method} \label{sec:method} \input{method} \section{Results} \label{sec:results} \input{results} \section{Conclusion} \label{sec:conclusion} \input{conclusion} \bibliographystyle{IEEEtran} \subsection{Architecture overview} \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{img/scheme.pdf} \caption{Schematic representation of the proposed approach. \label{fig:architecture}} \end{figure} For the counterfactual generation, we propose a GAN (generative adversarial network) inspired architecture which is summarized in Fig.~ \ref{fig:architecture}. A counterfactual $x_{\mathrm{CF}}$ is obtained for each input sample $x$ by adding a perturbation $\delta$ to the original signal: \begin{align} x_{\mathrm{CF}} = x + \delta \end{align} The perturbation $\delta$ is generated by a \emph{Noiser} module which is learned with the goal to swap the prediction of the \emph{Classifier}. Finally, a \emph{Discriminator} module is leveraged to ensure the generation of realistic counterfactual examples. \subsection{Networks implementation and training} Regarding the different components on which our framework is built on, we get inspiration by state of the art literature in the field of satellite image time series land cover mapping. For the \textit{Classifier} network we leverage the Temporal Convolutional Neural Network (TempCNN) model proposed in~\cite{PelletierWP19}. This architecture has an encoder based on several one-dimensional convolutional layers to explicitly cope with the temporal dimension of the time series data followed by two fully connected layers and a final output layer to provide the multi-class decision. For the \textit{Discriminator} network we adopt the same architecture as the \textit{Classifier} network and we replace the output layer with a single neuron with sigmoid activation function as commonly done for discriminator networks in adversarial learning~\cite{CreswellWDASB18}. Concerning the \textit{Noiser} module, it is implemented as a multi-layer perceptron network with two hidden layers (each with 128 neurons) and an output layer with the same dimensionality of the time series data. For each of the hidden layers, batch normalization, tangent activation function and a drop-out regularization are employed in this order while for the output layer only the tangent activation function is used. The tangent activation function allows us to restrict the output domain between -1 and +1 thus, facilitating the learning process of the different networks. The \textit{Classifier} model is pre-trained on the training set and, successively, frozen during the adversarial learning stage since this stage is devoted to learn the model weights associated to the \textit{Noiser} and the \textit{Discriminator} (see \cref{ssec:loss_gan}). The \textit{Noiser} module is updated with respect to a composite loss made of three parts detailed in \cref{ssec:loss_cl,ssec:loss_gan,ssec:loss_uni}. \begin{align} \mathcal{L}_{\mathrm{noiser}} = \mathcal{L}_{\mathrm{cl}} + \lambda_{\mathrm{gen}} \mathcal{L}_{\mathrm{gen}} + \lambda_{w\text{-}\ell_1} \mathcal{L}_{w\text{-}\ell_1} \end{align} \subsection{Class-swapping loss} \label{ssec:loss_cl} To generate counterfactuals that effectively change the predicted class for a given input we use the following loss: \begin{align} \mathcal{L}_{\mathrm{cl}} = - \frac{1}{n} \sum_{i=1}^n y^{(i)} \log (1 - p(y^{(i)})) \end{align} It enforces the reduction of the classifier's softmax output for the original label $y^{(i)}$, here denoted $p(y^{(i)})$, eventually leading to a change on the predicted class. Note that, conversely to standard literature~\cite{FilaliBoubrahimi2022,Lang2022} in which a target class for the counterfactual example is chosen a priori, here we purposely do not enforce the prediction of a predefined target class. Instead, we let the \emph{Noiser} free to generate a perturbation $\delta$ that will change the classifier output to any other class different from $y_i$. \subsection{GAN-based regularization for plausibility} \label{ssec:loss_gan} Counterfactual plausibility is enforced via a GAN-inspired architecture, where a discriminator is trained to identify unrealistic counterfactuals while, simultaneously, the \emph{Noiser} module acts as a generator with the goal to fool the discriminator in a two player game. The \textit{Discriminator} is updated with respect to a standard GAN loss classifying real versus fake (counterfactual) samples: \begin{align} \mathcal{L}_{\mathrm{dsc}} = - \frac{1}{n} \sum_{i=1}^n \left[ \log D(x^{(i)}) + \log \left(1 - D(x_{\mathrm{CF}}^{(i)})\right) \right] \end{align} where $D(x^{(i)})$ denotes the discriminator's output for a real input $x^{(i)}$ (with expected output 1) and $D(x_{\mathrm{CF}}^{(i)})$ its output for a fake input $x_{\mathrm{CF}}^{(i)}$ (with expected output 0). The following non-saturating generator loss is used in the \emph{Noiser} update: \begin{align} \label{eq:loss_gen} \mathcal{L}_{\mathrm{gen}} = -\frac{1}{n} \sum_{i=1}^n \log \left(D(x_{\mathrm{CF}}^{(i)})\right) \end{align} $\mathcal{L}_{\mathrm{gen}}$ is minimized when the discriminator wrongly identifies the counterfactuals as real inputs. \subsection{Unimodal regularization for time-contiguity} \label{ssec:loss_uni} To generate perturbations concentrated around a contiguous time frame we employ a weighted L1-norm penalization, with weights growing quadratically around a central time $\tilde{t}^{(i)}$ chosen independently for each sample $i \in \{1, \dots, n\}$: \begin{align} \label{eq:loss_uni} \mathcal{L}_{w\text{-}\ell_1} = \frac{1}{n} \sum^{n}_{i=1} \sum^{T}_{t=1} d(t, \tilde{t}^{(i)})^2 |\delta^{(i)}_t| \end{align} where, for the $i$-th sample, $\tilde{t}^{(i)}$ is chosen as the time step with the highest absolute value perturbation $\tilde{t}^{(i)} = \argmax_t |\delta_t^{(i)}|$. To avoid biasing $\tilde{t}$ towards the center, we use the modulo distance $d(t,\tilde{t}) = \min \left( (t-\tilde{t})\%T, (\tilde{t}- t)\%T \right)$ which treats the time samples as a circular list. This regularization also brings a degree of sparsity to the generated perturbation $\delta$, since its entries will tend to vanish when getting far away from $\tilde{t}$. Finally, penalizing the entries of $\delta$ enforces the proximity (similarity) between $x_{\mathrm{CF}}$ and $x$. \begin{comment} \subsection{Group-Lasso regularization for time-contiguity} \cfd{[Not used anymore!]} It is desirable that the generated counterfactual explanation differs from the original data at only a limited set of entries. For that purpose, a sparsity regularization is often added to the generated perturbation $\delta$. Unstructured sparsity constraints ($\ell_1$ or $\ell_0$ penalizations) have been used in the literature. However, in the context of time series data, it is strongly desirable that the sparse perturbations occur at contiguous segments in time, for the sake of interpretability of the obtained counterfactuals. As standard unstructured sparsity regularizers fail to meet this important requirement specific to time-indexed data, we propose to use structured group sparsity instead: \begin{align} \mathcal{L}_{\mathrm{gl}} = \end{align} where the groups are defined as in Fig. \ref{fig:groups} and the weights $w_t$ proposed in Jenatton2011 are used. This overlapping group structure allows to generate contiguous groups of non-zero data in a quite flexible manner, without pre-defining the group sizes, their location or even the number of non-zero groups. This enforces the generation of multi-modal perturbations with energy concentrated on contiguous time segments. We believe this type of induced structure to be particularly well-suited for time series data interpertability. \end{comment} \subsection{Experimental Evaluation} In this section we inspect the behaviour of the proposed method{} considering the study case introduced in Section~\ref{sec:data}. More precisely, we first provide a general analysis of the class transitions induced by the counterfactual generation process. Secondly, we discuss per-class average perturbations generated by our framework as well as specific counterfactual examples. Then, we assess the plausibility of the generated counterfactual examples via anomaly detection strategies as suggested in~\cite{FilaliBoubrahimi2022}. Finally, we perform an ablation analysis to assess the role of the different loss functions involved in the learning process of our framework. \subsection{Experimental setup} The \emph{Koumbia} study case described in Section~\ref{sec:data} was split into training, validation and test sets containing respectively 50-17-33\% of the 79961 samples. Each data sample corresponds to a (univariate) NDVI time series with 24 time samples (cf. Fig.~\ref{fig:chronology}). First, the \emph{Classifier} was trained over 1000 epochs with batch size 32 and Adam optimizer with learning rate $10^{-4}$ and weight decay of same value. The model weights corresponding to the best obtained F1-score on the validation set were kept. Then, with the classifier weights frozen, the \emph{Noiser} and \emph{Discriminator} modules are simultaneously trained over 100 epochs with batch size 128 and Adam optimizer \subsubsection*{Regularization parameters} we set $\lambda_{\mathrm{gen}}=5\!\cdot\!10^{-1}$ and $\lambda_{w\text{-}\ell_1}=5\!\cdot\!10^{-2}$ on the reported results. In practice, increasing these weights implies in further constraining the set of admissible perturbations which, in turn, leads to a smaller rate of successful counterfactual samples --i.e., those that actually change the classifier's prediction (see details in \cref{ssec:ablation}). The chosen values lead to a success rate of about 50\%. Naturally, by further relaxing these constraints (reducing $\lambda_{\mathrm{gen}}$ and $\lambda_{w\text{-}\ell_1}$) would lead to higher success rates, but the generated counterfactual samples would be of lesser quality in terms of plausibility (due to $\lambda_{\mathrm{gen}}$) as well as time localization and proximity (due to $\lambda_{w\text{-}\ell_1}$). \subsection{Visualizing class relationships} \begin{figure}[t] \centering \includegraphics[width=.49\columnwidth]{img/chord_graph_CF_train.pdf} \includegraphics[width=.49\columnwidth]{img/chord_graph_CF_test.pdf} \caption{Summary of class transitions induced by the counterfactuals. Training data (left) and test data (right), where B. stands for \emph{Bare Soil} and W. for \emph{Water} classes.} \label{fig:chord} \end{figure} The class transitions induced by the counterfactual samples are summarized in Fig.~ \ref{fig:chord}. The left (resp. right) graph was generated by feeding the obtained network with each of the training (resp. test) data samples. They present very similar behavior, which attests the fact that the proposed method generalizes well to previously unseen data. We recall that the class transitions are to no extent pre-defined on our approach; on the contrary, our method allows input samples from the same class to freely split-up into multiple target classes. Transitions obtained in such a way thus bring up valuable insights on the relation between classes. The obtained transitions are very much in line with the intuitive relation between the different classes. For instance, the three crop-related classes (\emph{Cereals}, \emph{Cotton} and \emph{Oleaginous}) form a very coherent cluster, with almost all transitions staying within the sub-group. The vegetation classes \emph{Shrubland} and \emph{Forest} are most often sent to one another, while \emph{Grassland} remains much closer to the crop classes (especially \emph{Oleaginous}). The \emph{Bare Soil} class is also most often transformed into \emph{Oleaginous}. Finally, the \emph{Water} class is very rarely modified by the counterfactual learning process, which is somewhat expected due to its very distinct characteristic (NDVI signature) compared to the other classes. The ratio of successful class-swapping counterfactual samples --i.e., those that actually change the classifier's prediction-- was 52.7\% (17947 over 34066) for the training data and 43.8\% (8765 over 20006) for the test data, considering only the samples that were correctly classified before counterfactuals. \subsection{Counterfactual examples} \begin{figure}[] \centering \includegraphics[width=.49\columnwidth, trim={0 0 0.32cm 0}]{img/avgPattern/cl0_moved2_cl3.png} \includegraphics[width=.49\columnwidth, trim={0.32cm 0 0 0}, clip]{img/avgPattern/cl3_moved2_cl0.png} \caption{Examples of average counterfactual perturbations between classes \emph{Cereals} and \emph{Grassland} on both ways. Shaded area corresponds to the standard deviation. \label{fig:average}} \end{figure} Examples of average perturbation profiles for two different class transitions are depicted in Fig~ \ref{fig:average}. It is interesting to notice how the perturbations correspond roughly to the opposite of each other, which is quite suitable since they correspond to opposite transitions between the same two classes. \begin{figure} \centering \includegraphics[width=.49\columnwidth, trim={0 0 0.55cm 0}]{img/examplesCF/cl4_to_cl5_1177.png} \includegraphics[width=.49\columnwidth,trim={0.55cm 0 0 0}, clip]{img/examplesCF/cl5_to_cl4_2207.png} \caption{Examples of original time series with corresponding counterfactual from classes \emph{Shrubland} (4) and \emph{Forest} (5) on both ways. \label{fig:examples}} \end{figure} Two illustrative examples of counterfactual explanations are shown in Fig.~\ref{fig:examples}. It is interesting to observe the similarity between the generated counterfactual and a real data example from the same class (on the neighboring plot). To transform a \emph{Shrubland} sample into a \emph{Forest} one, NDVI is added between the months of July and October. The opposite is done to obtain the reverse transition, which matches the general knowledge of such land cover classes on the considered study area. Also note that the NDVI peak is slight shifted from one class to another. From the provided examples, one can verify that the obtained counterfactual do look realistic (this aspect is further evaluated in section~\ref{ssec:inlier}) besides differing from the real signal only on a contiguous time window. These two properties have been explicitly enforced via the losses in eqs. \eqref{eq:loss_gen} and \eqref{eq:loss_uni}. \subsection{Plausibility analysis} \label{ssec:inlier} In this section, we quantify to what extent the proposed counterfactual explanations fit the original data distribution. To do so, we run an anomaly detection method, Isolation Forest \cite{Li2018}, on both the original data and corresponding counterfactuals. To attest the importance of the proposed adversarial training for the generation of realistic/plausible counterfactuals, we perform an ablation study confronting the proposed model trained with and without the generator loss in Eq.~\eqref{eq:loss_gen}. Fig.~\ref{fig:IF_eval} shows contingency matrices relating the isolation forest outputs on the original data (rows) and on the corresponding counterfactual explanations (columns). Two counterfactual generation approaches are investigated: the proposed method (left matrix) and its non-adversarial variant (right matrix). In the figures, diagonal entries correspond to matching isolation forest outputs --i.e., same prediction (inlier/outlier) for both real and counterfactual data. Later, in \Cref{tab:IF_evaluation} we compute some metrics on such contingency matrices to further quantify and summarize the behaviour of the compared methods. The proposed counterfactual model achieves impressive results, even leading to more samples identified as inliers than the real data itself (23806 against 23755), since proposed approach converts less inliers into outliers (164) than the other way around (215). The non-adversarial variant, on the other hand, obtains considerably more degraded results, as it converts as many as 4338 real inlier samples into outliers (about 20 times more). Such a gap becomes evident when looking at the corresponding accuracy and normalized mutual information (NMI) computed w.r.t. the isolation forest results on the original data (cf. \Cref{tab:IF_evaluation}). Such scores measure to what degree the inlier/outlier partitioning obtained on the counterfactual samples (for each of the two compared variants) matches the one obtained on the original data. The higher they are the better the two partitions match. The obtained results clearly show that counterfactual plausibility is achieved thanks to the adversarial training process. \begin{table}[!htb] \centering \begin{tabular}{cccc} \toprule Method & Accuracy & NMI & Inliers ratio \\ \cmidrule(lr){1-1} \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} Proposed & \textbf{98.6\%} & \textbf{0.808} & \textbf{88.9\%} \\ Non-adversarial & 83.7\% & 0.337 & 72.6\%\\ \bottomrule \end{tabular} \caption{Plausibility analysis using different performance metrics. Isolation Forest results on the real data were used as ground truth for the accuracy and NMI scores. \label{tab:IF_evaluation}} \end{table} \begin{figure} \includegraphics[width=.49\linewidth]{img/IF_evaluation/cmBoth.pdf} \hfill \includegraphics[width=.49\linewidth]{img/IF_evaluation/cmBoth_noGen.pdf} \caption{Isolation forest results on real (rows) and counterfactual data (columns). Proposed model with (left) and without (right) adversarial loss during training. Row-normalized percentages.} \label{fig:IF_eval} \end{figure} \subsection{Other ablation studies} \label{ssec:ablation} In \Cref{tab:ablation} we compare the number of successful class-swapping counterfactual samples as well as the average $\ell_2$ and $\ell_1$ norms of the perturbations $\delta$ generated by the proposed model and two variants ignoring the generator loss ($\mathcal{L}_{\mathrm{gen}}$) and the weighted-$\ell_1$ loss ($\mathcal{L}_{w\text{-}\ell_1}$), respectively. One can see that the removal of the auxiliary losses significantly bumps the class-swapping rate, but it happens at the expense of either: 1) counterfactual plausibility, as shown in the Section~\ref{ssec:inlier} for the removal of $\mathcal{L}_{\mathrm{gen}}$; 2) counterfactual proximity/similarity, as demonstrated by the dramatic increase on the norm of the generated perturbations (or, equivalently, the distance between $x$ and $x_{\mathrm{CF}}$) upon removal of $\mathcal{L}_{w\text{-}\ell_1}$. \begin{table}[!htb] \centering \begin{tabular}{cccc} \toprule Method & Class-swap CF & Average $\|\delta\|_2$ & Average $\|\delta\|_1$ \\ \cmidrule(lr){1-1} \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} Proposed & 43.8\% & 0.24 $\pm$ 0.18 & 0.76 $\pm$ 0.54 \\ Without $\mathcal{L}_{\mathrm{gen}}$ & 83.7\% & 0.97 $\pm$ 0.47 & 1.69 $\pm$ 0.99 \\ Without $\mathcal{L}_{w\text{-}\ell_1}$ & 99.6\% & 4.79 $\pm$ 0.07 & 23.3 $\pm$ 0.53 \\ \bottomrule \end{tabular} \caption{Ablation study on test data. \label{tab:ablation}} \end{table}
\section{Introduction} \label{sec:intro} Determining the ground state of large-scale interacting fermionic systems is an important challenge in quantum chemistry, materials science, and condensed matter physics. Just as electronic properties of molecules underpin their chemical reactivity \cite{fukui1952molecular,parr1984density,greeley2002electronic}, phase diagrams of solid state materials are also determined to a large degree by their ground state electronic structure \cite{leblanc2015solutions,zheng2015computation,kotliar2006electronic}. However, close to exact solution to the time-independent Schrodinger equation of a practical many-electron system remains a daunting task because the dimension of the underlying Hilbert space grows exponentially with the number of orbitals, and the computational resources required to perform calculations over such a large space can quickly exceed the capacity of current classical or quantum hardware. One promising approach to fit a large electronic structure problem into a limited amount of computational resources is to break the original system into smaller fragments, where each fragment can be solved individually from which a solution to the whole is then obtained \cite{gordon2012fragmentation,jones2020embedding,sun2016quantum}. Efforts along this direction have successfully led to various embedding schemes that significantly expand the complexity of the systems solvable using classical computational resources, such as density-based embedding theories \cite{wesolowski2015frozen,libisch2014embedded}, density-matrix embedding theories (DMET) \cite{knizia2012density,knizia2013density,wouters2016practical,wouters2017five,faulstich2022pure}, various Green's function embedding theories \cite{hettler2000dynamical,ma2021quantum,lan2017generalized,rusakov2018self,biermann2003first,kotliar2006electronic} and the bootstrap embedding theory \cite{welborn2016bootstrap,ye2019bootstrap,ye2021accurate}. The essence of such embedding-based methods is to add an additional external potential to each fragment Hamiltonian and then iteratively update the potential until some conditions on certain observables of the system are matched. Nevertheless, due to the significant cost in solving the fragment Hamiltonian itself as the fragment size increases, the applicability of such methods are limited to relatively small fragments, which may lead to incorrect predictions in systems with long-range correlations \cite{zheng2017stripe}. While approximate fragment solvers such as the coupled-cluster theory or many-body perturbation theory have greatly enhanced the applicability of such embedding methods at a reduced cost \cite{zhu2019coupled,shee2019coupled,lau2021regional}, these approximations tend to fail for strongly correlated systems due to limited treatment of electron correlation. In addition, because of limitations on computing $k$-electron reduced density matrices ($k$-RDMs for $k>2$), embedding and observable calculations beyond 2-RDM are difficult in general. Quantum computers are believed to be promising in tackling electronic structure problems more efficiently \cite{bauer2020quantum}, despite the possibility of an exponential speedup still being unclear \cite{lee2022there}. One natural idea to circumvent the problems of classical eigensolvers is to use a quantum computer to treat the fragments. By mapping each orbital to a constant (small) number of qubits, the exponentially large (in the number of orbitals) Hilbert space of an interacting fermionic system can be encoded in only a polynomial number of qubits and terms. Indeed, quantum eigensolvers such as the quantum phase estimation (QPE) \cite{abrams1999quantum} algorithm has been proposed to achieve an exponential advantage given a properly prepared input state \cite{aspuru2005simulated} with non-exponentially small overlap with the exact ground state. More recently, various variants of the variational quantum eigensolver (VQE) \cite{Peruzzo2014variational,tilly2022variational,wang2019accelerated,grimsley2019adaptive,grimsley2022adaptvqe} have been demonstrated experimentally on NISQ devices to achieve significant speedup without sacrificing accuracy as compared to classical methods. Moreover, $k$-RDMs (for any $k$) can be measured through quantum eigensolvers \cite{cramer2010efficient,zhao2021fermionic} that may circumvent the difficulty encountered on classical computers. To take the full advantage of these quantum eigensolvers within the embedding framework \cite{otten2022localized,vorwerk2022quantum,mineh2022prb,li2022toward,ma2020quantum,ma2021quantum}, two open questions immediately arise as a result of the intrinsic nature of quantum systems. Firstly, the wave function of a quantum system collapses when measured. This means any measurement of the fragment wave function is but a statistical sample (akin to Monte Carlo methods), and many measurements are needed to obtain statistical averages with sufficiently low uncertainty in order to achieve a good matching condition for the embedding. Secondly, the best way to perform matching between fragments using results from quantum eigensolvers is not clear, and most likely a new approach needs to be formulated to match fragments. Admittedly, it would be straightforward to first estimate the density matrices by collecting a number of quantum samples and then use the estimated density matrices to minimize the cost function as in classical embedding theories \cite{welborn2016bootstrap,knizia2012density}. But this approach would be very costly especially given the increasing number of elements in qubit reduced density matrices (RDMs) that need to be estimated \cite{arute2020hartree}. Could there be a quantum method for matching, as opposed to a statistical sampling-based classical approach? We address the two challenges by providing a quantum coherent matching algorithm and an adaptive sampling schedule, leading to a quantum bootstrap embedding (QBE) method based on classical bootstrap embedding \cite{welborn2016bootstrap}. Instead of matching the RDM element-by-element, the quantum matching algorithm employs a $\mathtt{SWAP}$ test \cite{barenco1997stabilization,buhrman2001quantum} to match the full RDM between overlapping regions of the fragments in parallel. Moreover, the quantum amplitude estimation algorithm \cite{brassard2002quantum,martyn2021grand} allows an extra quadratic speedup to reach a target accuracy on estimating the fragment overlap. In addition, the adaptive sampling changes the number of samples as the optimization proceeds in order to achieve an increasingly better matching conditions. The present work invites a viewpoint of treating quantum computers as \emph{coherent sampling} machines which have three major advantages, as compared to their classical counterparts. First, the exponentially large Hilbert space provided by a quantum computer allows more efficient exact ground state solver (QPE) than their classical counterpart (exact diagonalization). Second, in the case of truncation for seeking approximate solutions, the abundant Hilbert space of quantum computers enable more flexible and expressive variational ansatz than classical computers, leading to more accurate solutions. Third, the coherent nature of quantum computers allows sampling to be performed at a later stage, e.g. after quantum amplitude amplification of matching conditions to extract just the feedback desired, instead of having to read out full state of a system. The rest of the paper is organized as follows. Sec. \ref{sec:classical-be} overviews bootstrap embedding method at a high level and analyzes its scaling on classical computers, in order to motivate the need for bootstrap embedding on quantum computers. This section serves to set the notation and baseline of comparison for the rest of the paper. Sec. \ref{sec:qbe-methods} presents the theoretical framework of quantum bootstrap embedding in detail as constraint optimization problems. In Sec. \ref{sec:qbe-algorithms}, we give details of the QBE algorithm to solve the optimization problem. In Sec. \ref{sec:results}, we apply our methods to hydrogen chains under minimal basis where both classical and quantum simulation results are shown to demonstrate the convergence and sampling advantage of our QBE method. We conclude the paper in Sec. \ref{sec:conclusion} with prospects and future directions. \section{Ideas of Bootstrap Embedding} \label{sec:classical-be} The idea of Bootstrap Embedding (BE) for quantum chemistry has recently led to a promising path to tackle large-scale electronic structure problems \cite{welborn2016bootstrap,ye2019bootstrap,ye2020bootstrap}. In this section, we establish the terminology and framework that will be used in the rest of the paper. We first briefly review BE and outline the main framework of BE for computation on a classical computer in Sec. \ref{sec:embedding-hamiltonian} and \ref{sec:classical-matching-optimization} for non-chemistry readers, to set up the notation. We then begin presenting new material by discussing typical behavior and computational resource requirements for BE on classical computers in Sec. \ref{sec:classical-resource-req-behavior}, which leads to the quest for performing BE on a quantum computer in Sec. \ref{sec:quest-for-quantum-be}. \subsection{Fragmentation and Embedding Hamiltonians} \label{sec:embedding-hamiltonian} To provide a foundation for a more concrete exposition of the bootstrap embedding method, we first establish some rigorous notation for discussing molecular Hamiltonians and their associated Hilbert spaces. We will work with the molecular Hamiltonian under the second quantization formalism. Specifically, given a particular molecule of interest, define $O = \{\phi_\mu\ |\ \mu = 1,\ldots, N\}$ to be an orthonormal set of single-particle local orbitals (LOs), where $N$ is the total number of orbitals; in this work, these LOs are generated through L\"owdin's symmetric orthogonalization method \cite{lowdin1950non}. The full Hilbert space $\mathcal{H}$ for the entire molecular system is thus given by $\mathcal{H} = \mathcal{F}(O)$, where $\mathcal{F}(O)$ denotes the Fock space determined by the LOs in the set $O$. Further define the creation (annihilation) operator $c^\dagger_\mu$ ($c_\mu$) which creates (annihilates) an electron in the LO $\phi_\mu$, the molecular Hamiltonian is written in the second-quantized notation \begin{align} \hat{H} = \sum_{\mu\nu=1}^N h_{\mu\nu}c_\mu^\dagger c_\nu + \frac{1}{2}\sum^N_{\mu\nu\lambda\sigma=1}V_{\mu\nu\lambda\sigma}c^\dagger_\mu c^\dagger_\nu c_\sigma c_\lambda \label{total-ham} \end{align} where $h_{\mu\nu}$ and $V_{\mu\nu\lambda\sigma}$ are the standard one- and two-electron integrals. Note that the number of terms in the full molecular Hamiltonian $\hat{H}$ scales polynomially with the total number of orbitals $N$, but the dimension of $\mathcal{H}$ scales exponentially with $N$. Clearly, for large $N$, it will become prohibitively expensive to directly compute the exact full ground state. To circumvent this issue, we divide the full molecule into multiple smaller fragments, each equipped with its own ``embedding Hamiltonian'' which contains a number of terms that only scales polynomially with the number of orbitals \textit{in the fragment}. Given that there are potentially far fewer orbitals in each fragment than in the whole molecular system, computing the ground state of each fragment's embedding Hamiltonian can be significantly less expensive than computing the ground state of the full system. Furthermore, using the bootstrap embedding procedure to be described later, the ground states of individual fragments can, to a high degree of accuracy, be algorithmically combined to recover the desired electron densities prescribed by the exact ground state of the full system. Thus, this combination of fragmentation and bootstrap embedding can be used to reconstruct the full molecular ground state more efficiently than by direct computation alone. We now briefly review the construction of embedding Hamiltonians for each fragment. Consider a single fragment associated with a label $A$, without loss of generality, define $O^{(A)} = \{\phi_\mu\ |\ \mu = 1,\ldots, N_A\}$ with $N_A \leq N$ to be the set of LOs contained in fragment $A$; we will refer to $O^{(A)}$ as the set of fragment orbitals. Note that $O^{(A)} \subseteq O$, the set of LOs for the entire molecular system. The construction of the embedding Hamiltonian $\hat{H}^{(A)}$ for fragment $A$ begins with any solution of the ground state of the full system $\hat{H}$. For simplicity, the Hartree-Fock (HF) solution $\ket{\Phi_{\textrm{HF}}}$ is often used because it is easy to obtain on a classical computer. By invoking a Schmidt decomposition, we can write $\ket{\Phi_{\textrm{HF}}}$ with the following tensor product structure for $\forall~A$ \begin{align}\label{eq:schmidt} \ket{\Phi_{\textrm{HF}}} = \left(\sum_{i = 1}^{N_A} \lambda_i^{(A)}\ket{f_i^{(A)}} \otimes \ket{b_i^{(A)}} \right) \otimes \ket{\Psi_\textrm{env}^{(A)}}. \end{align} In the above decomposition, the $\ket{f_i^{(A)}}$ represent single-particle fragment states contained in the Fock space $\mathcal{F}(O^{(A)})$ of fragment orbitals. On the other hand, the $\ket{b_i^{(A)}}$ and $\ket{\Psi_\textrm{env}^{(A)}}$ represent Slater determinants contained in the ``environment'' Fock space $\mathcal{F}(O\setminus O^{(A)})$ of the $N-N_A$ orbitals not included in the fragment. The key difference between the single environment state $\ket{\Psi_\textrm{env}^{(A)}}$ and the various ``bath'' states $\ket{b^{(A)}_i}$ is that the bath states $\ket{b^{(A)}_i}$ are entangled with the fragment states $\ket{f_i^{(A)}}$ while $\ket{\Psi_\textrm{env}^{(A)}}$ is not; this entanglement is quantified by the Schmidt coefficients $\lambda_i^{(A)}$. Crucially, since the HF solution is used, the sum in Eq. \eqref{eq:schmidt} only has $N_A$ terms (as opposed to $2^{N_A}$ for a general many-body wave function). Denote the collection of the $N_A$ entangled bath orbitals as $O^{(A)}_{\rm bath} = \{\beta_\mu\ |\mu = 1,\ldots, N_A\}$, where each of the LOs $\beta_\mu$ are linear combinations of the original LOs not included in the fragment, $\beta_\mu \in \operatorname{Span}\{O\setminus O^{(A)}\}$. Furthermore, we denote the Fock space that corresponds to this set of entangled bath orbitals as $\mathcal{F}(O^{(A)}_{\rm bath})$. This tensor product structure of $\ket{\Phi_{\rm HF}}$ allows us to naturally decompose the Hilbert space $\mathcal{H}$ for the full molecular system into the direct product of two smaller Hilbert spaces, namely \begin{align} \mathcal{H} = \mathcal{H}^{(A)} \otimes \mathcal{H}^{(A)}_\textrm{env}, \end{align} where \begin{align} \mathcal{H}^{(A)} = \mathcal{F}(O^{(A)}) \otimes \mathcal{F}(O^{(A)}_{\rm bath}) \end{align} is the active fragment embedding space and $\mathcal{H}^{(A)}_\textrm{env}$ contains the remaining states, including $\ket{\Psi_\textrm{env}^{(A)}}$. Note that since both sets $O^{(A)}$ and $O^{(A)}_{\rm bath}$ have size $ N_A$, the fragment Hilbert space $\mathcal{H}^{(A)}$ is a Fock space spanned of just $2N_A$ single-particle orbitals. The core intuition motivating this decomposition is that, in the exact ground state of the full system, states in $\mathcal{H}^{(A)}_\textrm{env}$ are unlikely to be strongly entangled with the many-body fragment states (consider the approximate HF ground state in Eq. \eqref{eq:schmidt}, where they are perfectly disentangled); therefore, in a mean-field approximation, it is reasonable to entirely disregard the states in $\mathcal{H}^{(A)}_\textrm{env}$ when calculating the ground state electron densities on fragment $A$. Following this logic, we can define an embedding Hamiltonian $\hat{H}^{(A)}$ for fragment $A$ \textit{only} on the $2N_A$ LOs in $\mathcal{H}^{(A)}$, which will have the form \begin{align} \hat{H}^{(A)} = \sum^{2N_A}_{pq} h^{(A)}_{pq} a^{(A)\dagger}_p a^{(A)}_q + \frac{1}{2}\sum^{2N_A}_{pqrs} V^{(A)}_{pqrs} a^{(A)\dagger}_p a^{(A)\dagger}_q a^{(A)}_s a^{(A)}_r, \label{embedding-ham} \end{align} given some creation and annihilation operators $a^{(A)\dagger}_p$ and $a^{(A)}_p$, which respectively create and annihilate electrons in orbitals from the combined set $O^{(A)} \cup O^{(A)}_{\rm bath}$ for $\mathcal{H}^{(A)}$. The new one- and two- electron integrals $h^{(A)}_{pq}$ and $V^{(A)}_{pqrs}$ can be computed by projecting $\hat{H}$ into the smaller Hilbert space $\mathcal{H}^{(A)}$ (consult the Supporting Information (SI) Sec. \ref{app:frag} for details). Note that since we can choose $2N_A \ll N$, the ground state of this embedding Hamiltonian can be solved at a significantly reduced cost when compared to that of the full system Hamiltonian. We are hence prepared to generate an embedding Hamiltonian for any arbitrary fragment of the original molecular system. However, the ground state electron densities of the fragment embedding Hamiltonian are unlikely to exactly match those of the full system Hamiltonian because, as mentioned above, the embedding process may neglect some small (but nonzero) entanglement of the fragment orbitals with the environment. Because we can expect interactions in the molecular Hamiltonian to be reasonably local, we anticipate that the electron densities on orbitals near the edge of the fragment (those closest to the ``environment'') will deviate most significantly from their true values, while electron densities on orbitals toward the center of the fragment will be most accurate. To improve the accuracy of the fragment ground state wave function near the fragment edge, we employ the technique of bootstrap embedding. Broadly speaking, we first divide the full molecule into overlapping fragments such that the edge of each fragment overlaps with the center of another. Fig. \ref{fig:be-schematic}i illustrates this fragmentation strategy: for example, we see that the edge of fragment $A$ (labeled as orbital 3) coincides with the center of fragment $B$. We then apply additional local potentials to the edge sites of each fragment to match their electron densities to those on overlapping center sites of adjacent fragments. Because we expect the electron densities computed on the center sites to be closer to their true values, these added local potentials should improve the accuracy of each fragment wave function near the edges. In the next section, we will formalize this edge-to-center matching process rigorously and discuss its implementation on a classical computer. \begin{figure*}[htbp] \centering \includegraphics[width=17cm]{figures/fig1_schematic.png} \caption{Schematic of bootstrap embedding on classical (left, blue arrows) and quantum (right, red arrows) computers. The arrows indicate BE iterative loops that are used to optimize the corresponding objective functions. Starting from panel (i) (upper center), the original system is first broken into overlapping fragments (Fragmentation), where each fragment is solved using a classical (iic) (upper left) or quantum eigensolver (iiq) (upper right). In classical matching, the 1-electron reduced density matrices (1-RDM) on the overlapping sites of adjacent fragments are used to obtain the matching condition (iiic) (lower left), while in the quantum case a coherent matching protocol based on $\mathtt{SWAP}$ tests of overlapping sites combined with a single qubit measurement (iiiq) (lower right). The matching results are then used by classical computers to generate the bootstrap embedding potential $V_{\rm BE}$ (iv) (lower center) and the updated fragment embedding Hamiltonian $H_{\rm emb} + V_{\rm BE}$ (back to panel (i) in order to minimize a target objective function $\mathcal{L}$ in both classical and quantum case. \label{fig:be-schematic} } \end{figure*} \subsection{Matching Electron Densities: an Optimization Problem} \label{sec:classical-matching-optimization} As mentioned in the previous section, we intend to correct the electron density error near a fragment's edge by applying a local potential to the edge; this local potential serves to match the edge electron density of the fragment to the center electron density of an adjacent overlapping fragment, which we expect to be more accurate. In principle, to achieve an exact density matching, all $k$-electron reduced density matrices ($k$-RDM, for any $k$) on the overlapping region have to be matched. However, in practice, such matching beyond the 2-RDM is difficult on a classical computer due to the mathematical challenge that the number of terms in $k$-RDM in general increases exponentially as $k$. In addition, almost all electronic structure codes available on classical computers are programmed to deal with only 1- and 2-RDMs, despite the importance of $k$-RDMs ($k > 2$) for computing observables such as entropy and other multi-point correlation functions \cite{toldin2018entanglement}. Due to this reason, the discussion of density matching process in classical BE in this section will be based on 1-RDMs. We note that the matching process applies similarly if $k$-RDMs are matched. We begin by introducing some rigorous notation. Recall that a fragment $A$ is defined by a set of local orbitals $O^{(A)}$ which constitute the fragment. We partition this set of LOs into a subset of edge sites (or orbitals), denoted $\mathbb{E}^{(A)}$, and a subset of center sites, denoted $\mathbb{C}^{(A)}$, such that $\mathbb{E}^{(A)} \cup \mathbb{C}^{(A)} = O^{(A)}$ and $\mathbb{E}^{(A)} \cap \mathbb{C}^{(A)} = \emptyset$. Given the ground state wave function $\ket{\Psi^{(A)}}$ of the embedding Hamiltonian, we further define the 1-electron reduced density matrix (1-RDM) $\mathbf{P}^{(A)}$ according to \begin{align} P^{(A)}_{pq} = \bra{\Psi^{(A)}}a^{(A)\dagger}_pa^{(A)}_q\ket{\Psi^{(A)}} \label{1-rdm-def} \end{align} where $p,q = 1,\ldots,2N_A$ and the operators $a^{(A)\dagger}_p$ and $a^{(A)}_q$ are defined in the previous section. Suppose, for example, that the edge of fragment $A$ overlaps with the center of another fragment $B$ so that $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)} \neq \emptyset$. On a high level, the goal of bootstrap embedding is to find a ground state wave function $\ket{\Psi^{(A)}}$, perturbed by local potentials on the edge sites of $A$, such that $|P^{(A)}_{pq} - P^{(B)}_{pq}|\rightarrow 0$ for indices $p$ and $q$ that correspond to orbitals in the set of overlapping sites $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}$. More generally, and more rigorously, the goal is to find a wave function which minimizes the fragment Hamiltonian energy \begin{align} \ket{\Psi^{(A)}} = {\rm arg}\min_{\Psi^{(A)}} \innp{\hat{H}^{(A)}}_A \end{align} subject to the constraints \begin{align}\label{eq:1rdm-constraint} \innp{a^{(A)\dagger}_p a_q^{(A)}}_A - P_{pq}^{(B)} = 0 \end{align} for \textit{all} other fragments $B$ with $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)} \neq \emptyset$ and for all $p,q$ corresponding to orbitals in $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}$. Here, we explicitly write the expectation $\innp{\cdot}_A = \bra{\Psi^{(A)}} \cdot \ket{\Psi^{(A)}}$ in terms of $\ket{\Psi^{(A)}}$ to indicate that the optimization is over the wave function of $A$. We can formulate this constrained optimization problem as finding the stationary solution to a Lagrangian by associating a scalar Lagrange multiplier $(\lambda^{(A)}_{B})_{pq}$ to Eq. \eqref{eq:1rdm-constraint}. Since Eq. \eqref{eq:1rdm-constraint} has to be satisfied for any $p,q$ and $B$ that overlaps with $A$, these constraint can be rewritten in a more compact vector form $\bm{\lambda^{(A)}_{B}} \cdot \bm{\mathcal{Q}_{\textbf{1-RDM}}}(\Psi^{(A)}; \mathbf{P}^{(B)})$ where the dot product conceals the implicit sum over $p,q$, and each component of the vector $\mathcal{Q}_\textrm{1-RDM}(\Psi^{(A)}; \mathbf{P}^{(B)})_{pq}$ represents the constraint associated with Lagrange multiplier $(\lambda^{(A)}_B)_{pq}$, given by the left hand side of Eq. (\ref{eq:1rdm-constraint}). With this notation, we arrive at the following Lagrangian with the constraint added as an additional term \begin{align} \mathcal{L}^{(A)} =& \langle \hat{H}^{(A)} \rangle_A +\mathcal{E}^{(A)} \left(\bra{\Psi^{(A)}} \Psi^{(A)}\rangle -1 \right) \nonumber \\ +& \sum_{B} \bm{\lambda^{(A)}_{B}} \cdot \bm{\mathcal{Q}_{\textbf{1-RDM}}}(\Psi^{(A)}; \mathbf{P}^{(B)}) \label{eq:be_lagrangian_a}, \end{align} where once again the $B$ are fragments adjacent to $A$ with $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)} \neq \emptyset$ and $p,q$ are indices of orbitals contained in the overlapping set $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}$. Here, the additional constraint with Lagrange multiplier $\mathcal{E}^{(A)}$ is also included to ensure normalization of the ground state wave function $\ket{\Psi^{(A)}}$. Solving for the stationary solution of the Lagrangian in Eq. (\ref{eq:be_lagrangian_a}) will only result in a ground state wave function for fragment $A$ whose 1-RDM elements at the edge sites match those at the center sites of adjacent overlapping fragments. However, we would instead like to solve for such a ground state for \textit{all} fragments in the molecule simultaneously. Toward this regard, we can combine all individual fragment Lagrangians (of the form of Eq. (\ref{eq:be_lagrangian_a})) into a single composite Lagrangian for the whole molecule, given by \begin{align} \mathcal{L} = \sum_{A=1}^{N_{\rm frag}}\mathcal{L}^{(A)} + \mu \mathcal{P} \label{eq:be_lagrangian} \end{align} where $N_{\textrm{frag}}$ is the number of fragments in the molecule. Observe that we have added one additional constraint \begin{align} \mathcal{P} = \left(\sum_{A=1}^{N_{\rm frag}}\sum_{p' \in \mathbb{C}^{(A)}} \innp{a^{(A)\dagger}_{p'} a_{p'}^{(A)}}_A\right) - N_e \label{global-constraint} \end{align} with Lagrange multiplier $\mu$ to restore the desired total number of electrons in the molecule, $N_e$. Note in Eq. (\ref{global-constraint}) that $p'$ is summed over indices corresponding to orbitals only in $\mathbb{C}^{(A)}$; this is to ensure that there is no double-counting of electrons in the whole molecule. By self-consistently finding ground states $\ket{\Psi^{(A)}}$ for $A = 1,\ldots,N_{\textrm{frag}}$ which make the composite Lagrangian in Eq. (\ref{eq:be_lagrangian}) stationary, we will have completed the density matching procedure for all fragments, and the process of bootstrap embedding will be complete. We can gain insight into which wave functions $\ket{\Psi^{(A)}}$ will make the composite Lagrangian $\mathcal{L}$ stationary by differentiating $\mathcal{L}$ with respect to $\ket{\Psi^{(A)}}$ for some fixed fragment $A$ and setting the resulting expression equal to zero. Upon some algebraic manipulation, we can recover the eigenvalue equation \begin{align} ( \hat{H}^{(A)} + V_{\rm BE} ) \ket{\Psi^{(A)}} = -\mathcal{E}^{(A)} \ket{\Psi^{(A)}}, \label{eig-equation} \end{align} where $V_{\textrm{BE}}$, the local bootstrap embedding potential, is given by \begin{align}\label{eq:VBE} V_{\rm BE} = \sum_B\sum_{p,q} (\lambda_B^{(A)})_{pq} a^{(A)\dagger}_p a^{(A)}_q + \mu \sum_{p'} a^{(A)\dagger}_{p'} a_{p'}^{(A)} \end{align} where the $p,q$ are indices of orbitals in the overlapping set $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}$, and the $p'$ are indices of orbitals in the fragment center $\mathbb{C}^{(A)}$. We see that, when the composite Lagrangian is made stationary with respect to the fragment wave functions, the bare fragment embedding Hamiltonians become dressed with a potential $V_{\textrm{BE}}$ that contains a component local to the edge sites of each fragment (see the left term of Eq. (\ref{eq:VBE})). This observation confirms our intuition that adding a local potential to the edge of one fragment will allow the edge site electron density to be matched to that of a center site on an overlapping neighbor. Note that $V_{\rm BE}$ also contains an additional potential on the center sites of each fragment (see the right term of Eq. (\ref{eq:VBE})); this is simply to conserve the total electron number in the molecule. Moreover, $V_{\rm BE}$ as in Eq. \eqref{eq:VBE} only contains one-body terms because only 1-RDM is used for density matching. In general, $V_{\rm BE}$ will contain up to $k$-body terms if $k$-RDMs are used for matching. On a classical computer, the composite Lagrangian in Eq. (\ref{eq:be_lagrangian}) is made stationary through an iterative optimization algorithm \cite{welborn2016bootstrap} until the edge-to-center matching condition for all fragments is satisfied by some criterion. One possible criterion is to terminate the algorithm when the root-mean-squared 1-RDM mismatch, given by \begin{align} \epsilon = \left[ \frac{1}{N_{\rm sites}} \sum_A^{N_{\rm frag}}\sum_{B}\sum_{p,q}(P^{(A)}_{pq} - P^{(B)}_{pq})^2\right]^{\frac{1}{2}}, \label{1rdm-mismatch} \end{align} drops below some predetermined threshold. Note again that $p,q$ are indices corresponding to orbitals in the overlapping set $\mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}$; also, $N_{\rm sites}$ denotes the total number of overlapping sites in the whole molecule, equal to $N_{\rm sites} = \sum_A^{N_{\rm frag}}\sum_{B}\sum_{p,q} 1$. The final set of density-matched fragment wave functions $\{\ket{\Psi^{(A)}}\}$ for $A = 1,\ldots,N_{\rm frag}$ which solve the composite Lagrangian can then be used to reconstruct the electron densities and other observables for the full molecular system, as desired. \subsection{Resource Requirement and Typical Behavior of BE on Classical Computers} \label{sec:classical-resource-req-behavior} Given the notation established for classical BE, we now begin presenting new material. We discuss the computational resource requirement and typical behaviors of performing BE on classical computers to set the stage for a quantum BE theory. The details of the classical BE algorithms are omitted for succinctness, and we refer the reader to Ref. \cite{welborn2016bootstrap,ye2019bootstrap,ye2020bootstrap,ye2021accurate} for details. The space and time resource requirement to perform the classical BE can be broken down into two parts: a) the number of iteration steps to reach a fixed accuracy for $\epsilon$ (Eq. \eqref{1rdm-mismatch}); b) the runtime of the fragment eigensolver. For a), numerical evidence suggests an exponentially fast convergence on total system energy as the number of bootstrap iteration increases (black trace in Fig. \ref{fig:classical_baseline} for FCI), while a proof of the convergence rate has yet to be established. We focus on resource requirement in b) in the following. Admittedly, an exact classical eigensolver such as full configuration interaction (FCI) can be used to solve the embedding Hamiltonian in Eq. \eqref{embedding-ham}. However, both the storage space and time requirement scales exponentially as the the number of orbitals (see blue symbols and dashed line in Fig. \ref{fig:runtime-systemsize} for the runtime scaling of FCI). Even with the state-of-the-art classical computational resources, exact solutions using FCI are only tractable for systems up to 20 electrons in 20 orbitals \cite{vogiatzis2017pushing}. As a result, classical computation of BE resorts to approximate eigensolvers with only polynomial cost in practice, by properly truncating or sampling from the fragment Hilbert space. One example for truncation is the coupled-cluster singles and doubles (CCSD) \cite{bartlett2007coupled}, which scales with $N^6$ with $N$ being the number of orbitals. Alternately, different flavors of stochastic electronic structure solvers can be employed as fragment solvers in BE. Depending on implementation, these stochastic solvers can be biased or unbiased (if unbiased, with a cost of introducing the phase problem in general) \cite{morales2021frontiers,lee_twenty_2022,shee2019achieving,liu2018ab}. Collecting each sample on a classical computer usually has similar cost as a mean field theory (roughly $O(N^3)$), while the overall target accuracy $\epsilon$ on observable estimation can be achieved with a sampling overhead of roughly $O(\frac{1}{\epsilon^2})$ with a constant prefactor depending on the severity of the sign problem. Importantly, the sampling feature of these stochastic electronic structure methods on classical computers are strikingly similar to the nature of quantum computers where measurement necessarily collapses the wave function. As a result, only a classical sample (in terms of measurement results) can be obtained from a quantum computer. This similarity suggests a general strategy that many sampling techniques in stochastic classical algorithms can be deployed to design better quantum algorithms. For example, sophisticated importance sampling techniques \cite{nightingale1998quantum,foulkes2001quantum} can be employed to greatly improve the sampling efficiency in both classical \cite{liu2018ab} and quantum cases \cite{huang2020predicting}. Due their shared feature on sampling between classical stochastic algorithm and quantum eigensolvers, we shall use one approximate sign-problem-free flavor of stochastic electronic structure method, the variational Monte Carlo (VMC), to serve as an additional baseline scenario for comparison with quantum BE in later sections. In addition to BE convergence behavior with a FCI solver, Fig. \ref{fig:classical_baseline} also shows, for a VMC eigensolver, the density mismatch converges exponentially fast initially as iteration number increases with varying number of samples. However, due to the statistic noise on estimating the 1-RDM (thus the gradient for the optimization), the final density mismatch plateaus to a finite biased value. Comparing among the VMC solver with different number of samples, the accuracy improves as the number of samples increases (dashed horizontal lines). \begin{figure}[ht!] \centering \includegraphics[width=9cm]{figures/fig2_fci-vmc-samp.png} \caption{\label{fig:err-iter_classical} Typical convergence of density mismatch with respect to the number of eigensolver calls in classical bootstrap embedding with a deterministic eigensolver (FCI, black circle) and a stochastic eigensolver (VMC) with different number of samples (grey, blue, and orange solid lines). The horizontal dashed lines shows the final plateaued value of the density mismatch for VMC, while the FCI data converges to $10^{-6}$ after 700 eigensolver calls (not shown on the figure). The discrete jumps around 200 and 300 eigensolver calls are due to switching to the next BE iteration. The data is obtained for an H$_8$ linear chain under STO-3G basis. See SI Sec. \ref{app:be-vmc} for computational details. } \label{fig:classical_baseline} \end{figure} The increasing accuracy of density mismatch with respect to BE iteration also suggests an increasing number of samples are needed. Thus, an optimal number of samples at each BE iteration must be determined to achieve the desired accuracy in the matching conditions. A careful design of such a sampling schedule can potentially save a large amount of computational resources. We defer a thorough discussion of this point to later sections on quantum BE. \subsection{The Quest for BE on Quantum Computers} \label{sec:quest-for-quantum-be} By employing the coherent superposition and entanglement of quantum states, the limitation of an exact classical solver can be overcome by substituting it with an exact quantum eigensolver such as the quantum phase estimation (QPE) algorithm \cite{abrams1999quantum}. Fig. \ref{fig:runtime-systemsize} compares the runtime (gate depth) of FCI and QPE for finding the ground state of linear hydrogen chain H$_n$ for different system size $n$. Clearly, the QPE runtime scales only polynomially as the system size increases as expected \cite{aspuru2005simulated,lee2022there}, while its classical counterpart (FCI) has an exponentially increasing runtime. Note the runtime is normalized to the case of $n=1$ for each solver separately (see SI Sec. \ref{app:computational-details} for details). The dramatic advantage in the runtime scaling of quantum over classical eigensolvers demonstrated above suggests formulating BE on a quantum computer can bring significant benefits. \begin{figure}[ht!] \centering \includegraphics[width=9cm]{figures/fig3_fci-qpe-runtime.png} \caption{\label{fig:runtime-systemsize} Runtime (normalized) as a function of system size $n$ for finding the ground state of a linear hydrogen chain H$_n$ at STO-3G basis, comparing an exact classical solver (FCI, blue square) and an exact quantum solver (QPE, red circle) on real classical and quantum devices. Red (blue) dashed line shows a polynomial (exponential) fit to the QPE (FCI) runtime. Note the crossover at large system size. } \end{figure} One might think that the eigensolver at the heart of the classical BE algorithm could simply be replaced with a quantum one. However, as mentioned before, there are two outstanding challenges for such a quantum bootstrap embedding (QBE) method. First, just as in classical stochastic methods, the results of a quantum eigensolver need to be measured for later use, but quantum wave functions collapse after measurement. Therefore, sampling from the quantum eigensolver is required, and the optimal sampling strategy is unclear. Secondly, with quantum wave function from quantum eigensolvers, it is not wise to achieve matching between fragments in the same way as classical BE, as many incoherent samples are needed to obtain a good estimation of the 1-RDM elements. Clearly, performing matching in a quantum way is desired. In the next two sections (Secs. \ref{sec:qbe-methods} and \ref{sec:qbe-algorithms}), we present how we address these two challenges by an adaptive quantum sampling scheduling algorithm and a quantum coherent matching algorithm in detail. \section{Quantum Bootstrap Embedding Methods} \label{sec:qbe-methods} In previous sections, we have seen potential advantages of performing bootstrap embedding on quantum computers, and discussed two major challenges of doing so. In this section, we present the theoretical formulation of our bootstrap embedding method on a quantum computer that addresses these challenges. Sec. \ref{sec:notation-locality} first set up notations and discuss a few aspects of locality and global symmetry on performing embedding of fermions on quantum computers. Sec. \ref{sec:naive-linear-matching} discuss a naive extension of the classical BE algorithm on quantum computers by matching individual elements of the RDMs directly, and highlight the disadvantage of doing so. Sec. \ref{sec:swap-test-matching} introduces the $\mathtt{SWAP}$ test circuit and show that it achieves the matching between two RDMs coherently. In \ref{sec:quadratic-penalty-opt}, we discuss some subtleties on why it is impossible to incorporate this coherent matching condition into the Lagrange multiplier optimization method, and present an alternative quadratic penalty method to perform the optimization. \subsection{Fermion-Qubit Mapping - Global Symmetry vs. Locality} \label{sec:notation-locality} When mapping electronic structure problem to qubits on quantum computers, it is well-known that the global anti-symmetric property of fermionic wave functions necessarily leads to an overhead in operator lengths or qubit counts \cite{tranter2018comparison}. On the other hand, chemical information is usually local if represented using localized single-particle orbitals \cite{edmiston1963localized,wannier1962dynamics}. In the case of performing bootstrap embedding, this tension between locality of chemical information and global fermionic anti-symmetry is more subtle. Because bootstrap embedding intrinsically uses the fermionic occupation number in the local orbitals (LOs) to perform matching, it is therefore convenient to preserve such locality when constructing the mapping. Throughout the discussion, without loss of generality, we assume a mapping that preserves fermionic local occupation number, such as the Jordan-Wigner mapping where each spin-orbital is mapped to one qubit. Our discussion equally applies to cases where a non-local mapping is used (such as parity mapping). In that case, a unitary transformation from the non-local mapping to a local mapping will be required before actually computing the matching conditions. It is usually more convenient to work with qubit reduced density matrices (RDMs) \cite{nielsen2002quantum} on quantum computers instead of $k$-electron RDMs \cite{mazziotti2012two}. Due to this reason, we shall formulate our QBE method based on these qubit RDMs. The full density matrix of fragment $A$ is thus provided by $\rho^{(A)} = \ket{\Psi_A}\bra{\Psi_A}$. Given an orbital set $ R \subset O^{(A)}$ for $O^{(A)}$ being set of orbitals in fragment $A$. Let $\rho_R^{(A)}$ signify the RDM obtained from $\rho^{(A)}$ by tracing out the set of qubits not in $R$. Specially, if $R$ only contains orbitals on the edge (center) of fragment $A$, then $\rho_R^{(A)}$ represents information about the density information (for example the occupation number) on the edge (center) of $A$. These RDMs can be expanded under an arbitrary set of orthonormal basis $\{ \Sigma_\alpha \}$ as follows \begin{align} \rho^{(A)}_R &= \frac{I + \sum_{\alpha=1}^{4^m-1} \langle \Sigma_\alpha \rangle_A ~ \Sigma_\alpha}{2^m} \label{rdm-def} \end{align} where $ \langle \Sigma_\alpha \rangle_A = \bra{\Psi_A} \Sigma_\alpha \ket{\Psi_A} = \Tr[\rho^{(A)} ~\Sigma_\alpha], ~\forall\alpha \in [1, 4^m-1] $, and $m = |R|$ is the number of orbitals in the set $R$. One convenient orthonormal basis set is the generalized Gell-Mann basis \cite{bertlmann2008block}. In the special case of a 1-qubit RDM, $\{ \Sigma_\alpha \}$ ($\alpha = x, y, z$) is the familiar Pauli matrices. \subsection{Naive RDM Linear Matching and its Disadvantage} \label{sec:naive-linear-matching} A naive implementation of BE on a quantum computer is to simply replace 1-RDM in Eq. \eqref{1-rdm-def} with the qubit RDM in Eq. \eqref{rdm-def} on the fragment overlapping regions. Such an extension imposes matching constraints on each elements of the RDMs, resulting the following constraint vector in analogous to Eq. \eqref{eq:1rdm-constraint} \begin{align} \bm{\mathcal{Q}_{lin}}(\rho^{(A)}_R; \rho^{(B)}_R) = \begin{bmatrix} \langle \Sigma_1 \rangle_A - \langle \Sigma_1 \rangle_B \\ \vdots \\ \langle \Sigma_{4^m-1} \rangle_A - \langle \Sigma_{4^m-1} \rangle_B \end{bmatrix} = \bm{0}. \label{eq:linear-constraint} \end{align} It is obvious that $\rho_R^{(A)} - \rho_R^{(B)} = 0$, if and only if all the $(4^m-1)$ components in the above constraint are satisfied. Similarly, we can associate a scalar Lagrange multiplier to each constraint in Eq. \eqref{eq:linear-constraint} and use this linear RDM constraint in place of the 1-RDM constraint $ \bm{\mathcal{Q}_{\textbf{1-RDM}}}(\Psi^{(A)}; \mathbf{P}^{(B)})$ in Eq. \eqref{eq:be_lagrangian_a}. Finding the stationary point of this new Lagrangian gives the same eigenvalue equation as Eq. \eqref{eig-equation} with a new BE potential given by \begin{align} &V_{\rm BE} = \sum_{B\ne A, \mathbb{C}_B \cap \mathbb{E}_A \ne \emptyset} \bm{\lambda_B^{(A)}} \cdot \left[ I \otimes \bm{\Sigma_r} \otimes I \right] \label{eq:be-potential} \end{align} where $\bm{\Sigma_r} = \begin{bmatrix} \Sigma_1, \cdots, \Sigma_\alpha, \cdots, \Sigma_{4^m-1} \end{bmatrix}$ is a $(4^m-1)$-dimensional vector of the orthonormal basis in Eq. \eqref{rdm-def}, and $\bm{\lambda_B^{(A)}}$ is the Lagrange multipliers now modulating the local potentials on each qubit basis, and $n$ is the number of overlapping sites between $A$ and $B$. To perform the optimization, the eigenvalue equation Eq. \eqref{eig-equation} with the above new BE potential in \eqref{eq:be-potential} can be solved on a quantum computer to obtain an updated wave function for fragment $A$. By iteratively solving the eigenvalue equation and updating the Lagrange multipliers $\{ \bm{\lambda}, \mu\}$ using either gradient-based or gradient-free methods \cite{conn2009introduction}, an algorithm can be formulated to solve the optimization problem. For completeness, we document the algorithm from the naive linear matching of RDMs in Sec. \ref{app:linear-alg} of the SI. The above is a convenient way to impose the constraint on quantum computers, but it is computationally costly as the number of constraints in \eqref{eq:linear-constraint} increases exponentially as the number of overlapping sites $n$ on neighboring fragments. For each constraint equation, the expectation values $\langle \Sigma_\alpha \rangle$ has to be measured on the quantum computer, which therefore introduces an exponential overhead on the sampling complexity. In the next section, we introduce a simple alternative to evaluate the mismatch between two RDMs on a quantum computer much faster based on a $\mathtt{SWAP}$ test. \subsection{Coherent Quantum Matching from \texorpdfstring{$\mathtt{SWAP}$}{swap} Test} \label{sec:swap-test-matching} The wave functions of two overlapping fragments are stored coherently as many amplitudes that suppose with each other. The beauty of quantum computers and algorithms lies at the ability to coherently manipulating such amplitudes simultaneously. We may naturally ask: are there quantum algorithms or circuits that can coherently achieve matching between an exponentially large number of amplitudes, without explicitly measuring each amplitude? In quantum information, there is a class of quantum protocols to perform the task of estimating the overlap between two wave functions or RDMs under various assumptions \cite{Fanizza2020beyond}. Among these protocols, the $\mathtt{SWAP}$ test is widely used \cite{harrow2013testing,buhrman2001quantum}. Such a $\mathtt{SWAP}$ test on a quantum computer can also be naturally implemented by simple controlled-$\mathtt{SWAP}$ operations as in Fig. \ref{fig:swap-test}, showing a $\mathtt{SWAP}$ test between two qubits. The essence of a \texttt{SWAP} test is to entangle the symmetric and anti-symmetric subspaces of the two quantum states ($\ket{\phi}$ and $\ket{\psi}$) to a single ancillary qubit, such that the quantum state of the system before the final measurement is \begin{align} \ket{\Psi} = \frac{1}{2} \left[ \rule{0pt}{2.4ex} \ket{0} \left ( \rule{0pt}{2.4ex} \ket{\phi}\ket{\psi} + \ket{\psi}\ket{\phi} \right) + \ket{1} \left( \rule{0pt}{2.4ex} \ket{\phi}\ket{\psi} - \ket{\psi}\ket{\phi} \right) \right]. \end{align} By measuring the top \emph{single} ancillary qubit in the usual computational $Z$-basis (collapsing it to either the $\ket{0}$ or $\ket{1}$ state), the overlap of the two qubit wave function, $|\langle \phi| \psi \rangle|$, can be directly obtained from the measurement outcome probability: \begin{align} {\rm Prob}[M = 0] = \frac{1 + |\langle{\phi}| \psi \rangle|^2}{2}, \end{align} without requiring explicit estimation of the density matrix elements of each individual qubit. \begin{figure}[ht!] \centering \begin{center} \mbox{ \Qcircuit @C=1em @R=0.7em @!R { |0\rangle\quad\quad & \gate{H} & \ctrl{2} & \gate{H} & \meter & M \\ |\phi\rangle \quad\quad & \qw & \qswap & \qw & \qw & \\ |\psi \rangle \quad\quad & \qw & \qswap & \qw & \qw & \quad \quad \quad \quad \quad \quad \\ } } \end{center} \caption{Quantum circuit of a $\mathtt{SWAP}$ test between two qubits (lower, with state $\ket{\phi}$ and $\ket{\psi}$). The circuit is composed of two Hadamard gate ($H$), a controlled-$\mathtt{SWAP}$ operation in between, and a final $Z$-basis measurement $M$ on an additional ancilla qubit (top), where $M = 0, 1$. } \label{fig:swap-test} \end{figure} Can we recast the linear matching conditions as linear combination of several $\mathtt{SWAP}$ tests? Observe that an equivalent condition alternative to Eq.~\eqref{eq:linear-constraint} is the following quadratic matching condition (see Sec. \ref{app:constraint-equivalent-proof} of SI for a proof of the equivalence between the two quantum matching conditions) \begin{align} \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R) = \Tr[\left( \rho^{(A)}_R - \rho^{(B)}_R \right)^2] = 0. \label{eq:quadratic-constraint} \end{align} Interestingly, the above quadratic constraint can be rewritten as a linear combination of three different multi-qubit generalization of the $\mathtt{SWAP}$ tests (with each repeated multiple times), regardless of the number of overlapping sites (Fig. \ref{fig:be-schematic}iiiq). Two of the $\mathtt{SWAP}$ tests are to estimate the purity of $\rho^{(A)}_R$ and $\rho^{(B)}_R$ each, while the third one is to estimate the overlap between $\rho^{(A)}_R$ and $\rho^{(B)}_R$. See Sec. \ref{app:swap-test} how to generalize the $\mathtt{SWAP}$ test on two qubits to a multi-qubit setting and how to relate the $\mathtt{SWAP}$ test results to the quadratic constraint. The reformulation of the quadratic constraint allows us to estimate the mismatch between two fragments by measuring only a single ancilla qubit (estimating three different amplitudes). As compared to the linear constraint case where an exponentially large number of constraints have to be estimated individually ($4^m-1$ where $m = |R|$ is the number of overlapping sites again), the quadratic matching based on $\mathtt{SWAP}$ tests achieves an exponential saving in the types of measurements required. Furthermore, the reduction of the mismatch to the estimation of only a few (three) amplitudes in $\mathtt{SWAP}$ tests allows an additional quadratic speedup by amplifying the amplitude of the ancilla qubit before measure it. We will discuss more details on how to achieve the quadratic speedup in Sec. \ref{sec:aa-quadratic-speedup}. Admittedly, such amplitude amplification algorithm may be applied even to the naive linear RDM matching by boosting individual RDM amplitude, but the resulting quantum circuit will be much more complicated. \subsection{Optimization Using the Quadratic Penalty Method} \label{sec:quadratic-penalty-opt} With an efficient way to estimate the quadratic penalty constraint established in Eq. \eqref{eq:quadratic-constraint}, it now appears feasible to use this new constraint in Eq. \eqref{eq:be_lagrangian_a} as in the case of linear constraint. However, the nature of the quadratic matching in Eq. \eqref{eq:quadratic-constraint} makes the same Lagrange multiplier optimization method used in the linear case invalid. We first discuss in more detail why this approach fails, in Sec. \ref{sec:violation_constraint_qualif}; we then describe an alternative way of treating the quadratic constraint as a penalty term to optimize the resulting objective function in Sec. \ref{sec:detail-quadratic-penalty}. \subsubsection{Violation of the Constraint Qualification} \label{sec:violation_constraint_qualif} A necessary condition to use the Lagrange multiplier method for constraint optimization is that the gradient of the constraint itself with respect to system variables has to be non-zero at the solution point (this guarantees a non-zero effective potential to be added to the original Hamiltonian), a.k.a., constraint qualification \cite{mangasarian1967fritz,bertsekas2016nonlinear}. Specifically, we require $\nabla \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R) \ne 0$ when $\rho^{(A)}_R = \rho^{(B)}_R$. Unfortunately, in the quadratic case, we have \begin{align} \nabla \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R) \propto \rho^{(A)}_R - \rho^{(B)}_R = 0 \end{align} when $\rho^{(A)}_R$ and $\rho^{(B)}_R$ matches, which violates the above condition. Note that any high-order constraint other than linear order will violate the constraint qualification. The existence of such constraint qualification makes sense also from a physical point of view. Because the gradient $\nabla \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R)$ enters the eigenvalue equation \eqref{eq:VBE} as the BE potential $V_{\rm BE}$ modulated by the Lagrange multipliers. The vanishing of this potential near the solution point means there is no way to modulate $V_{\rm BE}$ by adjusting the Lagrange multipliers, and therefore will lead to failure of convergence of the Lagrange multiplier. Alternatively, the quadratic constraint can be treated as a penalty by using $\lambda_B^{(A)} \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R)$ to substitute the constraint $\bm{\lambda^{(A)}_{B}} \cdot \bm{\mathcal{Q}_{\textbf{1-RDM}}}(\Psi^{(A)}; \mathbf{P}^{(B)})$ in Eq. \eqref{eq:be_lagrangian_a}. We can then employ the quadratic penalty method \cite{staszczak2010augmented} to minimize this cost function. To highlight the distinction of quadratic penalty method from the Lagrange multiplier method, we use ``cost function" instead of ``Lagrangian" to refer to the objective function in the quadratic penalty case. \subsubsection{Details of the Quadratic Penalty Method} \label{sec:detail-quadratic-penalty} The idea of the penalty method is to use the constraint as a penalty where the magnitude of $\lambda_B^{(A)}$ serves as a weight to the penalty. Initially, $\lambda_B^{(A)}$ is set to a small constant, and then we treat the resulting cost function as an unconstrained minimization where its minimum is found by varying the wave functions. The next step is to increase $\lambda_B^{(A)}$ to a larger value leading to a new Lagrangian, which is then minimize again by varying the wave function parameters. This procedure is repeated until the penalty parameter $\lambda_B^{(A)}$ is large enough to guarantee a small mismatch $\mathcal{Q}_{quad}(\rho^{(A)}_r; \rho^{(B)}_r)$. In our case, we choose all $\lambda_B^{(A)} = \lambda$ for all pairs of adjacent fragments. It is helpful to note that optimization of the wave function is done again using the eigenvalue equation as in Eq. \eqref{eig-equation} by tuning the BE potential $V_{\rm BE}$. In other words, for a fixed penalty parameter $\lambda$, the fragment Lagrangian $\mathcal{L}_A(\{V_{\rm BE}\})$ is minimized with respect to $V_{\rm BE}$. For a particular parametrization in terms of local potentials $\{ v_\alpha \}$ on the edge sites of fragment A \begin{align} V_{\rm BE}(\{v_\alpha\}) = \sum_{\alpha = 0}^{M} v_\alpha ~ I \otimes \Sigma_\alpha \otimes I, \label{vbe-expression} \end{align} where $\{\Sigma_\alpha\}$ is a set of Hermitian generator basis of size $M$ on the edge sites of fragment A (can be Pauli operators for a single edge site), and $\{v_\alpha\}$ is the corresponding local potential (real numbers). Note that $M$ in Eq. \eqref{vbe-expression} can be much smaller than the total number of generators ($4^m$) on the edge sites, because in each bootstrap embedding iteration, only a small local potential is added to the Hamiltonian. This perturbative nature of the bootstrap embedding iteration allows us to expand the BE potential $V_{\rm BE}$ in each iteration under the Hermitian generator basis from the previous iteration, such that the BE potential in each iteration is diagonal dominant, i.e., $M \ll 4^m$ where $n$ is the number of edge sites on any fragment $A$. To update $\{v_\alpha\}$, we derive the following gradient \begin{align} \frac{d\mathcal{L}^{(A)}}{dv_\alpha} &= \sum_{n' \ne 0} \left[ \mathbf{C}^\dagger (\mathbf{I \otimes W_\alpha^{(n')} \otimes I}) \mathbf{C^{(n')}} \right] \times \left[ \mathbf{C^{(n')\dagger}} \left( \mathbf{H^{(A)}} + \mathbf{\mathcal{E}_0^{(A)}} + 2 \lambda \left( \mathbf{I \otimes ( \rho_{\mathbb{E}_A} - \rho_{\mathbb{C}_B}) \otimes I} \right) \right) \mathbf{C} \right] \label{quadratic-gradient} \end{align} $\forall \alpha \in [0,M]$, that can, in principle, be used to perform the updating of $V_{\rm BE}$ to minimize $\mathcal{L}^{(A)}$. In the above, $\mathbf{C^{(n)}}$ is the eigenvector of the $n$-th eigenstate ($n \ge 1$) while $\mathbf{C}$ is the eigenvector of the ground state, $\mathbf{W_\alpha^{(n')}}$ is a perturbation matrix between ground state and the $n'$-th eigenstate for the $\alpha$-th Pauli basis at the edge site of fragment $A$, whereas $\rho_{\mathbb{E}_A}$ and $\rho_{\mathbb{C}_B}$ are the RDM at the edge and center sites of fragment $A$ and $B$, respectively (see SI Sec. \ref{app:gradient-quadratic} for detailed derivation). The above gradient in Eq. \eqref{quadratic-gradient} is only formally useful, but computing it exactly requires all the eigenstates to be known (not only the ground state) which is clearly very costly if possible. Nevertheless, it serves as a good starting point to develop \emph{approximated} updating scheme or to perform bootstrap embedding for excited states. We leave such topics for future investigation. In the present work, instead of using Eq. \eqref{quadratic-gradient} to update $V_{\rm BE}$, we employ gradient-free schemes to update $\{ v_\alpha \}$ and measure the required expectation values using $\mathtt{SWAP}$ test to obtain the mismatch to evaluate the cost function $\mathcal{L}^{(A)}$. We note that one additional advantage of this quadratic penalty method is that it can be easily integrated with variational eigensolvers \cite{tilly2022variational} by treating the quadratic penalty as an additional term in the VQE cost function \cite{kuroiwa2021penalty}. The drawback is that the optimized wave function only \emph{exactly} equals to the true wave function when the penalty goes to infinity $\lambda \rightarrow \infty$. Practically, we find that choosing the penalty parameter large enough is sufficient to obtain satisfactory results. \section{Quantum Bootstrap Embedding Algorithms} \label{sec:qbe-algorithms} Given the theoretical formulation of QBE method in Sec. \ref{sec:qbe-methods}, we present a general hybrid quantum-classical algorithm in this section that can be practically used to solve the BE problem on quantum computers to find the BE potentials $V_{\rm BE}$ that satisfies the matching condition. In our quantum bootstrap embedding algorithm, the electronic structure problem of the total system is formulated as a minimization of a composite objective function with a penalty term constructed from the matching conditions on the full qubit RDMs on overlapping regions of adjacent fragments. We then design an iterative hybrid quantum-classical algorithm to solve the optimization problem, where a quantum subroutine as an eigensolver is employed to prepare the ground state of fragment Hamiltonian. The quantum matching algorithm employs a $\mathtt{SWAP}$ test \cite{barenco1997stabilization,buhrman2001quantum} between wave functions of two fragments to evaluate the matching conditions, which is a dramatic improvement as compared to the straightforward method of measuring an exponential number (with respect to the number of qubits on the fragment edge) of RDM elements. Additionally, the quantum bootstrap embedding framework is internally self-consistent without the need to match fragment density matrices to external more accurate solutions. The adaptive sampling changes the number of samples as the optimization proceeds in order to achieve an increasingly better matching conditions. We note that the $\mathtt{SWAP}$ test adds only little computational cost to quantum eigensolvers which can be readily performed on current NISQ devices. The amplitude amplified coherent quantum matching requires iterative application of eigensolvers multiple times which are more suitable for small fault-tolerant quantum computers. The rest of this section is organized as follows. Sec. \ref{sec:main-sub-algorithm} gives an outline of the QBE algorithm with the quadratic penalty method. Sec. \ref{sec:alg-eigensolver} discusses possible choices of quantum eigensolvers with an analysis on sampling complexities. We then present a way to achieve an additional quadratic speedup by using coherent amplitude estimating algorithm in Sec. \ref{sec:aa-quadratic-speedup}. \subsection{The Algorithm} \label{sec:main-sub-algorithm} We present a high-level framework of the main algorithm in this section. As a comparison, the QBE algorithm with naive linear matching can be found in SI Sec. \ref{app:linear-alg}. Code for the algorithms and data for generating the plots are available as open source on github \cite{QBE2022}. To quantify the mismatch across all fragments, we define $\Delta\rho$ to be the root mean square density matrix mismatch averaged over all the overlapping sites of all the fragments according to \begin{equation} \Delta\rho = \sqrt{\frac{1}{N_{sites}}\sum_{A,B}\sum_{r \in \mathbb{E}^{(A)} \cap \mathbb{C}^{(B)}} \Tr[\left(\rho^{(B)}_r - \rho^{(A)}_r \right)^2]} \label{mismath-delta-rho} \end{equation} where $\Tr[\left(\rho^{(B)}_r - \rho^{(A)}_r \right)^2] = \mathcal{Q}_{quad}(\rho^{(A)}_r; \rho^{(B)}_r)$ as in Eq. \eqref{eq:quadratic-constraint}, which may also be recognized as the Frobenius norm of $(\rho^{(B)}_r - \rho^{(A)}_r )$. $N_{sites}$ is the total number of terms in the double sum in Eq. \eqref{mismath-delta-rho}, $N_{sites} = \sum_{A \ne B} | \mathbb{E}^{(A)}\cap \mathbb{C}^{(B)} |$, with $|\mathcal{S}|$ denoting the number of elements in set $\mathcal{S}$. The cost function $ \mathcal{L}^{(A)}(\lambda)$ being optimized is discussed in Sec. \ref{sec:violation_constraint_qualif}. For clarity, we write it explicitly here \begin{align} \mathcal{L}^{(A)}(\lambda) =& \langle \hat{H}^{(A)} \rangle_A + \sum_{B} \lambda \mathcal{Q}_{quad}(\rho^{(A)}_R; \rho^{(B)}_R) \label{eq:cost_function_alg}, \end{align} with $\mathcal{Q}_{quad}$ given by Eq. \eqref{eq:quadratic-constraint}. We have omitted the term $\mathcal{E}^{(A)}$ for simplicity since the normalization of the wave function is guaranteed for a fault-tolerant quantum computer. However, this term can be important on a noisy quantum computer where the purity of the wave function can be contaminated. Note the expectation value in Eq. \eqref{eq:cost_function_alg} has to be estimated by collecting samples on a quantum computer. The quantum bootstrap embedding algorithm with quadratic penalty method is presented below in Alg. \ref{alg:qbe_quad}. The algorithm takes as its input the total Hamiltonian of the original system, and then perform the fragmentation and parameter initialization, followed by the main optimization loop to achieve the matching. Finally, it returns the optimized BE potential $V_{\rm BE}^{(A)}$ for any fragment $A$ and the final mismatch $\Delta\rho$. Inside the main loop (line 9 of Alg. \ref{alg:qbe_quad}), the cost function $ \mathcal{L}^{(A)}(\lambda)$ for each fragment $A$ is minimized for a fixed penalty parameter $\lambda$ (line 10 and 11). The penalty $\lambda$ is then increased geometrically (line 12) until the mismatch criteria is met, i.e., $\Delta \rho \le \varepsilon$. \begin{algorithm}[H] \caption{ Quantum bootstrap embedding algorithm: quadratic penalty method }\label{alg:qbe_quad} \textbf{Input}: Geometry of the total molecular system and the associated \textit{ab initio} Hamiltonian. \\ \texttt{\\} \tcc{Initialization} \textbf{Fragmentation}: Divide the full molecular system into $N_{frag}$ overlapping fragments; \For{A = 1 to $N_{frag}$}{ Generate $H^{(A)}$ using Eq. \eqref{embedding-projection-int} of SI Sec. \ref{app:frag}; Set $V_{\rm BE}^{(A)} = 0$; } \textbf{Parameter initialization:} set initial penalty factor $\lambda = 1$; set initial mismatch $\Delta\rho > \epsilon$. \texttt{\\} \tcc{Main loop:} \While{$\Delta\rho > \varepsilon$} { \For{A = 1 to $N_{frag}$} { \textbf{Minimize $ \mathcal{L}^{(A)}(\lambda)$ as in Eq. \eqref{eq:cost_function_alg} :} Repeatedly generate $V_{\rm BE}^{(A)}$ and estimate the penalty loss function $ \mathcal{L}^{(A)}(\lambda)$ using $\mathtt{SWAP}$ test. } \textbf{Increase penalty parameter:} $\lambda \leftarrow \gamma\lambda$, for some fixed $\gamma > 1$.\\ \textbf{Update mismatch}: \For{A = 1, $N_{frag}$} { Estimate $\mathcal{Q}_{quad}(\rho^{(A)}_r; \rho^{(B)}_r)$ using $N_{samp}^{\mathtt{SWAP}}$ (Eq. \eqref{eq:nsamp_swap}) samples for each $\mathtt{SWAP}$ test. } Classically compute the mismatch $\Delta\rho$ using Eq. \eqref{mismath-delta-rho}. } \textbf{Returns:} $\left(H^{(A)} + V_{\rm BE}^{(A)}\right)$ for all $A$, $\Delta\rho$. \end{algorithm} A key step of the algorithm is the minimization of $\mathcal{L}^{(A)}(\lambda)$ at line 11, which consists of repeatedly generating the BE potential $V_{\rm BE}^{(A)}$ and estimate the mismatch using $\mathtt{SWAP}$ test. BE potentials $V_{\rm BE}^{(A)}$ are generated differently for different optimization algorithms. In our implementation, a quasi-Newton method, the L-BFGS-B \cite{byrd1995limited} algorithm, is used at line 11 for minimizing $\mathcal{L}^{(A)}(\lambda)$, where $V_{\rm BE}^{(A)}$ is proposed by the optimizer in order to estimate the inverse Hessian matrix to steer the optimization properly. Alternatively, if derivative-free methods such as Nelder-Mead \cite{nelder1965simplex} is used, $V_{\rm BE}^{(A)}$ will be generated in a high-dimensional simplex defined by the coefficients $\{ v_\alpha \}$ in Eq. \eqref{vbe-expression}, which is repeatedly refined. Once $V_{\rm BE}^{(A)}$ is generated, the first term in the cost function in Eq. \eqref{eq:cost_function_alg} is estimated by invoking the quantum eigensolver for the Hamiltonian $\left(H^{(A)} + V_{\rm BE}^{(A)}\right)$. The second term, the mismatch in Eq. \eqref{eq:cost_function_alg} can be estimated by measurement outcomes of the ancilla qubit in the $\mathtt{SWAP}$ test (SI Sec. \ref{app:swap-test}). The mismatch estimation at line 13 is performed in the same way as those in line 11. Note that the number of samples $N_{samp}^{\mathtt{SWAP}}$ (Eq. \eqref{eq:nsamp_swap}) for the $\mathtt{SWAP}$ test estimation can be changed adaptively in different BE iterations for different accuracy, which we discuss in detail in the next section. \subsection{Eigensolver Subroutines and Sampling Complexity} \label{sec:alg-eigensolver} Two major quantum eigensolvers, QPE \cite{svore2013faster} and VQE \cite{tilly2022variational} can be used in line 11 and 14 of Alg. \ref{alg:qbe_quad} to estimate the cost function. QPE is an exact eigensolver, where the system wave function collapses to the exact ground state regardless of the number of evaluation qubits used. In contrast to QPE, VQE is an approximate eigensolver and the results depends on the choice of ansatz and the optimization algorithm used. A crucial feature of a quantum eigensolver is its probabilistic nature, in a sense that any measurement collapses the entire quantum state. This perspective allows us to treat a quantum eigensolver as a sign-problem-free sampling oracle for correlated electronic structure problems where Ref. \cite{huggins2022unbiasing} provides a concrete example. The stochastic nature also means a more careful treatment on the number of samples is required to fully quantify any potential quantum speedup. In general, for typical iterative mixed quantum-classical algorithms, some parameters are usually passed from one iteration to the next, where the parameters are estimated by repeatedly sampling from a quantum eigensolver oracle through proper measurement. This means the uncertainty on these parameters estimated from one iteration has to be small enough to avoid a divergence of the algorithm as iteration continues. In particular in the bootstrap embedding case, the sampling accuracy on the fragment overlap of each iteration has to be good enough such that the uncertainty of the mismatch passed to the next iteration will not spoil the iteration and lead to diverging results as iterations continue. When estimating the overlap $S$ to an accuracy $\epsilon$ naively by density matrix tomography of individual RDM elements, it is shown under mild assumptions that the total number of samples required (see Sec. \ref{app:sample-advantage-lin-quad} in SI) \begin{align} N_{samp}^{\rm TMG}(S, \epsilon, n) = \mathcal{O} (e^n) \left( \frac{D}{\epsilon^2} \right), \label{nsamp_tomography} \end{align} where $n$ is the number of qubits on the overlapping region, and $D$ is a system-dependent constant as a function of the two RDMs. In contrast, the quantum matching based on $\mathtt{SWAP}$ test costs \begin{align} N_{samp}^{\mathtt{SWAP}}(S, \epsilon) = \left( \frac{1-S^2}{8} \right) \frac{1}{\epsilon^2}, \label{eq:nsamp_swap} \end{align} which is independent of the size $n$ of the overlapping region of two fragments. This demonstrates that our quadratic quantum matching achieves an exponential speedup compared to naive tomography of density matrices. This dramatic speedup is perhaps not that surprising because we only care about one particular observable (the overlap) instead of the full subsystem RDMs. Therefore, if the observable can be mapped to measurement outcome of few qubits by some quantum operations ($\mathtt{SWAP}$ test in this case), advantages are expected in general. Moreover, the dependence of $N_{samp}^{\mathtt{SWAP}}(S, \epsilon)$ on the overlap $S$ and estimation accuracy $\epsilon$ allows an adaptive sampling schedule to be implemented for line 11 and 14 of Alg. \ref{alg:qbe_quad}. For example, we may use the overlap $S$ estimated from the previous BE iteration to compute the required $N_{samp}^{\mathtt{SWAP}}$ in the current BE iteration. The accuracy $\epsilon$ can also be dynamically tuned according to the error of the first term in Eq. \eqref{eq:cost_function_alg}, as well as the value of the penalty parameter $\lambda$. For example, at the beginning BE iterations, the mismatch ($\Delta\rho$ or more precisely $\mathcal{Q}_{quad}(\rho^{(A)}_r; \rho^{(B)}_r)$) is large so that a moderate $\epsilon$ suffices. As the BE iteration proceeds, the overlap converges exponentially, therefore an exponentially decreasing $\epsilon$ has to be used as well. A numerical value of $\epsilon$ needs be determined from case to case. In addition, Eq. \eqref{eq:nsamp_swap} suggests an interesting behavior. As the QBE algorithm proceeds and the overlap $S$ increases, fewer samples are needed to achieve a target accuracy. If $S$ approaches 1 exponentially fast as $S \sim 1 - e^{- \gamma \cdot n_{\text{iter}}}$ for some constant $\gamma$, then the required number of samples for $\mathtt{SWAP}$ will degrees exponentially as BE iteration $n_{\rm iter}$ goes $N_{samp}^{\mathtt{SWAP}} \sim e^{- \gamma \cdot n_{\text{iter}}} / \epsilon^2$. In practice, the overlap of two subsystem can never approach 1 but saturates to a constant $0<c<1$ when matching is achieved, and therefore $N_{samp}^{\mathtt{SWAP}} \sim (1-c)/\epsilon^2$ still obeys the $1/\epsilon^2$ scaling generally. This, on the other hand, suggests that a larger overlapping region is advantageous to reduce $N_{samp}^{\mathtt{SWAP}}$ because the RDM of a larger subsystem of a pure state will have greater purity (hence larger $c$) in general. \subsection{Additional Quadratic Speedup} \label{sec:aa-quadratic-speedup} The above perspective of treating quantum eigensolver as oracle where some amplitude is estimated through proper measurements allows us to achieve an additional quadratic speedup in our quantum bootstrap embedding algorithm. The intuition is that instead of directly measure a small quantum amplitude to accumulate enough counts to reduce the error bar, we may use quantum algorithms to first amplify the amplitude before the measurement. There are well-established ways of performing such amplitude amplification task via coherent quantum algorithms \cite{brassard2002quantum}. In particular, in each iteration of the algorithm, it can be shown (SI Sec. \ref{app:aa+binary-search}) that by combining oblivious amplitude amplification and a binary search protocol, estimating the overlap up to precision $\epsilon$ between adjacent fragments takes $N_{samp}^{\mathtt{SWAP}+AE}$ samples (state preparation and $\mathtt{SWAP}$ tests) \begin{align} N_{samp}^{\mathtt{SWAP}+\rm AE} = \frac{\sqrt{2}}{2\ln(2)\epsilon} \ln^2(\frac{1}{\epsilon}), \label{eq:nsamp_swap+bs} \end{align} regardless of the overlap $S$. Comparing \eqref{eq:nsamp_swap+bs} with \eqref{eq:nsamp_swap}, the above analysis suggests that our coherent quantum matching algorithm achieves a quadratic speed up (up to a factor of ${\rm polylog}(\frac{1}{\epsilon})$) as compared to the $\mathtt{SWAP}$ test based quantum matching algorithm, which is consistent with typical behavior of a Grover-type of search algorithm. Moreover, in contrast to \eqref{nsamp_tomography}, an exponential advantage is present with respect to the size of the overlapping region, indicating the benefit of using our quadratic QBE algorithm for fragment matching in the presence of large overlapping region. \section{Results and Discussions} \label{sec:results} With the theoretical foundation and algorithms discussed in previous sections, we present numerical results in this section, demonstrating the convergence of the QBE algorithm in Sec. \ref{sec:results-convergence} with an exact solver (at infinite sampling limit). In Sec. \ref{sec:results-sample}, we present numerical evidence for the sampling advantage of the QBE algorithm by considering its behavior with a finite number of samples. We use a typical benchmark system in quantum chemistry, hydrogen chains under minimal basis, to perform the numerical calculations. More numerical results using approximate variational quantum eigensolvers (VQE) on a random spin model can be found in Sec. \ref{app:vqe} of SI. \subsection{Convergence of QBE in Infinite Sampling Limit} \label{sec:results-convergence} \begin{figure}[ht!] \centering \includegraphics[width=9cm]{figures/fig5_h8_lin-quad-convergence.png} \caption{\label{fig:be-convergence-deterministic} Convergence of the quantum bootstrap embedding algorithms on (a) density mismatch and (b) energy error for the linear constraint (pink) and quadratic penalty method (red) in the infinite sample limit for an H$_8$ molecule. The dashed trend lines in both panels indicate an exponential fit. } \end{figure} We focus on demonstrating the convergence of QBE in the infinite sampling limit by using exact deterministic solver with the quadratic constraint in Eq. \eqref{eq:quadratic-constraint} and linear constraint in Eq. \eqref{eq:linear-constraint}. As a standard benchmark system for electronic structure, we perform QBE on a H$_8$ chain under a minimal STO-3G basis, which is fragmented into six overlapping fragments each with six embedding orbitals. Fig. \ref{fig:be-convergence-deterministic}a shows the exponential convergence of the density mismatch for an H$_8$ molecule in both linear and quadratic constraint cases. A similar convergence is established for a toy spin model and a perturbed H$_4$ molecule using a VQE eigensolver with the linear RDM matching (more details can be found in Sec. \ref{app:vqe} of the SI). To quantify how much energy error the final converged result has, Fig. \ref{fig:be-convergence-deterministic}b shows the absolute value of the error in energy using the energy in the last (11$^{th}$) iteration as a reference. We can see that the energy errors from both the linear and quadratic constraint algorithm exhibit similar exponential convergence as the density mismatch. Moreover, the energy in both cases converge to the same value within 10$^{-6}$ in the last iteration (not shown in the figure). We note that the linear constraint case shows a slightly oscillatory convergence, while the quadratic case is free of such oscillatory behavior. The fact that quadratic appears to converge slightly faster than linear may be coincidence for the system investigated, and the convergence rate in general depends on the optimization algorithm chosen. See Sec. \ref{app:qbe-calculation} of the SI for a detailed description on definition of the energy. \subsection{Sampling Advantage of Coherent Quantum Matching} \label{sec:results-sample} In the previous section, we have seen that our quantum bootstrap embedding algorithm convergence as expected in the infinite sampling limit. It is also seen (in the SI) that the approximate VQE leads to biased behavior on the density matching. In practice, only a finite number of samples can be collected on a quantum computer, and we will focus on theis scenario in this section. In particular, we present numerical data demonstrating the sampling advantage of our coherent quantum matching algorithm. Sec. \ref{sec:results-sample-fragment-size} discusses the sampling advantage of the quantum matching algorithm for an overlapping region of increasing size. In Sec. \ref{sec:results-sample-quadratic-speedup}, the additional quadratic speedup in estimating the overlap via amplitude amplification and binary search (AE) is presented. \subsubsection{Advantage in Fragment Overlap Size} \label{sec:results-sample-fragment-size} To perform bootstrap embedding, it is usually advantageous to partition the system into fragments with large overlapping region to increase the convergence rate, because a large overlapping region necessarily means more information is provided to update the local potential for the following BE iteration. However, a larger overlapping size also lead to an exponentially higher sampling complexity versus the number of qubits in the overlapping region if estimating the overlap naively from density matrix tomography as in Eq. \eqref{nsamp_tomography}. The quantum matching algorithm implemented by a $\mathtt{SWAP}$ test (Fig. \ref{fig:be-schematic}iiiq) bypass the need for density matrix tomography, and therefore leads to a sample complexity as in Eq. \eqref{eq:nsamp_swap} independent of the size of the overlapping region. To validate our theoretical sample complexity, a simulation of the quantum matching algorithm with QPE as an eigensolver for two identical H$_4$ chain is performed using a noiseless Qiskit AerSimulator (see SI Sec. \ref{app:swap-test-circuit} for more details) for an increasing overlap region ranging from 2 to 4, 6, and 8 qubits (schematic in Fig. \ref{fig:swap-size}). In the simulation, we first use QPE to prepare the ground state for two non-interacting H$_4$ molecules separately. A $\mathtt{SWAP}$ test is then performed on relevant qubits in the overlapping region between the two H$_4$ molecules. The evaluation qubits for QPE and the ancilla qubit for $\mathtt{SWAP}$ test are all measured afterwards. Post-selection on the QPE evaluation qubits are performed in order to select the ground states of H$_4$ molecules. The $\mathtt{SWAP}$ test results are processed and converted to the estimation on the overlap $S$. \begin{figure}[ht!] \centering \includegraphics[width=9cm]{figures/fig6_swap_size.png} \caption{\label{fig:swap-size} Sampling complexity ratio of naive density matrix tomography (TMG) and $\mathtt{SWAP}$ test versus number of qubits in the overlapping region for a target precision $\epsilon = 0.001$ on overlap $S$. The inset shows a simulated convergence of overlap ($S$) estimation using quantum matching ($\mathtt{SWAP}$) for the case of two overlapping qubits. Data are obtained from a non-interacting chain of H$_4$ (see SI Sec. \ref{app:swap-test-circuit} for details). } \end{figure} The inset of Fig. \ref{fig:swap-size} shows the estimated overlap $S$ as a function of sample size (number of eigensolver calls) in the case of two overlap qubits. The estimated overlap converges to the exact value (black dashed horizontal line) for roughly four million samples within $5\times10^{-4}$ (error bar invisible for the last data point). This demonstrates the correctness of our quantum matching algorithm. By repeating similar estimation as described above for increasingly larger overlapping regions, the exponential sampling advantage of the quantum matching algorithm over naive density matrix tomography is evident in Fig. \ref{fig:swap-size}. As we can see, to achieve a constant target precision of $\epsilon = 0.001$ on the overlap $S$, the ratio between the $\mathtt{SWAP}$ test estimation and the naive tomography estimation for the required number of eigensolver calls increases exponentially as the number of qubits. We note that in general, overlaps between density matrices are not low-rank observables, so the sampling complexity of estimating it is likely to be high. However, more efficient sampling schemes may exist than the naive density matrix tomography as presented in Eq. \eqref{nsamp_tomography}. For example, by sampling the differences in the RDMs between the current and the previous BE iterations, the sampling complexity could be much better than exponential. We leave this for future investigation. \subsubsection{Additional Quadratic Speedup in Accuracy} \label{sec:results-sample-quadratic-speedup} We have seen in the previous section that the quantum matching implemented by a $\mathtt{SWAP}$ test shows an exponential sampling advantage in terms of the size of the overlapping region as compared to naive density matrix tomography. However, the sample complexity in the estimation accuracy $\epsilon$ follows the same scaling of $1/\epsilon^2$ as classical sampling based algorithms. As is derived in Sec. \ref{sec:aa-quadratic-speedup}, we see that the sample complexity can be reduced to roughly $1/\epsilon$ with a coherent quantum matching algorithm, by combining amplitude estimation and a binary search protocol, thus achieving a quadratic speedup. In this section, we present concrete numerical data demonstrating this quadratic speedup. \begin{figure}[ht!] \centering \includegraphics[width=9cm]{figures/fig7_quadratic_speedup.png} \caption{\label{fig:ampest_sqrt_speedup} Number of eigensolver calls required as a function of target precision at overlap $S=0.4$, comparing incoherent (blue) and coherent (red) estimation. The blue scatter points for the incoherent are obtained from classical variational Monte Carlo estimation and the blue dashed line shows the incoherent sample as derived in Eq. \eqref{eq:nsamp_swap}. The red data points are obtain from the linear constraint convergence in Fig. \ref{fig:be-convergence-deterministic}, while the red dashed line shows the complexity as derived in the SI. The inset plots the eigensolver calls as a function of the overlap $S$ for a target precision $\epsilon = 0.001$. Note the crossover in both plots. The coherent estimation shows a square-root advantage at high target precision. } \end{figure} Fig. \ref{fig:ampest_sqrt_speedup} shows that for a single BE iteration, the required number of samples (eigensolver calls) on estimating the RDM overlap $S$ between two adjacent fragments as a function of the required precision on the overlap, comparing the $\mathtt{SWAP}$ test based quantum matching (blue) and the coherent overlap estimation combining the $\mathtt{SWAP}$ test and amplitude estimation ($\mathtt{SWAP}$+AE) (red). We can see that the required number of samples increases quadratically as the accuracy $\epsilon$ increases for the $\mathtt{SWAP}$ test based estimation. In contrast, the slope of the $\mathtt{SWAP}$+AE sample complexity is reduced to roughly half of the $\mathtt{SWAP}$ test. It is worthwhile to note that this quadratic speedup is only advantageous in the high precision (small $\epsilon$) limit, as is evident from the existence of a crossing point in Fig. \ref{fig:ampest_sqrt_speedup} (between $10^{-4}$ and $10^{-2}$), which defines a critical $\epsilon^*$. For $\epsilon < \epsilon^*$, $\mathtt{SWAP}$+AE is favored whereas the $\mathtt{SWAP}$ test wins when $\epsilon > \epsilon^*$. Moreover, the dependence of the sampling complexity on the value of the overlap $S$ is very different. This difference is clear from the inset of Fig. \ref{fig:ampest_sqrt_speedup}, comparing the $\mathtt{SWAP}$ (blue) and the $\mathtt{SWAP}$+AE estimation (red). In more detail, the sample complexity for the $\mathtt{SWAP}$ test decreases quadratically as the overlap $S$ approaches 1 (Eq. \eqref{eq:nsamp_swap}). As a comparison, the $\mathtt{SWAP}$+AE stays roughly a constant for the coherent quantum matching (\eqref{eq:nsamp_swap+bs}), because the amplitude amplification process used in the present work is agnostic to the value of the amplitude (overlap $S$), i.e., oblivious amplitude amplification \cite{yoder2014fixed,berry2014exponential}. The slight drop in sample complexity in the $\mathtt{SWAP}$+AE approach (red line, inset of Fig. \ref{fig:ampest_sqrt_speedup}) is due to the discrete bit representation of $S$ (see Sec. \ref{app:binary-search} of SI for details). The different scaling on $S$ between these two algorithms leads to a crossover of the sampling complexity at roughly $S=0.8$ for a target precision of $\epsilon = 0.001$. This crossover suggests again that the plain $\mathtt{SWAP}$ test is advantageous for a large overlap, while amplitude estimation works better for small overlap $S$. In addition, as mentioned in the previous section, as the bootstrap embedding iteration proceeds, the exponential convergence of the density mismatch (overlap $S$) suggests the need for an exponentially increasing accuracy $\epsilon$ on the overlap estimation. This further means the number of samples per iteration in the $\mathtt{SWAP}$ test should increases exponentially as the the number of iterations. Similarly, $\mathtt{SWAP}$+AE achieves a square-root speedup in the total sample numbers (remains exponential). We note that there may exist ways of sampling the overlap in the current BE iteration \emph{normalized} by the previous BE iteration to accelerate this requirement on a large number of samples, which we leave for future investigation. \section{Conclusion and Outlook} \label{sec:conclusion} In conclusion, we have developed a general quantum bootstrap embedding method to find the ground state of large electronic structure problems on a quantum computer by taking advantage of quantum algorithms. We formulated the original electronic structure problem as a optimization problem using a quadratic penalty to impose matching condition of adjacent fragments. A coherent quantum matching algorithm based on the $\mathtt{SWAP}$ test achieves efficient matching with an exponential sampling advantage compared to naive RDM tomography. By estimating the amplitude that encodes the overlap information combing an amplitude amplification and binary search protocol, an additional quadratic speedup is achieved. In addition, an adaptive sampling scheme is used based on previous overlap information and the desired target accuracy to improve the sampling efficiency. We demonstrate the performance of the QBE algorithm using a linear hydrogen molecule under minimal basis. Our QBE algorithm is shown to achieve exponential convergence in density mismatch and energy error similar to classical bootstrap embedding. However, instead of the exponential cost of an exact classical solver (full configuration interaction), quantum eigensolvers such as quantum phase estimation can solve the fragment electronic structure exactly without incurring the exponential cost. While we have made progress toward solving electronic structure problems employing quantum resources in bootstrap embedding, there are several open questions to explore in the future. At the algorithmic level, it is important to reconstruct the total system density matrices from subsystem ones \cite{qi2021emergent} in order to compute observables other than the energy. Ideally, quantum algorithms that can perform the reconstruction process would be desired. Moreover, we have established how the bootstrap embedding potential can affect the system energy including the excited states in Eq.~\eqref{quadratic-gradient}. Future works on developing a QBE algorithm targeting excited states \cite{mitra2021excited} or finite temperature electronic structures \cite{zhang1999finite,liu2018ab,sun2020finite} would be of great interest. Alternative constraint optimization methods such as the augmented Lagrangian method can also be explored to achieve potentially better convergence \cite{faulstich2022pure}. In addition, the idea of quantum matching proposed in the present work could also be exploited further in other embedding theories to harness quantum computers and resources, including but not limited to embedding schemes based on wave functions, density matrices, and Green's functions \cite{sun2016quantum}. In these contexts, it is likely that more sophisticated quantum primitives and algorithms could accomplish quantum matching more efficiently than the simple $\mathtt{SWAP}$ test we employ. For example, it is possible that higher order matching, or matching of derivatives, could be accomplished quantum-mechanically, thus side-stepping sampling noise. More broadly, these quantum embedding theories and algorithms enabled by quantum computation resources open new possibilities in chemistry, physics, and quantum information. For example, large molecular systems in catalysis \cite{freeze2019search,zhou2012introduction} and protein-ligand binding complexes \cite{warshel2014multiscale,proppe2020bioinspiration} likely can be simulated at a much higher accuracy by combining state-of-the-art quantum and classical computational resources in embedding properly. In condensed matter and material science, quantum bootstrap embedding may be adapted to periodic systems \cite{pham2019periodic,rusakov2018self,chibani2016self} for quantum material design \cite{head2020quantum} and probing phase diagrams of various lattice models \cite{qin2022hubbard} close to the thermodynamic limit. Finally, from a viewpoint of quantum information, the concept of embedding is closely related to entanglement. Understanding the connection between the performance of quantum embedding algorithms and fragment-bath entanglement entropy may provide a general way to describe and understand the complexity of chemical and physical problems from a quantum information perspective \cite{ding2020concept,ding2020correlation,wilde2013quantum}. Current quantum computers are small -- we believe our quantum bootstrap embedding method provides a general strategy to use multiple small quantum machines to solve large problems in chemistry and beyond. We look forward to future development in these directions. \begin{acknowledgement} YL thanks Di Luo, Minh Tran, and Daniel Ranard for helpful discussions. The work on analysis and numerical simulation was supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Co-Design Center for Quantum Advantage, under contract number DE-SC0012704. The conceptual algorithm development was supported in part by NTT Research. \end{acknowledgement} \begin{suppinfo} Additional theoretical and numerical details. \end{suppinfo}
\section{Introduction} \label{sec:introduction} Islamic geometric patterns are a rich and venerable ornamental tradition~\cite{Broug2013}. The most iconic of these patterns involve periodic arrangements of star shapes, with gaps between them filled by additional polygons with less symmetry (\fig{fig:hankins-method}). Often, the concave corners of stars are filled with rings of petal-shaped hexagons, yielding composite shapes called \emph{rosettes}~\cite{Lee1987} (\fig{fig:teaser}). We refer to the number of arms in a star or rosette as its \emph{order}. These motifs appear in patterns in several standard orders: multiples of three and four are the most common due to their compatibility with rotations in periodic symmetry groups. It is challenging to create patterns that incorporate unusual orders or unusual combinations of orders. For example, considerable geometric sleight-of-hand is required for orders such as~11 and~13 (\fig{fig:hankins-method}b), which are incompatible with crystallographic symmetries~\cite[Pg. 484]{Bonner2017}. \begin{figure*}[ht] \centering \includegraphics[width=\linewidth]{figs/teaser.png} \caption{\label{fig:teaser}Freeform designs composed of rosettes of many different orders.} \end{figure*} Whether designers employ stars and rosettes of standard or unusual orders, they typically construct \emph{periodic} compositions repeating in two directions in the plane. Repetition is one of the hallmarks of ornamentation: surface decoration on walls and floors, clothing, and objects should be appealing but not distracting. When presented with a periodic pattern, we visually `factor' for a non-repeating kernel and a rule for filling the plane with copies of that kernel. Thus the eye may casually appreciate the pattern without being overwhelmed by it. According to Gombrich~\cite{Gombrich1980}, `aesthetic delight lies somewhere between boredom and confusion', a sentiment echoed by many others~\cite{Hutcheson1726,Arnheim1972,Cromwell2021a}. In decorative contexts, a measure of boredom helps a pattern recede from conscious attention. On the other hand, art benefits from a larger dose of confusion. An artwork like a painting is a finite composition that rewards careful study, and so every part of that composition can bear some measure of novelty. In contrast, an infinite Islamic pattern that pleases the eye when elaborated over a wall might lose its appeal if cropped, framed, and hung on that same wall. As an artwork, it would have no natural boundary—no broad composition to guide the eye. This article presents a technique for constructing `freeform' Islamic geometric patterns: finite, non-repetitive arrangements of rosettes intended as self-contained compositions rather than as ornamental textures. A few sample compositions appear in \fig{fig:teaser}. Our freeform designs give us significant flexibility to mix and match unusual rosette orders. We move along Gombrich's continuum, away from the boredom of ornamentation and towards the confusion of art. The resulting visual experiment allows us to reimagine the canonical motifs of Islamic geometric patterns in a highly non-traditional setting. We construct motifs based on an initial polygonal patch using a hybrid of standard techniques (\sect{sec:preliminaries}). We define the overall arrangement of rosettes from a circle packing derived from a triangulation (\sect{sec:freeform-designs}). We show how any circle packing can be converted into a patch of connected polygons (\sect{sec:freeform-patch}). We then inscribe a motif in each polygon and join the motifs together to form the final pattern (\sect{sec:star-motifs}). This technique is robust over a wide range of rosette orders. The designer can control the final pattern by starting with a triangulation of their choosing. We support a few additional special effects via `gadgets' that perform local surgery on the computed circle packing (\sect{sec:gadgets}). We also adapt our technique to periodic patterns via toroidal circle packings (\sect{sec:periodicity}). \section{Related Work} \label{sec:related-work} Artists and mathematicians use many strategies to disrupt the potential monoto\-ny of ornamental Islamic patterns. For example, an artist often introduces mild variations in colours, decorative fills, or calligraphic inscriptions in periodic patterns of otherwise identical stars or rosettes. They also sometimes alter the geometry at the centres of selected rosettes while maintaining outward compatibility with the rest of the pattern. As the practice of Islamic geometric patterns grew in sophistication, artists sought to incorporate stars or rosettes of unusual orders into their work. The Topkap{\i} scroll, a 15th-century visual guide to the drawing of Islamic ornament, included a number of patterns with unusual combinations of stars. Cromwell~\cite{Cromwell2010} analyzed these patterns and articulated rules for their construction. Later, he presented a robust method for assembling patterns from irregular stars with different numbers of points~\cite{Cromwell2013}. That work demonstrated the \textit{wheel construction} (\sect{sec:preliminaries}), which we will detail and use in our method. More recently, Gailiunas~\cite{Gailiunas2020} studied the amount of geometric error that accumulates when juxtaposing otherwise incompatible stars. Bonner~\cite{Bonner2017} presented a comprehensive treatment of the modular construction of Islamic patterns. His \textit{polygonal technique}, also known as \textit{polygons-in-contact} (PIC) after Hankin~\cite{Hankin1925}, builds a motif in every tile of a polygonal tiling (\fig{fig:hankins-method}). Bonner's book includes a vast collection of patterns with different combinations of stars, including some `non-systematic' patterns that feature stars or rosettes with unusual orders, such as 7, 9, 11, 13, and 14. \begin{figure*}[h] \centering \includegraphics[width=\linewidth]{figs/tiling-pattern.png} \caption{\label{fig:hankins-method}Illustration of polygons-in-contact, with examples of rosettes highlighted. (a) A classical Islamic geometric pattern derived from a tiling by regular decagons, pentagons, and barrel-shaped hexagons. (b) A non-systematic pattern with an underlying tiling by regular 11-gons, 13-gons, and irregular pentagons.} \end{figure*} Another means of achieving irregularity is to move away from the Euclidean plane. In Islamic architecture, domes are often decorated with specialized geometric patterns adjusted to varying curvature~\cite{Broug2013}. Kaplan and Salesin~\cite{KaplanSalesin2004} demonstrated adapting PIC to produce patterns on the sphere and in the hyperbolic plane. While repetitive in the mathematical sense, hyperbolic patterns are necessarily distorted when projected into the Euclidean plane. Kaplan~\cite{Kaplan2009} later presented a more general method for mapping planar patterns with sufficient symmetry, including many Islamic patterns, onto arbitrary surfaces in 3D. A Moroccan \textit{zellij} design typically features a large central star surrounded by radially symmetric constellations of smaller modules~\cite{Castera1999}. These modules are formed from a standard set of individual tile shapes derived from an 8-pointed star. The result is a monumental work containing substantial visual novelty and appeal. The puzzle of creating such designs is more combinatorial than geometric: the artist seeks new discrete configurations of a fixed set of shapes. Recently, Kaplan~\cite{Kaplan2022} presented an algorithm for the procedural generation of small zellij compositions, which shares some aesthetic goals with our work. Modern mathematics allows us to produce patterns that are orderly without being periodic. Many techniques have been proposed that use substitution tilings or quasiperiodicity to guide the placement of Islamic motifs~\cite{BP2012a,BP2012b,Castera2010,Castera2016,WR2007}. Some researchers have even credited ancient designers with an explicit understanding of quasiperiodicity~\cite{AlAjlouni2012,LuSteinhardt2007}, though such claims are controversial~\cite{Cromwell2015}. Non-periodic patterns with long-range organization occupy an aesthetic sweet spot: they advertise global structure, but the precise nature of that structure is not trivially unravelled by the eye. In the broader world of computer graphics, researchers have explored some interactive and automated techniques for laying out small motifs to create ornamental patterns~\cite{Gieseke2021}. Practical numerical algorithms for constructing circle packings are relatively new~\cite{CollinsStephenson2003}, so circle packings have not received much attention as an organizing tool for pattern design. A notable exception is the work of Hamekasi and Samavati~\cite{Hamekasi2012}, who use circle packings to guide the placement of motifs in Persian floral designs. Most recently, Brewer et al.\ derived circle packings from $k$-uniform tilings and used them as a framework in which to inscribe Islamic motifs~\cite{Brewer2022}. Their technique overlaps somewhat with ours, though they are restricted to arrangements that can arise naturally from the vertex types and polygon orders of the tilings they use as a starting point. \section{Modular Motif Construction} \label{sec:preliminaries} Many standard techniques for constructing Islamic patterns are \textit{modular}: they decompose the canvas into disjoint regions such as disks or polygons and define a procedure for filling every region with a motif. This section summarizes two motif construction techniques that will form the basis of our method. In the \textit{polygons-in-contact} technique (PIC), the canvas is subdivided into polygons that meet edge-to-edge. We choose a \textit{contact angle} $\theta\in (0,\pi/2)$. For every edge of a polygon $P$ in the subdivision, we construct the two rays that grow from the edge's midpoint towards the interior of $P$, rotated by $\pm\theta$ relative to the edge. A motif is formed by truncating these rays where they meet rays from other edges. In simple cases, we need only compute intersections with rays from neighbouring edges (\fig{fig:star-construction}a), or from two edges away (\fig{fig:star-construction}b). A more robust construction requires heuristics to decide how to truncate rays, such as minimizing the total length of the motif's line segments~\cite[Sec. 4.4.2]{Bonner2017}. \fig{fig:hankins-method} shows two patterns created by constructing motifs for every polygon in a subdivision. In the \textit{wheel} construction, the modules are circles, each tangent to neighbouring circles in a larger pattern. The construction inscribes a star in every circle. Given a circle $C$ of radius $r$, we first identify a set of points $S$ on its boundary, including the points where $C$ meets its neighbours. We also choose a smaller circle $C'$ with radius $\alpha r$ for a given $\alpha\in(0,1)$, lying in the interior of $C$. Let $p$ and $q$ be two points in $S$. We construct the perpendicular bisector of chord $\overline{pq}$ and find the intersection of that bisector with $C'$. Then we draw line segments from $p$ and $q$ to the intersection. \fig{fig:star-construction} shows stars that emerge when this process is repeated for all pairs of $p$ and $q$ in $S$ that are consecutive (c) or non-consecutive (d). Here we can control the sharpness of the star by varying the scaling ratio $\alpha$ between the radii of the outer and inner circles. \begin{figure*}[h] \centering \includegraphics[width=\linewidth]{figs/star-construction.png} \caption{\label{fig:star-construction}Regular 9-pointed stars constructed using PIC (left) and the wheel construction (right). Using PIC, we truncate rays at their first (a) or second (b) intersections with a contact angle of $2\pi/5$. Using the wheel construction, we draw zig-zag paths connecting consecutive points (c) or every other point (d) on the outer circle.} \end{figure*} Both of these constructions can produce symmetric $n$-pointed stars. For PIC, a symmetric star is produced when $P$ is regular; for the wheel construction, we require the points in $S$ to be distributed evenly around $C$, and for $C$ and $C'$ to be concentric. We can convert between PIC's $\theta$ and the wheel construction's $\alpha$ in this case. Stars (a) and (c) in \fig{fig:star-construction} are related by \begin{equation} \alpha = 1 - \frac{\sin{\left(\pi/n\right)}\sin{\theta}}{\sin{\left(\pi(n+2)/2n - \theta \right)}} \label{eqn:wheel-first} \end{equation} and stars (b) and (d) are related by \begin{equation} \alpha = 1 - \frac{2\sin{\left(\pi/n\right)} \sin{\left(\pi(n-2)/2n\right)} \sin{(\theta - \pi/n)}} {\sin{\left(\pi/2 + 2\pi/n - \theta \right)}}. \label{eqn:wheel-radius} \end{equation} Empirically, the wheel construction works well when forming a star whose points lie on a common circle: it degrades gracefully as the point distribution becomes uneven. PIC is a better choice for small polygons whose irregularity is harder to characterize. We shall use both in our method. Note that neither of these techniques explicitly constructs rosettes. Although explicit rosette constructions exist~\cite{Lee1987}, we will allow rosettes to emerge as a by-product of the polygonal decompositions we use as a basis for motif construction, as in the examples of \fig{fig:hankins-method}. \section{Freeform Designs} \label{sec:freeform-designs} In this section, we present the steps that make up our main technique for constructing finite, freeform compositions of rosettes. The steps are visualized in \fig{fig:overview}. We begin with an arbitrary \textit{simplicial complex}~(a), which induces a \textit{circle packing}~(b). Based on the circle packing, we construct a polygonal \textit{patch}~(c), comprising large cyclic polygons separated by smaller irregular pentagons. Finally, we use a combination of PIC and the wheel construction to define \textit{motifs} for each polygon~(d), and optionally render the design~(e). In the following subsections, we describe each of these steps in detail. \begin{figure*}[h!] \label{fig:overview} \centering \includegraphics[width=\linewidth]{figs/overview.png} \caption{Our method takes a complex (a) and computes a circle packing (b). Then it forms a freeform patch of polygons (c), from which it develops motifs that form a seamless constellation (d) that may be styled (e).} \end{figure*} \subsection{Complex} The main input to our technique is a \textit{complex}, more formally a planar, simply connected, pure simplicial 2-complex $\mathcal{K}$. In simpler terms, we may regard $\mathcal{K}$ as a collection of non-overlapping triangles in the plane, meeting edge-to-edge. The union of the triangles defines a region the plane---a simple polygon. We will refer to the vertices, edges, and faces of the complex. We distinguish between its \textit{boundary vertices}, which lie on the simple polygon, and \textit{interior vertices}, which lie interior to the polygon. We may construct input complexes in numerous ways. It is easy to author them manually by placing and connecting vertices. They can also be generated procedurally, such as by computing the Delaunay triangulation of a point set. \subsection{Circle Packing} Let $\mathcal{K}$ be a complex with $n$ vertices. A \textit{circle packing} for $\mathcal{K}$ is a collection of non-overlapping circles $\{C_1,\ldots,C_n\}$ whose tangencies echo the combinatorial structure of $\mathcal{K}$. Each circle $C_i$ corresponds with vertex $v_i$ of the complex, and two circles $C_i$ and $C_j$ are externally tangent if and only if $v_i$ and $v_j$ are connected by an edge in $\mathcal{K}$. The Discrete Uniformization Theorem guarantees that a circle packing exists for any given complex $\mathcal{K}$~\cite{Stephenson2005}. Although the circle packing's connectivity will be identical to that of its complex, they will generally not be equivalent \textit{geometrically}: the locations and sizes of the circles are not directly related to the locations of the vertices in the complex, or to the shapes of its triangles. Collins and Stephenson~\cite{CollinsStephenson2003} describe a simple numerical algorithm that computes circle packings through iterative adjustments of an initial assignment of radii to the $C_i$. The radii of boundary circles must be further constrained with additional boundary conditions. The simple Python script by Eppstein~\cite{Eppstein} accepts explicit values for boundary radii. Given a boundary vertex of degree $n$, our implementation chooses a radius $r$ for a circle that would be perfectly surrounded by $2n-2$ unit circles, giving $r=(1-\sin\phi)/\sin\phi$, where $\phi=\pi/(2n-2)$. \subsection{Polygonal Patch} \label{sec:freeform-patch} A \textit{patch} is a finite set of polygons with disjoint interiors whose union is a topological disk. Given a circle packing, we construct a patch that has a large cyclic polygon (i.e., a polygon whose vertices lie on a common circle) associated with each circle, separated from other cyclic polygons by haloes of pentagonal `filler polygons'. By design, these polygons can serve as scaffolding for building motifs typical in Islamic geometric patterns. Let $C$ be an interior circle in a circle packing, and let $k$ be the degree of the vertex associated with $C$ in the complex. As illustrated in \fig{fig:freeform-patch}a, we construct a cyclic $2k$-gon $P$ in the interior of $C$. To begin, we set the vertices of $P$ to be the $k$ points of tangency between $C$ and its neighbours, together with the midpoints of the minor arcs of $C$ connecting adjacent tangency points. Now let $\tau\in(0,1)$ be a user-selected scaling factor. Scale $P$ relative to the centre of $C$ by a factor of $\tau$, and add the scaled polygon to the patch. By default, we use $\tau=0.8$, a choice that we discuss in \sect{sec:details}. The gaps between circles in the packing are triangular regions bounded by arcs of three mutually tangent circles. Let $C_i$, $C_j$, and $C_k$ be one such trio of circles. We divide the space between their cyclic polygons into three new pentagons, as shown in \fig{fig:freeform-patch}b, by drawing edges connecting vertices of cyclic polygons. Three outer line segments pass through the pairwise tangencies of the circles. Three inner segments connect arc midpoints to a new point $o$, the incentre of the triangle formed from the centres of $C_i$, $C_j$, and $C_k$. \begin{figure}[h] \centering \includegraphics[width=\linewidth]{figs/freeform-patch.png} \caption{\label{fig:freeform-patch}Constructing a polygonal patch from a circle packing: we create a cyclic polygon for every circle (a), and fill the gaps between three mutually tangent circles with trios of irregular pentagons (b).} \end{figure} \subsection{Motif Construction} \label{sec:star-motifs} The final step in our process is to construct a motif for every polygon in the patch produced in the previous step. Here we apply both the wheel construction and PIC, depending on the type of polygon being decorated. Our large cyclic polygons yield motifs that garner attention. We safeguard the quality of these motifs by exploiting the robustness of the wheel construction in their development (\fig{fig:motif-construction}a). We then use PIC for the more unpredictable filler pentagons (\fig{fig:motif-construction}b). Optionally, we remove motif segments around the boundary of the resulting composition, paring it down to a core of whole rosettes (\fig{fig:motif-construction}c). Our construction depends on a single global contact angle $\theta$, as described in \sect{sec:preliminaries}. By default, we use $\theta=2\pi/5$, the angle for which PIC would inscribe a perfect pentacle in a regular pentagon. \begin{figure}[ht] \centering \includegraphics[width=\linewidth]{figs/motif-construction.png} \caption{\label{fig:motif-construction}To construct a design from a patch, we use the wheel construction to create a star in every cyclic polygon~(a) and apply PIC to build motifs for filler polygons~(b). Optionally, we remove the outer layers of geometry to extract an arrangement of whole rosettes~(c).} \end{figure} Let $C$ be an interior circle in the packing with centre $o$ and $k$ points of tangency. Let $P$ be the cyclic $2k$-gon associated with $C$ in the patch. We use the wheel construction to build a star centred at $o$ whose outer points lie at the edge midpoints of $P$. Generally, these midpoints do not lie on a common circle, but the wheel construction is tolerant of small deviations in their distances from $o$. Let $r_C$ be the radius of $C$, and define $r$ to be $r_C\cos(\pi/2k)$. The value $r$ approximates the radius of an inscribed circle meeting $P$'s edge midpoints, an approximation that converges on the correct value when $P$ is regular. Now compute $\alpha$ by plugging the user-supplied contact angle $\theta$ into \eqn{eqn:wheel-radius}, and let $C'$ be a circle with center $o$ and radius $\alpha r$. The radius of $C'$ is chosen to ensure that the contact angles at the points of the star approximate $\theta$. We apply the wheel construction using the edge midpoints of $P$ and the inner circle $C'$, connecting every other star point as in \fig{fig:star-construction}d. It remains to build motifs for the filler pentagons. Let $Q$ be one such pentagon. As in PIC, construct a pair of rays emanating from the midpoint of every edge of $Q$, and truncate them where they intersect rays growing from neighbouring edges. If an edge $e$ of $Q$ is adjacent to a cyclic polygon, then we choose contact angles that yield rays parallel to the star edges meeting across $e$ (\fig{fig:motif-construction}b, red). These angles may not be symmetric across the perpendicular bisector of $e$, but the discrepancy is small in practice. If $e$ is adjacent to another pentagon, on the other hand, then we use $\theta$ as the contact angle for its rays (\fig{fig:motif-construction}b, purple). In summary, our method uses a patch to construct a constellation of localized motifs that combine to form familiar visual elements: rosettes. By our application of the Discrete Uniformization Theorem, each rosette corresponds to a vertex in the triangulation $\mathcal{K}$, and two rosettes are adjacent if and only if their vertices share an edge in $\mathcal{K}$. The order of a rosette is twice the degree of its associated vertex. \section{Gadgets} \label{sec:gadgets} The basic technique of the previous section can produce a wide variety of freeform designs with combinations of rosettes of different orders. However, some configurations found in traditional Islamic geometric patterns remain out of reach, most obviously because we define only one way to fill the triangular gaps between cyclic polygons. In this section, we introduce two \textit{gadgets} that help us recover some of that variety, increasing the visual intrigue of our designs. Gadgets are small subgraphs with labelled vertices that can be incorporated into a complex. These vertices then determine local clusters of polygons during patch construction, overriding the polygons of \sect{sec:freeform-patch}. A \emph{square gadget} is a 5-vertex subgraph with a central vertex $a$ of degree 4, as shown in \fig{fig:square-gadget}a. Given a complex containing a copy of the square gadget, we obtain a circle packing containing a cluster of circles like the one shown in \fig{fig:square-gadget}b, where circle $A$ is associated with vertex $a$. When building the patch, we remove $A$ from the circle packing and tile the hole left behind with four pentagons, as shown in \fig{fig:square-gadget}c. The new point $o$ is the mean of vertices $i$ ,$j$, $k$, and $\ell$. Our motif construction will produce a squarish region surrounded by four rosettes containing a central octagon. \vspace{-10pt} \begin{figure}[h] \centering \includegraphics[width=\linewidth]{figs/square-gadget.png} \caption{\label{fig:bowtie-gadget}The square gadget~(a) produces a circle packing~(b) from which we derive four filler pentagons~(c).} \vspace{5pt} \includegraphics[width=\linewidth]{figs/bowtie-gadget.png} \caption{\label{fig:square-gadget}The bowtie gadget~(a) produces a circle packing~(b) from which we derive a cluster~(c) of four filler pentagons and a barrel-shaped hexagon.} \end{figure} A \emph{bowtie gadget} is a 6-vertex subgraph with two central vertices $a$ and $b$ of degree 4, as shown in \fig{fig:bowtie-gadget}a. As with the square gadget, we remove the corresponding circles $A$ and $B$ from the circle packing and fill the void with a new configuration of tiles. First, when constructing a cyclic polygon for circle $D$ associated with vertex $d$, we divide the minor arc between the tangencies with $C$ and $E$ into \textit{three} equal pieces instead of the usual two, yielding vertices $j$ and $j'$ in \fig{fig:bowtie-gadget}c. Similarly, we divide $F$'s arc into three, which gives us vertices $\ell$ and $\ell'$. We then construct a bowtie-shaped arrangement of four pentagons and one barrel-shaped hexagon, as illustrated in \fig{fig:bowtie-gadget}c, where $o$ is the mean of $i$, $j$, and $\ell$ and $o'$ is the mean of $j'$, $k$, and $\ell'$. \setlength{\columnsep}{8pt} \begin{wrapfigure}{r}{0.26\linewidth} \vspace{-32.5pt} \begin{center} \includegraphics[width=\linewidth]{figs/hexagon-motif.png} \end{center} \vspace{-32pt} \end{wrapfigure} When the barrel-shaped hexagon in the centre of the bowtie gadget becomes too thin, it can produce a motif with a small region of overlap at its centre, as shown in red in the inset. When these overlaps occur, we replace the red segments with a perfect `X', shown in blue. The blue segments alter the contact angles with the edges of the hexagon; we propagate any changes to the hexagon's four neighbouring pentagons. \setlength{\columnsep}{8pt} \begin{wrapfigure}{l}{0.17\linewidth} \vspace{-32.5pt} \begin{center} \includegraphics[width=\linewidth]{figs/odd-degree-gadget.png} \end{center} \vspace{-40pt} \end{wrapfigure} Recall that without gadgets, our construction was limited to rosettes of even orders. But when a bowtie gadget appears in a complex, vertices $d$ and $f$ each contribute three edges to their corresponding cyclic polygons. Therefore, if a complex vertex acts as $d$ or $f$ in one such gadget, as in the central vertex of the subgraph in the inset, that vertex will yield a rosette of odd order. More generally, we may hang any odd number of suitably oriented bowtie gadgets from a vertex to obtain an odd-order rosette. \fig{fig:grid-gadgets} shows a freeform design constructed from a random arrangement of bowtie and square gadgets. In future work, we hope to explore gadgets beyond these two. \begin{figure}[h!] \centering \includegraphics[width=\linewidth]{figs/grid-gadgets-design.png} \caption{\label{fig:grid-gadgets}A composition based on a square grid, where every square is randomly subdivided with a diagonal, a square gadget, or a bowtie gadget.} \end{figure} \section{Periodic Patterns} \label{sec:periodicity} While the focus of our technique is the creation of finite, freeform compositions, we have also examined its ability to produce more orderly designs. For example, a finite subset of a periodic arrangement of bowtie gadgets (\fig{fig:freeform-classical}, left) yields an approximation of the decagonal design in \fig{fig:hankins-method}a (\fig{fig:freeform-classical}, right). Other periodic arrangements of triangles and gadgets can reproduce different classic designs. However, because of flexibility in the circle packing algorithm, these freeform designs could contain rosettes of continuously varying scales. We can extend our technique to generate truly periodic patterns by generalizing the Discrete Uniformization Theorem beyond the Euclidean plane. In particular, if $\mathcal{K}$ is embedded on a torus, then the theorem guarantees the existence of a circle packing in the torus's intrinsic metric~\cite[Ch. 9]{Stephenson2005}. The circle packing algorithm is, in some sense, even simpler in this case because there is no longer any need for explicit boundary conditions: every circle is completely surrounded. The torus can then be cut open and unrolled, yielding a finite collection of circles that can be stamped out to produce an infinite periodic packing. \fig{fig:periodic-pattern-complex} gives an example of a periodic pattern generated from a simplicial complex embedded on a torus. The light grey disks in \fig{fig:periodic-pattern-complex}b should be interpreted as translated copies of the dark grey disks with the same indices. The numerical circle packing algorithm yields a layout that tiles the plane by translation (\fig{fig:periodic-pattern-complex}c), from which we can create a periodic pattern with rosettes of orders 10, 12, 14, and 16. Future work could explore the analogous extensions of this technique to other spaces, such as the sphere and the Poincar\'e disk model of the hyperbolic plane~\cite{KaplanSalesin2004}. \begin{figure}[h] \centering \includegraphics[width=\textwidth]{figs/freeform-classical.png} \caption{\label{fig:freeform-classical}A periodic arrangement of bowtie gadgets (left) can be used to generate a freeform version of the pattern in \fig{fig:hankins-method}a (right).} \end{figure} \begin{figure}[ht] \centering \includegraphics[width=\linewidth]{figs/periodic-pattern-complex.png} \caption{\label{fig:periodic-pattern-complex}A triangulation drawn on a square with periodic boundary conditions~(a) is used to generate a circle packing~(b) that covers the plane through translation~(c). We construct motifs to obtain a periodic Islamic geometric pattern~(d).} \end{figure} \section{Discussion} \label{sec:details} In this section, we discuss some of the details of our technique, including alternative approaches that we considered during its development. Some of these alternatives may offer opportunities for future work. \textbf{Selecting interior circles. } We typically do not generate a motif for every circle in the packing. Boundary circles, and circles adjacent to them, can differ substantially in size from their neighbours. These variations can propagate through the rest of the construction and produce unacceptably distorted motifs, such as uneven rosette petals (\fig{fig:circle-selection}). Future work could consider ways to optimize the geometry of the circle packing to serve patch and motif construction. For now, we omit outer layers of circles in our final designs. Note that this approach may separate the design into multiple connected components, in which case we simply keep the largest component. Beyond these technicalities, we can be selective for aesthetic reasons. Having the freedom to craft the shape of a design provides opportunities to create interesting compositions (\fig{fig:generative}). \setlength{\columnsep}{8pt} \begin{wrapfigure}{r}{0.38\linewidth} \vspace{-12pt} \begin{center} \includegraphics[width=\linewidth]{figs/pentagon-regularity.png} \end{center} \vspace{-32pt} \end{wrapfigure} \textbf{Choosing a scale factor. } Recall that the parameter~$\tau$ controls the scale of each cyclic polygon relative to its circle, which in turn affects the shapes of filler pentagons. As shown in the inset, the quality of a motif generated within a filler pentagon decreases as that pentagon deviates from regularity. Thus we seek to choose $\tau$ to minimize the total deviation across a design. To gauge the deviation of a pentagon $Q$ from regularity, we adopt a continuous symmetry measure by Zabrodsky et al.~\cite{ZPA1992}, which quantifies the minimal distance that the vertices of $Q$ must travel to form a regular pentagon. Let the error of a freeform patch be the average deviation of its pentagons from regularity. We can compute this error for a range of closely-spaced $\tau$ values and choose the one with minimal error (\fig{fig:scale-factor}a). Over a range of circle packings, we see significant deviation outside the range $(0.7,0.9)$ and find that $\tau=0.8$ produces satisfactory results, as shown throughout this work. \begin{figure}[ht] \includegraphics[width=\linewidth]{figs/scale-factor.png} \caption{\label{fig:scale-factor}A patch with pentagons coloured by their deviations (red) from regularity (green). In (a), cyclic polygons are scaled by $\tau = 0.7$, $0.8$, and $0.9$, showing that $0.8$ produces good quality overall. In (b), they are offset by a fixed amount, with less consistent results.} \end{figure} In the future, we hope to investigate other measurements of polygon quality in order to produce patches that are closer to ideal. For example, PIC can often produce a satisfactory motif in a polygon that has lower-order symmetries while not being fully regular. As an alternative to treating $\tau$ as a scaling factor, we also considered \textit{offsetting} cyclic polygons by a constant inward distance~$\tau$. However, we found that this approach was not as successful in producing high-quality pentagons (\fig{fig:scale-factor}b). With either interpretation of $\tau$, the quality is the poorest for pentagons adjacent to two cyclic polygons of widely different radii. Hamekasi and Samavati note this issue as well~\cite{Hamekasi2012}, and mitigate it by avoiding complexes containing neighbouring vertices of widely varying degrees. In future work, we would like to develop a global optimization that chooses a different scaling factor for every cyclic polygon so as to maximize the overall quality of all filler pentagons. \setlength{\columnsep}{7pt} \begin{wrapfigure}{r}{0.39\linewidth} \vspace{-32pt} \begin{center} \includegraphics[width=\linewidth]{figs/make-regular.png} \end{center} \vspace{-32pt} \end{wrapfigure} \textbf{Cyclic vs. regular polygons. } It is tempting to construct regular polygons in place of cyclic polygons, as these would yield perfectly symmetric stars as motifs. Using the aforementioned regularity measurement~\cite{ZPA1992}, we fit a regular polygon $\hat{P}$ to each cyclic polygon $P$ generated in \sect{sec:freeform-patch}, and centre $\hat{P}$ on the circumcentre of $P$. The result for $\tau=0.8$ is shown in the inset. This approach prioritizes the quality of large, prominent stars. However, it yields distorted pentagons whose motifs self-intersect. By choosing cyclic polygons rather than regular polygons, our algorithm sacrifices some quality in large stars for the sake of creating feasible connections between them. \begin{figure}[h!] \centering \includegraphics[width=\linewidth]{figs/color-by-size.png} \caption{\label{fig:colour-by-size}Generative designs constructed from Delaunay triangulations of random points sets, without (left) and with (right) bowtie gadgets.} \end{figure} \section{Results} \label{sec:results} We demonstrate the versatility of our technique by presenting a range of freeform designs. For stylized results such as the filled composition in \fig{fig:colour-by-size} and the interlaced design in \fig{fig:ordered-pattern}, we adapt the rendering algorithms described by Kaplan in Bonner's text~\cite[Sec. 4.5]{Bonner2017}. Our method places no constraints on the input complex, giving users considerable control over the output design. Fully generative designs can be created using Delaunay triangulations of random point sets, leading to arrangements of rosettes with various orders (\fig{fig:colour-by-size}, left). We can further increase the number of possible charges and broaden the expressiveness of our technique by inserting random gadgets (\fig{fig:colour-by-size}, right). Of course, an artist may select a subset of rosettes in a generative design to craft a desired high-level composition (\fig{fig:generative}). \begin{figure}[h] \includegraphics[width=\linewidth]{figs/generative.png} \caption{\label{fig:generative}A generative design in which the user has manually chosen to keep a subset of rosettes from an initial arrangement, producing a more dynamic composition with an irregular boundary and internal voids.} \end{figure} On the other hand, we can begin with a highly structured complex and obtain a repetitive final design (Figs.~\ref{fig:freeform-classical} and~\ref{fig:ordered-pattern}), or use a toroidal complex to produce a truly periodic pattern (\fig{fig:periodic-pattern-complex}d). In principle, these approaches could be used to produce exactly or approximately periodic drawings of many historical Islamic geometric patterns. However, we have not attempted to catalogue exactly which ones are possible because existing construction techniques are much better suited to the task of drawing them. In between the extremes of full control and generative randomness, we can insert carefully constructed subgraphs into a complex to create a single high-order rosette (\fig{fig:high-order}a), or create appealing local arrangements of rosettes (\fig{fig:high-order}b,c). Another way to balance order and chaos is to place random gadgets within an otherwise ordered grid (\fig{fig:grid-gadgets}). \begin{figure*}[h] \centering \includegraphics[width=\linewidth]{figs/high-order-full.png} \caption{\label{fig:high-order}A tuned design with a high-order rosette (a), for which $\tau = 0.96$ and $\alpha = 0.75$, and a composition (c) incorporating multiple instances of a web-like sub-complex (b).} \end{figure*} The high-order rosette in \fig{fig:high-order}a is a special case, in that it requires hand-tuning. Recall that adjacent circles with widely varying radii can produce distorted motifs (\fig{fig:circle-selection}). To produce a satisfactory large rosette, we manually set the $\tau$ and $\alpha$ values for its cyclic polygon for a better fit with the surrounding geometry. Close examination of many of our results reveals small geometric discrepancies of the kind illustrated starkly in \fig{fig:circle-selection}. When rosettes have arms that vary too dramatically in width or length, they disrupt the elegance of a pattern and the feeling of `inevitability' in its construction. There are several places in our work where we choose global constants like $\tau$ that produce acceptable results in general without adapting to the detailed geometry of local parts of individual designs. The large rosette in \fig{fig:high-order}a gives one clear example of where local adjustments can improve a design. In future work, we would like to explore more fine-grained constructions that can enhance the quality of every rosette based on the configuration of the circle packing in its immediate neighbourhood. \section{Conclusion} \label{sec:conclusion} We presented a robust method for constructing freeform Islamic geometric patterns comprising rosettes of unusual orders. Our technique relies on the theory of circle packings, giving us a principled geometric scaffolding from which to develop a polygonal patch and then motifs. The user controls the initial complex and any gadgets in it, allowing for significant creative freedom in the design process. Our results are more organic and less repetitive than existing patterns and suggest many ideas for further exploration. We believe they communicate the aesthetic of Islamic geometric patterns while also interpreting them in a non-traditional context. They still manage to convey the `aesthetic delight' that Gombrich discussed~\cite{Gombrich1980}, but with slightly less boredom and more confusion, paving the way for more artistic applications of these designs. The work enhances our understanding of traditional patterns and reveals new opportunities---freeform or otherwise---for both ornamentation and art-making. \begin{figure}[h] \centering \includegraphics[width=\linewidth]{figs/ordered-pattern.png} \caption{\label{fig:ordered-pattern}A highly structured composition (right) generated from a finite subset of a conceptually periodic complex (left). Although the circle packing is not constructed in a toroidal domain as in \sect{sec:periodicity}, the resulting composition appears close to periodic.} \end{figure} \section*{Acknowledgements} This research was supported by the Natural Sciences and Engineering Research Council of Canada and the Cheriton School of Computer Science at the University of Waterloo.
\section{Introduction} Guided visits to research centres or facilities certainly represent a peculiar element in a student's high school career, since they allow direct contact with authentic conditions of scientific knowledge production processes \cite{Dimopoulos}. In the Italian National Indication guidelines on teaching \cite{Indication}, in fact, these visits are explicitly mentioned for physics, as they represent one of the means by which students reach their learning objectives at the end of their high school career. Experiencing some time in a research centre can indeed not only improve students’ knowledge of physics, but also lead to a clearer idea of what research in physics is about and eventually motivate some of them to consider a science profession \cite{Neresini}. Therefore, these visits should become part of a scientific school curriculum, along with hands-on and practical activities \cite{Snetinova,Sokolowska, Postiglione1, Postiglione2, Postiglione3}. In Italy, two examples of internationally renowned laboratories that organise visits addressed to school groups are the Laboratori Nazionali del Gran Sasso \cite{lngs} and the Sardinia Radio Telescope \cite{srt}. In Europe, CERN is one of the most active centres as regards proposals for schools \cite{Ellis}. Worldwide, several research centres or facilities open their doors to schools. The participation of students and teachers to visits, however, although certainly meaningful, can be very expensive in terms of money and time, especially if the centres are located in places far from the school. For this reason, physics teachers often choose alternative activities to ensure contact with research organisations that do not require an on-site visit. An example in this sense are the CERN International Masterclasses \cite{Cecire1, Cecire2}, which allow students to work from their schools on real particle physics data, and discuss the related analysis together with CERN researchers during a video-conference. In this way, participants can virtually walk into a scientific central control room and get a glance of what they would see entering CERN. The advantages of initiatives of this kind are manifold, from becoming aware of the frontiers of scientific research, to actively working on real data, to coming into contact with an international research environment \cite{DeAngelis}. On the other hand, however, the contact with the laboratory is only provided by the video-conferences that generally involve many students’ groups at the same time \cite{Cecire1}. In this context, we worked to develop a third way, alternative to both face-to-face visits and masterclass-type initiatives, through which a student can experience the world of a scientific research laboratory up close. Our approach makes use of Virtual Reality (VR) technology. To do this, we chose the context of particle physics, in particular the Belle II collaboration, for which an advanced VR application was developed \cite{DeAngelis}. The remaining paper is organised as follows. In section 2 we describe the activity we developed. In section 3 we illustrate the public we reached, including both students and teachers, and the feedback we received and in section 4 we present our conclusion. \section{The educational proposal} We have chosen to organise a virtual visit to an international laboratory which is however very difficult and expensive to reach for Italian school groups, since it is located in Japan (much further away than Laboratori Nazionali del Gran Sasso or CERN). In fact, our educational proposal for schools initiated from the VR application Belle2VR \cite{Duer}. Having realised the potential of Belle2VR application, we soon started to use it with the public during some outreach events such as science festivals or public events organised at the University. In these cases, visitors were given the possibility to wear the VR helmet while the researchers used joysticks to guide them to discover the experiment, as in a real guided visit. After a few years of experience in science festivals and open events to which thousands of people participated, including many school students, that provided us very positive feedback, we have decided to propose a more structured activity to schools. \subsection{Belle2VR} Developed by Virginia Tech, the application Belle2VR allows users to virtually enter the particle physics detector of the Belle II experiment \cite{Kou}. The Belle II experiment is currently carried out at the KEK in Tsukuba, Japan, and it studies the properties of heavy quarks and leptons to search for an evidence of new physics phenomena, from the matter-antimatter asymmetry problem to the existence of dark matter particles. Belle2VR reconstructs the interior of the detector and allows to visualise realistic simulations of particles interacting with each other and with the detector elements (Fig. 1). The user can navigate through the detector and its components and can also manage the time evolution of the interaction by going back and forth or stopping the Developed by Virginia Tech, the application Belle2VR allows users to virtually enter the particle physics detector of the Belle II experiment \cite{Kou}. The Belle II experiment is currently carried out at the KEK in Tsukuba, Japan, and it studies the properties of heavy quarks and leptons to search for an evidence of new physics phenomena, from the matter-antimatter asymmetry problem to the existence of dark matter particles. Belle2VR reconstructs the interior of the detector and allows to visualise realistic simulations of particles interacting with each other and with the detector elements (Fig. 1). The user can navigate through the detector and its components and can also manage the time evolution of the interaction by going back and forth or stopping the motion of particles at a specific time. Belle2VR, therefore, allows to explore particle physics phenomena from a unique point of view. \subsection{Activity structure} We built an activity addressed to high school class groups, lasting about an hour and a half, that can be carried out in a dedicated University room, or directly in the classroom. It starts with a theoretical introduction that makes use of slides. Here, some basic topics and concepts typically treated at school are recalled, such as electromagnetism. At the same time, more recent contents are also presented, such as the Standard Model, the cross section or the decay of particles, which require the use of quantum physics. The Belle II experiment is also presented in terms of its components and physics goal. \begin{figure}[ht] \centering \includegraphics[width=0.5\columnwidth]{Pictures/Belle2VR_cut.png} \caption{Snapshot of a simulated event into the Belle2VR application.} \end{figure} This phase is meant to represent the welcome and introduction step that characterises the initial part of a typical on-site visit to a research laboratory \cite{Neresini}. Subsequently, the researcher puts on the VR helmet while a large screen shows to the group what he/she sees. At that point, participants enter the detector for the first time together with the researcher. He/she moves in the virtual environment by movements of the head, allowing to display the detector details and some collisions between particles that have been selected by he/she. This allows to underline the most important aspects of the experiment and to visualise what researchers described in the first part of the activity. This is the moment in which students access the researcher's work environment, and begin to look at it through his/her eyes and his/her emotion. At this point students in turn put on the helmets, enter the detector in first person and explore the virtual space while a researcher stays close to him/her to guide him/her and answer all his/her questions and curiosities. Usually, we dedicate from two to three researchers in the activity, so that we can carry on this phase using up to three VR parallel stations. In the meantime, the rest of the group watches their classmate while living the experience and follows the discussion with the researcher. \section{Collection of data and results} Once the activity design was completed, we tested it with students of different ages and schools. To do this, we first involved some of the teachers already used to work with us in testing, discussing and optimising innovative activities. Together with them, we selected 7 groups of students (one for each teacher) from different schools: 2 classes of the fifth and final year of high school (17-18 years old), 2 classes of the fourth year (16-17 years old), 1 class of the third year (15-16 years old) and 2 mixed groups of third, fourth and fifth year students. In this way, we had both groups of students all very interested in learning more about physics (the two mixed groups) and typical school classes where interested and non-interested students coexist. Regarding the school type, the vast majority of participants attended the “Liceo Scientifico”, i.e. the Italian high school focused on science subjects; only one mixed group of students attended the “Liceo Classico”, the Italian high school focused on the humanities. After carrying out the activity with the students in the presence of their teachers, we asked the latter to talk with their class to get their impressions on our proposal. Later, we carried out open interviews with all participating teachers separately. \subsection{Results} In general, the activity was very positively received by both teachers and students. In fact, 5 out of 7 teachers told us that their students voted 5 out of 5 and 2 out of 7 teachers told us their students voted 4 out of 5 to the activity from a general point of view. The teachers' score was also very positive, as 6 out of 7 teachers voted 5 out of 5 and 1 teacher voted 4 out of 5. At this point, we asked for more details on their vote. Specifically, we first asked them what they particularly liked about the activity. Three of them told us that they enjoyed the use of VR technology; one teacher stated that the strength of the activity lays in the possibility of getting inside the particle detector; another teacher appreciated the opportunity of “directly seeing” what it means doing research with a particle accelerator; one teacher mentioned the possibility of bringing the world of research closer to students; another teacher especially appreciated the clarity of the researchers who carried out the activity. Then, we asked their opinion about the different phases of the activity. The introductory part, realised using slides, was considered clear and well organised by all the teachers. Two teachers also pointed out that some topics could be deepened, such as the concept of interaction between particles and the mass-energy equivalence. The part of the activity that makes use of Belle2VR has been defined by all teachers as interesting, fun and engaging. As for the negative aspects of the activity, the majority of the teachers stated that they couldn’t find any; the only elements raised by two teachers concerned the limited number of students that can be involved and the role of some participants considered too passive. Subsequently, we asked the teachers what objectives they think the activity was able to achieve. Some answers concerned the possibility of understanding and visualising particle physics (one teacher in particular stated that his students even understood the uncertainty principle thanks to the activity). Other answers cited the possibility of inspiring curiosity and interest toward physics and science, and of bringing students closer to the work of a physicist. At the end of the interview we explicitly asked the teachers which class year is more suitable for the activity and if they would have proposed the activity to other classes. The majority stated that the activity is suitable for the final months of the fourth year or the fifth year (when Italian students have typically already dealt with electromagnetism and a first introduction of quantum physics). Two teachers, however, claimed that even third-year students can benefit from the activity, as it is fascinating and inspiring. All the teachers claimed that they would surely recommend the activity to other classes. \section{Discussion and conclusion} In this paper we presented an educational proposal addressed to high schools and realised at our University that makes use of the VR technology to enter a physics research laboratory. The activity aims to constitute an alternative proposal to on-site visits to research centres, which, while particularly formative and enriching for students, are also very expensive in terms of time and money. Our proposal retraces all the stages of an on-site visit \cite{Neresini}: welcoming and introduction; entering into the laboratory or facility; interaction and discussion with the public. Throughout the initiative, a fundamental role is played by the researchers who carry out the activity. In fact, they not only guide the public in the laboratory (in our case piloting the Belle2VR application) but also share their emotions and experiences with students, thus helping to paint a realistic representation of their working environment. Following the discussion with a focus group of 7 high school teachers who participated in the activity together with their classes, we can state that our proposal was very well received by school and therefore we are strongly motivated to replicate it with other school groups in the future. In fact, the teachers greatly appreciated the activity. They underlined several aspects that this proposal manages to achieve: visualising and understanding phenomena otherwise impossible to see such as those related to particle physics; spreading VR technology; intriguing students about physics and science; giving participants a more realistic view of the scientific research world and of the work of a scientist. All these elements contribute to strengthening physics teaching and bringing students closer to STEM careers. The teachers also helped us to identify some aspects we can work on to improve our activity: the limited number of students that can be involved and the too passive role experienced by a small part of them. These aspects seem to be easily overcome, for example adding more parallel VR stations, where more students can virtually enter the experiment at the same time. A very significant aspect of our proposal consists in the possibility of involving schools easily in any place without them having to face high travel expenses or heavy time commitment. In this sense, our initiative could provide a valuable example of a method to introduce a visit to a research laboratory on a permanent basis in physics school curricula of all students, regardless of their availability of financial resources and their geographical location. For this reason, we believe that our proposal is worth being exported to other research centres or facilities, even in fields other than particle physics. \section*{Acknowledgements} This work was supported by the Italian Project ‘Piano Lauree Scientifiche’. We thank the teachers and students who participated in our activity.
\section{Introduction} Medical imaging such as MRI comprises one of the most prominent imaging categories. Doctors and other specialists use magnetic resonance imaging to diagnose brain diseases. The categorization of these images using computer systems can be a significant contribution to this field that would be useful for both clinicians and patients. Such a system can help physicians improve the speed and accuracy of their diagnoses.\cite{TANDEL2020103804} Digital image processing consists of algorithmic processes that transform an image, the main task of image processing is noise reduction in medical images. \cite{cadena2017}. Noise causes degradation in image quality, which can affect the accuracy of medical diagnoses\cite{reduccion2}. Noise in medical images is commonly caused by the malfunction of the sensor and other hardware in the process of forming, storing or transmitting images, this type of noise affects some individual pixels, changing their original values.\cite{arnal20} The noise appears as a granular pattern due to coherent constructive and destructive interference from scattered echoes reflected by microscopic scattering from tissue. The resulting granular pattern reduces the contrast resolution and detail obtainable within the tissue and creates a negative effect on various image interpretation tasks such as feature extraction, segmentation, registration, savannah, recognition, volume rendering, and 3D visualization. Therefore, the removal of spots through digital image processing should improve the image quality and diagnostic potential of medical images.\cite{arnal20} Various noise reduction methods and algorithms have been applied to improve the quality of medical images, such as: Parallel computing proposes a new hybrid algorithm for the reduction of speckle noise in medical images. The method efficiently combines the advantages of various denoising filters using local and non-local information. A comparative study is carried out using quantitative and qualitative measures and showing the competitiveness of the proposed method. Both methods are parallelized using OpenMP and a hybrid combination of MPI and OpenMP.\cite{arnal20} In this systematic review, 37 scientific articles are analyzed for the reduction of noise in medical images. Therefore, the objectives of the study are: a) Analyze the Algorithms applied, b) identify the anatomical regions treated and c) determine the type of study used in noise reduction studies in medical images carried out between 2010 and 2022 as described. Observe in our data sheet. \section{METHODOLOGY} \subsection{Type of study} A systematic review of the literature on noise reduction in medical images in the last 12 years was carried out. The search for information was considered from the years 2010-2022. The studies are published in English and Spanish and have been carried out all over the world. The keywords used were: noise, digital processing, medical images, parallel computing. \subsection{Techniques and instruments} The observation technique was used to systematize the original articles. A data sheet was prepared to record the information. The indicators used were author, year, algorithms, methodology, parallel computing, anatomical region treated. \subsection{Literature search procedure} Information was collected from the repository database: \hfill Scopus \url{https://www.scopus.com} \hfill Academic google \url{https://scholar.google.es/schhp?hl=es} \hfill Science Direct \url{www.sciencedirect.com} \hfill \begin{center} {\includegraphics[width=0.4\textwidth]{Flujo_diagrama.png}\par} \end{center} \hfill Prism Flowchart: Information search process for the systematization of original articles 2010-2022. \hfill \section{ALGORITHM} The process of organizing the data sheet of the articles was entered into an Excel template. From this, the information was systematized through qualitative and/or quantitative analysis. \subsection{Neural network} AlexNet and VGGNet are deep convulsive neural network (CNN) models that are frequently used in machine learning and computer vision. AlexNet and VGGNet models have both been used successfully in a wide range of computer vision tasks, including image classification and object detection. \subsection{Parallel ART algorithm} The Algebraic Reconstruction Technique (ART) algorithm is a technique used in computed tomography image reconstruction (CT). Computed tomography (CT) is a medical imaging technique that uses X-rays to create detailed images of internal organs and structures. It is used to reconstruct CT images from X-ray data collected during scanning. The algorithm reconstructs the image from this data using algebraic and optimization techniques, yielding a detailed and accurate image of the area of the body being scanned. \subsection{Wiever Filter Method} It is a form of image restoration filter used to remove noise from an image and improve its visual quality. To recreate the image more accurately, the Wiener filter uses information about the noise distribution and intensity distribution of the original image. \subsection{The FISTA method} (Fast Iterative Shrinkage-Thresholding Algorithm). It is an optimization algorithm used to solve constraint minimization problems. It has been used successfully in a wide variety of applications, including CT image reconstruction and signal processing. It uses iteration and thresholding techniques to quickly and efficiently minimize the loss function. \section{RESULT} The studies carried out from 2010 to 2022 are described in Table 1. The 30 studies have developed studies for noise reduction used in medical images in a specific anatomical region. In general, most studies have developed treatments in anatomical areas such as: brain, breast, vision, organs, immune system and in general. Note that 16 studies have conducted their research using parallel computing. The other 21 studies have investigated cases about image processing. \begin{center} {\includegraphics[width=0.5\textwidth]{Picture2.png}\par} \end{center} \hfill Graphic 1: Type of study from 2010-2022. \hfill In graph 1, the 6 categories of the types of studies were obtained, carrying out a deep, objective and logical analysis of the information obtained. It is important to compare the results of this work with previous research, so in this section citations to various references from reliable sources should be observed. \begin{center} {\includegraphics[width=0.5\textwidth]{Picture1.png}\par} \end{center} \hfill Graphic 2: Classification of Algorithms applied from 2010-2022. \hfill \begin{center} {\includegraphics[width=0.3\textwidth]{Paralela.png}\par} \end{center} \hfill Graphic 3: Algorithms applied in Parallel Computing from 2010-2022. \hfill \begin{tabular}{|p{0.2cm}|p{2.5cm} |p{4.5cm}|} \hline N° & Author (Reference) & Contributions \\ \hline 1 & Ahmad Kazemi, Mohammad Ebrahim Shiri, Amir Sheikhahmadi, Mohamad khodamoradi & Convolutional neural networks are among the most important deep learning methods in which multiple layers are powerfully trained. The proposed method is a deep parallel convolution neural network model consisting of AlexNet and VGGNet networks. \\ \hline \hline 2 & H. María ShyniE. Chitra. & This article extensively reviews recent deep learning techniques for the diagnosis of COVID-19. The discussed research articles reveal that the Convolutional Neural Network (CNN) is the most popular deep learning algorithm for detecting COVID-19 from medical images. \\\hline 3 & Andreas Maier, Christophe rSyben, Tobias Lasser, Christian Riess. & This article tries to give a gentle introduction to deep learning in medical image processing, from the theoretical foundations to the applications. We first look at the general reasons for the popularity of deep learning, including several important advances in computing. \\\hline 4 & Hella Gay D.Avenido Renato V.Crisostomo. & This study implements two types of ART algorithms: sequential and parallel, to speed up the reconstruction of images with a larger number of projections. \\ \hline 5 & Ybargollin-Machado, Perez-Dıaz,Orozco-Morales y Roque-Diaz. & In this research, 11 modern methods based on total variation are compared for noise reduction in SPECT images. A tomographic section of the Jaszczak mannequin is used, which is processed by all methods.\\ \hline 6 & Volkan Goreke. & He proposes a novel method that removes Poisson noise from medical X-ray images by overcoming the disadvantages. \\ \hline 7 & Ning Zhang, Long Yu, Dezhi Zhang, Weidong Wu, Shengwei Tian, Xiaojing Kang.& In this article, we propose a new hybrid CNN-transformer structure for the APT-Net medical image segmentation network based on encoder-decoder architecture. \\ \hline 8 & Po Yang, Gordon Clapworthy, Feng Dong, Valeriu Codreanu, David Williams, Baoquan Liu, Jos BTM Roerdink, Zhikun Deng. & It features a GPU-enabled programming model, called GSWO, which can help GPU novices by converting their SWO-based image processing applications from original C/C++ source code to CUDA code in a highly automated manner. \\ \hline \end{tabular} \begin{tabular}{|p{0.2cm}|p{2.5cm} |p{4.5cm}|} \hline 9 & Marcos, R.-I., Waldir, S.-H., Neicer, C.-V. & Perform an image classifier and apply a convolutional neuron. After a rigorous training of the neuron to provide an efficient diagnosis, it is shown that by increasing the training the result is more efficient and the error factor is reduced. \\ \hline \hline 8 & Po Yang, Gordon Clapworthy, Feng Dong, Valeriu Codreanu, David Williams, Baoquan Liu, Jos BTM Roerdink, Zhikun Deng. & It features a GPU-enabled programming model, called GSWO, which can help GPU novices by converting their SWO-based image processing applications from original C/C++ source code to CUDA code in a highly automated manner. \\ \hline 9 & Marcos, R.-I., Waldir, S.-H., Neicer, C.-V. & Perform an image classifier and apply a convolutional neuron. After a rigorous training of the neuron to provide an efficient diagnosis, it is shown that by increasing the training the result is more efficient and the error factor is reduced. \\ \hline 10 & Sarmiento-Ramos, J. L & It presents an updated review of the main applications of neural networks and deep learning to biomedical engineering in the fields of omics, imaging, brain-machine and human-machine interfaces, and public health management and administration.\\ \hline 11 &Josep Arnall,illa Mayzel. & A new hybrid algorithm for speckle noise reduction in medical ultrasound imaging is proposed and compared with an existing efficient method. The method efficiently combines the advantages of various denoising filters using local and non-local information. \\ \hline 12 & MG Sánchez, V. Vidal, J. Bataller, J. Arnal. & The algorithm is based on the peer group concept and uses a fuzzy metric. An optimization study of the use of the CUDA platform to eliminate impulse noise using this algorithm is presented.\\ \hline \end{tabular} \hfill Tabla 2. Selected contributions of the 37 articles \\ \hfill \section{DISCUSSION} In the discussion of results, an in-depth analysis is carried out where studies have shown that in the last 12 years. The parallel ART algorithms implemented in this study speed up the execution time of image reconstruction compared to the study. Where the implemented parallel ART algorithm had a 42\% increase in its speed compared to its sequential ART algorithm. The acceleration efficiency in the parallel ART algorithms in this study decreases as the number of processors increases. The data dependency of the ART algorithm was not compromised, resulting in an identical reconstructed image for both the parallel algorithm and the sequential algorithm.\cite{AVENIDO2022126} The proposed method is a deep parallel convolution neural network model consisting of AlexNet and VGGNet networks. Compared to existing models, the results of the proposed model show that our network has achieved better results. The best result for the database was FIGSHARE, which achieved 99.14\% accuracy in binary class and 98.78\% in multiclass, which was much better than other SVM models. We tested the best available result against the existing database and compared the results with the proposed model, which was the best response of the model for all evaluation criteria. These results suggest that the proposed model can be used as an effective decision support tool for radiologists in medical diagnosis.\cite{KAZEMI2022105775} The DCRG PPXA method uses a flexible representation of graphical data that allows generalizing the constraint on the projection variable. It shows a new formulation of the VT problem, which can be solved by fast parallel proximal algorithms. The denoising examples show that this method works well on arbitrary graphics, rather than regular grids like SPECT pixels. Consequently, the method is applied to a variety of other inverse problems, including image fusion and mesh filtering.\cite{reduccion2} In the proposed method it is the Wiener filter that is modified using the FIR filter embedded in the standard Wiener algorithm. The FIR filter design was performed using the ASO optimization algorithm. Local variance optimal and optimal local mean values are calculated using the optimization matrix corresponding to the FIR filter coefficients and transferred to the standard Wiener filter layer as parameter inputs. This method showed superior performance on imaging synthetic and medical X-ray images in terms of PSNR, MSE, SSIM metrics, and image quality metrics such as luminous intensity, contrast ratio, Entropy, and Sharpness. The time consumption of the proposed method is much less. \cite{GOREKE2023104031} The FISTA (Fast Iterative Shrinkage/Thresholding Algorithm) method is based on deconvolution methods to reduce noise in images, using computational blur image reconstruction techniques governed by a concise mathematical model. The technique used is within the field of spectral filtering methods. Furthermore, it introduces a necessary regularization or filtering in the reconstructed images.\cite{reduccion2} \section{Conclution} Based on the studies we have read, we have concluded that denoising medical images using deep learning methods has been shown to be more effective than conventional algorithms used to denoise images. This is because the deep neural network is one of the newest and most effective methods to assess medical concussions. The study of this type of articles allows us to become aware of situations that are already beginning to have a great impact on medical health and offers us the opportunity to use more advanced techniques and technologies to improve diagnostic and treatment results.
\section{Introduction} \par Ferroelectric (FE) materials, characterized by reversible spontaneous polarizations ($\vec{P}$) and multi-domains, have been widely studied and extensively explored for electronic devices, such as non-volatile information storage elements~\cite{RN6} and field-effect transistors~\cite{RN8} over the past few decades. The miniaturization requirements for large data storage density urge to reduce the ferroelectric materials into sub-nanometer (or atomic) scales. This has been, over a long time, believed to be unrealistic due to strong depolarization field effect~\cite{RN7}. Only until recently, scientists have theoretically predicted and experimentally demonstrated that low-dimensional (such as two-dimensional, 2D) intrinsic ferroelectric materials with nonvanishing and reversible dipole moments could exist in nature, e.g., group-IV monochalcogenide monolayers~\cite{RN2,RN5,RN11,RN31}, $\rm CuInP_{2}S_{6}$~\cite{RN10,RN13,RN14,RN4}, $\alpha-\rm In_{2}Se_{3}$~\cite{RN3,RN18,RN26,RN33}, $T'$-transition-metal dichalcogenide monolayers\cite{RN23,RN24}, and 2D perovskites~\cite{RN12,RN30,RN1,RN9}, to name a few. \par In addition to FEs, antiferroelectric (AFE) materials have also been attracting tremendous attention. Unlike FEs, the AFEs are immune to small external bias and exhibit a double electric-polarization $P-E$ hysteresis loop, which guarantees its high energy storage efficiency and large saturation polarization. Hence, AFE materials are also found to be promising for capacitors~\cite{RN19,RN20}, memristors\cite{RN21,RN22}, and piezoelectric\cite{RN4} applications. Compared with traditional bulk systems, 2D AFE systems are scarce, and more investigations remain largely under-explored. Recently, Xu \textit{et al.}~\cite{RN25} performed a seminal theoretically and experimentally combined work and disclosed a promising 2D AFE phase, $\beta'-\rm In_{2}Se_{3}$. Among the multiple phases in the polymorphic $\rm In_2Se_3$, the $\alpha$ and $\beta'$ phases could form 2D van der Waals (vdW) layers under room temperature ($\beta$ phase appears under high temperature~\cite{RN37}). These vdW layers consist of five atomic quintuple layers (Se-In-Se-In-Se), and they both belong to hexagonal lattice. Their difference lies at the atomically stacking patterns: The $\alpha$ phase forms A-B-B-C-A stacking sequence, while the $\beta$ (and $\beta'$) phase shows a merely A-B-C-A-B (fcc) order. Note that previous works have demonstrated that the precise fcc stacking sequence is dynamically unstable, and a shuffle of Se atom in the central atomic Se layer along $\langle 11\bar{2}0\rangle$ could remove its soft phonon mode~\cite{RN3,RN25}. In this regard, an in-plane FE order appears (denoted as $\rm FE\beta$ in this work). According to recent experimental observations~\cite{RN25,RN15}, this FE structure easily subjects to a phase transition and forms a $180^{\circ}$-AFE pattern (denoted as $\beta'$ here) with periodic antiparallel nanostripes, each of which contains a few $\rm FE\beta$ unit cells. Unlike in conventional 3D bulk (anti-)ferroelectric materials that consist micro-sized multi-domains along various directions, the AFE nanostripes in $\beta'-\rm In_2Se_3$ are exotic as they are in-plane dominant and in the atomic scale order. Hence, it could yield ultrahigh density information storage and facile manipulations in a subtle precision, meeting the requirements for sub-nanometer field-effect transistors and information storage devices in the near future. Yet, the modulation of the nanostripe patterns requires further evaluation and careful investigations. Due to the zero net electric polarization nature in the AFEs, traditional electric bias strategy is not straightforwardly appropriate. \par In this Letter, we propose that light-induced phase transition could occur in such AFE nanotripes, and the FE nanostripe width can be effectively manipulated. We illustrate this by performing first-principles density functional theory (DFT) calculations combined with optomechanical thermodynamic theory. Our results suggest that the nanostripe width of $\beta'-\rm In_2Se_3$ quintuple layer (QL) well-controls their relative stability. The optimal nanostripe width contains three unit cells at low temperature. Wider and narrower nanostripe AFE structures are slightly higher in total energy. Through a simple model, we propose how the AFE nanostripe interactions and the formation of domain walls control their internal energy. By systematically evaluating and comparing the electronic structures and electron contributed optical responses of these AFE systems, we reveal obvious optical contrasts in the near-infrared optical wavelength regime. Hence, under light illumination, we suggest that different optomechanical effect would occur, and one can realize a series of light-induced phase transitions to renormalize the FE nanostripe widths in the $\beta'-\rm In_2Se_3$. This suggests a noncontacting and noninvasive phase transition strategy which, to the best of our knowledge, have not been disclosed in AFE materials. In addition, we predict that such nanostripe variations can be detected by the AFE nanostripe dependent bulk photovoltaic (BPV) effect under above bandgap light illumination. Through evaluating the BPV photocurrent for each nanostripe, we show that opposite flowing photocurrents exist along the nanostripe direction. \par We perform DFT~\cite{M1,M2} calculations within the Vienna \textit{ab initio} simulation package (VASP)~\cite{M3,M4}. The exchange-correlation term in the Kohn-Sham equation is treated by the generalized gradient approximation (GGA) in the Perdew-Burke-Ernzerhof (PBE) form~\cite{M5}. Projector augmented-wave (PAW) method~\cite{M6} and a planewave basis set are used to describe the core and valence electrons, respectively, which yield a computational accuracy comparable to all-electron calculations. The kinetic energy cutoff is set to be $500\,\rm eV$, and the $\bm k$-mesh separation in the first Brillouin zone (BZ) is set to be less than $0.02\,\rm \AA^{-1}$ for each simulation supercell. The convergence criteria for the total electronic energy and Hellmann-Feynman force components are set as $1\times 10^{-8}\,\rm eV$ and $1\times 10^{-2}\,\rm eV/ \AA$, respectively. In order to eliminate the artificial interactions between periodic image layers, we add a vacuum space of $20\,\AA$ along the out-of-plane $z$ direction. Dipole-dipole interaction corrections have been applied~\cite{M14,M15}, hence the total energy and electronic structure quickly converge as the vacuum space thickness. To evaluate the BPV current, we fit the DFT calculated Hamiltonian using the maximally localized Wannier functions as implemented in the Wannier90 code~\cite{M7,M8}. \par According to our previous work~\cite{RN16,RN17}, when the photon energy is below the semiconductor bandgap, the optomechanical effects can be described by an extended thermodynamic theory that is based on a nonlinear optical process. It could trigger shape deformations and phase transitions in the reaction space, akin to the optical tweezer technology that moves atoms and molecules in the real space. The complex alternating electric field $\mathcal{\vec{E}}(\omega,t)=\vec{E}e^{-\mathrm{i}\omega t}$ of light applies work done per volume in the form of $du=\langle\vec{\mathcal{E}}(\omega,t)\cdot d\vec{\mathcal{D}}^{*}(\omega,t)\rangle$, where $\mathrm{i}=\sqrt{-1}$ is the imaginary unit, $\omega$ is the photon angular frequency, and the thermodynamic time-average $\langle\cdot\rangle$ is evaluated. Here, the $\vec{\mathcal{D}}(\omega,t)$ is electric displacement vector that is induced by $\vec{\mathcal{E}}(\omega,t)$, i.e., $\vec{\mathcal{D}}(\omega,t)=\varepsilon_{0}\tensor{\varepsilon}(\omega)\cdot\vec{\mathcal{E}}(\omega,t)$ ($\varepsilon_0$ is vacuum permittivity and $\tensor{\varepsilon}(\omega)$, being a second order tensor, is the frequency dependent dielectric function). As for the in-plane component in 2D systems where the electric field is used as natural variable, one evaluates the phase stability by its light-induced Gibbs free energy (GFE) density~\cite{RN38} \begin{equation}\label{eq:GFE} g=g_{0}-\frac{1}{4}\varepsilon_{0}\varepsilon_{ii}'(\omega)E_{i}^{2} \quad (i=x,y). \end{equation} Here $g_0$ is the GFE density before light is irradiated. Linearly polarized light (LPL) is assumed with its polarization along the $i$-direction. In this regard, the change of GFE density is scaled by the real part of the dielectric function component $\varepsilon_{ii}'(\omega)$ and the square of the applied alternating electric field magnitude $E_{i}$. According to random phase approximation, we calculate the frequency dependent dielectric function, which, in the framework of independent particle approximation~\cite{M9}, can be written as \begin{equation}\label{eq:eps} \begin{split} \varepsilon_{ij}&=\delta_{ij}-\frac{e^2}{\varepsilon_0}\int_{BZ}\frac{d^3\bm k}{(2\pi)^3}\sum_{n,m}(f_{n\bm k}-f_{m\bm k})\\ &\times\frac{\langle u_{n\bm k}|\nabla_{k_{i}}|u_{m\bm k}\rangle\langle u_{m\bm k}|\nabla_{k_{j}}|u_{n\bm k}\rangle}{\hbar(\omega_{m\bm k}-\omega_{n\bm k}-\omega-\mathrm{i}/\tau)}, \end{split} \end{equation} where $\delta_{ij}$ is Kronecker delta symbol. $f_{n\bm k}$, $\hbar\omega_{n\bm k}$, and $|u_{n\bm k}\rangle$ refer to Fermi-Dirac distribution, eigenenergy, and the cell periodic wavefunction of band $n$ at $\bm k$. In order to phenomenologically incorporate the scatterings during electron motion, we adopt finite lifetime of $\tau=0.03\,\rm ps$ in the calculation. Note that according to Kramers-Kronig relation, the exact value of such lifetime only affects the resonant absorption frequency region. When the photon energy is much lower than the bandgap, the real part value of the dielectric function is marginally affected. Note that the denominator in this expression actually corresponds to the joint density of states, which indicates that larger bandgap would give a smaller dielectric function below bandgap. On the other hand, the numerator $\mathcal{M}_{ij}=\langle u_{n\bm k}|\nabla_{k_{i}}|u_{m\bm k}\rangle\langle u_{m\bm k}|\nabla_{k_{j}}|u_{n\bm k}\rangle$, usually referred to as interband transition dipole moment, also controls the optical selection between the valence and conduction bands. The synergistic effects between them determines the real part of dielectric function (or electronic contributed dielectric constants) below bandgap. The integral in Eq.~(\ref{eq:eps}) is performed in the 3D first BZ. For the 2D materials in a 3D simulation supercell, the vacuum contribution can be eliminated by multiplying a factor of $\frac{L_c}{d_{\rm eff}}$ where $L_c$ is the supercell lattice constant along $z$ and $d_{\rm eff}$ is the effective thickness of the QL (taking to be $10.5\,\AA$ here, measured from its corresponding vdW bulk structure). This re-scaling method has been widely adopted in previous works~\cite{RN16,RN17,M10}. Note that when we compare the relative stability (GFE), we will multiply effective volume to Eq.~\ref{eq:GFE}. Hence, the specific choice of $d_{\rm eff}$ value is cancelled which does not affect the thermodynamic evaluation. \par The imaginary part of dielectric function [$\varepsilon''(\omega)=\operatorname{Im}\varepsilon(\omega)$] determines the absorbance spectrum of 2D materials as \begin{equation} A_{ii}(\omega)=1-e^{-\varepsilon_{ii}''(\omega)\frac{\omega L_c}{c_0}}\simeq\varepsilon_{ii}''(\omega)\frac{\omega L_c}{c_0}. \end{equation} Here $c_0$ is the speed of light in vacuum. One notes that the $A_{ii}(\omega)$ is independent to the vacuum space thickness in the simulation supercell. \par The BPV effect is a nonlinear optical process that exists in centrosymmetric ($\mathcal{P}$) broken systems~\cite{M11}. It arises from anharmonic motion of electrons and holes under above bandgap light excitation, which generates a static current with density of \begin{equation}\label{eq:bpv} \mathcal{J}^{i}=\sigma^{i}_{jk}(0;\omega,-\omega )E_j(\omega)E_k(-\omega), \end{equation} where $\sigma_{jk}^i(0;\omega,-\omega)$ is BPV photoconductivity. Under LPL irradiation ($j=k$), the dominant BPV effect is shift current generation (for nonmagnetic systems). According to our previous work~\cite{M12}, we can calculate the nanostripe-dependent BPV photoconductivity via \begin{equation}\label{eq:sc} \begin{split} \sigma_{jj}^{i,D}&(0;\omega,-\omega)=\frac{e^{3}}{2\omega^{2}\hbar^{2}}\int_{BZ}\frac{d^{3}\bm k}{(2\pi)^{3}}\mathrm{Re}\sum_{mnl}(f_{l}-f_{m}) \\ &\times\frac{v_{lm}^{j}}{\omega_{ml}-\omega+\mathrm{i}/\tau}\left[\frac{\tilde{v}_{mn}^{i,D}v_{nl}^{j}}{\omega_{mn}+\mathrm{i}/\tau}-\frac{v_{mn}^{j}\tilde{v}_{nl}^{i,D}}{\omega_{nl}+\mathrm{i}/\tau}\right]. \end{split} \end{equation} All the quantities are $\bm k$-dependent, which are omitted for clarity reason. The velocity operator component is $v_{lm}^j=\langle u_{l\bm k}|\hat{v}^j|u_{m\bm k}\rangle=\frac{1}{\hbar}\langle u_{l\bm k}|\frac{\partial H}{\partial k_j}|u_{m\bm k}\rangle$, and $\omega_{lm}=\omega_{l\bm k}-\omega_{m\bm k}$ denotes the eigenenergy difference between band $l$ and $m$. For the AFE material that is $\mathcal{P}$-symmetric, the total $\sigma_{jj}^i=0$. In order to calculate the nanostripe-specific photocurrent, we use projected velocity operator for the $i$-propagating operator, namely, $\tilde{v}_{mn}^{i,D}=\langle u_{m\bm k}|\hat{P}_D\hat{v}^i|u_{n\bm k}\rangle=\sum_{\alpha\in D}\langle u_{m\bm k}|\psi_{\alpha}\rangle\langle\psi_{\alpha}|\hat{v}^i|u_{n\bm k}\rangle$, where $|\psi_{\alpha}\rangle$ denotes the Wannier function localized at the nanostripe-$D$. \begin{figure*}[t] \centering \includegraphics[width=0.9\textwidth]{figures/fig1.png} \caption{(a) Atomic structure of $\beta'-\rm In_2Se_3$ with AFE nanostripes. The black rectangle represents the simulation supercell which contains four parental $\rm FE\beta$ unit cells (indicated by a red rectangle). The spontaneous polarization is represented by the up and down arrows. Shaded area denotes the nanostripe with polarization along $-y$, for clarity reason. (b) Top view of the parental $\rm FE\beta$ unit cell. (c) Displacement of the central $\rm Se$ atoms relative to the high symmetric fcc structure (Figure S1a-b), denoted by black arrows. In (d) we plot the relative energy per f.u. of $\mathrm{AF}_n$ with $n=1,\,2,\,\dots\,6$, calculated by PBE (purple circles), PBE with D3-vdW correction (red square), PW91 (orange triangles), and SCAN (green stars) functionals. The fitting results of Eq.~(\ref{eq:energy}) for PBE results are plotted as blue dashed curve.} \label{fig:struct} \end{figure*} \par In Figure \ref{fig:struct} we plot a typical atomic structure of AFE $\beta'-\rm In_2Se_3$. Our geometric relaxation yields similar results as the dark-field scanning transmission electron microscopy images reported previously~\cite{RN25,RN15}. In this case, the simulation supercell (the black rectangle in Figure \ref{fig:struct}a) contains two antiparallel nanostripes, polarized along $\pm y$ ($\langle 11\bar{2}0\rangle$). Here, each nanostripe is composed by two unit cells of the parental $\rm FE\beta$ structure (Figure \ref{fig:struct}b) along the armchair ($x$ or $\langle 1\bar{1}00\rangle$) direction, and the simulation supercell contains four $\rm FE\beta$ unit cells. We thus denote this structure as $\rm AF_4$. The optimized supercell lattice constants are $a=27.92\,\AA$ and $b=4.11\,\AA$. Each nanostripe width is $\sim$$1.4\,\rm nm$, well consistent with the experimental observation~\cite{RN25,RN36}. Note that the relaxed lattice constants of the parental $\rm FE\beta$ unit cell are $a_0=6.88\,\AA$ and $b_0=4.12\,\AA$. Hence, after forming AFE nanostripes, the in-plane strains exerted along the $x$ and $y$ are $1.5\%$ (tensile) and $-0.2\%$ (compressive), respectively. If the layer is freely suspended with slight pre-existing slacks, these small strains can be easily released to the vacuum space in the $z$ direction. This is different from the strain accumulations in traditional 3D bulk materials, which adds the reversible advantageous for 2D vdW materials. Hence, such strain effects can be omitted in the subsequent phase transition discussions. \par Compared with the high symmetric fcc phase [$P\bar{3}m1$ as in Figure S1a and S1b, Supporting Information (SI)], both In and Se atoms slightly shuffle in the AFE structure. Our calculations show that the displacement on each atom ($\delta\bm r_i$ with $i$ denoting the atom index) is mainly in the $xy$-plane ($\delta z_i\simeq 0$). We use small arrows to mark these displacements on the central Se atoms in Figure \ref{fig:struct}c, while those for other atomic layers are smaller and not shown here. One clearly observes that these displacements are mainly along the $y$ direction, and very small $x$ displacements appear on the Se atoms that are close to the AFE domain boundary. This reproduces the $180^{\circ}$ domain wall that reported previously~\cite{RN25}. We roughly estimate the polarization for each nanostripe-$D$ via $P_y^D=\frac{e}{\Omega}\sum_{\kappa\in D}Z_{\kappa,yy}^*\delta y$ where $\Omega$ is the cell volume and $Z_{\kappa,yy}^*$ is the Born effective charge component of ion-$\kappa$ (of each nanostripe). The calculated Born effective charge is listed in Table S1 (SI). As expected, the $P_x^D$ is found to be zero. The $y$ component polarization for each AFE domain is evaluated to be $P_y^D=2.3\times 10^{-10}\,\rm C/m$, comparable with previous results~\cite{RN27} and other 2D in-plain FE materials~\cite{RN32,RN34}. \par As one can see in the experimental observation, AFE nanostripes with different widths could emerge~\cite{RN25}. In order to evaluate and compare their relative stability, we construct and relax AFEs with different nanostripe domain widths, namely, $\mathrm{AF}_n\,(n=1-6)$. Their atomic structures are plotted in Figure S2. After careful geometric optimizations, we find that they all could sustain without any further spontaneous structural distortions. To confirm their spontaneous polarization, we estimate the polarization of each nanostripe, as listed in Table~\ref{tab:basic}. We plot their relative energies using pink scatters in Figure \ref{fig:struct}d. One sees that the $\rm AF_1$ is energetically higher than the other phases ($n=2-6$), which are within $10\,\rm meV$ per formula unit (f.u.). This is due to the high concentration of FE domain walls in $\rm AF_1$, and their interactions cause significant geometric distortions, as compared to the other structures ($n=2-6$). The small energy differences for larger $n$ systems indicate that phase transition may occur under weak stimulation. Among these structures, the $\rm AF_3$ takes the lowest calculated energy. In order to verify this, we optimize the geometries and calculate their total energies using other treatments for the exchange-correlation functional such as PW91~\cite{RN40} and SCAN (strongly constrained and appropriately normed)~\cite{RN39} functionals, and the PBE-D3 method~\cite{RN42} to incorporate the vdW correction. They give qualitatively consistent results as the PBE functional. On the contrary, one sees that the $\rm AF_4$ appears to be the most optimal pattern in experimental observations~\cite{RN25}, which is found to be slightly higher in energy according to our calculations. We attribute such discrepancy due to the entropy contributions since the DFT calculations are zero temperature results which do not include electronic and ionic entropy under finite temperature. Unfortunately, numerically computing ionic vibrational entropy in such large simulation supercells are extremely computational demanding and cannot be well-performed. Hence, our calculated total energy sequence is only valid under low temperature, while thermal effects under room temperature are omitted here. Nonetheless, as will be estimated in the following, the light-induced optomechanical energy dominates in the GFE variation over the other contributions. Thus, our main conclusion remains unchanged, regardless the inclusion of entropy or not. \par In order to understand the total energy variation (Figure \ref{fig:struct}d), we split the total energy contributions into two sources, namely, the polarization exchange interaction between two neighboring nanostripes and the concentration of domain wall formation (or domain wall interaction). We express the total energy density as \begin{equation}\label{eq:energy} E(\mathrm{AF}_n)=J\sum_{\langle i,j\rangle}P_y^iP_y^j+\frac{M}{\lambda}. \end{equation} Here $P_y^i$ (and $P_y^j$) denotes each distorted central Se contributed $y$-polarization (so that it spans $a_0/2$ along $x$), and the summation runs over all nearest neighbor. $J$ represents the 1D polarization exchange interaction parameter (similar as in the magnetic Ising model). $\lambda$ denotes the nanostripe length, and their values for each state are listed in Table~\ref{tab:basic}. The second term measures the formation of domain wall density contributions. Our fitting (for PBE) yields $J=22.3\,\mathrm{mV\cdot \AA^{2}\cdot C^{-1}\cdot f.u.^{-1}}$ and $M=0.5\,\rm{eV}\cdot \AA\cdot f.u.^{-1}$. The results are plotted as blue curve in Figure \ref{fig:struct}d. The positive $J$ value implies that antiparallel nanostripes (AFE aligned) is preferred, while the positive $M$ term prevents very dense domain wall formation. Therefore, these competitive interactions lead to an optimal AFE nanostripe width, namely, $\rm AF_3$ in our study. We also find that these two parameters, $J$ and $M$, are independent of optomechanically induced Gibbs free energies. \begin{figure*}[htb] \centering \includegraphics[width=0.9\textwidth]{figures/fig2.png} \caption{(a)-(f) Unfolded electronic band dispersion of $\mathrm{AF}_n\,(n=1-6)$ along the high symmetric $\bm k$-path of the first BZ of the parental fcc primitive cell ($P\bar{3}m1$ phase). The direct coordinates are $\Gamma=(0,0,0)$, $M=(1/2,0,0)$, and $K=(1/3,1/3,0)$. The band-decomposed charge densities of (g) VBM and (f) CBM in $\rm AF_3$ are also plotted.} \label{fig:band} \end{figure*} \begin{table}[htb] \caption{Basic physical quantities of $\mathrm{AF}_n$. Here $\lambda$, $P_y$, $E_g^{\rm ind}$, $E_g^{\rm d}$, and $\varepsilon'(\omega_0)$ denote the nanostripe width, polarization of an individual nanostripe, indirect and direct bandgaps, and the real part of dielectric function (at an incident energy of $\omega_0=0.8\,\rm eV$, averaged along the $x$ and $y$ directions), respectively.} \centering \begin{tabular}{c c c c c c c} \hline\hline $n$ & $1$ & $2$ & $3$ & $4$ & $5$ & $6$ \\ \hline $\lambda\,(\AA)$ &$3.49$&$7.02$&$10.50$&$13.96$&$17.38$&$20.84$ \\ $P_{y}\,(10^{-10}\rm{C/m})$ &$3.16$&$2.36$&$2.39$&$2.30$&$2.16$&$2.05$\\ $E_g^{\rm ind}\,(\rm eV)$ &$1.07$&$1.33$&$1.26$&$1.24$&$1.19$&$1.18$\\ $E_g^{\rm d}\,(\rm eV)$ &$1.12$&$1.35$&$1.26$&$1.25$&$1.19$&$1.18$\\ $\varepsilon'$ &$12.76$&$11.81$&$11.17$&$11.36$&$11.43$&$10.98$\\ \hline\hline \end{tabular} \label{tab:basic} \end{table} \par We next explore their electronic band dispersion. Since each simulation supercell contains multiple unit cells and their corresponding BZs are different, we use the effective band structure method~\cite{M13} to unfold the supercell calculated band structures into the first BZ of $P\bar{3}m1$ primitive cell (Figure S1c in SI). During the unfolding process, the marginal strain effects are ignored. We plot the unfolded band dispersion for each AFE in Figure \ref{fig:band}a-\ref{fig:band}f. One sees that they are all semiconductors with bandgap values above $1\,\rm eV$. The valence band maximum (VBM) locate in the vicinity of the $\Gamma$ point in all cases. For the conduction band minimum (CBM), it locates at the $M$ point for AF$_{1,3-6}$, while it is at $\Gamma$ in AF$_2$. We tabulate their direct $E_g^{\rm d}$ and indirect $E_g^{\rm ind}$ bandgaps in Table~\ref{tab:basic}. One observes that these two values are similar in each case, indicating their quasi-direct bandgap semiconductor feature. In order to correct the well-known bandgap underestimation in PBE functional, we adopt the HSE06 hybrid functional~\cite{RN41} to calculate the band dispersions for $n=1-4$ (Figure S3 and Table S2). It can be seen that the bandgap variation trends from both methods are the same, even though the HSE06 gives larger bandgap values than PBE. In order to visualize the orbital contribution feature, we plot the band-decomposed charge densities for the $\rm AF_3$ as an example. Figures \ref{fig:band}g and \ref{fig:band}h illustrate that the VBM is mainly contributed from the Se atoms, while the CBM is delocalized around all Se and In atoms. This indicates real-space center mismatch in the valence and conduction bands. Hence, upon interband excitation, we may expect a static charge current generation. The change distribution of other structures show similar behavior and are plotted in Figure S4 (SI). \begin{figure*}[tb] \includegraphics[width=0.95\textwidth]{figures/fig3.png} \caption{(a) Real part of frequency dependent dielectric function components and absorbance spectrum of $\rm AF_3$. The abscissor axis denotes the incident photon energy $\hbar\omega$. Grey shaded area denotes below bandgap energy. (b) Real part of averaged dielectric function $\varepsilon'(\omega)$ for $\mathrm{AF}_n\,n=1-6$ in the low frequency regime. (c) Relative GFE density variation under alternating electric field magnitude. The photon energy $\hbar\omega_0$ is taken to be $0.8\,\rm eV$. The white, orange, and blue background regions indicate that the $\rm AF_3$, $\rm AF_2$, and $\rm AF_1$ become the optimal structure, respectively.} \label{fig:opt} \end{figure*} \par The electronic structure contrasts in the $\mathrm{AF}_n$ imply different optical responses. In order to explore this effect, we evaluate the ion-clamped dielectric function and the absorbance spectra. The results for $\mathrm{AF}_3$ is depicted in Figure \ref{fig:opt}a, and those for other structures are plotted in Figure S5 (SI). One sees that below the bandgap (shaded area), the direct light absorbance is exactly zero. Hence, in this frequency regime, the light-matter interaction is dominated by the real part of dielectric function $\varepsilon'(\omega)$. We observe slightly anisotropic optical response functions, owing to the contrast interband transition dipole moment $\mathcal{M}_{ii}=|\langle u_{c\bm k}|\nabla_{k_i}|u_{v\bm k}\rangle|^2$ in the $x$ and $y$ directions. Nonetheless, such anisotropy is marginal so that we will consider the in-plane averaged dielectric function $\varepsilon'(\omega)=[\varepsilon_{xx}^{'}(\omega)+\varepsilon_{yy}^{'}(\omega)]/2$ in the following discussion, which assumes that the optomechanical light is unpolarized and normal incident (propagating along $z$). \par In Figure \ref{fig:opt}b we compare the real part of in-plane averaged dielectric functions for different systems. One sees that the ${\varepsilon}'(\omega)$ for $\rm AF_1$ is larger than the other systems owing to its holding the smallest bandgap, as discussed previously. The $\rm AF_6$ takes the smallest $\varepsilon'(\omega)$ below the bandgap, indicating that under light irradiation, its GFE reduces slowliest among all systems. When we take an incident photon energy of $\hbar\omega_0=0.8\,\rm eV$ (or $1.55\,\mu\mathrm{m}$ in wavelength), their relative GFEs as functions of alternating electric field magnitude are plotted in Figure \ref{fig:opt}c. Note that at this incident energy, there is no direct light absorption, which corresponds to the imaginary part of dielectric function. Such direct light absorption would generate electron-hole pairs in the valence and conduction band, which usually subjects to a non-radiative recombination and produces unwanted waste heat. In our current approach, we use the real part of dielectric function, and keep its imaginary part to be zero (photon energy below bandgap and above phonon frequency regime). One can furthermore understand the mechanism by expanding the induced electric displacement under electric field according to the normal coordinate system, namely, $\vec{D}=\sum_{j,\bm q}(\tensor{\varepsilon}+\frac{\delta\tensor{\varepsilon}}{\delta{\bm X}_{j\bm q}}\cdot\delta{\bm X}_{j\bm q})\cdot\vec{E}$. Here, $\delta{\bm X}_{j{\bm q}}$ is normal coordinate displacement. $j$ and $\bm q$ are the phonon index and momentum, respectively. In this way, the light-induced free energy density variation (the second term in Eq. (\ref{eq:GFE}) is \begin{equation}\label{eq:energy2} \delta g_{\vec{E}}=-\frac{1}{4}\sum_{j\bm q}\vec{E}\cdot(\tensor{\varepsilon}+\frac{\delta\tensor{\varepsilon}}{\delta{\bm X}_{j\bm q}}\cdot\delta{\bm X}_{j{\bm q}})\cdot\vec{E}, \end{equation} Since the light wavelength is much longer than the unit cell scale, we approximate the momentum $\bm q$ to be nearly zero (${\bm q}\simeq 0$). The ``general force'' that applies onto the system is $\vec{f}_{j{\bm q}}=-\frac{\delta g_{\vec{E}}}{\delta{\bm X}_{j{\bm q}}}=\frac{1}{4}\vec{E}\cdot\frac{\delta{\tensor{\varepsilon}}}{\delta{\bm X}_{j{\bm q}}}\cdot\vec{E}$. This corresponds to a Raman-type displacement, which is an inelastic two-photon-one-phonon process, where the photon energy difference equals to the phonon energy. Therefore, the emitted photon is red-shifted compared with the incident light, and the number of photons is unchanged during the whole process (no direct absorption). The general force pushes the system to transit into a state that has a larger dielectric function value. This converts the light energy into structural mechanical energy, so that the phase transition is optomechanical. In an ideal situation, the light induced work done totally converts into phase transition, so that no waste heat is generated and the temperature increment is kept to be very low. Note that the phase transformation process would still produce temperature variation due to entropy contrast between two phases, but it should be much smaller as compared with the direct light absorption process. According to Figure \ref{fig:opt}c, one sees that at an intermediate electric field intensity (below $2.2\,\rm V/nm$ or $6.2\times 10^{11}\,\rm W/cm^2$), the $\rm AF_3$ has the lowest GFE. Above this magnitude, the $\rm AF_2$ becomes the most thermodynamically stable structure, indicating its emergence under intermediate light irradiation (shaded in orange). When the light intensity is above $5.1\times 10^{12}\,\rm W/cm^2$ (alternating electric field magnitude of $6.2\,\rm V/nm$), the $\rm AF_1$ appears as the most optimal structure (shaded in blue). Therefore, we elucidate that a near-infrared light irradiation could gradually reduce the AFE nanostripe widths. Such phase transition does not need long range atomic redistribution as in the sluggish crystalline-noncrystalline phase transformations, hence it belongs to diffusionless fast martensitic phase transition. We note that wider nanostripe width structures would not appear under light irradiation due to their relatively lower dielectric function values. We also perform nudged elastic band calculations and reveal that the energy barrier separating different AFE width phases is $\sim 0.15\,\rm eV$ per f.u. Note that this energy barrier is not sufficiently large, so that the $\rm AF_2$ may only survive under low temperature for a long time. \begin{figure*}[tb] \centering \includegraphics[width=0.95\textwidth]{figures/fig4.png} \caption{(a) Schematic plot of BPV current generation (under LPL) and detection. AFE nanostripe-specified shift current density for $\rm AF_3$ under (b) $x$-LPL and (c) $y$-LPL are also plotted. We assume that the above bandgap light intensity is $0.1\,\mathrm{V/nm}$. The abscissor axis is incident photon energy.} \label{fig:sc} \end{figure*} \par In order to precisely detect such nanostripe width variation and explore its potential applications, we suggest to resort to nanostripe-dependent BPV effect, which could convert weak above bandgap light into static electric current (or low frequency, usually THz, emission). According to nonlinear optics theory, LPL could induce shift current generation in nonmagnetic materials, which arises from the real space wavefunction center mismatch in the valence and conduction bands. In this way, optical excitation between them results in the shift of such centers and generates electric current. Such a process also reflects the topological feature of electron wavefunctions. We propose that AFE nanostripe would produce opposite flowing shift current (Figure~\ref{fig:sc}a), hence one may detect nanostripe-specific short-circuit currents or open-circuit voltages. We take the LPL with a field intensity of $0.1\,\rm V/nm$ and calculate BPV photocurrent per stripe width. The results for $\mathrm{AF}_3$ is plotted in Figures~\ref{fig:sc}b (under $x$-polarized LPL) and \ref{fig:sc}c (under $y$-polarized LPL). First of all, we find that the total BPV current (summed over two antiparallel nanostripes) is always zero, consistent with the fact that the whole AFE $\beta'-\rm In_2Se_3$ is centrosymmetric. However, inside each nanostripe, one observes that the $\mathcal{J}_{ii}^{y,D_1}=-\mathcal{J}_{ii}^{y,D_2}\neq 0$ ($i=x, y$). Note that under $x$ or $y$ polarized light irradiation, the current only flows along $y$ (or $\langle 11\bar{2}0\rangle$, parallel to nanostripe), while no current occurs along $x$ ($\langle 1\bar{1}00\rangle$, normal to nanostripe direction). This can be ascribed by the mirror reflection (normal to $x$) symmetry of the whole system. The magnitude of the 1D current density in each nanostripe is on the order of $0.1\,\mu\mathrm{A/nm}$, which is sufficiently large for experimental detection. Similar photocurrents on the same magnitude order are also calculated in $\rm AF_1$ and $\rm AF_2$ (Figure S6 in SI). This nanostripe-specific photocurrent is similar as in the recently disclosed concept of hidden spin polarization~\cite{RN28}, hidden Berry curvautre~\cite{RN29}, and hidden Hall current~\cite{RN35}. In all these cases, the total response functions of the system are zero, subject to specific (usually inversion or time-reversal) symmetries. But once we project them into a partial sector, they would show finite and observable signals. The fundamental mechanism is that the local symmetry of each nanostripe is lower than that of the whole system, and the removal of mirror reflection along $x$ yields finite and observable BPV currents. Here, we show that the shift current generation in 2D AFE system also belongs to such paradigm. \par In conclusion, we scrutinize the light-induced structural transformation of $\beta'-\rm In_2Se_3$ nanostripes. According to the optomechanical theory and first-principles calculations, we suggest that one can use below bandgap light to effectively narrow the AFE nanostripe widths. By calculating the nanostripe-dependent shift current generations, we reveal hidden bulk photovoltaic shift current generations. Structural transformation of 2D ferroic materials is of great importance for fabricating advanced microelectronic devices. Our work provides a noncontacting and noninvasive strategy for manipulating AFE domains in atomic precision and would be helpful for designing nanoelectronic devices with large information storage density. \section{Acknowledgments} This work is supported by the National Natural Science Foundation of China (NSFC) under Grant Nos. 21903063 and 11974270. The computational resources provided by HPC platform of Xi'an Jiaotong University are also acknowledged. \section{Supporting Information} \textbf{Supporting Information Available:} Born effective charge, structure of fcc monolayer, supercells of AF$_n$, band structure calculated by HSE06 hybrid functional, band-decomposed charge densities, dielectric function, and shift current photoconductivity of AF$_1$ and AF$_2$.
\section{Introduction} Density stratification caused by nonuniform distributions of temperature or salinity is ubiquitous in oceans and lakes, which alters the settling or rising process of submerging particles, and has marked effects on many environmental problems, such as the aggregation of marine snow, the formation of thin layers, the dispersion of spilling oil and the deposition of sediments \citep{prairie2017model,diercks2019vertical}. Understanding the fluid dynamics of particle settling (or rising) in a stratified ambient fluid is of considerable significance for better predictions of those actions. In homogeneous fluid, the hydrodynamic force acting on a particle accelerating under gravity can be decomposed into buoyancy force, steady-state drag, added mass, and history (Basset) force. The steady-state drag increases with velocity and finally balances the reduced gravity, such that the particle reaches a steady state. In stratified fluid, the particle experiences an additional drag force due to the stratification, noted as `stratification drag', yielding a significant decay in settling velocity \citep{srdic1999gravitational,abaid2004internal,camassa2009prolonged,2009Enhanced,camassa2010first,doostmohammadi2014numerical,verso2019transient,mandel2020retention,magnaudet2020particles}. There have been different explanations for the origin of stratification drag. A widely accepted one is that it comes from the buoyancy of associated upper lighter fluid, as the settling particle distorts the isopycnals and drags some upper fluid to a lower position. \citet{srdic1999gravitational} conducted experiments of particles settling in a three-layer stratified fluid, with two homogeneous layers and one density transition layer (interface) in between, at Reynolds numbers $1.5\leq Re \leq 15$ and Froude numbers $3\leq Fr \leq 10$. They found that the total drag enhancement can be estimated by the total buoyancy of the upper fluid dragged below the upper bound of the interface, before the maximum drag is reached. The contribution of internal waves is negligible before the wake breaks as they are generated after the rupture of the wake. With the same type of stratification, \citet{verso2019transient} studied experimentally the motion of four different particles, in a wider parameter range ($2\leq Re \leq 106$ and $0.5 \leq Fr \leq 28$). A time-dependent stratification force model was developed for those particles, based on the assumption that the stratification force is entirely contributed by the buoyancy of an effective wake, and the wake volume is constant within the interface and decreases exponentially till a new terminal velocity is reached. In a linearly stratified fluid, a combined experimental and numerical investigation of settling particles at small Reynolds numbers ($Re \sim O(1)$) was presented by \citet{2009Enhanced}. They found that the buoyancy of a shell of fluid around the particle, instead of the entire distorted region, is responsible for the drag enhancement. Furthermore, they suggested that the total drag increment can be scaled by a dimensionless parameter, the Richardson number, characterising the relative importance of buoyancy and viscous shear force. A similar mechanism was also found for the stratification drag of a rising grid of bars \citep{higginson2003drag}, at much higher Reynolds numbers ($Re \sim O(10^3)$), using the drift volume as an approximation of the volume of dragged fluid. Although the associated buoyancy accounts for the stratification drag in many cases, \citet{zhang2019core} pointed out that it is the specific structure of the vorticity field induced by the buoyancy effects that contributes mainly to the stratification drag, while the buoyancy itself plays a secondary role. Moreover, \citet{2000Flow} noted that the drag enhancement is rather small until a vertical upward jet is generated at the rear of the particle at relatively strong stratification ($Fr \lesssim 20$), evidencing the drag contribution from the flow structure. The flow structure manifested by the vertical motion of a particle in a stratified fluid is notably different from that in a homogeneous fluid. In a stratified fluid, the baroclinic torque ($\bigtriangledown \rho \times \bigtriangledown p $) results in vorticity generation whenever there is a misalignment between density and pressure gradient \citep{magnaudet2020particles}. For low Reynolds numbers ($Re\ll 1$), top-down symmetrical toroidal eddies are induced by a vertical, downward point force (Stokeslet) under linear stratification, which is similar to the eddy formed under the restriction of two horizontal walls, indicating the suppression of vertical flow by stratification \citep{ardekani2010stratlets}. For higher Reynolds numbers ($0.05\leq Re \leq100$), toroidal eddies still exist but lose the top-down symmetry, and a vertical upward jet is generated simultaneously at the centre line downstream of the particle \citep{zhang2019core}. This jet was experimentally observed over a wide range of Froude numbers, $0.2 \leq Fr \leq 70$, and Reynolds numbers, $30 \leq Re \leq 4000$, with its shape and strength varying with $Re$ and $Fr$ \citep{hanazaki2009jets}. The present work focuses on the transient bouncing behaviour as a particle passes through a density transition layer with a large density gradient, while the particle density is always higher than the fluid such that no neutral position exists. This phenomenon was first observed by \citet{abaid2004internal} in their experiments with a strong salt stratification. As we know that in continuous concentration-induced stratified fluid, a droplet could bounce and oscillate under the Maragoni effects induced by nonuniform surface tension \citep{blanchette2012drops,li2019bouncing}. However, this mechanism could not be applied to a solid particle, as surface tension does not exist at a solid-liquid surface. \citet{abaid2004internal} observed that before the particle bounces up, the entrained plume detaches and ascends to the upper layer, which indicates that the particle is possibly lifted by the plume. However, the detached plume moving opposite to the particle is not uniquely associated with the bouncing behaviour. A descending wake of a droplet rising through a density interface could not trigger a reverse motion \citep{mandel2020retention}. Moreover, wake rupture was also observed experimentally for a descending solid particle \citep{srdic1999gravitational}. Therefore it is of interest to further explore the mechanisms accounting for the bouncing of a solid particle. As the bouncing behaviour occurs at certain combinations of parameters, a parametric study is necessary, before we further investigate the bouncing mechanisms. Previous work revealed that the bouncing behaviour is affected by a variety of parameters. \citet{camassa2022critical} found that the critical particle density $\rho_p$ for the occurrence of bouncing can be expressed by a linear combination of upper and lower layer fluid densities. \citet{doostmohammadi2014reorientation} found that at a relatively higher density ratio of $(\rho_l-\rho_u)/\rho_u$, an ellipsoid could bounce for a short time as it passes through a density interface. Additionally, \citet{blanchette2012drops} found that high ratio of $(\rho_p-\rho_u)/(\rho_p-\rho_l)$ could lead to a temporary reverse motion of a drop as it settles through a density transition layer with identical surface tension. These studies indicate that the bouncing behaviour is strongly dependent on the density or density ratio of the system. Moreover, the Froude number is a key parameter affecting the oscillation of a particle or droplet near their neutral buoyant position in a linear stratified fluid \citep{bayareh2013rising,doostmohammadi2014numerical}. In the experiments carried out by \citet{abaid2004internal}, the transient levitation of the particles was discovered by adjusting the lower terminal velocities, which means that the lower Reynolds number should be taken into account. As we know, in three-layer stratification, both the Froude number and the Reynolds number are dependent on the density difference. Whether the controlling parameter of the bouncing motion is the density difference, or other relevant parameters, is necessary to be addressed. The paper is organised as follows: In section \ref{sec:exp_approach}, we introduce the experimental method, including experimental setup and measurement. The numerical method and validation are presented in section \ref{sec:numerical}. We discuss our results in section \ref{sec:results}. We present the settling process of a typical bouncing particle, and analyse the forces acting on it, to understand the mechanisms of bouncing behaviour. Then we examine the effects of $Re_l$, $Fr$ and $Re_u$ on the minimal velocity of the particle, to identify the key controlling parameter. Conclusions are drawn in section \ref{sec:conclusions}. \begin{figure} \centerline{\includegraphics[width=0.8\textwidth]{Fig1_setups} \caption{Experimental setups. (a) Setup 1 for recording particles trajectories; (b) Setup 2 for wake visualisation and flow fields measurement.} \label{fig:setup} \end{figure} \section{Experimental approach}\label{sec:exp_approach} \subsection{Experimental setup} The experiments were performed in a glass tank, with a total depth of 60 cm to ensure that terminal velocity was achieved. The tank has a large base area (30 cm $\times$ 30 cm) to avoid interaction between the particle and the tank walls. To prepare the working fluids, salt is dissolved in fresh water with different concentration ratios in several separate buckets. They are then kept at room temperature for at least 24 hours before filling the tank, to eliminate resolved gas and get uniformly stable concentration distribution. The tank is first half-filled by heavy fluid. Then light fluid is pumped slowly and horizontally to the top of the heavy fluid by a micropump, at a low flow rate of 100 ml/min, to minimise mixing of the two fluids. This filling method yields an error-function-type density profile. The tank is let stand for at least half an hour after the filling, and before the experiments, to diminish the disturbances caused by the pumping. The standing time varies with cases to get different thickness of the transition layer, i.e., thicker transition layer needs longer time for the interdiffusion of two fluids. Nylon particles are used for the experiments, with diameter $D=10$ mm and densities ranging from 1121-1126 kg/cm$^3$. The particles are released by a fixed clamp, at the centre of the tank cross-section (15 cm from the side walls), 2 cm below the free surface, and approximately 25 cm above the density transition layer. The particles are retained in another tank of stratified fluid at the same room temperature before release. Particle density measurements are conducted just before the experiments. The time interval between each release is 10 minutes, ensuring that the fluid is relaxed to its quiescent state. The settling processes of particles are captured by a high speed camera at a frame rate of 100 fps. Two different experimental setups are used, as shown in figure \ref{fig:setup}, to meet the requirements respectively for recording the trajectories of particles, and measuring the surrounding flow fields. For trajectory recording, we simply position a single camera at one side of the tank, and illuminate the tank via a panel of light emitting diodes (LEDs) from the bottom (figure \ref{fig:setup}(a)). The opposite sidewall of the tank is brushed black paint to avoid light reflection. The size of camera captured window is about 20 $\times$ 20 cm, yielding a resolution of $0.2$ mm/pixel. In the second experimental setup, the upper fluid is dyed using Rhodamine B for wake visualisation, and seeding particles are added to both the upper and lower layer fluids for Particle Image Velocimetry (PIV) measurement. To simultaneously capture the visualised wake structure and measure the velocity fields, two cameras are placed at opposite sides of the tank and carefully adjusted to get their optical axis parallel (figure \ref{fig:setup}(b)). The centre plane of the tank which is perpendicular to the camera optical axis is illuminated by a laser sheet (thickness $\sim$ 2 mm) sideways. The two cameras are synchronised to obtain simultaneous image pairs. One camera is equipped with a long-pass filter to capture the dyed wake, and the other one with short-pass filter to get the images of seeding particles. To capture the flow structure of the whole settling process, the particle should stay within the illuminated laser sheet plane. The densities of the particle and fluid should be carefully chosen to avoid out-of-plane motion, and the particle should be released very carefully to minimise disturbances. It is worth mentioning that the laser sheet hits the particle surface and heats the vicinity fluid. This effect is negligible in the upper layer as the particle settles fast but prolongs the suspending time after it enters the lower layer. For flow visualisation and PIV measurements, where we focus on the flow structure, the laser sheet is still an effective illumination approach. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig2_density_profile_repeatability20211005.eps} \caption{(a) Density distribution before and after one experiment. The grey area represents the density interface, which covers $98\%$ density variation between the upper and lower layers. (b) Velocity profiles of three repeated droppings of a same particle.} \label{fig:density_repeat} \end{figure} \subsection{Experimental measurements} The fluid density is measured by a densitometer (Anton-Parr DMA 4500) with measuring accuracy of 0.01 kg/m$^3$. To measure the particle density with the same accuracy, the particle is suspended in a tank ($10\times 10 \times50$ cm) filled with the fluid of an approximately linear density profile. The sampled fluid at the same level of the suspended particle is then measured, of which the density is taken as the particle density. Particle diameters are measured by a micrometer with accuracy of $0.001$ mm. To measure the density distribution of the transition layer, 12 thin needles are inserted horizontally into the tank from punched holes at the sidewall, with 4 mm vertical intervals, and connected to 12 syringes for taking samples. Each sample takes 2.5 ml fluid. For each measurement, 30 ml fluid is taken in total, which leads to a variation in height of less than 0.4 mm, for the working tank of cross-section 30 cm $\times$ 30 cm. Thus the modification to the density distribution by the measurement can be ignored. Density distribution measurements are performed twice for each test, before and after dropping the particles, respectively. The measured density of the 12 samples are fitted to an error-function-shaped function, satisfying the following expression: \begin{equation} \rho = \frac{\rho_u+\rho_l}{2} + \frac{\rho_u-\rho_l}{2} \mbox{erf}(\alpha(h-h_{ref})), \label{rho} \end{equation} where $\rho_u$ and $\rho_l$ are respectively the upper and lower layer fluid densities, $h_{ref}$ is the reference height, corresponding to the centre of the density transition layer, $\alpha$ is a scaling factor, determining the thickness of the density transition layer, and erf($x$) is the error function, which is written as \begin{equation} \mbox{erf}(x)=\frac{2}{\pi} \int_{0}^{x}e^{-t^2}dt. \label{erf} \end{equation} The measured density profiles for one of the experiments are presented in figure \ref{fig:density_repeat}(a). We can see that the density profile becomes smoother after the experiment. The average of these two measurements is then used as the final density profile. It is important to monitor and control the temperature of working fluid. With a salinity of 16$\%$ and temperature of $18 ^{\circ}$C (according to the present working fluid), $1^{\circ}$C of temperature variation can lead to 0.41 g/cm$^3$ density variation of the fluid. The natural room temperature variation from daytime to nighttime can be up to $10^{\circ}$C, which may significantly alter the particle behaviour. To minimise the temperature variation of the working fluid, the experiments are conducted in an enclosed room with the room temperature controlled by an air conditioner. The real-time temperature is monitored during each test, and the temperature variation for all tests is maintained at less than $1^{\circ}C$. The density measurement for each particle is conducted just before the dropping to minimise the influence of temperature. The viscosity of fluid is calculated by the following empirical formula with accuracy of $\pm 1.5\%$ (see equation 22 in the reference by \citet{sharqawy2010thermophysical}): \begin{equation} \left\{ \begin{array}{l} \mu = \mu _w(1+a_1S_a+a_2S_a^2),\\ \mu_w=4.2844\times10^{-5}+0.157(T_e+64.993)^2-91.296)^{-1}, \\ a_1=1.541+1.998\times10^{-2}T_e-9.52\times10^{-5}T_e^2 \\ a_2=7.974-7.561\times10^{-2}T_e+4.724\times10^{-4}T_e^2, \end{array} \right. \label{nu} \end{equation} where $S_a$ and $T_e$ are salinity and temperature respectively. Instantaneous particle displacements are obtained by fitting the discrete time-dependent position points with a cubic smoothing spline, following the methods of \citet{truscott2012unsteady} and \citet{epps2010impulse}. The fitting error tolerance is E=1e-7 for all experimental position data, which provides accurate fitting data and gives smooth fitting derivatives. Then, the velocity and acceleration of the particles can be calculated based on the time histories of the fitted particle displacements. Since the passing of particles will introduce disturbances to the density transition layer and expedite the diffusion, no more than five particles are dropped in each fluid tank. The repeatability validation is conducted separately before the experiment. As presented in figure \ref{fig:density_repeat}(b), the settling dynamics is almost unchanged for the repeated releases. \section{Numerical method}\label{sec:numerical} We solve the time-dependent incompressible Navier-Stokes equations with finite volume method. The continuity and the momentum equations are expressed as \begin{equation} \nabla \cdot \bm{u} =0, \label{eqn:ns1} \end{equation} \begin{equation} \rho(\frac{\partial \bm{u}}{\partial t}+ \bm{u} \cdot \nabla \bm{u})= -\nabla p + \mu \nabla ^2 \bm{u} +\rho \bm{g}. \label{eqn:ns2} \end{equation} The Boussinesq approximation is applied to account for the stratification effect, where the density variation enters the momentum equation only through the buoyancy term. Division by the reference density in (\ref{eqn:ns2}) yields \begin{equation} \frac{\partial \bm{u}}{\partial t}+ \bm{u} \cdot \nabla \bm{u}= -\frac{1}{\rho_{ref}} \nabla p + \frac{\rho}{\rho_{ref}}\bm{g} + \nu \nabla ^2 \bm{u}, \label{eqn:ns3} \end{equation} with kinematic viscosity $\nu=\mu/\rho_{ref}$. The transport equation for density is given as \begin{equation} \frac{\partial \rho}{\partial t}+ \bm{u} \cdot \nabla \rho= \kappa \nabla ^2 \rho, \label{eqn:ns4} \end{equation} where $\kappa$ is the scalar diffusivity defined as $\kappa=\nu/Pr$. In our simulations, we choose Prandtl number $Pr=700$, that corresponds to the salinity-induced stratification in water. We note that for stratified flows with $Pr>1$, the scales are smaller for density than the velocity at a given $Re$. To resolve the dynamic scales in such a stratified flow, very fine spatial resolution is required \citep{orr2015numerical}. In order to estimate the momentum and density boundary layer thickness ($l_{m}$ and $l_{d}$ respectively), we adopt the following relations \citep{schlichting2003boundary}: \begin{equation} l_{m} \sim O\left(\frac{d}{\sqrt{R e}}\right) \label{eq:lm} \end{equation} and \begin{equation} l_{d} \sim O\left(\frac{d}{\sqrt{{\it{Re Pr}}}}\right). \label{eq:ld} \end{equation} The moderate Reynolds numbers considered in the present work ($Re\leq356$) allow the application of axisymmetry assumption. A three-dimensional numerical simulation of a particle (sphere) settling in linearly stratified fluid shows that the flow remains axisymmetric at Reynolds number up to 356 without vortex shedding \citep{doostmohammadi2014numerical}. It has also been reported that nearly axisymmetric structure is retained even at $Re\sim 800$ \citep{2000Flow}. After testing different spatial resolutions, we find that the mesh with approximately 348,000 cells provides satisfactory accuracy. The first cell layer around the particle surface is with the height of $0.0014D$, which grows exponentially at a slow rate normal to the sphere surface. The grid size grows from the surface to a maximum cell length of $0.1D$ at the radial distance $10D$ from the particle centre, and then keeps constant to the outer boundaries. According to (\ref{eq:lm}) and (\ref{eq:ld}), $l_{m} \sim 0.053D$ and $l_{d} \sim 0.002D$ for $Re=356$ and $Pr=700$, respectively. Note that the choice of $Re$ here corresponds to the highest $Re$ in our numerical simulations. Though the mesh resolution we adopt satisfies $l_{d}$ around the vicinity of the sphere surface, we note that the resolution in the far wake region may not resolve the density gradient well. It would be noteworthy to mention that a numerical study by \citet{2000Flow} suggested that in a moderate Reynolds number regime, the actual thickness of the density boundary layer can be larger than the predicted value of (\ref{eq:ld}). This was also verified by \citet{doostmohammadi2014numerical} in their simulations of a settling sphere in a linearly stratified fluid with $Pr=700$. The authors carried out tests with minimum cell length up to 6 times larger than those predicted from (\ref{eq:ld}), and observed little deviation in their results. While high computational cost is a limiting factor for global density boundary layer resolution in the domain, a qualitative examination still shows that our numerical simulations capture the structures evolving in the stratified wake to a good extent. We solve the governing equations of the stratified flow using finite-volume based code \citep{weller1998tensorial}. The space discretisations are second-order upwind for the convection terms and central differences for the Laplacian terms, respectively. The time discretisation is second-order implicit Euler. The pressure-velocity coupling is obtained using the PISO (Pressure-Implicit with Splitting of Operators) scheme. For the velocity boundary conditions, we set that on the sphere surface to be moving-wall with no flux normal to the wall. A zero-gradient condition is imposed on all other velocity boundaries. The pressure is fixed at the top boundary. A fixed-flux condition is adopted for the pressure at all other boundaries, such that the velocity boundary condition can specify the flux on those boundaries. The density is fixed at the top and bottom boundaries, with constant values ($\rho_{u}$ and $\rho_{l}$ respectively), and a zero-gradient condition for density is imposed on other boundaries. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig3_vali_numerical.eps}} \caption{(a) Velocity profiles of a particle settling in a quiescent homogeneous fluid at $Re=41$. (b) Drag coefficients for particles settling in homogeneous fluid.} \label{fig:vali_numerical} \end{figure} The numerical methods are tested against experimental results of a particle settling in homogeneous and stratified fluids. The velocity profile of a particle settling in a quiescent homogeneous fluid is compared with the experimental results of \cite{mordant2000velocity}, as shown in figure \ref{fig:vali_numerical}(a). The velocity matches the experiment well at the beginning, but is a little bit higher after the particle reaches a steady state. The terminal velocity is dependent on the steady-state drag, which is defined as \begin{equation} F_d=-\frac{1}{2} C_d \rho_f U|U| S_p, \label{eqn:Fd} \end{equation} where $C_d$ is the drag coefficient and $S_p$ is the cross-sectional area of the particle. $C_d$ can be calculated by an empirical formula \begin{equation} C_d=\frac{24}{R_e}+\frac{6}{1+\sqrt{Re}}+0.4, \label{eqn:Cd_white} \end{equation} with error less than $10\%$ for $0< Re< 2\times 10^5$ \citep{white2006viscous}. The simulated drag coefficients are presented in figure \ref{fig:vali_numerical}(b), which qualitatively agree with that predicted by (\ref{eqn:Cd_white}). Further, We test the numerical method with a particle settling in stratified fluid. The transient flow structures are shown in figure \ref{fig:sim_process}, comparing to the experiment presented in figure \ref{fig:piv}. The bouncing behaviour is well captured, as shown in figure \ref{fig:valid_vy}. The results show that the simulation results agree well with our experiments. Those numerical results will be discussed later in detail. \section{Results and discussion}\label{sec:results} \begin{table} \begin{center} \def~{\hphantom{0}} \begin{tabular}{llll} Parameter & Symbol & Definition & Range of values \\ Particle density & $\rho_p$ & $-$ & $1121.58 \sim 1125.26$ kg/m$^3$ \\ Particle diameter & $D$ & $-$ & $10.055 \sim 10.128$ mm \\ Particle velocity & $U$ & $-$ & $-0.559 \sim 4.908$ cm/s \\ Jet velocity & $u_j$ & $-$ & $-$ \\ Upper fluid density & $\rho_u$ & $-$ & $1113.92 \sim 1118.63$ kg/m$^3$ \\ Lower fluid density & $\rho_l$ & $-$ & $1121.45 \sim 1123.66$ kg/m$^3$ \\ Interface thickness & $L$ & $-$ & $2.52 \sim 13.06 $ cm \\ Upper Reynolds number & $Re_u$ & ${\rho_u U_uD}/{\mu_u}$ & $115 \sim 356 $ \\ Lower Reynolds number & $Re_l$ & ${\rho_l U_lD}/{\mu_l}$ & $1 \sim 125$ \\ Froude number & $Fr$ & $U_u/ND$ & $2 \sim 7 $ \\ Brunt-V{\"a}is{\"a}l{\"a} frequency & $N$ & $\sqrt{(g(\rho_l-\rho_u)/L\rho_{ref})}$ & $0.62 \sim 1.88 $ \\ Reference density & $\rho_{ref}$ & $(\rho_u+\rho_l)/2$ & $1118.08 \sim 1120.09 $ kg/m$^3$ \\ Prandtl number & $Pr$ & $\nu/\kappa$ & $\sim700$ \\ density ratio &$\Delta \rho_l$ &$(\rho_p-\rho_l)/\rho_l$ & $(0.03 \sim 2.54) \times10^{-3}$\\ \end{tabular} \caption{Definition and ranges of parameters covered in the present work.} \label{tab:para} \end{center} \end{table} \subsection{Controlling parameters} A particle settling in a stratified fluid is mainly characterised by three non-dimensional parameters, the upper layer Reynolds number $Re_u=\rho_u U_u D/\mu_u$, the lower layer Reynolds number $Re_l=\rho_l U_l D/\mu_l$, and the Froude number $Fr=U_u /ND$, where $U$ is the terminal settling velocity of the particle in a homogeneous upper or lower fluid, $\mu$ is the dynamic viscosity of the fluid, $D$ is the particle diameter, and the subscripts $u$ and $l$ represent respectively the upper and lower layer fluids. The Brunt-V{\"a}is{\"a}l{\"a} frequency $N$ is calculated as \begin{equation} N=\sqrt{\frac{2g}{\rho_u +\rho_l}\frac{\rho_l -\rho_u}{L}}, \label{eqn:BruntFrequency} \end{equation} where $L$ is the thickness of the density transition layer, covering $98\%$ of the density variation (figure \ref{fig:density_repeat}(a)). All relevant parameters are listed in table \ref{tab:para}. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig4_yva_vat_0325.eps}} \caption{Settling velocity and acceleration of the particle with $Re_u=347$, $Re_l=20$ and $Fr=2.5$ as the functions of (a) the vertical position and (b) settling time. The left and right vertical axis correspond respectively to the settling velocity and acceleration. In (a), the vertical position ($z=0$) refers to the middle plane of transition layer, and the time $t=0$ refers to the instant when the particle's centre reaches the upper boundary of the transition layer. In (a), the shaded region represents the transition layer, and in (b), the two shaded regions denote when the particle's centre is within the transition layer. Note the right-side shaded region in (b) denotes when the particle re-enters the transition layer after bouncing. In (b), four stages are divided by blues dashed lines.} \label{fig:va0325} \end{figure} \begin{figure} \centerline{\includegraphics[width=0.9\textwidth]{Fig5_combine_img.eps}} \caption{A sequence of images showing the bouncing process of a particle settling through a density transition layer, corresponding to figure \ref{fig:va0325}. The two red dashed lines in each image represent the bounds of the interface. The non-dimensional parameters are $Re_u=347$, $Re_l=20$ and $Fr=2.5$.} \label{fig:bounce} \end{figure} \begin{figure} \centerline{\includegraphics[width=0.8\textwidth]{Fig6_wave450.eps}} \caption{Full image of internal wave at $t=8.5$s between figure \ref{fig:bounce}(o) and \ref{fig:bounce}(p).} \label{fig:wave} \end{figure} \subsection{Bouncing process}\label{sec:bounce_process} First, we choose a typical set of parameters, to demonstrate the bouncing process, or levitation \citep{abaid2004internal}, as a particle settles through a density transition layer. The velocity and the acceleration, as well as the visualised flow, of a classical bouncing particle are presented. Here, the non-dimensional parameters are $Re_u=347$, $Re_l=20$ and $Fr=2.5$. At these Reynolds numbers, the flow is nearly axisymmetric thus the particle can stay in the laser-sheet-illuminated plane and be captured during the whole settling process. The velocity and acceleration of the bouncing particle are presented in figure \ref{fig:va0325}. The deceleration begins before the particle enters the density interface (figure \ref{fig:va0325}(a)), as the existence of the interface limits the vertical excursion of fluid \citep{ardekani2010stratlets}. As the particle enters the interface, the velocity decreases more rapidly. The maximum deceleration is reached at approximately the lower bound of the interface. The particle reaches a zero velocity in the lower layer and bounces up, reentering the interface. The bouncing is like a beginning of a damped oscillation, which is more obvious in figure \ref{fig:va0325}(b). Note that the triggered oscillation is not a common feature for a bouncing particle. It occurs only at strong bouncing where the particle could reenter the interface. Finally, the particle accelerates again and slowly approaches its new terminal velocity. A series of images corresponding to figure \ref{fig:va0325}, showing the development of the wake over the whole settling process, are presented in figure \ref{fig:bounce}. We divide the settling process into four stages, and separate them by vertical dashed lines in figure \ref{fig:va0325}(b). (1) Wake attachment (figure \ref{fig:bounce}(a)-(e)). The particle enters the interface and drags a large amount of upper fluid at its rear. The velocity decreases rapidly and the deceleration reaches its maximum at the end of this stage (figure \ref{fig:va0325}(b)). (2) Wake detachment (figure \ref{fig:bounce}(f)-(j)). At this stage, most of the attached upper fluid (wake) detaches from the particle and returns to its neutral position, although it could hardly return to the upper layer as its density has been increased by the mixing. At the centre axis above the particle, a long thin column of lighter fluid keeps attached. This column does not break but elongates and gets thinner until it is too thin to be captured. The velocity continues to decrease and the acceleration becomes smaller, compared to the first stage (figure \ref{fig:va0325}(b)). By the end of this stage, the particle loses over $90\%$ of its entering velocity $U_u$. (3) Transient bouncing (figure \ref{fig:bounce}(k)-(q)). The particle reaches a zero velocity ($t=2.61s$) and bounces up. Triggered by the rupture of wake, strong internal wave is generated at the interface (figure \ref{fig:wave}), which causes oscillation of the particle. At this stage, almost all of the lighter fluid has detached from the particle, which indicates that the bouncing of particle is more likely induced by the flow, or specific flow structure, not the buoyancy of wake. More details of the bouncing mechanism will be discussed in section \ref{sec:force_analysis}. (4) Final sedimentation (figure \ref{fig:bounce}(r)-(t)). After the bouncing and oscillation, the particle slowly settles to the bottom of tank. Note the increased time interval between images. The particle settles extremely slowly after passing through the density interface. These four stages are typical stages that a bouncing particle would experience. Note that the bouncing process begins at the third stage, after the wake detaches from the particle. This is in agreement with the phenomena observed by \citet{abaid2004internal} that the particle changes its moving direction after the ascending of the `plume', where the `plume' is actually the detached wake in our experiment. For a monotonously settling particle, the first two stages are same, followed by a final sedimentation without bouncing up. \subsection{Flow structure}\label{sec:flows} \begin{figure} \centerline{\includegraphics[width=0.9\textwidth]{Fig7_piv_rho9.eps}} \caption{Illuminated wake (left) and PIV fields (right) of a particle settling through a density transition layer at $Re_u=198$, $Re_l=20$ and $Fr=2.3$. The horizontal red dashed lines mark the bounds of the interface. The arrows at the particle centre point to the moving direction of the particle.} \label{fig:piv} \end{figure} \begin{figure} \centerline{\includegraphics[width=0.9\textwidth]{Fig8_piv_rho9_zoom.eps}} \caption{A close view corresponding to the vicinity around the particle of figure \ref{fig:piv}. The red solid lines are isolines of $u_z=0$. A upward jet is generated at the centre axis behind the particle.} \label{fig:piv_particle} \end{figure} To measure the transient flow structure around the particle, PIV and wake visualisation images are captured by two cameras simultaneously, using the experimental setup 2 illustrated in figure \ref{fig:setup}. In figure \ref{fig:piv}, we present the results of a bouncing particle with non-dimensional parameters $Re_u=198$, $Re_l=20$ and $Fr=2.3$. Initially, the flow around the particle is similar to that in a homogeneous fluid. After entering the interface, accompanying the rupture of the wake, a vortex with direction opposite to that in the homogeneous fluid, is formed at the rear of the particle. It quickly grows and detaches from the particle, becomes a vortex ring remaining at the interface (figure \ref{fig:piv}(d)(e)). As explained in the previous work \citep{zhang2019core,magnaudet2020particles}, this vortex is sourced from the baroclinic torque caused by the misalignment between the density and pressure gradients. A close view of the flow around the particle is presented in figure \ref{fig:piv_particle}. At the rear of the particle, an upward jet (according to a negative $u_z$) is generated along the central axis. The jet structure has been widely reported in linearly stratified fluid \citep{2000Flow,hanazaki2009jets,zhang2019core}, which was believed to be caused by the continual dragging and rupture of the lighter fluid. In our experiment, the jet is transient as the dragging and rupture of lighter fluid are temporal processes. The jet forms as the wake breaks (figure \ref{fig:piv_particle}(c)), and decays faster thereafter. As the particle bounces (figure \ref{fig:piv_particle}(g)), the jet is a dominating structure at the vicinity of the particle. It is reasonable to deduce that the bouncing of particle is caused by the pull of the jet (as discussed in section \ref{sec:bouncing_forces}). However, we find that the occurrence of jet is quite common for a particle settling at moderate Reynolds numbers, even without bouncing motion. The jet is actually accompanied with the aforementioned wake detachment, which is observed throughout the parameter range. As we will attempt to address that the jet is a necessary but not sufficient condition for bouncing. \subsection{Force analysis}\label{sec:force_analysis} As we know, the nonmonotonic motion of a particle settling in a stratified fluid is caused by a so-called `stratification drag' (noted as $F_s$). Previous studies revealed that $F_s$ is mainly contributed by two mechanisms: the buoyancy of dragged upper fluid and the force caused by a specific flow structure \citep{srdic1999gravitational,zhang2019core,higginson2003drag,2009Enhanced}. In this section, we analyse the force acting on a bouncing particle, to further understand the mechanism of the bouncing behaviour. For the convenience of force decomposition, we present the numerical results of a settling particle with the setups matching that of the experiments in section \ref{sec:flows}. The simulated non-dimensional parameters are $Re_u=198$, $Re_l=26$ and $Fr=2.3$. The simulated density field is presented in figure \ref{fig:sim_process}, which exhibits the same wake structure with that in the experiment. Due to the difference of the lower Reynolds number, the bouncing behaviour is more obvious in experiment, as shown in figure \ref{fig:valid_vy}. We detail in section \ref{sec:rel} that the occurrence of bouncing depends mainly on $Re_l$. Overall, the simulation results are in agreement with the experiments. We present the force analysis by three steps. (1) Introduce how we decompose the force. (2) Describe how we calculate the force components. (3) Present the forces acting on a bouncing particle and analyse the bouncing mechanism. \subsubsection{Force decomposition}\label{sec:force_decomposition} To understand the underlying physics of particle bouncing behaviour, we attempt to decompose its hydrodynamic force into different components. We start from the motion equation of a particle settling from the rest in a quiescent homogeneous fluid, which can be written as \begin{equation} m_p\frac{dU}{dt}=G+F_b+F_d+F_a+F_h. \label{eqn:homo_motion} \end{equation} The left-hand side is the total inertia force acting upon the particle, where $m_p$ is the particle mass. It arises due to the imbalance of forces. At the right-hand side, $G$ and $F_b$ are respectively the gravity and buoyancy forces of the particle, $F_d$ is the `steady-state' drag force at the considered time instant, $F_a$ is the inertia force of added mass, and $F_h$ is the history (Basset) force. Here, $F_d$ can be evaluated according to (\ref{eqn:Fd}) and (\ref{eqn:Cd_white}). In the limit of potential flow, $F_a$ can be calculated as \begin{equation} F_a=-\frac{1}{2} \rho_f V_p \frac{d U}{d t}. \label{eqn:Fa} \end{equation} At the Stokes regime, $F_h$ has an analytic solution \begin{equation} F_h=-\frac{3}{2} D^2 \sqrt{\pi \rho_f \mu} \int _{-\infty} ^t \frac{\dot{U}(\tau)}{\sqrt{t-\tau}} d \tau . \label{eqn:Fh} \end{equation} For the particle settling in a stratified fluid, we follow the same way of drag force decomposition as in (\ref{eqn:homo_motion}), while introducing an extra term $F_s$, accounting for the stratification effects. The motion equation becomes \begin{equation} m_p\frac{dU}{dt}=G+F_b+F_d+F_a+F_h+F_s. \label{eqn:fs} \end{equation} It is reasonable to further decompose $F_s$ into two components as \begin{equation} F_s=F_{sb}+F_{sj}, \label{eqn:Fs_decomposition} \end{equation} where $F_{sb}$ is the enhanced buoyancy caused by dragging the upper fluid to the lower layer, therefore modifying the density distributions, and $F_{sj}$ is the force caused by the induced flow structure due to the stratification, represented typically by the upward jet flow at the rear of the particle. As we have discussed in figure \ref{fig:piv_particle}, the observed jet is conjectured to be the dominant flow structure as the particle bounces. The equation of motion for a particle settling in a stratified fluid can therefore be written as \begin{equation} m_p\frac{dU}{dt}=G+F_b+F_d+F_a+F_h+F_{sb}+F_{sj}. \label{eqn:stra_motion} \end{equation} \subsubsection{Force calculation}\label{sec:force_estimation} It is possible to evaluate numerically the different force components. The most convenient way is to reorganise (\ref{eqn:stra_motion}) as \begin{equation} m_p\frac{dU}{dt}=G+\underbrace{(F_b+F_{sb})}_{F_{static}}+\underbrace{(F_d+F_a+F_h+F_{sj})}_{F_{dynamic}}, \label{eqn:motion_fhydro} \end{equation} where $F_{static}$ is the hydrostatic force caused by density stratification and its nonuniform distributions, and $F_{dynamic}$ is the force caused by the non-zero velocity field at uniform density distribution. Excluding the steady-state drag $F_d$, the sum of ($F_a+F_h+F_{sj}$) represents the force caused by unsteady flow, i.e., the flow caused by the stratification effect. For a given density field, the hydrostatic pressure $p_s$ can be obtained by solving \begin{equation} \nabla p_s = \rho \bm{g}. \label{eqn:ps} \end{equation} $F_{static}$ is the integration of $p_s$ over the particle surface: \begin{equation} F_{static}=-\int _S p_s \bm{n} d S , \label{eqn:fstatic} \end{equation} where $\bm{n}$ is the unit normal at the surface. Since $F_b$ can be calculated by considering an undisturbed density profile, we have \begin{equation} F_{sb} = F_{static}-F_b. \label{eqn:fsb} \end{equation} The total hydro-force $F_{hydro}$ acting on the particle, i.e., $F_{static}+F_{dynamic}$, can be calculated by solving the equations (\ref{eqn:ns1}), (\ref{eqn:ns3}) and (\ref{eqn:ns4}). Then, we have \begin{equation} F_{dynamic} = F_{hydro}-F_{static}. \label{eqn:fdynamic} \end{equation} If we evaluate the steady-state drag $F_d$ using (\ref{eqn:Fd}) and (\ref{eqn:Cd_white}), we can write the drag component contributed by unsteady flow as \begin{equation} F_{sj} +F_a +F_h=F_{dynamic}-F_d. \label{eqn:fsj} \end{equation} \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig9_sim_process_rho10.eps}} \caption{Development of simulated density field of a particle settling through a density transition layer at $Re_u=198$, $Re_l=26$ and $Fr=2.3$, presented as a comparison with the experiment shown in figure \ref{fig:piv}.} \label{fig:sim_process} \end{figure} \begin{figure} \centerline{\includegraphics[width=0.6\textwidth]{Fig10_validation_piv20220103.eps}} \caption{Comparison between the simulated and experimental velocity profiles at $Re_u=198$ and $Fr=2.3$. Note that the lower Reynolds number for simulation is $Re_l=26$, while that for the experiment is $Re_l=20$.} \label{fig:valid_vy} \end{figure} \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig11_forces_z_t.eps}} \caption{Decomposed forces of a bouncing particle at $Re_u=198$, $Re_l=26$ and $Fr=2.3$, corresponding to figure \ref{fig:valid_vy}. The shadow area represents the interface region. The black dashed lines show the inception of the bouncing behaviour. In figure (c), the four stages are separated by blue dashed lines, which are: wake attachment, from t=0 to the first blue dashed line; wake detachment, from the first to the second blue dashed line; transient bouncing, from the second to the third blue dashed line; finial sedimentation, from the third blue dashed line to the end.} \label{fig:forces} \end{figure} \subsubsection{Forces of a bouncing particle}\label{sec:bouncing_forces} For a particle settling through a density interface, if $U_{min}\leq 0$ (keeping in mind that the positive direction of $z-$axis points downwards), it bounces up. At the instant when the first time the particle reaches $U=0$ (see the arrow in figure \ref{fig:valid_vy}), the particle satisfies \begin{equation} \frac{dU}{dt}<0. \label{eqn:cri} \end{equation} Thus at $U=0$ we have \begin{equation} m_p\frac{dU}{dt}= \underbrace{G+F_b}_{+}+\underbrace{F_d}_{0}+\underbrace{F_a}_{+}+\underbrace{F_h}_{+}+\underbrace{F_{sb}}_{-}+\underbrace{F_{sj}}_{-}<0. \label{eqn:force_dirction} \end{equation} In figure \ref{fig:forces}(a), we plot $F_a$ and $F_h$ predicted by (\ref{eqn:Fa}) and (\ref{eqn:Fh}). We note that the solutions given by (\ref{eqn:Fa}) and (\ref{eqn:Fh}) can actually not be accurately applied to our Reynolds number ($Re_u\approx 200$). However, at least we know that $F_a$ and $F_h$ are opposite to the acceleration of the particle, i.e, positive at this time instant. Apparently, the necessary condition for (\ref{eqn:force_dirction}) to hold is \begin{equation} |F_{sb}|+|F_{sj}|>|G+F_b|. \label{eqn:bouncing} \end{equation} Whether the jet is necessary for the occurrence of bouncing depends on the magnitude of $F_{sb}$. When $|F_{sb}|\leq |G+F_b|$, the contribution of jet is necessary for the bouncing behaviour. Observed from our experiments, as discussed in section \ref{sec:bounce_process}, the particle reverses its motion direction after the wake detaches, so that $F_{sb}$ is relatively small, therefore $F_{sj}$ is determinant for the bouncing behaviour. \begin{comment} \begin{equation} \left\{ \begin{array}{ll} \mbox{If} ~|F_{sb}|>G+F_b+F_d+F_a+F_h, & \mbox{the particle bounces even without jet;}\\ \mbox{If} ~|F_{sb}|\leq G+F_b+F_d+F_a+F_h, & \mbox{the particle could not bounce without jet.} \end{array} \right. \label{nu} \end{equation} \end{comment} The decomposed force components as the functions of vertical position is plotted in figure \ref{fig:forces}(b), where ($G+F_b$) is the reduced gravity. Since $F_a$ and $F_h$ cannot be accurately calculated, we plot ($F_{sj}+F_a+F_h$), which is the force due to the unsteady flow, and also gives the upper limit of $F_{sj}$. Note that ($F_a+F_h$) is always positive during the settling process. Apparently, before entering the transition layer, the balance between the reduced gravity ($G + F_b$) and the drag force $F_d$ makes the particle reach a constant settling velocity. As the particle enters the transition layer, the force components $m_pdU/dt$, $F_{sb}$ and $F_{sj}+F_a+F_h$ arise from their nearly zero values. We also present the time histories of different force components in figure \ref{fig:forces}(c), with the aforementioned four stages (section \ref{sec:bounce_process}) separated by three blue dashed lines. The wake buoyancy force $F_{sb}$ correlates to the volume of attached upper light fluid. It reaches a maximum at the end of the first stage, after the dragging of the wake (see figure \ref{fig:sim_process}(b) for $t=1.2$s), and before the wake detaches from the particle. The sharp rise of ($F_{sj}+F_a+F_h$) (the green line) is dominated by $(F_a+F_h)$ at the first two stages due to the sudden deceleration of the particle. As approaching the third stage, $F_{sb}$ becomes small since only a thin layer of light fluid left in the attached wake (see figure \ref{fig:sim_process}(e) for $t=3.0$s). In the mean time, ($F_{sj}+F_a+F_h$) appears to be the dominant drag force (to balance the reduced gravity ($G+F_b$)), arresting further settling of the particle. At the instant of bouncing occurrence, the settling velocity $U$ approaches zero (marked by the black dashed line in figure \ref{fig:forces} and see also figure \ref{fig:sim_process} between $t=5.4$s and $t=6.0$s). At this time, $|F_{sb}| \ll |G+F_b|$, and ($F_{sj}+F_a+F_h$) plays a dominant role in balancing the reduced gravity. Excluding ($F_a+F_h$), the contribution from $F_{sj}$ takes the primary part of the drag force. Therefore we conjecture that the jet flow is a necessary condition for bouncing the particle up. In conclude, we prefer to the interpretation that $F_{sb}$ is the primary factor for decelerating the particle as it enters the transition layer, while $F_{sj}$ induced by the jet flow further decelerates the particle till reverses its motion as it leaves the transition layer. \subsection{Influence of different parameters} \begin{table} \begin{center} \def~{\hphantom{0}} \begin{tabular}{cccccccccc} Experiment & Test & $\rho_u$ & $\rho_l$ & $L$ & \multicolumn{5}{c}{Minimal velocity (cm/s)} \\ series & number & (kg/m$^3$) & (kg/m$^3$) & (cm) & P1 & P2 & P3 & P4 & P5 \\ \hline \multirow{5}{*}{series 1} & 1 & 1116.52 & 1123.66 & 3.14 & -0.492 & -0.228 & 0.304 & 0.578 & 0.889 \\ & 2 & 1116.52 & 1123.32 & 3.01 & -0.140 & 0.237 & 0.560 & 0.780 & 1.048 \\ & 3 & 1116.52 & 1123.01 & 2.92 & 0.250 & 0.468 & 0.735 & 0.952 & 1.218 \\ & 4 & 1116.55 & 1122.71 & 2.86 & 0.415 & 0.610 & 0.858 & 1.059 & 1.302 \\ & 5 & 1116.52 & 1122.39 & 2.52 & 0.683 & 0.835 & 1.067 & 1.249 & 1.467 \\ \hline \multirow{5}{*}{series 2} & 6 & 1115.05 & 1121.87 & 2.71 & -0.397 & 0.015 & 0.454 & 0.712 & 0.994 \\ & 7 & 1115.90 & 1121.85 & 3.22 & -0.324 & 0.114 & 0.497 & 0.739 & 1.025 \\ & 8 & 1116.86 & 1121.85 & 3.23 & -0.414 & -0.100 & 0.376 & 0.648 & 0.939 \\ & 9 & 1117.97 & 1121.95 & 3.02 & -0.337 & 0.064 & 0.475 & 0.742 & 1.022 \\ & 10 & 1118.63 & 1121.45 & 3.67 & -0.162 & 0.137 & 0.516 & 0.781 & 0.985 \\ \hline \multirow{5}{*}{series 3} & 11 & 1113.93 & 1122.24 & 3.15 & -0.559 & -0.214 & 0.336 & 0.616 & 0.879 \\ & 12 & 1113.92 & 1122.24 & 6.72 & -0.248 & -0.087 & 0.376 & 0.651 & 0.922 \\ & 13 & 1113.92 & 1122.24 & 9.83 & -0.117 & 0.014 & 0.371 & 0.639 & 0.928 \\ & 14 & 1113.92 & 1122.24 & 11.53 & -0.035 & 0.103 & 0.435 & 0.705 & 0.954 \\ & 15 & 1113.92 & 1122.24 & 13.06 & 0.013 & 0.118 & 0.461 & 0.724 & 0.993 \\ \hline \end{tabular} \caption{Experimental parameters and the minimal velocities.} \label{tab:exp_para} \end{center} \end{table} \begin{table} \begin{center} \def~{\hphantom{0}} \begin{tabular}{ccc} Particle number & Diameter (mm) & Density (kg/m$^3$) \\ P1 & $10.075$ & $1121.58 - 1123.74$ \\ P2 & $10.128$ & $1121.86 - 1124.00$ \\ P3 & $10.083$ & $1122.28 - 1124.60 $ \\ P4 & $10.075$ & $1122.73 - 1124.79$ \\ P5 & $10.055$ & $1123.18 - 1125.26 $ \end{tabular} \caption{Particle properties. \label{tab:particle} \end{center} \end{table} We carry out a parametric study by varying the controlling parameters. Three series of experiments are conducted. Each series includes five tests, as listed in table \ref{tab:exp_para}. We vary the lower fluid density $\rho_l$, upper fluid density $\rho_u$, and the interface (transition layer) thickness $L$ to get different lower layer Reynolds number $Re_l$, upper layer Reynolds number $Re_u$, and Froude number $Fr$. For each test, five particles with slightly different properties (as listed in table \ref{tab:particle}) are released. The minimal velocity $U_{min}$ that a particle reaches for each release has also been included in table \ref{tab:exp_para}. Note that the negative $U_{min}$ implies the occurrence of bouncing. Since the particle density varies with ambient temperature, before each test, the particle density is precisely measured to an accuracy of 0.01 kg/m$^3$. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig12_uminbyuu_reu_rel_fr_color.eps}} \caption{The minimal velocity of all the particles in experiments versus upper, lower Reynolds numbers and Froude number. $U_{min}/U_u<0$ represents a bouncing behaviour. } \label{fig:umin_reu_rel_fr} \end{figure} The non-dimensional minimal velocities versus $Re_l$, $Re_u$ and $Fr$ for all the collected experimental data are shown in figure \ref{fig:umin_reu_rel_fr}. Clearly, the minimal velocity ($U_{min}/U_u$) correlates more strongly to the lower Reynolds number ($Re_l=1 \sim 109$) than the upper Reynolds number ($Re_u=152 \sim322$) and the Froude number ($Fr$=$2.3 \sim 5.6$). The bounce is seen to occur as $Re_l$ is smaller than about 30. \subsubsection{Lower Reynolds number $Re_l$}\label{sec:rel To further investigate the relationship between the minimal velocity and the lower Reynolds number, the experimental data from series 1, where the upper Reynolds number and Froude number are $Re_u=252\pm16$ and $Fr=2.6\pm0.2$ respectively, are plotted over the lower Reynolds number $Re_l$ in figure \ref{fig:umin_Rel}(a). The numerical results at $Re_u=258$ and $Re_u=349$ with the fixed Froude number $Fr=2.6$ are also plotted for comparison. From the trend, the experimental and numerical results are consistent, both indicating that $U_{min}/U_u $ increases linearly with $Re_l$. We note that for $Re_u \sim252$, the values of $U_{min}/U_u$ in the experiments are uniformly higher than that of the simulations, which is possibly caused by the incomplete development of $U_l$ in the experiments. After passing through the interface, a long distance is required for the particle to reach a steady state velocity. Such that the velocity measured at the instant when the particle leaves the viewing window in our experiments might be smaller than the fully developed $U_l$ in the simulations, resulting a smaller $Re_l$. We can fit the data shown in figure \ref{fig:umin_Rel}(a) by the lines expresses as \begin{equation} \frac{U_{min}}{U_u}=c_1Re_{l}+c_2. \label{eqn:umin_rel} \end{equation} The linear regression gives $c_1=0.0049$ and $c_2=-0.1181$ for the experiments ($Re_u=252\pm16$), and $c_1=0.0046$ and $c_2=-0.1720$ for the numerical results ($Re_u=258$). Critical lower Reynolds numbers $Re^ \ast_{l}=23.9$ and $37.5$ are identified respectively for these two lines, i.e., the position intersected with the horizontal axis, or when $U_{min}=0$. It is easy to understand that the undetermined parameters $c_1$ and $c_2$ are dependent on $Re_u$ and $Fr$. Evidenced from \ref{fig:umin_Rel}(a), with a higher upper Reynolds number $Re_u=349$, the fitting line gives a smaller slope compared with both the experiments and simulations with the smaller Reynolds numbers. However, it is interesting to find that the critical lower Reynolds numbers $Re^\ast _{l}$ obtained from the numerical simulations with different $Re_u$ are very close. In our experiments, since the terminal Reynolds numbers are not known $a$ $priori$, we practically adjust the fluid density to get varied Reynolds numbers. Previous works show that the bouncing behaviour is related to the fluid density and density ratio \citep{camassa2022critical,doostmohammadi2014reorientation}. Thus the relationship between the minimal velocity and the density ratio should also be investigated. Here, we define the density ratio as $\Delta \rho_l=(\rho_p-\rho_l)/\rho_l$. Since $Re_l$ is correlated to the density difference, the relationship between $U_{min}$ and $\Delta \rho_l$ can be derived from (\ref{eqn:umin_rel}). For a particle settling to a steady-state velocity in a homogeneous fluid, the drag force balances the reduced gravity, satisfying the following expression: \begin{equation} F_d=G-F_b. \label{eqn:fd_balance} \end{equation} Using the definition of $F_d$ in equation (\ref{eqn:Fd}) and substituting $U_l= \nu_l Re_l /D$ into (\ref{eqn:fd_balance}), we get the following expression between density ratio and Reynolds number: \begin{equation} \Delta \rho_l=\frac{3C_{dl} \nu_l ^2 Re_{l}^2 }{4 g D^3}, \label{eqn:rho_re} \end{equation} where $C_{dl}$ is the steady-state drag coefficient in the lower layer. Equations (\ref{eqn:umin_rel}) and (\ref{eqn:rho_re}) yield \begin{equation} \frac{U_{min}}{U_u}=c_1 \sqrt{\frac{4g D^3}{3 \nu_l ^2 C_{dl}} } \Delta \rho_l ^{\frac{1}{2}}+c_2. \label{eqn:umin_deltarho} \end{equation} We find that the power law fitting in the form \begin{equation} \frac{U_{min}}{U_u}=c_3 \Delta \rho_l ^{\frac{1}{2}}+c_4, \label{eqn:umin_deltarho_fit} \end{equation} is appropriate to describe the dependence of $U_{min}/U_u$ on $\Delta \rho_l$, as shown in figure \ref{fig:umin_Rel}(b) (recompiling the data from figure \ref{fig:umin_Rel}(a)). \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig13_umin_rel_drho.eps}} \caption{The variations of non-dimensional minimum velocity over (a) $Re_l$ and (b) $\Delta \rho_l$. The Froude number are $Fr=2.6\pm0.2$ for experiment and $Fr=2.6$ for simulation.} \label{fig:umin_Rel} \end{figure} The trajectories and velocity profiles of particle $P1$ from the experiment series 1 are plotted in figure \ref{fig:yv_Rel}. It is clearly shown in figure \ref{fig:yv_Rel}(a) that the sedimentation time is dramatically prolonged by the bouncing behaviour. Although the particle enters the interface with the same velocity, the slight variation of $Re_l$ significantly alters the behaviour. For a relatively large lower layer Reynolds number, e.g. $Re_l=59$, though a minimum velocity is observed in figure \ref{fig:yv_Rel}(b), the particle keeps descending unidirectionally after it passes through the transition layer. We emphasise that all particles have larger density than the fluid in the tank at all attitudes. As $Re_l$ decreases, crossing a critical value, i.e. $Re^ \ast_{l}$, as we have discussed above, the particle reverses its direction of motion and ascends for a transient time scale (see figure \ref{fig:yv_Rel}(a) for $Re_l=26$ and $Re_l=1$). This bouncing phenomenon is represented by a much deeper and negative minimum velocity shown in the depth vs velocity plot of figure \ref{fig:yv_Rel}(b). Here, $Re_l=1$ refers to a very extreme case, when the particle density ($\rho_s=1123.69$ kg/m$^3$) is near the density of the bottom layer ($\rho_l=1123.66$ kg/m$^3$). In this case, the particle experiences an extraordinarily long transient time scale to reach the terminal velocity of the bottom layer. An explanation for this long transient, given by the previous study \citep{abaid2004internal}, is that once the plume of upper layer fluid has shed, there still exists around the particle a small boundary layer of upper fluid which diffuses exceptionally slowly due to the very long diffusion of time of salt in water and the absence of a strong turbulence diffusion in this low-speed flow state. This is evidenced by our experimental results in figure \ref{fig:bounce}(p$\sim$t), which show clearly that a few light fluid remains at the particle surface after the bouncing. It is worthy mentioning some previous studies, where the bouncing behaviour was not observed. \citet{srdic1999gravitational} presented the time trajectories of particles obtained by a series of experiments (see their figure 9). They reported the noticeable decrease of velocity within the transition layer, however without finding reverse motion of the particle. It can be possibly explained from two aspects. First, in their experiments, the upper fluid was a mixture of ethyl alcohol and water, which diffuses faster than salty water. Thus the lighter upper fluid dragged by the particle could adjust to the surrounding fluid immediately and weaken the deceleration of the particle. Second, and more importantly, their examined upper Reynolds numbers fall in the range $0.7\leq Re_u\leq23$, much lower than the current studies. As we will discuss later, the upper Reynolds number is also one of the influencing factors for the occurrence of bouncing behaviour. Actually, the second explanation can also be related to a deeper physical mechanism, the rear buoyant jet, which disappears when $Re_u$ is low. As evidenced from the work by \citet{2009Enhanced}, there was no sign of such a jet as $Re_u\sim1$. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig14_yt_yv_rel.eps}} \caption{(a) Time trajectories of particles at five different lower Reynolds numbers. The nonmonotonic trend indicates a bouncing behaviour. (b) The velocity profiles of particles at five different lower Reynolds numbers. The grey region refers to the density transition layer. $Fr$ and $Re_u$ vary slightly within $Fr=2.4 \sim 2.5$ and $Re_u=236 \sim 246$.} \label{fig:yv_Rel} \end{figure} \subsubsection{Froude number $Fr$}\label{sec:fr} We now address the effects of Froude number. Referring to the experiment series 3 presented in table \ref{tab:para}, we fix both the upper and lower layer fluid densities, varying only the transition layer thickness. This is achieved by releasing the particles in the same tank of fluid with a time interval of 24 hours. The diffusion of salt along such a long time scale gives the variations of transition layer thickness in the range $L=$3.15 cm - 13.06 cm, resulting in various Froude numbers. We plot the non-dimensional minimum velocities for different particles over the Froude number in figure \ref{fig:umin_fr_yv_p2}(a). Note that the particle density increases from P1 to P5, therefore both the upper and lower Reynolds numbers increase from P1 to P5. The general trend is a nearly monotonous increase in the non-dimensional minimal velocity along with the increasing Froude number, i.e., as the transition layer becomes thicker. Comparing between the tests of different particles, we can see an overall increase in the minimum velocity when the particle density increases, or equivalently when the Reynolds number increases. Another trend is the less role of Froude number playing in the increase of minimum velocity when the particle density is large (see P5 in figure \ref{fig:umin_fr_yv_p2}(a)). In contrast, for the lighter particles, such as P1 and P2, the influence of Froude number is remarkable. For example, the behaviour of particle P2 is altered from bouncing to unidirectional settling as the Froude number increases from $Fr=2.6$ to $5.1$. Note that in the tests of P2, the lower Reynolds number ($Re_l=28) $ is very close to the critical Reynolds number $Re_l ^ \ast$. In figure \ref{fig:umin_fr_yv_p2}, for P3, P4 and P5, no bouncing phenomenon is recorded. Specifically, we present the velocity profiles of particle P2 at different Froude numbers in figure \ref{fig:umin_fr_yv_p2}(b). In these tests, the Froude number significantly alters the evolving profile of particle settling velocity. We emphasise that the bouncing motion occurs after the particle leaves the transition layer (see $Fr$=2.6 and 3.7 in figure \ref{fig:umin_fr_yv_p2}(b)), while the minimum velocity is reached within the transition layer for those tests without bouncing (see $Fr$=4.5, 4.9 and 5.1 in figure \ref{fig:umin_fr_yv_p2}(b)). There is an interesting phenomenon we want to report. In figure \ref{fig:umin_fr_yv_p2}(b) we observe that the particle restores to a higher settling velocity for the lower Froude number tests than that with high Froude numbers. It might be caused by the more pronounced diffusion induced by the jet flow. Clearly, the jet flow can enhance the turbulence diffusion and diffuse the remaining upper layer fluid attached on the particle to its ambient lower layer fluid. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig15_Umin_fr_yv_P2.eps}} \caption{(a) The non-dimensional minimum velocity versus Froude number for five particles. The lower and upper Reynolds numbers are: P1, $Re_l=12,Re_u=286$; P2, $Re_l=28,Re_u=295$; P3, $Re_l=44,Re_u=303$; P4, $Re_l=59,Re_u=306$; P5, $Re_l=77,Re_u=317$. (b) The velocity profiles of particle P2 versus the vertical position at five Froude numbers. The Vertical dashed lines indicate the bounds of the density transition layers.} \label{fig:umin_fr_yv_p2} \end{figure} \subsubsection{Upper Reynolds number $Re_u$}\label{sec:reu} We next investigate the effects of upper Reynolds number $Re_u$ by numerical simulations. In figure \ref{fig:yv_Reu}(a), the non-dimensional minimal velocity versus $Re_u$ at five different values of $Re_l$ are presented, at a fixed Froude number $Fr=2.6$. The trend is clear: the minimal velocity increases with the increased lower Reynolds number $Re_l$, while at a fixed $Re_l$ the minimal velocity decreases with the increase of $Re_u$ except for $Re_l=13$, where all minimal velocities are negative, indicating the occurrence of bouncing for all cases. We examine a special case, $Re_l=37$, when the minimum velocity becomes negative as the upper Reynolds number rises to $Re_u=292$. In figure \ref{fig:yv_Reu}(b), we plot the variations of settling velocity with depth for this special case. Despite the distinct differences in entering velocities of the particle among different tests, their minimal velocities are considerably resembling. Also, they reach minimal velocities at nearly the same depth. Note that the thickness of transition layer varies little among different tests. From figure \ref{fig:umin_reu_rel_fr} we understand that $Re_l=37$ is near the critical Reynolds number for the occurrence of bouncing, therefore this special case is very sensitive to the parameters, such as the upper Reynolds number $Re_u$. As demonstrated in figure \ref{fig:yv_Reu}(b), the particle moves unidirectionally for $Re_u=127, 190$ and 244, while reverses its motion direction for $Re_u=292$ and 337. We thus stress that the upper Reynolds number $Re_u$ plays a non-negligible role only when the bottom layer Reynolds number $Re_l$ is close to its critical value for bouncing. However, we note that the currently studied upper Reynolds numbers, in both experiments and numerical simulations, are kept at a certain order of $Re_u \sim O(100)$, while a much lower $Re_u$, e.g. in the order $\sim O(1)$ will give no sign of bouncing, as we have discussed in section \ref{sec:rel}. \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig16_umin_reu_yv_p2.eps}} \caption{(a) The non-dimensional minimal velocity versus the upper Reynolds number at five lower Reynolds numbers, with $Fr=2.6$. (b) The velocity verses vertical position corresponding to $Re_l=37$ in (a).} \label{fig:yv_Reu} \end{figure} \subsubsection{Identification of bouncing regime in ($Re_u$, $Fr$) space}\label{sec:reu_fr} \begin{figure} \centerline{\includegraphics[width=1\textwidth]{Fig17_umin_contour.eps}} \caption{Maps of non-dimensional minimal velocities of the settling particle at (a) $Re_l=13$, and (b) $Re_l=37$.} \label{fig:umin_cotour} \end{figure} Since the bouncing behaviour is primarily determined by the lower Reynolds number $Re_l$, while the other two parameters, $Re_u$ and $Fr$ can also play their roles, as we have discussed in section \ref{sec:fr} and \ref{sec:reu}, it is possible to give a better visualisation by examining their combined effects. For example, in figure \ref{fig:umin_cotour}, we draw two maps in the parametric space of $Re_u$ and $Fr$ for two selected lower Reynolds numbers $Re_l=13$ and $Re_l=37$, with the contours representing their minimal velocities. Clearly, the bouncing phenomenon occurs at the higher $Re_u$ and lower $Fr$, i.e. the upper-left regimes of the maps. The direct comparison between figure \ref{fig:umin_cotour}(a) and (b) indicates that the bouncing regime shrinks for the higher value of $Re_l$, demonstrating again that $Re_l$ is the dominant parameter. When $Re_l$ is low, the particles are more prone to bounce after passing through the transition layer. \begin{table} \begin{center} \def~{\hphantom{0}} \begin{tabular}{cccccc} ~ & $Fr=2.6$ & $Fr=3.6$ & $Fr=4.6$ & $Fr=5.6$ & $Fr=6.6$ \\ $Re_u=349$ & 41.0 & 46.2 & 44.5 & 25.5 & $-$ \\ $Re_u=305$ & 39.6 & 43.7 & 39.4 & 14.4 & $-$ \\ $Re_u=258$ & 37.5 & 40.0 & 31.9 & $-$ & $-$ \\ $Re_u=207$ & 34.6 & 34.2 & 21.8 & $-$ & $-$ \\ $Re_u=147$ & 28.9 & 24.3 & $-$ & $-$ & $-$ \end{tabular} \caption{Critical lower Reynolds number $Re_{l}^\ast$ in the ($Re_u$, $Fr$) space.} \label{tab:relh} \end{center} \end{table} Simulating in the same ($Re_u$, $Fr$) parametric space for different values of $Re_l$, with a lower limit of $Re_l=13$, we summarise the critical lower Reynolds numbers $Re^ \ast _{l}$ in table \ref{tab:relh}. We note that those with $Re_l<13$ are not presented in this table. We see that $Re^ \ast _{l}$ varies from $14.4$ to $46.2$ depending on different combinations of $Re_u$ and $Fr$. We should point out that the variations of $Re^ \ast _{l}$ with $Fr$ at a fixed $Re_u$ are not always monotonous, particularly when $Re_u$ is high. \subsection{Discussion on the strength of buoyant jet}\label{sec:jet} \begin{figure} \centerline{\includegraphics[width=0.55\textwidth]{Fig18_jet_fr_reu.eps}} \caption{Jet velocities with maximum magnitudes in $Re_u$-$Fr$ space at $Re_l=37$. The negative value refers to an upward jet.} \label{fig:jet} \end{figure} It is worth examining the jet flow by quantifying its strength. Corresponding to figure \ref{fig:umin_cotour}(b), we present the maximum jet velocity for each combination of $Re_u$ and $Fr$ in figure \ref{fig:jet}. Here, the lower Reynolds number is fixed at $Re_l=37$. The maximum magnitude of jet velocity is identified at each test, which is scaled by the upper layer terminal velocity $U_u$. This non-dimensional jet velocity $u_j/U_u$ increases in its magnitude with the increased $Re_u$ while with the decreased $Fr$, indicating that the jet strength becomes stronger as the inertial effect becomes dominant, as well as the stratification becomes stronger. Not surprisingly, we find that the strong jet region exhibited in figure \ref{fig:jet}, the upper-left corner, matches well with the bouncing regime shown in figure \ref{fig:umin_cotour}(b). In other words, the upward jet flows correlate to the occurrence of bouncing behaviour. \section{Conclusions}\label{sec:conclusions} In the present study, we carry out comprehensive experimental tests and numerical simulations on a spherical particle settling through a density stratified fluid, focusing on revealing the physical mechanisms for bouncing behaviour, or reverse motion, as the particle passes through the transition layer. Our study covers a wide range of parameters, with the lower layer Reynolds number $1 \leq Re_l\leq 125$, the upper layer Reynolds number $115 \leq Re_u\leq 356$, the Froude number $2 \leq Fr\leq 7$, and the Prandtl number $Pr \approx 700$ for a salinity-stratified fluid. First, we decompose the forces acted on the particle into different components, and correlate them to the flow structure. We find that the particle experiences four sequential stages as it settles, in the order of wake attachment, wake detachment, transient bouncing and final sedimentation. Two mechanisms are identified, which contribute to the drag enhancement. First, the buoyancy of attached upper, lighter, fluid and the second, the force caused by a specific flow structure, the buoyancy jet flow. At the first two stages, the force component $F_{sb}$ due to the attached upper fluid in the wake contributes mostly to the drag enhancement. While, at the third stage, most of the upper fluid has detached from the particle, thus $F_{sb}$ becomes less significant. Instead, the force component $F_{sj}$ induced by the jet flow, caused by the rapture of the wake, appears to be dominant. This jet flow is evidenced from our experimental measurements. We conjecture that the jet flow is a necessary condition for the occurrence of bouncing motion. Then, we investigate respectively the influence of $Re_l$, $Re_u$ and $Fr$. We monitor the minimal settling velocity of the particle, of which a negative value indicates a bouncing motion of the particle, hence the bouncing regimes can be clearly identified in the parametric spaces. We find that the lower Reynolds number $Re_l$ is the determinant factor. In our experiments, the bouncing motion is found to occur below a critical lower Reynolds number around $Re^ \ast _{l}=30$. In the numerical simulations, the highest value for this critical number is $Re^ \ast _{l}=46.2$, limited in the currently studied parametric ranges. Moreover, by examining the jet flow by quantifying its strength, we find a consistency between the maximum magnitude of jet velocity in the flow fields and the minimal settling velocity for the particle, plotted in a same ($Re_u$, $Fr$) space, demonstrating the significance of jet flow on the particle's bouncing motion. The study on bouncing behaviour of particles settling through a density stratified fluid is clearly still far from comprehensive. For example, it will be of interest to consider a cluster of particles, of which the interactions between particles would lead to more complicated and interesting settling behaviours. Also, particles with irregular shapes can be considered. Both can represent more closely the real situations, such as the aggregation of marine snow. \section*{Acknowledgements}\label{sec:ack} \begin{acknowledgments} This research has been supported by the National Natural Science Foundation of China (Grant No: 11922212) and the Fundamental Research Funds for the Zhejiang Provincial Universities (Grant No: 2021XZZX017). S.W. gratefully acknowledges the hospitality of the Department of Applied Mathematics and Theoretical Physics, University of Cambridge. \end{acknowledgments} \bibliographystyle{jfm}
\section{Introduction} In recent years, the way people communicate has changed dramatically. With the advent of the Internet, new communication channels have emerged that allow people to transcend geographical and language barriers thanks to a global communication network and alternatives to text-only interaction (e.g., images and videos). Online social networks (OSNs) are probably the most notable example of such new interaction mechanisms and have greatly influenced our society by fostering discussions and disseminating information. The means that enable online social interactions are profoundly different from traditional interpersonal interactions and other mass media such as newspapers or television. The amount of content produced on such social media platforms is immense. Therefore, to keep users engaged within the social network, the platform performs filtering to select the posts offered to them. This filtering mechanism can reinforce the natural tendency (usually referred to as \textit{homophily} in the literature) to interact with like-minded people. And, in turn, can lead to the formation of \textit{echo chambers} \cite{quattrociocchi_echo_chamber}, where people who share a similar point of view interact with each other but are isolated from the rest of the users. In addition, the reach of certain social media users can be extraordinary. Posts by very influential people can reach a large audience in virtually no time. Another aspect worth mentioning is the diversity of topics discussed on the platform. It ranges from commentaries on the latest sporting events to debates on sensitive issues such as vaccinations. Last, communication on OSN takes place asymmetrically, i.e., few well-known individuals can exert influence on a large audience which, in turn, is composed of far less known people. These are some crucial aspects that characterize online social networks and distinguish them from "offline" interactions. We believe that models seeking to capture the complexity of interactions occurring in online social networks must account for them. Trying to understand the mechanisms behind the opinion-forming process is a daunting challenge. The complexity driving this process is still poorly understood. Moreover, the individual reaction to external stimuli is utterly subjective and thus difficult to model. In a continuous framework, opinions can be interpreted as a person's level of agreement with a statement or the interest they show in an issue (e.g., adoption of technology, politics) and mapped to real-valued intervals. It is clear that measuring opinions in such intervals is arbitrary and can only lead to qualitative results. Indeed, most of the literature proposes theoretical models without the claim of accurately representing real-world scenarios. Very few works in the literature attempt to validate the emergent behavior of the model with physically observed phenomena (e.g., \cite{scaling_elections} \cite{quattrociocchi_echo_chamber}). Some other works take the approach of supporting modeling decisions with real-world observations. Das et al. \cite{das_ash_exp} did this by interviewing a group of people on specific topics, while Xiong and Liu \cite{Xiong_Liu_2014} extracted information from Twitter networks. Following the above works, we present a model whose hypotheses are supported by data from social networks and whose outcomes are compared with emerging phenomena on two popular OSNs, i.e., Facebook and Instagram. As the limitations mentioned above also apply to our model, the results discussed here do not aim to be predictive. However, the proposed model provides a tool to study the emerging behavior on online social networks and the impact of algorithmic personalization. The main objective of this work is to develop an analytical framework tailored to online interactions, incorporating the following aspects: \begin{itemize} \item The asymmetry typically found in OSNs. There exists a relatively small percentage of users of online social networks whose number of followers is orders of magnitude larger than that of other users. These individuals are commonly referred to in the literature as \textit{influencers} or \textit{opinion leaders}. They are particularly relevant, as their opinions can reach a vast fraction of the social network's population. \item The filtering performed on the content by the social media platform. \textit{Algorithmic personalization} appears necessary in the context of OSNs, as the number of daily produced posts has become enormous. The aim is to increase engagement by showing users only the most relevant posts. The loop is then closed by taking into account user feedback on the posts received (e.g., likes). \end{itemize} The proposed model: \begin{itemize} \item Provides a tool for assessing the impact of different algorithmic personalization policies, focusing on the opinion leaders in the network. It can evaluate the extent to which these strategies might hinder diversity of opinion. \item Exploits the observed characteristics of a large ensemble of Italian influencers from Facebook and Instagram social networks to ground its main hypotheses. \item Allows for comparing its emergent behavior with observations on real online social networks. Furthermore, the explanatory capabilities of the model are used in the study of the opposition of two Italian politicians during a government crisis by identifying a state of public opinion that can lead to the same behaviors observed in the collected data. \end{itemize} One peculiar feature of our approach is the concept of \textit{reference direction}, which is the individual's main topic of interest and expertise. To our knowledge, the existing literature has not yet considered the impact of a reference topic for each influencer on the opinion formation process in multi-dimensional spaces. The influence exerted on non-reference directions depends heavily on platform personalization, which usually depends on how well-known an influencer is in its main field of expertise. For example, famous public figures (e.g., athletes, models) can express their point of view on potentially sensitive matters and may resonate more than experts due to their popularity in their field. Therefore, since influencers discuss different topics, the reference direction loosely couples seemingly unrelated subjects brought up by the same person. Incorporating a personalization process into the dynamic behavior of the model is another crucial feature. The analytical results and the model simulation show that \textit{algorithmic personalization} favors structurally advantaged individuals, resulting in less diversity of opinion. It is also interesting to observe that the model undergoes a phase transition in its behavior as a function of the degree of polarisation, at least in the case of two competing influencers. Below a certain threshold, there are diverse opinions in the population, and above this threshold, one of the influencers tends to polarise users' attention. The paper is organized as follows. Section \ref{sec:related} discusses the relevant work in the literature and sets out the rationale for the need for a new opinion model tailored to OSNs. The Communication Asymmetry model is presented in Section \ref{sec:model}, along with the notation used throughout the article. Section \ref{sec:OSNobservations} presents some observations from real social networks supporting our modeling assumptions. Section \ref{sec:analysis} is devoted to the mean-field analysis of the model as the number of users grows large. The theoretical results on the steady-state behavior of the model are proved in the Appendix. Section \ref{sec:model_vs_param} then investigates the impact of the model parameters on a reference scenario with two influencers. Analytical findings are validated in section \ref{sec:simulation} by comparing the results of Monte-Carlo simulations with theoretical predictions specific to our reference scenario. Section \ref{sec:data} further validates our model with real data collected on Instagram and Facebook. At last, Section \ref{sec:conclusion} concludes the article with a discussion of the implications and limitations of our work, setting the ground for future extensions. \section{Related work}\label{sec:related} The first steps in the field of opinion dynamics were taken in the late 1950s by a number of social psychologists, among which Solomon Ash \cite{Ash1955}, John R. P. French \cite{French1956}, and Leon Festinger \cite{Festinger1954} had great resonance in the field. Ash empirically observed that the individuals he studied engaged in conformist behavior because of the \textit{social pressure} exerted by the rest of the social group. In short, Ash observed that an individual states a truth about something that is not true (e.g. ``white is black" \cite{das_ash_exp}) when the social group to which the individual belongs asserts it. French \cite{French1956} developed a model to capture influence through interpersonal relationships within a group, focusing on leadership and using directed graphs to model interpersonal relationships. Festinger developed the \textit{theory of social comparison}, according to which individuals tend to evaluate their position by comparing it with others. Moreover, the tendency to do so decreases the greater becomes the difference in opinion \cite{Festinger1954}. Opinion models are divided customarily into two broad classes: those in which opinions are continuous variables and those in which opinions are discrete (often binary). In a recent review \cite{Mastroeni_IEEE_review} examining agent-based opinion models, the authors show that more than $80\%$ of the models considered are continuous. Much of the seminal work in the field of opinion dynamics is continuous in nature. For example, the DeGroot model \cite{Degroot1974} considers a networked social system in which individuals interact with their neighbors. Individuals average their current opinion with the opinion of their neighbors. The idea behind the model is to describe the process leading to consensus within a group. Subsequently, Friedkin and Johnsen \cite{Friedkin_Johnsen_1990} extended it by developing a flexible framework from which various opinion models (including French \cite{French1956} and De Groot \cite{Degroot1974}) can be derived as particular cases. Their model of \textit{social influence} encompasses both the processes of \textit{social conformity} and \textit{social conflict} that lead to behavior that goes beyond simple consensus and represents the persistent disagreement often observed in social networks. In the early 2000s, Hegselmann and Krause \cite{HK_model} and Deffuant and Weisbuch \cite{DW_model} proposed two similar models. In analogy with the DeGroot model, individuals interact by averaging opinions, but the authors introduced the central idea of bounded confidence. According to bounded confidence, individuals interact in a social network with other peers only if their beliefs are not too different. This mechanism implements the concept of \textit{homophily}. Lorenz, in his review \cite{Lorenz_2007}, provides the agent-based and density-based formulation of bounded confidence, distinguishing two main models: in the Hegselmann-Krause (HK) model, individuals modify their opinion as a result of interactions with all agents in their neighborhood, whereas, in the Deffuant-Weisbuch model, interactions are pairwise between connected individuals. In addition to continuous models, discrete models have also appeared in the literature. The first and probably most prominent model of this kind is the voter model, independently introduced by Clifford and Sudbury \cite{clifford_and_sudbury_1973} and Holley and Liggett \cite{Holley_Liggett_1975}. Here, individuals are agents in a network of interactions, holding a binary opinion. At times dictated by a Poisson clock, an individual adopts the belief of a randomly chosen neighbor. This type of model has attracted a great deal of attention: several extensions have populated the recent literature, for example, taking evolving networks into account \cite{Holme_Newman_2006} \cite{Durrett_evolving_VM} or allowing individuals to hold more than one opinion at a time \cite{Nardini_whos_talking_1st}, or introducing spontaneous changes of opinion \cite{Granovsky_Madras_1995} (\textit{noisy} voter model). A consistent bulk of research on opinion dynamics comes from the physics literature, among which early contributions are Ben-Naim \cite{Ben-Naim_2005} and Toscani \cite{toscani_kinetic_model}. The idea underlying these models is that of describing interacting individuals using statistical mechanics by adequately defining the microscopic interactions between the individuals, much like particles in a gas. Then, collective statistical phenomena are sought for the overall opinion of the population. In the papers mentioned above, Ben-Naim and Toscani consider two mechanisms of opinion formation: \textit{compromise}, the human tendency to reach a reasonable trade-off on an issue to avoid conflict, and a process of \textit{introspection} (in other models, e.g., \cite{Granovsky_Madras_1995}, modeled as noise), which the authors believe represents the impact of external sources of information (e.g., media). A statistical approach is generally employed to study spin systems, and models such as the Ising model have also been applied to the opinion formation process. An extension of the Ising model is the Sznajd model \cite{sznajd_weon_model}, which implements \textit{social validation} and for which Slanina and Lavicka \cite{Slanina_sznajd_analytical} derived analytical results. In this model, the agreement of individual pairs leads to their neighbors agreeing with them, and a line graph is considered to capture the connection network. For a comprehensive review of opinion models, we refer to the survey by Castellano et al. \cite{Castellano_Fortunato_Loreto_2009}. \subsection{Models tailored to online platforms} Most of the seminal literature on opinion dynamics is suited to describe the decision-making process in small groups of individuals, e.g., a board of directors, or to capture rather \textit{regular} patterns determined by the daily personal interactions of individuals. Models such as the voter model have been studied extensively on regular lattices \cite{cox_voter} \cite{Frachebourg1996}. The structure of interactions, especially those online, is far from homogeneous. As mentioned earlier, an inherent asymmetry in communication exists in OSNs where a limited number of individuals (\textit{influencers}) monopolize the discussion. The voter model has been studied over heterogeneous networks (e.g., \cite{Suchecki2005} \cite{Sood2005}) to account for this diversity. On such networks, there can exist \textit{hubs} (strongly connected nodes) playing a role similar to \textit{influencers} in our framework, although the authors did not explicitly make such a distinction. Other works have divided the population into classes, e.g., \cite{Yildiz2013} introduced \textit{stubborn} agents, and if such individuals have opposing opinions, they hinder the possibility of the population converging to consensus. Recent work is drawing further attention to online platforms by adapting classical frameworks to the specificities of online interactions. Valensise et al. \cite{valensise_polarization} have developed an opinion model that embodies \textit{algorithmic personalization}, comparing its behavior to phenomena observed in social networks (e.g., Facebook and Twitter). Our work is different because we consider distinct classes of users, characterizing specifically \textit{influencers} and closing the interaction loop between users and the platform by a \textit{feedback} function. Other works that address content filtering bias in social media platforms include \cite{Peralta_2021_algorithmic_bias} \cite{Perra2019}. Peralta et al. \cite{Peralta_2021_algorithmic_bias} develop a flexible framework to incorporate \textit{algorithmic bias} into binary opinion dynamics by having agents interact at a lower rate with individuals who hold an opposing viewpoint. Considering both pairwise and group-wise interactions, the authors found that algorithmic bias either leads users to polarize their opinion (in the case of pairwise interactions) or results in the coexistence of beliefs (in the case of group-wise interactions). \subsection{Validation of opinion formation models} In \cite{data_in_opdyn_2022}, models of opinion dynamics are referred to as \textit{idealized} because, in most cases, they assume basic underlying principles of interaction and observe emergent social behavior. There are two main approaches to validating opinion models in the literature: first, the use of observational data \cite{scaling_elections}\cite{quattrociocchi_echo_chamber}\cite{valensise_polarization} and second, the use of controlled sociological experiments\cite{pnas_opposing_views}\cite{Morgan2011}. We will focus more on the first portion of the literature, which is more relevant to our work. Attempts to validate opinion models are scarce for several reasons: i) the mapping of opinions into values, ii) an adequate definition of links between agents, and iv) the change in opinion after an interaction is hardly measurable. A notable exception is election and polling data, which make it possible to attribute a person's opinion to the political orientation of the chosen candidate. Fortunato and Castellano \cite{scaling_elections} have shown that the distribution of vote counts is a universal scaling function and have derived a simple tree-like interaction structure with candidates as roots and an interaction that can turn the individuals reached into \lq\lq activists" who can spread the idea and convince other individuals. The results of the model are in good agreement with empirical evidence. In \cite{voter_for_voters}, a noisy voter model could fit data from US elections. Other recent approaches \cite{science_diverse_news} have used shared \textit{news} on Facebook to assess the extent to which individuals are exposed to opposing views through their (online) friendship relationships, using users' self-reported ideological affiliations to infer opinion. They found that individuals have access to cross-cutting content and that the degree of this exposure depends on the composition of one's friends on social media. A more recent body of literature \cite{quattrociocchi_echo_chamber} \cite{valensise_polarization} has directly employed data from online social networks, such as Gab, Facebook, Reddit, and Twitter, to observe the emergence of \textit{echo chambers} \cite{quattrociocchi_echo_chamber} and to validate a model encompassing algorithmic personalization in the process of opinion formation \cite{valensise_polarization}. \section{The Communication Asymmetry opinion model} \label{sec:model} \begin{comment} \section{The Opinion Model \lv{Possibili nomi per identificare il nostro modello: "rho-theta opinion model", "communication assimetry opinion model", "opinion model subject to influencers and personalization"}} \label{sec:model} \end{comment} In this section, we first establish the notation used throughout the paper and then present the Communication Asymmetry (CA) model in its most general formulation. We conclude the section with a discussion of the strengths and limitations of the proposed model. \subsection{Notation } In this work, we adopt the following vectorial notation. We denote vectors by bold symbols, whereas we denote their components with normal-font symbols whose subscript is the index in the vector, e.g., $\bm{a}=\{a_k \}_k$. Lowercase letters denote parameters and dynamical variables associated with an individual. In general, index $i$ runs over the set of \textit{influencers} while index $u$ runs over that of regular users. For those parameters/variables that can be associated with individuals of both classes (either influencers or regular users), the above indices are indicated between superscript parentheses, e.g., $a^{(i)}, a^{(u)}$, to immediately identify the class to which the individual belongs. If necessary, the dependence of variables on other system parameters is made explicit by specifying the independent variables between parentheses, e.g., $\alpha(\cdot,\cdot)$. Italic capital letters denote sets, e.g., $\mathcal{I}$ is the set of all influencers in the population, while $|\mathcal{I}|$ is its cardinality. Capital letters represent outcomes of stochastic experiments whose characteristic parameters are lowercase letters: e.g., $\Omega\left(\omega(\cdot,\cdot)\right)$. The operator $\mathbb{E}[\cdot]$ represents an expected value, and a bar over a variable, e.g., $\bar{a}$, represents its average value. Whenever we need to express the probability of an event, we use the notation $Pr[\cdot]$. We employ $\mathds{1}_{\{\cdot\}}$ for the indicator function. Lastly, time is denoted by $t$ if it is considered continuous and by $n$ if it is discrete. \subsection{Description of the model} We propose a continuous opinion model with two interacting classes of agents. Specifically, the population consists of $N_u=|\mathcal{U}|$ \textit{regular users} and $N_i=|\mathcal{I}|$ \textit{influencers}. This division mimics what happens in real social networks, where a small portion of the population, the \textit{influencers}, has a much larger number of people following their posts on the online social network. We assume that the generation of new posts, i.e., messages in the OSN, is a Poisson Point Process (PPP) with intensity $\lambda$, where each event of the PPP corresponds to the creation of a new post from an influencer $i \in \mathcal{I}$. The corresponding embedded discrete time will be denoted by the integer $n\in \mathbb{N}_{+}$, $n = 1,2,\ldots$, where $n$ is the $n$-th post. Each post is sent\footnote{In this paper, the verbs \lq\lq send", \lq\lq suggest" and \lq\lq reach" are used interchangeably referring to a post shown to a user by the platform.} to a subset of regular users, identified by the social platform according to an \textit{algorithmic personalization} described by function $\omega$ (to be specified later). Regular users react to these posts through a \textit{feedback} function $\theta$ (specified later). Figure \ref{fig:rho_theta_loop} highlights this closed loop behavior brokered by the social media platform, positioned between regular users and influencers. \begin{figure*}[h] \centering \includegraphics[width=0.8\textwidth]{NEW_infl_user_loop.drawio.pdf} \caption{The picture depicts the relationship among the three players of the model: regular users, influencers, and the social media platform. Moreover, it highlights the role of the feedback function $\theta$ provided by the users and the filtering function $\omega$ used by the platform to propose the posts to the users.} \label{fig:rho_theta_loop} \end{figure*} The opinion space is $\mathcal{X} \subset \mathbb{R}^d$, where each dimension represents an uncorrelated topic on which users have a belief. Therefore, an opinion consists of a $d$-dimensional vector $\bm{x}^{(u)}(n) \in \mathbb{R}^d$, which evolves as a result of the interaction between a regular user and every influencer on every possible topic. This model neglects interactions between regular users\footnote{From now on, we will refer to \textit{regular users} simply as \textit{users}. Moreover, the terms \textit{agent} or \textit{individual} are used to indicate a social network user of either class.}. The \textit{prejudice} of a user, denoted by $\bm{z}^{(u)}$, is the other parameter that enters the opinion update rule alongside the user's current opinion. It represents the user's natural inclination toward different topics. Unless otherwise specified, we will assume that the user's initial opinion is set equal to the prejudice: $\bm{x}^{(u)}(0) = \bm{z}^{(u)}$. We will consider different distributions for the agents' prejudice over the opinion space. In particular, delta, uniform, and Beta distributions are usually employed. Influencers are considered stubborn agents, which means that their opinions do not change over time, i.e., $\bm{x}^{(i)}(n)=\bm{x}^{(i)}(0)=\bm{x}^{(i)}=\bm{z}^{(i)} \in \mathbb{R}^d,\quad \forall n > 0$ and $i\in \mathcal{I}$. As we will show in Section \ref{sec:OSNobservations}, each influencer has a main topic of interest on which it publishes the majority of its posts and which typically coincides with the topic it is mainly known for on the OSN. It represents the \textit{reference direction} $r^{(i)} \in \{0,..,d-1\}$ of the influencer. Another parameter characterizing influencer $i$ is its \textit{consistency} $c^{(i)}(n)$, which indicates the probability that such an influencer publishes a post on its reference direction (it might change over time). Note that individuals with high consistency prefer to post in their reference topic. Moreover, we denote by $f^{(i)}$ the probability that a post is generated by influencer $i$ at any time instant $n$, with $\sum_{i \in \mathcal{I}} f^{(i)} = 1$. At last, we introduce the \textit{popularity} vector $\bm{p}(n) := \{p_i(n)\}_{i \in \mathcal{I}}$, containing the current popularity of all influencers at time $n$, before the emission of the post at time $n$. We also introduce the normalized version of this vector $\bm{\pi}(n)= \{{\pi_i}(n)\}_{i \in \mathcal{I}}$ where the components are the normalized probabilities $\pi_i = \frac{p_i}{\sum_{j \in \mathcal{I}} p_j}$. \begin{comment} At last, $p^{(i)}(n) \in \mathbb{R}_+$ denotes the \textit{popularity} of influencer $i$ on the social network at time $t_n^-$, i.e., right before the creation of post $n$. We also introduce the normalized popularity $\tilde{p}^{(i)} = \frac{p^{(i)}}{\sum_{j \in \mathcal{I}} p^{(j)}}$. \end{comment} \begin{comment} All these parameters can in principle change over time, reflecting behavioral changes of the influencers or, more broadly, strategies adopted to maximize the influence over the population. \mg{anticiperei la notazione di P realizzazione di una Bernoulli} \end{comment} Dynamic variables of users (i.e., their opinion $\bm{x}^{(u)}$) and influencers (i.e., their popularity ${p_i}$) are updated upon every post generation according to Algorithm \ref{alg:model}. It provides a detailed description of the dynamics captured by our model. The model's key features are further illustrated schematically in Figure \ref{fig:scheme_model}: an influencer posts a message, the social media platform filters it according to $\omega$, and users provide feedback via $\theta$. These two features represent, respectively, an algorithmic effect (function $\omega$): \textit{selective exposure}, namely the tendency of a platform to suggest similar content to maximize time spent on the social platform, and an individual effect (function $\theta$): \textit{confirmation bias}, namely the tendency to value content that is close to one's point of view, as discussed in \cite{quattrociocchi_echo_chamber} and the resources therein. These tendencies can explain the appearance of echo chambers in social networks. More specifically, in an elementary step of the dynamics, a post is generated by one of the influencers, selected according to the distribution $f^{(i)}$. The influencer $i$ posts on its reference direction $r^{(i)}=j$ with a probability equal to its consistency $c^{(i)}$. Otherwise, it posts on one of the other directions in the opinion space $j \in \{0,1,...,d-1 \} \setminus \{r^{(i)}\}= \mathcal{N}_r$ according to a given distribution, $Pr[j=k]$ for $k$ in $\mathcal{N}_r$. In the rest of the paper, we assume for simplicity that this distribution is uniform over the set of non-reference directions. We suppose that each post contains exactly the influencer's opinion on the topic (and that no noise in the user's perception of the post is present). Then, note that the post contains a real-valued opinion that is the $j$-th component of the influencer's opinion vector $\bm{x}^{(i)}$. In principle, this generated post can reach any user: no explicit network structure is considered for the population\footnote{A complete bipartite graph, where $\mathcal{I}$ and $\mathcal{U}$ are the two sets of nodes and each link has a weight $\omega$ computed at each iteration of the dynamics, might represent the underlying network structure.}. Following the intuition that individuals with strongly divergent opinions are less likely to interact and therefore, as \textit{homophily} suggests, like-minded individuals are more likely to interact, the subset of reachable users (i.e., users to whom the platform sends the post) is determined by considering the opinion distance in the reference direction between each user and the posting influencer. Adopting such distance as the central metric influencing the reachable group of users is of utmost importance as it couples the dynamics in different directions, which would otherwise evolve independently of each other. This posts-users matching process constitutes the content \textit{personalization} we consider in this paper. Note that the social media platform suggests posts that might interest a user in addition to those that a user explicitly subscribes to (i.e., follows). \vspace{0.4cm} \noindent\makebox[\textwidth][c]{ \begin{minipage}{.7\linewidth} \begin{algorithm}[H] \caption Description of the Communication Asymmetry model}\label{alg:model} \begin{spacing}{1.0} \algsetup{indent=1.2em} \begin{algorithmic}[1] \REQUIRE \,\,\,\,\,$N_i$ influencers, $N_u$ users, filtering function $\omega$, feedback function $\theta$ \ENSURE opinion of each regular user $\bm{x}^{(u)}(n),\,\forall u$ \ENSURE popularity of each influencer $p_i(n),\,\forall i$ \LOOP \STATE select influencer $i$ according to $f^{(i)}$ \STATE select a posting direction $j$, i.e., $j=r^{(i)}$ with probability $c^{(i)}$, otherwise $j$ is selected uniformly on $j\in\{0,..,d-1\}\setminus\{r^{(i)}\}$ \STATE {$p_i(n+1) = p_i(n)$} \FORALL {regular user $u$ in the population} \STATE{$x^{(u)}_j(n+1) = x^{(u)}_j(n)$} \IF[post proposition]{$\Omega\left(\omega(|x^{(i)}_{r^i} - x^{(u)}_{r^i}|, \pi_i(n))\right) = 1$} \STATE get feedback $\Theta\left(\theta(|x^{(u)}_j-x^{(i)}_j|)\right)$ \IF[positive feedback]{$\Theta = 1$} \STATE{$x^{(u)}_j(n+1) = \alpha z^{(u)}_j + \beta x^{(u)}_j(n) + (1 - \alpha - \beta) x^{(i)}_j$} \STATE update popularity of $i$: $p_i(n+1) \mathrel{{+}{=}} 1/N_u$ \ENDIF \ENDIF \ENDFOR \ENDLOOP \end{algorithmic} \end{spacing} \end{algorithm} \end{minipage} } \vspace{0.8cm} To decide whether a given user is reached by a post (independently from other users), we extract a Bernoulli random variable $\Omega$ with parameter $\omega$. The user receives the message when $\Omega(\omega)=1$. The parameter $\omega$ can be interpreted as a \textit{visibility} function from the influencer's perspective, as it affects the subset of users reached by its posts. As already mentioned, $\omega$ should be a function of the opinion distance in the reference direction $d_r(n) = |x_r^{(u)}(n) - x_r^{(i)}(n)|$ and the popularity ratio $\pi_i$ of the posting influencer, so that the higher the popularity ratio, the more users an influencer can reach on average. Users express their \textit{feedback} to a post on the platform through a Bernoulli random variable $\Theta \left(\theta(|x_j^{(u)} - x_j^{(i)}|)\right) \in\{0,1\}$ whose parameter $\theta$ depends on the difference in opinion on the \textit{actual} direction $j$ of the contribution. Only posts that receive positive feedback, i.e., $\Theta = 1$, can influence the user's opinion, reflecting the tendency to ignore unappreciated content. The social media platform collects feedback from all reached users to update the popularity $p_i$ of the posting influencer. Specifically, the update rule for the popularity of the posting influencer $i$ reads as follows: \begin{equation} p_i(n+1)= p_i(n) + \frac{\Theta_T (\theta, \mathcal{U}^{post})}{N_u} \end{equation} \label{eq:d_model_p_update} \begin{equation} \Theta_T (\theta, \mathcal{U}^{post}) = \sum_{u\in \mathcal{U}^{post}} \Theta\left(\theta(|x_j^{(u)}(n) - x_j^{(i)}(n)|)\right) \end{equation} where $\mathcal{U}^{post}$ is the subset of users who were made aware of the post by the platform, i.e., those for whom $\Omega(\omega)$ takes the value one. The summation in the formula gives the aggregate feedback of all users who saw the post, which is normalized by the size of the population of regular users $|\mathcal{U}| = N_u$ to update the popularity. Note that this normalization is introduced only to avoid excessive growth of influencers' popularity when the number of users becomes large. It does not affect the system dynamics, as these depend only on the normalized popularity values $\pi_i$, which are not affected by the scaling factor $1/N_u$. \begin{figure*}[h] \centering \includegraphics[width=0.85\textwidth]{model_description.drawio.pdf} \caption{Schematic representation of the model dynamics. The figure highlights the proportions of users who view a particular post $\mathcal{U}^{post}$, i.e. those for which the random variable $\Omega$ takes the value $1$. They react with their feedback $\Theta$ (e.g., \textit{likes}), which depends on the opinion distance between them and the influencer $i$. Then the platform updates influencer's $i$ popularity.} \label{fig:scheme_model} \end{figure*} \begin{comment} Note that the normalized popularity $\tilde{p}^{(i)}$ is meaningful as long as $\tilde{p}^{(i)} > 0$, when $\tilde{p}^{(i)} = 0$ or $p^{(i)} \rightarrow 0$ {\color{blue} influencer $i$ can be considered removed from the population}. Indeed, assuming that $\tilde{p}^{(i)} \rightarrow0 \implies \rho\rightarrow0$, the influencer $i$, even if posting, would not reach any user, being shadowed by the platform. \fg{nelle proof di Emilio $k_i( \widetilde p_i)>0$ anche quando $\tilde{p}^{(i)} = 0$ altrimenti esisterebbero degli "stati assorbenti" e credo il claim non sarebbe più valido, forse scrivere diversamente questa cose di togliere un influencer} \end{comment} \begin{comment} However, Equation \ref{eq:d_model_p_update} can lead to negative popularities. In this particular situation, it is sensible to saturate the popularity to the limit value of zero and remove the influencer from the population. \end{comment} The core of the dynamic is represented by the opinion update rule, which dictates how the user's opinion changes on the direction $j$ of the post depending on the previous opinion $\bm{x}^{(u)}(n)$, the prejudice $\bm{z}^{(u)}$ and the opinion $\bm{x}^{(i)}$ conveyed by the influencer through the post. The following system of equations characterizes the updating rule: \begin{equation}\label{eq:d_model_user_update} x_j^{(u)}(n+1) = \begin{cases} \alpha z_j^{(u)} + \beta x_j^{(u)}(n) + \gamma x_j^{(i)} \;\;\; \text{if} \; \Omega \left( \omega(d_r,\pi_i) \right) = 1\,, \Theta \left(\theta(d_j)\right) = 1 \\[5pt] x_j^{(u)}(n) \quad\quad\quad\quad\quad\quad\quad\quad\;\, \text{otherwise} \end{cases} \end{equation} where $\gamma = (1-\alpha - \beta)$, being the updating rule a convex combination of $\bm{x}^{(u)}(n)$, $\bm{z}^{(u)}$ and $\bm{x}^{(i)}$. Whenever the Bernoulli random variable $\Omega(\omega) \in \{0,1\}$ assumes the value 0, the post does not reach the user who keeps its opinion. The individual's opinion is also not affected by the post when the user receives it but does not appreciate it, i.e., the feedback variable $\Theta = 0$. The actual opinion update is a convex (linear) combination of the user's prejudice $z^{(u)}_j$, the current user's opinion $x^{(u)}_j(n)$ and the belief delivered by the influencer's post $x^{(i)}_j$. \begin{Remark} The distance on the reference direction drives the filtering because we assume the platform is unaware of the specific topic associated with the post just created. Note the joint effect in the model of the distance between the user's opinion and the influencer's opinion on the reference direction and the distance along the direction defined by the post's topic. Both contribute to determining the likelihood for the user to provide positive feedback to the message. \end{Remark} \begin{Remark} In most OSNs, there are explicit subscriptions to influencers (i.e., the \textit{follow} mechanism). Our approach does not consider this type of relationship, as we only account for homophilic contacts. Since the number of influencers is considerable in practice, homophily is not the only mechanism driving interaction. A regular user does not follow all its homophilic influencers. However, nowadays, most social media platforms (e.g., Facebook, Instagram, Twitter) not only offer their users content they explicitly subscribe to but also content that users \textit{might like} based on their activity on the platform. This resembles the mechanism we are considering in our model. \end{Remark} \begin{Remark} In our framework, regular users are passive, as they merely consume content produced by influencers: this constitutes a rather simplistic assumption. First, users can \textit{share} the posts they receive, which increases their reach. Secondly, users themselves write posts that reflect their opinion, influencing other users. The impact of \textit{active} users is beyond the scope of this article and will be considered in future work. \end{Remark} \begin{comment} \subsection{Model Formulation in terms of Random Variables} \label{sec:new_model} Considering that $P$ and $\Theta$ are Bernoulli random variables, the model can be written more concisely. In the following, the dependency of $\rho$ and $\theta$ on $|x^{(u)}-x^{(i)}|$ and $\tilde{p_i}$ is made implicit as well as that of $P$ and $\Theta$ on $\rho,\theta$ themselves: \begin{equation*} \label{eq:new_model} x^{(u)}_j(t+1) = (1-P) x^{(u)}_j(t) + P(1-\Theta) x^{(u)}_j(t) + \\ P\Theta \left(\alpha z^{(u)}_j + \beta x^{(u)}_j(t) + \gamma x^{(i)}_j(t)\right) \end{equation*} The first term corresponds to the case where the user does not receive the influencer's post, i.e. no change of opinion takes place. The second term corresponds to the case where the user does not appreciate the post and maintains their previous opinion. The last term corresponds to the case of an actual opinion update. By some simple manipulations of the equation \ref{eq:new_model}, the update rule for the opinion of a generic user $x^{(u)}$ becomes, whenever the influencer $i$ posts: \begin{equation}\label{eq:new_updating} x^{(u)}(t+1) = x^{(u)}(t) + P(\rho)\Theta (\theta) [\alpha z^{(u)} + (\beta-1) x^{(u)}(t) + \gamma x^{(i)}] \end{equation} Considering that the total feedback $\Theta_T$ in this setting corresponds to: \begin{equation}\label{eq:new_feedback} \Theta_T(t) = \frac{\sum_{u \in \mathcal{U}^{post}} \Theta(\theta) P(\rho)}{N_u} \end{equation} The popularity $p^{(i)}$ of each influencer $i$ can be characterized: \begin{equation} \label{eq:new_pop} p^{(i)}(t+1) = p^{(i)}(t) + \mathds{1}_{\{\text{msg}_p = \text{msg}_i\}} \Theta_T(t) \end{equation} where $\text{msg}_p$ denotes the message published in discrete time $t$ and $msg_i$ denotes the message published by influencer $i$, $\mathds{1}_{\{f(\cdot)\}}$ is the indicator function and denotes whether the current post on the platform belongs to influencer $i$. \end{comment} \section{Observations from Online Social Networks} \label{sec:OSNobservations} This section presents data from real-world social networks to motivate some of our modeling choices. For a detailed description of the dataset used, see \ref{app:dataset}. One of the most important features introduced in this paper is the concept of \textit{reference direction}, i.e., the main topic an influencer is interested in and on which they publish most of their posts. While this is a reasonable assumption, this claim needs to be supported by evidence from real social networks. Moreover, we examine the post-generation process to justify the choice of a Poisson Point Process to describe it. \begin{figure}[h!] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[height=6cm]{milan_zaia.pdf \caption{} \label{fig:milan_zaia_hist} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[height=6cm]{milan_zaia_acf.pdf \caption{} \label{fig:music_acf} \end{subfigure} \caption{(\ref{fig:milan_zaia_hist}) Percentage of labeled posts on each of the considered topics for Luca Zaia, an Italian politician, and AC Milan, an Italian football club. (\ref{fig:music_acf}) Autocorrelation function on a \textit{secondary} topic, i.e., music, for both influencers.} \label{fig:milan_zaia} \end{figure} \subsection{The reference direction}\label{sec:OSN_reference} This section shows that influencers prefer to post about a specific topic rather than discuss multiple ones. We have developed a post classifier that flags posts based on their topic. We should point out that classifying posts on OSNs into topics is not straightforward, and interpreting the results should be done with caution. First, the range of possible subjects discussed in a social network is practically countless. For practical reasons, we will only focus on a subset of five topics: Sports, Politics, Food and Cooking, Music, and Pandemics. These can be considered popular and general enough to cover a substantial fraction of the influencer discussions on OSN. We took a subset of the influencers in the dataset, namely those with the highest number of classified posts (see \ref{app:classifier} for details on the classification and filtering process on the data). Note that even if the selected topics can be assumed uncorrelated, they are sometimes discussed jointly in one post. In such cases, it is not always clear which is the main topic of the post. After classification, we examined the distribution of posts on the topics for each influencer. In Figure~\ref{fig:milan_zaia_hist}, we show two example influencers. In these two cases, the influencers have one topic on which they write most of their posts. Luca Zaia, an Italian politician, posts mainly about politics, and AC Milan, a soccer club, discusses sports predominantly. This behavior supports the existence of a reference direction for influencers. Figure \ref{fig:cons_distrib} shows the distribution of the proportion of posts dealing with the main topic of each influencer. Recall that this proportion was called \textit{consistency} in the jargon of our model. Most influencers have a clear \textit{reference topic} on which they write more than half of their posts. Figure \ref{fig:topic_percentages} shows the average per-topic percentage of all influencers in the dataset in descending order, regardless of the specific topic. On average, almost ninety percent of the posts are in the reference direction. We discovered that influencers with low consistency values are affected by the presence of news outlets in the considered profiles, for which the lack of a sharp main topic is sensible. \begin{figure}[h] \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{consistency_distrib.pdf} \caption{} \label{fig:cons_distrib} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.9\linewidth]{percentage_topics_ci95_v2.pdf} \caption{} \label{fig:topic_percentages} \end{subfigure} \caption{(\ref{fig:cons_distrib}) Distribution of the fraction of posts published on the main topic of interest by the subset of influencers considered in this experiment, i.e., their consistency. (\ref{fig:topic_percentages}) The average percentage of labeled posts on each topic in decreasing order for all the influencers considered. The 95\% confidence interval for each average value is reported in the figure.} \end{figure} \begin{comment} \begin{figure} \centering \includegraphics[width=.9\linewidth]{/vect/log_percentage_topics_ci95.pdf} \caption{(Same as above but in y-logarithmic scale.)} \label{fig:log_topic_percentages} \end{figure} \end{comment} \subsection{Independence of posts' generation process on secondary directions} The way users interact in an OSN is by posting content (i.e., text, images, videos) and receiving suggestions about what other users of the OSN posted, according to the filtering process set up by the social media platform. Since influencers' posts have a much greater reach than those of regular users, they are the focus of our study. Namely, we examine the correlation between posts on each topic by looking at the chronological sequence of the messages of the individual influencers. Our primary focus now is on \textit{ secondary} topics, i.e., the topics that are not the \textit{reference} for the influencer, as they post less frequently in these topics, and one might expect to observe a bursty posting behavior, not well captured by the Poisson process. In the previous section, we were able to assign a \textit{reference direction} $r^{(i)}$ to each influencer. Here we look at the time series of the Influencers' labeled posts. For each secondary direction $s_j^{(i)}$, we define an indicator function $\mathds{1}_{\{post_{label}=s_j^{(i)}\}}$ that takes the value $1$ if the post was labelled as $s_j^{(i)}$ and $0$ otherwise. For each influencer, we thus obtain four sequences (recall that we consider five topics in total) of Bernoulli random variables indicating whether a post belongs to that particular direction. For these sequences, we calculated the autocorrelation function $a(t)$. Figure \ref{fig:music_acf} shows two examples of such autocorrelation functions, limited to 40-time lags, for the profiles of Luca Zaia and AC Milan. The time is discretized, i.e., the actual time between postings is not taken into account: only the posting events matter. An autocorrelation that equals zero everywhere except at $\tau=0$ would represent uncorrelated samples. In our case, the autocorrelation takes moderate values in most cases ($ \ll 1$). Therefore, it is reasonable to assume that the post-generation is independent, and a Poisson Point Process is an appropriate choice. Lastly, note that the autocorrelation function for the \textit{pandemic} topic takes larger values than for the other topics (see Figure \ref{fig:avg_acf}), suggesting that the samples are weakly correlated. This fact is due to the exceptional public interest in the topic and because the outbreak of the epidemic only interested the last part of the considered time horizon. \begin{figure*}[h!] \centering \includegraphics[width=\linewidth]{all_acf_ci.pdf} \caption{Mean autocorrelation values of the post-generation process for each secondary topic of all the influencers. The last plot represents the average value over all topics. The 95\% confidence interval is shown in each plot.} \label{fig:avg_acf} \end{figure*} \section{Asymptotic Analysis of the Model} \label{sec:analysis} \begin{comment} \textcolor{blue}{ This part of the paper is devoted to the presentation of the results obtained by the simulation of the dynamical model. Then, the implications arising from the observed behaviors are discussed. The final section then attempts to validate the emerging behaviors of the model with real social network data. The model has many degrees of freedom, both in terms of the parameters that characterize the influencers and the forms that describe the visibility and feedback functions. We have therefore carefully defined some scenarios for which it is easier to provide a physical interpretation. } \end{comment} This section is devoted to the analytical study of the model. In particular, results are obtained using a mean-field approach, considering $N_u \rightarrow\infty$. In this situation, the equilibrium value for the influencers' mean-popularity ratios $\bar{\pi}_i$ and users' mean opinion value $\bar{x}(z)$ (which depend on prejudice $z$) can be analytically determined. Furthermore, transient analysis of the system can be carried out by describing the dynamics of the users through a Fokker-Plank equation. For simplicity, we restrict our investigation to the situation where the opinion space is one-dimensional. However, we remark that it is possible to extend the analysis to the more general case by following the same approach. \subsection{Mean field approach} When the number of users grows large, it is convenient to characterize the system state by the users' opinion {\em distribution} over the space. Moreover, hereinafter we will refer to system dynamics over continuous time $t$. Let $(X(t), Z(t))=(X(t), Z)$ be the current position (opinion) and prejudice of a randomly selected user. We introduce the cumulative distribution function $F(x,z,t) = Pr[X(t)<x,Z<z]$. The corresponding probability density function is $f(x,z,t)=\frac{\partial^2}{\partial x \partial z} F(x,z,t)$. Note that, by hypothesis, there are no dynamics along the $z$-axes, thus $h(z) = \int_x f(x,z,t) \mathrm{d} x$ does not depend on $t$ and corresponds to the initial distribution of users' prejudice. In Section \ref{subsec:FP}, we will derive a Fokker-Plank equation for the evolution of the opinion distribution over time and space. For what concerns the evolution of the popularity of a generic influencer $i$, recall that we distinguish between its absolute popularity value $p_i(t)$ and the normalized value $\pi_i = \frac{p_i(t)}{\sum_j p_j(t) }$. We can already write down the equation for the evolution of the mean popularity $\bar{p}_i(t)$ (we remark that influencer's popularities concentrate around their average as $N_u$ grows large, as it can be easily shown): \begin{equation}\label{eqpop} \frac{\mathrm{d} \bar{p}_i(t)}{\mathrm{d} t }= \frac{1}{N_u} \lambda f^{(i)} \int_x \int_z f(x,z,t)\,\theta\left(|x-x^{(i)}|\right) \omega\left(\bar{\pi}_i, |x-x^{(i)}|\right) \mathrm{d}z \, \mathrm{d}x \end{equation} Indeed, the rate at which the popularity of influencer $i$ grows is proportional to its posting rate (term $\lambda f^{(i)}$) times the probability that a generic user at $(x,z)$ provides positive feedback to the post generated at time~$t$ (integral term). Moreover, recall from Algorithm \ref{alg:model} that each positive feedback increases the absolute popularity of the influencer by $1/N_u$. \begin{comment} $$ p^{(i)}(n+1)= p^{(i)}(n) + \frac{\sum_{u\in \mathcal{U}^{post}} \Theta(\theta(|x^{(u)} - x^{(i)}|))}{N_u} $$ whenever a post is published and delivered to users, while it stays constant otherwise. \end{comment} \subsection{Fokker-Planck equation for the opinion distribution}\label{subsec:FP} In this section, we derive a mean-field Fokker-Planck (FP) equation for the population's opinion distribution, assuming that the number of users grows large. To be specific, in the continuous-time FP approximation, we assume that for the effect of a post, \lq\lq users/particles" reach their new position by moving at a constant speed during the interval $\Delta T$ equal to the average time $1/\lambda$ that elapses between the generation of two successive posts. Therefore, assuming that at time $t$ a post is generated by user $i$, the following equation describes how the opinion of a user with prejudice $z$ evolves from $t$ to $t + \Delta T$: $$ x(t+\Delta T )=\alpha z + \beta x(t) + \gamma x^{(i)}(t)$$ Thus, the increment is: \begin{equation} \Delta x(i) = x(t+\Delta T )-x(t) = \alpha (z-x^{(i)}(t)) + (1-\beta) (x^{(i)}(t)-x(t)) \end{equation} where we remark that $\Delta x(i)$ here represents the change in position of a user in position $x$, providing positive feedback to a post of influencer $i$. We can then compute its average velocity as: \begin{equation}\label{vel-FP} \begin{aligned} \mathbb{E}[ v_x(x,z,t)\mid X(t)=x, Z=z ] &= \mathbb{E}\left[\frac{[X(t+\Delta T) -X(t)\mid X(t)=x, Z=z ]}{\Delta T}\right] \\ & = \sum_i \lambda f^{(i)} \Delta T\,\, \theta\left(|x-x^{(i)}|\right) \omega \left(\bar{\pi}_i(t), |x-x^{(i)}|\right) \frac{\Delta x(i) }{\Delta T} \\ & = \sum_i \lambda f^{(i)} \theta\left(|x-x^{(i)}|\right) \omega \left(\bar{\pi}_i(t), |x-x^{(i)}|\right) \Delta x(i) \end{aligned} \end{equation} where $\theta\left(|x-x^{(i)}|\right)$ is the probability of providing positive feedback (users move only in this case), while $\omega\left(\bar{\pi}_i(t), |x-x^{(i)}|\right)$ is the probability with which a user in $x$ is exposed to a post created by influencer $i$ at time $t$. Indeed, users only move if they are exposed to the post and provide positive feedback. Note that, to avoid a cumbersome notation, we have omitted the dependency on the time of the distance term $|x-x^{(i)}|$. The variance of the velocity is given by the relation: \begin{equation*} \begin{aligned} \sigma_x^2(x,z,t) &= \sum_i \ \lambda f^{(i)} \Delta T \theta\left(|x-x^{(i)}|\right) \omega \left(\bar{\pi}_i (t), |x-x^{(i)}|\right) \frac{(\Delta x(i)- \mathbb{E}[ v_x(x,z,t)]\Delta T )^2}{(\Delta T)^2 } \nonumber\\ &=\frac{1}{(\Delta T)^2} \sum_i f^{(i)}{ \theta\left(|x-x^{(i)}|\right) \omega \left(\bar{\pi}_i (t), |x-x^{(i)}|\right) (\Delta x(i)- \mathbb{E}[ v_x(x,z,t)]\Delta T ) ^2} \end{aligned} \end{equation*} This allows us to write down a Fokker-Plank equation \cite{risken1996fokker} for the probability density function $f(x,z,t)$ where $x,z\in [a,b]$: \begin{equation}\label{FP} \frac{\partial f(x,z,t)}{\partial t} = - \frac{\partial v_x (x,z,t) f(x,z,t)}{\partial x} + \frac{1}{2} \frac{\partial^2 \sigma_x^2(x,z,t) f(x,z,t)}{\partial x^2} \end{equation} \subsection{Steady state analysis} \label{subsec:steady} Now we direct our attention to the existence of stationary solutions for the system. Stationary solutions of \eqref{FP} necessarily satisfy: \[ \frac{\partial }{\partial x} \left(-v_x (x,z) f(x,z)+ \frac{1}{2} \frac{\partial \sigma^2_x(x,z) f(x,z)}{\partial x}\right)=0 \] where $v_x (x,z) $ and $\sigma^2_x(x,z)$ must be constant over time. This requires normalized popularities to be static (i,e. $\omega(\cdot)$ to be constant over time). From previous equation, integrating both sides with respect to $x$, we get: \begin{equation}\label{fokker-stat} \left(-v_x (x,z) f(x,z)+ \frac{1}{2} \frac{\partial \sigma^2_x(x,z) f(x,z)}{\partial x}\right)=c_0(z) \end{equation} where $c_0(z)$ is a uni-dimensional arbitrary in $z$. Now, observe that, for every $z$, previous equation is a first order linear ODE in $x$, and therefore an explicitly solution for $f(x,z)$ can be obtained: \begin{equation}\label{solution-FP} f(x,z)= \Big(c_1(z) \exp( A(x,z)-A(a,z))+ c_0(z)\exp(-A(x,z))\int_a^x \exp (A(\theta,z)) \mathrm{d} \theta\Big) h(z) \end{equation} where \[ A(x,z)= \int_a^x \eta(u,z) \mathrm{d} u \qquad \eta(x,z) = - 2 \frac{v_x(x,z) - \frac{1}{2}\frac{\partial \sigma^2_x(x,z)}{\partial x} } {\sigma^2_x(x,z)}. \] Function $c_0(z)$ can be obtained by imposing boundary conditions: \[\left( -v_x(x,z)f(x,z)+ \frac{1}{2} \frac{\partial}{\partial x}\sigma^2_x(x,z)f(x,z)\right) \Bigl\vert_{x=a,b}=0. \qquad \forall z \] which leads to $c_0(z)=0$, while function $c_1(z)$ is determined by imposing the normalization condition: \[ \int f(x,z)\mathrm{d}x=h(z). \] Observe that when $\sigma_x^2(x,z)\to 0$ and $\frac{\partial\sigma_x^2(x,z)}{\partial x}\to 0$, from \eqref{fokker-stat}, with $x_0(z)=0$, we obtain that necessarily the mass concentrates around points for which $v_x(x,z)=0$. Such points, improperly referred to in the following as {\it equilibrium points}, will be characterized analytically later on. Turning our attention to popularity dynamics, recall that stationary conditions necessarily imply normalized popularities to be constant over time: \[ \bar{\pi}_i(t)=\bar{\pi}_i \qquad \forall i \] On the other hand, absolute popularities naturally grow over time, but the ratio between any two of them (say $i,j$) must converge to a constant value $c_{ij}$ equal to the ratio of their corresponding normalized popularities: \begin{equation}\label{stat-cond} \frac{\bar{p}_i(t)}{ \bar{p}_j(t)}=c_{ij} = \frac{\bar{\pi}_i}{\bar{\pi}_j} \qquad \forall i,j\in \mathcal{I}, i\neq j \end{equation} Now observe that in stationary conditions the r.h.s. of \eqref{eqpop} does not depend on time, therefore \eqref{eqpop} admits the following trivial solution: \begin{equation}\label{eq:pit} \bar{p}_i(t) = \left(\lambda f^{(i)} \int_x \int_z \theta(|x-x^{(i)}|) \omega (\bar{\pi}_i, |x-x^{(i)}|)\mathrm{d}F(x,z) \right) \frac{t}{N_u} + \bar{p}_i(0) \end{equation} Therefore, we meet conditions \eqref{stat-cond} for any $t\ge 0$, iff normalized popularities of influencers $\{ \bar{\pi}_i \}_i$ satisfy the following system of equations: \begin{align}\label{pop-constraint} &\lambda f^{(i)} \int_x\int_z \theta(|x-x^{(i)}|) \omega (\bar{\pi}_i , |x-x^{(i)}|)\mathrm{d}F(x,z) = c \bar{\pi}_i \qquad \forall i, \text{ for some } c\in \mathbb{R}^+\nonumber \\ & \qquad \text{ s.t. } \bar{\pi}_i\ge 0 \text { and } \sum_i \bar{\pi}_i=1. \end{align} and the initial condition $\{p_i(0)\}_i$ satisfies \eqref{stat-cond} (i.e. $p_i(0) = k \bar{\pi}_i $ for some $k>0$). Let \begin{equation}\label{eqpi} k_i( \bar{\pi}_i):=\lambda f^{(i)} \int_x\int_z \theta(|x-x^{(i)}|) \omega (\bar{\pi}_i, |x-x^{(i)}|) \mathrm{d}F(x,z) \quad \bar{\pi}_i \in [0,1] \end{equation} We can show that: \begin{Theorem} \label{theo1} Solutions of \eqref{pop-constraint} always exist whenever $k_i(\cdot)\in C_1[0,1]$, $k_i(\cdot)$ is increasing, continuous and strictly concave. \end{Theorem} The proof is reported in \ref{app:proofs}. \vspace*{0.2cm} We remark that when $k_i(0)> 0$ $\forall i$, the solution is always unique with $\bar{\pi}_i\in (0,1)$. Instead when $k_i(0)= 0$ for some $i$, the solution is not guaranteed to be unique. Now, the problem is how to jointly solve for stationary solutions of $\{\bar{\pi}_i\}_i$ and $F(x,z)$. In a schematic way, on the one hand, we have shown that given $\bar{\bm\pi} = \{\bar{\pi}_i\}_i$, and $h(z)$, we can uniquely determine a $F_{\bar{\bm\pi}}(x,z)=\mathcal{H}(\bar{\bm\pi})$, where $F_{\bar{\bm\pi}}(x,z)=\int_{-\infty}^x \int_{-\infty}^z f_{\bar{\bm\pi}}(y,w) \,\mathrm{d} y\, \mathrm{d} w$ is the opinion distribution of users resulting from fixed influencers' popularities $\bar{\bm\pi}$ (by (\ref{solution-FP})). On the other hand, under the conditions: $k_i(\cdot)\in C_1[0,1]$, $k_i(\cdot)$ is increasing and strictly concave, $k_i(0)>0$ $\forall i$, given $F(x,z)$, we can obtain a ${\bar{\bm\pi}}_{F}=\mathcal{G}(F(x,z))$ that {uniquely} corresponds to i (Theorem \ref{theo1}). The existence of a unique fixed point for the joint system of (stationary) users' opinions and influencers' popularities is guaranteed under the condition that the operator $\mathcal{H}\circ\mathcal{G}(\cdot)$ is a contraction over a complete space. \begin{Theorem} \label{theo2} Under the assumption that both $\omega(\cdot, \cdot)$ and $\theta(\cdot)$ exhibit a sufficiently weak dependence on their variables, the operator $\mathcal{H}\circ\mathcal{G}(\cdot)$ is a contraction over a complete space, and therefore a unique stationary solution exists. \end{Theorem} The proof is reported in \ref{app:proofs}. \subsection{Asymptotic analysis of the fluid limit} \label{sec:stoch_comp} Previous theoretical analysis is, unfortunately, non-constructive, meaning that it does not allow for direct computation of stationary solutions of our dynamical system. To complement the previous analysis, in this section we propose a methodology to compute numerically stationary solutions, even in multi-dimensional scenarios, under the assumption that $N_u\to \infty$, $\beta\to 1$, $\sigma_x^2(x,z)\to 0$ and $\frac{\partial\sigma_x^2(x,z)}{\partial x}\to 0$. In the following, we will refer to the such regime as {\it fluid limit.} \subsubsection{Mean opinion assuming that normalized popularities converge} As already observed in Section \ref{subsec:steady}, recall that, given $\bar{\bm\pi}=\{ \bar{\pi}_i \}_i$, the distribution of users with a given prejudice $z$ concentrates around {\it equilibrium points}, i.e., points $\bar{x}(z) $ at which $v(x,z)$, as given in \eqref{vel-FP}, is null (i.e. $v(\bar{x}(z),z)=0$). Therefore, points $\bar{x}(z) $ must satisfy equation: \begin{equation}\label{eq-FPequi} 0= \sum_i f^{(i)} \omega \left(\bar{\pi}_i, |\bar{x} - x^{(i)}|\right) \theta\left(|\bar{x}-x^{(i)}|\right) \left( \alpha (z-x^{(i)}) + (1-\beta) (x^{(i)}-\bar{x})\right) \end{equation} Defining for compactness $d^{i,\bar{x}} = \left|\bar{x} - x^{(i)}\right|$ and recalling $\gamma = 1-\alpha-\beta$, from (\ref{eq-FPequi}) we get: \begin{equation} \label{eq:stoch_e} \bar{x}(z) = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \frac{\sum_{i \in \mathcal{I}} f^{(i)} \omega\left(\bar{\pi}_i, d^{i,\bar{x}} \right) \theta\left( d^{i,\bar{x}} \right) x^{(i)}}{\sum_{i \in \mathcal{I}} f^{(i)} \omega\left(\bar{\pi}_i, d^{i,\bar{x}} \right) \theta\left( d^{i,\bar{x}} \right)} \end{equation} The assumption $\beta \rightarrow 1$ is required to avoid too large oscillations of users' opinions in response to a single post generated by an influencer, which may reduce the accuracy of our mean-field approximation. This hypothesis is not restrictive: since $\beta$ represents the weight individuals give to their current opinion, we can reasonably assume that users do not dramatically change their opinion in response to single post events. \subsubsection{Normalized popularities assuming opinion convergence} Here we assume that users with prejudice $z$ are concentrated in opinion point $\bar{x}(z)$, and we look for the stationary popularity ratios $\bar{\pi}_i$. To simplify the expressions, we introduce the quantity $F_i(\bar{\pi}_i) \triangleq \int_z f^{(i)}\omega(\bar{\pi}_i, d^{i,\bar{x}(z)}) \theta(d^{i,\bar{x}(z)}) h(z) \mathrm{d} z$. {Observe that solutions of \eqref{pop-constraint} are necessarily in the form: \begin{equation} \label{eq:tilda_p} \bar{\pi}_i = \frac{F_i(\bar{\pi}_i)}{\sum_{j \in \mathcal{I}} F_j(\bar{\pi}_j)} \end{equation} where $c$ appearing in \eqref{pop-constraint} is given by $c= \frac{1}{\sum_{j \in \mathcal{I}} F_j(\bar{\pi}_j )}$. Under the assumption that $\omega(\cdot ,\cdot)$ is concave in its first argument (for any choice of the second), Theorem \ref{theo1}, guarantees the existence of such solutions for every choice of function $\bar{x}(z)$. Moreover, even in the more general case, i.e., when $\omega(\cdot ,\cdot)$ is non-concave in its first argument, solutions of \eqref{eq:tilda_p} can be found numerically in many cases, through a fixed point iteration method.} To conclude, observe that a pair $(\bar{x}(z), \{\bar{\pi}_i \}_i)$ represents a stationary solution if it jointly satisfies \eqref{eq:stoch_e} and \eqref{eq:tilda_p}. The existence of such solution can be, again, only verified {\it numerically} through a fixed point approach. At last, note that, in the special case in which all users have the same prejudice $z$ we can rewrite (\ref{eq:stoch_e}) as: \begin{equation}\label{eq:o_bar_comp} \bar{x} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \frac{\sum_{i \in \mathcal{I}} F_i(\bar{\pi}_i, \bar{x}) x^{(i)}}{\sum_{i \in \mathcal{I}} F_i(\bar{\pi}_i, \bar{x})} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \sum_{i \in \mathcal{I}} \bar{\pi}_i x^{(i)} \end{equation} which provides a direct formula for the mean opinion $\bar{x}$ in terms of the normalized popularities $\bar{\pi}_i$ and the influencers' opinions $x^{(i)}$. \section{Model predictions}\label{sec:model_vs_param} In this section, we present a selection of results obtained while varying the model parameters, providing valuable insights into the impact of algorithmic personalization. Results are obtained through a Monte Carlo approach. We focus on the two main dynamic variables of the system: the average opinion $\bar{\bm{x}}$ of regular users and the normalized popularities $\{ \bar{\pi}_i \}_i$ for influencers. Note that the quantities shown in this section, i.e., the pair $(\bar{\bm{x}}, \bar{\bm \pi})$, are obtained as empirical averages over multiple runs, and over all the regular users, as far as $\bar{\bm{x}}$ is concerned. Hence, they are different from the values presented in the previous section, in principle, which pertains to the limiting case of an infinite population of users with the same prejudice $z$, and where $\beta$ approaches~$1$. Moreover, in some cases, to save space, we omit the results on average user opinion because it is tightly coupled with the normalized popularities, as observed in the previous section. Lastly, to facilitate the interpretation of results, we restrict ourselves to the case of two \textit{\lq \lq competing"} influencers. We provide further details on the scenario considered in section~\ref{sec:sim_scenario}. The model can clearly be applied to scenarios with an arbitrary number of influencers occupying any position in the opinion space. In section \ref{sec:sim_rate}, we present the behavior as function of publication frequency $f^{(i)}$, and in section \ref{sec:sim_cons} as function of consistency $c^{(i)}$. Then we show examples of final opinion distributions of the regular users in a few paradigmatic cases in section \ref{sec:final_conf}. Finally, in section \ref{sec:ab}, we consider the \textit{degree of stubbornness}, defined as $\delta = \frac{\alpha}{\gamma}$, which governs the opinion update of the users. \subsection{Description of the scenario}\label{sec:sim_scenario} The default parameters of our reference scenario are reported in Table 1 unless otherwise explicitly stated. As mentioned earlier, we restrict ourselves to the case of two \lq \lq competing" influencers, i.e., $N_i=2$. We assume that $x_j^{(0)}=0$ and $x_j^{(1)}=1$ $\forall j$. We consider the case of different reference directions $r^{(0)} \neq r^{(1)}$. In this section, we consider a two-dimensional opinion space and assume that the vast majority of the regular users' population initially takes a \textit{moderate} position on both topics. More precisely, initial opinions are distributed according to a Beta distribution, independently on each axis, with shape parameters $a=b=10$, as shown in Figure \ref{fig:op_init}. Recall that we assume for simplicity that the prejudice of the user $\bm{z}^{(u)}$ corresponds to the initial opinion $\bm{x}^{(u)}$, hence Figure \ref{fig:op_init} also provides the prejudice distribution of users. The functional form of \textit{visibility} $\omega$ and \textit{feedback} $\theta$ is also reported in Table~1. We take as $\omega(\cdot)$ a Gaussian function similar to the \textit{trust} function in \cite{cohen_tsang_ONS}, but modulated by $\bar{\pi}_i$. Here, the coefficient $\rho$ is a parameter that controls the extent to which the social media platform filters content. Small values of $\rho$ correspond to {\textit{smooth}} personalization, i.e., influencers can reach users whose opinion strongly differs from theirs. Conversely, high values of $\rho$ correspond to {\textit{sharp}} personalization: only close users (in the opinion space) are reachable with non-negligible probability. \begin{comment} \begin{equation}\label{eq:visibility} \omega(\bar{\pi}_i, x^{(u)}, x^{(i)}) = e^{-\rho\frac{\left(x^{(u)}-x^{(i)}\right)^2}{\bar{\pi}_i}} \end{equation} \end{comment} The function $\theta(\cdot)$ is assumed to be a decreasing, linear function of the opinion difference $d_j = |x_j^{(u)} - x_j^{(i)}|$. \begin{comment} \begin{equation}\label{eq:feedback} \theta\left(d^{(i,x^{(u)})}\right) = 1 - \left|x^{(i)} - x^{(u)}\right| \end{equation} \end{comment} \begin{figure} \centering \begin{subfigure}{.60\textwidth} \vspace{-0.4cm} \captionsetup{labelformat=empty} \caption{Table 1: Parameters and functions shared across experiments} \centering \scalebox{0.8}{ \label{tab:table_param} \begin{tabular}{l|c|l} \toprule \textbf{Symbol} & \textbf{Value - Form} & \textbf{Description}\\ \midrule $N_i$ & 2 & Number of influencers\\ $x_j^{(0)}$ & 0 & Opinion of influencer $0$ on direction $j$\\ $x_j^{(1)}$ & 1 & Opinion of influencer $1$ on direction $j$\\ $r^{(0)}$ & 0 & Reference direction of influencer $0$\\ $r^{(1)}$ & 1 & Reference direction of influencer $1$\\ $p_{0,1}(0)$ & 100 & Initial absolute popularity of both influencers\\ $N_u$ & 10000 & Number of regular users\\ $N_{iter}$ & 100000 & Number of iterations for each simulation\\ $\alpha$ & 0.05 & First weight in the updating rule in Eq. \ref{eq:d_model_user_update}\\ $\beta$ & 0.93 & Second weight in the updating rule in Eq. \ref{eq:d_model_user_update}\\ $\theta(\cdot)$ & $1 - \left|x_j^{(i)} - x_j^{(u)}\right|$ & Functional form of the \textit{feedback} function\\ $\omega(\cdot)$ & $e^{-\rho\frac{\left(x_{r}^{(u)}-x_{r}^{(i)}\right)^2}{\pi_i}}$ & Functional form of the \textit{visibility} function\\ \bottomrule \end{tabular} } \end{subfigure} \begin{subfigure}{.39\textwidth} \centering \includegraphics[width=\linewidth]{op_init.pdf} \end{subfigure} \caption{Table 1 summarizes some of the parameters of the system shared across the different experiments. On the right-hand side, a realization of the initial opinion distribution of the regular users (being also the prejudice since $z^{(u)}=x^{(u)}(0)$).} \label{fig:op_init} \end{figure} \subsection{Behaviour as function of the frequency of publication}\label{sec:sim_rate} The frequency of publication $f^{(i)}$ is one of the basic parameters that characterize influencers. The higher $f^{(i)}$, the higher the \textit{structural advantage} of the influencer because it more frequently reaches users through posts, attracting them to its own opinion. In this section, we examine the value of mean normalized popularity $\bar{\pi}_0$ as a function of $f^{(0)}$. Note that in the case of two influencers, $f^{(1)}=1-f^{(0)}$. We performed this experiment by fixing the consistency of the two influencers: $c^{(0)}=c^{(1)}=0.8$, which is approximately the average consistency observed on real-world data (Figure \ref{fig:cons_distrib}) \begin{figure}[h!] \centering \includegraphics[width=.45\linewidth]{p_tilde_rate.pdf} \caption{Popularity ratio $\bar{\pi}_0$ of influencer $0$ as function of the publication rate $f^{(0)}$. Each point is obtained by averaging over $100$ time samples and $10$ different process' realizations. Different levels of personalization are considered by varying the parameter $\rho$. The two influencers have the same consistency $c^{(0)}=c^{(1)}=0.8$. Note that, in the considered scenario, the curves are symmetric for values of $f^{(0)}$ in $[0.5,1.0]$.} \label{fig:metric_rate} \end{figure} \begin{figure*}[h!] \centering \begin{subfigure}{.45\textwidth} \centering \includegraphics[width=\linewidth]{p_tilde_rate_op_x0.pdf} \caption{} \label{fig:rate_x0_op} \end{subfigure}% \begin{subfigure}{.45\textwidth} \centering \includegraphics[width=\linewidth]{p_tilde_rate_op_x1.pdf} \caption{} \label{fig:rate_x1_op} \end{subfigure} \caption{{Opinion distance of the influencers' opinion on their reference direction $x^{(i)}_{r^{(i)}}$ and the average opinion of the regular users' population on the same direction $\bar{\bm{x}}_{r^{(i)}}$.} Various degrees of personalization are considered, tuning the parameter $\rho$, the setting is the same as that of Figure \ref{fig:metric_rate}.} \label{fig:rate_op} \end{figure*} \begin{comment} \fg{Note that when $f^{(0)}=0.5$ the mean of the distribution is not the initial $\bar{\bm{x_B}}(0)=(0.5,0.5)$, but corresponds to the mean of a distribution like the one in Figure \ref{fig:same_strict}, since the two influencers have a different reference direction.}{\color{red} forse considerando un caso in cui $r^{(0)}=r^{(1)}$ le figure potrebbero venire un po' meglio perchè nel caso \lq \lq bilanciato " ($f^{(0)}=f^{(1)}=0.5$) l'opinione media dovrebbe tendere a 0.5, vedi Figure \ref{fig:same_loose}. OPPURE anche qua si potrebbe aumentare il numero di realizzazioni.} \end{comment} In Figure \ref{fig:metric_rate}, we consider different levels of personalization by varying the parameter $\rho$ in the exponent of the visibility function $\omega$. We see that the higher the degree of personalization (i.e., the higher the value of $\rho$), the lower the normalized popularity of influencer $i=0$, for any given $f^{(0)}$. This result suggests that algorithmic personalization favors the \textit{structurally advantaged} individual, i.e., the one with higher $f^{(i)}$. This mechanism, in turn, leads to more radical positions in the population of regular users, as the platform preferentially exposes them to the belief of the \textit{advantaged} influencer. Figure \ref{fig:rate_op} clearly shows this behavior. Note that for high values of $\rho$, the average user opinion exhibits a significant bias toward the structurally advantaged influencer. Such bias persists up to a critical value of posting frequency. For example, when the personalization parameter is $\rho=1.0$, the critical posting frequency value is roughly 0.35; when the personalization parameter is $\rho=0.5$, the critical posting frequency value is approximately 0.25. We argue that content filtering in OSN poses a potential threat to opinion diversity. This premise is inextricably linked to the goal of usage maximization~\cite{Perra2019} pursued by the social media platform. Many platforms indeed prefer to suggest just \textit{similar} content rather than exposing individuals to radically different opinions, allowing for so-called {\em serendipity}. \subsection{Behaviour as a function of the consistency}\label{sec:sim_cons} In section \ref{sec:OSN_reference}, we showed the existence of a reference direction for real influencers. Here, we investigate the impact on dynamics of the extent to which an influencer publishes on its reference direction, i.e., its consistency $c^{(i)}$. In this experiment, we consider two influencers with the same posting frequency $f^{(0)}=f^{(1)}=0.5$, and we let $c^{(0)}$ vary while keeping $c^{(1)}$ fixed. {We then consider different choices of $c^{(1)}$ to grasp its impact on the dynamics.} From Figure \ref{fig:metric_cons}, we see that consistency does not significantly affect the normalized popularities when personalization is {\textit{smooth}} ($\rho = 0.0001$), while it becomes relevant when the platform applies \textit{sharp} personalization to the content ($\rho = 1$). \begin{figure*}[h!] \centering \begin{subfigure}{.45\textwidth} \centering \includegraphics[width=\linewidth]{new_cons_05.pdf} \caption{$c^{(1)}=0.5$} \label{fig:metric_cons05} \end{subfigure}% \begin{subfigure}{.45\textwidth} \centering \includegraphics[width=\linewidth]{new_cons_08.pdf} \caption{$c^{(1)}=0.8$} \label{fig:metric_cons08} \end{subfigure} \begin{subfigure}{.45\textwidth} \centering \includegraphics[width=\linewidth]{new_cons_1.pdf} \caption{$c^{(1)}=1.0$} \label{fig:metric_cons1} \end{subfigure}% \caption{Popularity ratio $\bar{\pi}_0$ of $i_0$ as function of its consistency $c^{(0)}$, while considering $f^{(0)}=f^{(1)}=0.5$ and keeping fixed the consistency of the second influencer at (\ref{fig:metric_cons05}) $c^{(1)}=0.5$, (\ref{fig:metric_cons08}) $c^{(1)}=0.8$ and (\ref{fig:metric_cons1}) $c^{(1)}=1.0$. The two colors represent two different levels of personalization (i.e., smooth and sharp). Each point is obtained by averaging over $100$ time samples and $10$ different realizations of the process. It is interesting to observe that the maximum of $\bar{\pi}_0$ moves to the left (i.e., is achieved for a lower value of consistency $c^{(0)}$) as the consistency of $i=1$ increases.} \label{fig:metric_cons} \end{figure*} Before discussing the results concerning \textit{sharp} personalization shown in Figure \ref{fig:metric_cons}, it is crucial to note that when considering a bi-dimensional opinion space, a consistency $c^{(i)} < 0.5$ implies that the choice of the reference direction for influencer $i$ is somehow unnatural since it produces the majority of posts on the other direction. This choice is in contradiction with the definition of \textit{reference direction} itself. Nonetheless, we leave this situation as a possibility: let us imagine an influencer can adopt consistency values of less than $0.5$ while undertaking a transition phase during which it changes its main topic for its posts. In this case, the platform would still perform personalization on the given reference direction $r^{(i)}$, but the consistency would be less than $0.5$ due to the change in posting pattern. It represents a scenario of interest, and as such, we allow for $c^{(i)}<0.5$. First, we note that the shape of the curves in Figure \ref{fig:metric_cons} depends strongly on the value of the consistency of the \lq\lq opposing" influencer $c^{(1)}$. Second, a perfectly balanced condition is achieved whenever the two influencers have the same consistency since all parameters are symmetric (even the curves associated with $\rho=0.0001$ and $\rho=1.0$ coincide on this point), see Figure \ref{fig:metric_cons1} at $c^{(0)}=1$ for example. The observed pattern is consistent in all three figures with $\bar{\pi_0}$ being first increasing and then decreasing, exhibiting a unique maximum in all three diagrams. {Let us start the discussion by considering Figure \ref{fig:metric_cons1} because its interpretation is instrumental to better understanding the other scenarios. It represents a rather degenerate situation since the influencer $i=1$ posts exclusively in its reference direction $r^{(1)}=1$. However, the simplicity of the scenarios allows us to interpret the results straightforwardly. In this case, the influencer $i=0$ has $r^{(0)}=0$ and for $0 < c^{(0)} < 1$ \footnote{The point $c^{(0)}=0$ corresponds to a rather peculiar situation where the influencer $i=0$ does not post on its reference direction, but only on the other direction. Then the filtering depends on the initial configuration of the users in this direction, where no dynamics occur. It can be concluded that the scenario is fairly balanced, with the influencer $i=1$ having a slight advantage since the filtering occurs in the direction where the dynamics take place.} posts in both directions, with the social media platform filtering according to distance in the reference direction. In the direction $r^{(0)}=0$, the influencer has no competition at all, since $c^{(1)}=1$, so it is able to attract the user population to its \lq\lq reference opinion" while competing with the other influencer in the non-reference direction. The lower the consistency $c^{(0)}$, the greater the competition on $r^{(1)}=1$, i.e., for values of $c^{(0)}$ close to 0, the influencer $i=0$ posts the vast majority of its messages on $r^{(1)}=1$. Therefore, the final value of $\bar{\pi}_0$ reaches higher values, as demonstrated in Figure \ref{fig:metric_cons1}. It happens because the influencer $i=0$ has a stable feedback stream from the posts in its reference direction, where it does not face any competition, and it competes with $i=1$ in the other direction, being at an advantage since the \textit{visibility} of its posts is determined by the opinion distance in its reference direction $r^{(0)}$.} {From these observations, we can conclude that influencer $i=1$, i.e., the influencer with the higher consistency, is disadvantaged for virtually all values of the other influencer's consistency $c^{(0)}$. Here we are considering the extreme case, where the influencer $i=1$ has the maximum attainable consistency $c^{(1)}=1$. Thus, we can easily conclude that the individual with lower consistency holds the structural advantage. This is consistent with the results in Figure \ref{fig:metric_cons05} and \ref{fig:metric_cons08}, for which we observe a decrease in normalized popularity $\bar{\pi_0}$ on the right of the point at which $c^{(0)}=c^{(1)}$. Namely, the influencer with higher consistency is penalized and eventually reaches lower values of $\bar{\pi_i}$.} {This assertion is not true in the first part of all plots in Figure \ref{fig:metric_cons} where $\bar{\pi}_0$ is less than 0.5, i.e., the influencer $i=1$ is favored, even though $c^{(0)} < c^{(1)}$. It is important to note that this is only true for values of $c^{(i)} < 0.5$, which, as discussed above, are only relevant in certain situations. This behavior depends on the interplay between the actual main posting direction (which is different from the \textit{reference direction} when $c^{(i)} < 0.5$) and the algorithmic personalization performed on $r^{(i)}$, see also the discussion in the footnote. Interestingly, the curves intersect for the first time when $c^{(0)} \approx 1-c^{(1)}$.} {From our results, choosing a consistency $c^{(i)}$ around $0.5$ for $i=1$ seems to be a successful choice: from Figure \ref{fig:metric_cons05} it is clear that the influencer $i=0$ can only reach and never exceed the value of the normalized popularity of its \lq\lq opposing" influencer. In Figure \ref{fig:metric_cons08} we assign a higher consistency $c^{(1)}$ for the competitor. The discussion developed above applies, and for values of $c^{(0)} \geq 0.5$, the influencer with the lower consistency always has an advantage. Indeed, we find that for consistency values $c^{(0)} < 0.8=c^{(1)}$ (and $c^{(0)} > 0.2$) influencer $i=0$ achieves higher values of $\bar{\pi_i}$, see Figure \ref{fig:metric_cons08}. In summary, the results of this section suggest that a given influencer can gain an advantage over its competitors if it has a lower consistency $c^{(i)}$. This observation also reflects the natural tendency of people to seek varied content.} \begin{comment} These results suggest that, \el{on the one hand}, algorithmic personalization penalizes influencers who frequently discuss topics different from the one they are most recognized for (e.g., resulting in a $c^{(i)}$ smaller than, say, $0.4$). This behavior could explain why in practice the majority of influencers tend to have large consistency (i.e., $c^{(i)}$ larger than $0.4$), as empirically observed on real data (Fig. \ref{fig:cons_distrib}). \el{On the other hand, a sharp personalization seems to penalize, as well, influencers with very high consistency (i.e. consistency approaching $1$), who renounce to express their opinion on any other topic rather than the reference one.} \end{comment} \subsection{Opinion configuration considering combinations of reference directions}\label{sec:final_conf} In previous sections, we have focused primarily on the influencer perspective, looking at normalized popularity values $\bar{\pi}_i$. Here we present possible final opinion configurations in scenarios in which the reference directions of influencers $(r^{(0)}, r^{(1)})$ are either coincident or different. It was observed above that when an influencer has a \textit{structural advantage}, it achieves a higher $\pi_i$ and, in turn, can exert a higher attracting force to the regular users towards its opinion. We then argue that it is interesting to examine what can happen in a symmetric scenario in terms of frequency of publication ($f^{(0)}=f^{(1)}$) and consistency ($c^{(0)}=c^{(1)}$). As before, the influencers hold opinions $\bm{x}^{(0)}=(0,0)$ and $\bm{x}^{(1)}=(1,1)$. We consider the two possible cases where the two opinion leaders have either the same or different reference directions and the impact of algorithmic personalization. \begin{figure} \vspace{-2cm} \centering \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=.95\linewidth]{heatmap_loose_a.pdf} \centering \includegraphics[width=.95\linewidth]{pop_loose_a.pdf} \caption{} \label{fig:same_loose} \end{subfigure}% \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=.95\linewidth]{heatmap_strict_b.pdf} \centering \includegraphics[width=.95\linewidth]{pop_strict_b.pdf} \caption{} \label{fig:same_strict} \end{subfigure} \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=.95\linewidth]{heatmap_loose_c.pdf} \centering \includegraphics[width=.95\linewidth]{pop_loose_c.pdf} \caption{} \label{fig:diff_loose} \end{subfigure} \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=.95\linewidth]{heatmap_strict_d.pdf} \centering \includegraphics[width=.95\linewidth]{pop_strict_d.pdf} \caption{} \label{fig:diff_strict} \end{subfigure} \caption{(\ref{fig:same_loose},\ref{fig:same_strict}) Influencers with the same reference direction, i.e., $r^{(0)}=r^{(1)}=0$, while (\ref{fig:diff_loose},\ref{fig:diff_strict}) influencers have $r^{(0)}=0$ and $r^{(1)}=1$. In both cases, two different degrees of personalization are considered: smooth (left column, $\rho=0.0001$) and sharp (right column, $\rho=5.0$). In all cases, the influencers have consistency $c^{(0)}=c^{(1)}=0.8$. The distributions were obtained as the time average of the opinion distribution in one realization of the process. The normalized popularities of the two influencers in the given realization are shown along with the distributions; it is clear that the influencers coexist except in \ref{fig:diff_strict}.} \label{fig:final_distrib} \end{figure} This symmetrical scenario is interesting because, in most cases, it guarantees the coexistence of both influencers (neither of them \lq wins'), see the normalized popularity plots in Figure~\ref{fig:final_distrib}. Therefore, the final opinion distribution is the result of the joint influence of both agents. In Figure \ref{fig:same_loose}, we observe only a negligible perturbation with respect to the initial distribution shown in Figure \ref{fig:op_init}. In this case, the platform practically does not filter the content, so every post reaches all users. From a regular user perspective, individuals are exposed to nearly identical forces, i.e., \lq\lq opposite" stimuli from the two influencers, which almost perfectly cancel each other. In Figure \ref{fig:same_strict}, the impact of strong personalization is clear: the filtering effect introduced by the platform leads to the emergence of two \textit{echo chambers}, whose membership is determined mainly by user's prejudice. Each user reaches an equilibrium point at which the resultant attraction induced by the two influencers is balanced by the attraction exerted by its own prejudice. Interestingly, users also tend to cluster in the non-reference direction ($x_1$ in Fig. \ref{fig:same_strict}) and align their opinion with that of the influencer associated with the echo chamber they end up in. We remark that this is a metastable condition, as the $\pi_i$ diagram indicates. By extending the time horizon, we may observe a different final situation in which one of the two influencers \lq\lq wins" (exhibiting behavior similar to Fig. \ref{fig:diff_strict}, but just taking place at a different time scale.) Figures \ref{fig:diff_loose} and \ref{fig:diff_strict} refer to the case of different reference directions: the two influencers do not compete on the same topic. In Figure \ref{fig:diff_loose}, it is clear that there is no competition as the two influencers are able to attract users to their \textit{reference opinion}, i.e., $x_0=0$ the reference opinion of $i=0$ and $x_1=0$ that of $i=1$. It constitutes a particularly relevant case, whose occurrence is linked indissolubly to the newly introduced concept of \textit{reference direction}. In the last scenario, shown in Figure \ref{fig:diff_strict}, the influencer $i=1$ \lq\lq wins ", i.e., $\bar{\pi}_1 \rightarrow 1$, which brings public opinion closer to their belief on both issues. The users' opinion does not overlap with that of the winning influencer because they are anchored by their prejudice. In this case, an unstable behavior is observed since the identity of the winner influencer (as expected, as a result of perfect symmetry) depends on random factors, and different sample-paths lead to diverse winners. It should also be noted that \textit{sharp} personalization leads to a situation where the public scene is monopolized by only one individual. \subsection{Behaviour as function of the updating weights}\label{sec:ab} The behavior of the system depends not only on the characteristics of the influencers and the composition of public opinion, but also on the parameters controlling the opinion update rule in equation (\ref{eq:d_model_user_update}). The update is a convex combination of the prejudice, the current opinion, and the opinion conveyed by the post. We chose to hold fixed the weight $\beta$ associated with the current opinion and consider the ratio of the other two weights $\frac{\alpha}{\gamma}$, which we termed \textit{degree of stubbornness}, as it gives an indication of the extent to which users change their opinions. We considered an unbalanced scenario in which influencer $i=1$ has a structural advantage, i.e., $f^{(1)}=0.7 > f^{(0)}$. Figure \ref{fig:ab} again shows that personalization favors the structurally advantaged individual (consistent with section \ref{sec:sim_rate}). Note that the $x$-scale is logarithmic to highlight the sudden drop of $\bar{\pi}_0$ for $\frac{\alpha}{\gamma} \approx 10^{-3}$ (corresponding to modest values of $\alpha$) when \textit{sharp} personalization is applied. The shape of the two curves is quite similar, only the decrease is observed at different values of $\frac{\alpha}{\gamma}$. \textit{Smooth} personalization allows the coexistence of influencers on the whole domain, while with \textit{sharp} personalization, for a wide range of parameters, influencer $i=1$ \lq\lq wins." In both cases, there is an initial phase (for low values of $\frac{\alpha}{\gamma}$) in which the two influencers coexist, and this is followed by a drop of the normalized popularity of the disadvantaged influencer. This can be explained by the fact that small values of $\frac{\alpha}{\gamma}$ imply that a negligible weight is given to the prejudice, and therefore regular users concentrate around the two influencers' opinions on their reference direction. This can be easily confirmed by looking at the final opinion configuration of users, who concentrate in the upper corners of the opinion space (around $[0,1]$ and $[1,1]$). This is because the influencer $i=1$, whose opinion is $x^{(1)}=[1,1]$ is stronger than the other in terms of popularity and is able to pull users along its non-reference direction as well. We remark that when users are very close in opinion to a particular influencer, it is difficult for the other to persuade them, as the probability of this happening is proportional to the product $\omega \cdot \theta$, both of which are a function of opinion distance. In these scenarios, the distance from the \lq\lq further " influencer is $d_j \approx 1$, which drastically reduces the probability of reaching the users. Thus, as long as $\frac{\alpha}{\gamma}$ is small enough, both influencers can build their user base. These situations represent rather degenerate cases where the population almost disregards their prejudice in favor of the opinion conveyed by the post. It might be interesting to consider users with varying degrees of \lq\lq volatility" who are able to pull along the opinion of their neighborhood. As the degree of stubborness increases, so does the inertia of the users. They are more entrenched in their prejudice and therefore no longer concentrate in a small neighborhood of the influencer's opinions. This favors the structurally advantaged influencer, as the other (i.e., $i=0$) is unable to build its user base because users do not get close enough to it (see Figure \ref{fig:ab} for $i=1$ and $\rho=0.0001$ we have $\bar{\pi}_0 \rightarrow 0$). The subsequent rise in $\bar{\pi}_0$ depends on the fact that when $\alpha$ approaches the maximum value $\alpha_{max}=1-\beta$, users give importance only to their prejudice, and therefore they do not deviate too much from their initial position. As a consequence, it can not be triggered the positive feedback between users' opinion and influencers' popularity that leads to the complete victory of one influencer. \begin{figure*}[h] \centering \includegraphics[width=.45\linewidth]{ab_stubb_rate_log_cut.pdf} \caption{Normalized popularity $\bar{\pi}_0$ as a function of the degree of stubbornness $\frac{\alpha}{\gamma}$, the points are obtained considering 50 realizations of the process and averaging over 100 discrete time instants. Again, two levels of algorithmic personalization are considered.} \label{fig:ab} \end{figure*} \section{Analysis of the fluid limit}\label{sec:simulation} In this section, we compare predictions of the simplified \textit{fluid limit} against simulation results of the full stochastic model described by algorithm \ref{alg:model} (obtained through a Monte-Carlo approach) . We restrict ourselves to a one-dimensional opinion space, as in section \ref{sec:analysis}, and assume that all users share the same prejudice~$z$. Again, we consider two \lq \lq competing" influencers. A similar analysis could be performed in scenarios with any number of influencers at any point in the opinion space, but this would be computationally more challenging since multiple stationary points may exist, each with its own attraction basin. First, we derive in section \ref{sec:preliminary} some preliminary analytical results for the case of two influencers, using the results of the \textit{fluid limit} introduced in section \ref{sec:stoch_comp}. Then in Section \ref{sec:extreme} two extreme instances of the model are solved in closed form. Section \ref{sec:comparison} is devoted to comparing the analytical results of the \textit{fluid} model with simulations. Finally, we discuss the impact of content personalization. \subsection{Two competing influencers} \label{sec:preliminary} \begin{comment} \begin{equation} \tilde{p}_1 = \frac{\text{Pr}\{1\}\rho(\tilde{p}_1, |o^1-\bar{o}|) \theta(|o^1-\bar{o}|)}{\sum_{j \in \mathcal{I}} \text{Pr}\{j\}\rho(\tilde{p}_j, |o^j-\bar{o}|) \theta(|o^j-\bar{o}|)} \end{equation} It is easy to see that by combining equations \ref{eq:stoch_e} and \ref{eq:tilda_p_i} it can be obtained an equation for $\bar{o}$ which will be useful for the two influencers scenario: \begin{equation*} \bar{o} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \frac{\sum_{i \in \mathcal{I}} f^{(i)} \rho\left(\tilde{p}_i, |o^i-\bar{o}| \right) \theta\left( |o^i-\bar{o}| \right) o^i}{f^{(i)}\rho(\tilde{p}_i, |o^i-\bar{o}|) \theta(|o^i-\bar{o}|)} \tilde{p}_i \end{equation*} \begin{equation} \tilde{p}_1 = \frac{\text{Pr}\{1\}\rho(\tilde{p}_1, |o^1-\bar{o}|) \theta(|o^1-\bar{o}|)}{\sum_{j \in \mathcal{I}} \text{Pr}\{j\}\rho(\tilde{p}_j, |o^j-\bar{o}|) \theta(|o^j-\bar{o}|)} \end{equation} Which becomes: \begin{equation} \label{eq:o_bar_2i} \bar{o} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \tilde{p}_1 \end{equation} \end{comment} Let us specialize the equations presented in section \ref{sec:stoch_comp} for the mean opinion $\bar{x}(z)$ (Eq. (\ref{eq:o_bar_comp})) and the normalized popularities $\bar{\pi}_i$ (Eq. (\ref{eq:tilda_p})). Note that for $N_i = 2$, $\bar{\pi}_0 = 1 - \bar{\pi}_1$, so it is sufficient to study $\bar{\pi}_1$. As for the mean user opinion $\bar{x}(z)$, equation (\ref{eq:o_bar_comp}) allows us to write the asymptotic mean directly as a function of $\bar{\pi}_1$ and the opinions of the two influencers $x^{(0)}, x^{(1)}$: \begin{equation}\label{eq:o_bar_2infl} \bar{x}(z) = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \left[ \left( 1-\bar{\pi}_1 \right)x^{(0)} + \bar{\pi}_1 x^{(1)} \right] \end{equation} Substituting the functional forms of the \textit{visibility} $\omega$ and \textit{feedback} $\theta$ into equation (\ref{eq:tilda_p}), we obtain the following expression for the normalized popularity $\bar{\pi}_1$: \begin{equation}\label{eq:eq_snake} \bar{\pi}_1 = \frac{f^{(1)} e^{-\rho \frac{\left(x^{(1)}-\bar{x}\right)^2}{\bar{\pi}_1}} \left(1-|x^{(1)}-\bar{x}|\right)}{\sum_{i \in \{0,1\}}f^{(i)} e^{-\rho \frac{\left(x^i-\bar{x}\right)^2}{\bar{\pi}_1}} \left(1-|x^{(i)}-\bar{x}|\right)} = f(\bar{\pi}_1, \bar{x}) \end{equation} Moreover, if we combine the above expression with equation (\ref{eq:o_bar_2infl}) for $\bar{x}$, we get $\bar{\pi}_1=f(\bar{\pi}_1$), which can be solved numerically through a fixed-point approximation (FPA) (a graphical representation is shown on Fig.~\ref{fig:snake}). The outcome of this FPA and the corresponding simulation results are compared in Figure \ref{fig:sim_th_comparison}. \begin{comment} \subsection{Analysis of the Scenario - Influencers with $o^{(0)}=0$ and $o^{(1)}=1$} By considering influencers at the extreme of the domain $[0,1]$, equations become: \begin{equation}\label{eq:2infl} \bar{o} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta} \tilde{p}_1 \quad\quad \tilde{p}_1 = \frac{f^{(1)} e^{-\gamma \frac{(1-\bar{o})^2}{\tilde{p}_1}} \cdot (1-\delta(1-\bar{o}))}{\sum_{i \in \{0,1\}}f^{(i)} e^{-\gamma \frac{(o^i-\bar{o})^2}{\tilde{p}_i}} \cdot (1-\delta|o^{(i)}-\bar{o}|)} \end{equation} \end{comment} \subsection{Closed form computations in extremal cases}\label{sec:extreme} The combination of equations (\ref{eq:o_bar_2infl}) and (\ref{eq:eq_snake}) cannot be solved in closed form in the general case. However, there are at least two scenarios in which this is possible, separately considered in the following subsections. \subsubsection{When an influencer ``wins"}\label{sec:infl_wins} We consider an influencer a ``winner" if its normalized popularity $\bar{\pi}_i$ approaches 1. Suppose that the influencer whose opinion is $x^{(1)}=1$ \textit{wins}, then $\bar{\pi}_1 \rightarrow 1$. This implies $\bar{\pi}_0 \rightarrow 0$ and thus $\omega \rightarrow 0^+$: the influencer with $x^{(0)}=0$ is seen by a negligible fraction of users and in practice, only influencer $i=1$ remains visible. Note that in the extreme case in which influencer $1$ wins, users see only $x^{(1)}$, and asymptotically all users move towards it. In this case, the final opinion $\bar{x}(z)$ can be easily calculated with a recursion of the update rule (\ref{eq:d_model_user_update}): \begin{equation*} x^{(u)}(n) = \sum_{i=0}^n \beta^i\left(\alpha z + \gamma x^{(1)}\right) + \beta^n x(0) \end{equation*} For $n \rightarrow \infty$ and considering $\beta < 1$ (the case $\beta=1$ coincides with the trivial case where users remain fixed at their initial opinion) we get: \begin{equation} x^{(w)} = \frac{\alpha}{1-\beta} z + \frac{\gamma}{1-\beta}x^{(1)}, \end{equation} which is in agreement with (\ref{eq:o_bar_2infl}) if one sets $\bar{\pi}_1 = 1$. This corresponds to one of the extreme cases that we will use later to examine the model behavior as a function of the personalization parameter $\rho$. It should be noted that this construction relies on the knowledge of the \textit{winning} influencer, which is unknown in advance. However in the fluid limit, we expect that the winning influencer, if any, is the one that has a structural advantage over the others at the beginning (e.g., a higher posting rate $f^{(i)}$, see Figure \ref{fig:metric_rate}). \subsubsection{Constant personalization function}\label{sec:const_rho} The other extreme case we consider is the one in which $\rho=0$. In this case, the personalization function $\omega$ no longer depends on $\bar{\pi}_i$, and it is easy to see from Table \ref{tab:table_param} that it returns $\omega \equiv 1$. Moreover, we consider $x^{(1)}=1, x^{(0)}=0$, which further simplifies (\ref{eq:o_bar_2infl}). The above formulas (Eq. \ref{eq:eq_snake} and Eq. \ref{eq:o_bar_2infl}) can then be solved in closed form. In particular, equation (\ref{eq:eq_snake}) for the normalized popularity $\bar{\pi}_1$ becomes: \begin{equation*} \bar{\pi}_1 = \frac{f^{(1)} \left(q+m\,\bar{\pi}_1\right)}{f^{(0)}\left( 1-(q+m\, \bar{\pi}_1)\right)+f^{(1)} \left(q+m\,\bar{\pi}_1\right)} \end{equation*} where $m \triangleq \frac{\gamma}{1-\beta}$ and $q \triangleq \frac{\alpha}{1-\beta}z$ for compactness. This leads to a second order equation which can be easily solved for $\bar{\pi}_1$: \begin{equation}\label{eq:2nd_eq} \bar{\pi}_1^2\, m (f^{(1)}-f^{(0)}) + \bar{\pi}_1 \left[ f^{(0)} (1-q) + f^{(1)} (q-m) \right] - f^{(1)} q = 0 \end{equation} \subsection{Comparison between analytical prediction and Monte Carlo simulations}\label{sec:comparison} This section is devoted to comparing the analytical results derived in section \ref{sec:analysis} with simulations of the model. Numerical and graphical solutions of equation (\ref{eq:eq_snake}) are also provided, shedding light on the impact of the algorithmic personalization performed by the platform. \subsubsection{Description of the scenario}\label{sec:scenario} The scenario setting is analogous to that described in section \ref{sec:sim_scenario} and Table 1 However, here, we consider a one-dimensional opinion space $[0,1]$ and we assume all users to have the same prejudice, i.e., $z^{(u)}=z=0.4, \forall u \in \mathcal{U}$ matching their initial opinion $x^{(u)}(0)$. The \lq\lq competing " influencers have opinions at the extremes of the domain, and their posting frequencies are $f^{(1)}=0.7$ and $f^{(0)}=0.3$, i.e., influencer $i=1$ has a \textit{structural advantage} over influencer $i=0$. Note that in a one-dimensional space, the reference direction $r^{(i)}$, and hence the consistency $c^{(i)}$, lose their significance. To avoid obtaining trivial results in which influencer 1 obviously wins, regular users are initially placed closer to the disadvantaged influencer $i=0$. \begin{comment} To avoid drawing trivial conclusions \mg{in che senso?}, regular users are initialised placed closer to the disadvantaged influencer $i=0$, as a single class of $N_u=10000$ users whose prejudice $z=0.4$ coincides with their initial opinion $x(0)$. The coefficients in the update rule were set to $\alpha = 0.05$ and $\beta=0.93$. \end{comment} \begin{comment} \begin{itemize} \item Two influencers $o^{(0)}=0$, $o^{(1)}=1$ with probability of owing a post $f^{(0)}=0.3$, $f^{(1)}=0.7$ and same initial popularity $p^{0,1}(0) =100$ \item Users distributed as $f(o)=\delta(o-z)$, assuming also that $z=o(0)=0.4$ \item Weights in the updating rule $\alpha=0.05$ and $\beta=0.93$ \item Feedback function of the form $\theta = 1 - \delta |o^i - o^u|$ with $\delta = 1.0$ \item Various instances of the personalization function $\rho(i) = e^{-\gamma\frac{(|o^i-o^u|)^2}{\tilde{p}_i}}$ varying $\gamma$ \end{itemize} \end{comment} \begin{comment} {\color{red} There appears to be differences between the asymptotic limit and the temporal-realization averages, these are presented in Figure \ref{fig:sim_th}. In particular: \begin{itemize} \item the equilibrium points reached in simulation \textbf{do not} coincide with those obtained graphically (but some of those points may not have reached convergence indeed see Fig. \ref{fig:sim_th_comparison2}) \item at least, the values are increasing with the personalization $\gamma$, and it can be be somehow stated that the points "obey" equation \ref{eq:o_bar_2infl}. \item while the $(\tilde{p}_1, \bar{o})$ point for $\tilde{p}_1\rightarrow1$ (computed in Sec. \ref{sec:const_rho}) has a good match with the simulation value; that for $\gamma=0$ (computed in Sec. \ref{sec:const_rho}) does not match well with the simulation value, see Figure \ref{fig:sim_th_comparison}. \fg{To exclude errors in the simulator I implemented this simple scenario in Python and computed the regimen value of the normalized popularity $\tilde{p}_i$, which led to $\tilde{p}_1=0.8485$, agreeing to the c++ simulator.} \item understand \textbf{why} there is this discrepancy especially for low values of $\gamma$. \end{itemize} } \end{comment} \subsubsection{Simulation, fluid limit and fixed-point approximation}\label{phase-trans} Comprehensive validation and comparison of the approaches used to obtain the system equilibria are shown in Figure \ref{fig:sim_th_comparison}. First, the stochastic model described by Algorithm \ref{alg:model} is \lq\lq simulated" by obtaining $100$ different sample whose length is $500000$ elementary steps. The variables of interest $\bar{x}(z)$ and $\bar{\pi}_1$ are obtained by averaging the process over both discrete times steps $n$ and sample paths and are represented by circle marks. Second, equation (\ref{eq:o_bar_2infl}), which is a specialization of (\ref{eq:o_bar_comp}) obtained from the fluid limit, indicates that the state of the system lies on a line in the plane $\bar{\pi}_1$,$\bar{x}$ (dashed line in Figure \ref{fig:sim_th_comparison}). Third, the extreme cases of the model analyzed in section \ref{sec:extreme}, for which we derived a closed-form solution, are represented by star-like marks. Lastly, diamonds are solutions of (\ref{eq:eq_snake}) employing the fixed-point approximation. We observe that, for given $\rho$, simulation marks match well with analytical marks. The only exception is for $\rho = 0.5$, for which simulations provide $\bar{\pi}_1 \approx 0.79$, whereas the analysis provides $\bar{\pi}_1 \approx 1$ (see also the table on Fig. \ref{fig:snake}). This mismatch is due to the fact that $\rho = 0.5$ is close to a \lq phase transition', at which the system switches from a regime in which two stable solutions exist (in particular, one in which both influencers survive) to a regime in which influencer $i=1$ wins. This behavior is better illustrated in Fig.~\ref{fig:snake}, where the curve corresponding to $\rho=0.5$ is almost tangent to the bisector. It should be noted that the \lq\lq empty" region in Figure \ref{fig:sim_th_comparison} is directly related to this behavior since no stable solutions can exist for that values of $\bar{\pi}_i$. In fact, there is no \textit{stable} intersection with the bisector in Figure \ref{fig:snake} in the corresponding interval. \begin{comment} \begin{table}[h!] \begin{center} \caption{Comparison between simulation and FPA} \label{tab:table1} \begin{tabular}{S[table-number-alignment=right]| S[table-number-alignment=right] S[table-number-alignment=right]} \toprule \textbf{$\rho$} & \textbf{$\tilde{p}_1$} & \textbf{$\tilde{p}_1$}\\ & $sim$ & $fp$ \\ \midrule 0.0 & 0.682 & 0.684\\ 0.001 & 0.683 & 0.684\\ 0.01 & 0.684 & 0.685\\ 0.1 & 0.693 & 0.695\\ 0.3 & 0.725 & 0.728\\ 0.4 & 0.749 & 0.758\\ 0.5 & 0.789 & 0.999\\ 0.8 & 0.986 & 0.999\\ 1.0 & 0.995 & 1.0\\ \bottomrule \end{tabular} \end{center} \end{table} \begin{figure}[h] \centering \includegraphics[width=.9\linewidth]{/vect/sim_vs_equations/snake_num_solution.pdf} \caption{Graphical solution of the equation \ref{eq:eq_snake} of the form $\tilde{p_i} = f(\tilde{p_i})$. Interestingly, one can observe a portion of the dashed line that has no intercepts followed by a portion where the intercepts are not stable (i.e. the tangent line has a greater slope than the bisector). This gives an indication of the reason for the area without points in Figure \ref{fig:sim_th_comparison}.} \label{fig:snake} \end{figure} \end{comment} \begin{figure}[h] \centering \includegraphics[width=.7\linewidth]{sim_vs_th_rectangular.pdf} \caption{Comparison between analytical results, including the exact extreme points calculated in \ref{sec:const_rho} and \ref{sec:infl_wins}, and the linear relationship between $\bar{x}$ and $\bar{\pi}_1$ according to Equation (\ref{eq:o_bar_2infl}). Diamonds represent the fixed-point approximation for the solution of equation (\ref{eq:eq_snake}). Simulation results of the stochastic dynamics, represented by circles, were obtained by averaging $100$ realizations of the process as described by Algorithm \ref{alg:model}. We consider a scenario in which $\alpha=0.05, \beta=0.93$, with two influencers at the extremes of the domain, with $f^{(0)}=0.3, f^{(1)}=0.7$ and the same initial absolute popularity $p_0=p_1=100$. Numerical values from simulation and fixed-point approximation are reported in the table alongside the plot in Fig. \ref{fig:snake}.} \label{fig:sim_th_comparison} \end{figure} \begin{figure}[h!] \centering \begin{subfigure}{.30\textwidth} \vspace{-0.8cm} \captionsetup{labelformat=empty} \caption{Table 2: Simulation and FPA} \centering \scalebox{0.80}{ \label{tab:table1} \begin{tabular}{S[table-number-alignment=right]| S[table-number-alignment=right] S[table-number-alignment=right]} \toprule \textbf{$\rho$} & \textbf{$\bar{\pi}_1$} & \textbf{$\bar{\pi}_1$}\\ & $SIM$ & $FPA$ \\ \midrule 0.0 & 0.682 & 0.684\\ 0.001 & 0.683 & 0.684\\ 0.01 & 0.684 & 0.685\\ 0.1 & 0.693 & 0.695\\ 0.3 & 0.725 & 0.728\\ 0.4 & 0.749 & 0.758\\ 0.5 & 0.789 & 0.999\\ 0.8 & 0.986 & 0.999\\ 1.0 & 0.995 & 1.0\\ \bottomrule \end{tabular} } \end{subfigure} \begin{subfigure}{.65\textwidth} \centering \includegraphics[width=0.9\linewidth]{snake_num_solution.pdf} \end{subfigure} \caption{Graphical solution of $\bar{\pi}_i = f(\bar{\pi}_i)$, (\ref{eq:eq_snake}). Stable solutions corresponds to intercepts between $f(\bar{\pi}_i)$ and the bisector, such that $f'(\bar{\pi}_i) < 1$. We observe that non-trivial solutions (i.e., solutions in which both influencers survive) exist, roughly in the interval $[0.7,0.8]$, provided that $\rho$ is not too large (i.e., $\rho < 0.5$). For $\rho > 0.5$, the only stable solution is $\bar{\pi} = 1$. This explains the results in Figure \ref{fig:sim_th_comparison}. Simulation results reported on the alongside table confirm the validity of the analytical predictions. } \label{fig:snake} \end{figure} \subsection{Implications of algorithmic personalization} We summarize here the insights into {\em algorithmic personalization} suggested by the emergent behavior of our model. We already mentioned how content filtering favors influencers with a \textit{structural advantage}. For instance, in section \ref{sec:sim_rate}, we showed that personalization promotes the influencer with higher posting frequency, and, in section \ref{sec:sim_cons}, the one with lower consistency. In addition, in \ref{phase-trans}, we presented a case where a \lq phase transition' is observed as a function of the filtering strength (i.e., $\rho$). Indeed, after a certain threshold, the favored influencer (say influencer 1) is the only one that survives ($\bar{\pi}_0 \rightarrow 0$). In such a situation, the population is exposed to the opinions of a single individual, hindering diversity on the social platform. It is also interesting to discuss the results in section \ref{sec:final_conf} concerning the effects of personalization on the opinion distribution of regular users. The two possible outcomes when { sharp} personalization is applied are: either the emergence of two echo chambers with users holding more radical positions in both directions or the onset of an unstable situation in which the two influencers coexist for a limited amount of time, after which $\bar{\pi}_i\rightarrow 1$ for an $i$ dependent on the specific sample path. \section{Online social network data} \label{sec:data} This section examines data collected from Facebook and Instagram social networks and compares the observed behavior with some of the findings of our Communication Asymmetry model. \subsection{Correlation between frequency of publication and popularity} In previous sections, especially in \ref{sec:model_vs_param} and \ref{sec:comparison}, we discussed \textit{structural advantage} from the influencer's point of view. One of the key advantage parameters, as observed across all experiments, is the publication frequency $f^{(i)}$: the higher $f^{(i)}$, the greater the advantage (see Figure \ref{fig:metric_rate}). In this section, we attempt to validate this finding by correlating the frequency of publication of influencers with their popularity growth, using the total number of \textit{followers}, i.e., the number of people subscribed to the \textit{profile}, as a proxy for popularity. We consider temporal sequences from Instagram on a sample set of $110$ influencers. \begin{figure}[h!] \centering \includegraphics[width=0.45\textwidth]{rate_vs_pop.pdf} \caption{Distribution of the correlation coefficient between monthly number of posts and popularity growth (in terms of number of \textit{followers}).} \label{fig:rate_pop} \end{figure} For each influencer, we considered a temporal granularity of one month, determined the number of posts during this period, and calculated the relative change in the number of \textit{followers} considering the values at the beginning and end of the interval. Then for each user, we calculated the Pearson correlation coefficient between the number of posts and the relative variation of followers in the month. In Figure \ref{fig:rate_pop}, we show the distribution of these correlation coefficients. Results suggest that there exists, in general, a positive correlation between the two quantities, i.e., influencers with aggressive posting habits tend (but not always) to get more followers, which likely favors them when in competition with other influencers on social media platforms. This is consistent with the model predictions shown in section \ref{sec:sim_rate}. \subsection{Case Study: Italian government crisis in August 2019} In June 2018, a few months after the general elections, Giuseppe Conte was appointed Italian Prime Minister. Two parties formed his supporting coalition: Movimento 5 Stelle (his own party, holding the relative majority of the Italian Parliament) and Lega, whose leader was Matteo Salvini. In August 2019, Salvini decided to withdraw Lega's support to the government, starting a crisis aimed at driving Italians to new elections and gaining more votes. However, Movimento 5 Stelle managed to reach an agreement with various parties to form a new government, and on September 5, 2019, Giuseppe Conte became Prime Minister for the second time. The coalition that supported this new administration clearly excluded Lega. In this section, we apply the proposed model to reproduce the sudden rise of Giuseppe Conte's popularity in social networks during the government crisis in August 2019. We exploit the multidimensional capability of the model considering two directions: \textit{Politics}, reference topic for Salvini and Conte, and attitude toward government fall (\textit{End government}, see Figure \ref{fig:conte_salvini}). \begin{figure}[h!] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\linewidth]{init_dist_hist_new.pdf} \caption{Initial distribution} \label{fig:init_cs} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\linewidth]{dist_hist_end_transient_new.pdf} \caption{After the transient} \label{fig:before_trans_cs} \end{subfigure} \caption{Initial distribution density of the population along the \textit{Politics} direction and \textit{End government} direction. The opinion position of the two leaders in the space is depicted with a green (Salvini) and a yellow (Conte) point.} \label{fig:conte_salvini} \end{figure} In the opinion space, we assume Salvini has a more radical political viewpoint, while Conte has an opposing and more moderate position (described somehow arbitrarily by putting Salvini at $x_{Politics}=0$, Conte at $x_{Politics}=0.76$). We assume that the population has a moderate \textit{initial} opinion (centered at $x_{Politics}=0.5$, see Figure \ref{fig:init_cs}). Regarding the attitude toward government fall, the two politicians obviously have a completely different opinion (Salvini has $x_{End government}=1$ while Conte has $x_{End government}=0$). We assume that the population is strongly polarized towards Conte's opinion in this latter direction (Figure~\ref{fig:conte_salvini}). This is an a posteriori assumption made knowing the outcome of the social confrontation. \begin{figure}[h!] \centering \includegraphics[width=0.8\linewidth]{setting_sketch.drawio.pdf} \caption{Timeline of modelled scenario from July 7, to September 22. From July 28 to September 1 we have a consistency switch, with posts along \textit{End government} direction.} \label{fig:cs_setting} \end{figure} A period of eleven weeks is considered, from July 7 to September 22, during which data was collected weekly from Facebook. A total of 1162 posts were published, of which 125 were by Conte. The \textit{rate} $f^{(i)}$ is calculated as the number of posts by an influencer relative to the total number of posts ($f^{(Conte)}=0.108$, $f^{(Salvini)}=0.892$). Some simplifying assumptions are necessary to apply the model. We assume that the two politicians have a \textit{consistency} $c^{(i)}$ of exactly one (real values are often close to this value, see Figure~\ref{fig:cons_distrib}). Moreover, Giuseppe Conte and Matteo Salvini are the only influencers. Although this hypothesis is restrictive, in the scenario studied, the two influencers were the main (active and popular) protagonists during the government crisis. Moreover, we consider the simplest scenario in which personalization is not employed: $\rho=0$ and thus $\omega \equiv 1$. We consider a \textit{feedback} function of the form $\theta = e^{-8.25 (x^{(u)}-x^{(i)})^2}$ for both opinion directions. For an exhaustive list of the parameters, we refer the reader to Table 3. \begin{comment} \fg{we exclude the algorithmic personalization by choosing $\rho=0$. This seems a strong assumption however,} {\color{red} Franco: una giustificazione me la sarei anche data. Però potrebbe essere un po' cervellotica:} i) nella realtà i nuovi followers sono utenti che non seguivano un certo individuo, sono esposti ai suoi post (dalla piattaforma o tramite i loro contatti) e cominciano a seguirlo. Nuovi followers = incremento in popolarità. ia) solo utenti nuovi portano ad un aumento in popolarità ii) queste persone sono gli "indecisi" -> distribuzione \textit{moderata} tipo gaussiana iii) Nel nostro modello il numero di utenti $N_u$ non dovrebbe contare, ma conta la distribuzione iv) i nostri utenti non fanno nulla, quindi possiamo immaginare anche che lo users $u$ non sia sempre associato alla stessa persona, ma sia una 'rappresentazione' di una persona 'indecisa' -> la distribuzione degli utenti diventa 'distribuzione degli indecisi raggiunti dalla piattaforma', questo motiva la scelta di non considerare la personalizzazione $\omega$. Problemi di questo sproloquio: i) il transitorio non è più molto motivato, è come se le differenze in popolarità dopo il transitorio se le fossero fatte solo sulla popolazione degi indecisi. ia) non è nenache vero, perchè si può immaginare che anche gli indecisi siano più esposti (mediaticamente) a salvini, e quindi la distribuzione iniziale loro deve essere 'in equilibrio' con le popolarità normalizzate iniziali di Conte e salvini ii) bisogna spiegare che il feedback non è solo una questione di like, ma è associato ai "nuovi" like. Bisognerebbe esplicitare il fatto che i "vecchi" followers non constribuiscono più alla popolarità (almeno in questo setting che ci siamo immaginati) \end{comment} Figure \ref{fig:cs_setting} shows the timeline of the experiment. The two influencers start with the same initial popularity. We consider a transient of $N_t=10000$ discrete time-units, after which the stationary normalized popularities $\pi_i$ roughly correspond to the empirical normalized popularities obtained by dividing the number of followers of each influencer by the total number of the two. After the transient, we can see in Figure \ref{fig:before_trans_cs} that the distribution of public opinion is skewed towards Salvini, who, in turn, has a higher popularity ratio due to his higher publication frequency. After the transient, the crisis happens and both influencers start posting in the \textit{Endgoverment} direction (i.e., we observe a consistency shift for both influencers), during a time window of five weeks that approximates the duration of the government crisis, after which the two politicians switch back to posting on the \textit{Politics} direction. Note that the initial users' opinion distribution along the \textit{Endgoverment} axes is concentrated around Conte's point of view. Even with these limitations, it is still possible to reproduce the observed social behavior as a whole: it corresponds to a situation where an influencer is in stark contrast to the opinions of its user base and loses ground with respect to the other influencer. Note that, in the model, only a very unbalanced distribution of the population towards Conte's opinion (against the government fall) can explain the sudden increase in Conte's popularity, despite the remarkable differences in popularity ratios in favor of Salvini. Figure \ref{fig:conte_salvini_res} compares the simulation results of the described setting and Facebook's measurements. Note how the model can explain the sudden rise in Giuseppe Conte's popularity, precisely in the weeks of the government crisis. \begin{figure}[h!] \centering \includegraphics[width=.8\linewidth]{zoom_conte_with_ci.pdf} \caption{The popularity ratio $\pi_{Conte}$ for Conte, the one obtained from Facebbok data and the one from the model along with its 95\% confidence interval, computed over 10 realizations of the process. It can be seen how the model follows the increase in popularity during August 2019.} \label{fig:conte_salvini_res} \end{figure} Clearly, our model does not exactly fit empirical observations but simply provides qualitative insights into the possible causes of the rather sudden popularity shift that was observed. Many of the model's parameters are unknown, such as the opinion distribution, the weights of the updating rule, or the \textit{feedback} function. However, by making reasonable assumptions about some of the parameters, one can obtain a reasonably good fit, and exploit the explanatory capability of the model to acquire better confidence in the hidden mechanisms beneath observed dynamics. In this experiment, we followed exactly this approach and we looked for some mechanisms that could justify the same sudden surge in popularity that occurred during the government crisis. As the main outcome of our analysis, we conclude that the observed popularity trends of the two considered influencers can be largely explained by considering the fear of political instability in the user base. \vspace{5mm} \begin{table}[h!]\footnotesize \begin{center} \caption*{Table 3: Parameters and functions for the Case Study} \label{tab:table_conte_salvini} \begin{tabular}{l|c|l} \toprule \textbf{Symbol} & \textbf{Value - Form} & \textbf{Description}\\ \midrule $N_i$ & 2 & Number of influencers\\ $x_0^{(Conte)}$ & 0.76 & Opinion of Giuseppe Conte on direction $j$\\ $x_0^{(Salvini)}$ & 0.0 & Opinion of influencer $1$ on direction $j$\\ $f^{(Conte)}$ & 0.108 & Opinion of Giuseppe Conte on direction $j$\\ $f^{(Salvini)}$ & 0.892 & Opinion of influencer $1$ on direction $j$\\ $r^{(Conte),(Salvini)}$ & 0 & Refrence direction of both influencers\\ $p_{Conte,Salvini}(0)$ & 20 & Initial absolute popularity of both influencers\\ $N_u$ & 10000 & Number of regular users\\ $N_{iter}$ & 15000 & Number of iterations for each simulation\\ $N_{t}$ & 10000 & Duration of the transient phase\\ $w$ & 550 & Length of the government crisis\\ $\alpha$ & 0.3 & First weight in the updating rule in Eq. \ref{eq:d_model_user_update}\\ $\beta$ & 0.65 & Second weight in the updating rule in Eq. \ref{eq:d_model_user_update}\\ $\theta(\cdot)$ & $e^{-8.25 (x^{(u)}-x^{(i)})^2}$ & Functional form of the \textit{feedback} function\\ $\omega(\cdot)$ & $\rho=0 \implies \omega \equiv 1$ & Functional form of the \textit{visibility} function\\ \bottomrule \end{tabular} \end{center} \end{table} \section{Conclusions} \label{sec:conclusion} In recent times, online social interactions appear essential to human relationships and play an increasingly important role in opinion formation. To understand the mechanisms underlying this novel communication paradigm, it is of utmost importance to develop flexible frameworks suitable for describing interactions on social media platforms. In this work, we have developed an opinion model tailored to online interactions, with particular attention to distinguishing between two classes of users, namely \textit{regular users} and \textit{influencers}. We characterized the influencers by introducing the concept of \textit{reference direction}, which links unrelated topics discussed by the same influencer. Measurements collected from real online social networks support our modeling assumptions. Similarly to other works in the recent literature, we integrated \textit{algorithmic personalization} in a flexible and tunable manner. We have shown how content filtering reinforces inequality by favoring the \textit{structurally advantaged} influencer and, in most cases, preventing the \lq\lq competing" influencer from remaining visible to the population. Moreover, even in structurally balanced conditions, personalization can lead to the emergence of \textit{echo-chambers}, in which users' opinion also radicalizes along non-reference directions. The proposed model is a preliminary attempt to describe the complexity of online interactions and comes with some limitations. In our model, users are passive entities, and influencers are stubborn agents. Moreover, \textit{homophily} is the only driver of individuals' interaction, as no other relationship structure was considered. Nonetheless, despite the simplifying assumptions, the emergent behavior of the model proved rich enough to reveal the effects of content personalization and shed light on influencer popularity dynamics. Our work points to several research directions, such as viewing users as active agents capable of publishing their own posts and forwarding (i.e., sharing) posts from influencers. This can pose significant challenges in terms of analytic tractability. Another promising direction could be to look at influencers as \lq\lq strategic" players aiming at maximizing their popularity on the platform by exploiting the internal mechanisms of the platform itself (such as algorithmic content filtering). \vspace{0.5cm} \textbf{Declaration of Competing Interest}\\ The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
\section{Analogy between time and space} While studying the diffusion to subdiffusion transition for continuous time random walks (CTRWs) with waiting times following $\psi(\tau) \sim \tau^{-1-\alpha}$ ($\tau\to\infty$) we have used the quantity \begin{align} \phi_\alpha(t) = \Big\langle \frac{\text{max}\{\tau_1, ..., \tau_{N_t}\}}{\sum^{N_t}_{i=1} \tau_i}\Big\rangle \label{phi_t} \end{align} and analyzed its long-time behavior. While considering the maxima of waiting times $\tau_i$, bounded above by $t$, we do not explicitly account for the backward reference time $B_t = t-\sum^{N_t}_{i=1}\tau_i$ \cite{holl2020extreme} for a couple of reasons. First is that as $\phi_\alpha(t)$ is a function of $t$, occurrence of even a large $B_t$ (expected for power law waiting times) would not change its value because $\tau_i$ are sampled up to the last jump. Secondly, exclusion of $B_t$ allows us to get away with the correlations which will appear due to the fact that the time of measurement is fixed at $t$ \cite{holl2020extreme}. This has the further advantage of putting time and space on equal footing as the quantity to study spatial fluctuations \begin{align} F_\beta(X) = \Big\langle\frac{\text{max}\{|x_1|,...,|x_{N_t}|\}} {\sum^{N_t}_{i=1}|x_i|}\Big\rangle. \end{align} is analogous to $\phi_\alpha(t)$ with $\tau_i$ replaced by $|x_i|$. In terms of fluctuations, we focus on the absolute value of location of the CTRW upto the last jump in $F_\beta(X)$. Similarly, $\phi_\alpha(t)$ takes into account the waiting times only upto the last jump taking place before the observation time $t$. The analogy of $\phi_\alpha(t)$ and $F_\beta(X)$ sets the premise to study phase transitions at finite times once we start looking at the rare fluctuations of a CTRW. \section{Mean number of jumps near $t=0$} \begin{figure} \includegraphics[width=0.45\textwidth]{mean_jumps.eps} \caption{Comparison of numerically estimated $\langle N_t \rangle$ against the solution in (\ref{avg}) for (a) half Gaussian distribution: $\psi(\tau) = \sqrt{\frac{2}{\pi}} e^{-\tau^2/2}$, and (b) power law distribution $\psi(\tau) = \frac{1}{(1+\tau)^2}$. The symbols are numerical calculations and lines are $\langle N_t \rangle$ evaluated from (\ref{avg}).} \label{fig3} \end{figure} ~\\ The mean number of jumps in Laplace space is $\langle \tilde{N}_s \rangle = \frac{\tilde{\psi}_s}{s(1-\tilde{\psi}_s)}$ \cite{klafter2011first} and for waiting time distribution analytic near zero $\psi(\tau) \stackrel{\tau \to 0}{\sim} C_A \tau^A + C_{A+1} \tau^{A+1} + C_{A+2} \tau^{A+2} + \cdots$ we have in time domain \begin{align} \label{avg} &\langle N_t \rangle \approx \frac{C_A\Gamma(A+1)}{\Gamma(A+2)}t^{A+1} + \frac{C_{A+1}\Gamma(A+2)} {\Gamma(A+3)}t^{A+2} + \frac{C_{A+2}\Gamma(A+3)}{\Gamma(A+4)}t^{A+3} + \frac{C_{A}^2\Gamma^2(A+1)}{\Gamma(2A+3)}t^{2A+2} \nonumber\\ &+ \frac{2C_AC_{A+1}\Gamma(A+1)\Gamma(A+2)} {\Gamma(2A+4)}t^{2A+3} + \frac{C^3_{A}\Gamma^3(A+1)}{\Gamma(3A+4)}t^{3A+3}. \end{align} We compare the approximate value of $\langle N_t \rangle$ evaluated from (\ref{avg}) against numerical calculations in Fig.~\ref{fig3} and find that the approximate form in (\ref{avg}) captures the true behavior only at small times. The domain of the validity, however, depends on the exact nature of the distribution. For example, when the distribution of waiting times is half Gaussian, that is, $\psi(\tau) = \sqrt{\frac{2}{\pi}}e^{-\tau^2/2}$, we have $A = 0, C_A = \sqrt{\frac{2}{\pi}}, C_{A+1} = 0, C_{A+2} = -\sqrt{\frac{1}{2\pi}}$ and it is evident from Fig.~ \ref{fig3} (a) that the approximate form derived in (\ref{avg}) agrees with numerically estimated $\langle N_t \rangle$ upto $t \approx 1$. On the other hand, for the power law distribution $\psi(\tau) = \frac{1}{(1+\tau)^2}$ we find that the usefulness of (\ref{avg}) is reduced to half the range, that is, $t \in (0,1/2)$. The reason for this difference is that the small time behavior of $\psi(\tau)$ does not capture jumps taking place at finite times.
\section{Introduction} Over several decades, continued advances in electrical impedance tomography (EIT) have expanded the clinical capability of real-time cardiopulmonary monitoring systems by overcoming the limitations of traditional methods, such as cardiac catheterization through blood vessels \cite{Adler2017,Borges2012,Deibele2008,Frerichs2014,Kubicek1970,Kerrouche2001,Lee2018,Putensen2019,Zlochiver2006}. Recently, based on thoracic EIT, a patient's hemodynamic function can be noninvasively and continuously estimated in real-time by surveilling a signal extracted using EIT, the so-called cardiac volume signal (CVS), which has a strong relationship with key hemodynamic factors such as stroke volume and cardiac output \cite{Jang2020,Askari2019,Westterhof2019}. In clinical applications, however, a cardiac volume signal is often of low quality, mainly because of the patient's deliberate movements or inevitable motions during clinical interventions such as medical treatment and nursing. Because postural change causes movement of the chest boundary to which existing EIT solvers are highly sensitive owing to time-difference-reconstruction characteristics \cite{Adler1996,Boyle2010,Lionheart1998,Lee2017,Seo2013}, motion-induced artifacts are generated in the CVS, as shown in Figure \ref{CVSmotionartifacts}. \begin{figure}[h] \centering \includegraphics[width=0.65\textwidth]{fig1.pdf} \caption{Motion-induced artifacts in cardiac volume monitoring using electrical impedance tomography. Patient's deliberate movements or inevitable motions during clinical intervention cause severe artifacts in a cardiac volume signal.} \label{CVSmotionartifacts} \end{figure} CVS extraction is to separate a cardiogenic component from the EIT voltage data, resulting from current injections at electrodes attached across a human chest. In recent studies \cite{Jang2020,Lee2021}, effective CVS extraction was successful in motion-free measurements where voltage data are mainly influenced by air and blood volume changes in the lungs, heart, and blood vessels comprehensively, but not by motions. In contrast, achieving the cardiogenic component separation in motion-influenced measurements is still a long-term challenge. Postural changes in EIT measurements cause strong distortion of the voltage data \cite{Adler1996,Zhang2005} and easily disturb the extraction of relatively weak cardiogenic signals \cite{Brown1992,Pikkemaat2014,Leonhardt2012}. Handling motion interference has been a huge challenge in most EIT-based techniques for enhancing clinical capability, but not researched much yet \cite{Yang2022}. Adler \textit{et al.} \cite{Adler1996} and Zhang \textit{et al.} \cite{Zhang2005} investigated the negative motion effect in the EIT. Soleimani \textit{et al.} \cite{Soleimani2006} and Dai \textit{et al.} \cite{Dai2008} proposed a motion-induced artifact reduction method by reconstructing electrode movements along with conductivity changes. Lee \textit{et al.} \cite{Lee2017} analyzed motion artifacts in EIT measurements and proposed a subspace-based artifact rejection method. Yang \textit{et al.} \cite{Yang2022} suggested the discrete wavelet transform-based approach that reduces motion artifacts of three specific types. However, clinical motion artifacts are still not effectively addressed because of practical motion's immense diversity and complexity. Accordingly, for the time being, the EIT-based hemodynamic monitoring system attempts to be preferentially developed toward filtering motion-influenced CVSs rather than recovering them. In the clinical environment, this filtration can provide immediate warnings so that clinicians can minimize confusion regarding the patient's condition, reduce clinical resource utilization, and improve the confidence level of the monitoring system \cite{Charlton2021}. This study aims to develop a signal quality indexing (SQI) method that assesses whether motion artifacts influence transient CVSs. To take advantage of the periodicity and regularity in cardiac volume changes, the assessment is performed on each cardiac cycle, whose time intervals are identified using the synchronized electrocardiography (ECG) system. We leverage machine learning (ML), which has provided effective solutions for various biosignal-related tasks through feature disentanglement of complicated signals \cite{Alfaras2019,Belo2017,Celin2018,Hyun2021,Lecun2015,Seo2019,Sahoo2020,Wasimuddin2020}. The use of ML could be suitable for our real-time monitoring application that requires fast inference and automation as well as high accuracy. We apply divergent ML methods, which can be sorted into discriminative-model and manifold-learning approaches. The discriminative-model approach is first considered, where an SQI map is directly trained using a paired dataset of CVS and its label \cite{Cramer2002,Hinton2007,Simonyan2014}. Although this approach provides a high performance on a fixed dataset, owing to the class imbalance problem, there is a risk of overfitting on motion-influenced CVS data in the scope of generalization or stability \cite{Buda2018,Cao2019,He2009,Van2017}. Motion artifacts can vary considerably in real circumstances, whereas collecting CVS data in numerous motion-influenced cases is practically limited because of the high cost, intensive labor, security, and ambiguity in clinical data acquisition and annotation \cite{Chapelle2009,Schlegl2017,Van2020,Zhu2009}. To handle this conceivable difficulty, the manifold-learning approach \cite{Jolliffe2016,Kingma2013,An2015,Higgins2016} is examined as an alternative. It does not learn irregular and capricious patterns of motion-influenced CVSs and only takes advantage of the learned features from motion-free CVSs. Numerous experiments have been conducted using actual EIT data. Empirical results demonstrate that discriminative and manifold-learning models provide accurate and automatic detection of motion-influenced CVS in real-time. The best discriminative model achieved an accuracy of 0.95, positive and negative predictive values of 0.96 and 0.86, sensitivity of 0.98, specificity of 0.77, and AUC of 0.96. The best manifold-learning model achieved accuracy of 0.93, positive and negative predictive values of 0.97 and 0.71, sensitivity of 0.95, specificity of 0.80, and AUC of 0.95. The discriminative models yielded a more powerful SQI performance; in contrast, the manifold-learning models provided stable outcomes between the training and test sets. Regarding to practical applications, the choice of two models relies on what should be emphasized in the monitoring system in terms of performance and stability. \section{Methods} \begin{figure}[h] \centering \includegraphics[width=1\textwidth]{fig2} \caption{16-channel system of thoracic EIT and CVS extraction. The EIT machine measures voltage differences by injecting currents via electrodes attached along human chest. A cardiac volume signal $\boldsymbol x_{\boldsymbol t}$ is extracted by taking suitable weighting $\boldsymbol w$ to the time-difference transconductance $\dot{\boldsymbol g}_t$, which is defined by measured voltage data. Here, $\boldsymbol w$ is called as a leadforming vector, which is designed to separate a cardiogenic trans-conductance change from superposed data $\dot{\boldsymbol g}_t$ \cite{Lee2021}.} \label{EItsystem} \end{figure} This study considers the 16-channel system of the thoracic EIT, where 16 electrodes are attached along the human chest (see Figure \ref{EItsystem}). The EIT system is assumed to be synchronized with the ECG system, which provides the time interval for each cardiac cycle. The EIT device measures a set of voltage differences by injecting an alternative current of $I$ (mA) through pairs of adjacent electrodes while keeping all other electrodes insulated. At sampling time $t$, the following voltages are acquired: \begin{equation} \label{voltagedata} \{ V^{j,k}_{t} ~ : ~ V^{j,k}_t = U_t^{j,k} - U_t^{j,k+1}, j \in \mathcal I, k \in \mathcal I \backslash \{j,j+1\} \} \end{equation} where $\mathcal I$ is an index set defined by $\mathcal I = \{1,2,\cdots,16\}$, $\mathcal E_k$ is the $k$-th electrode, and $U_t^{j,k}$ is the electrical potential on $\mathcal E_k$ subject to the current injection from $\mathcal E_j$ to $\mathcal E_{j+1}$. For notational convenience, $\mathcal E^{0}$ and $\mathcal E^{17}$ can be understood as $\mathcal E^{16}$ and $\mathcal E^{1}$, respectively. Once the current is injected from $\mathcal E^{j}$ to $\mathcal E^{j+1}$ for some $j \in \mathcal I$, the voltage is measured at each of the 16 adjacent electrode pairs $(\mathcal E^k, \mathcal E^{k+1})_{k \in \mathcal I}$. Among the 16 voltages, $V_t^{j,j-1}$, $V_t^{j,j}$, and $V_t^{j,j+1}$ are discarded to reduce the influence of the skin-electrode contact impedance \cite{Seo2013}. Because we perform 16 independent current injections, in total, $208$ $(= 16 \times 13)$ voltages are obtained and used to produce the CVS. \subsection{CVS Extraction Using EIT and Influence of Motion} A transconductance (column) vector $\boldsymbol g_t \in \mathbb{R}^{208}$ can be defined using the voltage data \eqref{voltagedata} as follows: \begin{equation}\label{conductance} {\footnotesize \boldsymbol g_t = \begin{bmatrix} \dfrac{I}{\mathfrak R(V^{1,3}_t)}, \cdots, \dfrac{I}{\mathfrak R(V^{1,15}_t)}, \cdots, \dfrac{I}{\mathfrak R(V^{16,2}_t)},\cdots \dfrac{I}{\mathfrak R(V^{16,14}_t)} \end{bmatrix}^T} \end{equation} where $T$ represents the vector transpose and $\mathfrak R$ is an operation for extracting the real part of a complex number. Here, $\boldsymbol g_t$ is updated every 10ms. A CVS, denoted by $\boldsymbol x_t \in \mathbb{R}$, is obtained by \begin{equation} \boldsymbol x_t = \boldsymbol w^T \dot{\boldsymbol g_t} \end{equation} where $\boldsymbol w \in \mathbb{R}^{208}$ is a weighting (so-called leadforming) vector and $\dot{\boldsymbol g_t}$ is time difference of $\boldsymbol g_t$ given by \begin{equation} \dot{\boldsymbol g}_t = \boldsymbol g_t - \boldsymbol g_{t_0} \mbox{ for reference time } t_0 \end{equation} In the absence of motion, the transconductance $\dot{\boldsymbol g}_t$ can be expressed by \begin{equation}\label{noMAcondi} \dot{\boldsymbol g}_t = \dot{\boldsymbol g}^{\mbox{\scriptsize air}}_t + \dot{\boldsymbol g}^{\mbox{\scriptsize blood}}_t \end{equation} where ${\boldsymbol g}^{\mbox{\scriptsize air}}_t$ and ${\boldsymbol g}^{\mbox{\scriptsize blood}}_t$ are transconductance vectors related to air and blood volume changes in the lungs and heart, respectively. The weighting vector $\boldsymbol w$ is designed to provide \begin{equation}\label{LFcondi} \boldsymbol w^T \dot{\boldsymbol g}_t = \boldsymbol w^T(\dot{\boldsymbol g}^{\mbox{\scriptsize air}}_t + \dot{\boldsymbol g}^{\mbox{\scriptsize blood}}_t)= \boldsymbol w^T \dot{\boldsymbol g}^{\mbox{\scriptsize blood}}_t \end{equation} See Figure \ref{EItsystem}. Kindly refer to \cite{Lee2021} for details on determining $\boldsymbol w$. Even though the cardiogenic signal ${\boldsymbol g}^{\mbox{\scriptsize blood}}_t$ is weak, it can be accurately decomposed from the data $\boldsymbol g_t$. In light of the previous analysis in \cite{Lee2017}, the following explains why the quality of the CVS is degraded by motion, as shown in the middle part of Figure \ref{CVSmotionartifacts}. In the presence of motion, the transconductance $\dot{\boldsymbol g}_t$ can be approximated by \begin{equation}\label{motionartifacts} \dot{\boldsymbol g}_t \approx \dot{\boldsymbol g}_t^{\mbox{\scriptsize normal}} + \dot{\boldsymbol g}^{\mbox{\scriptsize motion}}_t \end{equation} where $\dot{\boldsymbol g}^{\mbox{\scriptsize normal}}_t = \dot{\boldsymbol g}^{\mbox{\scriptsize air}}_t + \dot{\boldsymbol g}^{\mbox{\scriptsize blood}}_t$ and $\dot{\boldsymbol g}^{\mbox{\scriptsize motion}}_t$ is the motion-induced effect. Appendix \ref{appendixA} presents details of \eqref{motionartifacts}. Determining the vector $\boldsymbol w$ itself can be considerably affected by motion artifacts \cite{Lee2021}. Moreover, even if $\boldsymbol w$ satisfies \eqref{LFcondi}, we have \begin{equation} \boldsymbol x_t = \boldsymbol w^T \dot{\boldsymbol g}_t \approx \boldsymbol x_t^{\mbox{\scriptsize normal}} + \boldsymbol x_t^{\mbox{\scriptsize motion}} \end{equation} where $\boldsymbol x_t^{\mbox{\scriptsize normal}} = \boldsymbol w^T \dot{\boldsymbol g}_t^{\mbox{\scriptsize blood}}$ and $\boldsymbol x_t^{\mbox{\scriptsize motion}} = \boldsymbol w^T \dot{\boldsymbol g}_t^{\mbox{\scriptsize motion}}$. The last term $\boldsymbol x_t^{\mbox{\scriptsize motion}}$ describes motion artifacts in the CVS. \begin{figure}[h] \centering \includegraphics[width=1\textwidth]{fig3.pdf} \caption{Schematic description of machine learning-based signal quality assessment for cardiac volume monitoring in electrical impedance tomography.} \label{mainfig} \end{figure} \subsection{CVS Quality Assessment and Data Preprocessing} \label{DataPre} This study aims to assess the CVS ($\boldsymbol x_t$) for detecting motion-induced signal quality degradation. See Figure \ref{mainfig}. This can be accomplished by developing an SQI map $\boldsymbol f : \boldsymbol x_t \mapsto \boldsymbol y_t$ such that \begin{equation} \label{goal1} \boldsymbol f(\boldsymbol x_t) = \boldsymbol y_t = \left\{ \begin{array}{cl} 1 & \mbox{if } ~ \boldsymbol x_t^{\mbox{\scriptsize motion}} \approx 0 \\ 0 & \mbox{if } ~ \boldsymbol x_t^{\mbox{\scriptsize motion}} \not\approx 0 \\ \end{array}\right. \end{equation} However, it is arduous to achieve \eqref{goal1}, where the assessment is conducted on an individual CVS at every sampling time. Instead, we take advantage of the periodicity and regularity of cardiac volume changes according to the heartbeat. The time interval of each cardiac cycle is identified using a synchronized ECG system. Our quality assessment is conducted on every cardiac cycle of CVS, where a cardiac cycle is defined by the time interval consisting of two consecutive ECG R-wave peaks as the end points. For a given time $t_{\mbox{\scriptsize cyc}}$, let the interval $[t_{\mbox{\scriptsize cyc}},t_{\mbox{\scriptsize cyc}}+\Delta t_{\mbox{\scriptsize cyc}}]$ be the corresponding cardiac cycle, where $\Delta t_{\mbox{\scriptsize cyc}}$ is assumed to be $\Delta t_{\mbox{\scriptsize cycle}} = 10\mbox{ms} \times (\boldsymbol v-1)$ for some $\boldsymbol v \in \mathbb{N} \backslash \{1\}$. Here, $\mathbb{N}$ denotes the set of positive integers. A vector gathering all CVSs during the cycle, denoted by $\boldsymbol X_{t_{\mbox{\scriptsize cyc}}} \in \mathbb{R}^{\boldsymbol v}$, is defined as \begin{equation}\label{CVSvec} \boldsymbol X_{t_{\mbox{\scriptsize cyc}}} = \begin{bmatrix} \boldsymbol x_{t_{\mbox{\scriptsize cyc}}}, \boldsymbol x_{t_{\mbox{\scriptsize cyc}}+10\mbox{\scriptsize ms}}, \cdots, \boldsymbol x_{t_{\mbox{\scriptsize cyc}}+10\mbox{\scriptsize ms} \times (\boldsymbol v-1)} \end{bmatrix} ^T \end{equation} The map $f$ in \eqref{goal1} can be modified into \begin{equation} \label{goal2} \boldsymbol f(\boldsymbol X_{t_{\mbox{\scriptsize cyc}}}) = \boldsymbol y_{t} = \left\{ \begin{array}{cl} 1 & \mbox{for normal } \boldsymbol X_{t_{\mbox{\scriptsize cyc}}} \\ 0 & \mbox{for motion-influenced }\boldsymbol X_{t_{\mbox{\scriptsize cyc}}} \\\end{array}\right. \end{equation} To find $\boldsymbol f$ in \eqref{goal2}, we leverage ML, which can learn the domain knowledge of normal and motion-influenced CVSs from a training dataset of $N$ data pairs $\{\boldsymbol X^{(i)}, \boldsymbol y^{(i)}\}_{i=1}^{N}$. Prior to ML applications, the following issues need to be addressed in the CVS data. First, CVSs have significant inter-subject and intra-subject variability. This is because cardiac volume varies depending on various factors, including sex, age, condition, time, and body temperature. Therefore, scale normalization is required to enhance the stability and performance of ML while mitigating the high learning complexity associated with scale-invariant feature extraction \cite{Goodfellow2016,Xu2014}. Second, the dimensions of the input CVS data in \eqref{goal2} do not match each other (i.e., $\boldsymbol v$ is not constant) owing to heart rate variability \cite{Conny1993}. Because most existing ML methods are based on an input with consistent dimensions, size normalization is required. Figure \ref{CVSNormal} schematically illustrates the overall process. \begin{figure}[h] \centering \includegraphics[width=1\textwidth]{fig4} \caption{From the monitoring system, electrocadiography and cardiac volume signals are obtained. By identifying a cardiac cycle through electrocadiography data (R-wave peak detection), we extract cardiac volume signals at the corresponding cycle and then lastly apply normalization in terms of scale and size.} \label{CVSNormal} \end{figure} \subsubsection{Scale normalization} A simple method of normalizing the scale is to rescale the CVS data for individual cardiac cycles. Specifically, for a given CVS vector $\boldsymbol X_{t_{\mbox{\scriptsize cyc}}} \in \mathbb{R}^{\boldsymbol v}$, the scaling factor $\mathcal S$ is obtained using \begin{equation}\label{simplerescale} \mathcal S = \underset{i \in \mathcal V}{\mbox{max}} ~ |\boldsymbol x_{t_{\mbox{\tiny cyc}}+10\times i\mbox{\tiny (ms)}}| \end{equation} where the index set $\mathcal V$ is given by $\mathcal V=\{0,1,\cdots, \boldsymbol v - 1\}$. Normalized CVS data, denoted by $\underline{\boldsymbol X}_{t_{\mbox{\tiny cyc}}}$, are obtained by \begin{equation}\label{ScaleNormalization} \underline{\boldsymbol X}_{t_{\mbox{\tiny cyc}}} = \dfrac{\boldsymbol X_{t_{\mbox{\tiny cyc}}}}{\mathcal S} \end{equation} However, this scaling may not be appropriate to our application for the following reason. Abnormalities in CVS data include sudden increases or decreases in signal amplitude as well as irregular deformations of the shape profile. The normalization in \eqref{ScaleNormalization} can contribute to ignoring rapid amplitude changes. This study uses the following subject-specific scale normalization strategy. When the EIT device is used to monitor a certain subject, it is supposed that during the initial 20s calibration process, the device measures the normal CVS data available for scale normalization. Let $\mathcal X^{\mbox{\scriptsize subject}}$ be a set of corresponding CVSs given by \begin{equation} \mathcal X^{\mbox{\scriptsize subject}}=\{ \boldsymbol x_{10\times i\mbox{\tiny (ms)}} : i = -1999, -1998, \cdots, -1 \} \end{equation} Using the set $\mathcal X^{\mbox{\scriptsize subject}}$, a subject-specific scaling factor $\mathcal S^{\mbox{\scriptsize subject}}$ is obtained by \begin{equation} \mathcal S^{\mbox{\scriptsize subject}} = \underset{\boldsymbol x \in \mathcal X^{\mbox{\scriptsize subject}}}{\mbox{max}}|\boldsymbol x| \end{equation} This scale factor $\mathcal S^{\mbox{\scriptsize subject}}$ is used for the normalization in \eqref{ScaleNormalization} instead of the naive factor $\mathcal S$ in \eqref{simplerescale}. \subsubsection{Size normalization} To make the dimensions of the CVS data consistent, a CVS vector $\underline{\boldsymbol X}_{t_{\mbox{\scriptsize cyc}}}$ is embedded into $\mathbb{R}^{\nu}$ for a fixed constant $\boldsymbol \nu$. In the empirical experiment, the embedding space dimension was to be larger than any dimension of the CVS data in our dataset ($\boldsymbol \nu = 150$). Two normalization methods are considered. The first approach is to resample $\boldsymbol \nu$ points using linear interpolation with $\boldsymbol v$ data points in $\underline{\boldsymbol X}_t$. For the stationary interval $[0,1]$, the following linear interpolation function $\mathcal L$ is constructed: \begin{equation} \mathcal L(\dfrac{i}{\boldsymbol v-1}) = \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}+10\mbox{\tiny (ms)} \times (i-1)} \mbox{ for } i = 0,\cdots,\boldsymbol v-1 \end{equation} Subsequently, we obtain the normalized vector $\overline{\boldsymbol X}_{t_{\mbox{\tiny cyc}}} \in \mathbb{R}^{\boldsymbol \nu}$ using \begin{equation} \overline{\boldsymbol X}_{t_{\mbox{\tiny cyc}}} = \left[ ~ \mathcal L(0), \mathcal L(\dfrac{1}{\boldsymbol \nu - 1}), \mathcal L(\dfrac{2}{\boldsymbol \nu - 1}), \cdots, \mathcal L(1) ~ \right]^T \end{equation} This method normalizes the signal profile of CVS data into the desired length ($\boldsymbol \nu$) with no significant loss, but loses sampling time information. Second, the last value in $\underline{\boldsymbol X}_{t_{\mbox{\scriptsize cyc}}}$ (i.e., $\boldsymbol x_{t_{\mbox{\scriptsize cyc}}+10\mbox{\scriptsize (ms)} \times (\boldsymbol v-1)}$) is padded up to the desired length. This constant padding provides a vector $\overline{\boldsymbol X}_{t_{\mbox{\scriptsize cyc}}} \in \mathbb{R}^{\boldsymbol \nu}$, expressed by \begin{align} \overline{\boldsymbol X}_{t_{\mbox{\tiny cyc}}} = &[ ~ \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}}, \cdots, \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}+10\mbox{\tiny (ms)} \times (\boldsymbol v-2)}, \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}+10\mbox{\tiny (ms)} \times (\boldsymbol v-1)}, \\ & ~~ \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}+10\mbox{\tiny (ms)} \times (\boldsymbol v-1)}, \cdots, \underline{\boldsymbol x}_{t_{\mbox{\tiny cyc}}+10\mbox{\tiny (ms)} \times (\boldsymbol v-1)} ~ ]^T\label{PADD} \end{align} where the part \eqref{PADD} corresponds to the padding. In contrast to the first method, this normalization can preserve time information regarding sampling frequency, whereas the core profile of the CVS is supported at different time intervals. \subsection{Machine Learning Application} At this point, we are ready to apply ML for determining the SQI function \eqref{goal2}. Collected from various subjects and cardiac cycles, the following dataset is used: \begin{equation}\label{dataset} \{ \overline{\boldsymbol X}^{(i)}, \boldsymbol y^{(i)}\}_{i=1}^{N} \end{equation} where $\boldsymbol y^{(i)}$ is the SQI label corresponding to $\overline{\boldsymbol X}^{(i)}$. We note that $\overline{\boldsymbol X}$ is the CVS data for a cardiac cycle of some subjects and is normalized for both scale and size. In practice, the available training dataset \eqref{dataset} was highly imbalanced, where there were relatively few negative samples (motion-influenced CVSs). \begin{figure}[h] \centering \includegraphics[width=0.975\textwidth]{fig5} \caption{(a) Discriminative-model approach learns a signal quality indexing map $f$ by using CVS and label data. (b) Manifold-learning approach first learns common features of normal CVS data by finding a low dimensional manifold $\mathcal M^{\mbox{\scriptsize normal}}$. Signal quality assessment is based on computing the residual between original CVS data and projected one onto or near the learned manifold.} \label{MLFig} \end{figure} \subsubsection{Discriminative-model approach} The discriminative-model approach trains the SQI map $\boldsymbol f : \overline{\boldsymbol X} \mapsto \boldsymbol y$ in the following sense: \begin{equation} \boldsymbol f = \underset{\boldsymbol f \in \mathbb{F}}{\mbox{argmin}} ~ \dfrac{1}{N}\sum_{i=1}^{N}\mbox{dist}(\boldsymbol f(\overline{\boldsymbol X}^{(i)}),\boldsymbol y^{(i)}) \end{equation} where $\mathbb{F}$ is a set of learnable functions for a given ML model and $\mbox{dist}$ is a metric that measures the difference between the ML output $f(\overline{\boldsymbol X})$ and label $\boldsymbol y$. See Figure \ref{MLFig} (a). In our application with high class-imbalance, the following weighted cross-entropy can be used: \begin{equation} \mbox{dist}(\boldsymbol f(\overline{\boldsymbol X}),\boldsymbol y) = - \boldsymbol \zeta_{\mbox{\scriptsize pos}}\boldsymbol y\mbox{log}(\boldsymbol f(\overline{\boldsymbol X}))- \boldsymbol \zeta_{\mbox{\scriptsize neg}}(1-\boldsymbol y) \mbox{log}(1-\boldsymbol f(\overline{\boldsymbol X})) \end{equation} where $\boldsymbol \zeta_{\mbox{\scriptsize pos}}$ and $\boldsymbol \zeta_{\mbox{\scriptsize neg}}$ are the relative ratios of the positive and negative samples, respectively. Various classification models can be used, such as the logistic regression model (LR) \cite{Cramer2002}, multi-layer perceptron (MLP) \cite{Hinton2007}, and convolutional neural networks (CNN) \cite{Simonyan2014}. Detailed models used in this study are explained in Appendix \ref{appendixB1}. The discriminative model approach is a powerful method to guarantee high performance in a fixed dataset. However, it might suffer from providing stable SQI results in clinical practice because of highly variable negative samples. This is because these methods take advantage of learned information using only a few negative samples \cite{Buda2018,Cao2019,He2009,Van2017}. To achieve stable prediction, the manifold-learning approach can be alternatively used \cite{Chapelle2009,Van2020,Zhu2009}. \subsubsection{Manifold-learning approach} \label{sec:semi-sup} The manifold-learning approach learns common features from positive samples (i.e., normal CVS) and uses them to develop an SQI map. The remaining negative samples are utilized as auxiliary means for selecting a hyperparameter. Figure \ref{MLFig} (b) shows a schematic description of this process. A set of positive samples is denoted by $\{ \overline{\boldsymbol X}_{\mbox{\scriptsize pos}}^{(i)}\}_{i=1}^{N_{\mbox{\scriptsize pos}}}$, where $N_{\mbox{\scriptsize pos}}$ denotes the number of positive samples. In the first step, we learn a low-dimensional representation of $\overline{\boldsymbol X}_{\mbox{\scriptsize pos}}$ by training an encoder $\mathcal E : \overline{\boldsymbol X}_{\mbox{\scriptsize pos}} \mapsto \boldsymbol z$ and decoder $\mathcal D : \boldsymbol z \mapsto \overline{\boldsymbol X}_{\mbox{\scriptsize pos}}$ in the following sense \cite{Jolliffe2016,Hinton2006}: \begin{equation}\label{AELoss} (\mathcal D, \mathcal E) = \underset{(\mathcal D, \mathcal E)}{\mbox{argmin}} ~ \dfrac{1}{N_{\mbox{\scriptsize pos}}}\sum_{i=1}^{N_{\mbox{\scriptsize pos}}}\| \mathcal D \circ \mathcal E (\overline{\boldsymbol X}_{\mbox{\scriptsize pos}}^{(i)}) - \overline{\boldsymbol X}_{\mbox{\scriptsize pos}}^{(i)} \|_{2}^2 \end{equation} where $\boldsymbol z$ is a low dimensional latent vector and $\|\cdot\|_2$ is the standard Euclidean norm. The architectures $\mathcal D$ and $\mathcal E$ can be used in PCA \cite{Jolliffe2016}, VAE \cite{Kingma2013}, and $\beta$-VAE \cite{Higgins2016}. See more details in Appendix \ref{appendixB2}. Borrowing the idea from \cite{An2015}, an SQI map $f$ is constructed as follows: For a given CVS data $\overline{\boldsymbol X}$ in any class, a residual $\boldsymbol r$ is computed by \begin{equation}\label{residual} \boldsymbol r = \| \overline{\boldsymbol X} - \mathcal D \circ \mathcal E(\overline{\boldsymbol X})\|_{2} \end{equation} The decoder $\mathcal D$ is trained to generate normal CVS-like output. In other words, operation $\mathcal D \circ \mathcal E$ transforms $\overline{\boldsymbol X}$ to lie in or near the learned manifold using normal CVS data \cite{Seo2013,Yun2022}. Therefore, the residual $\boldsymbol r$ can be viewed as an anomaly score, where $\boldsymbol r$ is small if $\overline{\boldsymbol X}$ is normal CVS data, and large if $\overline{\boldsymbol X}$ is motion-influenced CVS data. For some non-negative constant $d$, an SQI map $\boldsymbol f$ can be constructed using \begin{equation}\label{selfsupclassi} \boldsymbol f(\overline{\boldsymbol X}_t) = \left \{ \begin{array}{cl} 1 & \mbox{if } \boldsymbol r \leq \boldsymbol d \\ 0 & \mbox{if } \boldsymbol r > \boldsymbol d \end{array} \right. \end{equation} The remainder of this subsection explains how the thresholding value $\boldsymbol d$ is determined by utilizing negative samples as well as positive. By varying $\boldsymbol d$ from 0 to $\infty$, a receiver operating characteristic (ROC) curve is calculated, where a point in the ROC curve is obtained using a fixed $\boldsymbol d$. We choose $\boldsymbol d$ such that maximizing Youden's $\boldsymbol J$ statistics, which is known as an unbiased metric in the class imbalance case \cite{Ruopp2008}. The value $\boldsymbol J$ is given by \begin{equation} \label{Jstatictics} \boldsymbol J^{\boldsymbol d} = \mbox{Sensitivity}^{\boldsymbol d} + \mbox{Specificity}^{\boldsymbol d} - 1 \end{equation} where \begin{equation} \mbox{Sensitivity}^{\boldsymbol d} = \dfrac{N_{\mbox{\scriptsize TP}}^{\boldsymbol d}}{N_{\mbox{\scriptsize TP}}^{\boldsymbol d}+N_{\mbox{\scriptsize FN}}^{\boldsymbol d}} \mbox{ and }\mbox{Specificity}^{\boldsymbol d} = \dfrac{N_{\mbox{\scriptsize TN}}^{\boldsymbol d}}{N_{\mbox{\scriptsize TN}}^{d}+N_{\mbox{\scriptsize FP}}^{\boldsymbol d}} \end{equation} Here, $N_{\mbox{\scriptsize TP}}^{\boldsymbol d}$, $N_{\mbox{\scriptsize TN}}^{\boldsymbol d}$, $N_{\mbox{\scriptsize FP}}^{\boldsymbol d}$, and $N_{\mbox{\scriptsize FN}}^{\boldsymbol d}$ respectively represent the number of true positives, true negatives, false positives, and false negatives for predictions depending on a selected threshold value $\boldsymbol d$. \section{Results} \subsection{Data Acquisition and Experimental Setting} Our dataset was obtained from healthy volunteers using an EIT-based hemodynamic monitoring device (HemoVista, BiLab, South Korea). Synchronized ECG data were obtained with EIT and used to identify the cardiac cycles. While lying in a hospital bed, each subject was requested to make intentional motions mimicking postural changes in the clinical ward. A total of 16140 CVS data were obtained regarding the cardiac cycle. Manual labeling was individually performed by two- and ten- years bio-signal experts (Nam and Lee). Subsequently, they reviewed the results and made the final decision about CVS abnormality through an agreement between them. The final labels were annotated into three classes: normal, ambiguous, and motion-influenced. When classified as normal or abnormal by both experts with an agreement, CVS data were annotated as normal or motion-influenced classes. The ambiguous class stands for CVS data in which motion artifacts were included with high possibility, but the experts did not reach an explicit agreement about motion influence. The assigned label is $\boldsymbol y = 1$ for the normal class and $\boldsymbol y = 0$ for the other classes. As a result, 12928 (80.09$\%$), 1526 (9.45$\%$), and 1686 (10.45$\%$) samples were labeled as normal, ambiguous, and motion-influenced classes, respectively. For ML applications, a total of 16372 CVS data were divided into 13100 (80$\%$), 1520 (10$\%$), and 1520 (10$\%$), which were used for training, validation, and testing, respectively. The data split was performed such that CVS data obtained from a common subject did not exist between the three sets. For the training dataset, labels for the ambiguous class were reassigned to $\boldsymbol y = 0.25$. This was done to prevent the over-classification of ambiguous classes. ML experiments were conducted in a computer system with GeForce RTX 3080 Ti, Intel® Core™ X-series Processors i9-10900X, and 128GB DDR4 RAM. Python with scikit-learn and Pytorch packages were used for the ML implementation. When training the ML models, the Adam optimizer was consistently employed, which is an effective adaptive stochastic gradient descent method \cite{Kingma2014}. Hyperparameters such as epoch and learning rate were heuristically chosen based on the validation results. \subsection{Results of CVS Quality Assessment} We compared the performance of the ML-based CVS quality assessment results by using six metrics: accuracy, positive and negative predictive values (PPV and NPV), sensitivity, specificity, and AUC. Accuracy, PPV, and NPV were defined by \begin{equation} \mbox{Accuracy} = \dfrac{N_{\mbox{\scriptsize TP}} + N_{\mbox{\scriptsize TN}}}{N_{\mbox{\scriptsize TP}}+N_{\mbox{\scriptsize TN}}+N_{\mbox{\scriptsize FP}}+N_{\mbox{\scriptsize FN}}}, \mbox{PPV} = \dfrac{N_{\mbox{\scriptsize TP}}}{N_{\mbox{\scriptsize TP}}+N_{\mbox{\scriptsize FP}}}, \mbox{ and } \mbox{NPV} = \dfrac{N_{\mbox{\scriptsize TN}}}{N_{\mbox{\scriptsize TN}}+N_{\mbox{\scriptsize FN}}} \end{equation} and AUC was the area under the ROC curve. NPV, specificity, and AUC should be emphasized in our evaluation owing to the high-class imbalance (small negative samples). \begin{table}[h] {\scriptsize \begin{center} \textbf{(a) SQI with scale and size normalization using linear interpolation.} \begin{tabular}{|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|} \hline \multicolumn{2}{|c|}{\textbf{Discriminative Model}} & \textbf{LR} & \textbf{MLP1} & \textbf{MLP2} & \textbf{VGG16-3} & \textbf{VGG16-4} & \textbf{VGG16-5} \\ \hline \multirow{6}{*}{\textbf{Test}} & \textbf{Accuracy} & 0.8665 & 0.9323 & 0.9348 & 0.9468 & 0.9468 & 0.9437 \\ & \textbf{PPV} & 1.0000 & 0.9790 & 0.9747 & 0.9525 & 0.9605 & 0.9679 \\ & \textbf{NPV} & 0.1097 & 0.7241 & 0.7445 & 0.9047 & 0.8591 & 0.8083 \\ & \textbf{Sensitivity} & 0.8643 & 0.9404 & 0.9479 & 0.9866 & 0.9776 & 0.9657 \\ & \textbf{Specificity} & 1.0000 & 0.8860 & 0.8607 & 0.7215 & 0.7721 & 0.8185 \\ & \textbf{AUC} & 0.6615 & 0.9506 & 0.9558 & 0.9709 & 0.9645 & 0.9653 \\ \hline \multicolumn{2}{|c|}{\textbf{Manifold-learning Model}} & \textbf{PCA} & \textbf{VAE} & \textbf{$\boldsymbol \beta$-VAE} & \textbf{CVAE} & \textbf{$\boldsymbol \beta$-CVAE} & - \\ \hline \multirow{6}{*}{\textbf{Test}} & \textbf{Accuracy} & 0.8468 & 0.9066 & 0.9221 & 0.9292 & 0.9298 &\\ & \textbf{PPV} & 0.9510 & 0.9687 & 0.9672 & 0.9688 & 0.9739 & \\ & \textbf{NPV} & 0.4573 & 0.6181 & 0.6900 & 0.7100 & 0.7011 & \\ & \textbf{Sensitivity} & 0.8675 & 0.9218 & 0.9439 & 0.9486 & 0.9441 & -\\ & \textbf{Specificity} & 0.7142 & 0.8095 & 0.7952 & 0.8047 & 0.8380 & \\ & \textbf{AUC} & 0.8735 & 0.9513 & 0.9489 & 0.9528 & 0.9603 & \\ \hline \end{tabular} \end{center} \begin{center} \textbf{(b) SQI with scale and size normalization using constant padding.} \begin{tabular}{|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|} \hline \multicolumn{2}{|c|}{\textbf{Discriminative Model}} & \textbf{LR} & \textbf{MLP1} & \textbf{MLP2} & \textbf{VGG16-3} & \textbf{VGG16-4} & \textbf{VGG16-5} \\ \hline \multirow{6}{*}{\textbf{Test}} & \textbf{Accuracy} & 0.8664 & 0.9487 & 0.9518 & 0.9455 & 0.9487 & 0.9500 \\ & \textbf{PPV} & 1.0000 & 0.9745 & 0.9767 & 0.9533 & 0.9655 & 0.9731 \\ & \textbf{NPV} & 0.0826 & 0.7851 & 0.8065 & 0.8870 & 0.8433 & 0.8185 \\ & \textbf{Sensitivity} & 0.8648 & 0.9651 & 0.9666 & 0.9844 & 0.9748 & 0.9681 \\ & \textbf{Specificity} & 1.0000 & 0.8521 & 0.8652 & 0.7173 & 0.7956 & 0.8434 \\ & \textbf{AUC} & 0.6628 & 0.9725 & 0.9669 & 0.9782 & 0.9683 & 0.9757 \\ \hline \multicolumn{2}{|c|}{\textbf{Manifold-learning Model}} & \textbf{PCA} & \textbf{VAE} & \textbf{$\boldsymbol \beta$-VAE} & \textbf{CVAE} & \textbf{$\boldsymbol \beta$-CVAE} & - \\ \hline \multirow{6}{*}{\textbf{Test}} & \textbf{Accuracy} & 0.8809 & 0.8918 & 0.9214 & 0.9015 & 0.8861 &\\ & \textbf{PPV} & 0.9590 & 0.9660 & 0.9679 & 0.9731 & 0.9636 & \\ & \textbf{NPV} & 0.5333 & 0.5629 & 0.6694 & 0.5882 & 0.5467 & \\ & \textbf{Sensitivity} & 0.9014 & 0.9074 & 0.9407 & 0.9118 & 0.9029 & -\\ & \textbf{Specificity} & 0.7450 & 0.7892 & 0.7941 & 0.8333 & 0.7745 & \\ & \textbf{AUC} & 0.9150 & 0.9206 & 0.9412 & 0.9170 & 0.9041 & \\ \hline \end{tabular} \end{center}} \caption{Machine learning-based CVS quality assessment results} \label{result} \end{table} \subsubsection{Discriminative Models} The first and second rows of Tables \ref{result} (a) and (b) show the quantitative evaluations of CVS quality assessment using various discriminative models: LR, MLPs, and CNNs. The results in Tables \ref{result} (a) and (b) differ in size normalization: (a) linear interpolation and (b) constant padding. MLPs and CNNs performed better than LR, which provided miserable NPV and AUC. MLPs and CNNs outperformed each other in specificity and NVP respectively, while achieving comparable levels for the other metrics. There was no significant performance gap depending on the size normalization. One interesting observation was as follows: In our experiments, there seems to be a compensation between specificity and NPV, depending on the emphasis on locality and globality. Enriching global information on CVS data positively affected specificity; in contrast, local information helped improve NPV. As the receptive field size in VGG16 increased (see Appendix \ref{appendixB1}), specificity tended to increase and NPV decrease. In MLP, which is more flexible for catching global information than CNNs, specificity was highest, and NPV lowest. In other words, the local information of CVS data is likely to play a crucial role in reducing false negatives rather than false positives. From a practical point of view, reducing false negatives is more desirable; therefore, using VGG16-3 or VGG16-4, which have the powerful ability to take advantage of locality, can be an excellent option. \subsubsection{Manifold-learning Models} \begin{figure}[t] \centering \includegraphics[width=1\textwidth]{fig6} \caption{Test samples and VAE-based projection results for (a) normal and (b) motion-influenced CVS data, where the red line is original CVS data and the blue line is the correspondent CVS data projected by VAE. By the way, ROC curves for (c) VGG 16-4 and (d) $\beta$-VAE are provided, where the blue and red lines correspond to the curves calculated using training and test sets, respectively.} \label{Result2} \end{figure} Positive samples in the validation set were used for hyperparameter selection in training the encoder and decoder. A threshold value was determined by using data from all the training and validation sets. Figure \ref{Result2} shows manifold projection results of test samples in normal and motion-influenced classes. An input CVS is projected onto or near a manifold learned by positive samples. As desired, the residual \eqref{residual} tends to be small for normal samples and high for motion-influenced samples. The third and fourth rows of Tables \ref{result} (a) and (b) show the final assessment results using manifold-learning models. The performance was comparable to that of discriminative models. We note that the manifold-learning models never learned negative samples for classifier development. As shown in Figure \ref{Result2} (d), the manifold-learning model's performance gap between training and test sets was very small. There was a slight difference in performance for the manifold-learning models depending on the size normalization. Linear interpolation promised a slightly better assessment of accuracy, NPV, and AUC than the other. For the case of constant padding, because core profiles of CVS data are supported at different intervals, the learning complexity can be increased, which is associated with invariant feature extraction to the intervals. This may cause a slight drop in performance. In our dataset, both discriminative and manifold learning models provided accurate detection of motion-influenced CVS. The discriminative model yielded a more powerful SQI performance; in contrast, the manifold-learning model provided stable outcomes between the training and test sets. Regarding practical applications, the choice of two models relies on what should be emphasized in the monitoring system in terms of performance and stability. Their ensemble is also worth considering. \subsubsection{Impact of Scale Normalization} \begin{table}[h] \centering {\footnotesize \begin{tabular}{|p{2cm}|p{1.75cm}p{1.4cm}|p{1.75cm}p{1.4cm}|} \hline & \multicolumn{2}{l|}{\textbf{With Scaling}} & \multicolumn{2}{l|}{\textbf{Without Scaling}} \\ \hline \textbf{Model} & \textbf{VGG16-3} & \textbf{VAE} & \textbf{VGG16-3} & \textbf{VAE} \\ \hline \textbf{Accuracy} & 0.9468 & 0.9066 & 0.7862 & 0.7509 \\ \textbf{PPV} & 0.9525 & 0.9687 & 0.9763 & 0.9668 \\ \textbf{NPV} & 0.9047 & 0.6181 & 0.4038 & 0.3327 \\ \textbf{Sensitivity} & 0.9886 & 0.9218 & 0.7671 & 0.7373 \\ \textbf{Specificity} & 0.7215 & 0.8095 & 0.8945 & 0.8380 \\ \textbf{AUC} & 0.9709 & 0.9513 & 0.9067 & 0.8906 \\ \hline \end{tabular}} \caption{Results of machine learning-based CVS quality assessment with and without scale normalization.} \label{ScaleNormal} \end{table} Table \ref{ScaleNormal} shows the worst case when scale normalization was not applied. In CNNs, network training was very unstable, and assessment performance was considerably degraded, especially regarding accuracy, NPV, sensitivity, and AUC. In VAEs, large-scale variability of CVS data highly affected the loss of accuracy in manifold projection; therefore, the performance significantly deteriorated in terms of accuracy, NPV, sensitivity, and AUC. This verifies the impact of scale normalization. \subsubsection{Inference Time} \begin{table}[h] \centering {\footnotesize \begin{tabular}{|p{1.75cm}|p{1.75cm}|p{1.75cm}|p{1.75cm}|p{1.75cm}|p{1.75cm}|} \hline \textbf{Model} & \textbf{LR} & \textbf{MLP1} & \textbf{MLP2} & \textbf{VGG16-3} & \textbf{VGG16-4} \\ \hline \textbf{Time} & 0.633$\mu$s & 1.265$\mu$s & 0.700$\mu$s & 1.897$\mu$s & 3.162$\mu$s \\ \hline \textbf{Model} & \textbf{VGG16-5} & \textbf{PCA} & \textbf{VAE} &\textbf{CVAE} & - \\ \hline \textbf{Time} & 3.562$\mu$s & 48.412$\mu$s & 3.703$\mu$s & 15.192$\mu$s & - \\ \hline \end{tabular}} \caption{Test inference time of machine learning-based CVS quality assessment methods.} \label{InferenceTime} \end{table} In real-time monitoring, assessment should be performed quickly. The input for the proposed method was updated for every heartbeat in the EIT system. Assuming a subject with a constant 80bpm, the CVS input is updated every 0.75s. Roughly, the assessment should be faster than approximately $10^{-2}$s. Table \ref{InferenceTime} shows the inference time for the test data, calculated by taking the average over the entire test data. The ML models provided a test outcome with inference times between 100$\mu$s ($10^{-4}$s) and 0.1$\mu$s ($10^{-7}$s). This confirms that the proposed method meets the speed requirements for real-time monitoring. \section{Conclusion and Discussion} We developed a novel automated SQI method using two machine learning techniques, the discriminative model and manifold learning, to detect abnormal CVS caused by motion-induced artifacts. We discussed how body movement influences the transconductance data and how the resulting CVS is degraded by movement. Numerous experiments support the idea that the proposed method can successfuly filter motion-induced unrealistic variations in CVS data. To the best of our knowledge, this is the first attempt to assess CVS quality to enhance the clinical capability of an EIT-based cardiopulmonary monitoring system. From a practical point of view, the proposed method can alert clinicians about CVS corruption to minimize misinformation about patient safety and facilitate adequate management of patients and medical resources. The proposed method can be combined with a software system for existing EIT devices. The use of only healthy subject data in the training process did not fully consider possible influence of the subject's illness on CVS. SQI performance might be degraded in patients with illnesses such as arrhythmias, in which irregular deformation may occur in CVS due to premature ventricular contraction and lead to be classified as low signal quality. However, when ill patient data are available and appended in the training process, a slightly modified SQI can detect the illness and motion by adding another label class. Meanwhile, arrhythmia can be easily detected using ECG signals. A further collection of CVS data could be a strategy for enhancing model generalization or stability toward being equipped with an actual monitoring system. In discriminative models, even with additional data collection, generalization or stability might not be meaningfully improved because the class imbalance problem remains or increases. In contrast, the manifold-learning models can accurately infer common features (i.e., data manifolds) as the total number of normal CVS data grows regardless of class imbalance. In addition, it can be extended into a semi-supervised or unsupervised learning framework \cite{An2015,Schlegl2017}, which reduces the requirement for labeled datasets. Thus, manifold-learning models might be favorable. \section*{Data Availability} The data that support the findings of this study are available from the corresponding author, K. Lee, upon reasonable request. \section*{Acknowledgements} This work was supported by the Ministry of Trade, Industry and Energy (MOTIE) in Korea through the Industrial Strategic Technology Development Program under Grant 20006024. Hyun was supported by Samsung Science \& Technology Foundation (No. SRFC-IT1902-09). We are deeply grateful to BiLab (Pangyo, South Korea) for their help and collaboration. \section*{Conflict of Interest} The authors have no conflicts to disclose. \\
\subsection{Datasets and Models} \label{app:datasets} In this section, we provide detailed description of the datasets and models used in our experiments. We considered five federated benchmark datasets with different machine learning tasks: image classification (CIFAR10 and CIFAR100 \citep{Krizhevsky09learningmultiple}), handwritten character recognition (FEMNIST~\citep{caldas2018leaf}), and language modeling (Shakespeare \citep{caldas2018leaf, mcmahan2017communication}), as well as a synthetic dataset described in Appendix~\ref{app:synthetic_details}. For Shakespeare and FEMNIST datasets there is a natural way to partition data through clients (by character and by writer, respectively). We relied on common approaches in the literature to sample heterogeneous local datasets from CIFAR-10 and CIFAR-100. Below, we give a detailed description of the datasets and the models / tasks considered for each of them. \subsubsection{Synthetic Dataset} \label{app:synthetic_details} Our synthetic dataset has been generated as follows: \begin{enumerate} \item Sample $\theta_{0} \in\mathbb{R}^{d} \sim \mathcal{N}(0, I_{d})$, from the multivariate normal distribution of dimension $d$, with zero mean and unitary variance \item Sample $\theta_{m} \in\mathbb{R}^{d} \sim \mathcal{N}(\theta_{0}, \varepsilon^{2}I_{d}), m\in[M]$ from from the multivariate normal distribution of dimension $d$, centered around $\theta_{0}$ and variance equal to $\varepsilon^{2}$ \item For $m\in[M]$ and $i\in[N_{m}]$, sample $\vec{x}_{m}^{(i)} \sim \mathcal{U}\left([-1, 1]^{d}\right)$ from a uniform distribution over $[-1, 1]^{d}$ \item For $m\in[M]$ and $i\in[N_{m}]$, sample $y_{m}^{(i)} \sim \mathcal{B}\left(\mathrm{sigmoid}\left(\langle \vec{x}_{t}^{(i)},\theta_{m} \rangle\right)\right)$, where $\mathcal{B}$ is the standard Bernoulli distribution \end{enumerate} \subsubsection{CIFAR-10 / CIFAR-100} We created federated versions of CIFAR-10 by distributing samples with the same label across the clients according to a symmetric Dirichlet distribution with parameter $0.4$, as in \citep{Wang2020Federated}. For CIFAR100, we exploited the availability of ``coarse'' and ``fine'' labels, using a two-stage Pachinko allocation method~\citep{li2006pachinko} to distribute the samples across the clients, as in~\citep{reddi2021adaptive}. We train a shallow convolutional neural network for CIFAR-10/100 datasets. \subsubsection{FEMNIST} FEMNIST (Federated Extended MNIST) is a 62-class image classification dataset built by partitioning the data of Extended MNIST based on the writer of the digits/characters. We train two-layer fully connected neural network for FEMNIST dataset \subsubsection{Shakespeare} Shakespeare is a language modeling dataset built from the collective works of William Shakespeare. In this dataset, each client corresponds to a speaking role with at least two lines. The task is next character prediction. We use an RNN that first takes a series of characters as input and embeds each of them into a learned 8-dimensional space. The embedded characters are then passed through 2 RNN layers, each with 256 nodes, followed by a densely connected softmax output layer. We split the lines of each speaking role into into sequences of 80 characters, padding if necessary. \subsection{Training Details.} In all experiments, the learning rate was tuned via grid search on the grid $\{10^{-3.5}, 10^{-3}, 10^{-2.5}, 10^{-2}, 10^{-1.5}, 10^{-1}\}$ using the validation set. Once the learning rate had been selected, we retrained the models on the concatenation of the training and validation sets. Each experiment was repeated for three different seeds for the random number generator; we report the mean value and the $95\%$ confidence bound. \subsection{Arrival Process} \label{app:arrival_process} For CIFAR-10/100 datasets, we consider an arrival process with $M_{\text{hist}}=25$ clients with ``historical'' datasets, which do not change during training, and $M-M_{\text{hist}}=25$ clients, who collect ``fresh'' samples with constant rates $\left\{b_{m}>0, m \in \llbracket M_{\text{hist}}+1, M\rrbracket\right\}$ and only store the most recent $b_m$ samples due to memory constraints (i.e., $C_{m}=b_{m}$). For a given value of $N_{\text{hist}}/N$, we split the train part of the original CIFAR-10/100 into two groups, historical and fresh, with $N_{\text{hist}}$ and $N - N_{\text{hist}}$ samples, respectively. We then distribute the samples from the historical (resp. fresh) group across $M_{\text{hist}}$ historical (resp. $M-M_\text{hist}$ fresh) clients. A symmetric Dirichlet distribution is employed in the case of CIFAR-10, and a Pachinko allocation method is employed in the case of CIFAR-100. Shakespeare and FEMNIST datasets have a natural partition across clients---by character and by writer, respectively. In our experiments, we split the natural clients of FEMNIST and Shakespeare into two groups, historical and fresh, with $M_{\text{hist}}$ and $M-M_{\text{hist}}$ clients, respectively. The historical clients participate to every communication round, while each fresh client is only available in a single communication round in the case of FEMNIST and for at most two consecutive communication rounds for Shakespeare dataset. \subsection{Numerical Values for $\hat{c}_2/\hat{c}_1$} \label{app:ratio_estimation_exp} Table~\ref{tab:ratio_estimation_exp} provide the values of $D$, $G$, $B$, and $d$ and used for the estimation of th ratio $\hat{c}_{2}/\hat{c}_{1}$. \subsection{Intermittent Client Availability} \label{app:intermittent_case} In Section~\ref{sec:applications}, we considered the scenario with two groups of clients: $M_{\text{hist}}$ clients with ``historical'' datasets, which do not change during training, and $M-M_{\text{hist}}$ clients, who collect ``fresh'' samples with constant rates $\left\{b_{m}>0, m \in \llbracket M_{\text{hist}}+1, M\rrbracket\right\}$ and only store the most recent $b_m$ samples due to memory constraints (i.e., $C_{m}=b_{m}$). Fresh clients can also capture the setting where clients are available during a single communication round: we would then have $M_{\text{hist}}$ ``permanent'' clients, which are are always available and do not change during training, and $M-M_{\text{hist}}$ ``intermittent'' clients, each of them available during one or a few consecutive communication rounds. In the settings of Section~\ref{sec:applications}, every client assigns the same weight to all the samples present in its memory independently from the time; let $\lambda_{m}$ be the weight assigned by client $m\in[M]$ to the samples currently present in ts memory, i.e., $\lambda_{m}^{(t, j)} = \lambda_{m}$ for every $t\in[T]$ and $j \in\mathcal{I}_{m}^{(t)}$. We remind that the total number of samples collected by client $m\in[M]$ is $N_{m}$. For a fresh client, say it $m>M_{\text{hist}}$, $N_{m} = b_{m}T$. \subsection{General Case} \begin{corbis}{cor:historical_fresh_bound_special} \label{cor:historical_fresh_bound} Consider the scenario with $M_{\text{hist}}$ historical clients, and $M-M_{\text{hist}}$ fresh clients. Suppose that the same assumption of Theorem~\ref{thm:main_result} hold, and that Algorithm~\ref{alg:meta_algorithm} is used with with clients' aggregation weights $\bm{p} = \left(p_{m}\right)_{m\in[M]} \in \Delta^{M-1}$, then \begin{flalign} \label{eq:historical_fresh_bound} \epsilon_{\text{true}} & \leq \frac{(C_{1} + C_{3})}{\sqrt{T}} + \frac{ C_{2}}{\sqrt{T^{3}}} + \left(D + \frac{2}{\sqrt{T}}\right) \sigma_{0} \sqrt{M-M_{\text{hist}}} \sqrt{ \sum_{m=M_{\text{hist}}+1}^{M}p_{m}^{2}} + 2\cdot \max_{m,m'}\mathrm{disc}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \cdot \left\|\bm{\alpha} - \bm{p}\right\|_{1} \nonumber \\ & \qquad + 4 \cdot \sqrt{1 + \log\left(\frac{N}{\mathrm{VCdim}\left(\mathcal{H}\right)}\right)} \cdot \sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N}} \cdot \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{{n}_{m}}} , \end{flalign} where $C_{1},C_{2}$ and $C_{3}$ are constants defined in the proof of Theorem~\ref{thm:bound_opt}, and $\sigma_{0}$ is defined in Remark~\ref{remark:assumptions}. \end{corbis} \begin{proof} We remind that \begin{equation} p_{m,i} = \frac{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}}\mathds{1}\left\{j=i\right\}\cdot \lambda_{m}^{(t,j)}}{\sum_{m'=1}^{M}\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m'}^{(t)}} \lambda_{m'}^{(t,j)}}, \qquad i \in N_{m}^{(T)}, \end{equation} and \begin{equation} p_{m}^{(t)} = \frac{\sum_{j\in\mathcal{I}_{m}^{(t)}}\lambda_{m}^{(t,j)}}{\sum_{m'=1}^{M}\sum_{j\in\mathcal{I}_{m'}^{(t)}}\lambda_{m'}^{(t,j)}}, \qquad t\in[T]. \end{equation} Replacing $\lambda_{m}^{(t, j)} = \lambda_{m}$, we have \begin{equation} p_{m,i} = \frac{\lambda_{m}\cdot \sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}}\mathds{1}\left\{j=i\right\}}{\sum_{m'=1}^{M}\lambda_{m'}\sum_{t=1}^{T}\left|\mathcal{I}_{m'}^{(t)}\right|}, \end{equation} and, \begin{equation} p_{m}^{(t)} = \frac{\lambda_{m}\left|\mathcal{I}_{m}^{(t)}\right|}{\sum_{m'=1}^{M}\lambda_{m'}\left|\mathcal{I}_{m'}^{(t)}\right|}. \end{equation} In the settings of Corollary~\ref{cor:historical_fresh_bound}, we have \begin{flalign} \mathcal{I}_{m}^{(t)} =\begin{cases} \left\{1, \dots, N_{m}\right\} &, \qquad m\in\left\{1, \dots, M_{\text{hist}}\right\} \\ \left\{(t-1)\cdot b_{m} +1, \dots, t \cdot b_{m} - 1\right\} &, \qquad m\in\left\{M_{\text{hist}}+1, \dots, M\right\}. \end{cases} \end{flalign} Thus, \begin{equation} p_{m}^{(t)} = \frac{N_{m}\lambda_{m}\cdot \mathds{1}\left\{m\in \llbracket1, M_{\text{hist}} \rrbracket\right\} + b_{m}\lambda_{m}\cdot \mathds{1}\left\{m\in \llbracket M_{\text{hist}}+1, M \rrbracket\right\}}{\sum_{m'=1}^{M_{\text{hist}}}N_{m'}\lambda_{m'} + \sum_{m'=M_{\text{hist}}+1}^{M}b_{m'}\lambda_{m'}}, \end{equation} and \begin{equation} p_{m,i} = \frac{\lambda_{m}T\cdot\mathds{1}\left\{m\in \llbracket1, M_{\text{hist}} \rrbracket\right\} + \lambda_{m} \cdot \mathds{1}\left\{m\in \llbracket M_{\text{hist}}+1, M \rrbracket\right\}}{\sum_{m'=1}^{M}N_{m'}\lambda_{m'}}. \end{equation} Therefore, $p_{m,i} = \frac{p_{m}}{N_{m}}$, for every sample $i\in[N_{m}]$. \paragraph{Bound $ \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}^{(\bm{\alpha})}, \mathcal{P}^{(\bm{p})}\right)$} Let $m' \in [M]$, we have \begin{flalign} \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}^{(\bm{\alpha})}, \mathcal{P}^{(\bm{p})}\right) & = \sup_{\theta\in\Theta} \left|\sum_{m=1}^{M}\left(\alpha_{m} - p_{m}\right)\cdot \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right| \\ & = \sup_{\theta\in\Theta} \left|\sum_{m=1}^{M}\left(\alpha_{m} - p_{m}\right)\cdot \left(\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right)\right)\right|, \label{eq:bound_disc_1} \end{flalign} where the last equality follows from the fact that $\sum_{m=1}^{M}\alpha_{m} = \sum_{m=1}^{M}p_{m} = 1$. For all $m\in[M]$, we have \begin{flalign} \left(\alpha_{m} - p_{m}\right)\cdot \left(\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right)\right) & \leq \left|\alpha_{m} - p_{m} \right| \cdot \left|\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) \right| \\ & \leq \left|\alpha_{m} - p_{m} \right| \cdot \sup_{\theta\in\Theta} \left|\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) \right| \\ & = \left|\alpha_{m} - p_{m} \right| \cdot \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \\ & \leq \left|\alpha_{m} - p_{m} \right| \max_{m, m'} \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right). \label{eq:bound_disc_2} \end{flalign} Combining \eqref{eq:bound_disc_1}, and \eqref{eq:bound_disc_2}, we have \begin{flalign} \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}^{(\bm{\alpha})}, \mathcal{P}^{(\bm{p})}\right) & \leq \sum_{m=1}^{M}\left|\alpha_{m} - p_{m} \right| \cdot \max_{m, m'} \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \\ & = \left\|\bm{\alpha} - \bm{p}\right\|_{1} \cdot \max_{m, m'} \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right). \end{flalign} \paragraph{Compute $N_{\text{eff}}^{-1}$} We have $N_{\text{eff}}^{-1} = \sum_{m=1}^{M}\sum_{i=1}^{N_{m}}\left(\frac{p_{m}}{N_{m}}\right)^{2} = \sum_{m=1}^{M}\frac{p_{m}^{2}}{N_{m}} = \frac{1}{N}\sum_{m=1}^{M}\frac{p_{m}^{2}}{n_{m}}$. \paragraph{Bound $\bar{\sigma}\left(\bm{\lambda}\right)$} We have \begin{flalign} \bar{\sigma}^{2}\left(\bm{\lambda}\right) = \sum_{t=1}^{T}q^{(t)}\mathbb{E}_{\mathcal{S}}\left[\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \right\|^{2}\right]. \end{flalign} In the settings of Corollary~\ref{cor:historical_fresh_bound}, $q^{(t)} = 1/T$, and $p_{m}^{(t)} = p_{m}$, thus \begin{flalign} \bar{\sigma}^{2}\left(\bm{\lambda}\right) = \frac{1}{T}\sum_{t=1}^{T} \mathbb{E}_{\mathcal{S}}\left[\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}\nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right\|^{2}\right], \end{flalign} where $\mathcal{L}_{\mathcal{M}_{m}^{(t)}} = {\sum_{j\in\mathcal{I}_{m}^{(t)}}\ell\left(\cdot, \bm{z}_{m}^{(j)}\right)} / {\left|\mathcal{I}_{m}^{(t)}\right|}$. Moreover, it is easy to check that, in this setting, \begin{equation} \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})} = \frac{1}{T}\sum_{t=1}^{T}\sum_{m=1}^{M}p_{m}\cdot \mathcal{L}_{\mathcal{M}_{m}^{(t)}}. \end{equation} Moreover, $\mathcal{M}_{m}^{(t)} = \mathcal{M}_{m}^{(1)}$ for $m\in[M_{\text{hist}}]$, thus for $\theta\in\Theta$, \begin{flalign} \nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}\nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) & = \sum_{m=M_{\text{hist}}+1}^{M} p_{m} \cdot \frac{1}{T}\sum_{s=1}^{T}\left(\nabla \mathcal{L}_{\mathcal{M}_{m}^{(s)}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right). \end{flalign} It follows that, \begin{flalign} \Big\|\nabla & \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}\nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \Big\|^{2} = \left\| \sum_{m=M_{\text{hist}}+1}^{M} p_{m} \cdot \frac{1}{T}\sum_{s=1}^{T}\left(\nabla \mathcal{L}_{\mathcal{M}_{m}^{(s)}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right) \right\|^{2} \\ & \leq \left(M-M_{\text{hist}}\right) \sum_{m=M_{\text{hist}}+1}^{M}p_{m}^{2} \left\| \frac{1}{T}\sum_{s=1}^{T}\left(\nabla \mathcal{L}_{\mathcal{M}_{m}^{(s)}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right) \right\|^{2} \\ & \leq (M-M_{\text{hist}}) \sum_{m=M_{\text{hist}}+1}^{M}\frac{p_{m}^{2}}{T} \sum_{t=1}^{T}\left\| \nabla \mathcal{L}_{\mathcal{M}_{m}^{(s)}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \right\|^{2} . \end{flalign} For the fresh clients, i.e., for $m > M_0$, we have $\mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) = \sum_{i=1}^{b_{m}}\ell (\theta,z_{m}^{(t, i)}) / {b_{m}}$, thus \begin{flalign} \mathbb{E}_{\mathcal{S}} \left\| \nabla \mathcal{L}_{\mathcal{M}_{m}^{(s)}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \right\|^{2} & \leq \mathbb{E}_{\mathcal{S}} \left\| \frac{1}{b_{m}}\sum_{i=1}^{b_{m}}\nabla \ell\left(\theta; z_{m}^{(t, i)}\right) - \nabla \ell\left(\theta; z_{m}^{(s, i)}\right) \right\|^{2} \\ & \leq \frac{1}{b_{m}}\sum_{i=1}^{b_{m}} \mathbb{E}_{\mathcal{S}} \left\|\nabla \ell\left(\theta; z_{m}^{(t, i)}\right) - \nabla \ell\left(\theta; z_{m}^{(s, i)}\right) \right\|^{2}\\ & \leq \sigma_{0}^{2}. \end{flalign} Thus, \begin{equation} \mathbb{E}_{\mathcal{S}}\Big\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}\nabla \mathcal{L}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \Big\|^{2} \leq \sigma_{0}^{2} \left(M-M_{\text{hist}}\right) \cdot \sum_{m=1}^{M}p_{m}^{2} \end{equation} \paragraph{Conclusion} We conclude the proof by precising that: $\tilde{c}_{0} = {(C_{1} + C_{3})}/{\sqrt{T}} + { C_{2}}/{\sqrt{T^{3}}}$, where $C_1$, $C_2$, and $C_3$ are the constant introduced in the proof of Theorem~\ref{thm:bound_opt}. \end{proof} The third term of \eqref{eq:historical_fresh_bound} originates from the variability of the gradients across time as captured by $\bar{\sigma}^2\left(\bm{\lambda}\right)$ in~\eqref{eq:bound_epsilon_true}. In particular, it only depends on the weights of the fresh clients (as there is no gradient variability for the historical clients). The fourth term in \eqref{eq:historical_fresh_bound} corresponds to the discrepancy between the target distribution, $\mathcal{P}^{\left(\bm{\alpha}\right)}$, and the effective distribution $\mathcal{P}^{\left(\bm{p}\right)}$ in~\eqref{eq:bound_epsilon_true}. As expected, it vanishes when all clients have the same distribution, and, for a given heterogeneity of the local distributions, it is smaller the closer the target relative importance of clients and the effective one are (i.e., the closer $\bm{\alpha}$ and $\bm{p}$ are). Finally, the fifth term in \eqref{eq:historical_fresh_bound}, corresponds to the term $\tilde{\mathcal{O}}\left(\sqrt{\mathrm{VCdim}\left(\mathcal{H}\right)/N_{\text{eff}}}\right)$ in \eqref{eq:bound_epsilon_true}, as $N_{\text{eff}}= N/\left(\sum_{m=1}^M p_m^2/n_m\right)$ in this setting. \subsection{Proof of Corollary~\ref{cor:historical_fresh_bound_special}} \label{proof:historical_fresh_bound} \begin{repcor}{cor:historical_fresh_bound_special} Consider the scenario with $M_{\text{hist}}$ historical clients, and $M-M_{\text{hist}}$ fresh clients. Suppose that the same assumptions of Theorem~\ref{thm:main_result} hold, that $\bm{\alpha}=\bm{n}$, and that Algorithm~\ref{alg:meta_algorithm} is used with clients' aggregation weights $\bm{p} = \left(p_{m}\right)_{m\in[M]} \in \Delta^{M-1}$, then \begin{flalign*} & \epsilon_{\text{true}} \leq \psi(\bm{p}; \bm{c}) \triangleq \nonumber \\ &\quad c_{0} + c_{1} \cdot \sqrt{ \sum_{m=M_{\text{hist}}+1}^{M}p_{m}^{2}} + c_{2} \cdot \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{n_{m}}}, \end{flalign*} where $\bm{c}=(c_{0}, c_{1}, c_{2})$ are non-negative constants not depending on $\bm{p}$, given as: \begin{flalign*} c_{0} & = {(C_{1} + C_{3})} + \frac{C_{2}}{T} \\ c_{1} & = \sigma_{0} \sqrt{M-M_{\text{hist}}} \cdot \left(D + \frac{2}{\sqrt{T}}\right) \\ c_{2} &= 4 \cdot \sqrt{1 + \log\left(\frac{N}{\mathrm{VCdim}\left(\mathcal{H}\right)}\right)} \cdot \sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N}} + 2\cdot \max_{m,m'}\mathrm{disc}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \end{flalign*} and $C_{1}$, $C_{2}$, and $C_{3}$ are the constants defined in the proof of Theorem~\ref{thm:bound_opt}, and $\sigma_{0}$ is defined in Remark~\ref{remark:assumptions}. \end{repcor} \begin{proof} We remind that Corollary~\ref{cor:historical_fresh_bound} implies that \begin{flalign} \epsilon_{\text{true}} & \leq \frac{(C_{1} + C_{3})}{\sqrt{T}} + \frac{ C_{2}}{\sqrt{T^{3}}} + \left(D + \frac{2}{\sqrt{T}}\right) \sigma_{0} \sqrt{M-M_{\text{hist}}} \sqrt{ \sum_{m=M_{\text{hist}}+1}^{M}p_{m}^{2}} + 2\cdot \max_{m,m'}\mathrm{disc}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \cdot \left\|\bm{\bm{n}} - \bm{p}\right\|_{1} \nonumber \\ & \qquad + 4 \cdot \sqrt{1 + \log\left(\frac{N}{\mathrm{VCdim}\left(\mathcal{H}\right)}\right)} \cdot \sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N}} \cdot \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{{n}_{m}}}. \end{flalign} The result follows using the fact that $\left\|\bm{p} - \bm{n}\right\|_{1} \leq \sqrt{\sum_{m=1}^{M}p_{m}^{2}/n_{m} - 1}$, which we prove below. \begin{flalign} \left\|\bm{p} - \bm{n}\right\|_{1} & = \sum_{m=1}^{M}\left|p_{m} - n_{m}\right| \\ & = \sum_{m=1}^{M}\frac{\left|p_{m} - n_{m}\right|}{\sqrt{n_{m}}} \cdot \sqrt{n_{m}} \\ & \leq \sqrt{\sum_{m=1}^{M}\frac{\left(p_{m} - n_{m}\right)^{2}}{n_{m}} \cdot \sum_{m=1}^{M} n_{m}} \\ &= \sqrt{\sum_{m=1}^{M}\frac{\left(p_{m} - n_{m}\right)^{2}}{n_{m}}} \\ & = \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{n_{m}} - 2 \sum_{m=1}^{M}\frac{p_{m}n_{m}}{n_{m}} + \sum_{m=1}^{M}\frac{n^{2}_{m}}{n_{m}}} \\ & = \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{n_{m}} - 1}, \end{flalign} where we used Cauchy-Schwarz inequality to bound $\sum_{m=1}^{M}\frac{\left|p_{m} - n_{m}\right|}{\sqrt{n_{m}}} \cdot \sqrt{n_{m}}$. \end{proof} \subsection{Proof of the Convexity of $\psi$} \label{proof:convexity_psi} We remind that for $\bm{p}\in\Delta^{M-1}$, and $\bm{c}\in \mathbb{R}_{+}^{3}$, we have \begin{flalign} \psi(\bm{p}; \bm{c}) &= \frac{c_{0}}{\sqrt{T}} + c_{1} \cdot \sqrt{\sum_{m=M_{\text{hist}}+1}^{M}p_{m}^{2}} + c_{2} \cdot \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{n_{m}}}. \end{flalign} In order to prove the convexity of $\bm{p}\mapsto \sqrt{\sum_{m=1}^{M}\frac{p_{m}^{2}}{{n}_{m}}} $, and $\bm{p}\mapsto \sqrt{\sum_{m=M_{\text{hist}}}^{M}p_{m}^{2}} $, it is sufficient to prove that the function $\varphi_{\bm{\beta}}: \bm{p}\mapsto \sqrt{\sum_{m=1}^{M}\beta_{m}p_{m}^{2}}$ is convex for any vector $\bm{\beta}\in\mathbb{R}_{+}^{M}$. Let $\bm{\beta}\in\mathbb{R}_{+}^{M}$, $\bm{p}, \tilde{\bm{p}}\in\Delta^{M}$, and $\gamma \in[0, 1]$, we have \begin{flalign} \varphi_{\bm{\beta}}^{2}\big(\gamma\cdot \bm{p}& + (1-\gamma)\cdot \tilde{\bm{p}}\big) = \sum_{m=1}^{M}\beta_{m} \cdot \big(\gamma \cdot p_{m} + (1-\gamma)\cdot \tilde{p}_{m}\big)^{2} \\ & = \gamma^{2} \cdot \sum_{m=1}^{M} \beta_{m}p_{m}^{2} + (1-\gamma)^{2}\cdot \sum_{m=1}^{M} \beta_{m}\tilde{p}_{m}^{2} + 2\gamma(1-\gamma)\cdot \sum_{m=1}^{M}\beta_{m} p_{m}\tilde{p}_{m} \\ & \leq \gamma^{2} \cdot \sum_{m=1}^{M} \beta_{m}p_{m}^{2} + (1-\gamma)^{2}\cdot \sum_{m=1}^{M} \beta_{m}\tilde{p}_{m}^{2} + 2\gamma(1-\gamma)\cdot\sqrt{\sum_{m=1}^{M}\beta_{m} p^{2}_{m}} \cdot \sqrt{\sum_{m=1}^{M}\beta_{m} \tilde{p}_{m}^{2}} \\ & = \left(\gamma \cdot \sqrt{\sum_{m=1}^{M}\beta_{m} p^{2}_{m}} + (1-\gamma)\cdot \sqrt{\sum_{m=1}^{M}\beta_{m} \tilde{p}^{2}_{m}}\right)^{2} \\ & = \left(\gamma \cdot \varphi_{\bm{\beta}}(\bm{p}) + (1-\gamma)\cdot \varphi_{\bm{\beta}}(\tilde{\bm{p}})\right)^{2}, \end{flalign} where we use Cauchy-Shwartz inequality to bound $\sum_{m=1}^{M}\beta_{m} p_{m}\tilde{p}_{m}$, as follows \begin{flalign} \sum_{m=1}^{M}\beta_{m} p_{m}\tilde{p}_{m} & = \sum_{m=1}^{M}\left(p_{m}\sqrt{\beta_{m}} \right) \cdot \left(\tilde{p}_{m} \sqrt{\beta_{m}} \tilde{p}_{m}\right) \leq \sqrt{\sum_{m=1}^{M}\beta_{m} p^{2}_{m}} \cdot \sqrt{\sum_{m=1}^{M}\beta_{m} \tilde{p}_{m}^{2}}. \end{flalign} Since $\varphi_{\bm{\beta}}$ is a non-negative function, we have \begin{equation} \varphi_{\bm{\beta}}\big(\gamma\cdot \bm{p} + (1-\gamma)\cdot \bm{p}\big) \leq \gamma \cdot \varphi_{\bm{\beta}}(\bm{p}) + (1-\gamma)\cdot \varphi_{\bm{\beta}}(\tilde{\bm{p}}), \end{equation} proving that $\varphi_{\bm{\beta}}$ is convex. \subsection{Numerical Study of Bound Minimization} Figure~\ref{fig:objective_weights_effect} illustrates how the solution and important system quantities change as a function of the ratio $c_2 / {c_1}$, and fraction of historical samples $N_{\text{hist}} / N$, in the particular setting when $M=50$ and $M_{\text{hist}}=25$. Beside the specific numerical values, one can distinguish two corner cases. When $c_{2} / {c_{1}} \gg 1$, the optimal solution corresponds to minimize $\sum_{m=1}^M p_m^2/n_m$, i.e., to maximize the effective number of samples, and then $\sum_{m}\left(p_{m}^{*}\right)^{2}/n_{m}$. The optimal aggregation vector $\bm{p}^{*}$ is then the \texttt{Uniform} one: each sample is assigned the same importance during the whole training and each client a relative importance proportional to its number of samples ($p_m^* = n_m$). In particular, the aggregate relative importance for historical clients is $p^*_{\text{hist}} = N_{\text{hist}}/N$. On the contrary, when $c_2/c_1 \ll 1$, the optimal solution corresponds to minimize $\sum_{m>M_{\text{hist}}} p_m$, i.e., the gradient variability. The \texttt{Historical} strategy is then optimal: fresh clients are ignored and historical clients receive a relative importance proportional to the size of their local dataset (i.e., $p_m^* = N_m/N_{\text{hist}} = \frac{N}{N_{\text{hist}}} n_m$ for $m \in [M_{\text{hist}}]$ and $p^*_{\text{hist}}=1$). Figure~\ref{fig:objective_weights_effect} confirms these qualitative considerations, but also shows that the transition between these two regimes depends on $N_{\text{hist}}/N$, with the transition occurring at smaller values of $c_2/c_1$ for smaller values of the $N_{\text{hist}}/N$. \begin{figure}[t] \setkeys{Gin}{width=\linewidth} \begin{subfigure}[b]{0.33\textwidth} \includegraphics{Figures/n_effecient.pdf} \end{subfigure} \hfill \begin{subfigure}[b]{0.33\textwidth} \includegraphics{Figures/variance.pdf} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \includegraphics{Figures/optimal_allocation_no_legend.pdf} \end{subfigure} \caption{From left to the right: effect of $c_{2}/{c_{1}}$ on the effective number of samples, the normalized gradient noise, and the historical clients relative importance $p^{*}_{\text{hist}}$ for CIFAR-10 dataset ($N=5\times10^{5}$) and different values of $N_{\text{hist}}/N$, when $M=50$, and $M_{\text{hist}}=25$. The dashed vertical line corresponds to our estimation of $c_2/c_1$ on CIFAR-10 experiments ($\hat{c}_{2}/\hat{c}_{1}=0.15$).} \label{fig:objective_weights_effect} \end{figure} \subsection{Details on the Estimation of the $c_2/c_1$} \label{app:ratio_estimation} Using the expression of $c_{1}$ and $c_{2}$ from Corollary~\ref{cor:historical_fresh_bound_special}, we have \begin{equation} \frac{c_{2}}{c_{1}} = 2\cdot \frac{\max_{m,m'}\mathrm{disc}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) + 2 \cdot \sqrt{1 + \log\left(\frac{N}{\mathrm{VCdim}\left(\mathcal{H}\right)}\right)} \cdot \sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N}}}{\sigma_{0} \sqrt{M-M_{\text{hist}}} \cdot \left(D + \frac{2}{\sqrt{T}}\right)}. \end{equation} We use the approximations \begin{flalign} \sqrt{1 + \log\left(\frac{N}{\mathrm{VCdim}\left(\mathcal{H}\right)}\right)} & \approx 1, \\ D + \frac{2}{\sqrt{T}} & \approx D, \\ 4 \mathrm{VCdim}\left(\mathcal{H}\right) & \approx d, \end{flalign} where $d$ is the number of parameters of the model $\theta \in \Theta \subset \mathbb{R}^{d}$ (see Section~\ref{sec:formulation}). We remind the definition of $\sigma_{0}$ from Remark~\ref{remark:assumptions}: \begin{equation} \sigma_{0} = \sqrt{\max_{m}\mathbb{E}_{\bm{z}\sim\mathcal{P}_{m}}\left[\sup_{\theta\in\Theta}\left\|\nabla \ell(\theta; \bm{z}) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2} \right]} \leq 2\sqrt{2}\cdot LB = 2 G, \end{equation} where $G$ was defined in \eqref{eq:bounded_gradient}. We use the approximation $\sigma_{0} \approx 2G$. Finally, we remark that $\max_{m,m'}\mathrm{disc}\left(\mathcal{P}_{m}, \mathcal{P}_{m'}\right) \leq B$, therefore, we approximate $c_{2}/c_{1}$ as \begin{equation} \frac{\hat{c}_{2}}{\hat{c}_{1}} \approx \frac{B + \sqrt{d/N}}{GD\sqrt{M-M_{\text{hist}}}}. \end{equation} In our experiments, clients cooperatively estimate $\hat{c}_{2}/\hat{c}_{1}$ using a fraction of their historical samples, with the particularity that $D$ is estimated as $\hat{D} = \max_{m=1}^{M}\left\|\hat{\theta}_{m}^{*} - \theta^{(1)}\right\|$, where $\hat{\theta}_{m}^{*}$ is the model obtained after few iterations of stochastic gradient descent using a fraction of the historical data of client $m\in[M]$. \subsection{Proof of Lemma~\ref{lem:bound_n_eff}} \label{proof:bound_n_eff} \begin{replem}{lem:bound_n_eff} With the same notation as in Theorem~\ref{thm:bound_gen}, $N_{\mathrm{eff}} \leq N$ and this bound is attained when $\bm{p}$ is uniform. \end{replem} \begin{proof} We remind that \begin{equation} N_{\text{eff}} = \left(\sum_{m=1}^{M}\sum_{i=1}^{N_{m}}\left(p_{m,i}\right)^{2}\right)^{-1}. \end{equation} Let $\vec{u} \in \Delta^{N}$ be the vector obtained by concatenating all the values $p_{m,i}$ for $m\in[M]$ and $i\in[N_{m}]$. It follows that \begin{equation} N_{\text{eff}} = \left(\sum_{n=1}^{N}u_{n}^{2}\right)^{-1} = \left\|\vec{u}\right\|_{2}^{-2}. \end{equation} Let $\vec{u}^{*} \triangleq \mathbf{1} / N$, it is clear that $\vec{u}^{*} \in \Delta^{N}$, and $\left\|\vec{u}^{*}\right\|^{2}_{2} = 1/N$. Let $\vec{u} \in \Delta^{N}$, using Cauchy-Shwartz inequality, we have \begin{flalign} 1 = \sum_{n=1}^{N}u_{n} = \sum_{n=1}^{N}(u_{n} \times 1) \leq \sqrt{\sum_{n=1}^{N}u_{n}^{2}}\cdot \sqrt{\sum_{n=1}^{N}1} = \left\|\vec{u}\right\|_{2}\cdot\sqrt{N}. \end{flalign} Thus, $\left\|\vec{u}\right\|_{2}^{-2} \leq N$, which concludes the proof. \iffalse We consider the following optimization problem \begin{equation} \min_{\vec{u} \in \Delta^{N}} \left\|\vec{u}\right\|_{2}^{2}. \end{equation} Proving Lemma~\ref{lem:bound_n_eff} is equivalent to proving that the vector $\vec{u}^{*} \triangleq \mathbf{1} / N$ is a solution to aforementioned optimization problem. Note that $\vec{u}^{*} \in \Delta^{N}$, and $\left\|\vec{u}^{*}\right\|^{2}_{2} = 1/N$. \fi \end{proof} \subsection{Proof of \eqref{eq:error_decomposition_fed}} \label{proof:error_decomposition} \begin{flalign} \epsilon_{\text{true}} & = \mathbb{E}_{\mathcal{S}, A^{(\bm{\lambda})}}\left[\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}\left(A^{(\bm{\lambda})}\left(\mathcal{S}\right)\right) - \mathcal{L}_{S}^{(\bm{\lambda})}\left(A^{(\bm{\lambda})}\left(\mathcal{S}\right)\right)\right] + \mathbb{E}_{\mathcal{S}, A^{\left(\bm{\lambda}\right)}}\left[\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(A^{(\bm{\lambda})}\left(\mathcal{S}\right)\right) - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right)\right] \nonumber \\ & \qquad \qquad + \mathbb{E}_{\mathcal{S}}\left[\min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) \right] - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}\left(\theta\right) \\ & \leq 2\underbrace{\mathbb{E}_{\mathcal{S}}\left[\sup_{\theta \in \Theta}\left|\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}\left(\theta\right) - \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right)\right|\right]}_{\triangleq \epsilon_{\text{gen}}} + \underbrace{\mathbb{E}_{\mathcal{S}, A^{\left(\bm{\lambda}\right)}}\left[\mathcal{L}_{\mathcal{S}}^{ (\bm{\lambda})}\left(A^{(\bm{\lambda})}\left(\mathcal{S}\right)\right) - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}}^{ (\bm{\lambda})}\left(\theta\right)\right]}_{\triangleq \epsilon_{\text{opt}}}, \end{flalign} where we exploited the fact that $\min_{x\in X} f(x) - \min_{x\in X} g(x) \le \sup_{x\in X} |f(x) - g(x)|$. \subsection{Bound $\bar{\sigma}^{2}(\lambda)$} We remind, from Remark~\ref{remark:assumptions}, that \begin{flalign} \sigma_{0}^{2} & \triangleq \max_{m}\mathbb{E}_{\vec{z}\sim\mathcal{P}_{m}}\left[\sup_{\theta\in\Theta}\left\|\nabla \ell(\theta; \vec{z}) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2} \right], \end{flalign} and \begin{flalign} \zeta & \triangleq \max_{m,m'}\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|. \end{flalign} \begin{lem} \label{lem:bound_sigma} For any memory update rule and any choice of memory parameters $\bm{\lambda}$ we have \begin{equation} \bar{\sigma}^{2}\left(\bm{\lambda}\right) = \mathcal{O}\left(\sigma_{0}^{2} + \zeta^{2}\cdot\sum_{t=1}^{T}q^{(t)}\sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2}\right). \end{equation} \end{lem} \begin{proof} We remind that \begin{equation} \bar{\sigma}^{2}\left(\bm{\lambda}\right) = \sum_{t=1}^{T}q^{(t)}\mathbb{E}_{\mathcal{S}}\left[\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) - \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \right\|^{2}\right], \end{equation} and, for $m\in[M]$, we define \begin{equation} \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\cdot\right) \triangleq \frac{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}}\lambda_{m}^{(t, j)}\ell\left(\cdot, \bm{z}_{m}^{(j)}\right)}{\sum_{s=1}^{T}\sum_{i\in\mathcal{I}_{m}^{(s)}}\lambda_{m}^{(s, i)}}, \end{equation} and we remind (see Theorem~\ref{thm:bound_gen}) that \begin{equation} p_{m} = \frac{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}}\lambda_{m}^{(t, j)}}{\sum_{m'=1}^{M}\sum_{s=1}^{T}\sum_{i\in\mathcal{I}_{m}^{(s)}}\lambda_{m}^{(s, i)}}. \end{equation} $\mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}$ and $p_{m}$ represent client $m$'s weighted empirical risk of client $m$ and its relative importance, respectively. We remark that \begin{equation} \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})} = \sum_{m=1}^{M}p_{m}\mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}, \end{equation} and \begin{equation} p_{m} = \sum_{t=1}^{T}q^{(t)}p_{m}^{(t)}. \end{equation} \iffalse For $m\in[M]$, one can prove that \begin{equation} \mathbb{E}_{\mathcal{S}_{m}\sim\mathcal{P}^{\left|\mathcal{S}_{m}\right|}}\left[\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right|^{2}\right] \end{equation} \fi For $t\in[T]$ and $\theta\in\Theta$, we have \begin{flalign} \Big\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) & - \sum_{m=1}^{M}p_{m}^{(t)} \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \Big\|^{2} \nonumber \\ & = \Big\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) -\sum_{m=1}^{M}p_{m}^{(t)}\nabla\mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) + \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)- \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \Big\|^{2} \\ & \leq 2 \Big\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\left(\theta\right) -\sum_{m=1}^{M}p_{m}^{(t)}\nabla\mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)\Big\|^{2} + 2 \Big\| \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)- \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \Big\|^{2} \\ & = 2 \underbrace{\Bigg\| \sum_{m=1}^{M}p_{m}^{(t)}\left(\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)- \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right) \Bigg\|^{2}}_{\triangleq T_1} + 2 \underbrace{\Big\|\sum_{m=1}^{M}\left(p_{m} - p_{m}^{(t)}\right)\cdot\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) \Big\|^{2}}_{\triangleq T_{2}}. \label{eq:bound_sigma_part_0} \end{flalign} \paragraph{Bound $T_{1}$.} We have \begin{flalign} T_{1} & = \Bigg\| \sum_{m=1}^{M}p_{m}^{(t)}\left(\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)- \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right) \Bigg\|^{2} \\ & \leq \sum_{m=1}^{M}p_{m}^{(t)}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right)- \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right\|^{2} \\ & = \sum_{m=1}^{M}p_{m}^{(t)}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) + \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right\|^{2} \\ & \leq 2\sum_{m=1}^{M}p_{m}^{(t)}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) \right\|^{2} + 2\sum_{m=1}^{M}p_{m}^{(t)}\left\| \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right\|^{2}. \label{eq:bound_sigma_part_1} \end{flalign} \paragraph{Bound $T_{2}$.} For $m'\in[m]$, we have \begin{flalign} T_{2} & = \Big\|\sum_{m=1}^{M}\left(p_{m} - p_{m}^{(t)}\right)\cdot\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) \Big\|^{2} \\ & = \Big\|\sum_{m=1}^{M}\left(p_{m} - p_{m}^{(t)}\right)\cdot\left(\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{S}_{m'}}^{(\bm{\lambda})}\left(\theta\right)\right) \Big\|^{2} \\ & \leq \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2} \cdot \sum_{m=1}^{M}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{S}_{m'}}^{(\bm{\lambda})}\left(\theta\right)\right\|^{2} \\ &= \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2} \cdot \sum_{m=1}^{M}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) + \nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) + \nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{S}_{m'}}^{(\bm{\lambda})}\left(\theta\right)\right\|^{2} \\ & \leq 3 \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2} \cdot \Bigg(\sum_{m=1}^{M}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2} + \left\|\nabla \mathcal{L}_{\mathcal{S}_{m'}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right)\right\|^{2} \Bigg) \nonumber \\ & \qquad + 3 \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2} \cdot \sum_{m=1}^{M} \left\|\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right)\right\|^{2}. \\ & \leq 3 \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2} \cdot \Bigg(\sum_{m=1}^{M}\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2} + \left\|\nabla \mathcal{L}_{\mathcal{S}_{m'}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right)\right\|^{2} \Bigg) \nonumber \\ & \qquad + 3M\zeta^{2} \sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2}. \label{eq:bound_sigma_part_2} \end{flalign} We observe that \begin{equation} \nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) = \sum_{i=1}^{N_{m}}\tilde{p}_{m, i}\nabla \ell(\theta; \bm{z}_{m}^{(i)}), \end{equation} where, for $i \in N_{m}$, \begin{equation} \tilde{p}_{m, i} = \frac{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}}\mathds{1}\left\{j=i\right\}\cdot \lambda_{m}^{(t,j)}}{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}} \lambda_{m}^{(t,j)}}. \end{equation} Thus, \begin{flalign} \mathbb{E}_{\mathcal{S}}\left[\left\|\nabla \mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right] & = \mathbb{E}_{\mathcal{S}_{m}}\left[\left\|\nabla\mathcal{L}_{\mathcal{S}_{m}}^{(\bm{\lambda})}\left(\theta\right) -\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right] \\ &= \mathbb{E}_{\mathcal{S}_{m}}\left[\left\|\sum_{i=1}^{N_{m}}\tilde{p}_{m, i}\nabla\ell(\theta; \bm{z}_{m}^{(i)})-\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right] \\ & = \mathbb{E}_{\mathcal{S}_{m}}\left[\left\|\sum_{i=1}^{N_{m}}\tilde{p}_{m, i}\left(\nabla\ell(\theta; \bm{z}_{m}^{(i)})-\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right)\right] \\ & \leq \sum_{i=1}^{N_{m}}\tilde{p}_{m, i}\mathbb{E}_{\mathcal{S}_{m}}\left[\left\|\nabla\ell(\theta; \bm{z}_{m}^{(i)})-\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right] \\ & = \sum_{i=1}^{N_{m}}\tilde{p}_{m, i}\mathbb{E}_{\bm{z}_{m}^{(i)}}\left[\left\|\nabla\ell(\theta; \bm{z}_{m}^{(i)})-\nabla \mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2}\right] \\ & \leq \sum_{i=1}^{N_{m}}\tilde{p}_{m, i} \sigma_{0}^{2} \\ & = \sigma_{0}^{2}. \label{eq:bound_sigma_part_3} \end{flalign} In the same way we prove that \begin{equation} \mathbb{E}_{\mathcal{S}}\left\| \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right) - \nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)\right\|^{2} \leq \sigma_{0}^{2}. \label{eq:bound_sigma_part_4} \end{equation} We conclude by combining \eqref{eq:bound_sigma_part_0}, \eqref{eq:bound_sigma_part_1}, \eqref{eq:bound_sigma_part_2}, \eqref{eq:bound_sigma_part_3}, and \eqref{eq:bound_sigma_part_4}. \iffalse We construct a scenario where the upper bound is reached. We suppose that $M=2$, $T=2$, $\mathcal{Z}=\left\{-1, 1\right\}$, $\Theta=[0,1]$, and that $\ell\left(\theta; \bm{z}\right) = (1 + \bm{z}\cdot\theta^{2})/{2}$. In that case $L=1$, and $B=1$. Let $\mathcal{S}_{1}=\left\{\bm{z}_{1}\right\}$ and $\mathcal{S}_{2}=\left\{\bm{z}_{2}\right\}$ where $\bm{z}_{1}$ and $\bm{z}_{2}$ are drawn independently from a Rademacher distribution. We suppose that $\mathcal{M}_{1}^{(1)} = \mathcal{M}_{1}^{(2)} = \left\{\bm{z}_{1}\right\}$ and that $\mathcal{M}_{1}^{(1)} = \left\{ \bm{z}_{2}\right\}$. For simplicity, we denote $\tilde{\lambda} = \lambda_{1}^{(1, 1)}$. Thus \begin{flalign} \mathbb{E}_{\bm{z}_{1}, \bm{z}_{2}}\left[\bar{\sigma}^{2}\left(\bm{\lambda}\right) \right]= \lambda \left(1-\lambda\right)\mathbb{E}_{\bm{z}_{1}, \bm{z}_{2}}\left[\left(\bm{z}_{1} - \bm{z}_{2}\right)^{2}\right] = 2\lambda\left(1-\lambda\right) \end{flalign} \fi \end{proof} \subsubsection*{\bibname}} \usepackage{hyperref} \usepackage{url} \usepackage{bm} \usepackage{stmaryrd} \usepackage{graphicx} \usepackage{amsmath,amsfonts,amssymb} \usepackage{mathtools} \usepackage{dsfont} \usepackage[ruled, vlined, linesnumbered]{algorithm2e} \usepackage{multirow} \usepackage{caption} \usepackage{subcaption} \usepackage[thinc]{esdiff} \usepackage{minitoc} \usepackage{xcolor} \usepackage{wrapfig} \usepackage{booktabs} \usepackage{multirow} \usepackage{amsthm} { \theoremstyle{plain} \newtheorem{assumption}{Assumption} \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{PropAISTATosition} \newtheorem{cor}[thm]{Corollary} \newtheorem{definition}{Definition} \newtheorem{example}{Example} \newtheorem{remark}{Remark} \newtheorem{claim}{Claim} \theoremstyle{plain} } \renewcommand \thepart{} \renewcommand \partname{} \newtheorem*{rep@prop}{\rep@title} \newcommand{\newrepprop}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@prop} }% {\end{rep@prop}} } \newtheorem*{rep@thm}{\rep@title} \newcommand{\newrepthm}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@thm} }% {\end{rep@thm}} } \newtheorem*{rep@lem}{\rep@title} \newcommand{\newreplem}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@lem} }% {\end{rep@lem}} } \newtheorem*{rep@cor}{\rep@title} \newcommand{\newrepcor}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@cor} }% {\end{rep@cor}} } \newtheorem*{rep@assumption}{\rep@title} \newcommand{\newrepassumption}[2]{% \newenvironment{rep#1}[1]{% \def\rep@title{#2 \ref{##1}}% \begin{rep@assumption} }% {\end{rep@assumption}} } \newrepprop{prop}{Proposition} \newrepthm{thm}{Theorem} \makeatletter \newcommand{\neutralize}[1]{\expandafter\let\csname c@#1\endcsname\count@} \makeatother \newenvironment{assumptionbis}[1] {\renewcommand{\theassumption}{\ref*{#1}$'$}% \neutralize{assumption}\phantomsection \begin{assumption}} {\end{assumption}} \newenvironment{thmbis}[1] {\renewcommand{\thethm}{\ref*{#1}$'$}% \neutralize{thm}\phantomsection% \begin{thm}} {\end{thm}} \newenvironment{corbis}[1] {\renewcommand{\thethm}{\ref*{#1}$'$}% \neutralize{thm}\phantomsection% \begin{cor}} {\end{cor}} \newrepassumption{assumption}{Assumption} \newrepthm{remark}{Remark} \newreplem{lem}{Lemma} \newrepcor{cor}{Corollary} \theoremstyle{definition} \newtheorem{dfn}{Definition}[section] \newcommand{\texttt{FedAvg}}{\texttt{FedAvg}} \newcommand{\texttt{FedProx}}{\texttt{FedProx}} \newcommand{\texttt{pFedMe}}{\texttt{pFedMe}} \newcommand{\texttt{AFL}}{\texttt{AFL}} \newcommand{\texttt{FFL}}{\texttt{FFL}} \newcommand{\texttt{FIFO}}{\texttt{FIFO}} \newcommand{e}{e} \renewcommand{\vec}[1]{\bm{#1}} \DeclareMathOperator*{\minimize}{minimize} \DeclareMathOperator*{\mathbb{E}}{\mathbb{E}} \DeclareMathOperator*{\proj}{\bm{\Pi}} \DeclareMathOperator*{\Prob}{\mathbb{P}} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\dd}{d} \DeclarePairedDelimiter\ceil{\lceil}{\rceil} \DeclarePairedDelimiter\floor{\lfloor}{\rfloor} \begin{document} \twocolumn[ \aistatstitle{Federated Learning for Data Streams} \aistatsauthor{Othmane Marfoq \And Giovanni Neglia \And Laetitia Kameni \And Richard Vidal} \aistatsaddress{ Inria, Universit\'{e} C\^{ote} d'Azur, \\ Accenture Labs, \\ Sophia Antipolis, France \\ \And Inria, Universit\'{e} C\^{ote} d'Azur, \\ Sophia Antipolis, France \\ \And Accenture Labs \\ Sophia Antipolis, France \\ \And Accenture Labs \\ Sophia Antipolis, France \\ } ] \begin{abstract} Federated learning (FL) is an effective solution to train machine learning models on the increasing amount of data generated by IoT devices and smartphones while keeping such data localized. Most previous work on federated learning assumes that clients operate on static datasets collected before training starts. This approach may be inefficient because 1) it ignores new samples clients collect during training, and 2) it may require a potentially long preparatory phase for clients to collect enough data. Moreover, learning on static datasets may be simply impossible in scenarios with small aggregate storage across devices. It is, therefore, necessary to design federated algorithms able to learn from data streams. In this work, we formulate and study the problem of \emph{federated learning for data streams}. We propose a general FL algorithm to learn from data streams through an opportune weighted empirical risk minimization. Our theoretical analysis provides insights to configure such an algorithm, and we evaluate its performance on a wide range of machine learning tasks. \end{abstract} \section{Introduction} \label{sec:introduction} \input{introduction.tex} \section{Related Work} \label{sec:related} \input{related.tex} \section{Problem Formulation} \label{sec:formulation} \input{formulation.tex} \section{Federated Learning Meta-Algorithm for Data Streams} \label{sec:method} \input{method.tex} \section{Case Study} \label{sec:applications} \input{application} \section{Experimental Results} \label{sec:experiments} \input{experiments.tex} \section{Conclusion} \label{sec:conclusion} \input{conclusion.tex} \section*{Acknowledgments} \label{sec:acknowledgments} \input{acknowledgments.tex} \newpage \bibliographystyle{unsrtnat} \subsection{General Analysis} The true error $\epsilon_{\text{true}}$ of our meta-algorithm in~\eqref{eq:true_error} can be bounded as follows (see proof in Appendix~\ref{proof:error_decomposition}) \begin{flalign} \epsilon_{\text{true}} & \leq \underbrace{\mathbb{E}_{\mathcal{S}, A^{\left(\bm{\lambda}\right)}}\left[\mathcal{L}_{\mathcal{S}}^{ (\bm{\lambda})}\!\left(A^{(\bm{\lambda})}\!\left(\mathcal{S}^{(T)}\right)\right) - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}}^{ (\bm{\lambda})}\!\left(\theta\right)\right]}_{\triangleq \epsilon_{\text{opt}}} \nonumber \\ & \qquad + 2\underbrace{\mathbb{E}_{\mathcal{S}}\left[\sup_{\theta \in \Theta}\left|\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}\!\left(\theta\right) - \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\!\left(\theta\right)\right|\right]}_{\triangleq \epsilon_{\text{gen}}}. \label{eq:error_decomposition_fed} \end{flalign} The generalization error $\epsilon_{\text{gen}}$ is the expected value of the \emph{representativeness} of the dataset $\mathcal S$, which is the maximal distance between the true risk~$\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}$ and the empirical risk~$\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}$. Intuitively, the smaller the generalization error, the better we can approach the minimum of $\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}$ by minimizing $\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}$. The optimization error $\epsilon_{\text{opt}}$ measures how well Algorithm~\ref{alg:meta_algorithm} approaches the minimizer of the weighted empirical risk~ $\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}$. \iffalse \begin{flalign} \epsilon_{\text{true}} & = \mathbb{E}_{\mathcal{S}^{(T)}}\left[\min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}^{(T)}}^{(\bm{\lambda})}\left(\theta\right) \right] - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{P}}\left(\theta\right) + \mathbb{E}_{\mathcal{S}^{(T)}, A^{\left(\bm{\lambda}\right)}}\left[\mathcal{L}_{\mathcal{S}^{(T}}^{(\bm{\lambda})}\left(A^{(\bm{\lambda})}\!\left(\mathcal{S}^{(T)}\right)\right) - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}^{(T)}, \bm{p}}\left(\theta\right)\right] \nonumber \\ & \qquad + \mathbb{E}_{\mathcal{S}^{(T)}, A^{(\bm{\lambda})}}\left[\mathcal{L}_{\mathcal{P}}\left(A^{(\bm{\lambda})}\!\left(\mathcal{S}^{(T)}\right)\right) - \mathcal{L}_{S^{(T)}}^{(\bm{\lambda})}\left(A^{(\bm{\lambda})}\!\left(\mathcal{S}^{(T)}\right)\right)\right] \\ & \leq 2\underbrace{\mathbb{E}_{\mathcal{S}^{(T)}}\left[\sup_{\theta \in \Theta}\left|\mathcal{L}_{\mathcal{P}}\left(\theta\right) - \mathcal{L}_{\mathcal{S}^{(T)}}^{(\bm{\lambda})}\left(\theta\right)\right|\right]}_{\triangleq \epsilon_{\text{gen}}} + \underbrace{\mathbb{E}_{\mathcal{S}^{(T)}, A^{\left(\bm{\lambda}\right)}}\left[\mathcal{L}_{\mathcal{S}^{(T)}}^{ (\bm{\lambda})}\left(A^{(\bm{\lambda})}\!\left(\mathcal{S}^{(T)}\right)\right) - \min_{\theta\in\Theta}\mathcal{L}_{\mathcal{S}^{(T)}}^{ (\bm{\lambda})}\left(\theta\right)\right]}_{\triangleq \epsilon_{\text{opt}}}. \label{eq:error_decomposition_fed} \end{flalign} \fi In the rest of this section, we first provide bounds for for the generalization error $\epsilon_{\text{gen}}$ (Theorem~\ref{thm:bound_gen}) and for the optimization error $\epsilon_{\text{opt}}$ (Theorem~\ref{thm:bound_opt}) and and then combine them to bound the overall error $\epsilon_{\text{true}}$ (Theorem~\ref{thm:main_result}). Our results rely on the following assumptions: \begin{assumption} \label{assum:bounded_loss} (Bounded loss) The loss function is bounded, i.e., $\forall \theta \in \Theta,~\vec{z}\in\mathcal{Z},~\ell(\theta; \vec{z}) \in [0, B]$. \end{assumption} \begin{assumption} \label{assum:bounded_domain} (Bounded domain) We suppose that $\Theta$ is convex, closed and bounded with diameter $D$. \end{assumption} \begin{assumption} \label{assum:convex} (Convexity) For all $\vec{z}\in\mathcal{Z}$, the function $\theta \mapsto \ell(\theta; \vec{z})$ is convex on $\mathbb{R}^{d}$. \end{assumption} \begin{assumption} \label{assum:smoothness} (Smoothness) For all $\vec{z}\in\mathcal{Z}$, the function $\theta \mapsto \ell(\theta; \vec{z})$ is $L$-smooth on $\mathbb{R}^{d}$. \end{assumption} Assumption~\ref{assum:bounded_loss} is a standard assumption in statistical learning theory~(e.g.,~\citep{mohri2018foundations} and~\citep{shalev2014understanding}). Assumptions~\ref{assum:bounded_domain}--\ref{assum:smoothness} are common assumptions in the analysis of (stochastic) gradient methods (see for example~\citep{bubeck2015convex} and \citep{bottou2018optimization}) and online convex optimization~\citep{hazan2019introduction}. \begin{remark} \label{remark:assumptions} Assumptions~\ref{assum:bounded_loss} and~\ref{assum:smoothness} imply that (it follows from Lemma~\ref{lem:bounded_noise} in Appendix~\ref{proof:properties}) \begin{flalign} \sigma_{0}^{2} & \triangleq \max_{m}\mathbb{E}_{\vec{z}\sim\mathcal{P}_{m}}\left[\sup_{\theta\in\Theta}\left\|\nabla \ell(\theta; \vec{z}) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\|^{2} \right] \\ & \leq\left(2\cdot\sqrt{2LB}\right)^{2}, \end{flalign} and (it follows from Lemma~\ref{lem:bounded_dissimilarity} in Appendix~\ref{proof:properties}) \begin{flalign} \zeta & \triangleq \max_{m,m'}\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{P}_{m'}}\left(\theta\right) - \nabla\mathcal{L}_{\mathcal{P}_{m}}\left(\theta\right)\right\| \\ & \leq 2\cdot \sqrt{2LB}. \end{flalign} These properties are similar to the stochastic gradients' bounded variance, and the clients' bounded dissimilarity assumptions usually employed in the analysis of federated learning algorithms~\citep{wang2021field}. \end{remark} \subsection{Bounding the Generalization Error} \label{sec:bound_gen} Theorem~\ref{thm:bound_gen} (proof in Appendix~\ref{proof:bound_gen}) quantifies the generalization error and in particular how the weighted empirical risk $\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}$ differs from the target expected risk $\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}$ for the minimizer of the first one, i.e., it bounds $|\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}(\theta')-\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}(\theta')|$ for $\theta' \in \arg\min_{\theta \in \Theta} \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}(\theta) $. The bound differs from classic statistical learning results (as those in~\citep{shalev2014understanding}) because $\mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}$ is a weighted empirical risk and its expected value does not necessarily coincide with~$\mathcal{L}_{\mathcal{P}^{(\bm{\alpha})}}$. We recall that the label discrepancy associated to a hypothesis class $\mathcal{H}$ quantifies the distance between two distributions $\mathcal{P}$ and $\mathcal{P}'$ as follows $\texttt{disc}_{\mathcal{H}}\left(\mathcal{P}, \mathcal{P}'\right) \triangleq \max_{h\in\mathcal{H}}\left|\mathcal{L}_{\mathcal{P}}\left(h\right) - \mathcal{L}_{\mathcal{P}'}\left(h\right)\right|$ \citep{mansour2020three}. \begin{thm} \label{thm:bound_gen} Suppose that Assumption~\ref{assum:bounded_loss} holds, when using Algorithm~\ref{alg:meta_algorithm} with weights $\bm{\lambda}$, it follows that \begin{equation} \label{eq:bound_gen} \epsilon_{\text{gen}} \leq \mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}^{\left(\bm{\alpha}\right)}, \mathcal{P}^{\left(\bm{p}\right)}\right) + \tilde{O}\left(\sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N_{\mathrm{eff}}}}\right), \end{equation} where $N_{\text{eff}} = \left(\sum_{m=1}^{M}\sum_{i=1}^{N_{m}}p_{m, i}^{2}\right)^{-1}$, \begin{flalign} \label{eq:def_pac_bound_terms} p_{m, i} &= \frac{\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m}^{(t)}}\mathds{1}\left\{j=i\right\}\cdot \lambda_{m}^{(t,j)}}{\sum_{m'=1}^{M}\sum_{t=1}^{T}\sum_{j\in\mathcal{I}_{m'}^{(t)}} \lambda_{m'}^{(t,j)}}, \quad i \in N_{m}, \end{flalign} and $ \bm{p} = \left( \sum_{i=1}^{N_{m}}p_{m, i}\right)_{1\leq m \leq M}$. \end{thm} The coefficient $p_{m, i}$ represents the \emph{relative importance} given, during the whole training period, to sample $i$ with respect to all the samples collected by all clients and $p_m=\sum_{i=1}^{N_{m}}p_{m, i}$ represents the relative importance given to client $m$ during training. Note that $p_{m} = \sum_{t=1}^{T}q^{(t)}p_{m}^{(t)}$ and the $p_m^{(t)}$ coincides with the relative importance $p_m$, when $p_m^{(t)}$ is constant over time. In general, there is an inconsistency between the importance we should give to clients (quantified by $\bm{\alpha}$ in \eqref{eq:main_problem}) and the one we actually give them during training (quantified by~$\bm{p}$). The first term on the RHS of \eqref{eq:bound_gen} captures the mismatch between the target distribution $\mathcal{P}^{(\bm{\alpha})}$ and the \emph{``effective distribution''} $\mathcal{P}^{(\bm{p})} = \sum_{m=1}^{M}p_{m}\mathcal{P}_{m}$ through the discrepancy. The second term in the RHS of \eqref{eq:bound_gen} is similar in shape to the usual bounds observed in statistical learning theory, e.g., \citep{shalev2014understanding}, which are proportional to the square root of the ratio of the VC dimension of the hypotheses class and the total number of samples $N$. In our case, $N_{\text{eff}}$ plays the role of the \emph{effective number of samples} and Lemma~\ref{lem:bound_n_eff} (proof in Appendix~\ref{proof:bound_n_eff}) shows that, as expected, $N_{\text{eff}}$ is at most $N$, and reaches this value when each sample is given the same importance. \begin{lem} \label{lem:bound_n_eff} It holds $N_{\mathrm{eff}} \leq N$ and the bound is attained when each sample has the same relative importance, i.e., $p_{m, i}=p_{m, j}$, for each $i, j \in [N_m]$. \end{lem} The generalization error $\epsilon_{\text{gen}}$ decreases the closer $\bm{\alpha}$ and $\bm{p}$ are and the larger $N_{\text{eff}}$ is. When $\alpha_{m}=n_m$ (remember that $n_m=N_m/N)$, the choice $p_{m, i}={1} /{N}$ minimizes the bound, as it leads both to $\bm{p}=\bm{n}=\bm{\alpha}$ and to $N_{\mathrm{eff}} = N$. In our streaming learning setting, $p_{m, i}={1} /{N}$ can be obtained by different combinations of memory update rules and sample weight selection rules. For example, this is the case when clients' memories only contain the samples received during the current round (i.e., $\texttt{Update}(\mathcal{M}_{m}^{(t-1)}, \mathcal{B}^{(t)}_{m})= \mathcal{B}^{(t)}_{m}$ in line~\ref{line:memory_update} of Alg.~\ref{alg:meta_algorithm}) and all samples currently in the memory get weight $1$ (i.e., $\lambda_{m}^{(t,j)}=1$ for each $j \in \mathcal I_{m}^{(t)}$). But it is also the case when the memory update rule lets samples stay in memory for multiple consecutive rounds (e.g., $\tau_m^{(j)}$ rounds for sample $j$ at client $m$) and samples receive a weight inversely proportional to the number of consecutive rounds (i.e., $\lambda_{m}^{(t,j)}=1/\tau_m^{(j)}$). In what follows, we refer to any combination of memory update rules and weight selection rules leading to $p_{m, i}={1} /{N}$ as a \texttt{Uniform} strategy. While a \texttt{Uniform} strategy minimizes the bound for the generalization error $\epsilon_{\text{gen}}$ when $\bm{\alpha} = \bm{n}$, it is in general suboptimal in terms of the optimization error $\epsilon_{\text{opt}}$, as we are going to show in the next section. \subsection{Bounding the Optimization Error} \label{sec:bound_opt} We provide our bound on $\epsilon_{\text{opt}}$ under full clients participation ($\mathbb{S}^{(t)}=[M]$) with full batch ($K\geq |\mathcal{I}_{m}^{(t)}|$). Under mini-batch gradients an additional vanishing error term appears. The proof is provided in Appendix~\ref{proof:bound_opt}. \begin{thm} \label{thm:bound_opt} Suppose that Assumptions~\ref{assum:bounded_loss}--\ref{assum:smoothness} hold, the sequence $\left(q^{(t)}\right)_{t}$ is non increasing, and verifies $q^{(1)}=\mathcal{O}\left(1/T\right)$, and $\eta\propto 1/\sqrt{T} \cdot \min\{1, 1 /\bar{\sigma}\left(\bm{\lambda}\right)\}$. Under full clients participation ($\mathbb{S}^{(t)}=[M]$) with full batch ($K\geq |\mathcal{I}_{m}^{(t)}|$), we have \begin{flalign} \epsilon_{\text{opt}} & \leq \mathcal{O}\Big(\bar{\sigma}\left(\bm{\lambda}\right)\Big) + \mathcal{O}\Big(\frac{\bar{\sigma}\left(\bm{\lambda}\right)}{\sqrt{T}}\Big) + \mathcal{O}\left(\frac{1}{\sqrt{T}}\right), \label{eq:bound_opt} \end{flalign} where, \begin{flalign} & \bar{\sigma}^{2}\left(\bm{\lambda}\right) \triangleq \sum_{t=1}^{T}q^{(t)} \times \nonumber \\ & \quad \mathbb{E}_{\mathcal{S}}\Bigg[\sup_{\theta\in\Theta}\left\|\nabla \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\!\left(\theta\right) - \sum_{m=1}^{M}p_{m}^{(t)}\nabla \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right) \right\|^{2}\Bigg]. \end{flalign} Moreover, there exist a data arrival process and a loss function $\ell$, such that, under FIFO memory update rule,\footnote{ The FIFO (First-In-First-Out) update rule evicts the oldest samples in the memory to store the most recent ones. } for any choice of weights~$\bm{\lambda}$, $\epsilon_{\text{opt}} = \Omega\left(\bar{\sigma}\left(\bm{\lambda}\right)\right)$. \end{thm} \iffalse \begin{figure*}[t] \setkeys{Gin}{width=\linewidth} \begin{subfigure}[b]{0.25\textwidth} \includegraphics{Figures/n_effecient.pdf} \end{subfigure} \hfill \begin{subfigure}[b]{0.25\textwidth} \includegraphics{Figures/variance.pdf} \end{subfigure} \hfill \begin{subfigure}[b]{0.23 \textwidth} \includegraphics{Figures/optimal_allocation.pdf} \end{subfigure} \hfill \begin{subfigure}[b]{0.235\textwidth} \includegraphics{Figures/optimal_psi_value_fixed_n.pdf} \end{subfigure} \caption{From left to the right: effect of $c_{2}/{c_{1}}$ on the effective number of samples, the normalized gradient noise, and the historical clients weight $(\psi^{*} - c_{0}) / c_{2}$, for CIFAR-10 dataset ($N=5\times10^{5}$) with different values of $N_{\text{hist}}/N$, when $M=50$ and $M_{\text{hist}}=25$.} \label{fig:objective_weights_effect} \end{figure*} \fi The coefficient $\bar{\sigma}^2\left(\bm{\lambda}\right)$ quantifies the variability of the gradient considered in the update at round~$t$ w.r.t.~the gradient of the global objective $\mathcal L_{\mathcal S}^{\left(\bm{\lambda}\right)}$ and, as shown by Theorem~\ref{thm:bound_opt}, it prevents the optimization error to vanish when $T$ diverges. Lemma~\ref{lem:bound_sigma} provides a general upper bound for $\bar{\sigma}^2\left(\bm{\lambda}\right)$ in terms of stochastic gradients’ variance and clients' dissimilarity. \iffalse \begin{lem} \label{lem:bound_sigma} Suppose that Assumptions~\ref{assum:bounded_domain}, and~\ref{assum:smoothness} hold. For any memory update rule and any choice of memory parameters $\bm{\lambda}$ we have \begin{equation*} \bar{\sigma}^{2}\left(\bm{\lambda}\right) = \mathcal{O}\left(\sigma_{0}^{2} + \zeta^{2}\cdot\sum_{t=1}^{T}q^{(t)}\sum_{m=1}^{M}\left(p_{m}-p_{m}^{(t)}\right)^{2}\right). \end{equation*} \end{lem} \fi \iffalse \begin{lem} \label{lem:bound_sigma} Suppose that Assumptions~\ref{assum:bounded_domain} and~\ref{assum:smoothness} hold. We have that $\bar{\sigma}\left(\bm{\lambda}\right) \leq \sigma_{0}$ for any memory update rule and weights $\bm{\lambda}$. \end{lem} \fi The optimization error $\epsilon_{\text{opt}}$ is smaller the closer $\bar{\sigma}^{2}(\bm{\lambda})$ is to zero. In our streaming learning setting, $\bar{\sigma}^{2}(\bm{\lambda})=0$ may be obtained if the memory is never updated ($\texttt{Update}(\mathcal{M}_{m}^{(t-1)}, B_{m}^{(t)}) = \mathcal{M}_{m}^{(t-1)}, \forall t\geq 1$) and the aggregation weights are constant over time ($p_{m}^{(t)}= p_{m}, \forall t\in[T]$). It is indeed easy to check that under these conditions $ \mathcal{L}_{\mathcal{S}}^{(\bm{\lambda})}\!\left(\theta\right) = \sum_{m=1}^{M}p_{m}^{(t)} \mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(t)}}\left(\theta\right)$ (and they equal $\sum_{m=1}^{M}p_{m}\mathcal{L}^{(\bm{\lambda})}_{\mathcal{M}_{m}^{(0)}}\left(\theta\right))$. Any set of time-independent sample weights leads to constant aggregation weights, but, among them, the choice $\lambda_{m}^{(t, j)} = 1$ reduces the generalization bound $\epsilon_{\text{gen}}$. We refer to these memory update and weight selection rules as the \texttt{Historical} strategy. The \texttt{Historical} strategy minimizes the optimization bound by ignoring all the samples collected during training. It is in sharp contrast with the \texttt{Uniform} strategy, which assigns the same relative importance to all collected samples. \subsection{Main Result} The tension between the two error components $\epsilon_{\text{gen}}$ and $\epsilon_{\text{opt}}$ is evident from our discussion above. One can minimize $\epsilon_{\text{gen}}$ by considering at each time only the most recent samples, and, at the opposite, $\epsilon_{\text{opt}}$ by ignoring those samples. By combining Theorems~\ref{thm:bound_gen} and~\ref{thm:bound_opt}, Theorem~\ref{thm:main_result} formally quantifies this trade-off and provides a bound on $\epsilon_{\text{true}}$. \begin{thm} \label{thm:main_result} Under the same assumptions as in Theorem~\ref{thm:bound_gen} and Theorem~\ref{thm:bound_opt}, \begin{flalign} \label{eq:bound_epsilon_true} \epsilon_{\text{true}} \leq & \mathcal{O}\left(\frac{1}{\sqrt{T}}\right) + \mathcal{O}\big(\bar{\sigma}\left(\bm{\lambda}\right)\big) + 2\mathrm{disc}_{\mathcal{H}}\left(\mathcal{P}^{\left(\bm{\alpha}\right)}, \mathcal{P}^{\left(\bm{p}\right)}\right) \nonumber \\ & \qquad + \tilde{O}\left(\sqrt{\frac{\mathrm{VCdim}\left(\mathcal{H}\right)}{N_{\mathrm{eff}}}}\right). \end{flalign} \end{thm}
\section{Introduction} Fix an irrational number $\alpha\in \mathbb R$, and consider the family of Markov processes with the evolution governed by the transition kernel \begin{equation}\label{E:1.1} p(x, \cdot ) = \mathfrak{p}(x) \delta_{x+\alpha} + \mathfrak{q}(x) \delta_{x-\alpha}, \quad p : \mathbb{T} \times \mathcal B (\mathbb{T} ) \to [0,1], \end{equation} where $\mathcal B (\mathbb S^1 )$ stands for the $\sigma$-algebra of Borel subsets of $\mathbb S^1$ and $\mathfrak{q}(x)=1-\mathfrak{p}(x)$, $x\in \mathbb{T}$. We call the function $\mathfrak{p}$ symmetric if $$\int_{\mathbb{T}} f(x) dx = 0,$$ where \begin{equation}\label{E:1.2} f(x)=\ln\frac{\mathfrak{p}(x)}{\mathfrak{q}(x)}, \quad x\in\mathbb{T}, \end{equation} and asymmetric otherwise. We call a measure $\mu$ invariant for transition kernel (\ref{E:1.1}) if distributing the starting point according to $\mu$ makes the Markov process with this transition kernel stationary (thus $\mu$ is called also often a stationary measure). Since $\mathbb{T}$ is compact, the Krylov-Bogoliubov technique yields existence of an invariant distribution for (\ref{E:1.1}) for every choice of continuous $\mathfrak{p}$. However, it is far from being obvious if there exists more than one invariant distribution. The earliest paper known to the author dealing with similar (but still slightly different) system was by Sine \cite{Sine_1979}. More recently it was proven by Sinai in \cite{Sinai_1999} that if $\mathfrak{p}\in C^\infty(\mathbb{T})$ is asymmetric or $\mathfrak{p}\in C^\infty(\mathbb{T})$ is symmetric and $\alpha$ is Diophantine then the uniqueness follows. One year later Conze and Guivarc'h proved in \cite{Conze_Guivarc'h_2000} that in the symmetric case $\frac{\mathfrak{p}(x)}{\mathfrak{q}(x+\alpha)}\in BV$ implies uniqueness no matter if $\alpha$ is Diophantine or not. The present paper contains another proof of the latter statement assuming $\mathfrak{p}\in C^1$ is symmetric. The advantage of the new proof is that it gives more insight to the problem of mixing and the problem of uniqueness in higher dimensional analogs (where $\mathbb{T}$ is replaced by $\mathbb{T}^d$). See Section 5 for more details. The strategy is based on Sinai's. To explain it, fix $x\in \mathbb{T}$ and consider a Markov process $(X_n)$ started at $x$ with transition kernel (\ref{E:1.1}). It is evident that the process can achieve only the points of the form $x+j\alpha$, $j\in\mathbb{Z}$. Thus to learn the distribution of $(X_n)$ on $\mathbb{T}$ we consider a Markov chain $(\xi_n)$ on $\mathbb{Z}$, started at 0, with $$\mathbb{P}(\xi_{n+1}=k+1 | \xi_n=k )= \mathfrak{p}(x+k\alpha)$$ and $$\mathbb{P}(\xi_{n+1}=k-1 | \xi_n=k )= \mathfrak{q}(x+k\alpha)$$ for $n\ge 0$ and $k\in \mathbb{Z}$. Let us now restrict to the symmetric case, which is in our scope of interest. In that case the system on $\mathbb{Z}$ is recurrent. If $\mathfrak{p}\in C^\infty(\mathbb{T})$ is symmetric and $\alpha$ is Diophantine then the cohomological equation $f(x)=g(x+\alpha)-g(x)$, where $f$ is defined in (\ref{E:1.2}), possesses a solution. Using the solution $g$ we can easily check that the measure with density $h(z)/\mathfrak{q}(z)$ is invariant, where $h=\exp(g)$. Now the whole difficulty in Sinai's approach was to show the local limit theorem for $(\xi_n)$ on $\mathbb{Z}$. More precisely, in the symmetric case Sinai has proven that $$\mathbb{P}(\xi_n=k)\sim \frac{h(x+k\alpha)}{\mathfrak{p}(x+k\alpha)} \frac{1}{\sqrt{2\pi\sigma^2 n}}\exp{\frac{-k^2}{2n\sigma^2}},$$ for some $\sigma>0$ and all $x\in \mathbb{T}$, where $\sim$ means the ratio of both sides tends to one. With this fact one can show that $$\mathbb{E} \varphi(X_n) \to \int_{\mathbb{T}} \varphi(z) \frac{h(z)}{\mathfrak{q}(z)}dz,$$ which easily implies the unique ergodicity (in fact it's even a stronger property called mixing or stability). Unfortunately we cannot follow exactly the same path when generalizing result to all irrational $\alpha$. Recently Dolgopyat, Fayad and Saprykina \cite{DFS_2021} have proven that if $\alpha$ is Liouville then the behaviour of $(\xi_n)$ on $\mathbb{Z}$ is erratic for the generic choice of smooth and symmetric $\mathfrak{p}$ (see Theorems A-E therein). In particular, neither annealed, nor quenched central limit theorem holds (see Corollary D and G therein). However, we can still modify something in Sinai's idea to get desired assertion. The main result of this work is the following. \begin{thm}\label{T:1} If $\mathfrak{p}\in C^1(\mathbb{T})$ is symmetric and separated from $0$ and $1$ (i.e. $0<\mathfrak{p}(x)<1$ for each $x\in \mathbb{T}$) then there exists exactly one invariant measure for the transition kernel (\ref{E:1.1}). \end{thm} As it was mentioned, the proof is some sense is in the spirit of Sinai's. We still concentrate on the process $(\xi_n)$ on $\mathbb{Z}$ but instead of proving the local limit theorem we focus on the limits $$\lim_{n\to\infty} \frac{\mathbb{P}(\xi_0=k)+\cdots+\mathbb{P}(\xi_{n-1}=k)}{\mathbb{P}(\xi_0=m)+\cdots+\mathbb{P}(\xi_{n-1}=m)},$$ where $k, m\in \mathbb{Z}$ are two states. The problem of existence of such limits for general (including countable space, null recurrent) Markov chains was raised by Kolmogorov in 1936 and answered two years later by Doeblin \cite{Doeblin_1938} without identification of the value of the limit. It has been done only later by Chung \cite{Chung_1950}. It turns out we can define certain infinite measure on $\mathbb{Z}$, $k\longmapsto a_{x,k}$ (depending on $x\in\mathbb{T}$ since $(\xi_n)$ depends on $x\in\mathbb{T}$) such that the limit above tends to $a_{x, k}/a_{x, m}$ for arbitrary two states $k$ and $m$. In Section 2 we identify the measure $k\longmapsto a_{x,k}$ on $\mathbb{Z}$ and reproduce the proof of Doeblin ratio limit theorem. In Section 3 it is proved that if one takes a large interval of integers $A$ of length $q$ and projects the measure $k\longmapsto a_{x,k}$ to the circle (by identifying $k$ with $x+k\alpha$) then what we obtain is, after normalization and up to $\varepsilon$, independent of the choice of the interval $A$ and the point $x$, provided $q$ is sufficiently large. Section 4 contains how to complete the proof of Theorem \ref{T:1} using the above results. Section 5 contains some final remarks. \section{Acknowledgments and personal remarks} When I proved the main theorem I wasn't aware of Conze, Guivarc'h result. After discovering it, I started thinking if my proof can be used to show something more. I realized the advantage of mine is it can be modified to obtain mixing (assuming $\mathfrak{p}$ is $C^1$ and symmetric, no matter if $\alpha$ is Diophantine or not). Then I gave several talks about it, e.g. in the conference ``Probabilistic techniques in random and time-varying dynamical systems'', Luminy 3-7.10.2022 or in the KTH dynamical systems seminar, where I announced ``mixing'' result. Although I still think this result is true, I didn't predicted certain difficulties in the proof and I need more time and effort to complete it. Meanwhile I'm publishing the proof of uniqueness. It's not going to be submitted to any journal. The research was supported by the Polish National Science Center grant Preludium UMO-2019/35/N/ST1/02363. \section{Basic facts about symmetric random walks on $\mathbb{Z}$} Fix $x\in \mathbb{T}$ and define $(\xi_n)$ to be the Markov process on $\mathbb{Z}$, started at 0, with $$\mathbb{P}(\xi_{n+1}=k+1 | \xi_n=k )= \mathfrak{p}(x+k\alpha)$$ and $$\mathbb{P}(\xi_{n+1}=k-1 | \xi_n=k )= \mathfrak{q}(x+k\alpha)$$ for $n\ge 0$ and $k\in \mathbb{Z}$. In present section we are going to prove recurrence of this random walk and some related results. We say that $(\xi_n)$ is recurrent if almost surely there exists $n>0$ with $\xi_n=0$. We say $(\xi_n)$ is null recurrent if it is recurrent and the expected time of the first return to $0$ is infinite. \begin{prop}\label{P:1} If $\mathfrak{p}$ is of bounded variation, symmetric and separated from $0$ and $1$ then the process $(\xi_n)$ is recurrent. Moreover, for every $r>0$ there exists $m_0$ that can be chosen uniformly in $x\in \mathbb{T}$ such that the expected number of returns of $(\xi_n)$ to zero until $m_0$ is greater than $r$, i.e. $$\mathbb{P}(\xi_1 =0 ) +\cdots +\mathbb{P}(\xi_n =0 ) = \mathbb{E}\big( \mathds{1}_{\{0\}}(\xi_1) + \cdots + \mathds{1}_{\{0\}}(\xi_n) \big) > r$$ for $n\ge m_0$, whatever $x\in \mathbb{T}$. \end{prop} \begin{proof} To show the recurrence of $(\xi_n)$, we reproduce the analysis from \cite{DFS_2021}, Section 3.2. Let us define a function $M : \mathbb{Z} \rightarrow \mathbb R$ by $M(0)=0$, $M(1)=1$, $$M(n)=1+\sum_{k=1}^{n-1}\prod_{j=1}^k \frac{\mathfrak{q}(x+j\alpha)}{\mathfrak{p}(x+j\alpha)} \quad \textrm{for $n\ge 2$,}$$ and $$M(-n)=-\sum_{k=0}^n \prod_{j=0}^k \frac{\mathfrak{p}(x-j\alpha)}{\mathfrak{q}(x-j\alpha)} \quad \textrm{for $n\ge 1$.}$$ To avoid complicated notation, we do not stress the dependence of $M$ on $x$. It can be checked that $(M(\xi_n))$ is a martingale. Let $a<0<b$ and let us define $\tau$ to be the first moment when $(\xi_n)$ hits $a$ or $b$. By Doob's theorem $\mathbb{E} M(\xi_\tau)=M(\xi_0)=0$. On the other hand $$\mathbb{E} M(\xi_\tau)=M(a)\mathbb{P}(\xi_\tau=a)+M(b) \mathbb{P}(\xi_\tau=b)$$ $$=M(a)\mathbb{P}(\xi_\tau=a)+M(b)(1-\mathbb{P}(\xi_\tau=a)),$$ which combined with $\mathbb{E} M(\xi_\tau)=0$ yields $$\mathbb{P}(\xi_\tau=a)=\frac{M(b)}{M(b)-M(a)}.$$ If $\xi_\tau=a$ then $(\xi_n)$ returns to $0$ before hitting $b$. Setting $a=-1$ above we get therefore \begin{equation}\label{E:2.1} \mathbb{P}\bigg(\textrm{$(\xi_n)$ returns to $0$ before hitting $b$}\bigg)\ge \frac{M(b)}{M(b)-M(-1)}. \end{equation} Similarly \begin{equation}\label{E:2.2} \mathbb{P}\bigg(\textrm{$(\xi_n)$ returns to $0$ before hitting $a$}\bigg)\ge \frac{-M(a)}{M(1)-M(a)}. \end{equation} This easy implies the random walk $(\xi_n)$ is recurrent provided $M(n)\to \infty$ as $n\to \infty$ and $M(n)\to -\infty$ as $n\to-\infty$. The latter is implied by the following consequence of the Denjoy-Koksma inequality. \begin{lem}\label{L:2.1} For every $A>0$ there exists $n_0>0$ that is independent of $x\in \mathbb{T}$ such that $M(n)>A$ for $n\ge n_0$ and $M(n)<-A$ for $n \le n_0$. \end{lem} \begin{proof} Take $n>0$. The function $M(n)$ is a sum of expressions of the form $$\prod_{j=1}^k \frac{\mathfrak{q}(x+j\alpha)}{\mathfrak{p}(x+j\alpha)} \quad \textrm{for $k<n$,}$$ therefore to show the assertion it is sufficient to find $\delta>0$ such that the product above is greater than $\delta$ for infinitely many $k$'s. Define $f(x)=\ln \mathfrak{q}(x) - \ln \mathfrak{p}(x)$, $x\in \mathbb{T}$, and observe we can write $$\prod_{j=1}^k \frac{\mathfrak{q}(x+j\alpha)}{\mathfrak{p}(x+j\alpha)} = \exp\bigg(\sum_{j=1}^k f(x+j\alpha)\bigg).$$ The function $f$ is of bounded variation and $\int_T f(t)dt=0$ so the Denjoy-Koksma inequality (Theorem 3.1 in \cite{Herman_1979}, p. 73) yields $$\bigg|\sum_{j=1}^q f(x+j\alpha)\bigg| = \bigg|\sum_{j=1}^q f(x+j\alpha) - q\int_\mathbb{T} f(t)dt \bigg| < \textrm{var}(f)$$ for an arbitrary $x\in \mathbb{T}$ and an arbitrary closest return time $q$. But this means for an arbitrary closest return time $q$ we have $$\exp\bigg(\sum_{j=1}^k f(x+j\alpha)\bigg)>e^{-\textrm{var}(f)}>0.$$ Thus the assertion follows with $\delta=e^{-\textrm{var}(f)}$. \end{proof} To show the remaining part of Proposition, fix $r>0$ and take $\varepsilon>0$ so small that $(1-\varepsilon)^{2r}>1/2$. By (\ref{E:2.1}), (\ref{E:2.2}) and Lemma \ref{L:2.1} there exists $a>0$ (suitable for all $x\in\mathbb{T}$) such that $$\mathbb{P}\bigg(\textrm{$(\xi_n)$ returns to $0$ before hitting $-a$ or $a$}\bigg)\ge 1-\frac{\varepsilon}{2}.$$ Since $\mathfrak{p}$ and $\mathfrak{q}$ are separated from 0, there exists $n_0$ so large (suitable for all $x\in \mathbb{T}$) such that probability that $(\xi_n)$ stays in $(-a,a)$ for the first $n_0$ steps is less than $\varepsilon/2$. Combining these two facts yields $$\mathbb{P}\bigg( \textrm{$(\xi_n)$ returns to $0$ before $n_0$}\bigg)>1-\varepsilon.$$ By the strong Markov property $$\mathbb{P}\bigg( \textrm{$(\xi_n)$ returns $2r$-times to $0$ before $2rn_0$}\bigg)>(1-\varepsilon)^{2r}>1/2,$$ by the choice of $\varepsilon$. The assertion follows with $m_0=2rn_0$ since the expected number of returns to $0$ before $m_0$ is greater than $2r$ with probability $1/2$. \end{proof} It is advantageous to use the following notation in the remaining part of this section. Let $p_{i,j}^n$ denote the probability of transition from state $i$ to state $j$ in $n$ steps. We simply write $p_{i,j}$ instead of $p_{i,j}^1$. Let $\prescript{}{k}{p}_{i,j}^n$ stands for the probability of transition from state $i$ to state $j$ in $n$ steps under the restriction that state $k$ is visited in neither of steps $1, \ldots, n-1$. Again, these values depend on chosen point $x\in \mathbb{T}$ but we refrain from stressing that in the notation. Clearly $\pr{j}{k}{j}{n}$ is the probability of the first visit in $j$ starting at $k$ occurring in step $n$ and $\pr{k}{k}{j}{n}$ is the probability of transition to $j$ from $k$ in $n$ steps with the restriction that the state $k$ is not visited in steps $1,\ldots, n$. The series $\sum_{n=1}^\infty \pr{k}{k}{j}{n}$ is interpreted as the expected number of visits in $j$ starting at $k$ before the first return to $k$. It is not difficult to show the convergence of this series. \begin{lem}\label{L:2.2} If $\mathfrak{p}$ is of bounded variation, symmetric and separated from $0$ and $1$ then the series $\sum_{n=1}^\infty \pr{k}{i}{j}{n}$ is convergent. Moreover, for any $q\ge 1$ its sum is uniformly bounded over all $k$, $i$, $j$ with $|k-i|$, $|k-j|$, $|j-i|<q$, $x\in \mathbb{T}$. For every $\varepsilon>0$ and natural $q\ge 1$ there exists $N$ with $\sum_{n=N}^\infty \pr{k}{i}{j}{n}<\varepsilon$ whatever $x\in \mathbb{T}$, provided $|k-j|\le q$. \end{lem} \begin{proof} Let $m\in \mathbb N$ be such that $\pr{k}{j}{k}{m}>\eta$ for some $\eta>0$ and all $j, k$ with the same parity and $|j-k|\le q$ (remember the Markov chain is periodic with period two). It is clear $m$ and $\eta$ can be chosen uniformly in $x\in \mathbb{T}$ since $\mathfrak{p}$ is separated from $0$ and $1$. We have $$\pr{k}{i}{j}{n}\cdot \pr{k}{j}{k}{m} \le \pr{k}{i}{k}{n+m}$$ for $n\in \mathbb N$, hence $$\sum_{n=N}^\infty \pr{k}{i}{j}{n}\le \frac{1}{\pr{k}{j}{k}{m}} \sum_{n=N}^\infty \pr{k}{i}{k}{n+m}\le \frac{1}{\eta} \sum_{n=N}^\infty \pr{k}{i}{k}{n+m}.$$ The last series represents the probability that the first transition to $k$ starting at $i$ occurs at earliest at the step $N+m$. This number is bounded from above by $\varepsilon$ if $N$ is sufficiently large. Moreover, $N$ can be chosen to be suitable for all $x\in \mathbb{T}$ by a reasoning similar to the proof of Lemma \ref{L:2.1}. \end{proof} It is not difficult also to recover the value of $\sum_{n=1}^\infty \pr{k}{k}{j}{n}$, which represents the expected value of appearances in state $j$ of the process started at $k$ before it returns to $k$. \begin{lem}\label{L:2.3} If $\mathfrak{p}$ is of bounded variation, symmetric and separated from $0$ and $1$ and $a_{x, n}$ is defined by\footnote{In contrast to other symbols here we stress the dependence on $x\in \mathbb{T}$. That is because this symbol appears in the next section where the dependence on $x$ is significant.} $a_{x,0}=1$ and \begin{equation}\label{E:2.3} a_{x, n}= \frac{\mathfrak{q}(x)}{\mathfrak{q}(x+n\alpha)} \prod_{j=0}^{n-1} \frac{\mathfrak{p}(x+j\alpha)}{\mathfrak{q}(x+j\alpha)} \end{equation} and \begin{equation}\label{E:2.4} a_{x, -n}= \frac{\mathfrak{p}(x)}{\mathfrak{p}(x-n\alpha)} \prod_{j=0}^{n-1} \frac{\mathfrak{q}(x-j\alpha)}{\mathfrak{p}(x-j\alpha)} \end{equation} for $n>0$. Then $$\sum_{n=1}^\infty \pr{k}{k}{j}{n}= \frac{a_{x,j}}{a_{x,k}}$$ for any two states $k, j\in \mathbb Z$. \end{lem} \begin{proof} Fix $k$. First of all, the aim is to show the assertion for $j=k+1$. Notice if the process started at $k$ visits $k-1$ in the first step then it necessarily visits $k$ before ever reaching $k+1$. Thus the probability of exactly one appearance in $k+1$ before returning to $k$ is $\mathfrak{p}(x+k\alpha)\cdot \mathfrak{q}(x+(k+1)\alpha)$ and the probability of exactly $r$ appearances is $\mathfrak{p}(x+k\alpha)\cdot \mathfrak{p}(x+(k+1)\alpha)^{r-1}\cdot \mathfrak{q}(x+(k+1)\alpha)$ (since after the first $r-1$ visits it ``jumps'' to the state $k+2$ with probability $\mathfrak{p}(x+(k+1)\alpha)$ and right after $r$-th to $k$ with probability $\mathfrak{q}(x+(k+1)\alpha)$). Hence the expected number of appearances is $$\sum_{n=1}^\infty \pr{k}{k}{j}{n} = \sum_{r=1}^\infty r\cdot \mathfrak{p}(x+k\alpha) \cdot \mathfrak{p}(x+(k+1)\alpha)^{r-1} \cdot \mathfrak{q}(x+(k+1)\alpha)$$ $$= \mathfrak{p}(x+k\alpha) \mathfrak{q}(x+(k+1)\alpha) \sum_{r=1}^\infty r\mathfrak{p}(x+(k+1)\alpha)^{r-1}$$ $$= \frac{\mathfrak{p}(x+k\alpha) \mathfrak{q}(x+(k+1)\alpha)}{(1-\mathfrak{p}(x+(k+1)\alpha))^2}= \frac{\mathfrak{p}(x+k\alpha) \mathfrak{q}(x+(k+1)\alpha)}{ \mathfrak{q}(x+(k+1)\alpha)^2}=\frac{\mathfrak{p}(x+k\alpha)}{\mathfrak{q}(x+(k+1)\alpha)},$$ where in the passing from the second line to the third one the formula $\sum_{r=1}^\infty rz^{r-1}=\frac{1}{(1-z)^2}$ was used. Since the last equals $\frac{a_{x,k+1}}{a_{x,k}}$, this completes the proof for $j=k+1$. To end the proof we proceed by induction. Let us assume the assertion holds for $k+1, k+2, ..., j$ for some $j>k$. Let us consider the process started at $k$. Take $r>0$. It is easy to conclude the expected number of appearances of this process in $j+1$ under the condition the number of appearances in $k+1$ is $r$ equals, by the induction assumption, to $r\cdot\frac{a_{x,j+1}}{a_{x, k+1}}$. In turn, the probability of exactly $r$ visits in $k$ before returning to $k$ is, as before, $\mathfrak{p}(x+k\alpha)\cdot \mathfrak{p}(x+(k+1)\alpha)^{r-1}\cdot \mathfrak{q}(x+(k+1)\alpha)$. In the view of foregoing, the expected number of appearances in $j+1$ of the process started at $k$ before returning to $k$ equals $$\sum_{r=1}^\infty r\cdot\frac{a_{x,j+1}}{a_{x, k+1}} \mathfrak{p}(x+k\alpha)\cdot \mathfrak{p}(x+(k+1)\alpha)^{r-1}\cdot \mathfrak{q}(x+(k+1)\alpha)$$ $$= \frac{a_{x,j+1}}{a_{x, k+1}} \cdot \frac{\mathfrak{p}(x+k\alpha)}{\mathfrak{q}(x+(k+1)\alpha)}= \frac{a_{x,j+1}}{a_{x, k+1}}\cdot \frac{a_{x,k+1}}{a_{x,k}}= \frac{a_{x,j+1}}{a_{x,k}}.$$ This completes the proof of Lemma \ref{L:2.3} in the case of any two integers with $j>k$. The case $j<k$ is symmetric. \end{proof} The last result of this section is basically the Doeblin ratio limit theorem (cf. Corollary 2 to Theorem 4 in Section I.9, p. 48, in \cite{Chung_1960}). However, reproducing the proof is necessary because we need a kind of uniform convergence result over all $x\in \mathbb T$ and states $j$, $k$ that are sufficiently close to each other. \begin{prop}\label{P:2.2} If $\mathfrak{p}$ is of bounded variation, symmetric and separated from $0$ and $1$ then for every $\varepsilon>0$ and $q\ge 1$ there exists $N$ such that $$\bigg|\frac{\mathbb{P}(\xi_1=j)+\cdots+\mathbb{P}(\xi_n=j)}{\mathbb{P}(\xi_1=k)+\cdots+\mathbb{P}(\xi_n=k)} - \frac{a_{x, j}}{a_{x, k}} \bigg|<\varepsilon$$ for every $n\ge N$, $x\in \mathbb{T}$, provided $|k|,|j| \le q$ and $|k-j|\le q$. \end{prop} \begin{proof} Take $\varepsilon>0$. By Lemma \ref{L:2.2} there exists $B>0$ such that $\sum_{n=1}^N \pr{k}{0}{j}{n}\le B$ for every $N$ and states $k$, $j$ satisfying the assumptions. The number $B$ can be chosen also such that $$\max_{|j|, |k|\le q}\max_{x\in\mathbb{T}} \frac{a_{x,j}}{a_{x,k}}\le B.$$ Apply Lemma \ref{L:2.2} and \ref{L:2.3} to get $N_0$ so large that \begin{equation}\label{E:2.5} \bigg|\sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n} - \frac{ a_{x, j}}{a_{x, k}} \bigg| < \frac{\varepsilon}{3} \quad \textrm {for $N\ge N_0$.} \end{equation} The number $N'_0>N_0$ should be so large that \begin{equation}\label{E:2.6} \frac{2B}{\sum_{n=1}^N p_{0,k}^n}<\frac{\varepsilon}{3} \end{equation} for $N\ge N'_0$ and \begin{equation}\label{E:2.7} \frac{BN_0}{\sum_{n=1}^N p_{0,k}^n}<\frac{\varepsilon}{3} \end{equation} The easily proven decomposition formula $$p_{0,j}^n=\pr{k}{0}{j}{n}+\sum_{\nu=1}^{n-1} p_{0, k}^\nu \cdot \pr{k}{k}{j}{n-\nu}$$ yields $$\sum_{n=1}^N p_{0,j}^n= \sum_{n=1}^N \pr{k}{0}{j}{n}+\sum_{\nu=1}^{N-1} p_{0, k}^\nu \sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n}.$$ We have $$\bigg|\frac{\mathbb{P}(\xi_1=j)+\cdots+\mathbb{P}(\xi_N=j)}{\mathbb{P}(\xi_1=k)+\cdots+\mathbb{P}(\xi_N=k)} - \frac{a_{x, j}}{a_{x, k}} \bigg| =\bigg| \frac{\sum_{n=1}^N p_{0,j}^n}{\sum_{n=1}^N p_{0,k}^n} - \frac{a_{x, j}}{a_{x, k}} \bigg|$$ $$=\bigg| \frac{ \sum_{n=1}^N \pr{k}{0}{j}{n}+\sum_{\nu=1}^{N-1} p_{0, k}^\nu \sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n}}{\sum_{n=1}^N p_{0,k}^n} - \frac{\sum_{n=1}^N \frac{ a_{x, j}}{a_{x, k}} p_{0,k}^n}{\sum_{n=1}^N p_{0,k}^n} \bigg|$$ $$\le \bigg| \frac{ \sum_{n=1}^N \pr{k}{0}{j}{n} -\frac{ a_{x, j}}{a_{x, k}} p_{0,k}^N +\sum_{\nu=1}^{N-1} p_{0, k}^\nu \big( \sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n} - \frac{ a_{x, j}}{a_{x, k}}\big)}{\sum_{n=1}^N p_{0,k}^n} \bigg|$$ $$\le \bigg| \frac{ \sum_{n=1}^N \pr{k}{0}{j}{n} -\frac{ a_{x, j}}{a_{x, k}} p_{0,k}^N }{\sum_{n=1}^N p_{0,k}^n} \bigg| +\bigg|\frac{\sum_{\nu=N-N_0+1}^{N-1} p_{0, k}^\nu \big( \sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n} - \frac{ a_{x, j}}{a_{x, k}}\big)}{\sum_{n=1}^N p_{0,k}^n} \bigg| $$ $$+\bigg| \frac{ \sum_{\nu=1}^{N-N_0} p_{0, k}^\nu \big( \sum_{n=1}^{N-\nu} \pr{k}{k}{j}{n} - \frac{ a_{x, j}}{a_{x, k}}\big)}{\sum_{n=1}^N p_{0,k}^n} \bigg|$$ By (\ref{E:2.5}) the third term is less than $\frac{\varepsilon}{3}$. By the very definition of $B$, the numerator of the first term is less that $2B$ and the numerator of the second expression is less than $BN_0$. Thus (\ref{E:2.6}) and (\ref{E:2.7}) complete the proof. \end{proof} \begin{remark}\label{R:2.1} Let us consider an interval $A\subseteq \mathbb{Z}$ of length $q$. Let $(\xi_n)$ be as usually the process started at $0$, and let $\tau$ be the moment of the first visit of $(\xi_n)$ in $A$. If $N$ is given in Proposition \ref{P:2.2}. Since $N$ was independent of $x\in \mathbb{T}$, a conditional argument easily implies $$\bigg| \frac{\mathbb{P}( \xi_0= j | \mathcal F_{\tau} ) + \cdots + \mathbb{P}( \xi_{n-1}= j |\mathcal F_{\tau} ) }{\mathbb{P}( \xi_0= k | \mathcal F_{\tau} ) + \cdots + \mathbb{P}( \xi_{n-1}=k |\mathcal F_{\tau} )} - \frac{a_{x,j}}{a_{x, k}} \bigg| < \varepsilon$$ almost surely on $\{ \tau < n-N\}$ for any two states $k, j\in A$. \end{remark} \begin{remark}\label{R:2.2} Let us now consider certain function $\varphi : \mathbb Z \rightarrow \mathbb R$ with support contained in an interval $A$, as above, and $\|\varphi\|_\infty\le 1$. An easy argument using Remark \ref{R:2.1} yields $$\bigg| \frac{\mathbb E\big( \varphi(\xi_0)+\cdots+\varphi(\xi_{n-1}) \big| \mathcal F_{\tau} \big)}{\mathbb{E}\big( \mathds{1}_{A}(\xi_0)+\cdots+\mathds{1}_{A}(\xi_{n-1}) \big| \mathcal F_{\tau} \big)} - \frac{\sum_{i \in A} \varphi(i) a_{x,i} }{ \sum_{i\in A} a_{x, i} } \bigg| < \varepsilon$$ almost surely on $\{ \tau < n-N\}$. It is clear that $N$ can be chosen uniformly over all intervals $A$ of fixed length $q$, $x\in T$ and function $\varphi$ as far as $\|\varphi\|_\infty \le 1$. \end{remark} \section{Projection of measures} Put $$a_{x, k}=\exp\bigg(\Phi(x)+\cdots+\Phi(x+(k-1)\alpha)\bigg)\frac{1+\exp \Phi(x+k\alpha)}{1+\exp{\Phi(x)}}$$ for $k\ge 1$ and $a_{x, 0}=1$. Define $$\mu_{x, n} = \frac{1}{M_{x, n}} \sum_{k=0}^{n-1} a_{x, k} \delta_{x+k\alpha}$$ for $x\in \mathbb{T}$ and $n\ge 1$, where $M_{x, n}$ is the normalizing constant, $$M_{x, n} = \sum_{k=0}^{n-1} a_{x, k}.$$ \begin{lem}\label{L:3.1} If $x\in \mathbb{T}$, $k_1, k_2 \in \mathbb N$, then $$a_{x, k_1+k_2}=a_{x, k_1} \cdot a_{x+k_1\alpha, k_2}$$ and $$ \mu_{x, k_1+k_2}=\frac{M_{x, k_1}}{M_{x,k_1+k_2}}\mu_{x, k_1} + a_{x,k_1}\frac{M_{x+k_1\alpha, k_2}}{M_{x, k_1+k_2}}\mu_{x+k_1\alpha, k_2}.$$ \end{lem} \noindent The proof is straightforward. \begin{lem}\label{L:3.2} For every $\varepsilon>0$ there exists $N$ such that if $q\ge N$ is the closest return time then $(1-\varepsilon) a_{y, n} \le a_{x, n} \le (1+\varepsilon) a_{y, n}$ for every natural $n\le q$ and $x, y\in \mathbb{T}$ with $|x-y|<\frac 2 q$. \end{lem} \begin{proof} Take $\delta>0$. We can find $n_0$ so large that \begin{equation}\label{E:3.1} \frac{1}{n} \bigg( f'\big(x\big)+\cdots+f'\big(x+(n-1)\alpha\big) \bigg)< \delta \quad \textrm{for $n\ge n_0$ and every $x\in \mathbb{T}$.} \end{equation} Indeed, this is the consequence of the Birkhoff ergodic theorem applied to the rotation by angle $\alpha$ and the Lebesgue measure (uniform convergence in $x$ follows from unique ergodicity and continuity of $f'$, see e.g. Proposition 4.1.13 in \cite{Hasselblatt_Katok_1995}). Let $q\ge n_0$ be so large that \begin{equation}\label{E:3.2} \frac{1}{q} \bigg( f'\big(x\big)+\cdots+f'\big(x+j\alpha\big) \bigg)< \delta \quad \textrm{for $j \le n_0$ and every $x\in \mathbb{T}$.} \end{equation} Finally, by uniform continuity, let us assume $q$ to be so large that \begin{equation}\label{E:3.3} 1-\delta \le \frac{1+\exp f(x)}{1+\exp f(y)} \le 1+\delta \quad \textrm{for $x, y\in \mathbb{T}$, $|x-y|\le 2/q$.} \end{equation} Take $x, y\in \mathbb{T}$ with $|x-y|\le 2/q$, a natural $n\le q$. By the mean value theorem there exists $z$ in the shorter arc joining $x$ and $y$ such that $$\frac{a_{x, n}}{a_{y, n}}=\exp \bigg( \big( f'(z)+\cdots+f'(z+(n-1)\alpha)\big)|x-y|\bigg)$$ $$\times \frac{1+\exp f(x)}{1+\exp f(y)}\cdot \frac{1+\exp f(x+(n+1)\alpha)}{1+\exp f(y+(n+1)\alpha)}.$$ If $n\ge n_0$ then apply (\ref{E:3.1}) and the fact that $|x-y|\le 2/q$ to get $$ \big( f'(z)+\cdots+f'(z+(n-1)\alpha)\big)|x-y| \le \frac{1}{n} \bigg( f'\big(x\big)+\cdots+f'\big(x+(n-1)\alpha\big) \bigg) \cdot \frac n q \le 2 \delta,$$ as $n\le q$. This combined with (\ref{E:3.3}) yields $$e^{-2\delta}(1-\delta)^2\le \frac{a_{x, n}}{a_{y, n}} \le e^{2\delta}(1+\delta)^2.$$ Using (\ref{E:3.2}) and (\ref{E:3.3}) we can deduce similar statement in the case $n<n_0$. If $\delta \to 0$ then the values on the left and right above tend to $1$, thus the assertion follows. \end{proof} \begin{prop}\label{P:3.1} Let $\varphi \in C(\mathbb{T})$. For every $\varepsilon>0$ there exists $N$ such that if $q\ge N$ is a closest return time then $$\bigg|\int_\mathbb{T} \varphi d\mu_{x, q} - \int_\mathbb{T} \varphi d\mu_{y, q} \bigg| < \varepsilon$$ for every $x,y \in \mathbb{T}$. \end{prop} \begin{proof} Take $\eta>0$ and $\varphi\in C(\mathbb{T})$. Choose $\delta>0$ small (to be determined), and let $q$ be the closes return time such that Lemma \ref{L:3.2} is satisfied with $\varepsilon$ replaced by $\delta$. As a consequence \begin{equation}\label{E:P2.4} 1-\delta<\frac{a_{z_1,n}}{a_{z_2,n}}<1+\delta \quad \textrm{and} \quad 1-\delta<\frac{M_{z_1,n}}{M_{z_2,n}}<1+\delta \end{equation} for $n\le q$ and $z_1, z_2\in \mathbb{T}$ with $|z_1-z_2|<2/q$. Further, using Lemma \ref{Denjoy_Koksma} we easily see $a_{z, q_n} \to 1$ uniformly in $z$, when $(q_n)$ is the sequence of closest return times. Thus $q$ can be chosen so large that $1-\delta \le a_{z, q} \le 1+\delta$ for all $z\in \mathbb{T}$. Using the first assertion in Lemma \ref{L:3.1} it implies \begin{equation}\label{E:P2.5} 1-\delta \le a_{z, n}a_{z+n\alpha, n-q} \le 1+\delta \quad \textrm{for $n< q$ and $z\in \mathbb{T}$.} \end{equation} The last thing we want to assume on $q$ it is so large that \begin{equation}\label{E:P2.6} \sup_{z\in \mathbb{T}}\sup_{|h|\le \frac{2}{q}} |\varphi(z+h)-\varphi(z)| < \delta. \end{equation} Let us take $x, y\in \mathbb{T}$. Denote $x_j=x+ j\alpha$, $y_j=y+ j\alpha$, $j \in [0, q]$. Let $t$ be the smallest natural number with $d(x_t, y) \le \frac 1 q$. Since rotation is an isometry we immediately see $d(x_{t+j}, y_j)<\frac 1 q$ for $j=0,1,\cdots q-t$. In particular $d(x_q, y_{q-t})<\frac 1 q$, hence $d(y_{q-t}, x)\le d(y_{q-t}, x_q)+d(x_q, x)<1/q+1/q=2/q$ and, since the rotation is isometry, $d(y_{q-t+j}, x_j)<\frac 2 q$ for $j=0,\cdots, t$. The measure $\mu_{x, q}$ is an atomic measure with atoms at the points $x, x+\alpha, \ldots, x+(q-1)\alpha$. The idea is to represent $\mu_{x, q}$ as a convex combination of measures concentrated on two disjoint subsets $\{x, x+\alpha, \ldots, x+(t-1)\alpha \}$ and $\{ x+t\alpha, \ldots, x+(q-1)\alpha\}$ and, similarly, represent $\mu_{y,q}$ and a convex combinations of measures concentrated on two disjoint subsets $\{ y, y+\alpha, \ldots, y+(q-t-1)\alpha \}$ and $\{y+(q-t)\alpha, \ldots, y+q\alpha\}$. Namely, it is easy to check using Lemma \ref{L:3.1} that $$\mu_{x, q} = \frac{M_{x, t}}{M_{x,q}} \mu_{x, t} + a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} \mu_{x_t, q-t}$$ and $$\mu_{y,q} = \frac{M_{y,q-t}}{M_{y,q}} \mu_{y, q-t} + a_{y, q-t} \frac{M_{y_{q-t}, t}}{M_{y,q}}\mu_{y_{q-t}, t}.$$ Since $d(x_t , y) \le 1/q$, in view of (\ref{E:P2.4}) we expect the second measure in the decomposition of $\mu_{x, q}$ to be close to the first measure in decomposition of $\mu_{y,q}$. Similar reasoning applies to two remaining terms since $d(y_{q-t}, x)<2/q$. We have $$\bigg| \int_\mathbb{T} \varphi d\mu_{x,q} - \int_\mathbb{T} \varphi d\mu_{y,q} \bigg|\le \bigg| \frac{M_{x, t}}{M_{x,q}} \int_\mathbb{T} \varphi d\mu_{x, t} - a_{y, q-t} \frac{M_{y_{q-t}, t}}{M_{y,q}} \int_\mathbb{T} \varphi d\mu_{y_{q-t}, t} \bigg|$$ \begin{equation}\label{E:P2.3} + \bigg| a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} \int_\mathbb{T} \varphi d\mu_{x_t, q-t} - \frac{M_{y,q-t}}{M_{y,q}} \int_\mathbb{T} \varphi d\mu_{y, q-t} \bigg|. \end{equation} Let us now focus on the second term on the right hand side. The analysis of the first term proceeds analogously. We have $$\bigg| a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} \int_\mathbb{T} \varphi d\mu_{x_t, q-t} - \frac{M_{y,q-t}}{M_{y,q}} \int_\mathbb{T} \varphi d\mu_{y, q-t} \bigg| $$ \begin{equation}\label{E:P2.0} \le \bigg| a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} - \frac{M_{y,q-t}}{M_{y,q}} \bigg| \int_\mathbb{T} |\varphi| d\mu_{x_t, q-t} \end{equation} $$+ \frac{M_{y,q-t}}{M_{y,q}}\bigg| \int_\mathbb{T} \varphi d\mu_{x_t, q- t} - \int_\mathbb{T} \varphi d\mu_{y, q- t}\bigg|.$$ We are going to show the first term in (\ref{E:P2.0}) is bounded by $\|\varphi\|_\infty\eta$ and the second by $\delta+\|\varphi\|_\infty\eta$. Since exactly the same estimates can be derived for the first term on the right-hand side of (\ref{E:P2.3}), it will give $$\bigg| \int_\mathbb{T} \varphi d\mu_{x,q} - \int_\mathbb{T} \varphi d\mu_{y,q} \bigg|\le 2\delta + 4\|\varphi\|_\infty\eta$$ and will complete the proof. Thus what remains to do is to find the desired bounds on the right-hand side of (\ref{E:P2.0}). \vspace{0.5cm} \noindent\textbf{A. Analysis of the first term on the right-hand side of (\ref{E:P2.0})} We have \begin{equation}\label{E:P2.1} \bigg| a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} - \frac{M_{y,q-t}}{M_{y,q}} \bigg| = \frac{M_{y,q-t}}{M_{y,q}} \bigg| a_{x, t}\cdot \frac{M_{y,q}}{M_{x, q}}\cdot \frac{M_{x_t, q-t}}{M_{y,q-t}} -1 \bigg|. \end{equation} Since $d(y, x_t)<1/q\le 2/q$ we can apply (\ref{E:P2.4}) to get that $1-\delta\le \frac{M_{x_t, q-t}}{M_{y,q-t}}\le 1+\delta$. Further, $d(y_{q-t}, x)\le 2/q$, thus Lemma \ref{L:3.1} and (\ref{E:P2.4}) give $$M_{y,q}=M_{y, q-t} + a_{y, q-t} M_{y_{q-t}, t} \le (1+\delta) M_{x_t, q-t} + (1+\delta)^2 a_{x_t, q-t} M_{x, t}.$$ From (\ref{E:P2.5}) we have $a_{x_t, q-t}\le \frac{1+\delta}{a_{x,t}}$. Finally $$M_{y,q}\le (1+\delta) M_{x_t, q-t} + (1+\delta)^2 a_{x_t, q-t} M_{x, t} \le (1+\delta) M_{x_t, q-t} + \frac{(1+\delta)^3}{a_{x, t}} M_{x, t}$$ $$\le (1+\delta)^3 \bigg( M_{x_t, q-t} + \frac{1}{a_{x, t}} M_{x, t} \bigg)= \frac{(1+\delta)^3}{a_{x, t}} \bigg( a_{x, t} M_{x_t, q-t}+M_{x, t} \bigg)$$ $$= (1+\delta)^3\frac{M_{x, q}}{a_{x,t}}.$$ So far we used only the bounds from above in (\ref{E:P2.4} ) and (\ref{E:P2.5} ). Applying the same reasoning with estimates from below we see that $$M_{y,q}\ge (1-\delta)^3\frac{M_{x, q}}{a_{x,t}}.$$ Going back to (\ref{E:P2.1}) we have $$ (1-\delta)^4 \le a_{x, t}\cdot \frac{M_{y,q}}{M_{x, q}}\cdot \frac{M_{x_t, q-t}}{M_{y,q-t}}\le (1+\delta)^4.$$ Take $\eta>0$. If $\delta$ was chosen sufficiently small then $$ \bigg| a_{x, t}\cdot \frac{M_{y,q}}{M_{x, q}}\cdot \frac{M_{x_t, q-t}}{M_{y,q-t}} -1 \bigg|<\eta.$$ Since $\frac{M_{y,q-t}}{M_{y,q}}\le 1$ it leads to the estimate $$\bigg| a_{x, t}\frac{M_{x_t, q-t}}{M_{x, q}} - \frac{M_{y,q-t}}{M_{y,q}} \bigg| < \eta.$$ Thus the first term on the right-hand side of (\ref{E:P2.0}) is bounded by $\eta \|\varphi\|_\infty$. \vspace{0.5cm} \noindent\textbf{B. Analysis of the second term on the right-hand side of (\ref{E:P2.0})} To deal with the second expression we have clearly $\frac{M_{y,q-t}}{M_{y,q}}\le 1$ and $$\bigg| \int_\mathbb{T} \varphi d\mu_{x_t, q- t} - \int_\mathbb{T} \varphi d\mu_{y, q- t}\bigg|=\bigg| \sum_{k=0}^{q-t-1} \frac{a_{x_t, k}}{M_{x_t, q-t}} \varphi(x_t+k\alpha) - \sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \varphi(y+k\alpha) \bigg|$$ $$\le \bigg| \sum_{k=0}^{q-t-1} \frac{a_{x_t, k}}{M_{x_t, q-t}} \varphi(x_t+k\alpha) - \sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \varphi(x_t+k\alpha)\bigg|$$ $$ + \bigg| \sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \varphi(x_t+k\alpha) - \sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \varphi(y+k\alpha) \bigg|$$ $$\le \sum_{k=0}^{q-t-1} \frac{a_{x_t, k}}{M_{x_t, q-t}} \big| \varphi(x_t+k\alpha)\big| \bigg| 1-\frac{a_{y, k}}{a_{x_t, k}}\cdot \frac{M_{x_t, q-t}}{M_{y, q-t}}\bigg| $$ $$+ \sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \big| \varphi(x_t+k\alpha) - \varphi(y+k\alpha) \big|. $$ Since $d(x_t, y)<1/q$, (\ref{E:P2.4}) yields $$(1-\delta)^2\le \frac{a_{y, k}}{a_{x_t, k}}\cdot \frac{M_{x_t, q-t}}{M_{y, q-t}}\le (1+\delta)^2,$$ thus $$ \bigg| 1-\frac{a_{y, k}}{a_{x_t, k}}\cdot \frac{M_{x_t, q-t}}{M_{y, q-t}}\bigg|<\eta$$ if $\delta$ is sufficiently small. This leads us to the estimate $$ \sum_{k=0}^{q-t-1} \frac{a_{x_t, k}}{M_{x_t, q-t}} \big| \varphi(x_t+k\alpha)\big| \bigg| 1-\frac{a_{y, k}}{a_{x_t, k}}\cdot \frac{M_{x_t, q-t}}{M_{y, q-t}}\bigg| \le \|\varphi\|\eta.$$ Clearly, $$\sum_{k=0}^{q-t-1} \frac{a_{y, k}}{M_{y,q-t}} \big| \varphi(x_t+k\alpha) - \varphi(y+k\alpha) \big|\le \delta$$ by (\ref{E:P2.6}), which completes the proof. \end{proof} \section{Proof of Theorem \ref{T:1}} We shall use the following criterion for the uniqueness of the stationary distribution. \vspace{0.5cm} \textit{\noindent If for every $\varepsilon>0$ and nonnegative $\varphi\in C(\mathbb{T})$ with $1/2 < \|\varphi\|_\infty<1$ there exist $\beta \in \mathbb R$ and $N>0$ such that $$\bigg| \frac{\varphi(x)+\cdots+P^{n-1}\varphi(x)}{n} - \beta \bigg| < \varepsilon$$ for every $x\in \mathbb{T}$ and $n\ge N$, then there exists exactly one stationary distribution.} \vspace{0.5cm} Let us take $\varepsilon>0$ and $\varphi \in C(\mathbb{T})$ as stated in the criterion. Let $y\in \mathbb{T}$ be arbitrary, and let $\beta=\int_\mathbb{T}\varphi d\mu_{y,q}$, where $q$ is chosen so large that Proposition \ref{P:3.1} holds with $\varepsilon$ replaced by $\varepsilon/3$. Take $x\in\mathbb{T}$. Set $A_k=[kq, (k+1)q)$, $k\in \mathbb{Z}$, and define $$\varphi_k(j)= \mathds{1}_{A_k}(j) \cdot \varphi(x+j\alpha), \quad \varphi_k : \mathbb{Z} \rightarrow \mathbb R, \ k\in \mathbb{Z}.$$ Observe that $$\frac{\sum_{i \in A_k} \varphi_k(i) a_{x,i} }{ \sum_{i\in A_k} a_{x, i} } = \int_\mathbb{T} \varphi d\mu_{x+k\alpha, q}$$ for every $k$, thus Proposition \ref{P:3.1} gives \begin{equation}\label{E:5.2} \bigg| \frac{\sum_{i \in A_k} \varphi_k(i) a_{x,i} }{ \sum_{i\in A_k} a_{x, i} } - \beta \bigg| < \frac{\varepsilon}{3}, \end{equation} for an arbitrary $k\in \mathbb{Z}$. For $k\in \mathbb{Z}$ denote by $\tau_k$ the moment of the first visit of $(\xi_n)$ in $A_k$. Fix $n$ sufficiently large and set $\Gamma \subseteq \mathbb Z$ to be the set of $k$'s such that $A_k$ is visited with positive probability till $n$. Apply Proposition \ref{P:2.2} and Remark \ref{R:2.2} to get a number $N$ such that \begin{equation}\label{E:5.11} \bigg| \frac{\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)}{\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)} - \beta \bigg| < \varepsilon \quad \textrm{a.s. on $\{\tau_k<n-N\}$.} \end{equation} Let $(X_n)$ be the process with transition kernel (\ref{E:1.1}) started at $x\in \mathbb{T}$. We have \begin{equation}\label{E:5.14} |\mathbb{E} \big( \varphi(X_0)+ \cdots + \varphi(X_n)\big) - \beta n| \end{equation} $$= \bigg|\mathbb{E} \bigg(\sum_{k\in \Gamma} \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1})\bigg) - \beta \mathbb{E}\bigg( \sum_{k\in \Gamma} \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \bigg) \bigg|$$ $$\le \sum_{k\in\Gamma} \mathbb{E} \bigg| \mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) - \beta \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) \bigg|$$ $$=\sum_{k\in \Gamma} \mathbb{E} \bigg( \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) $$ $$\cdot \bigg| \frac{\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)}{\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)} - \beta \bigg| \bigg).$$ Let us fix $k\in \Gamma$ and split the expectation above as follows. $$ \mathbb{E} \bigg( \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) \cdot \bigg| \frac{\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)}{\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)} - \beta \bigg| \bigg)$$ $$= \mathbb{E} \mathds{1}_{\{\tau_k<n-N\}} \bigg( \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) $$ $$ \cdot \bigg| \frac{\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)}{\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)} - \beta \bigg| \bigg)$$ $$+\mathbb{E} \mathds{1}_{\{\tau_k\ge n-N\}} \bigg( \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) $$ $$\cdot \bigg| \frac{\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)}{\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)} - \beta \bigg| \bigg)$$ By (\ref{E:5.11}) the first expectation does not exceed $$\varepsilon \mathbb{E} \mathds{1}_{\{\tau_k<n-N\}}\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)$$ \begin{equation}\label{E:5.12} \le \varepsilon \mathbb{E} \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) = \varepsilon \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big). \end{equation} To deal with the second expectation we use the fact that $ \|\varphi_k\|_\infty \le 1$ and the support of $\varphi_k$ is contained in $A_k$. These facts combined imply easily $$\mathbb{E}\big( \varphi_k(\xi_0)+\cdots+\varphi_k(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) \le \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big)$$ for every $n$ and $k\in \Gamma$. Furthermore, $$\mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1}) \big| \mathcal F_{\tau_k} \big) \le N$$ almost surely on $\{\tau_k\ge n-N\}$. Summarizing we get the second expectation does not exceed \begin{equation}\label{E:5.13} \mathbb{P} (\tau_k \ge n-N ) \cdot N \cdot (1+\beta)\le N(1+\beta) \mathbb{P}\big(\{\xi_{n-N} \in A_k \}\cup \cdots \cup \{\xi_{n-1} \in A_k \} \big). \end{equation} We can combine now (\ref{E:5.12}), (\ref{E:5.13}) and (\ref{E:5.14}) to get $$\bigg| \frac{\mathbb{E} \big( \varphi(X_0)+ \cdots + \varphi(X_{n-1})\big) }{n} -\beta \bigg|$$ $$ \le \frac{1}{n} \sum_{k\in \Gamma} \varepsilon \mathbb{E}\big( \mathds{1}_{A_k}(\xi_0)+\cdots+\mathds{1}_{A_k}(\xi_{n-1})$$ $$+ \frac{1}{n} \sum_{k\in \Gamma} N(1+\beta) \mathbb{P}\big(\{\xi_{n-N} \in A_k \}\cup \cdots \cup \{\xi_{n-1} \in A_k \} \big)$$ $$\le \frac{1}{n} \cdot \varepsilon \cdot n + \frac{1}{n} N(1+\beta) N.$$ This is less than $2\varepsilon$ if $n$ is sufficiently large. \section{Final remarks} \begin{enumerate} \item Theorem \ref{T:1} is less general than the result of Conze, Guivarc'h. It was proven that the assumption there is optimal by Br\'{e}mont \cite{Bremont_1999}. \item One can replace the investigated system (random circle rotation) by higher dimensional analog, namely toral rotation, and ask the same question again about the uniqueness of stationary distribution. Sinai \cite{Sinai_1999} considered it on the same footing with circle rotations, which means that Sinai's result holds also there with the correct definition of Diophantine vector $\alpha$. Conze, Guivarc'h \cite{Conze_Guivarc'h_2000} ideas cannot be generalized to that case. Moreover, it has been proven by Nicolas Chevallier \cite{Chevallier_2004} that given Diophantine $\alpha\in \mathbb{R}^d$ there exists a Lipschitz $\mathfrak{p}$ on $\mathbb{T}^d$ for which one can find two different stationary distributions. When we try to generalize the proof of present paper to higher dimensional tori an obstacle is revealed just on the very beginning in the part devoted to recurrence. Indeed, one can define a martingale as in the proof of Proposition \ref{P:1} on state that recurrence is equivalent to $M(n) \to \infty$ when $n\to \infty$ and $M(n)\to - \infty$ when $n\to - \infty$. In one-dimensional setting it was the consequence of symmetry and Denjoy-Koksma inequality applied to $f(x)=\ln \mathfrak{p}(x) - \ln \mathfrak{q}(x)$. The question therefore is if a higher dimensional analog of Denjoy-Koksma inequality holds. A counterexample (with analytic observable!) was given by J.-C. Yoccoz in his paper \cite{Yoccoz_1995}, Appendix 1. In my opinion it suggests a conjecture that for any $d\ge 2$ there exits $\alpha\in \mathbb R^d$ and analytic $\mathfrak{p}$ such that the corresponding system has at least two different stationary measures. \item In \cite{DFS_2021} the authors asked about mixing (or stability) of investigated system. The reasoning of Conze, Guivarc'h doesn't give any hopes to obtain this stronger property. However, in our paper one can replace Doeblin ratio limit theorem by strong ratio limit property (see \cite{Orey_1961}) saying $$\bigg|\frac{\mathbb{P}(\xi_{2n}=j)}{\mathbb{P}(\xi_{2n}=k)}-\frac{a_{x,j}}{a_{x,k}}\bigg| \to 0$$ as $n\to \infty$ provided $j,k$ are both even (the same should be true with odd states and epochs). Analogs of Proposition \ref{P:2.2} and \ref{P:3.1} are still valid. However, the estimates from Section 5. get much more troublesome and delicate, and require much more work than I expected. \item A similar system was investigated in a sequence of papers by Dolgopyat and Goldsheid, see \cite{Goldsheid_2008}, \cite{Dolgopyat_Goldsheid_2013}, \cite{Dolgopyat_Goldsheid_2018}, \cite{Dolgopyat_Goldsheid_2019}, \cite{Dolgopyat_Goldsheid_2020}, \cite{Dolgopyat_Goldsheid_2021}. \item One can replace the circle rotation by any automorphisms of any space and ask about the properties of this system. A general nonsymmetric system with ergodic authomorphims where considered in \cite{Kaloshin_Sinai_2000a}. In \cite{Kaloshin_Sinai_2000b} the authors investigated typical behavior for Anosov diffeomorphisms. \end{enumerate} \bibliographystyle{alpha}
\section{\uppercase{Introduction}} \label{sec:introduction} The General Data Protection Regulation (GDPR) lays the legal foundation for data protection in the EU and increases individual data protection rights throughout Europe. It also carries significant fines of up to 4\% of yearly worldwide revenue for businesses that do not comply with the legislation. Many IT system providers, especially software-producing firms, may need to alter their systems in order to comply with the GDPR. This is predicted to require significant effort~\cite{blume2016impact}. As a result, providing software engineers in the industry with effective and systematic ways to build data protection into software is an essential and beneficial study topic~\cite{lenhard2017literature}. Organizations are pushing security to the software development life cycle, such as code review, to prevent software security vulnerabilities~\cite{braz2022software}. Similarly, to comply with privacy-by-design and perform privacy analysis tasks, code reviewers would benefit from similar tools to those used for security to identify privacy-related patterns in software. Developers address privacy concerns using data security terminology, and this vocabulary confines their notions of privacy to threats outside of the organization~\cite{hadar2018privacy}. However, even though data security is the main prerequisite of data privacy, privacy protection in software is still very much different from traditional security-related vulnerabilities. And according to Bambauer: ``security and privacy can and should be treated as distinct concerns''~\cite{bambauer2013privacy}. Developers struggle to convert legal, ethical, and social privacy concerns into concrete technology and solutions~\cite{notario2015pripare}. Assessing privacy involves not only finding personal data in the software but also evaluating compliance with the related processing. GDPR defines as processing: ``any operation or set of operations which is performed on personal data or on sets of personal data, whether or not by automated means.'' The definition encompasses a vast range of actions performed on personal data, such as collecting, recording, organization, structuring, storage, adaption or modification, retrieval, transit, etc. Privacy assessment tasks beg the question: How can we assist code reviewers and software developers in assessing personal data processing? By identifying personal data and the relevant processing in the system, code reviewers can uncover interesting patterns and utilize them to redesign the system to be more privacy-friendly or perform privacy analysis. In this paper, we present ongoing work on a novel approach designed to assist developers and code reviewers in identifying personal data processing, which can subsequently be used for privacy analysis. This enables developers and code reviewers to assist organizations with a variety of important privacy-related tasks, such as completing a data protection impact assessment (DPIA) and creating a privacy policy. \section{\uppercase{Related work}} An essential step in the software development process, code reviewing incorporates both manual and/or automated reviews. The main goal of code reviews is to assess and boost the code's effectiveness and correctness, pinpoint security issues, and raise its quality by adhering to best practices~\cite{mcintosh2014impact}. To automatically evaluate code, a variety of vulnerability detection tools have been built. They are also known as source code analyzers or static analysis tools, as they can analyze a program's code without having to execute it~\cite{mcgraw2008automated}. CodeQL\footnote{\url{https://codeql.github.com/}}, and Semgrep~\cite{semgrep}\footnote{\url{https://semgrep.dev/}} are two popular code review tools that utilize static analysis. CodeQL treats code as if it were data, and issues are modeled as queries. Following the extraction of these queries from the code, they are executed against a database. The database is a directory containing data, a source reference for displaying query results, query results, and log files. Semgrep matches grammatical patterns on parsed programs (represented as an Abstract Syntax Tree (AST)) instead of matching string or regular expression (regex) patterns on the program as a string. Semgrep makes it considerably simpler to construct customized rules than CodeQL, which needs rules to be defined in QL, a declarative object-oriented query language. There is relatively little published work that focuses on code reviews to identify privacy-related vulnerabilities, and it is problematic to translate current security knowledge to privacy, which we will explain in Section~\ref{Sec:challenges}. There are studies on the identification of personal data that are valuable to our research. Fugkeaw et al.~\cite{fugkeaw2021ap2i} proposed AP2I to enable organizations to identify and manage personal data in the local file system automatically. By monitoring network traffic, ReCon~\cite{ren2016recon} utilized machine learning to identify probable personal data breaches. van der Plas et al.~\cite{van2022detecting} used CodeBERT, a RoBERT-like transformer model, to identify personal data in Git commits. \section{\uppercase{Background and challenges}}\label{Sec:challenges} Data privacy analysis is becoming as crucial as security vulnerability discovery and has brought a new dimension to the data security dilemma~\cite{bertino2016data}. It is advantageous for code reviewers to be able to conduct a similar privacy analysis that they did for security. The current state of the art is mostly focused on security analysis. Although data security is a primary requirement for data privacy, the analysis domain and identification process are rather different~\cite{jain2016big}. Simply adopting security mechanisms and mindsets to analyze privacy can be misguided, and even harmful~\cite{bambauer2013privacy}. Integration of recent studies on assessing software privacy during code review is challenging. On the subject of program analysis, three well-known privacy analysis methods are available. First, static analysis based on bytecode requires project compilation, whereas dynamic taint analysis requires project execution. This is not practical nor efficient for code reviewers to implement. A machine learning-based technique is similarly difficult to implement, as it requires a large and diverse training data set. Obtaining and generating such data sets requires additional effort and could be outside the scope of code reviewers' capabilities. Lastly, text analysis based on UI widgets is constrained for privacy by domain-specific UI attributes. A financial web application that employs a model trained on an Android health mobile application is unlikely to benefit. Code reviewers require an approach that is simple to deploy, efficient, and adaptable~\cite{buse2012information}. Due to the complex nature of privacy and the fluidity of the definition of personal data, identifying the processing of personal data in the codebase presents challenges. In the following paragraphs, we highlight the two most significant challenges related to the task in the context of code review. \subsection{The Ambiguous Definition of Personal Data} Article 4(1) in GDPR defines personal data as: \begin{displayquote} \textit{any information relating to an identified or identifiable natural person (‘data subject’); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, genetic, mental, economic, cultural or social identity of that natural person.} \end{displayquote} The definition of personal data in the GDPR is so broad that almost any information may qualify as personal data if it refers to a specific individual, such as the fact that a person is wearing a red shirt~\cite{bervcivc2009identifying}. The definition is also semantically ambiguous. In contrast to the fact that certain data may be anonymous from the start (such as weather sensor data without any connection to real people), other data may initially be personal data but later be successfully altered to no longer have any connection to an identified or identifiable natural person. This emphasizes how flexible the categorization of personal data is~\cite{finck2020they}. The same data point may be personal or non-personal depending on the context and may thus be covered by the regulation or not. This implies that the categories of personal data in the software vary depending on the software and the processing underlying it. For instance, health data such as blood pressure and medical records, for example, are sensitive for a health application, but location data is sensitive for navigation software. Even if we accept that content-wise every item of information can be considered personal data if it can be related to an individual, the GDPR's definition is still rather vague structurally since it is not always clear what kind of structure every `record' of an individual must have to be considered personal data~\cite{voss2019personal}. Due to the ambiguous nature of the definition of personal data in the relevant legislation, it is practically difficult for us to have a clear and fixed identifier to precisely locate personal data in code. \subsection{What Counts as Sensitive Processing?} Data subjects may agree to data processing for particular reasons. This is the usual legal basis but only counts as one factor. Processing may also be ``necessary for the performance of a contract to which the data subject is a party or in order to take steps at the request of the data subject prior to entering into a contract.''~\cite{voss2019personal} Unfortunately, concerns that arise in principle about the relationship between contract and consent tend to be avoided in reality by disregarding consent requirements~\cite{pormeister2017informed}. We cannot rely on existing privacy policies and written consent to uncover personal data processing in the codebase. This requires us to consider all potential personal data processing in the codebase. Later we will explain how we define and identify the relevant processing in software in Section~\ref{Sec:typeprocessing}. \section{\uppercase{Approach}} We present an approach to identify instances of personal data processing in the codebase and present them in a way that facilitates the code review. The approach has three primary phases: pattern matching, labeling, and grouping of results. As input, we take the codebase, which consists of source code files. Then, a static analyzer will evaluate these source code files using our rules and patterns. The code snippets discovered by the static analyzer are then labeled according to the various features they include. Finally, we allow users to group the results by single or several labels, allowing a personalized exploration of the findings. An illustration of our approach is shown in Figure~\ref{fig:flowchart}. \begin{figure}[h!] \centering \begin{tikzpicture}[ node distance=10mm and 20mm, box/.style = {draw, minimum height=15mm, text width=25mm, align=center}, sy+/.style = {yshift= 2mm}, sy-/.style = {yshift=-2mm}, every edge quotes/.style = {align=center} ] \node (n1) [box] {Codebase}; \node (n2) [box,right=of n1] {Code snippets}; \node (n3) [box,below=of n2] {Labeled snippets}; \node (n4) [box,below=of n1] {Results}; \draw[thick,-Triangle] (n1.east) to [above,"pattern\\matching"] (n2.west); \draw[thick,-Triangle] (n2.south) to [right,"labeling"] (n3.north); \draw[thick,-Triangle] (n3.west) to [above,"grouping"] (n4.east); \end{tikzpicture} \caption{Approach} \label{fig:flowchart} \end{figure} \subsection{Design Choices} In the following paragraphs, we discuss our design choices for implementing the approach. \subsubsection{Types of Findings}\label{Sec:typespd} We want to have a basic default list of personal data that we want to locate, this is mostly personal identification and characteristics data, such as full name, email address, gender, sexual orientation, and age. We call them fixed personal data. According to different types of software, we customize default lists for them. For example, for a banking/finance application, the list may contain bank account numbers, credit scores, and salary information. This type of personal data is subject to context - the types of processing in specific software, which we named contextual personal data. Depending on how we locate the mentioned personal data in the software, we can divide their occurrences in code into simply two types. The first is in clear text. This includes all kinds of locations where personal data appear in clear text. It is verbatim or direct personal data. For example, a credit card number appears in an SQL query, or an email address falls into a log function. The other type is more common and subtle, where personal data is stored in a variable or an object. Depending on the different types of programming languages, the object types might vary from a local variable, a class instance, or a prototype. This means we aim to find the code that processes this type of data. \subsubsection{Types of Processing}\label{Sec:typeprocessing} Simply locating every instance of personal data produces a large number of results. Many of these do not directly help the code reviewer's work, which is to find meaningful processing. We want to use a hybrid approach to cover as many as processing as possible. Processing personal data represents a specific behavior. This motivates our first approach: to use an action name tag to find relevant processing. We adopted most of the verbs from Section 3 of DPV~\cite{pandit2019creating} \footnote{\url{https://w3c.github.io/dpv/dpv/}}. These vocabularies help us to find relevant processes in the software. The second approach is the identification of external libraries. We know that modern applications rely on various APIs to achieve different goals. Therefore, obtaining a list of relevant APIs and detecting the existence of personal data that flows into them helps us find meaningful patterns. \subsection{Pattern Matching} The first step is to feed our codebase (consisting of source code files) to the static analyzer for pattern matching. We chose Semgrep as our analyzer because of its user-friendly rules and rapid processing performance. Depending on the different syntactic characteristics of personal data, as we discussed in Section~\ref{Sec:typespd}, we adopt a hybrid approach that combines two different types of analysis. \begin{itemize} \item Match personal data in clear text using regular expression matching. \item Taint analysis to find flows in each file between a source (where personal data enters the analysis scope) and a sink (where personal data gets processed) that match our criteria. \end{itemize} Our personal data processing rules currently support Java, JavaScript, and TypeScript as our primary analysis domains. However, our rules for identifying clear-text personal data apply to the vast majority of Semgrep-supported languages. \subsubsection{Source and Sink} Our prototype classifies the sources into nine separate categories. As stated in Section~\ref{Sec:typespd}, we divide fixed personal data into four different categories: \textit{account}, \textit{contact}, \textit{national ID}, and \textit{personal ID}. Included are five more contextual personal data categories, such as \textit{location}, \textit{health}, and \textit{financial} data. In addition, we provide a template for identifying the processing of personal data and enable code reviewers and developers to submit additional personal data simply by entering the relevant keywords. Then, corresponding rules will be automatically produced for future use. Sinks are categorized into five main types. Three types of action: \textit{data manipulation} (\textbf{M}), \textit{data transportation} (\textbf{T}), and \textit{data creation/deletion} (\textbf{C/D}). Another two represent two special types: \textit{database} (\textbf{DB}) and \textit{encryption} (\textbf{E}). A sink's name may contain a specific type of source. For example, \texttt{setLatitude(100,100)} \\ does not take any source into the method, but includes a source identifier \texttt{Latitude} and a sink identifier \texttt{set}, showing that it processes values directly as a source into a sink. We call this special type of sink a source-specific sink. When a source-specific sink invokes anything, we mark this source-specific sink as the new source but the caller of the source-specific sink as the new sink. For example, in \texttt{gpsTracker.setLatitude(100,100)}, \texttt{setLatitude} becomes the new source and \texttt{gpsTracker} is the new sink. Inspired by how Privado \footnote{\url{https://www.privado.ai}} uses regular expressions to identify GDPR-related data in Java applications, a sample Semgrep rule that matches the pattern of \textit{account} data source goes into a \textit{transportation} (\textbf{T}) sink is shown below in Figure~\ref{fig:rulesample}, followed by a sample code snippet detected in Figure~\ref{fig:samplecodesnippet}. \begin{figure}[ht] \includegraphics[width=\columnwidth]{rule.pdf} \caption{Semgrep rule: find personal data flows from account data source to transportation sink} \label{fig:rulesample} \end{figure} \begin{figure}[ht] \includegraphics[width=\columnwidth]{snippet.png} \caption{Sample code snippet (from ToolJet) detected by Semgrep showing a flow from account personal data to a transportation sink.} \label{fig:samplecodesnippet} \end{figure} \subsection{Labeling} The identified findings from Semgrep are in the form of various lengths of code snippets (consisting of statements and expressions). Each finding contains at least one detected sink and one source (or an object that received value from a source). We abstract the structure of possible sources and sinks in each code snippet using the symbols below. \begin{itemize} \item $O$ ranges over sources \item $I$ ranges over sinks \item $I^O$ ranges over source-specific sinks \end{itemize} We write $\bar{O}$ as shorthand for a possibly empty sequence $O_1,\cdots, O_n$. Here the underscore $\_$ represents a placeholder for an expression that is insignificant in terms of privacy - it is neither a source nor sink nor contains a value from a source. Below is a list of the common flow abstracts between sources and sinks that we observed in each code snippet. Each abstract represents a typical flow, for example, \circled{1} to \circled{3} show that there are values passing through a sink to a source, from a non-privacy sensitive value (\circled{1}) or from another source (\circled{2}) or from innovating a sink inside another source object (\circled{3}). \begin{multicols}{2} \begin{enumerate}[label=\protect\circled{\arabic*}] \item $O=\_.I(\_)$ \item $O_2=\_.I(O_1,\_)$ \item $O_2=\_.O_1.I(\_)$ \item $\_=\_.O.I(\_)$ \item $\_=\_.I(\bar{O},\_)$ \item $\_.O.I(\_)$ \item $\_.O.I(\_,\bar{O})$ \item $\_.I^O(\_)$ \item $\_.I^O(\_,\bar{O})$ \item $\_.I(\bar{O},\_)$ \end{enumerate} \end{multicols} For each identified code snippet, we label them with 22 labels (9 types of source, 5 types of sink, 5 types of source-specific sink, and 3 types of change in the sensitivity level), which are listed in Table~\ref{tab:notation}. Besides the definition of source and sinks, we also introduce an important label: sensitivity. The sensitivity level can increase, decrease, and stay the same in one identified code snippet. \begin{table}[ht] \centering \begin{tabular}{ll} $\mathcal{O}$ & Nine types of source: $\{O^1, O^2, \ldots, O^9\}$ \\ $\mathcal{I}$ & Five types of sink: $\{I^1, I^2, \ldots, I^5\}$ \\ $\mathcal{I}^O$ & \specialcell{Five types of source-specific sink : \\ $\{{I}^{O^1}, {I}^{O^2}, \ldots, {I}^{O^5}\}$ }\\ $\mathcal{S}$ & Sensitivity level change: $\{\texttt{up, down, equal}\}$ \end{tabular} \caption{Labels to be assigned to each code snippet} \label{tab:notation} \end{table} \paragraph{Sensitivity Level} Not every result shares the same level of sensitivity regarding personal data processing. After processing, the data from the source might remain at a similar sensitivity level, become more sensitive, or become less sensitive. \begin{itemize} \item $\mathcal{S}=$ \texttt{up}: \circled{1}, \circled{4}, \circled{5} \item $\mathcal{S}=$ \texttt{equal}: \circled{2}, \circled{3}, \circled{6}, \circled{7}, \circled{8}, \circled{9} \item $\mathcal{S}=$ \texttt{down}: \circled{10} \end{itemize} \subsection{Result Presentation} Johnson et al.~\cite{johnson2013don} pointed out that ``because the results are dumped onto a code reviewer's screen with no distinct structure causing him to spend a lot of time trying to figure out what needs to be done''. This indicates that developers and code reviewers may not benefit from ungrouped code snippets from static analysis tools if they are not presented in a sensible manner. To tackle this issue, we present a two-phase technique to process the findings from Semgrep and present them to code reviewers in a smart way. After each code snippet is labeled, we start to group them for presentation using their labels and other criteria. Criteria for grouping include not only the labels but also other properties: \begin{itemize} \item neighboring results will be combined (same file and within a line number threshold); \item same or similar source/sink name; \item same API usage (e.g. every code snippet that is related to the same API MongoDB). \end{itemize} Figure~\ref{fig:groupingeg} following provides a straightforward illustration of how we present our results. The results are presented in two separate sections: plain text results and flow results. Users have the flexibility to select any label or label combination to filter the results. \begin{figure}[ht] \includegraphics[width=\columnwidth]{grouping.pdf} \caption{Example presentation of the result. \textit{Personal data occurrences} is at the top and \textit{personal data processing code} is at the bottom.} \label{fig:groupingeg} \end{figure} \section{\uppercase{Demonstration}} We created rules in Semgrep trying to capture as many useful findings for our analysis. The software we analyzed here is ToolJet\footnote{\url{https://github.com/ToolJet/ToolJet}}, an open-source low-code framework for building React-based web applications. ToolJet's implementation is mostly in JavaScript and TypeScript. Users can build internal tools using ToolJet's prebuilt UI widgets to connect to data sources like databases, API endpoints, and external services. This means ToolJet has many parts that process personal data, which makes it a good starting example. Our Semgrep rules produce a total of 1,589 results from ToolJet's source code. We manually reviewed each of the results and calculated the precision for each category. If a single result can clearly demonstrate the processing of personal data, we consider it relevant and it could be beneficial for privacy code review. Surprisingly, most false positives come from the personal data occurrence detector (with a precision of only 46.6\%), while most personal data processing results are relevant (with an average of 90.9\% precision for categories that have more than 50 code snippets identified). Detailed statistics are listed in Tables~\ref{tab:result} and Table~\ref{tab:resultprecision}. \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{cccccccc} & M & T & C/D & DB & E & L \\ \hline\hline Account & 66 & 171 & 84 & 24 & - & 21 \\ Contact & 89 & 175 & 36 & 3 & - & 3 \\ Personal ID & 56 & 133 & 41 & 7 & 1 & 4 \\ Online ID & 6 & 26 & 1 & - & - & 1 \\ Location & 1 & 2 & - & - & - & - \\ \end{tabular} } \caption{The code snippet count for each identified source and sink identified, `-' marks labels for which our approach detected no code snippet. Sink types are: \textit{data manipulation} (\textbf{M}), \textit{data transportation} (\textbf{T}), \textit{data creation/deletion} (\textbf{C/D}), \textit{database} (\textbf{DB}), \textit{encryption} (\textbf{E}) and \textit{log} (\textbf{L}).} \label{tab:result} \end{table} \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{cccccccc} & M & T & C/D & DB & E & L \\ \hline\hline Account & 90.9 & 90.6 & 95.2 & 91.67 & - & 95.2 \\ Contact & 89.9 & 94.9 & 80.6 & * & - & * \\ Personal ID & 92.9 & 81.9 & 85.4 & * & * & * \\ Online ID & * & 84.6 & * & - & - & * \\ Location & * & * & - & - & - & - \\ \end{tabular} } \caption{The precision of code snippet relevance (in \%) for each identified type of source and sink, `-' marks the labels for which our approach did not detect any code snippet, `*' marks the labels for which our approach detected less than 10 results. Sink types are: \textit{data manipulation} (\textbf{M}), \textit{data transportation} (\textbf{T}), \textit{data creation/deletion} (\textbf{C/D}), \textit{database} (\textbf{DB}), \textit{encryption} (\textbf{E}) and \textit{log} (\textbf{L}).} \label{tab:resultprecision} \end{table} Figure~\ref{fig:samplecodesnippet} shows a simple interesting example of a grouped result showing how personal data \texttt{userId} is retrieved from a local repository in \textit{app\_users.service.ts} and then utilized to generate many data structures, such as the \texttt{app} object in \textit{app\_service.ts}. \begin{figure}[ht] \includegraphics[width=\columnwidth]{sampleresult.pdf} \caption{Grouped example results showing how \texttt{organizationUserId} flows between functions.} \label{fig:samplecodesnippet} \end{figure} \subsection{Future work} Since our objective is to identify all relevant processing of personal data in source code, reducing false negatives is our next primary priority. However, in our case, false positives are not a major concern. Due to the subtlety of personal data processing, determining relevance without human assistance is particularly challenging. Specifying the analysis to certain specific patterns would ease manual analysis. This necessitates the implementation of a privacy taxonomy. Using Ethyca's taxonomy~\cite{FidesLan43:online} as an example, we may modify our labels to match the technique with the taxonomy. As an extension of this article, we propose an automated mapping of personal data in an unpublished (under review) manuscript~\cite{mapping} to assist developers and code reviewers in identifying privacy-related code. The mapping based on static analysis automatically detects personal data and the code that processes it, and we offer semantics of personal data flows. \section{\uppercase{Conclusions}} \label{sec:conclusion} This short paper presented ongoing work on a novel, customizable approach to identify personal data processing for code review. This three-phase technique first uses Semgrep to match patterns in the code based on rules for sources and sinks, then associates code snippets generated from pattern matching with a set of behavioral labels, and finally groups results to reduce code reviewer workload. Our demonstration shows the utility and feasibility of this method for gathering and presenting code snippets related to personal data processing from a codebase. Along with the continued development of the approach architecture (refined rules for source and sink, more meaningful labels, and additional criteria for grouping), future work will focus on expanding the case study to include a larger set of open-source software from various domains and conducting a thorough user evaluation of the resulting platform. \section*{\uppercase{Acknowledgements}} This work is part of the Privacy Matters (PriMa) project. The PriMa project has received funding from European Union’s Horizon 2020 research and innovation program under the Marie Skłodowska-Curie grant agreement No. 860315. \bibliographystyle{apalike} {\small
\section{Introduction} The technology of imaging is currently undergoing a rapid evolution both due to enhanced computational techniques \cite{bhandari_computational_2022}, and due to insights from quantum information processing and quantum metrology. It has become clear that the paradigmatic resolution limit found by Abbe and Rayleigh based on the interference of classical waves, set by the wavelength of the light, is not the ultimate fundamental bound if the quantum nature of light is taken into account. In quantum optics it was realized already in the 1960s in the context of the explication of the Hanbury-Brown Twiss effect \cite{hanbury_brown_test_1956,fano_quantum_1961} that fundamentally the interference of light should be considered in Hilbert space and can lead to higher order correlations that contain information beyond the first order correlations relevant for the interference patterns of classical electromagnetic waves. Experimentally, super-resolution was demonstrated by Hell in 1994 \cite{hell_breaking_1994,hell_farfield_2007}, who resolved a molecule with nanometer resolution with light in the optical domain by decoration of the molecule with point-like emitters and quenching them selectively. Theoretical work used early on the techniques of optimal parameter estimation to estimate the ultimate sensitivities of radar and in fact led to the development of quantum parameter estimation theory \cite{helstrom_detection_1967,helstrom_quantum_1969,helstrom_cramerrao_1973,helstrom_estimation_1970}. Much later, quantum parameter estimation theory was applied to determine optimal detection modes and ultimate sensitivities for arbitrary parameters encoded in the quantum state of Gaussian light \cite{pinel_ultimate_2012,pinel_quantum_2013}. In 2016, Tsang and coworkers wrote a seminal paper that considered the problem of ultimate resolution as quantum parameter estimation problem for the distance between the two sources. They found that the Quantum Fisher information (QFI) that sets the ultimate bound remains finite for two point sources of low, identical intensity in the limit of vanishing separation, whereas the classical Fisher information linked to intensity measurements in direct imaging vanishes. A large amount of theoretical \cite{tsang_quantum_2019,zhou_modern_2019,sorelli_momentbased_2021,rehacek_multiparameter_2017,napoli_superresolution_2019,nair_farfield_2016,lupo_ultimate_2016,larson_resurgence_2018,kurdzialek_superresolution_2021,kolobov_quantum_2000,ang_quantum_2017,tsang_quantum_2011,bisketzi_quantum_2019,bojer_quantitative_2021,datta_subrayleigh_2020,dealmeida_discrimination_2021,liang_coherence_2021,tsang_subdiffraction_2017,tsang_quantum_2015,karuseichyk_resolving_2022,lupo_quantum_2020,bojer_quantitative_2021,gottesman_longerbaseline_2012,khabiboulline_optical_2019,wang_superresolution_2021} and experimental research \cite{backlund_fundamental_2018,mazelanik_optical_2021,paur_achieving_2016,pushkina_superresolution_2021,boucher_spatial_2020,sorelli_optimal_2021} followed that corroborated and generalized this insight. Most of these works concentrated on estimating one or few parameters, however, typically linked to geometrical information like the spatial separation or position of point sources and, {in some cases, optical phase imaging, i.e., the joint estimation of the phases with respect to a reference mode \cite{humphreys_quantum_2013,gagatsos_gaussian_2016,knott_local_2016,pezze_optimal_2017}.} While this led to important insights and solid evidence that in many situations quantum parameter estimation techniques can enhance resolution beyond the classical diffraction limit, imaging typically aims not at recovering information about the separation, or, more generally, the spatial position, of point sources. Rather, in a typical image, the scene is covered by pixels of known locations and one wants to know for each pixel the intensity of the source in that point, its spectral composition, polarization etc. Since an image consists typically of many pixels, imaging is then inherently a (quantum-) many-parameter estimation problem, and corresponding techniques should be applied to obtain the best possible quality of an image re-construction based on the gathered measurement results. In this work we go an important step in this direction in passive remote sensing of Earth in the micro-wave domain, building on our previous work \cite{kose_quantumenhanced_2022}. {Here the state of the art is interferometric antenna synthesis, with which a large effective antenna can be formed from a set of small antennas, with corresponding enhanced resolution. For example, the SMOS (``Soil Moisture and Ocean Salinity'') satellite is an interferometer with a Y-shaped array of 69 antenna with each arm has a length of around 4 m \cite{anterrieu_resolving_2004,corbella_visibility_2004,levine_synthetic_1999,thompson_interferometry_2017}. It achieves a resolution of about $d\simeq 35$\,km, from a distance $R\simeq 758$\,km above the surface of Earth, by measuring the thermal noise in a narrow frequency band of electromagnetic fields (1420-1427 MHz, central wavelength $\lambda\simeq 21$\,cm). The electric fields are sampled in real-time, filtered and interfered numerically, implementing thus purely classical interference. The diffraction limit analogous to the ones by Abbe and Rayleigh is given here by the van Cittert-Zernike theorem \cite{vancittert_wahrscheinliche_1934,zernike_concept_1938,braun_generalization_2016}, $d\simeq\lambda R/\Delta x_{ij}$, where $\Delta x_{ij}$ is the maximal spatial separation between two antennas. From the interferometric data one can, via inverse spatial Fourier Transform, estimate the local brightness temperatures $T_\text{eff}$ on the surface of Earth with resolution $d$, and from these, with appropriate models, the soil moisture and ocean salinity. This information is of great importance for the geosciences, monitoring of Earth, climate modelling, flood predictions, and many more. Driven by these applications, there is the desire to enhance the spatial resolution, but simply increasing the size of the satellite becomes unpractical, and lowering its orbit reduces its life-time. \\ Here we show that with appropriate techniques from multiparameter quantum estimation theory, one can reconstruct images of Earth with roughly a factor of 10 times better spatial resolution than SMOS with a satellite of comparable size. We demonstrate this with images of up to 30 pixels, for which we show that they can be reconstructed faithfully with a pixel size of 3\, km. Instead of local measurement of the incoming modes of the interferometer, we combine the modes with a unitary transformation that enables non-local measurements. We find the optimal unitary matrix that minimizes the scalar classical Cramér Rao bound \cite{albarelli_perspective_2020} for the classical Fisher information matrix for the chosen measurements contracted with a weight matrix. The corresponding unitary matrix can be decomposed into phase shifters and at most $n(n-1)/2$ beam splitters, as is well-known from linear optical quantum computing \cite{kok_linear_2007}. This allows us to quantum-program optimal measurement schemes for imaging. Note that contrary to classical computational imaging \cite{bhandari_computational_2022} the quantum computation for this new kind of ``quantum-computational imaging'' is done before the measurements. Multiparameter quantum estimation theory is by itself a rapidly evolving field. Recently, there have been many different works, e.g., multiparameter estimation of several phases \cite{humphreys_quantum_2013}, estimation of all three components of a magnetic field \cite{baumgratz_quantum_2016}, optimal estimation of the Bloch vector components of a qubit \cite{bagan_optimal_2006}, multiparameter estimation from Markovian dynamics \cite{guta_information_2017}, etc. (see the review article \cite{szczykulska_multiparameter_2016}). For a limited sample size, like in passive sensing, it is crucial to simultaneously estimate the image's parameters. The multi-parameter quantum Cram\'er-Rao bound can in general not be saturated. Optimal measurement linked to different parameters do typically not commute and hence lead to incompatible measurements. Once the commutation on average is satisfied, the quantum limit is asymptotically attainable \cite{ragy_compatibility_2016}. We build on our previous work \cite{braun_generalization_2016,braun_fouriercorrelation_2018,kose_quantumenhanced_2022}, where we showed that thermal fluctuations of the microscopic currents lead to Gaussian states of the microwave field and hence allow one to use the QCRB for Gaussian states \cite{liu_quantum_2020,pinel_ultimate_2012,pinel_quantum_2013,shapiro_quantum_2009}, As before we assume that only the current densities at the surface of Earth contribute and neglect the cosmic microwave background as well as dditional technical noises \cite{oh_quantum_2021,gessner_superresolution_2020,len_resolution_2020}. {We organize the rest of the article as follows. In Section \ref{theory}, we introduce the quantum state received by the $n$-mode interferometer, as well as the quantum Fisher information (QFI), the symmetric logarithmic derivative (SLD, and the corresponding quantum Cramer Rao lower bound (QCRB). Further, we present the optimal POVM (positive-operator-valued measure), which minimizes the most informative bound for the multiparameter estimation. In Section \ref{result}, first, we discuss the simple problem as a benchmark considering two-pixel sources with the two-mode interferometer. We analyze the quantum advantage with the optimal unitary compared to local measurement scenarios. Second, we increase the number of pixels by considering a 1D array of sources with a 1D array interferometer. We examine how closely we can approache the quantum limit of sensitivity with our parameter set. Third, we consider a 2D source image with a 2D array interferometer. Using the maximum likelihood estimator, we reconstruct the image for the POVMs with the optimized unitary specific to the image, the optimized unitary for uniform temperature distribution, and local measurements. We conclude in Section \ref{conclude}.} \section{Theory} \label{theory} \subsection{The State Received by $n$-mode Interferometer} In previous work \cite{kose_quantumenhanced_2022}, we analyzed the quantum state radiated from current current distribution $\mathbf{j}(\mathbf{r},t)$ \cite{ braun_fouriercorrelation_2018,blow_continuum_1990,mandel_optical_1996,glauber_coherent_1963,scully_quantum_1999,loudon_quantum_1974,kubo_fluctuationdissipation_1966,savasta_light_2002,sharkov_passive_2011,landau_statistical_1980,carminati_nearfield_1999} on the source plane. We show that the state of the incoming modes of the $n$-mode interferometer from these radiated sources can be modeled as circularly symmetric Gaussian states with a partial coherence, which encodes the information of position and amplitudes distribution of the sources. Then after the scattering process \cite{zmuidzinas_cramer_2003,zmuidzinas_thermal_2003} from the interferometer the partially coherent state received in the $n$ modes is represented by \begin{equation} \rho=\int \text{d}^{2n}\beta \Phi(\{\beta_i\})|\{\beta_i\}\rangle\langle\{\beta_i\}|, \end{equation} where $|\{\beta_i\}\rangle$ is a multi-mode coherent state for spatial antenna modes, $\{\beta_i\} = \beta_1, \beta_2, ... \beta_n$, and \begin{equation} \Phi(\{\beta_i\})=\frac{1}{\pi^{n} \operatorname{det} \Gamma} e^{-\bar\beta^\dagger \Gamma ^{-1}\bar \beta}. \end{equation} with $\bar \beta ^T = (\beta_1, \beta_2...\beta_n )$ is the Sudarshan-Glauber representation, and $\text{d}^{2n}\beta\equiv \text{d}\Re{\beta_1}\text{d}\Im{\beta_1}\ldots \text{d}\Re{\beta_n}\text{d}\Im{\beta_n}$. The matrix $\Gamma$ is the coherence matrix for $n$ antenna modes and its elements are defined as $\Gamma_{ij} = \braket{\hat b^\dagger_i \hat b_j}$. Considering the sources of these fields are generated by random current distribution on the source plane and assuming that each antenna has the same polarization direction $\hat e_l$ and they filter incoming fields with same frequency $\omega_0$ with a bandwidth $B$, then one finds a relation between $\braket{b^\dagger_i b_j}$ and the average current density distribution on the source plane as \cite{kose_quantumenhanced_2022} \begin{equation} \begin{split} \braket{\hat b^\dagger_i \hat b_j} &=K\int d^{3} {r}\;\frac{\braket{|\tilde{{j}}_{t,l}\left(\mathbf{r},{\omega}\right)|^2}e^{i\omega_0(|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i|)/c}}{|\mathbf{r}-\mathbf{r}_i||\mathbf{r}-\mathbf{r}_j|}\\&\times\mathrm{sinc}\left[\frac{B}{2c}(|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i|)\right], \end{split} \label{eq3} \end{equation} where $d^3r$ is the integral over the source volume, $\mathbf{r}_i$ is the location of the detector for received modes in the detection plane and $\text{sinc}(x) = \sin(x)/x$. $\tilde{{j}}_{t,l}\left(\mathbf{r},{\omega}\right)$ is the Fourier transform of the locally transverse component of the current density ${\mathbf{j}}\left(\mathbf{r},t\right)$ and '$l$' stands for the component parallel to the source plane. Considering $R$ as the distance between source and detection planes, we can parametrize the integral over Earth's surface as $\mathbf{r}= (x,y,R)$ with respect to the coordinate system of the detection plane. Assuming that we are in the far field regime $|\Delta\mathbf{r}_{ij}|\ll R$, where $\Delta\mathbf{r}_{ij}= \mathbf{r}_j-\mathbf{r}_i$ is the distance between two antennas, we approximate $|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i| \approx \Delta\mathbf{r}_{ij}\cdot \mathbf{r}/|\mathbf{r|}$. In the denominator, we approximate $|\mathbf{r}-\mathbf{r}_i| \approx R/\cos \tilde\theta(x,y) $ with $\tilde\theta(x,y)$ the polar angle between the $z$-axis and the vector $(x,y,R)$. We find the relation of the average amplitude of current density distribution to brightness temperature as $T_{\mathrm{B}}(x,y)$ by $\braket{|\tilde{{j}}_{t,i}\left(\mathbf{r},{\omega}\right)|^2} = K_1 T_{\mathrm{B}}(x,y)\cos\tilde \theta(x,y)\delta(z-R)$, where $K_1 = 32 \tau_c k_B /(3 l_c^3 \mu _0 c)$. Further, one can define the effective temperature as $T_{\mathrm{eff}}(x,y)\equiv T_{\mathrm{B}}(x,y) \cos^3\tilde \theta(x,y)$. We include an extra constant prefactor $\mu$ for the additional losses, which can be justified by tracing out modes of losses "$\hat c$" into which photons might scatter by writing $\hat b = \sqrt{\mu} \hat{\tilde b} + \sqrt{1-\mu} \hat c$. Compared to the actual physical temperature, the brillance temperature is additionally modified by the albedo of the surface from which important information such as the water content of the surface or the salinity of ocean water can be extracted. For simplicity we simply work with the physical temperatures in the following, i.e., set $T_B(x,y)=T(x,y)$. Following these assumptions and dropping the $\sim$ from $\hat{\tilde b} $, we simplify Eq. (\ref{eq3}) as \begin{equation} \begin{split} \braket{\hat b^\dagger_i \hat b_j}&=\frac{\mu\kappa}{R^2}\int dxdy\;T_{\mathrm{eff}}(x,y)e^{2\pi i\left(v_x^{ij}x +v_y^{ij}y \right)}, \end{split} \label{eqxi} \end{equation} We introduced a new constant $ \kappa = K_1K \equiv {2k_B}/{(\pi \hbar \omega_0)} $ where $\kappa$ has the dimension of inverse temperature with SI-units "$(1/\mathrm{K})$" and $v_y^{ij} = {\Delta x_{ij} }/({\lambda R}),\quad v_x^{ij} ={\Delta y_{ij} }/({\lambda R})$ with $\omega_0/c = 2\pi /\lambda$. Considering the parameters of SMOS we find $\kappa = 9.4 $ 1/K. The SMOS has a Y shape where each arm has a length of almost 4 m. Therefore, it is reasonable to set maximum baselines $\Delta x_{\max} = \Delta y_{\max} $ around 10 m. \begin{figure}[t!] \centering \includegraphics[width=0.99\linewidth]{img.pdf} \caption{The Gaussian state $\rho(\boldsymbol{\theta})$ of the $n$-mode interferometer contains spatial and radiometric information from current density sources. The incoming modes $\hat b_i$ are combined with an optimized $\mathbf{U}$ to have detection modes $\hat d_i$ of the photon counting measurement. For experimental realization, one can decompose $\mathbf{U}$ into $SU(2)$ group elements similar to optical quantum computing, i.e., using beam splitters and phase shifters. After the measurements, one estimates the parameter set using an estimator function such as a maximum likelihood estimator (MLE).} \label{interferometer} \end{figure} \subsection{Estimation Theory of the Sources} \label{sec2c} \textit{Quantum Cram\'er-Rao Bound:} For a quantum state $\rho_{\boldsymbol{\theta}}$ that depends on a vector of $l$ parameters $ \boldsymbol{\theta} = (\theta_1,\theta_2,...,\theta_l)^T$, an ultimate lower bound of an unbiased estimator of the parameter set is given by the quantum Cram\'er-Rao (CR) bound, which states that the co-variance matrix of any such estimator is equal or greater than the inverse of the QFI matrix (in the sense that their difference is a positive-semidefinite matrix). The classical Cram\'er-Rao bound (CCRB) from measurement is lower bounded by the quantum Cram\'er-Rao bound (QCRB) ~\cite{helstrom_quantum_1969,helstrom_detection_1967,szczykulska_multiparameter_2016} given by \begin{equation} \operatorname{Cov}(\tilde{\boldsymbol{\theta}}) \geqslant \mathscr{F}(\boldsymbol{\theta})^{-1}, \quad \mathscr{F}_{{i j}}(\boldsymbol{\theta})=\frac{1}{2} \operatorname{Tr}\left(\rho_{\boldsymbol{\theta}}\left\{\mathscr{L}_{i}, \mathscr{L}_{j}\right\}\right),\label{multi} \end{equation} where $\operatorname{Cov}(\tilde{\boldsymbol{\theta}}) $ is a covariance matrix for the locally unbiased estimator $ \tilde{\boldsymbol{\theta}}$ \cite{ragy_compatibility_2016,sidhu_geometric_2020}, the $\{\cdot,\cdot \}$ means the anti-commutator, and $\mathscr{L}_{i}$ is the symmetric logarithmic derivative (SLD) related to parameter $i$, which is defined similarly to the single-parameter case, $\frac{1}{2}\left(\mathscr{L}_{i} \rho_{\boldsymbol{\theta}}+\rho_{\boldsymbol{\theta}} \mathscr{L}_{i}\right)=\partial_{{i}} \rho_{\boldsymbol{\theta}} .$ The SLD and the elements of the QFI matrix are given in Ref.~\cite{gao_bounds_2014} for any Gaussian state. The SLD can be written as \begin{equation} \mathscr{L}_{i}=\frac{1}{2} \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right)\left(\mathbf{b}_{\alpha} \mathbf{b}_{\beta}-\Sigma^{\alpha \beta}\right), \end{equation} where the summation convention is used, and in our case, that the mean displacement of the Gaussian state is zero. Covariance matrix elements are $\Sigma_{i j}=\frac{1}{2} \operatorname{Tr}\left[\rho\left({\mathbf{b}}_i {\mathbf{b}}_j+{\mathbf{b}}_j {\mathbf{b}}_i\right)\right]$, with $\mathbf{b}=\left[b_1, b_1^{\dagger}, b_2, b_2^{\dagger}, \ldots b_n, b_n^{\dagger}\right]$ ~\cite{braun_precision_2014,adesso_continuous_2014,gao_bounds_2014,olivares_quantum_2012,pinel_ultimate_2012,weedbrook_gaussian_2012}. Then the elements of the QFI matrix in \cite{gao_bounds_2014} become \begin{equation} \mathscr{F}_{i j}=\frac{1}{2} \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1} \partial_{j} \Sigma^{\alpha \beta} \partial_{i} \Sigma^{\gamma \delta}, \end{equation} where $\mathfrak{M} \equiv \Sigma \otimes \Sigma+\frac{1}{4}\Omega \otimes \Omega$, and $\Omega=\bigoplus_{k=1}^{n} i \sigma_{y}$. Using the properties of the Gaussian state (circularly symmetric and with zero mean) we can write the SLD for $n$ mode interferometers as \cite{kose_quantumenhanced_2022} \begin{equation} \begin{split} \mathscr{L}_{i} = \sum_j^n g^{j}_i \hat{b}^\dagger _j \hat{b}_j + \sum _{j<k}^n (g^{jk}_i\hat{b}^\dagger _j \hat{b}_k + (g^{jk}_{i})^*\hat{b}^\dagger _k \hat{b}_j) +\mathrm{C}, \end{split} \label{eq:Sld} \end{equation} where C is a constant term that can be dropped for diagonalization purposes. In the single parameter case, the optimal POVM is the set of projectors onto eigenstates of $\mathscr{L}_i$. It allows one to saturate the QCRB in the limit of infinitely many measurements using maximum likelihood estimation \cite{helstrom_detection_1967,braunstein_statistical_1994,paris_quantum_2009}. To find the POVMs from the SLD, we construct a Hermitian matrix $\mathbf{M}_i$ whose diagonal elements are real-valued functions which are defined as $g^{j}_i \equiv \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right) $ with $\alpha = 2j$ and $\beta = 2j-1$. The off-diagonal elements are complex-valued functions and defined as $g^{jk}_i =\mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right) $ with $\alpha = 2j$ and $\beta = 2k-1$ and $k>j$. By introducing a new set for the field operators such that, $\bar{\mathbf{b}}^\dagger \equiv {\left[\hat b_1^\dagger, \hat b_2^\dagger, ..., \hat b_n^\dagger\right]}$ and $\bar{\mathbf{b}} \equiv {\left[ \hat b_1, \hat b_2, ..., \hat b_n\right]^T}$, we write the SLD in the following form \begin{equation} \begin{split} \mathscr{L}_{i} = \bar{\mathbf{b}}^\dagger \mathbf{M}_i \bar{\mathbf{b}}. \end{split} \end{equation} As $\mathbf{M}_i$ is a Hermitian matrix it can be unitarily diagonalized by $\mathbf{M}_i =\mathbf{V}^\dagger_i \mathbf{D}_i \mathbf{V}_i $ with $\mathbf{V}_i^\dagger \mathbf{V}_i = \mathbb{I}$. A new set of operators can be defined as $\bar{\mathbf{d}}_i^\dagger = \bar{\mathbf{b}}^\dagger \mathbf{V}_i^\dagger$ where $\bar{\mathbf{d}}_i^\dagger = {\left[\hat d_{i1}^\dagger, \hat d_{i2}^\dagger, ..., \hat d_{in}^\dagger\right]}$. The optimal POVM for the single parameter case ($i=1$, which we drop in the following) can be found as a set of projectors in the Fock basis $\{\ket{m_1,m_2,...,m_n}\bra{m_1,m_2,...,m_n}\}_{\{m_1,m_2...m_n\}}$ of the $\hat d_l $ with $\hat d^\dagger_l \hat d_l\ket{m_1,m_2,...,m_n} = m_l\ket{m_1,m_2,...,m_n}$, where $l\in \{1,...,n\}$. The $\hat{d}_l$ will be called "detection modes." {By introducing a positive weight matrix $\boldsymbol{w}$, one can define the scalar inequalities from the matrix valued QCRB as $\operatorname{Tr}(\boldsymbol{w}\operatorname{Cov}(\tilde{\boldsymbol{\theta}})) \geqslant \operatorname{Tr}(\boldsymbol{w}\mathscr{F}(\boldsymbol{\theta})^{-1}) \equiv C^S(\boldsymbol{\theta},\boldsymbol{w})$. Contrary to the single parameter case, the multiparameter QCRB can generally not be saturated. Holevo realized this problem and proposed a tighter and more fundamental bound \cite{holevo_statistical_1973} $C^H(\boldsymbol{\theta},\boldsymbol{w})$, which is upper bounded by $2C^S(\boldsymbol{\theta},\boldsymbol{w})$ \cite{tsang_quantum_2020,albarelli_perspective_2020}. If the SLD operators for different parameters commute on average $\operatorname{Tr}(\rho_{\boldsymbol{\theta}}[L_i, L_j])=0$, then the Holevo-CRB is equivalent to the QCRB, and the QCRB for multiparameter estimation can be saturated asymptotically with a collective measurement in the limit of an infinitely large number of copies $\rho_{\boldsymbol{\theta}}^{\otimes{N}}$ \cite{ragy_compatibility_2016,albarelli_perspective_2020}.} The standard deviation of the estimator decreases proportionally to $1/\sqrt{{N}}$ for the sample size of ${N}$. The SMOS satellite travels at a constant speed of around $v\simeq 7$ km/s. It takes time $\tau = L/v$ to fly at a distance $L$. Each sample has a lower bound for the detection time given by $t_D\simeq 1/B $. In practice, the practical detection time might be much larger due to, e.g.~deadtimes of the sensors, slow electronics, etc. In addition, zero temperature of the detector and modes $\hat b_i$ is implicitly assumed in our calculations but would require cooling down to temperatures much smaller than $\hbar \omega_0$. If the actual detection time is $t_D^\text{eff}$, the maximum sample size becomes ${N}=\tau/t_D^\text{eff}$. \textit{Most Informative Bound for Multiparameter Metrology:} The most informative bound minimizes the classical scalar Cramer Rao bound over all the possible POVMs. In the single parameter case, from the diagonalization of the SLD, we see that one needs to combine the incoming modes with a unitary transformation to saturate the QCRB single parameter case. This transformation, even for a single parameter, depends on the parameter itself. In the multiparameter case, any of these specific unitary transformations for a specific parameter usually gives a more significant mean square error for the remaining parameters. Using the clue from the SLD structure, we drop the index "$i$" from the unitary transformation of the modes and minimize the scalar bound of the classical Fisher information matrix for multiparameter estimation over all possible unitaries. Then, a new set of operators for the detection modes can be defined as $\bar{\mathbf{d}} =\mathbf{U} \bar{\mathbf{b}} $ where $\bar{\mathbf{d}}^T = {\left[\hat d_{1}, \hat d_{2}, ..., \hat d_{n}\right]}$, where $\mathbf{U}$ is the corresponding unitary transformation of the field modes. The average values of the elements of the new coherence matrix $\tilde \Gamma$ can be found by using $\hat d_i = \sum_l U_{il} \hat b_l $ as \begin{equation} \tilde \Gamma_{ij}= \langle d_i^{\dagger} d_j \rangle = \sum_{kl} U^*_{ik}U_{jl}\langle b_k^{\dagger} b_l \rangle. \end{equation} Then we will have the probabilities after measurement $P(m_1,..m_n| \theta_1,\theta_2,...,\theta_l) $ as \begin{equation} \begin{split} P(\{m_k\}| \boldsymbol{\theta})&=\int \text{d}^{2n} {\delta} \tilde \Phi(\{\delta_i\}) |\langle \{m_k\}|\{\delta_i\}\rangle|^2 ,\\&=\int \text{d}^{2n} {\delta} \tilde \Phi(\{\delta_i\}) \prod_i e^{-|\delta_i|^2}\frac{|\delta_i|^{2m_i}}{m_i!}. \end{split} \end{equation} where $|\{\delta_i\}\rangle $ is a coherent state of the detection modes and $ \tilde \Phi(\{\delta_i\})$ is the Sudarshan-Glauber function for the state of the detection modes. Due to the linear transformation from $\bar{ \mathbf{b}}$ to $\bar {\mathbf{d}}$ it is still a Gaussian. It is difficult to evaluate the integral of $P(\{m_k\}| \boldsymbol{\theta})$ for all possible values of $m_k$ and keep track of all possible combinations of photon number counts, both numerically and experimentally. Hence, instead of considering projections on the complete Fock basis as POVMs, we choose the POVMs with at most one photon per measurement and limit ourselves to $\sum_k m_k\leq 1 $. Clearly, the resulting information loss is negligible for light that from the very beginning is very faint, with at most one photon per mode, but can be important for stronger light sources, for which one should try to resolve the photon numbers. For thermal microwave sources at room temperature, we have of the order of 10 photons per mode. We see below that even without resolving their number we can already largely surpass the classical resolution limit, but there is room for further improvement by going beyond the single-photon detection scheme that we analyse in the following.\\ The selected POVM elements of single photon detection are \begin{equation} \begin{split} &\Pi_0 = \ket{0,0,...,0}\bra{0,0,...,0}, \\ &\Pi_k = \ket{0,0,...,1_k,...,0}\bra{0,0,...,1_k,...,0}, \\ &\Pi_{n+1} = \mathbb{I}-\sum_{l=0}^{n}\Pi_l, \end{split} \end{equation} where the last element ($n+1$) ensures $\sum_{l=0}^{n+1} \Pi_l = \mathbb{I}$. The measurement probability of no photon in any interferometer mode becomes \begin{equation} \begin{split} P_0(\boldsymbol{\theta}) &=\frac{1}{\pi^{n} \operatorname{det} \tilde \Gamma}\int \text{d}^{2n} {\delta} e^{-\boldsymbol{\delta}^\dagger (\tilde \Gamma^{-1} +\mathbb{I})\boldsymbol{\delta}}\\ &= \frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}. \end{split} \label{eq:13} \end{equation} The single photon detection probabilities in each mode of the interferometer follow as \begin{equation} \begin{split} P_k(\boldsymbol{\theta}) &=\frac{1}{\pi^{n} \operatorname{det} \tilde \Gamma}\int \text{d}^{2n} {\delta} e^{-\boldsymbol{\delta}^\dagger (\tilde \Gamma^{-1} +\mathbb{I})\boldsymbol{\delta}}|\delta_k|^2\\ &= \frac{[(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk}}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}. \end{split} \label{eq:14} \end{equation} The probability to find more than a single photon per measurement, can be found as \begin{equation} P_{n+1}(\boldsymbol{\theta}) = \mathbb{I}-\sum_{k=0}^{n}P_k. \end{equation} We also show the first derivative of the probability distributions of no photon detection from measurements analytically to be given by \begin{equation} \begin{split} \frac{\partial P_0(\boldsymbol{\theta})}{\partial \theta_i} &= \left(\frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}\right) \operatorname{Tr}\left(-(\tilde \Gamma +\mathbb{I})^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\right). \end{split} \label{eq:15} \end{equation} The first derivative for at most single photon detection for all modes becomes \begin{equation} \begin{split} \frac{\partial P_k(\boldsymbol{\theta})}{\partial \theta_i} &= \left(\frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}\right)\\&\times\left[{[(\tilde \Gamma^{-1} +\mathbb{I})^{-1}\tilde \Gamma^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\tilde \Gamma^{-1}(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk}}\right. \\&- \left. [(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk} \operatorname{Tr}\left((\tilde \Gamma +\mathbb{I})^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\right)\right] . \end{split} \label{eq:17} \end{equation} Finally, using all Eqs. (\ref{eq:13}-\ref{eq:17}), the elements of the classical Fisher information can be found from \begin{equation} \mathcal{F}_{ij} = \sum_l^{n+1} \frac{1}{P_l(\boldsymbol{\theta})} \frac{\partial P_l(\boldsymbol{\theta})}{\partial \theta_i} \frac{\partial P_l(\boldsymbol{\theta})}{\partial \theta_j} . \label{cFI} \end{equation} The most informative bound \cite{albarelli_perspective_2020} in this case is the bound minimized over all possible unitary matrices \begin{equation} \operatorname{Tr}\left[\boldsymbol{w}\operatorname{Cov}(\tilde{\boldsymbol{\theta}})\right] \geq \min _{\mathbf {U }}\left[\operatorname{Tr}\left[\boldsymbol{w} \mathcal{F}^{-1}(\boldsymbol{\theta})\right]\right]. \label{MIB} \end{equation} For simplicity, we will consider $\boldsymbol{w} = \mathbb{I}$. \textit{Maximum Likelihood Estimation:} Maximum likelihood estimators are widely used in estimation theory and play an essential role in interpreting the Cramér-Rao theorem \cite{myung_tutorial_2003,paris_quantum_2004}. One can estimate the set of parameters with a given probability distribution with some observed data. The likelihood function is given by $l(\boldsymbol{\theta}) = \prod_k ^{n+1} (P_k(\boldsymbol{\theta}))^{N_k} $, where the total number of samples is given by $N = \sum_k^{n+1} N_k$ with $N_k$ realizations of outcome $k$. Since the logarithm is a monotonously increasing function, the log of the likelihood function is maximized by the same parameter vector $\boldsymbol{\theta}$. Thus, the maximum likelihood estimator (MLE) $\boldsymbol{\hat\theta}_{\mathrm{mle}}$ is a value of $\boldsymbol{\theta}$ that maximizes the log-likelihood $\mathcal{L}(\boldsymbol{\theta})= \log (l(\boldsymbol{\theta}))$, \begin{equation} \boldsymbol{\hat{\theta}}_{\text {mle }}=\underset{\boldsymbol{\theta} \in \Theta}{\arg \max } \mathcal{L}(\boldsymbol{\theta}), \end{equation} where the max is taken over the entire parameter space $\Theta$. For sufficiently large sample size, $N\rightarrow \infty$, $\boldsymbol{\hat{\theta}}_{\text {mle }}$ converges to the true value of the parameter set $\boldsymbol{\theta}$. \section{Results: Estimation of source temperatures} \label{result} We partition the source of the electromagnetic field on the surface of Earth into square pixels of size $a$ and effective pixel temperature $T_i$, located under the interferometer in the $x,y$ plane at distance $R$ from the satellite. We are interested in estimating the temperature distribution \begin{equation} T_{\mathrm{eff}}(x,y)= \sum_i T_i \mathrm{Box}(x-x_i,y-y_i), \end{equation} where $\mathrm{Box}(x,y)$ is defined as \begin{equation} \operatorname{Box}(x, y) \triangleq \begin{cases}1 & |x|\leq \frac{a}{2}\quad \mathrm{and} \quad|y|\leq \frac{a}{2}\\ 0 & \mathrm{else}\end{cases}. \end{equation} We assume that all the other parameters are known to sufficiently large precision. The diagonal elements of the coherence matrix ($\Gamma$) of Gaussian states becomes \begin{equation} \langle \hat b_k^\dagger \hat b_k \rangle = \frac{\mu\kappa a^2 }{R^2} \sum_i^p T_i, \end{equation} and the off-diagonal elements are \begin{equation} \begin{split} \langle \hat b_k^\dagger \hat b _l \rangle =& \frac{\mu\kappa a^2 \eta_{kl} }{R^{2}} \sum_i^p T_i e^{2 \pi i\left(v^{x}_{kl} x_i+v^{y}_{kl} y_i\right)}, \end{split} \end{equation} where $k\neq l$ and we defined $\eta_{kl} \equiv\operatorname{sinc}(v^{x}_{kl}a)\operatorname{sinc}(v^{y}_{kl}a) $. The number of pixels along the $\hat x $ and $\hat y$ axis is $p_x$ and $p_y$, respectively, and the number of detection modes along these axes $n_x$ and $n_y$, respectively. In total, we have $p = p_xp_y$ pixels on the surface and $n = n_xn_y$ detectors in the detection plane of which each measures one detection mode. We set the number of detection modes equal to the number of pixels in the source plane, $n=p$, to leave no redundant parameter for the estimation, and use $n_x=p_x$ and $n_y=p_y$. \subsection{Resolution of two pixel sources} Let us start with two pixels (pixel-1 and pixel-2) with temperatures $T_1$ and $T_2$ in the source plane with pixel size $a$. Our goal is to estimate the temperatures of each source. We set the central locations of these two sources in the source plane to $(-a/2,0,R)$ and $(a/2,0,R)$, i.e.~both are on an axis parallel to the $\hat x$-axis without any distance between them. In the detection plane, we have two detection modes $\hat d_1$ and $\hat d_2$ with detectors centered at positions $(-\Delta x/2,0,0)$ and $(\Delta x /2,0,0)$ on the $\hat x$-axis, respectively. In our previous work \cite{kose_quantumenhanced_2022}, we showed that if the mean photon numbers in each received mode of the two-mode interferometer, with circular symmetric Gaussian state, are identical ($\langle b_1^\dagger b_1\rangle = \langle b_2^\dagger b_2\rangle$), then the SLDs for $T_1$ and $T_2$ commute on average $\operatorname{Tr}(\rho_{\boldsymbol{\theta}}[L_i, L_j])=0$. Thus the QCRB and Holevo-CRB are equivalent $C^S(\boldsymbol{\theta},\boldsymbol{w})\equiv C^H(\boldsymbol{\theta},\boldsymbol{w})$. For each parameter, the matrix $\mathbf{M}_i$ from the SLD with $i\in \{T_1,T_2\}$, is of the form \begin{equation} \mathbf{M}_i=\left[\begin{array}{cccc} g_{1}^i & |g_{2}^{i}| e^{i\phi_i} \\ |g_{2}^{i}| e^{-i\phi_i} & g_{1}^i \end{array}\right], \end{equation} where the $\phi_i$, in general, depend on both $T_1$ and $T_2$. The $\phi_{1}$ and $\phi_{2}$ differ for single parameter estimation of $T_1 $ and $T_2$. The unitary that diagonalizes each SLD is found as \begin{equation} \mathbf{U}_i=\frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1 & e^{i \phi_i} \\ 1 & -e^{i \phi_i} \end{array}\right]. \end{equation} Since the unitary is parametrized with a single parameter, we can drop the index $i$ and find the $\phi$ that gives the most informative bound for joint estimation of both $T_1$ and $T_2$. \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_1aa.pdf} \caption{Temperature estimation of two pixels. (a) The diagonal elements of the Fisher information matrix (dimensionless) as a function of $\phi$. The dashed curves are for $\mathcal{F}_{T_1}$, solid curves are for $\mathcal{F}_{T_2}$. (b) The scalar CRBs as a function of $\phi$ scaled with the average temperature $\bar T$ square of the sources. The flat lines are for the QCRBs, the others are the CCRBs for the measurement. (c) The scalar CRBs as a function of temperature difference of two pixels. Solid black is for QCRB, red dotted is for CCRB for optimized $\phi$, and green dashed curve is for the scalar CCRB for local measurement considering $\mathbf{U} = \mathbb{I}$. (d) The gain factor of the estimate $\mathcal{R}$ as function of $\phi$. The flat lines are from the QCRBs, the others are the CCRBs from the measurement. In figures (a), (b), and (d), the blue curves are for uniform temperature, $T_1 = T_2 = 300$ K and red curves are for non-uniform temperatures, $T_1 = 400$ K and $T_2 = 200$ K. The source size is $a=4$ km. The average temperature in all figures is $\bar T=300$ K and $\mu = 0.5$.} \label{figtwopixel} \end{figure} In Fig.~\ref{figtwopixel}(a), we plot the diagonal elements of the CFI matrix in Eq. (\ref{cFI}) as a function of $\phi$. If $T_1$ (dashed) and $T_2$ (solid) are equal, $T_1 =T_2$ (blue lines), a diagonal element $\mathcal{F}_1 $ or $\mathcal{F}_2$, can be obtained by mirroring the other with respect to $\phi=\pi/2$. For different temperatures, $T_1 > T_2$ (red lines), the CFI matrix elements are not symmetric anymore. We observe that $\max(\mathcal{F}_1) > \max(\mathcal{F}_2)$, and their difference is {related} to temperature changes, means that we can estimate the pixel with higher temperature better. We keep the average temperature ($\bar T$) constant in both cases. In both cases we have the maximum value of CFI matrix elements $\max(\mathcal{F}_1) =\max(\mathcal{F}_2)$ at different $\phi$ and diagonalizes the SLD for each parameter for single parameter estimation. \begin{figure*}[t] \centering \begin{tabular}{ccc} \qquad\includegraphics[width=5.2cm]{Plot_temp_3.pdf}& \includegraphics[width=5.2cm]{Plot_temp_5.pdf}& \includegraphics[width=5.2cm]{Plot_temp_7.pdf}\\ \includegraphics[width=6.0cm]{Plot_1_a_3source.pdf} & \includegraphics[width=5.5cm]{Plot_1_a_5source.pdf} & \includegraphics[width=5.5cm]{Plot_1_a_7source.pdf}\\ \includegraphics[width=6.0cm]{Plot_1_b_3source.pdf}& \includegraphics[width=5.5cm]{Plot_1_b_5source.pdf}& \includegraphics[width=5.5cm]{Plot_1_b_7source.pdf} \end{tabular} \caption{(a-c) The temperature distribution of the 1D pixels with uniform temperature (blue bars) and different temperatures (red bars) for $3,5$, and $7$ pixels of the sources from (a) to (c), respectively. The scalar CRBs (dimensionless) as a function of $\mu$ (d-f) for the number of source pixels corresponding to (a-c). The solid blue and dashed red curves describe the QCRBs, and dotted red curves and dash dotted blue curves CCRBs for uniform and random temperature configurations. The insets show the total photon number as a function of $\mu$ with a solid green line. The pixel size for (d) to (f) is 2.5 km. The figures from (g) to (j) show the scalar CRBs as a function of the source size $a$. The blue, red, and black lines correspond to different $\mu = (0.1,0.5,1.0)$, respectively. The solid lines represent the QCRBs, and dashed, dash-dotted and dotted lines the scalar CCRBs of single photon measurements with optimized unitary specific to different pixel configurations. The insets show the total photon number in the detector as a function of pixel size $a$, with the corresponding color of different $\mu$. The average temperatures are assumed to be $\bar T = 300$ K, and the sample size is set to be $N=10^6$.} \label{fig1Dpixel} \end{figure*} In Fig \ref{figtwopixel}(b), we plot $ \mathrm{Tr}({F}^{-1})/(\bar T^2)$ as a function of $\phi$ for $T_1=T_2$ (blue) and $T_1>T_2$ (red) temperature configurations. The scalar QCRBs are given by solid blue ($T_1=T_2$) and dotted red ($T_1>T_2$) flat lines, respectively. We see that for $T_1 = T_2$ (dot-dashed blue curve), we have the minimum of the scalar CCRB at $\phi = 0.5 \pi$, and for $T_1>T_2$ (dashed red curve), the minimum value is slightly shifted to the left. In both cases, the QCRBs are saturated. We see that the magnitude of scalar QCRBs for $T_1= T_2$ and $T_1 > T_2$ are close to each other if we keep the same $\bar T$ in both configurations. We also observe that $ \mathrm{Tr}(\mathcal{F}^{-1})/(\bar T^2)$ for $T_1>T_2$ (dashed red curve) at $\phi = \pi/2$ is still close to the QCRB (red dotted flat line). Even though to saturate the QCRB, $\phi$ must depend on the temperatures of all pixels, one can find the $\phi$ for $T_1 = T_2 = \bar T$ and use it to estimate different temperature configurations ($T_1 > T_2$). In Fig.~\ref{figtwopixel}(c), we compare the most informative bound for optimal $\phi$ with the CCRB of local measurement (i.e. $\mathbf{U}=\mathbb{I}$) for joint estimation of $T_1$ and $T_2$ for a single measurement. We see that the dimensionless CCRB for the local measurement (green dashed line) goes to "$\infty$" when the two sources have the same temperature. For a temperature difference around $\sim 10$ K, it is around $\sim 10^6$, which is almost $\sim 10^4$ times larger than for a optimal non-local measurement using $\mathbf{U}_{\mathrm{opt}}$ (red dotted line). We also see that the optimal unitary saturates the QCRBs (solid black line). The bounds given in Fig.~\ref{figtwopixel} are for a single measurement ($N=1$) and reduce by a factor $N$ for $N$ independent measurements. One can wonder what is the advantage of joint estimation of parameters over single parameter estimation? To answer that question, we can define the gain factor of the joint estimate \cite{nichols_multiparameter_2018,yousefjani_estimating_2017}, \begin{equation} \mathcal{R}=p \sum_i^{p} \frac{1 / F_{i i}}{\operatorname{Tr}\left(F^{-1}\right)}, \end{equation} where $p$ is the total number of the parameters we want to estimate. The $F$ stands for both the QFI matrix $\mathscr{F}$ and the CFI matrix $\mathcal{F}$. The gain factor $\mathcal{R}$ is upper bounded by $p$ ($0<\mathcal{R} \leq p$), where the factor $p$ arises from the fact that for $p$ single parameter estimations the number of samples available for each parameter is reduced by a factor $p$ compared to the total sample size, as different optimal measurements are typically required for different parameters. Since we have only two parameters to estimate ($T_1$ and $T_2$), the upper bound of the gain factor becomes $\mathcal{R} \leq 2$. If the gain factor is smaller than one, $\mathcal{R}<1$, then we do not have any advantage from joint estimation. In Fig \ref{figtwopixel}(d), we show the gain factor $\mathcal{R}$ of the estimation as a function of $\phi$. It is close to $2$ for the scalar QCRBs of $T_1 = T_2$ (solid blue) and $T_1 > T_2$ (dotted red straight lines). Furthermore, this advantage is achieved by the optimized unitary for CCRBs of $T_1= T_2$ (dot-dashed blue curve) and $T_1>T_2$ (dashed red curve), and we have almost twice the advantage compared to single parameter estimation. \\\\\\ \subsection{Resolution of 1D array of pixel sources} We next consider a 1D array of pixels aligned parallel to the detector modes on the $\hat x$ axis ($p_x=n_x$ and $p_y = n_y = 1$). The size $a$ of a pixel is the same for all pixels, and the separation between the two nearest pixels vanishes. The central position of each pixel is given by $\tilde x_j = (2j-p_x-1)a/2$, and the position of detector $k$ is $x_k =(2k-n_x-1) \Delta x_{\max}/n_x$, where $j \in \{1,...,p_x\}$ and $k \in \{1,...,n_x\}$. The parameters that we want to estimate are the temperatures of each pixel given by a vector $\bm{\theta} = \{ T_1, T_2,...T_{p_x}\}$. The unitary $\mathbf{U}$ becomes a $n_x\times n_x$ matrix, and we need $n_x^2$ real parameters. Varying independently all the parameters of $\mathbf{U}$ to find a minimum for our cost function is a difficult task. Therefore, for $n>2$, we use a steepest decent algorithm to minimize the most informative bound in Eq. (\ref{MIB}). An efficient algorithm to minimize a given cost function with an argument of the Lie group of unitary matrices $U(n)$ is proposed in Ref \cite{abrudan_conjugate_2009}. The unitary group $U(n)$ is a real Lie group of dimension $n^2$. In each iteration step, the conjugate gradient (CG) algorithm moves towards a minimum along the geodesic on the Riemannian manifold, corresponding to a straight line in Euclidean space. We explain the details of the CG algorithm adapted from Refs. \cite{abrudan_conjugate_2009,abrudan_efficient_2007,abrudan_steepest_2008,abrudan_efficient_2008} in Appendix \ref{appen}. These types of algorithms are widely used in classical communication systems. In this paper, we use the algorithm to optimize the POVM to achieve the quantum limit for imaging in passive remote sensing. We verified numerically that for our choice of the parameter set, the SLDs for different parameters commute on average over the corresponding quantum state for the $n$-mode interferometer. In Fig.~\ref{fig1Dpixel}, we analyze the QCRB and the CCRB for different numbers of source pixels $p_{x}$ (3, 5, and 7). The average temperatures are fixed to $\bar T= 300$ K for both random temperature distributions (left-red bars) and the uniform temperature distribution of the pixel sources (right-blue bars). From Figs \ref{fig1Dpixel}(d) to \ref{fig1Dpixel}(f), we show how the classical bounds from our measurement with optimized unitary change as a function of $\mu$, insets show the changes of the corresponding total photon numbers as a function of $\mu$ in each configuration. Since the total mean photon number of the detection modes (solid green lines) decreases with $\mu$ and tends to $\mathrm{Tr}(\Gamma)\ll 1$, the POVMs of single photon detections (red dotted and blue dash-dotted) saturate the QCRBs (red dashed and solid blue) for different and uniform temperature configurations, respectively. When $\mathrm{Tr}(\Gamma) $ gets close to one, we see that the gap between the QCRB and the CCRB for single photon measurement with optimized unitary ($\mathbf{U}_\mathrm{opt}$) increases. Additionally, the QCRBs decrease as the number of photons increases with $\mu$, which means more photons from each pixel increase the QFI of the parameters. Thus, one needs to perform photon-number measurements rather than just single-photon to achieve the QCRB in this limit. Increasing the number of pixels $p$ increases the total photon number on the interferometer. Thus the gap between the QCRBs and the CCRBs for measurement with optimized ($\mathbf{U}_\mathrm{opt}$) in each figure from (d) to (f) increases. In Figs \ref{fig1Dpixel}(g-j), we compare how both bounds change as a function of source size $a$ for different temperature configurations. The black, red, and blue solid lines provide the QCRBs, and dashed black, dot-dashed red, and dotted blue provide the CRBs for single photon POVMs measurement for different $\mu$ (0.1, 0.5, 1.0), respectively. Further, the insets provide the total photon numbers in the detection modes. We observe that the blue dotted lines ($\mu=0.1$) are very close to the quantum limit and almost saturate the QCRBs for each source configuration for different source sizes. Once we increase $\mu$, the gap between the two bounds increases as a function of source size $a$ due to the increased number of photons. For instance, compare the gap for black dashed lines ($\mu=1.0$) and blue dotted lines ($\mu=0.1$). This is due to the limitation of the single photon statistics for sources with total photon number greater than one ($\mathrm{Tr}(\Gamma)>1$). \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_2.pdf} \caption{The scalar CRBs (dimensionless) for different numbers of pixels $p_x$ along the $\hat x$-axis in a 1D array and $\mu = (0.05,0.1,0.5,1.0)$ for figures (a) to (d), respectively. The black triangles represent QCRBs, and red upward wedges represent the scalar CCRBs that we get using the optimized unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ specific to the actual temperature distributions of source pixels. Green downward wedges are for the unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ optimized for uniform temperature of the pixels used to estimate the actual temperature distribution with the same average temperature. Blue circles correspond to scalar CRBs for the initial random unitary before optimization. Pixel size is $a=2.5$ km, average temperature $\bar T = 300$ K, and sample size $N=10^6$.} \label{figpx} \end{figure} In general, the optimal unitary depends on the parameters (temperature distributions) we want to estimate. However, in real-life cases, we need to gain knowledge of the parameters to optimize the unitary completely. As we discuss in the section on two-pixel sources, a unitary for uniform temperature distributions can also be used to estimate different temperatures with the same $\bar T$ value. Experimentally, one can estimate the average temperature separately and construct the optimized unitary for the uniform temperature distribution ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$). One then uses it to estimate the actual non-uniform temperature distribution. Further, we examine how both bounds change as a function of the number of pixels ($p_x$). In Fig.~\ref{figpx}, we show the CCRBs for different $\mu=(0.05,0.1,0.5,1.0)$ from (a) to (d), respectively. The blue circles represent the initial random unitary for the CG algorithm. The black triangles are the scalar QCRBs. The red upward wedges are the scalar CCRBs from the optimized unitary ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$) specific to random temperature distributions of pixels. Further, the green downward wedges are for the optimized unitary for uniform temperature distributions ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$) of the pixels, used to estimate the corresponding random unitary temperature distributions with the same pixel number and the same average temperatures. The bounds from $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ (green wedges) and $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ (red wedges) are very close to each other in this logarithmic scale. Also, both almost saturate the QCRBs for $\mu = 0.05$ and $\mu=0.1$ for different $p_x$. When we raise the number of pixels ($p_x$), we see that all bounds increase. Moreover, the gap between QCRBs and CCRBs from single photon measurements becomes more significant for $\mu=0.5$ and $\mu = 1.0$ compared to $\mu = 0.1$. \subsection{Resolution of 2D sources} \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_2D_image.pdf} \caption{(a) The real image on the source plane with 30 pixels that will be estimated by using maximum likelihood estimator. (b) The reconstructed image after single photon detection in detection modes $\hat d_i $ obtained from using the optimized unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ specific to temperature distribution. (c) The reconstructed image using a unitary optimized for uniform temperature distribution $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$. (d) The reconstructed image using a local measurement of single photons considering $\mathbf{U} = \mathbb{I}$. Pixel size $a=3.0$ km, average temperature $\bar T \sim 293$ K, and sample size $N=10^8$. } \label{figimage} \end{figure} This section considers an image with a total number of pixels $p = p_x p_y$ on the image plane. The number $n$ of the modes of the 2D array interferometers will be considered the same as $p$, with $n= n_x n_y$. The size of each pixel is set to $a = 3$ km, which is around ten times smaller than the spatial resolution of SMOS considering van Cittert Zernike theorem, and the separation between the two nearest pixels is again set to zero. The parameters that we want to estimate are the temperatures of the 2D image $\bm{\theta} = \{ T_1, T_2,...T_{p}\}$. We consider the case of drastic photon losses and set $\mu=0.01$, which for $\bar T \sim 293$ K gives the total photon number around $\mathrm{Tr}(\Gamma)\simeq 0.39$. In Fig.~\ref{figimage}(a), we consider an actual image of $\hbar$ using 30 pixels on the image plane and a 30 mode interferometer on the source plane. The unitary optimized ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$) for this image or the unitary for a uniform temperatures distribution ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$) is applied in the preprocessing stage to estimate the parameters. For the classical measurement, we consider a local measurement scenario with ($\mathbf{U} = \mathbb{I}$). Further, the image from different measurement strategies is reconstructed by using a maximum likelihood estimator for a sample of size $N$. In Fig.~\ref{figimage}(b), we reconstructed the image by using $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$. We have the advantage of the non-local measurement and the optimized unitary specific to the image. The reconstructed image is close to the actual image for this parameter regime. Though this unitary depends on the parameter set, we estimate that the same resolution limit may be achieved using an adaptive type of measurements \cite{fujiwara_strong_2011} by iteratively updating the unitary for each sample after measurement. However, this is beyond the scope of this paper. On the other hand, for easy experimental realization, we reconstruct the image by using $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ in Fig.~\ref{figimage}(c). One can independently estimate the average temperature from the source distribution and construct this general unitary for any image. As we see, the reconstructed image still reveals the actual image nicely, but as expected, it is not as sharp as the image from a specifically optimized unitary. We reconstructed the image from local measurement in Fig.~\ref{figimage}(d). Clearly, this reconstructed image is not close to the original one. This is expected for our pixel size $a= 3$ km, well below the limit of the Rayleigh resolution for SMOS, which is around 35 km, based on the van Cittert Zernike theorem \cite{anterrieu_resolving_2004,corbella_visibility_2004,levine_synthetic_1999,thompson_interferometry_2017}. \section{Conclusion}\label{conclude} In summary, we formulated passive remote sensing as a quantum multi-parameter estimation problem, where we focused on the temperatures on ground as parameters rather than geometrical information of sources that are currently at the center of attention in quantum imaging, such as the separation, centroid, or phases of sources. An antenna array with as many antennas as desired pixels in the source plane receives thermal electro-magnetic radiation in receiver modes that are then mixed according to an optimized unitary transformation. Single-photon detectors detect the photons in the corresponding optimized detection modes. The function to be optimized is a scalar classical Cram\'er-Rao bound, obtained by contracting the inverse Fisher information matrix for estimating the temperatures from the photon-counting results with a positive weight matrix. With the latter one can give different preferences for high resolution to different parts of the image. The optimization of the bound over all unitary mode mixings leads to a ``most-informative bound''. For a uniform weight over all pixels we show that with this procedure one can, in the case of the Gaussian white noise characteristic of thermal states, approximatively saturate the scalar quantum Cram\'er-Rao bound based on the contraction of the quantum Fisher information matrix for the multi-parameter estimation problem with the same positive weight matrix (chosen as the identity in the present work). In principle, the optimized unitary depends on the actual temperature distribution, but we showed that the unitary obtained from a uniform temperature distribution gives still much better resolution than direct photon counting in the incoming modes. For the optimization over the unitaries we used a conjugate gradient algorithm. We showed that the found optimal mode mixing followed by single photon detection leads to a spatial resolution of the reconstructed images at least about an order of magnitude better than Rayleigh's limit (about 3\,km instead of 35\,km for an antenna array comparable with the one of SMOS, even for substantial photon losses), given in the present case by the van Cittert-Zernike theorem. The optimal unitary can be decomposed into $SU(2)$ group elements using beam splitters and phase shifters and can be realized as linear optical quantum computing. Given the recent availability of single-photon detection in the micro-wave domain, our results show a path towards substantially enhanced resolution in passive remote sensing compared to classical interferometers that essentially implement homodyne quadrature measurements. Further improvements might be possible for larger photon numbers or smaller losses if photon-number resolved measurements are available. \acknowledgements{DB and EK are grateful for support by the DFG, project number BR 5221\textbackslash3-1. We thank Gerardo Adesso for discussions, and DB thanks Yann Kerr, Bernard Roug\'e, and the entire SMOS team in Toulouse for valuable insights into that mission.} \section{Introduction} The technology of imaging is currently undergoing a rapid evolution both due to enhanced computational techniques \cite{bhandari_computational_2022}, and due to insights from quantum information processing and quantum metrology. It has become clear that the paradigmatic resolution limit found by Abbe and Rayleigh based on the interference of classical waves, set by the wavelength of the light, is not the ultimate fundamental bound if the quantum nature of light is taken into account. In quantum optics it was realized already in the 1960s in the context of the explication of the Hanbury-Brown Twiss effect \cite{hanbury_brown_test_1956,fano_quantum_1961} that fundamentally the interference of light should be considered in Hilbert space and can lead to higher order correlations that contain information beyond the first order correlations relevant for the interference patterns of classical electromagnetic waves. Experimentally, super-resolution was demonstrated by Hell in 1994 \cite{hell_breaking_1994,hell_farfield_2007}, who resolved a molecule with nanometer resolution with light in the optical domain by decoration of the molecule with point-like emitters and quenching them selectively. Theoretical work used early on the techniques of optimal parameter estimation to estimate the ultimate sensitivities of radar and in fact led to the development of quantum parameter estimation theory \cite{helstrom_detection_1967,helstrom_quantum_1969,helstrom_cramerrao_1973,helstrom_estimation_1970}. Much later, quantum parameter estimation theory was applied to determine optimal detection modes and ultimate sensitivities for arbitrary parameters encoded in the quantum state of Gaussian light \cite{pinel_ultimate_2012,pinel_quantum_2013}. In 2016, Tsang and coworkers wrote a seminal paper that considered the problem of ultimate resolution as quantum parameter estimation problem for the distance between the two sources. They found that the Quantum Fisher information (QFI) that sets the ultimate bound remains finite for two point sources of low, identical intensity in the limit of vanishing separation, whereas the classical Fisher information linked to intensity measurements in direct imaging vanishes. A large amount of theoretical \cite{tsang_quantum_2019,zhou_modern_2019,sorelli_momentbased_2021,rehacek_multiparameter_2017,napoli_superresolution_2019,nair_farfield_2016,lupo_ultimate_2016,larson_resurgence_2018,kurdzialek_superresolution_2021,kolobov_quantum_2000,ang_quantum_2017,tsang_quantum_2011,bisketzi_quantum_2019,bojer_quantitative_2021,datta_subrayleigh_2020,dealmeida_discrimination_2021,liang_coherence_2021,tsang_subdiffraction_2017,tsang_quantum_2015,karuseichyk_resolving_2022,lupo_quantum_2020,bojer_quantitative_2021,gottesman_longerbaseline_2012,khabiboulline_optical_2019,wang_superresolution_2021} and experimental research \cite{backlund_fundamental_2018,mazelanik_optical_2021,paur_achieving_2016,pushkina_superresolution_2021,boucher_spatial_2020,sorelli_optimal_2021} followed that corroborated and generalized this insight. Most of these works concentrated on estimating one or few parameters, however, typically linked to geometrical information like the spatial separation or position of point sources and, {in some cases, optical phase imaging, i.e., the joint estimation of the phases with respect to a reference mode \cite{humphreys_quantum_2013,gagatsos_gaussian_2016,knott_local_2016,pezze_optimal_2017}.} While this led to important insights and solid evidence that in many situations quantum parameter estimation techniques can enhance resolution beyond the classical diffraction limit, imaging typically aims not at recovering information about the separation, or, more generally, the spatial position, of point sources. Rather, in a typical image, the scene is covered by pixels of known locations and one wants to know for each pixel the intensity of the source in that point, its spectral composition, polarization etc. Since an image consists typically of many pixels, imaging is then inherently a (quantum-) many-parameter estimation problem, and corresponding techniques should be applied to obtain the best possible quality of an image re-construction based on the gathered measurement results. In this work we go an important step in this direction in passive remote sensing of Earth in the micro-wave domain, building on our previous work \cite{kose_quantumenhanced_2022}. {Here the state of the art is interferometric antenna synthesis, with which a large effective antenna can be formed from a set of small antennas, with corresponding enhanced resolution. For example, the SMOS (``Soil Moisture and Ocean Salinity'') satellite is an interferometer with a Y-shaped array of 69 antenna with each arm has a length of around 4 m \cite{anterrieu_resolving_2004,corbella_visibility_2004,levine_synthetic_1999,thompson_interferometry_2017}. It achieves a resolution of about $d\simeq 35$\,km, from a distance $R\simeq 758$\,km above the surface of Earth, by measuring the thermal noise in a narrow frequency band of electromagnetic fields (1420-1427 MHz, central wavelength $\lambda\simeq 21$\,cm). The electric fields are sampled in real-time, filtered and interfered numerically, implementing thus purely classical interference. The diffraction limit analogous to the ones by Abbe and Rayleigh is given here by the van Cittert-Zernike theorem \cite{vancittert_wahrscheinliche_1934,zernike_concept_1938,braun_generalization_2016}, $d\simeq\lambda R/\Delta x_{ij}$, where $\Delta x_{ij}$ is the maximal spatial separation between two antennas. From the interferometric data one can, via inverse spatial Fourier Transform, estimate the local brightness temperatures $T_\text{eff}$ on the surface of Earth with resolution $d$, and from these, with appropriate models, the soil moisture and ocean salinity. This information is of great importance for the geosciences, monitoring of Earth, climate modelling, flood predictions, and many more. Driven by these applications, there is the desire to enhance the spatial resolution, but simply increasing the size of the satellite becomes unpractical, and lowering its orbit reduces its life-time. \\ Here we show that with appropriate techniques from multiparameter quantum estimation theory, one can reconstruct images of Earth with roughly a factor of 10 times better spatial resolution than SMOS with a satellite of comparable size. We demonstrate this with images of up to 30 pixels, for which we show that they can be reconstructed faithfully with a pixel size of 3\, km. Instead of local measurement of the incoming modes of the interferometer, we combine the modes with a unitary transformation that enables non-local measurements. We find the optimal unitary matrix that minimizes the scalar classical Cramér Rao bound \cite{albarelli_perspective_2020} for the classical Fisher information matrix for the chosen measurements contracted with a weight matrix. The corresponding unitary matrix can be decomposed into phase shifters and at most $n(n-1)/2$ beam splitters, as is well-known from linear optical quantum computing \cite{kok_linear_2007}. This allows us to quantum-program optimal measurement schemes for imaging. Note that contrary to classical computational imaging \cite{bhandari_computational_2022} the quantum computation for this new kind of ``quantum-computational imaging'' is done before the measurements. Multiparameter quantum estimation theory is by itself a rapidly evolving field. Recently, there have been many different works, e.g., multiparameter estimation of several phases \cite{humphreys_quantum_2013}, estimation of all three components of a magnetic field \cite{baumgratz_quantum_2016}, optimal estimation of the Bloch vector components of a qubit \cite{bagan_optimal_2006}, multiparameter estimation from Markovian dynamics \cite{guta_information_2017}, etc. (see the review article \cite{szczykulska_multiparameter_2016}). For a limited sample size, like in passive sensing, it is crucial to simultaneously estimate the image's parameters. The multi-parameter quantum Cram\'er-Rao bound can in general not be saturated. Optimal measurement linked to different parameters do typically not commute and hence lead to incompatible measurements. Once the commutation on average is satisfied, the quantum limit is asymptotically attainable \cite{ragy_compatibility_2016}. We build on our previous work \cite{braun_generalization_2016,braun_fouriercorrelation_2018,kose_quantumenhanced_2022}, where we showed that thermal fluctuations of the microscopic currents lead to Gaussian states of the microwave field and hence allow one to use the QCRB for Gaussian states \cite{liu_quantum_2020,pinel_ultimate_2012,pinel_quantum_2013,shapiro_quantum_2009}, As before we assume that only the current densities at the surface of Earth contribute and neglect the cosmic microwave background as well as dditional technical noises \cite{oh_quantum_2021,gessner_superresolution_2020,len_resolution_2020}. {We organize the rest of the article as follows. In Section \ref{theory}, we introduce the quantum state received by the $n$-mode interferometer, as well as the quantum Fisher information (QFI), the symmetric logarithmic derivative (SLD, and the corresponding quantum Cramer Rao lower bound (QCRB). Further, we present the optimal POVM (positive-operator-valued measure), which minimizes the most informative bound for the multiparameter estimation. In Section \ref{result}, first, we discuss the simple problem as a benchmark considering two-pixel sources with the two-mode interferometer. We analyze the quantum advantage with the optimal unitary compared to local measurement scenarios. Second, we increase the number of pixels by considering a 1D array of sources with a 1D array interferometer. We examine how closely we can approache the quantum limit of sensitivity with our parameter set. Third, we consider a 2D source image with a 2D array interferometer. Using the maximum likelihood estimator, we reconstruct the image for the POVMs with the optimized unitary specific to the image, the optimized unitary for uniform temperature distribution, and local measurements. We conclude in Section \ref{conclude}.} \section{Theory} \label{theory} \subsection{The State Received by $n$-mode Interferometer} In previous work \cite{kose_quantumenhanced_2022}, we analyzed the quantum state radiated from current current distribution $\mathbf{j}(\mathbf{r},t)$ \cite{ braun_fouriercorrelation_2018,blow_continuum_1990,mandel_optical_1996,glauber_coherent_1963,scully_quantum_1999,loudon_quantum_1974,kubo_fluctuationdissipation_1966,savasta_light_2002,sharkov_passive_2011,landau_statistical_1980,carminati_nearfield_1999} on the source plane. We show that the state of the incoming modes of the $n$-mode interferometer from these radiated sources can be modeled as circularly symmetric Gaussian states with a partial coherence, which encodes the information of position and amplitudes distribution of the sources. Then after the scattering process \cite{zmuidzinas_cramer_2003,zmuidzinas_thermal_2003} from the interferometer the partially coherent state received in the $n$ modes is represented by \begin{equation} \rho=\int \text{d}^{2n}\beta \Phi(\{\beta_i\})|\{\beta_i\}\rangle\langle\{\beta_i\}|, \end{equation} where $|\{\beta_i\}\rangle$ is a multi-mode coherent state for spatial antenna modes, $\{\beta_i\} = \beta_1, \beta_2, ... \beta_n$, and \begin{equation} \Phi(\{\beta_i\})=\frac{1}{\pi^{n} \operatorname{det} \Gamma} e^{-\bar\beta^\dagger \Gamma ^{-1}\bar \beta}. \end{equation} with $\bar \beta ^T = (\beta_1, \beta_2...\beta_n )$ is the Sudarshan-Glauber representation, and $\text{d}^{2n}\beta\equiv \text{d}\Re{\beta_1}\text{d}\Im{\beta_1}\ldots \text{d}\Re{\beta_n}\text{d}\Im{\beta_n}$. The matrix $\Gamma$ is the coherence matrix for $n$ antenna modes and its elements are defined as $\Gamma_{ij} = \braket{\hat b^\dagger_i \hat b_j}$. Considering the sources of these fields are generated by random current distribution on the source plane and assuming that each antenna has the same polarization direction $\hat e_l$ and they filter incoming fields with same frequency $\omega_0$ with a bandwidth $B$, then one finds a relation between $\braket{b^\dagger_i b_j}$ and the average current density distribution on the source plane as \cite{kose_quantumenhanced_2022} \begin{equation} \begin{split} \braket{\hat b^\dagger_i \hat b_j} &=K\int d^{3} {r}\;\frac{\braket{|\tilde{{j}}_{t,l}\left(\mathbf{r},{\omega}\right)|^2}e^{i\omega_0(|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i|)/c}}{|\mathbf{r}-\mathbf{r}_i||\mathbf{r}-\mathbf{r}_j|}\\&\times\mathrm{sinc}\left[\frac{B}{2c}(|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i|)\right], \end{split} \label{eq3} \end{equation} where $d^3r$ is the integral over the source volume, $\mathbf{r}_i$ is the location of the detector for received modes in the detection plane and $\text{sinc}(x) = \sin(x)/x$. $\tilde{{j}}_{t,l}\left(\mathbf{r},{\omega}\right)$ is the Fourier transform of the locally transverse component of the current density ${\mathbf{j}}\left(\mathbf{r},t\right)$ and '$l$' stands for the component parallel to the source plane. Considering $R$ as the distance between source and detection planes, we can parametrize the integral over Earth's surface as $\mathbf{r}= (x,y,R)$ with respect to the coordinate system of the detection plane. Assuming that we are in the far field regime $|\Delta\mathbf{r}_{ij}|\ll R$, where $\Delta\mathbf{r}_{ij}= \mathbf{r}_j-\mathbf{r}_i$ is the distance between two antennas, we approximate $|\mathbf{r}-\mathbf{r}_j|-|\mathbf{r}-\mathbf{r}_i| \approx \Delta\mathbf{r}_{ij}\cdot \mathbf{r}/|\mathbf{r|}$. In the denominator, we approximate $|\mathbf{r}-\mathbf{r}_i| \approx R/\cos \tilde\theta(x,y) $ with $\tilde\theta(x,y)$ the polar angle between the $z$-axis and the vector $(x,y,R)$. We find the relation of the average amplitude of current density distribution to brightness temperature as $T_{\mathrm{B}}(x,y)$ by $\braket{|\tilde{{j}}_{t,i}\left(\mathbf{r},{\omega}\right)|^2} = K_1 T_{\mathrm{B}}(x,y)\cos\tilde \theta(x,y)\delta(z-R)$, where $K_1 = 32 \tau_c k_B /(3 l_c^3 \mu _0 c)$. Further, one can define the effective temperature as $T_{\mathrm{eff}}(x,y)\equiv T_{\mathrm{B}}(x,y) \cos^3\tilde \theta(x,y)$. We include an extra constant prefactor $\mu$ for the additional losses, which can be justified by tracing out modes of losses "$\hat c$" into which photons might scatter by writing $\hat b = \sqrt{\mu} \hat{\tilde b} + \sqrt{1-\mu} \hat c$. Compared to the actual physical temperature, the brillance temperature is additionally modified by the albedo of the surface from which important information such as the water content of the surface or the salinity of ocean water can be extracted. For simplicity we simply work with the physical temperatures in the following, i.e., set $T_B(x,y)=T(x,y)$. Following these assumptions and dropping the $\sim$ from $\hat{\tilde b} $, we simplify Eq. (\ref{eq3}) as \begin{equation} \begin{split} \braket{\hat b^\dagger_i \hat b_j}&=\frac{\mu\kappa}{R^2}\int dxdy\;T_{\mathrm{eff}}(x,y)e^{2\pi i\left(v_x^{ij}x +v_y^{ij}y \right)}, \end{split} \label{eqxi} \end{equation} We introduced a new constant $ \kappa = K_1K \equiv {2k_B}/{(\pi \hbar \omega_0)} $ where $\kappa$ has the dimension of inverse temperature with SI-units "$(1/\mathrm{K})$" and $v_y^{ij} = {\Delta x_{ij} }/({\lambda R}),\quad v_x^{ij} ={\Delta y_{ij} }/({\lambda R})$ with $\omega_0/c = 2\pi /\lambda$. Considering the parameters of SMOS we find $\kappa = 9.4 $ 1/K. The SMOS has a Y shape where each arm has a length of almost 4 m. Therefore, it is reasonable to set maximum baselines $\Delta x_{\max} = \Delta y_{\max} $ around 10 m. \begin{figure}[t!] \centering \includegraphics[width=0.99\linewidth]{img.pdf} \caption{The Gaussian state $\rho(\boldsymbol{\theta})$ of the $n$-mode interferometer contains spatial and radiometric information from current density sources. The incoming modes $\hat b_i$ are combined with an optimized $\mathbf{U}$ to have detection modes $\hat d_i$ of the photon counting measurement. For experimental realization, one can decompose $\mathbf{U}$ into $SU(2)$ group elements similar to optical quantum computing, i.e., using beam splitters and phase shifters. After the measurements, one estimates the parameter set using an estimator function such as a maximum likelihood estimator (MLE).} \label{interferometer} \end{figure} \subsection{Estimation Theory of the Sources} \label{sec2c} \textit{Quantum Cram\'er-Rao Bound:} For a quantum state $\rho_{\boldsymbol{\theta}}$ that depends on a vector of $l$ parameters $ \boldsymbol{\theta} = (\theta_1,\theta_2,...,\theta_l)^T$, an ultimate lower bound of an unbiased estimator of the parameter set is given by the quantum Cram\'er-Rao (CR) bound, which states that the co-variance matrix of any such estimator is equal or greater than the inverse of the QFI matrix (in the sense that their difference is a positive-semidefinite matrix). The classical Cram\'er-Rao bound (CCRB) from measurement is lower bounded by the quantum Cram\'er-Rao bound (QCRB) ~\cite{helstrom_quantum_1969,helstrom_detection_1967,szczykulska_multiparameter_2016} given by \begin{equation} \operatorname{Cov}(\tilde{\boldsymbol{\theta}}) \geqslant \mathscr{F}(\boldsymbol{\theta})^{-1}, \quad \mathscr{F}_{{i j}}(\boldsymbol{\theta})=\frac{1}{2} \operatorname{Tr}\left(\rho_{\boldsymbol{\theta}}\left\{\mathscr{L}_{i}, \mathscr{L}_{j}\right\}\right),\label{multi} \end{equation} where $\operatorname{Cov}(\tilde{\boldsymbol{\theta}}) $ is a covariance matrix for the locally unbiased estimator $ \tilde{\boldsymbol{\theta}}$ \cite{ragy_compatibility_2016,sidhu_geometric_2020}, the $\{\cdot,\cdot \}$ means the anti-commutator, and $\mathscr{L}_{i}$ is the symmetric logarithmic derivative (SLD) related to parameter $i$, which is defined similarly to the single-parameter case, $\frac{1}{2}\left(\mathscr{L}_{i} \rho_{\boldsymbol{\theta}}+\rho_{\boldsymbol{\theta}} \mathscr{L}_{i}\right)=\partial_{{i}} \rho_{\boldsymbol{\theta}} .$ The SLD and the elements of the QFI matrix are given in Ref.~\cite{gao_bounds_2014} for any Gaussian state. The SLD can be written as \begin{equation} \mathscr{L}_{i}=\frac{1}{2} \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right)\left(\mathbf{b}_{\alpha} \mathbf{b}_{\beta}-\Sigma^{\alpha \beta}\right), \end{equation} where the summation convention is used, and in our case, that the mean displacement of the Gaussian state is zero. Covariance matrix elements are $\Sigma_{i j}=\frac{1}{2} \operatorname{Tr}\left[\rho\left({\mathbf{b}}_i {\mathbf{b}}_j+{\mathbf{b}}_j {\mathbf{b}}_i\right)\right]$, with $\mathbf{b}=\left[b_1, b_1^{\dagger}, b_2, b_2^{\dagger}, \ldots b_n, b_n^{\dagger}\right]$ ~\cite{braun_precision_2014,adesso_continuous_2014,gao_bounds_2014,olivares_quantum_2012,pinel_ultimate_2012,weedbrook_gaussian_2012}. Then the elements of the QFI matrix in \cite{gao_bounds_2014} become \begin{equation} \mathscr{F}_{i j}=\frac{1}{2} \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1} \partial_{j} \Sigma^{\alpha \beta} \partial_{i} \Sigma^{\gamma \delta}, \end{equation} where $\mathfrak{M} \equiv \Sigma \otimes \Sigma+\frac{1}{4}\Omega \otimes \Omega$, and $\Omega=\bigoplus_{k=1}^{n} i \sigma_{y}$. Using the properties of the Gaussian state (circularly symmetric and with zero mean) we can write the SLD for $n$ mode interferometers as \cite{kose_quantumenhanced_2022} \begin{equation} \begin{split} \mathscr{L}_{i} = \sum_j^n g^{j}_i \hat{b}^\dagger _j \hat{b}_j + \sum _{j<k}^n (g^{jk}_i\hat{b}^\dagger _j \hat{b}_k + (g^{jk}_{i})^*\hat{b}^\dagger _k \hat{b}_j) +\mathrm{C}, \end{split} \label{eq:Sld} \end{equation} where C is a constant term that can be dropped for diagonalization purposes. In the single parameter case, the optimal POVM is the set of projectors onto eigenstates of $\mathscr{L}_i$. It allows one to saturate the QCRB in the limit of infinitely many measurements using maximum likelihood estimation \cite{helstrom_detection_1967,braunstein_statistical_1994,paris_quantum_2009}. To find the POVMs from the SLD, we construct a Hermitian matrix $\mathbf{M}_i$ whose diagonal elements are real-valued functions which are defined as $g^{j}_i \equiv \mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right) $ with $\alpha = 2j$ and $\beta = 2j-1$. The off-diagonal elements are complex-valued functions and defined as $g^{jk}_i =\mathfrak{M}_{\alpha \beta, \gamma \delta}^{-1}\left(\partial_{i} \Sigma^{\gamma \delta}\right) $ with $\alpha = 2j$ and $\beta = 2k-1$ and $k>j$. By introducing a new set for the field operators such that, $\bar{\mathbf{b}}^\dagger \equiv {\left[\hat b_1^\dagger, \hat b_2^\dagger, ..., \hat b_n^\dagger\right]}$ and $\bar{\mathbf{b}} \equiv {\left[ \hat b_1, \hat b_2, ..., \hat b_n\right]^T}$, we write the SLD in the following form \begin{equation} \begin{split} \mathscr{L}_{i} = \bar{\mathbf{b}}^\dagger \mathbf{M}_i \bar{\mathbf{b}}. \end{split} \end{equation} As $\mathbf{M}_i$ is a Hermitian matrix it can be unitarily diagonalized by $\mathbf{M}_i =\mathbf{V}^\dagger_i \mathbf{D}_i \mathbf{V}_i $ with $\mathbf{V}_i^\dagger \mathbf{V}_i = \mathbb{I}$. A new set of operators can be defined as $\bar{\mathbf{d}}_i^\dagger = \bar{\mathbf{b}}^\dagger \mathbf{V}_i^\dagger$ where $\bar{\mathbf{d}}_i^\dagger = {\left[\hat d_{i1}^\dagger, \hat d_{i2}^\dagger, ..., \hat d_{in}^\dagger\right]}$. The optimal POVM for the single parameter case ($i=1$, which we drop in the following) can be found as a set of projectors in the Fock basis $\{\ket{m_1,m_2,...,m_n}\bra{m_1,m_2,...,m_n}\}_{\{m_1,m_2...m_n\}}$ of the $\hat d_l $ with $\hat d^\dagger_l \hat d_l\ket{m_1,m_2,...,m_n} = m_l\ket{m_1,m_2,...,m_n}$, where $l\in \{1,...,n\}$. The $\hat{d}_l$ will be called "detection modes." {By introducing a positive weight matrix $\boldsymbol{w}$, one can define the scalar inequalities from the matrix valued QCRB as $\operatorname{Tr}(\boldsymbol{w}\operatorname{Cov}(\tilde{\boldsymbol{\theta}})) \geqslant \operatorname{Tr}(\boldsymbol{w}\mathscr{F}(\boldsymbol{\theta})^{-1}) \equiv C^S(\boldsymbol{\theta},\boldsymbol{w})$. Contrary to the single parameter case, the multiparameter QCRB can generally not be saturated. Holevo realized this problem and proposed a tighter and more fundamental bound \cite{holevo_statistical_1973} $C^H(\boldsymbol{\theta},\boldsymbol{w})$, which is upper bounded by $2C^S(\boldsymbol{\theta},\boldsymbol{w})$ \cite{tsang_quantum_2020,albarelli_perspective_2020}. If the SLD operators for different parameters commute on average $\operatorname{Tr}(\rho_{\boldsymbol{\theta}}[L_i, L_j])=0$, then the Holevo-CRB is equivalent to the QCRB, and the QCRB for multiparameter estimation can be saturated asymptotically with a collective measurement in the limit of an infinitely large number of copies $\rho_{\boldsymbol{\theta}}^{\otimes{N}}$ \cite{ragy_compatibility_2016,albarelli_perspective_2020}.} The standard deviation of the estimator decreases proportionally to $1/\sqrt{{N}}$ for the sample size of ${N}$. The SMOS satellite travels at a constant speed of around $v\simeq 7$ km/s. It takes time $\tau = L/v$ to fly at a distance $L$. Each sample has a lower bound for the detection time given by $t_D\simeq 1/B $. In practice, the practical detection time might be much larger due to, e.g.~deadtimes of the sensors, slow electronics, etc. In addition, zero temperature of the detector and modes $\hat b_i$ is implicitly assumed in our calculations but would require cooling down to temperatures much smaller than $\hbar \omega_0$. If the actual detection time is $t_D^\text{eff}$, the maximum sample size becomes ${N}=\tau/t_D^\text{eff}$. \textit{Most Informative Bound for Multiparameter Metrology:} The most informative bound minimizes the classical scalar Cramer Rao bound over all the possible POVMs. In the single parameter case, from the diagonalization of the SLD, we see that one needs to combine the incoming modes with a unitary transformation to saturate the QCRB single parameter case. This transformation, even for a single parameter, depends on the parameter itself. In the multiparameter case, any of these specific unitary transformations for a specific parameter usually gives a more significant mean square error for the remaining parameters. Using the clue from the SLD structure, we drop the index "$i$" from the unitary transformation of the modes and minimize the scalar bound of the classical Fisher information matrix for multiparameter estimation over all possible unitaries. Then, a new set of operators for the detection modes can be defined as $\bar{\mathbf{d}} =\mathbf{U} \bar{\mathbf{b}} $ where $\bar{\mathbf{d}}^T = {\left[\hat d_{1}, \hat d_{2}, ..., \hat d_{n}\right]}$, where $\mathbf{U}$ is the corresponding unitary transformation of the field modes. The average values of the elements of the new coherence matrix $\tilde \Gamma$ can be found by using $\hat d_i = \sum_l U_{il} \hat b_l $ as \begin{equation} \tilde \Gamma_{ij}= \langle d_i^{\dagger} d_j \rangle = \sum_{kl} U^*_{ik}U_{jl}\langle b_k^{\dagger} b_l \rangle. \end{equation} Then we will have the probabilities after measurement $P(m_1,..m_n| \theta_1,\theta_2,...,\theta_l) $ as \begin{equation} \begin{split} P(\{m_k\}| \boldsymbol{\theta})&=\int \text{d}^{2n} {\delta} \tilde \Phi(\{\delta_i\}) |\langle \{m_k\}|\{\delta_i\}\rangle|^2 ,\\&=\int \text{d}^{2n} {\delta} \tilde \Phi(\{\delta_i\}) \prod_i e^{-|\delta_i|^2}\frac{|\delta_i|^{2m_i}}{m_i!}. \end{split} \end{equation} where $|\{\delta_i\}\rangle $ is a coherent state of the detection modes and $ \tilde \Phi(\{\delta_i\})$ is the Sudarshan-Glauber function for the state of the detection modes. Due to the linear transformation from $\bar{ \mathbf{b}}$ to $\bar {\mathbf{d}}$ it is still a Gaussian. It is difficult to evaluate the integral of $P(\{m_k\}| \boldsymbol{\theta})$ for all possible values of $m_k$ and keep track of all possible combinations of photon number counts, both numerically and experimentally. Hence, instead of considering projections on the complete Fock basis as POVMs, we choose the POVMs with at most one photon per measurement and limit ourselves to $\sum_k m_k\leq 1 $. Clearly, the resulting information loss is negligible for light that from the very beginning is very faint, with at most one photon per mode, but can be important for stronger light sources, for which one should try to resolve the photon numbers. For thermal microwave sources at room temperature, we have of the order of 10 photons per mode. We see below that even without resolving their number we can already largely surpass the classical resolution limit, but there is room for further improvement by going beyond the single-photon detection scheme that we analyse in the following.\\ The selected POVM elements of single photon detection are \begin{equation} \begin{split} &\Pi_0 = \ket{0,0,...,0}\bra{0,0,...,0}, \\ &\Pi_k = \ket{0,0,...,1_k,...,0}\bra{0,0,...,1_k,...,0}, \\ &\Pi_{n+1} = \mathbb{I}-\sum_{l=0}^{n}\Pi_l, \end{split} \end{equation} where the last element ($n+1$) ensures $\sum_{l=0}^{n+1} \Pi_l = \mathbb{I}$. The measurement probability of no photon in any interferometer mode becomes \begin{equation} \begin{split} P_0(\boldsymbol{\theta}) &=\frac{1}{\pi^{n} \operatorname{det} \tilde \Gamma}\int \text{d}^{2n} {\delta} e^{-\boldsymbol{\delta}^\dagger (\tilde \Gamma^{-1} +\mathbb{I})\boldsymbol{\delta}}\\ &= \frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}. \end{split} \label{eq:13} \end{equation} The single photon detection probabilities in each mode of the interferometer follow as \begin{equation} \begin{split} P_k(\boldsymbol{\theta}) &=\frac{1}{\pi^{n} \operatorname{det} \tilde \Gamma}\int \text{d}^{2n} {\delta} e^{-\boldsymbol{\delta}^\dagger (\tilde \Gamma^{-1} +\mathbb{I})\boldsymbol{\delta}}|\delta_k|^2\\ &= \frac{[(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk}}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}. \end{split} \label{eq:14} \end{equation} The probability to find more than a single photon per measurement, can be found as \begin{equation} P_{n+1}(\boldsymbol{\theta}) = \mathbb{I}-\sum_{k=0}^{n}P_k. \end{equation} We also show the first derivative of the probability distributions of no photon detection from measurements analytically to be given by \begin{equation} \begin{split} \frac{\partial P_0(\boldsymbol{\theta})}{\partial \theta_i} &= \left(\frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}\right) \operatorname{Tr}\left(-(\tilde \Gamma +\mathbb{I})^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\right). \end{split} \label{eq:15} \end{equation} The first derivative for at most single photon detection for all modes becomes \begin{equation} \begin{split} \frac{\partial P_k(\boldsymbol{\theta})}{\partial \theta_i} &= \left(\frac{1}{\operatorname{det} (\tilde \Gamma +\mathbb{I})}\right)\\&\times\left[{[(\tilde \Gamma^{-1} +\mathbb{I})^{-1}\tilde \Gamma^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\tilde \Gamma^{-1}(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk}}\right. \\&- \left. [(\tilde \Gamma^{-1} +\mathbb{I})^{-1}]_{kk} \operatorname{Tr}\left((\tilde \Gamma +\mathbb{I})^{-1}\frac{\partial \tilde \Gamma }{\partial \theta_i}\right)\right] . \end{split} \label{eq:17} \end{equation} Finally, using all Eqs. (\ref{eq:13}-\ref{eq:17}), the elements of the classical Fisher information can be found from \begin{equation} \mathcal{F}_{ij} = \sum_l^{n+1} \frac{1}{P_l(\boldsymbol{\theta})} \frac{\partial P_l(\boldsymbol{\theta})}{\partial \theta_i} \frac{\partial P_l(\boldsymbol{\theta})}{\partial \theta_j} . \label{cFI} \end{equation} The most informative bound \cite{albarelli_perspective_2020} in this case is the bound minimized over all possible unitary matrices \begin{equation} \operatorname{Tr}\left[\boldsymbol{w}\operatorname{Cov}(\tilde{\boldsymbol{\theta}})\right] \geq \min _{\mathbf {U }}\left[\operatorname{Tr}\left[\boldsymbol{w} \mathcal{F}^{-1}(\boldsymbol{\theta})\right]\right]. \label{MIB} \end{equation} For simplicity, we will consider $\boldsymbol{w} = \mathbb{I}$. \textit{Maximum Likelihood Estimation:} Maximum likelihood estimators are widely used in estimation theory and play an essential role in interpreting the Cramér-Rao theorem \cite{myung_tutorial_2003,paris_quantum_2004}. One can estimate the set of parameters with a given probability distribution with some observed data. The likelihood function is given by $l(\boldsymbol{\theta}) = \prod_k ^{n+1} (P_k(\boldsymbol{\theta}))^{N_k} $, where the total number of samples is given by $N = \sum_k^{n+1} N_k$ with $N_k$ realizations of outcome $k$. Since the logarithm is a monotonously increasing function, the log of the likelihood function is maximized by the same parameter vector $\boldsymbol{\theta}$. Thus, the maximum likelihood estimator (MLE) $\boldsymbol{\hat\theta}_{\mathrm{mle}}$ is a value of $\boldsymbol{\theta}$ that maximizes the log-likelihood $\mathcal{L}(\boldsymbol{\theta})= \log (l(\boldsymbol{\theta}))$, \begin{equation} \boldsymbol{\hat{\theta}}_{\text {mle }}=\underset{\boldsymbol{\theta} \in \Theta}{\arg \max } \mathcal{L}(\boldsymbol{\theta}), \end{equation} where the max is taken over the entire parameter space $\Theta$. For sufficiently large sample size, $N\rightarrow \infty$, $\boldsymbol{\hat{\theta}}_{\text {mle }}$ converges to the true value of the parameter set $\boldsymbol{\theta}$. \section{Results: Estimation of source temperatures} \label{result} We partition the source of the electromagnetic field on the surface of Earth into square pixels of size $a$ and effective pixel temperature $T_i$, located under the interferometer in the $x,y$ plane at distance $R$ from the satellite. We are interested in estimating the temperature distribution \begin{equation} T_{\mathrm{eff}}(x,y)= \sum_i T_i \mathrm{Box}(x-x_i,y-y_i), \end{equation} where $\mathrm{Box}(x,y)$ is defined as \begin{equation} \operatorname{Box}(x, y) \triangleq \begin{cases}1 & |x|\leq \frac{a}{2}\quad \mathrm{and} \quad|y|\leq \frac{a}{2}\\ 0 & \mathrm{else}\end{cases}. \end{equation} We assume that all the other parameters are known to sufficiently large precision. The diagonal elements of the coherence matrix ($\Gamma$) of Gaussian states becomes \begin{equation} \langle \hat b_k^\dagger \hat b_k \rangle = \frac{\mu\kappa a^2 }{R^2} \sum_i^p T_i, \end{equation} and the off-diagonal elements are \begin{equation} \begin{split} \langle \hat b_k^\dagger \hat b _l \rangle =& \frac{\mu\kappa a^2 \eta_{kl} }{R^{2}} \sum_i^p T_i e^{2 \pi i\left(v^{x}_{kl} x_i+v^{y}_{kl} y_i\right)}, \end{split} \end{equation} where $k\neq l$ and we defined $\eta_{kl} \equiv\operatorname{sinc}(v^{x}_{kl}a)\operatorname{sinc}(v^{y}_{kl}a) $. The number of pixels along the $\hat x $ and $\hat y$ axis is $p_x$ and $p_y$, respectively, and the number of detection modes along these axes $n_x$ and $n_y$, respectively. In total, we have $p = p_xp_y$ pixels on the surface and $n = n_xn_y$ detectors in the detection plane of which each measures one detection mode. We set the number of detection modes equal to the number of pixels in the source plane, $n=p$, to leave no redundant parameter for the estimation, and use $n_x=p_x$ and $n_y=p_y$. \subsection{Resolution of two pixel sources} Let us start with two pixels (pixel-1 and pixel-2) with temperatures $T_1$ and $T_2$ in the source plane with pixel size $a$. Our goal is to estimate the temperatures of each source. We set the central locations of these two sources in the source plane to $(-a/2,0,R)$ and $(a/2,0,R)$, i.e.~both are on an axis parallel to the $\hat x$-axis without any distance between them. In the detection plane, we have two detection modes $\hat d_1$ and $\hat d_2$ with detectors centered at positions $(-\Delta x/2,0,0)$ and $(\Delta x /2,0,0)$ on the $\hat x$-axis, respectively. In our previous work \cite{kose_quantumenhanced_2022}, we showed that if the mean photon numbers in each received mode of the two-mode interferometer, with circular symmetric Gaussian state, are identical ($\langle b_1^\dagger b_1\rangle = \langle b_2^\dagger b_2\rangle$), then the SLDs for $T_1$ and $T_2$ commute on average $\operatorname{Tr}(\rho_{\boldsymbol{\theta}}[L_i, L_j])=0$. Thus the QCRB and Holevo-CRB are equivalent $C^S(\boldsymbol{\theta},\boldsymbol{w})\equiv C^H(\boldsymbol{\theta},\boldsymbol{w})$. For each parameter, the matrix $\mathbf{M}_i$ from the SLD with $i\in \{T_1,T_2\}$, is of the form \begin{equation} \mathbf{M}_i=\left[\begin{array}{cccc} g_{1}^i & |g_{2}^{i}| e^{i\phi_i} \\ |g_{2}^{i}| e^{-i\phi_i} & g_{1}^i \end{array}\right], \end{equation} where the $\phi_i$, in general, depend on both $T_1$ and $T_2$. The $\phi_{1}$ and $\phi_{2}$ differ for single parameter estimation of $T_1 $ and $T_2$. The unitary that diagonalizes each SLD is found as \begin{equation} \mathbf{U}_i=\frac{1}{\sqrt{2}}\left[\begin{array}{cc} 1 & e^{i \phi_i} \\ 1 & -e^{i \phi_i} \end{array}\right]. \end{equation} Since the unitary is parametrized with a single parameter, we can drop the index $i$ and find the $\phi$ that gives the most informative bound for joint estimation of both $T_1$ and $T_2$. \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_1aa.pdf} \caption{Temperature estimation of two pixels. (a) The diagonal elements of the Fisher information matrix (dimensionless) as a function of $\phi$. The dashed curves are for $\mathcal{F}_{T_1}$, solid curves are for $\mathcal{F}_{T_2}$. (b) The scalar CRBs as a function of $\phi$ scaled with the average temperature $\bar T$ square of the sources. The flat lines are for the QCRBs, the others are the CCRBs for the measurement. (c) The scalar CRBs as a function of temperature difference of two pixels. Solid black is for QCRB, red dotted is for CCRB for optimized $\phi$, and green dashed curve is for the scalar CCRB for local measurement considering $\mathbf{U} = \mathbb{I}$. (d) The gain factor of the estimate $\mathcal{R}$ as function of $\phi$. The flat lines are from the QCRBs, the others are the CCRBs from the measurement. In figures (a), (b), and (d), the blue curves are for uniform temperature, $T_1 = T_2 = 300$ K and red curves are for non-uniform temperatures, $T_1 = 400$ K and $T_2 = 200$ K. The source size is $a=4$ km. The average temperature in all figures is $\bar T=300$ K and $\mu = 0.5$.} \label{figtwopixel} \end{figure} In Fig.~\ref{figtwopixel}(a), we plot the diagonal elements of the CFI matrix in Eq. (\ref{cFI}) as a function of $\phi$. If $T_1$ (dashed) and $T_2$ (solid) are equal, $T_1 =T_2$ (blue lines), a diagonal element $\mathcal{F}_1 $ or $\mathcal{F}_2$, can be obtained by mirroring the other with respect to $\phi=\pi/2$. For different temperatures, $T_1 > T_2$ (red lines), the CFI matrix elements are not symmetric anymore. We observe that $\max(\mathcal{F}_1) > \max(\mathcal{F}_2)$, and their difference is {related} to temperature changes, means that we can estimate the pixel with higher temperature better. We keep the average temperature ($\bar T$) constant in both cases. In both cases we have the maximum value of CFI matrix elements $\max(\mathcal{F}_1) =\max(\mathcal{F}_2)$ at different $\phi$ and diagonalizes the SLD for each parameter for single parameter estimation. \begin{figure*}[t] \centering \begin{tabular}{ccc} \qquad\includegraphics[width=5.2cm]{Plot_temp_3.pdf}& \includegraphics[width=5.2cm]{Plot_temp_5.pdf}& \includegraphics[width=5.2cm]{Plot_temp_7.pdf}\\ \includegraphics[width=6.0cm]{Plot_1_a_3source.pdf} & \includegraphics[width=5.5cm]{Plot_1_a_5source.pdf} & \includegraphics[width=5.5cm]{Plot_1_a_7source.pdf}\\ \includegraphics[width=6.0cm]{Plot_1_b_3source.pdf}& \includegraphics[width=5.5cm]{Plot_1_b_5source.pdf}& \includegraphics[width=5.5cm]{Plot_1_b_7source.pdf} \end{tabular} \caption{(a-c) The temperature distribution of the 1D pixels with uniform temperature (blue bars) and different temperatures (red bars) for $3,5$, and $7$ pixels of the sources from (a) to (c), respectively. The scalar CRBs (dimensionless) as a function of $\mu$ (d-f) for the number of source pixels corresponding to (a-c). The solid blue and dashed red curves describe the QCRBs, and dotted red curves and dash dotted blue curves CCRBs for uniform and random temperature configurations. The insets show the total photon number as a function of $\mu$ with a solid green line. The pixel size for (d) to (f) is 2.5 km. The figures from (g) to (j) show the scalar CRBs as a function of the source size $a$. The blue, red, and black lines correspond to different $\mu = (0.1,0.5,1.0)$, respectively. The solid lines represent the QCRBs, and dashed, dash-dotted and dotted lines the scalar CCRBs of single photon measurements with optimized unitary specific to different pixel configurations. The insets show the total photon number in the detector as a function of pixel size $a$, with the corresponding color of different $\mu$. The average temperatures are assumed to be $\bar T = 300$ K, and the sample size is set to be $N=10^6$.} \label{fig1Dpixel} \end{figure*} In Fig \ref{figtwopixel}(b), we plot $ \mathrm{Tr}({F}^{-1})/(\bar T^2)$ as a function of $\phi$ for $T_1=T_2$ (blue) and $T_1>T_2$ (red) temperature configurations. The scalar QCRBs are given by solid blue ($T_1=T_2$) and dotted red ($T_1>T_2$) flat lines, respectively. We see that for $T_1 = T_2$ (dot-dashed blue curve), we have the minimum of the scalar CCRB at $\phi = 0.5 \pi$, and for $T_1>T_2$ (dashed red curve), the minimum value is slightly shifted to the left. In both cases, the QCRBs are saturated. We see that the magnitude of scalar QCRBs for $T_1= T_2$ and $T_1 > T_2$ are close to each other if we keep the same $\bar T$ in both configurations. We also observe that $ \mathrm{Tr}(\mathcal{F}^{-1})/(\bar T^2)$ for $T_1>T_2$ (dashed red curve) at $\phi = \pi/2$ is still close to the QCRB (red dotted flat line). Even though to saturate the QCRB, $\phi$ must depend on the temperatures of all pixels, one can find the $\phi$ for $T_1 = T_2 = \bar T$ and use it to estimate different temperature configurations ($T_1 > T_2$). In Fig.~\ref{figtwopixel}(c), we compare the most informative bound for optimal $\phi$ with the CCRB of local measurement (i.e. $\mathbf{U}=\mathbb{I}$) for joint estimation of $T_1$ and $T_2$ for a single measurement. We see that the dimensionless CCRB for the local measurement (green dashed line) goes to "$\infty$" when the two sources have the same temperature. For a temperature difference around $\sim 10$ K, it is around $\sim 10^6$, which is almost $\sim 10^4$ times larger than for a optimal non-local measurement using $\mathbf{U}_{\mathrm{opt}}$ (red dotted line). We also see that the optimal unitary saturates the QCRBs (solid black line). The bounds given in Fig.~\ref{figtwopixel} are for a single measurement ($N=1$) and reduce by a factor $N$ for $N$ independent measurements. One can wonder what is the advantage of joint estimation of parameters over single parameter estimation? To answer that question, we can define the gain factor of the joint estimate \cite{nichols_multiparameter_2018,yousefjani_estimating_2017}, \begin{equation} \mathcal{R}=p \sum_i^{p} \frac{1 / F_{i i}}{\operatorname{Tr}\left(F^{-1}\right)}, \end{equation} where $p$ is the total number of the parameters we want to estimate. The $F$ stands for both the QFI matrix $\mathscr{F}$ and the CFI matrix $\mathcal{F}$. The gain factor $\mathcal{R}$ is upper bounded by $p$ ($0<\mathcal{R} \leq p$), where the factor $p$ arises from the fact that for $p$ single parameter estimations the number of samples available for each parameter is reduced by a factor $p$ compared to the total sample size, as different optimal measurements are typically required for different parameters. Since we have only two parameters to estimate ($T_1$ and $T_2$), the upper bound of the gain factor becomes $\mathcal{R} \leq 2$. If the gain factor is smaller than one, $\mathcal{R}<1$, then we do not have any advantage from joint estimation. In Fig \ref{figtwopixel}(d), we show the gain factor $\mathcal{R}$ of the estimation as a function of $\phi$. It is close to $2$ for the scalar QCRBs of $T_1 = T_2$ (solid blue) and $T_1 > T_2$ (dotted red straight lines). Furthermore, this advantage is achieved by the optimized unitary for CCRBs of $T_1= T_2$ (dot-dashed blue curve) and $T_1>T_2$ (dashed red curve), and we have almost twice the advantage compared to single parameter estimation. \\\\\\ \subsection{Resolution of 1D array of pixel sources} We next consider a 1D array of pixels aligned parallel to the detector modes on the $\hat x$ axis ($p_x=n_x$ and $p_y = n_y = 1$). The size $a$ of a pixel is the same for all pixels, and the separation between the two nearest pixels vanishes. The central position of each pixel is given by $\tilde x_j = (2j-p_x-1)a/2$, and the position of detector $k$ is $x_k =(2k-n_x-1) \Delta x_{\max}/n_x$, where $j \in \{1,...,p_x\}$ and $k \in \{1,...,n_x\}$. The parameters that we want to estimate are the temperatures of each pixel given by a vector $\bm{\theta} = \{ T_1, T_2,...T_{p_x}\}$. The unitary $\mathbf{U}$ becomes a $n_x\times n_x$ matrix, and we need $n_x^2$ real parameters. Varying independently all the parameters of $\mathbf{U}$ to find a minimum for our cost function is a difficult task. Therefore, for $n>2$, we use a steepest decent algorithm to minimize the most informative bound in Eq. (\ref{MIB}). An efficient algorithm to minimize a given cost function with an argument of the Lie group of unitary matrices $U(n)$ is proposed in Ref \cite{abrudan_conjugate_2009}. The unitary group $U(n)$ is a real Lie group of dimension $n^2$. In each iteration step, the conjugate gradient (CG) algorithm moves towards a minimum along the geodesic on the Riemannian manifold, corresponding to a straight line in Euclidean space. We explain the details of the CG algorithm adapted from Refs. \cite{abrudan_conjugate_2009,abrudan_efficient_2007,abrudan_steepest_2008,abrudan_efficient_2008} in Appendix \ref{appen}. These types of algorithms are widely used in classical communication systems. In this paper, we use the algorithm to optimize the POVM to achieve the quantum limit for imaging in passive remote sensing. We verified numerically that for our choice of the parameter set, the SLDs for different parameters commute on average over the corresponding quantum state for the $n$-mode interferometer. In Fig.~\ref{fig1Dpixel}, we analyze the QCRB and the CCRB for different numbers of source pixels $p_{x}$ (3, 5, and 7). The average temperatures are fixed to $\bar T= 300$ K for both random temperature distributions (left-red bars) and the uniform temperature distribution of the pixel sources (right-blue bars). From Figs \ref{fig1Dpixel}(d) to \ref{fig1Dpixel}(f), we show how the classical bounds from our measurement with optimized unitary change as a function of $\mu$, insets show the changes of the corresponding total photon numbers as a function of $\mu$ in each configuration. Since the total mean photon number of the detection modes (solid green lines) decreases with $\mu$ and tends to $\mathrm{Tr}(\Gamma)\ll 1$, the POVMs of single photon detections (red dotted and blue dash-dotted) saturate the QCRBs (red dashed and solid blue) for different and uniform temperature configurations, respectively. When $\mathrm{Tr}(\Gamma) $ gets close to one, we see that the gap between the QCRB and the CCRB for single photon measurement with optimized unitary ($\mathbf{U}_\mathrm{opt}$) increases. Additionally, the QCRBs decrease as the number of photons increases with $\mu$, which means more photons from each pixel increase the QFI of the parameters. Thus, one needs to perform photon-number measurements rather than just single-photon to achieve the QCRB in this limit. Increasing the number of pixels $p$ increases the total photon number on the interferometer. Thus the gap between the QCRBs and the CCRBs for measurement with optimized ($\mathbf{U}_\mathrm{opt}$) in each figure from (d) to (f) increases. In Figs \ref{fig1Dpixel}(g-j), we compare how both bounds change as a function of source size $a$ for different temperature configurations. The black, red, and blue solid lines provide the QCRBs, and dashed black, dot-dashed red, and dotted blue provide the CRBs for single photon POVMs measurement for different $\mu$ (0.1, 0.5, 1.0), respectively. Further, the insets provide the total photon numbers in the detection modes. We observe that the blue dotted lines ($\mu=0.1$) are very close to the quantum limit and almost saturate the QCRBs for each source configuration for different source sizes. Once we increase $\mu$, the gap between the two bounds increases as a function of source size $a$ due to the increased number of photons. For instance, compare the gap for black dashed lines ($\mu=1.0$) and blue dotted lines ($\mu=0.1$). This is due to the limitation of the single photon statistics for sources with total photon number greater than one ($\mathrm{Tr}(\Gamma)>1$). \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_2.pdf} \caption{The scalar CRBs (dimensionless) for different numbers of pixels $p_x$ along the $\hat x$-axis in a 1D array and $\mu = (0.05,0.1,0.5,1.0)$ for figures (a) to (d), respectively. The black triangles represent QCRBs, and red upward wedges represent the scalar CCRBs that we get using the optimized unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ specific to the actual temperature distributions of source pixels. Green downward wedges are for the unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ optimized for uniform temperature of the pixels used to estimate the actual temperature distribution with the same average temperature. Blue circles correspond to scalar CRBs for the initial random unitary before optimization. Pixel size is $a=2.5$ km, average temperature $\bar T = 300$ K, and sample size $N=10^6$.} \label{figpx} \end{figure} In general, the optimal unitary depends on the parameters (temperature distributions) we want to estimate. However, in real-life cases, we need to gain knowledge of the parameters to optimize the unitary completely. As we discuss in the section on two-pixel sources, a unitary for uniform temperature distributions can also be used to estimate different temperatures with the same $\bar T$ value. Experimentally, one can estimate the average temperature separately and construct the optimized unitary for the uniform temperature distribution ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$). One then uses it to estimate the actual non-uniform temperature distribution. Further, we examine how both bounds change as a function of the number of pixels ($p_x$). In Fig.~\ref{figpx}, we show the CCRBs for different $\mu=(0.05,0.1,0.5,1.0)$ from (a) to (d), respectively. The blue circles represent the initial random unitary for the CG algorithm. The black triangles are the scalar QCRBs. The red upward wedges are the scalar CCRBs from the optimized unitary ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$) specific to random temperature distributions of pixels. Further, the green downward wedges are for the optimized unitary for uniform temperature distributions ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$) of the pixels, used to estimate the corresponding random unitary temperature distributions with the same pixel number and the same average temperatures. The bounds from $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ (green wedges) and $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ (red wedges) are very close to each other in this logarithmic scale. Also, both almost saturate the QCRBs for $\mu = 0.05$ and $\mu=0.1$ for different $p_x$. When we raise the number of pixels ($p_x$), we see that all bounds increase. Moreover, the gap between QCRBs and CCRBs from single photon measurements becomes more significant for $\mu=0.5$ and $\mu = 1.0$ compared to $\mu = 0.1$. \subsection{Resolution of 2D sources} \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{Plot_2D_image.pdf} \caption{(a) The real image on the source plane with 30 pixels that will be estimated by using maximum likelihood estimator. (b) The reconstructed image after single photon detection in detection modes $\hat d_i $ obtained from using the optimized unitary $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$ specific to temperature distribution. (c) The reconstructed image using a unitary optimized for uniform temperature distribution $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$. (d) The reconstructed image using a local measurement of single photons considering $\mathbf{U} = \mathbb{I}$. Pixel size $a=3.0$ km, average temperature $\bar T \sim 293$ K, and sample size $N=10^8$. } \label{figimage} \end{figure} This section considers an image with a total number of pixels $p = p_x p_y$ on the image plane. The number $n$ of the modes of the 2D array interferometers will be considered the same as $p$, with $n= n_x n_y$. The size of each pixel is set to $a = 3$ km, which is around ten times smaller than the spatial resolution of SMOS considering van Cittert Zernike theorem, and the separation between the two nearest pixels is again set to zero. The parameters that we want to estimate are the temperatures of the 2D image $\bm{\theta} = \{ T_1, T_2,...T_{p}\}$. We consider the case of drastic photon losses and set $\mu=0.01$, which for $\bar T \sim 293$ K gives the total photon number around $\mathrm{Tr}(\Gamma)\simeq 0.39$. In Fig.~\ref{figimage}(a), we consider an actual image of $\hbar$ using 30 pixels on the image plane and a 30 mode interferometer on the source plane. The unitary optimized ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$) for this image or the unitary for a uniform temperatures distribution ($\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$) is applied in the preprocessing stage to estimate the parameters. For the classical measurement, we consider a local measurement scenario with ($\mathbf{U} = \mathbb{I}$). Further, the image from different measurement strategies is reconstructed by using a maximum likelihood estimator for a sample of size $N$. In Fig.~\ref{figimage}(b), we reconstructed the image by using $\mathbf{U}_{\mathrm{opt}}^{\mathrm{image}}$. We have the advantage of the non-local measurement and the optimized unitary specific to the image. The reconstructed image is close to the actual image for this parameter regime. Though this unitary depends on the parameter set, we estimate that the same resolution limit may be achieved using an adaptive type of measurements \cite{fujiwara_strong_2011} by iteratively updating the unitary for each sample after measurement. However, this is beyond the scope of this paper. On the other hand, for easy experimental realization, we reconstruct the image by using $\mathbf{U}_{\mathrm{opt}}^{\mathrm{uniform}}$ in Fig.~\ref{figimage}(c). One can independently estimate the average temperature from the source distribution and construct this general unitary for any image. As we see, the reconstructed image still reveals the actual image nicely, but as expected, it is not as sharp as the image from a specifically optimized unitary. We reconstructed the image from local measurement in Fig.~\ref{figimage}(d). Clearly, this reconstructed image is not close to the original one. This is expected for our pixel size $a= 3$ km, well below the limit of the Rayleigh resolution for SMOS, which is around 35 km, based on the van Cittert Zernike theorem \cite{anterrieu_resolving_2004,corbella_visibility_2004,levine_synthetic_1999,thompson_interferometry_2017}. \section{Conclusion}\label{conclude} In summary, we formulated passive remote sensing as a quantum multi-parameter estimation problem, where we focused on the temperatures on ground as parameters rather than geometrical information of sources that are currently at the center of attention in quantum imaging, such as the separation, centroid, or phases of sources. An antenna array with as many antennas as desired pixels in the source plane receives thermal electro-magnetic radiation in receiver modes that are then mixed according to an optimized unitary transformation. Single-photon detectors detect the photons in the corresponding optimized detection modes. The function to be optimized is a scalar classical Cram\'er-Rao bound, obtained by contracting the inverse Fisher information matrix for estimating the temperatures from the photon-counting results with a positive weight matrix. With the latter one can give different preferences for high resolution to different parts of the image. The optimization of the bound over all unitary mode mixings leads to a ``most-informative bound''. For a uniform weight over all pixels we show that with this procedure one can, in the case of the Gaussian white noise characteristic of thermal states, approximatively saturate the scalar quantum Cram\'er-Rao bound based on the contraction of the quantum Fisher information matrix for the multi-parameter estimation problem with the same positive weight matrix (chosen as the identity in the present work). In principle, the optimized unitary depends on the actual temperature distribution, but we showed that the unitary obtained from a uniform temperature distribution gives still much better resolution than direct photon counting in the incoming modes. For the optimization over the unitaries we used a conjugate gradient algorithm. We showed that the found optimal mode mixing followed by single photon detection leads to a spatial resolution of the reconstructed images at least about an order of magnitude better than Rayleigh's limit (about 3\,km instead of 35\,km for an antenna array comparable with the one of SMOS, even for substantial photon losses), given in the present case by the van Cittert-Zernike theorem. The optimal unitary can be decomposed into $SU(2)$ group elements using beam splitters and phase shifters and can be realized as linear optical quantum computing. Given the recent availability of single-photon detection in the micro-wave domain, our results show a path towards substantially enhanced resolution in passive remote sensing compared to classical interferometers that essentially implement homodyne quadrature measurements. Further improvements might be possible for larger photon numbers or smaller losses if photon-number resolved measurements are available. \acknowledgements{DB and EK are grateful for support by the DFG, project number BR 5221\textbackslash3-1. We thank Gerardo Adesso for discussions, and DB thanks Yann Kerr, Bernard Roug\'e, and the entire SMOS team in Toulouse for valuable insights into that mission.}
\section{Introduction} \label{sec:introduction} Unsupervised or self-supervised learning (SSL) of representations \cite{Oord2018,Chen2020,Wang2020,He2020,chen2020big,Grill2020,chen2021exploring,Zbontar2021,Bardes2022,ermolov2021whitening,Zhang2022} has become an integral part of deep learning applications in computer vision. In SSL, a network is first pretrained on a ``self-supervised'' pretext task for which labeled data can be readily obtained on a large scale without human supervision. Lower layers of the pretrained network are then reused for downstream tasks, with the expectation that these layers produce generic representations of the input that are also useful in downstream. Most of the SSL models for visual representations employ a multi-view, Siamese network architecture. First, an input image is converted by different random transformations that do not alter its original semantics. These two augmented examples are then fed to a neural network (or in some cases, two different networks) that consists of a backbone network cascased with a small projection network (usually a multi-layer perceptron), to produce ``twin'' projected embeddings of the original. Finally, the network weights are trained so that the two embeddings (also called ``positive pair'') are similar, reflecting the fact that they represent the same original image. After training, the projection network is discarded, and only the backbone network is reused for downstream tasks as the encoder of input images that produces their representations. One major issue in SSL is the \emph{representation collapse}, or the presence of meaningless solutions such that all examples are projected to a single vector embedding. Contrastive approaches \cite{Oord2018,Chen2020,Wang2020,He2020,chen2020big} eliminate such solutions by a loss term to repel embeddings produced from different original images, or ``negative pairs.'' Because considering all possible negative pairs is infeasible, negative sampling is usually performed. Some recent work has explored non-contrastive SSL models. Among these, Barlow Twins \cite{Zbontar2021} and VICReg \cite{Bardes2022} use loss functions to penarlize the features of embeddings with a small variance, which in turn discourages the collapse. They further introduce regularization terms to decorrelate features, by promoting off-diagonals of the correlation/covariance matrices to be zero. Although these models perform as well as contrastive models, their regularizers are computationally demanding for high-dimensional embeddings; since the regulaizers are defined in terms of individual elements in covariance or cross-correlation matrices, they require $O(n d^2)$ time to compute, where $n$ is the number of samples in a batch, and $d$ is the dimensionality of the projected embeddings. This is unfortunate, as improved performance is reported for both Barlow Twins and VICReg as $d$ is increased \cite{Zbontar2021,Bardes2022}. \paragraph{Contributions.} In this paper, we address the inefficiency of Barlow Twins and VICReg mentioned above with a relaxed version of decorrelating regularizer. This regularization does not require the calculation of the correlation/covariance matrices explicitly and can be computed in time $O(n d \log d)$ by means of circular convolution and the fast Fourier transform (FFT). Undesirable local minima that can develop with the use of the relaxed regularizer can be overcome by feature permutation during training. We show that the resulting method achieves competitive performance with Barlow Twins and VICReg on downstream tasks, with substantially less computation time when $d$ is large. The proposed method also reduces memory consumption, which allows an increased batch size. \paragraph{Notation.} We use the $0$-based indexing for vector and matrix components unless stated otherwise; thus, for a vector $\mat{x} \in \mathbb{R}^d$, the component index ranges from $0$ to $d-1$. We denote by $[\mat{x}]_i$ the $i$th component of vector $\mat{x}$, and $[\mat{M}]_{ij}$ denotes the $(i,j)$-element of matrix $\mat{M}$. For a complex vector $\mat{c}$, $\overline{\mat{c}}$ denotes its componentwise complex conjugate. For vectors $\mat{x}$ and $\mat{y}$, $\mat{x} \hprod \mat{y}$ denotes their componentwise product. \iffalse \subsection{Circular Convolution and Correlation} \label{sec:circular-correlation-covariance} In the following, the component index of a vector starts from $0$. Thus, the admissible index range for a vector of dimensions $d$ is $0, 1, \ldots, d-1$. By regarding $d$-dimensional vectors $\mat{a}$, $\mat{b}$ as periodic sequences, i.e., $a_j = a_{j \bmod d}$ and $b_j = b_{j \bmod d}$ for every integer\footnote{ For a negative integer $j < 0$, we define $ j \bmod d $ to be the natural number $r < d$ that satisfies $ j = - n d + r$ for some $n \in \mathbb{N}$.} $j < 0$ and $j\ge d$, we obtain circular convolution and correlation, both of which are $d$-dimensional vectors. \begin{align*} \left[ \mat{a} * \mat{b} \right]_i & = \sum_{j=0}^ {d-1} a_j b_{(i-j) \bmod d} && \text{(circular convolution)} \\ \left[ \mat{a} \star \mat{b} \right]_i & = \sum_{j=0}^ {d-1} a_j b_{(i+j) \bmod d} && \text{(circular correlation)} \end{align*} It is easy to see that $ \mat{a} \star \mat{b} = \mathop{\textup{inv}}(\mat{a}) * \mat{b} $, where $\mathop{\text{flip}}(\mat{a})$ is the vector obtained by reversing the order of the $1$st (not the $0$th) to the $(d-1)$st components in $\mat{a}$; i.e., $[\mathop{\textup{inv}}(\mat{a})]_i = \mat{a}_{(d-i) \bmod d} $. \begin{figure}[tb] \footnotesize \centering \def.7{.3} \begin{tabular}{cc} \begin{tikzpicture}[scale=0.8] \foreach \y in {0,...,2}{ \node[anchor=east] at (-0.1, -\y) {$a_\y$} ; \node[anchor=south] at (\y, 0.1) {$b_\y$} ; \foreach \x in {0,...,2}{ \path (\x,-\y) coordinate (n-\y-\x) node[draw,circle] {} ; } \path (3,-\y) coordinate (n-\y-3) ; } \draw[->] (n-0-0) ++(-.7*2,-.7*2) coordinate (z0l) (n-1-2) ++(+.7,+.7) coordinate (m) (n-2-1) ++(-.7,-.7) coordinate (z0r) (z0r) -- (m) arc(-45:135:0.75*1.41421356) -- (z0l) ; \draw[<-] (n-1-0) ++(-.7*2,-.7*2) coordinate (z1l) (n-0-1) ++(+.7,+.7) coordinate (m) (n-2-2) ++(-.7,-.7) coordinate (z1r) (z1l) -- (m) arc(135:-45:0.75*1.41421356) -- (z1r) ; \draw[->] (n-0-2) ++(+.7*2,+.7*2) coordinate (z2r) (n-2-0) ++(-.7*2,-.7*2) coordinate (z2l) (z2r) -- (z2l) ; \node[anchor=north east] at (z0l.south west) {$z_0$} ; \node[anchor=north east] at (z1l.south west) {$z_1$} ; \node[anchor=north east] at (z2l.south west) {$z_2$} ; \end{tikzpicture} & \begin{tikzpicture}[scale=0.8] \foreach \y in {0,...,2}{ \node[anchor=east] at (-.1, -\y) {$a_\y$} ; \node[anchor=south] at (\y, .1) {$b_\y$} ; \foreach \x in {0,...,2}{ \path (\x,-\y) coordinate (n-\y-\x) node[draw,circle] {} ; } \path (3,-\y) coordinate (n-\y-3) ; } \draw[<-] (n-2-0) ++(+.7*2,-.7*2) coordinate (z1b) (n-0-1) ++(-.7,+.7) coordinate (m) (n-1-2) ++(+.7,-.7) coordinate (z1t) (z1t) -- (m) arc(45:225:0.75*1.41421356) -- (z1b) ; \draw[->] (n-0-2) ++(+.7,-.7) coordinate (z2t) (n-1-0) ++(-.7,+.7) coordinate (m) (n-2-1) ++(+.7*2,-.7*2) coordinate (z2b) (z2b) -- (m) arc(225:45:0.75*1.41421356) -- (z2t) ; \draw[->] (n-0-0) ++(-.7*2,+.7*2) coordinate (z0t) (n-2-2) ++(+.7,-.7) coordinate (z0b) (z0t) -- (z0b) ; \node[anchor=north west] at (z0b.south east) {$z_0$} ; \node[anchor=north west] at (z1t.south east) {$z_1$} ; \node[anchor=north west] at (z2t.south east) {$z_2$} ; \end{tikzpicture} \\ (a) & (b) \end{tabular} \caption{ (a) Circular convolution $\mat{a} * \mat{b}$ and (b) correlation $\mat{a}\star\mat{b}$ between $\mat{a} = [a_0 \; a_1 \; a_2]^{\textup{T}}$, and $\mat{b} = [b_0 \; b_1 \; b_2]^{\textup{T}}$. } \label{fig:circular-correlation} \end{figure} \fi \section{Related Work} \label{sec:related} \paragraph{Contrastive SSL.} Contrastive representation learning uses positive and negative pairs of augmented samples~\cite{Oord2018,Chen2020,Wang2020,He2020,chen2020big,dwibedi2021little,Chen2021,tian2020contrastive}. The commonly used InfoNCE loss~\cite{Oord2018} consists of an alignment term, which maximizes similarity between positive pairs, and a uniformity term, which minimizes similarity between negative pairs~\cite{Wang2020}. SimCLR~\cite{Chen2020} is one of the state-of-the-art methods in this category. However, to obtain good representations, SimCLR needs a large number of negative pairs \cite{Chen2020}, or, in other words, a large batch size $n$. This can be a computational bottleneck, as the loss computation of SimCLR takes $O(n^2d)$ time where $d$ is the dimensionality of the projected embeddings. \paragraph{Non-contrastive SSL by Asymmetric Architecture.} Recently, researchers have started exploring the possibility of non-contrastive approaches to self-supervised representation learning, i.e., those that do not use negative pairs for training. To overcome the representation collapse, models such as BYOL \cite{Grill2020} and SimSiam \cite{chen2021exploring} employ asymmetric network architectures, e.g., by suppressing gradient updates and/or using the moving average of network parameters for one view. These methods are heuristically motivated, as they do not explicitly penalize the collapse but work well in practice. \paragraph{Non-contrastive SSL by Decorrelating Regularization.} Barlow Twins \cite{Zbontar2021} was the first method to introduce a loss function that explicitly penalizes collapsed embeddings. It uses a regularizer based on cross-correlation matrices over two views. VICReg \cite{Bardes2022} also introduced two regularizers, but they are defined in terms of covariance matrices of individual views. We review these methods in \cref{sec:barlow-twins-vicreg} in detail. \paragraph{Non-contrastive SSL by Whitening.} Some authors \cite{ermolov2021whitening,Hua2021} used whitening to explicitly decorrelate features during training, without resorting to regularization. \citet{Zhang2022} whitened both the feature and sample covariances. Because the whitening procedures used in these approaches require the computation of all the eigenvalues of the covariance matrices, a training epoch takes time $O(d^3)$ (or $O(d^3 + n^3)$ with \citet{Zhang2022}), which can be problematic with large $d$ or $n$. \paragraph{Use of Convolution in Machine Learning.} Convolution is the basic building block of convolution neural networks (CNNs). CNNs take (linear) convolution of input vectors with small learnable filter kernels to extract local features. In contrast, we use convolution to compute summary statistics of the covariance/cross-correlation matrices. Although FFT reduces the asymptotic complexity of convolution computation, it is seldom used with CNNs, because the size of kernels is typically too small to warrant speed-up by FFT. In other areas of machine learning, circular convolution and its non-commutative analogue, circular correlation, have been applied to implement associative memory \cite{Borsellino1973,Schonemann1987,Plate2003}. The idea has recently been revived for knowledge graph embeddings \cite{Nickel2016}. \section{SSL Models Using Decorrelating Regularizers} \label{sec:barlow-twins-vicreg} In this section, Barlow Twins \cite{Zbontar2021} and VICReg \cite{Bardes2022} are reviewed. Given a batch of $n$ original training examples, these models apply two different transformations chosen randomly to each example and input the transformed examples into a neural network to obtain twin embeddings (views) of the original. Let $ \vecA[k], \vecB[k] \in \mathbb{R}^d $ denote the twin embeddings thus obtained for the $k$th example, and let $\setA = \{ \vecA[k] \}_{k=1}^n$, $\setB = \{ \vecB[k] \}_{k=1}^n$ be the sets of embeddings for individual views. The network is then trained to minimize the loss function specific to each model. \paragraph{Barlow Twins.} Barlow Twins optimizes the loss function defined in terms of the cross-correlation matrix $\matCAB \in \mathbb{R}^{d \times d}$ between views $\setA$ and $\setB$: \begin{align} \lossfunc_{\textup{BT}} & = \sum_{i=0}^{d-1} \left( 1 - [\matCAB]_{ii} \right)^2 + \lambda \Rbarlow (\matCAB) , \label{eq:bt-loss} \end{align} where hyperparameter $\lambda \ge 0$ controls the strength of regularization, and $\Rbarlow: \mathbb{R}^{d\times d} \to \mathbb{R}$ is a regularizer function defined as \begin{align} \Rbarlow (\matM) &= \sum_{i=0}^{d-1} \sum_{\substack{ j=0 \\ j \neq i}}^{d-1} [\matM]_{ij}^2 . \label{eq:bt-regularizer} \end{align} The first term in \cref{eq:bt-loss} is minimized when the corresponding features of two views are fully correlated, i.e., $[\matCAB]_{ii} = 1$ for $i=0,\dots,d-1$. This term can be efficiently computed in time $O(n d)$. Regularizer $\Rbarlow (\matCAB)$ in the second term is for feature decorrelation, as off-diagonal elements in $\matCAB$ are pushed toward zero. This regularization term can be a computational burden when $d$ is large, as it takes $O(n d^2)$ time to compute, thanks to the $d\times d$ matrix $\matCAB$. \paragraph{VICReg.} Let $\matKA, \matKB \in \mathbb{R}^{d \times d}$ be the covariance matrices of $\setA$ and $\setB$, respectively. In VICReg, the loss function is defined as \begin{align} \lossfunc_{\textup{VIC}} & = \frac{\alpha}{n} \sum_{k=1}^n \| \vecA[k] - \vecB[k] \|^2_2 \nonumber \\ & \quad + \frac{\mu}{d} \left( \Rvar(\matKA) + \Rvar(\matKB) \right) \nonumber \\ & \quad + \frac{\nu}{d} \left( \Rcov(\matKA) + \Rcov(\matKB) \right) , \label{eq:vicreg-loss} \end{align} where $\alpha, \mu, \nu \ge 0$ are hyperparameters to control the importance of individual terms, and $\Rvar$ is the regularizer defined as \begin{align} \Rvar (\matM) & = \sum_{i=0}^{d-1} \text{max} (0, \gamma - \sqrt{ [\matM]_{ii}} ) , \label{eq:vicreg-regularizer-variance} \end{align} with the target standard deviation $\gamma > 0$. Function $\Rcov$ is the same regularizer as used in Barlow Twins (\cref{eq:bt-regularizer}), but applied to $\matKA$ and $\matKB$ instead of $\matCAB$. The first term in \cref{eq:vicreg-loss} brings two views of the same example closer. Regularizer $\Rvar$ penalizes collapsed embeddings with zero variances, whereas $\Rcov$ promotes the diversity of features by encouraging the covariance of features to be $0$. The time complexity of caclculating $\Rcov(\matKA)$ and $\Rcov(\matKB)$ is $O(n d^2)$, just like $\Roff(\matCAB)$ in Barlow Twins. \section{Proposed Method} \label{sec:method} We propose a weaker but efficiently computable alternative to the regularizer function $\Roff$ used by Barlow Twins and VICReg. In the following, we present our regularizer in terms of cross-correlation matrix $\matCAB$, similarly to Barlow Twins. However, if applied to $\matKA$ and $\matKB$ instead, this regulizer can be used as a drop-in replacement for $\Roff$ in the VICReg's loss function. \subsection{Regularizer Based on Sums of Cross-cor\-re\-la\-tion} \label{sec:bt-like-regularizer} Recall that the loss of Barlow Twins is based on the cross-correlation matrix $\matC = \matCAB$ of two views $\setA = \{ \vecA[k] \}_{k=1}^n$ and $\setB = \{ \vecB[k] \}_{k=1}^n$. For brevity, assume that both $A$ and $B$ are standardized. Then, the cross-correlation matrix is simply given by $ \matC = (1/(n-1))\sum_{k=1}^n \vecA[k] { \vecB[k] }^{\textup{T}} $. Our regularizer is defined in terms of a $d$-dimensional ``summary'' vector of the $d \times d$ cross-correlation matrix $\matC$. This vector, denoted here by $\sumvec(\matC)$, is given componentwise by \begin{align} \label{eq:summary-vector} \left[ \sumvec (\matC) \right]_i & = \sum_{j=0}^{d-1} [\matC]_{j, (i+j) \bmod d} . \end{align} Note that the component indices are $0$-based. The $0$th component $[\sumvec(\matC)]_0$ is the trace of $\matC$. Each of the remaining $d-1$ components corresponds to a sum of $d$ different off-diagonal elements of $\matC$, with no single element appearing in two distinct sums. Thus, every element in $\matC$ appears exactly once in the summations in \cref{eq:summary-vector}. The calculation of a summary vector for a $3\times 3$ covariance matrix is illustrated in \cref{fig:summary-vector}. \begin{figure}[tb] \scriptsize \def.7{.7} \def.35{.35} \centering \begin{tabular}{m{.48\linewidth} @{\quad} m{.48\linewidth}} \begin{tikzpicture}[scale=0.7] \foreach \y in {0,...,2}{ \foreach \x in {0,...,2}{ \path (\x,-\y) coordinate (n-\y-\x) ; } \path (3,-\y) coordinate (n-\y-3) ; } \draw[-latex] (n-0-0) ++(-.7,+.7) coordinate (z0t) (n-2-2) ++(+.7,-.7) coordinate (z0b) (z0t) -- (z0b) ; \draw[latex-] (n-2-0) ++(+.7,-.7) coordinate (z1b) (n-0-1) ++(-.35,+.35) coordinate (m) (n-1-2) ++(+.7,-.7) coordinate (z1t) (z1t) -- (m) arc(45:225:0.75*1.41421356) -- (z1b) ; \draw[-latex] (n-0-2) ++(+.7,-.7) coordinate (z2t) (n-1-0) ++(-.35,+.35) coordinate (m) (n-2-1) ++(+.7,-.7) coordinate (z2b) (z2b) -- (m) arc(225:45:0.75*1.41421356) -- (z2t) ; \foreach \y in {0,...,2}{ \foreach \x in {0,...,2}{ \path (\x,-\y) node[draw,fill=white,circle,inner sep=.1ex] {$c_{\y\x}$} ; } } \node[anchor=north west, inner sep=.2ex] at (z0b.south east) {$\sumsym_0$} ; \node[anchor=north west, inner sep=.2ex] at (z1t.south east) {$\sumsym_1$} ; \node[anchor=north west, inner sep=.2ex] at (z2t.south east) {$\sumsym_2$} ; \end{tikzpicture} & \centering { $ \left\{\; \begin{aligned} v_0 & = c_{00} + c_{11} + c_{22} \\ v_1 & = c_{01} + c_{12} + c_{20} \\ v_2 & = c_{02} + c_{10} + c_{21} \end{aligned} \right. $ } \end{tabular} \caption{ A $3\times 3$ cross-correlation matrix $\matC = \left[c_{i j}\right]$ ($i,j=0, 1, 2$) and $\sumvec(\matC) = [\sumsym_0 \; \sumsym_1 \; \sumsym_2]^{\textup{T}}$. } \label{fig:summary-vector} \end{figure} Now, we define a regularizer in terms of all but the $0$th component of $\sumvec(\matC)$: \begin{equation} \Rsum (\matC) = \sum_{i=1}^{d-1} \|[\sumvec(\matC)]_i\|_q^q , \label{eq:bt-like-regularizer} \end{equation} where hyperparameter $q \in \{1,2\}$. This function $\Rsum$ can be used as a drop-in replacement for $\Rbarlow$ in Barlow Twins' loss function (\cref{eq:bt-loss}). The $0$th component $[\sumvec(\matC)]_0$ is excluded from the summation in \cref{eq:bt-like-regularizer}, because it is equal to the sum of the diagonal elements of $\matC$, which are irrelevant to feature decorrelation; they do not appear in Barlow Twin's regularizer $\Rbarlow(\matC)$, either. The regularizer $\Rsum$ is weaker than $\Rbarlow$ in that it imposes constraints on the components of the summary vector, or the sums of $d$ elements of $\matC$, whereas $\Rbarlow$ constrains individual elements. Indeed, $\Rsum(\matC)$ is a lower bound of $\Rbarlow(\matC)$. However, as we discuss in \cref{sec:efficient-computation}, $\Rsum$ allows faster computation. Furthermore, in \cref{sec:permutation}, we provide a simple technique to mitigate the weakness of our regularizer. \subsection{Efficient Computation} \label{sec:efficient-computation} Computing $\sumvec(\matC)$ by \cref{eq:summary-vector} requires cross-correlation matrix $\matCAB$, whose calculation incurs the same computational inefficiency as the regularizer in Barlow Twins. Fortunately, $\sumvec(\matC)$ can be calculated directly from the vectors in $\setA$ and $\setB$ without their cross-correlation matrix calculated explicitly, by means of FFT. To this end, we first need the definitions of involution and circular convolution. The \emph{involution} \cite{Schonemann1987} (also called \emph{flipping} \citet{Smith2008}) $\mathop{\textup{inv}}(\mat{x})$ of a vector $\mat{x} \in \mathbb{R}^d$ is the vector obtained by reversing the order of its $1$st (not the $0$th) to $(d-1)$st components; i.e., $[\mathop{\textup{inv}}(\mat{x})]_i = [\mat{x}]_{(d-i) \bmod d} $ for $i=0, \ldots, d-1$. For vectors $\mat{x}, \mat{y} \in \mathbb{R}^d$, their \emph{circular convolution} $\mat{x} * \mat{y}$ is a $d$-dimensional vector with components \begin{align} \left[ \mat{x} * \mat{y} \right]_i & = \sum_{j=0}^ {d-1} \left[ \mat{x}\, \mat{y}^{\textup{T}} \right]_{j, (i-j) \bmod d} , \label{eq:circular-convolution} \end{align} Due to this definition, circular convolution is known as the ``compressed outer product.'' Now, for each twin representations $\vecA[k] \in \setA$ and $\vecB[k] \in \setB$ ($k = 1, \ldots, n$), let us consider vector $\mathop{\textup{inv}}(\vecA[k]) * \vecB[k] \in \mathbb{R}^d$.\footnote{ The vector $ \mathop{\textup{inv}}( \mat{x} ) * \mat{y} $ is known as the \emph{circular (cross-)\linebreak[0]correlation} of $\mat{x}$ and $\mat{y}$ \cite{Schonemann1987,Plate2003,Smith2008}. We opt not to use this term in this paper to avoid confusion with the cross-correlation of random vectors, which is used in Barlow Twins.} Noting the indices altered by involution, we see that this vector is given componentwise by \begin{align} \left[ \mathop{\textup{inv}}( \vecA[k] ) * \vecB[k] \right]_i & = \sum_{j=0} ^{d-1} \left[ \vecA[k] { \vecB[k] }^{\textup{T}} \right]_{j, (i+j) \bmod d} . \label{eq:circular-correlation} \end{align} Substituting $\matC = (1/(n-1)) \sum_{k=1}^{n} \vecA[k]{ \vecB[k] }^{\textup{T}} $ into \cref{eq:summary-vector} and using \cref{eq:circular-correlation}, we have \begin{align} \left[ \sumvec(\matC) \right]_i & = \sum_{j=0}^{d-1} { \overbrace{ \left[ \frac{1}{n-1} \sum_{k=1}^{n} \vecA[k] { \vecB[k] }^{\textup{T}} \right]}^{\matC}}_{j, (i+j) \bmod d} \nonumber\\ & = \frac{1}{n-1} \sum_{k=1}^{n} \sum_{j=0}^{d-1} \left[ \vecA[k] { \vecB[k] }^{\textup{T}} \right]_{j, (i+j) \bmod d} \nonumber \\ & = \frac{1}{n-1} \sum_{k=1}^{n} \left[ \mathop{\textup{inv}}( \vecA[k] ) * \vecB[k] \right]_i , \end{align} or, as a vector, \begin{align} \sumvec(\matC) & = \frac{1}{n-1} \sum_{k=1}^{n} \mathop{\textup{inv}}( \vecA[k] ) * \vecB[k] . \label{eq:summary-vector-by-circular-correlation} \end{align} Now, let $\mathop{\mathscr{F}}$ and $\mathop{\mathscr{F}^{-1}\!}$ denote the (discrete) Fourier and the inverse Fourier transforms, respectively. Noting that $\mathop{\mathscr{F}}(\mathop{\textup{inv}}(\mat{x})) = \overline{\mathop{\mathscr{F}}(\mat{x})}$ for any $\mat{x} \in \mathbb{R}^d$ (see e.g., \citet{Smith2008}, Section~7.4.2) and using the celebrated convolution theorem $\mathop{\mathscr{F}}(\mat{x} * \mat{y}) = \mathop{\mathscr{F}}(\mat{x}) \hprod \mathop{\mathscr{F}}(\mat{y})$, we have \begin{align} \mathop{\textup{inv}}( \vecA[k] ) * \vecB[k] & = \mathop{\mathscr{F}^{-1}\!} \left( \overline{ \mathop{\mathscr{F}}( \vecA[k] ) } \hprod \mathop{\mathscr{F}}( \vecB[k] ) \right) \label{eq:circular-correlation-by-fft} \end{align} where $\hprod$ denotes componentwise product. Plugging \cref{eq:circular-correlation-by-fft} into \cref{eq:summary-vector-by-circular-correlation}, we obtain \begin{align} \rlap{$ \sumvec(\matC) $} \quad \nonumber \\[-3ex] & = \frac{1}{n-1} \sum_{k=1}^n \overbrace { \mathop{\mathscr{F}^{-1}\!} \left( \overline{ \mathop{\mathscr{F}}(\vecA[k]) } \hprod \mathop{\mathscr{F}} (\vecB[k]) \right) }^{ \mathop{\textup{inv}}( \vecA[k] ) * \vecB[k] } \nonumber \\ & = \frac{1}{n-1} \mathop{\mathscr{F}^{-1}\!} \left( \sum_{k=1}^n \overline{ \mathop{\mathscr{F}}( \vecA[k] )} \hprod \mathop{\mathscr{F}}(\vecB[k]) \right). \label{eq:summary-vector-by-fft} \end{align} Using this equation, we can calculate $\sumvec(\matC)$ directly from the representation vectors in $\setA$ and $\setB$, bypassing the cumbersome calculation of $\matC$: First compute the Fourier transform of all reprenstations $\vecA[k]$ and $\vecB[k]$, and simply apply \cref{eq:summary-vector-by-fft}. Since the (inverse) Fourier transform of a $d$-dimensional vector can be done in time $O(d \log d)$ by the FFT algorithm, and the computation of complex conjugates and component products, and the sum of the vectors of $n$ takes $O(n d)$ time, the overall time to obtain $\sumvec(\matC)$ is $O(n d\log d)$. The time to calculate $\Rsum(\mat{C})$ is also $O(n d\log d)$. This is a substantial improvement over Barlow Twin's $O(n d^2)$. The space requirement is $O(n d)$, which is optimal if we consider the same $O(n d)$ space needed to store input vectors $\setA$ and $\setB$ as part of the space complexity. In contrast, Barlow Twins needs extra $O(d^2)$ space to store $\matC$. \subsection{Feature Permutation to Mitigate Undesirable Local Minima} \label{sec:permutation} As seen from \cref{eq:summary-vector}, the components of $\sumvec(\matC)$ are the sums of $d$ elements in $\matC$, and the proposed regularizer $\Rsum$ (\cref{eq:bt-like-regularizer}) encourages these sums to be close to zero. This is weaker than Barlow Twins' regularizer $\Rbarlow$ (\cref{eq:bt-regularizer}), which pushes individual elements of $\matC$ towards zero. Indeed, $\Rsum(\matC)$ can be close to zero even if individual elements in $\matC$ are not; i.e., the summands in \cref{eq:summary-vector} can cancel each other, since they can be either positive or negative. As a result, undesirable local minima develop in the parameter space, making our regularizer ineffective. Here, we propose a simple trick to eliminate these local minima: Randomly permute feature indices during training, so that the combination of features appearing in a sum in $\sumvec(\matC)$ changes frequently. To see why this works, consider minimizing $\Rsum(\matC)$, regarding the elements of $\matC$ as independent variables. It is easy to see that the minimum is attained by the solutions to a homogeneous system of linear equations: \begin{align*} \overbrace{ \sum_{j=0}^{d-1} [\matC]_{j, (i+j) \bmod d} }^{ \left[ \sumvec (\matC) \right]_i } & = 0 , \qquad \text{for } i = 1, \ldots, d-1. \end{align*} This is an underdetermined system, with only $d-1$ equations but with $d(d-1)$ unknowns, namely, $[\matC]_{j\ell}$; $j,\ell=0, \ldots, d-1, j\ne \ell$. This is why nontrivial solutions arise such that $[\matC]_{j\ell} \ne 0$, i.e., those in which summands with opposite signs cancel each other in an equation and which are undesirable for our purpose. Now, by repeatedly permuting the feature indices and minimizing the loss, we effectively introduce more and more equations to the system, since permutation can produce different sets of linear equations over the unknowns, and these new constraints eventually make non-trivial solutions inadmissible. For ease of implementation, we permute feature indices randomly during training, instead of generating all permutations systematically at once. Note that the permuted feature indices need not be identical across mini-batches, even within a single epoch; indeed, in the experiments in \cref{sec:experiment}, we use a different random permutation of features in every mini-batch in every epoch. \subsection{Feature Grouping to Control the Degree of Relaxation} \label{sec:feature-grouping} Instead of computing a summary vector for an entire cross-correlation matrix $\mat{C}$, we can compute summaries at a more fine-grained level. Specifically, we partition $d$ features into groups of size $b$ each\footnote{ If $d$ is not divisible by $b$, pad dummy features that are constantly $0$ in the last group. }. This partitioning induces in $\matC$ a total of $\lceil d/b \rceil^2$ block submatrices of size $b \times b$, i.e., $\matC = [\matC_{ij}]$ $(i,j=1,\ldots, \lceil d/b \rceil)$ with submatrices $\matC_{ij} \in \mathbb{R}^{b \times b}$. We then define the regularizer by \begin{align} \Rsum^{(b)} (\matC) & = \sum_{i=1}^{\lceil d/b \rceil} \sum_{\ell=1}^{b-1} \left\| [\sumvec(\matC_{ii})]_\ell \right\|_q^q \nonumber \\ & \qquad + \sum_{\substack{i,j=1\\i\ne j}}^{\lceil d/b \rceil} \sum_{\ell=0}^{b-1} \left \| [ \sumvec(\matC_{ij}) ]_\ell \right \|_q^q , \label{eq:bt-like-group-regularizer} \end{align} As before, $\sumvec(\matC_{ij})$ can be computed without explicitly computing $\matC_{ij}$ by means of involution, circular convolution (of subvectors of embeddings), and the Fourier transform. Calculating a single $\sumvec(\matC_{ij})$ takes $O(n b \log b)$ time using FFT, and since there are $\lceil d/b \rceil^2$ blocks, the total time needed to compute $\Rsum^{(b)}$ is $O((n d^2 / b) \log b )$. The block size hyperparameter $b$ controls the granularity of the summary computation. In particular, when $b = 1$, the regularizer $\Rsum^{(1)}(\matC)$ reduces $\Rbarlow(\matC)$ of Barlow Twins, provided that $q=2$. On the other hand, when $b=d$, we recover $\Rsum^{(d)}(\matC) = \Rsum(\matC)$ in \cref{eq:bt-like-regularizer}. Thus, this grouping formulation gives a generalization of Barlow Twins, with parameter $b$ controlling the trade-off between computational efficiency and the degree of relaxed regularization. Empirically, performance can be slightly improved by the use of a feature group of moderate size, with no substantial degradation observed in training time and memory usage; see \cref{sec:experiment}. Note that the permutation and grouping of features are compatible and can be combined. \subsection{Regularizer Based on Sums of Feature Covariances} \label{sec:vicreg-like-regularizer-brief} We used $\Rsum$ to define a regularizer based on cross-correlation, similarly to Barlow Twins. It can also be used to define a VICReg-style regularizer based on covariance, simply by replacing $\Rcov$ with $\Rsum$ in \cref{eq:vicreg-loss}, and passing correlation matrices $\matKA$ or $\matKB$ instead of $\matC(\setA, \setB)$ as argument. Fast computation is also possible with FFT, and the grouping version is also straightforward; these are described in
\section{\label{sec:intro1}Introduction} Spin dynamics in magnetic systems is a research area of much current activity. Spintronics \cite{Zutic2004}, which is concerned with the manipulation of electronic spins, spin currents, spin textures, and spin excitations, has created a wealth of scientific knowledge and many avenues for new technologies. Prominent examples are spin waves for encoding and transmitting information (magnonics) \cite{Rezende2020,Barman2021}, skyrmions for magnetic information storage \cite{Nagaosa2013,Fert2017,Zhang2017,Gobel2021,Chen2022}, and single-spin qubits for quantum computation \cite{Vandersypen2017}. Another related area of much interest is ultrafast demagnetization induced by femtosecond laser pulses \cite{Bovensiepen2009,Krieger2015,GPZhang2016,GPZhang2016a,Acharya2020}. Computational approaches to simulate magnetization dynamics in a wide variety of systems are typically based on the Landau-Lifshitz-Gilbert (LLG) equation of motion \cite{Lifshitz,Eriksson2017}. The LLG equation provides a classical description of the time evolution of the magnetization vector ${\bf m}(t)$ in response to a time-dependent perturbation (typically, a short pulse or a periodic driving field) or evolving from a nonequilibrium initial state. Materials properties such as anisotropy, deformations, strain, and various forms of damping can be built into the LLG approach via phenomenological or ``second-principles'' parameters. In this paper, we are less concerned with these specific materials properties; instead of LLG we will use a fully quantum mechanical description of the electronic charge and spin degrees of freedom, and our focus will be specifically on the impact of electron-electron interactions on the magnetization dynamics. To be more clear, we consider a system of $N$ interacting electrons under the influence of a time-dependent scalar potential $V({\bf r},t)$ and a time-dependent magnetic field ${\bf B}({\bf r},t)$ which couples only to the electron spin (and not to orbital motion). The associated many-body Hamiltonian is given by \begin{eqnarray} \label{H} \hat H &=& \sum_{j}^N\left[-\frac{\nabla_j^2}{2} + V({\bf r}_j,t) + \bm{\sigma}_j\cdot {\bf B}({\bf r}_j,t) \right] \nonumber\\ &+& \frac{1}{2}\sum_{j\ne k}^N \frac{1}{|{\bf r}_j - {\bf r}_k|} \:, \end{eqnarray} where $\bm{\sigma}_j$ is the vector of Pauli matrices acting on the spin of the $j$th electron, and we define the magnetic field strength such that the Bohr magneton, $\mu_B = e \hbar/2m$, does not explicitly appear in the Hamiltonian $\hat H$. We use atomic units ($e = m = \hbar = 4\pi \epsilon_0 = 1$) throughout. From the Heisenberg equation of motion for $\hat H$, Capelle {\em et al.} showed that the magnetization has the following time evolution \cite{Capelle2001}: \begin{equation} \label{m} \frac{d {\bf m}({\bf r},t)}{dt} + \hat \nabla \cdot {\bf J}({\bf r},t) = {\bf m}({\bf r},t) \times {\bf B}({\bf r},t) \:, \end{equation} where ${\bf J}({\bf r},t)$ is the spin-current tensor. Equation (\ref{m}) is exact but not very helpful in practice since ${\bf J}({\bf r},t)$ requires the many-body wave function associated with $\hat H$. A more practical (but still in principle exact) alternative is time-dependent spin-density functional theory (TD-SDFT). The idea of TD-SDFT is to consider an auxiliary system of noninteracting fermions, acted upon by an ``effective'' scalar potential and magnetic field, $V_{\rm eff}({\bf r},t)$ and ${\bf B}_{\rm eff}({\bf r},t)$, such that the same density $n({\bf r},t)$ and magnetization ${\bf m}({\bf r},t)$ are produced as in the physical system. The resulting equation of motion, the TD-SDFT counterpart to Eq. (\ref{m}), is \cite{Capelle2001} \begin{equation} \label{mks} \frac{d {\bf m}({\bf r},t)}{dt} + \hat \nabla \cdot {\bf J}_{\rm KS}({\bf r},t) = {\bf m}({\bf r},t) \times {\bf B}_{\rm eff}({\bf r},t) \:. \end{equation} Here, ${\bf J}_{\rm KS}({\bf r},t)$ is the Kohn-Sham spin-current tensor, which is easily determined from the noninteracting wave function, and the effective magnetic field is defined as ${\bf B}_{\rm eff}({\bf r},t) = {\bf B}({\bf r},t) + {\bf B}_{\rm xc}({\bf r},t)$, where the exchange-correlation (xc) magnetic field ${\bf B}_{\rm xc}$ is a functional of the density and magnetization. Formally, ${\bf m}({\bf r},t)$ is the same in Eqs. (\ref{m}) and (\ref{mks}), but ${\bf J}$ and ${\bf J}_{\rm KS}$ are in general different (the difference lies in the transverse component). Thus, the so-called xc torque, \begin{equation} \label{tau} \bm{\tau}_{\rm xc}({\bf r},t) = {\bf m}({\bf r},t) \times {\bf B}_{\rm xc}({\bf r},t) \:, \end{equation} ensures that TD-SDFT produces the correct magnetization dynamics \cite{Capelle2001}. While all of this is clear at the formal level, the exact form of ${\bf B}_{\rm xc}$ is unknown and must be approximated in practice. This immediately raises several questions: which approximations of ${\bf B}_{\rm xc}$ are available, and do they produce xc torques? And, how important are the xc torques for the magnetization dynamics? A number of approximations for ${\bf B}_{\rm xc}$ have been derived within ground-state SDFT for noncollinear magnetism \cite{Barth1972,Gunnarsson1976,Gidopoulos2007}; via the adiabatic approximation, they immediately carry over to TD-SDFT. The most widely used approach, pioneered by K\"ubler {\em et al.} \cite{Kubler1988,Sandratskii1998} and implemented in many popular electronic structure codes, is to use standard local or semilocal xc functionals such as the local spin-density approximation (LSDA) or generalized gradient approximations (GGAs), and assume a local spin quantization axis which is aligned with the local magnetization vector ${\bf m}({\bf r},t)$; this produces a ${\bf B}_{\rm xc}({\bf r},t)$ that is parallel to ${\bf m}({\bf r},t)$ everywhere. We see right away from Eq. (\ref{tau}) that this class of approximations does not produce any xc torques. Approximations for ${\bf B}_{\rm xc}$ that do include xc torque effects can be constructed in several ways. Existing local and semilocal functionals (LSDA and GGAs) have been modified \cite{Katsnelson2003,Peralta2007,Scalmani2012,Bulik2013} or used in a source-free construction \cite{Sharma2018}, and new gradient-corrected functionals were constructed based using the spin-spiral state of the electron gas as reference system \cite{Kleinman1999,Eich2013a,Eich2013b}. More consistent derivations of xc meta-GGAs, starting from noncollinear generalizations of the exchange hole and the two-body density matrix, were recently presented \cite{Pittalis2017,Tancogne2022}. Various orbital-dependent functionals were generalized to the case of noncollinear magnetization \cite{Sharma2007,Capelle2010,Ullrich2018}. Existing applications of ground-state SDFT to noncollinear magnetic materials \cite{Sharma2007,Scalmani2012,Bulik2013} and model systems \cite{Pluhar2019} seem to suggest that xc torques are of relatively minor importance for magnetic structure and energetics, although the torques themselves may not be insignificant \cite{Tancogne2022}. On the other hand, there are good reasons to expect that xc torques will be more impactful for magnetization dynamics: they explicitly appear in the equation of motion, Eq. (\ref{mks}), and even if $\bm{\tau}_{\rm xc}({\bf r},t)$ is relatively small at a given ${\bf r}$ and $t$, its effect can accumulate over time. So far, however, there has been no systematic attempt to assess this hypothesis. We are only aware of one study in the literature, where Dewhurst {\em et al.} \cite{Dewhurst2018} used their source-free ${\bf B}_{\rm xc}$ functional to simulate laser-induced spin dynamics in bulk Co and Ni and Co-Pt and Ni-Pt interfaces. They found that xc torques were significant only if they are not overshadowed by magnetic anisotropy effects (i.e., in bulk, and not at interfaces), and that they give rise to rather slow spin rotation compared to other forms of spin dynamics, induced optically or via spin-orbit coupling (SOC). In this paper, our goal is to assess the importance of xc torques in frustrated magnetic systems. Exchange-frustrated solids such as spin glasses and kagome antiferromagnetic lattices are characterized by many competing noncollinear spin configurations and quantum spin liquid phases \cite{Balents2010,Zhou2017,Broholm2020}, and may therefore exhibit an enhanced sensitivity to subtle xc torque effects. Needless to say, extended spin frustrated solids are challenging to describe, and exact or quasi-exact benchmark results are hard to come by. We will therefore limit ourselves to small model systems which capture the spirit of spin frustration and yet are computationally manageable. Here, we will consider small Hubbard-type model systems along similar lines as in our earlier studies \cite{Ullrich2018,Pluhar2019,Ullrich2019}; by including SOC we can generate intrinsically noncollinear ground states. In particular, we will focus on a five-site half-filled Hubbard bowtie as a minimal model for studying xc torque effects in the presence of magnetic frustration. We will generate both exact and SDFT phase diagrams of spin configurations for this system and explore the spin dynamics for different configurations in the phase diagram. The TD-SDFT treatment will be based on orbital-dependent exchange-only functionals, and we will compare with exact solutions of the many-body time-dependent Schr\"odinger equation. Focusing on a few representative case studies, we will gain insight into the significance of xc torques in different regimes. The paper is organized as follows. In Sec.~\ref{sec:model2} the extended Hubbard model and the SDFT framework are introduced and the exact and SDFT magnetic phase diagrams are discussed. In Sec.~\ref{sec:III} we describe some technical aspects of the TD-SDFT modeling such as the choice of initial state. In Sec.~\ref{sec:res4} the results of exact diagonalization and SDFT models are compared for the cases with moderate to strong correlations and non-local interactions. Conclusions are given in Sec.~\ref{sec:con5}. \begin{figure} \includegraphics[width=\columnwidth]{BowtieGeoV3} \caption{\label{fig:geo} Geometry of the 5-site Hubbard cluster used in this work. The arrows indicate the ordering of the nearest-neighbor sum in Eq. (\ref{eqn:hop}), accounting for the directional hopping due to SOC.} \end{figure} \section{\label{sec:model2} Exact and SDFT magnetic structure of Hubbard clusters} \subsection{Definition of the model} In this paper we limit ourselves to (TD-)SDFT in the exchange-only approximation. As discussed earlier \cite{Pluhar2019}, the standard Hubbard model with on-site interactions does not give rise to any exchange torques. If one wishes to study exchange torque effects it is necessary to work with an extended Hubbard model instead. We will consider, in the following, a half-filled 5-site Hubbard cluster in a bowtie shape, as shown in Fig. \ref{fig:geo}. Here, we go beyond Ref. \cite{Pluhar2019} and include SOC through a modification of the kinetic-energy operator, where the hopping term becomes complex and the hopping acquires a directionality \cite{Kaplan1983,Tabrizi2019}. Thus, our inhomogeneous extended Hubbard model with SOC is described by the Hamiltonian \begin{equation} \label{eqn:ham} \hat H_{\rm model} = \hat H_T + \hat H_U + \hat H_{\rm ext} \:. \end{equation} The first term is a hopping term with SOC absorbed into a spin dependent phase factor, \begin{equation} \label{eqn:hop} \hat H_T = -t_h \sum_{\langle j,j'\rangle} \sum_{\sigma} e^{-i\sigma \theta} c^{\dag}_{j\sigma} c_{j'\sigma} + h.c. , \end{equation} where $h.c.$ stands for Hermitian conjugate. Here, $t_h = \sqrt{T^2+C^2}$ is the generalized hopping strength parameter which depends on nearest neighbor hopping strength $T$ and spin orbit coupling $C$, $j$ is the site index for the geometry shown in Fig.~\ref{fig:geo}, $c_{j\sigma}$ is the annihilation operator for an electron of spin $\sigma$ at site $j$, the brackets $\langle \dots \rangle $ denote an ordered sum over nearest neighbors with the order indicated by the arrows in Fig.~\ref{fig:geo}, and $\sigma =\pm 1$ labels spin-up and -down. Furthermore, $\theta$ is the SOC angle which parameterizes the strength of the SOC parameter $C$ relative to the conventional hopping term $T$ \cite{Pixley2016,Li2020,Hill2021}. The second term in the model Hamiltonian (\ref{eqn:ham}) comprises the on-site and nearest-neighbor interaction terms, \begin{equation} \hat H_U = U_0 \sum_j n_{j\uparrow} n_{j\downarrow} + U_1 \sum_{\langle j,j'\rangle} \sum_{\sigma, \sigma'} n_{j\sigma} n_{j'\sigma'} \:, \end{equation} where $n_{j \sigma} = c^{\dag}_{j\sigma} c_{j\sigma}$ is the spin $\sigma$ particle number density at site $j$, and $U_0$ and $U_1$ are the on-site and nearest-neighbor repulsion strengths, respectively. For the purposes of this paper, we set $U_1=\frac{1}{2}U_0$, a fairly typical choice for modeling real materials \cite{Strack1993}, and we restrict the hopping parameter $t_h$ and on-site interaction parameter $U_0$ to be of similar orders of magnitude. Finite nonlocal interactions are necessary for nontrivial exchange torques, but we avoid the much stronger interactions regime because the charge degrees of freedom tend to freeze out as $U_0$ and $U_1$ become large, resulting in the dynamics being dominated by a simpler pure-spin low-energy effective model. Lastly, $\hat H_{\rm ext}$ contains the couplings to the external potential and external magnetic field, \begin{equation} \hat H_{\rm ext} = \sum_{j} ( V_j n_j + {\bf B}_j \cdot {\bf m}_j) \:, \end{equation} where $V_j$ is the scalar potential and ${\bf B}_j$ is the magnetic field on site $j$, the total density is $n_j = n_{j\uparrow} + n_{j\downarrow}$, and the magnetization is given by ${\bf m}_j = \sum_{\sigma,\sigma'} c^{\dag}_{j\sigma} \vec{\sigma}_{\sigma \sigma'} c_{j\sigma'} $ with $\vec{\sigma} = (\sigma_x,\sigma_y,\sigma_z)$ denoting a vector composed of the Pauli matrices. We keep the external field parameters each less than the on-site interaction and hopping, $ V_j ,|{\bf B}_j| < U_0,t_h$. These external field parameters are not strictly set to zero because they can be used to break degeneracy in order to fix a symmetry breaking state, and because, as discussed in Section \ref{sec:III}, small variation of these parameters in the exact model is found to be useful in matching the SDFT initial state and the exact initial state more accurately. \begin{figure*} \includegraphics[width=\textwidth]{BowtiePhaseDiagramV2.pdf} \caption{\label{fig:PD} (a) Magnetic phase diagram of the half-filled 5-site Hubbard model, obtained using exact diagonalization. The red arrows indicate the relative in-plane spin direction of the state depicted (taken at the midpoint angle between the phase boundaries). The blue pluses and minuses indicate the direction of electric polarization for the CDW critical angle states for the specific spin arrangement shown. (b) Corresponding magnetic phase diagram using exchange-only SDFT, showing the broadening of the phase boundary states. The phase diagram has approximately the same states as for the exact diagonalization phase diagram, but the critical angles, where a CDW occurs, acquire a width of a few degrees.} \end{figure*} \subsection{Magnetic phase diagram of the Hubbard bowtie} We use exact diagonalization of $\hat H_{\rm model}$ to construct benchmark solutions with which to compare our SDFT results. Figure \ref{fig:PD}a shows the exact phase diagram of the half-filled Hubbard bowtie in a plane whose $x-y$ axes are defined by $C = (t_h/U_0) \sin\theta$ and $T=(t_h/U_0) \cos\theta$; the SOC angle $\theta$ is here measured with respect to the kinetic energy axis. Similar phase diagrams for the half-filled Hubbard trimer were obtained by Tabrizi {\em et al.} \cite{Tabrizi2019}. Within the above specified regime the model has a phase transition at $\theta_c = n \pi/3$ for any integer $n$. For the case of zero external fields, the ground state of the 5-site model at half filling is degenerate and magnetically ordered with a nontrivial noncollinear spin structure (except at isolated points in the phase diagram where the spins are ferromagnetically aligned) indicating magnetic frustration. On the phase boundary, $\theta_c$, the ground state exhibits a symmetry breaking charge density wave (CDW) in the form of a spontaneous charge polarization along the $x$-axis of Fig.~\ref{fig:geo}. In Fig. \ref{fig:PD}a the states shown outside the phase diagram image are the states at the critical angles $\theta_c$. A specific choice of charge polarization is depicted in order to show the corresponding spin state. The sites with no spin indicated do not necessarily have zero magnetic moment, but it tends to be orders of magnitude smaller. The states shown inside the shaded segments of the phase diagram are those of the midpoint angles between the phase boundaries, e.g. $\theta = 30^{\circ}$. As $\theta$ changes, the relative angles of the spins change as well, with the fastest changes occurring in the vicinity of the phase transitions. Thus, the phase transitions at $\theta_c$ are not discontinuous, rather they appear to be a zero temperature, finite model analog of a second order phase transition, although the continuous transition occurs over a rather narrow range of $\theta$. The complete phase diagram of the ground state of our 5-site Hubbard bowtie and other finite and extended triangular lattice systems is of interest in and by itself, especially with respect to their symmetries. A more complete formal analysis of the phase boundaries and other symmetry-related properties will be the subject of a forthcoming study. \subsection{\label{sec:method3} Exchange-only SDFT} Exact exchange in noncollinear SDFT has been defined in Ref. \cite{Ullrich2018}. Starting point is the exchange energy \begin{equation} E_{\rm x} = - \frac{1}{2} \int \int \frac{d {\bf r} d{\bf r}'}{|{\bf r}-{\bf r}'|} \mathrm{Tr}\Big[\tens{\gamma}({\bf r},{\bf r}') \tens{\gamma}({\bf r}',{\bf r}) \Big] . \label{eq:energy_exchange_hole} \end{equation} Here, $\tens{\gamma}$ denotes the one-particle spin-density matrix, a $2\times 2$ matrix in spin space whose elements are given by $\gamma_{\sigma\xi}({\bf r},{\bf r}') = \sum_j^N \psi_{j\sigma}({\bf r})\psi^*_{j\xi}({\bf r}')$, constructed from two-component spinor Kohn-Sham orbitals, where $\sigma = \uparrow,\downarrow$ and likewise for $\xi$; $\mathrm{Tr}$ is the trace over spin indices. The exact noncollinear exchange potential then follows by minimizing $E_{\rm x}$ with respect to the orbitals, under the constraint that the orbitals come from a single-particle equation with a local potential---this is the so-called optimized effective potential (OEP) approach \cite{Kummel2008}. This approach is system-independent, i.e., it can be defined in real space and for lattice models alike. The exact-exchange OEP requires solving an integral equation; we use here instead a simplification known as the Krieger-Li-Iafrate (KLI) approximation \cite{KLI92}. The construction and numerical solution of the noncollinear KLI approximation have been discussed in detail in Refs. \cite{Ullrich2018,Tancogne2022}. KLI directly yields a scalar exchange potential and an exchange magnetic field with moderate numerical effort and with very little loss of accuracy compared to the full OEP. In time-dependent SDFT, the exact-exchange OEP formally carries a memory \cite{Wijewardane2008}. The time-dependent KLI, on the other hand, is an adiabatic approximation. KLI for noncollinear systems produces exchange torques in extended Hubbard systems \cite{Pluhar2019}. For the purposes of the present study, we also define a projected KLI (KLIp) in which the exchange magnetic field ${\bf B}_{\rm x}$ on each lattice site is projected along the local magnetization direction, and which therefore has no exchange torques. \subsection{SDFT phase diagram} In the SDFT modeling of the Hamiltonian (\ref{eqn:ham}), a similar magnetic phase diagram is obtained as the exact one shown in Fig.~\ref{fig:PD}a. The main difference is that the phase boundaries at the critical angles $\theta_c$ are not as sharp as in the exact case but quite diffuse, as schematically depicted in Fig.~\ref{fig:PD}b. This is mainly due to the well-known tendency of SDFT to prefer symmetry breaking, unless highly accurate correlation functionals are used. The broadened phase boundary region has a tendency to exhibit ``charge sloshing'' \cite{Zhou2018} in the Kohn-Sham self-consistency iterations. Charge sloshing spoils the convergence behavior and must be overcome with special measures, e.g. charge preconditioning or imaginary time propagation \cite{Flamant2019}. A sufficiently strong external potential $V_j$ can also be applied to one side of the model in order to prevent charge sloshing. A fairly strong external potential in the exchange-only SDFT modeling is also necessary in the vicinity of $\theta_c$ in order to match to the exact initial state because correlation effects tend to be stronger close to the phase boundaries (see Sec. \ref{sec:III}). For the simulations of section \ref{sec:D}, where the SDFT calculations are not tethered to an exact initial solution, charge sloshing can arise in the stronger interaction regime, even far from the critical angle $\theta_c$. We found that replacing the Kohn-Sham self-consistency loop with an imaginary time propagation algorithm \cite{Flamant2019} for computing the SDFT ground state was useful in mitigating charge sloshing. \section{Time propagation and choice of initial state} \label{sec:III} In order to compare the dynamics of the exact and TD-SDFT solutions, we excite the system with a small, localized magnetic field burst along the $y$ direction during a brief number of time steps. To propagate the full time-dependent many-body Schr\"odinger equation for our Hubbard bowtie we use a standard Crank-Nicolson algorithm. The time-dependent Kohn-Sham equations are also propagated using Crank-Nicolson, including a pre\-dic\-tor-corrector scheme (one corrector step suffices) \cite{Ullrich2012}. Since our interest is predominantly in the dynamical effects comparing KLI and KLIp, we start in both cases from the same ground state. This means that the exchange torques must be included in the calculation of the KLIp initial state, as this is required in order to have KLIp start with the same initial conditions as the full KLI simulations; however, these torques are frozen in, effectively in the form of an external magnetic field. By contrast, in full KLI the exchange torques are time-dependent as the system evolves. Compared to the differences between exchange-only SDFT and exact many-body benchmarks, the differences between KLI and KLIp are small and can easily be overshadowed. Since we are here interested in relatively subtle dynamical exchange torque effects, it is desirable to start from a KLI initial state with external scalar potential $V_j$ and magnetic field ${\bf B}_j$ chosen to reproduce the exact density and magnetization. With some effort, $V_j$ and ${\bf B}_j$ can be numerically constructed by minimizing the functional \begin{equation} F(V_j,{\bf B}_j ) = \sum_j \left[ (n_j-n_j^{(0)})^2 + |{\bf m}_j -{\bf m}_j^{(0)}|^2 \right], \label{eqn:dist} \end{equation} where $n_j^{(0)}$ and ${\bf m}_j^{(0)}$ are the target density and magnetization, respectively. For each simulation matched to an exact initial state, we minimize $F$ to an accuracy of at least $F=10^{-25}$. The minimization is done via a conjugate gradient method with randomized resets when a local minimum of insufficient accuracy is reached. Searching over $V_j$ and ${\bf B}_j$ of only the SDFT simulations to find the minimum of $F$ is extremely computationally expensive due to the high dimensionality of the parameter space. In order to overcome this issue, we switch to minimizing $F$ with respect to the external fields of the exact solution once $F \lesssim 10^{-4}$. Minimizing with respect to exact solution parameters is less computationally expensive due to the much smoother response of the exact solution to small changes in the external fields. \begin{table} \centering \caption{\label{table} SOC angle $\theta$ and interaction strength $U_0$ for the three ground states considered in Sec. \ref{sec:res4}, the total magnitude of the exact xc torque and the exchange-only torque, and the correlation and exchange energies.} \begin{ruledtabular} \begin{tabular}{c c c c c c} $\theta$ & $U_{0}$ & $\Sigma_{j} |\bm{\tau}_{\rm xc}|$ & $\Sigma_{j} |\bm{\tau}_{\rm x}^{\rm KLI}| $ & $E_{\rm c}$ & $E_{\rm x}$ \\ \hline \rule{0mm}{4mm} $30^{\circ}$ & 1 & $4.2 \times 10^{-2}$ & $2.6 \times 10^{-2}$ & -0.214 & -1.84 \\ $30^{\circ}$ & 3 & $4.8 \times 10^{-2}$ & $1.2 \times 10^{-1}$ & -0.236 & -5.82 \\ $60^{\circ}$ & 1 & $1.3 \times 10^{-4}$ & $2.0 \times 10^{-3}$ & -0.448 & -1.92 \\ \end{tabular} \end{ruledtabular} \end{table} \section{\label{sec:res4} Results and discussion} The model system shown in Fig. \ref{fig:geo} is simple yet exhibits quite a rich range of structural and dynamical behavior. The parameter space to be explored comprises the hopping strength $t_h$, the SOC angle $\theta$, and the interaction strength $U_0$ (fixing $U_1 = U_0/2$). In the following we set $t_h=1$ and limit ourselves to three representative choices of $(\theta,U_0)$ in the magnetic phase diagram. This will already be sufficient to gain insight into the significance of the xc torques. Table \ref{table} gives an overview of the three parameter sets, the ground-state exchange and correlation energies $E_{\rm x}$ and $E_{\rm c}$, and the magnitude of the exact xc torque $\bm{\tau}_{\rm xc}$ and of the exchange-only torque $\bm{\tau}_{\rm x}$. These will be further discussed below. \subsection{\label{sec:A}$\theta =30^{\circ}$, $U_0 = 1$} We first consider the case $\theta =30^{\circ}$, which is in the middle of the spin-frustrated region shown in yellow in the phase diagrams of Fig. \ref{fig:PD}, and for weak interaction strength $U_0 = 1$. The magnetization dynamics comparison of exact, KLI, and KLIp is shown in Fig.~\ref{fig:A}a, which depicts the magnetization along the $y$-direction of a corner site. By construction (see Sec. \ref{sec:III}), all three methods start from the same initial value. \begin{figure} \includegraphics[width=\columnwidth]{30_05v4.pdf} \caption{\label{fig:A} Comparison of exact, KLI, and KLIp modeling for the case of $\theta =30^{\circ}$ and $U_0 = 1$. (a) Dynamics of the $y$-component of the magnetization of a corner site exited by a small, short, local burst of magnetic field in the $y$ direction. (b) Associated spectral amplitude (in arbitrary units), calculated via Fourier transform of the data shown in part (a).} \end{figure} KLI and KLIp stay fairly close to one another for much of the run time due to the relative smallness of the Hubbard interaction, which indicates that the exchange torques are not very important in the chosen regime. For the first few cycles of the precessional motion triggered by the short pulse, exchange-only SDFT is quite close to the exact result. In spite of that, both KLI and KLIp start to diverge significantly from the exact solution around $t=15$, which shows that the correlation effects, although relatively small, eventually start playing a nonnegligible role in the time evolution of the system. To gain further insight, we perform a spectral analysis of the time-dependent data via Fourier transformation of the amplitude of the magnetization oscillations, which reveals the spectrum of magnetic excitations. As shown in Fig.~\ref{fig:A}b, KLI and KLIp agree well with the exact spectrum at low frequencies (up to about a frequency $\omega=3$). At higher frequencies, the SDFT spectra differ from the exact spectra, which may be due to the fact that we are using here an adiabatic approximation which does not produce double or higher excitations \cite{Ullrich2012} and hence does not capture all peaks. However, KLI and KLIp remain very close to each other throughout, illustrating again that exchange torques are insignificant here. \subsection{\label{sec:B}$\theta =30^{\circ}$, $U_0 = 3$} \begin{figure} \includegraphics[width=\columnwidth]{30_15v4.pdf} \caption{\label{fig:B} Same as Fig. \ref{fig:A} but for $U_0 = 3$.} \end{figure} For the second case, we remain at $\theta =30^{\circ}$, away from the phase boundaries, but increase the interaction strength into the moderately strongly interacting regime, at $U_0 = 3$. The real time magnetization dynamics and amplitude spectrum are shown in Fig.~\ref{fig:B}. Clearly, KLI and KLIp start to differ from each other almost right away, which points to the more important role of the exchange torques. At first glance, it is surprising to see that the projected KLI, which has no torques, agrees better with the exact magnetization oscillations, at least for the first few cycles. To explain this, it is helpful to consider the magnitudes of the initial $\bm{\tau}_{\rm xc}$ and $\bm{\tau}_{\rm x}$ given in Table \ref{table}. For $U_0=1$, the sum of the exchange torques is comparable to the sum of the xc torques (within a factor 1.6); at $U_0=3$, on the other hand, the exchange torques are much larger than the xc torques, which suggests that the correlation contribution to the torques becomes relatively much more important. In other words, exchange-only overestimates the torques, and correlation compensates for it. KLIp avoids this overestimation (better no exchange torque at all, than too much of it), and brings the dynamics closer to the exact case. Notice that this could have not been anticipated just from looking at the exchange and correlation energies $E_{\rm x}$ and $E_{\rm c}$ of the initial state, which would have suggested that the exchange is dominant. The Fourier spectrum in Fig.~\ref{fig:B}b is less clear: while both KLI and KLIp seem to reproduce the rough trends of the exact spectrum, it is difficult to say which one of them agrees better. Neither of them captures the details of the exact spectrum particularly well. \subsection{\label{sec:C}$\theta =60^{\circ}$, $U_0 = 1$} \begin{figure} \includegraphics[width=\columnwidth]{60_05v4.pdf} \caption{\label{fig:C} Same as Fig. \ref{fig:A} but for $\theta =60^{\circ}$. } \end{figure} Lastly, we consider the case of $\theta =60^{\circ}$ and $U_0 = 1$, see Fig.~\ref{fig:C}. This state is at a critical angle of the magnetic phase diagram where artificial charge density symmetry breaking in exchange-only SDFT is prevalent, indicating that strong correlations are needed to reproduce the exact results. As shown in Table \ref{table}, $E_{\rm c}$ is significantly enhanced relative to $E_{\rm x}$, compared to the case of $\theta=30^\circ$. Correspondingly, the exchange torques are lower, due to the localization of the magnetization to one side of the system. The strong correlation effects at the transition angle result in both KLI and KLIp diverging from the exact solution fairly quickly. The magnetization oscillations calculated with KLI and KLIp match each other fairly well, at least for the first few cycles, but then differences start to accumulate. The Fourier spectrum, see Fig.~\ref{fig:C}b, has well defined excitations, which are fairly well captured by both KLI and KLIp, but some inaccuracies are noticeable at both high and low frequencies. Notably, KLIp performs slightly better at estimating the gaps in the spectrum for mid-range frequency excitations. The better performance of KLIp occurs, similarly to Section \ref{sec:B}, due to the KLI exchange-only approximation substantially overestimating the xc torques, with no correlation to compensate (see Table \ref{table}). \begin{figure} \includegraphics[width=\columnwidth]{TorquePlot.pdf} \caption{\label{fig:D} Red (right axis): Comparison between KLI and KLIp solutions as a function of interaction strength for the case of $\theta =30^{\circ}$ and $U_0$, quantified by the time-averaged distance measure $F_{\rm ave}$, Eq. (\ref{F_ave}). Blue (left axis): $\Sigma_{j} |\bm{\tau}_{\rm x}^{\rm KLI}| $ of the Hubbard bowtie ground state versus $U_0$. } \end{figure} \subsection{\label{sec:D} Distance between KLI and KLIp versus $U_0$} The effect of the exchange torques can be further quantified by introducing the time-averaged distance measure \begin{eqnarray}\label{F_ave} F_{\rm ave} &=& \frac{1}{t}\int_0^t dt' \sum_j \bigg[ \left(n_j^{\rm KLI}-n_j^{\rm KLIp}\right)^2 \nonumber\\ &+& \left|{\bf m}_j^{\rm KLI} -{\bf m}_j^{\rm KLIp}\right|^2 \bigg]\:, \end{eqnarray} where we calculate the time average over a short time ($t=2$) after initial excitation. This provides an estimate of the degree of divergence between the solutions which can be compared with interaction strength and the magnitude of ground state KLI exchange torques. Figure \ref{fig:D} shows the time-averaged distance measure (\ref{F_ave}) between KLI and KLIp as a function of $U_0$ at $\theta =30^{\circ}$, and, for the sake of comparison, the sum of the magnitudes of the KLI exchange torques of the corresponding initial states. Both $F_{\rm ave}$ and $\Sigma_{j} |\bm{\tau}_{\rm x}^{\rm KLI}| $ start out linearly for small interaction strengths $U_0$ and keep increasing well into the moderate interaction regime, where $F_{\rm ave}$ appears to start leveling off around $U_0=2$. A comparison with exact time-dependent xc torques is, unfortunately, not possible; even the construction of the exact $\Sigma_{j} |\bm{\tau}_{\rm xc}|$ over the whole range of $U_0$ is numerically too demanding, except for the three cases in Table \ref{table}. Nevertheless, we can infer from the results presented in Fig. \ref{fig:D} that both exchange and correlation torques must be accounted for even for relatively low interaction strengths in order to accurately describe the dynamics. \section{\label{sec:con5}conclusion} We have performed exact and approximate, exchange-only (TD)-SDFT calculations on a half-filled 5-site Hubbard cluster with varying interaction and SOC strengths. The purpose of this study was to assess the significance of many-body magnetic torques for the description of spin dynamics. We considered three scenarios with weak and moderate interactions and close to and away from a transition between different magnetic phases. While this is clearly not an exhaustive exploration of the parameter space, the examples studied here are good representatives and allow us to draw meaningful conclusions. We find that exchange torques become increasingly important as non-local interactions become stronger, with an approximately linear dependence at low interactions (see Fig.~\ref{fig:D}), but the relationship becomes nonlinear for more general interaction strengths. Strong correlations in the vicinity of phase boundaries reduce the importance of exchange torques due to localization. When correlations are particularly strong, they appear to counteract the exchange torques, leading to a net reduction of the total xc torques. This suggests that when lacking a sufficiently accurate correlation functional, completely projecting out the xc torques may improve the overall accuracy of TD-SDFT magnetic dynamics, at least for short times. The challenge for future work is clearly to construct correlation functionals that produce accurate torques, and test these against benchmarks. A good starting point will be to do this for similar finite Hubbard models, followed by tests for the magnetization dynamics in real magnetic materials in the linear and nonlinear regime. \acknowledgments This work was supported by DOE Grant No. DE-SC0019109. The authors wish to thank Aurora Pribram-Jones for helpful discussion.
\section{Introduction} \section{Introduction} \label{section:intro} \IEEEPARstart{M}icrowave Photonics (MWP) is the connection between the opto-electronic and radio-frequency (RF) engineering where, in optical methods and devices, high-speed radio-frequency signals are generated, transmitted, controlled, and measured. This technique offers a large amount of processing bandwidth and provides more flexibility for information and communication technology (ICT) systems and networks. As a result, it has become widely used in a variety of applications in recent years, including wireless systems like the fifth-generation mobile communication (5G) \cite{waterhouse2015realizing, romagnoli2018graphene}, optical telecommunications \cite{nureev2018microwave}, broadband photonic signal processors \cite{li2017broadband}, transceiver circuits \cite{chen2017silicon}, medical imaging systems using terahertz (THz) waves \cite{zou2018microwave}, and sensors \cite{hervas2017microwave}. The basic principle of MWP is that analog microwave electrical signals are transmitted through the optical fiber or photonic devices like modulators and detectors, with electrical-to-optical (EO) and optical-to-electrical (OE) transformation on the transmitting and receiving sides of the photonic link, respectively. In biomedical applications, Gaussian pulse is used to detect and locate the exact tumor location by utilizing the modulators \cite{tosi2018fiber}. By reducing the pulse length by expanding bandwidth in these applications, the ability to distinguish close tumors is improved \cite{mukherjee2019time}, which can be applied to next-generation applications that demand more precise identification and distinction. For designing the broadband traveling-wave modulators, there are four fundamental challenges for achieving approved performance: I) matching microwave-optical velocity to avoid excitation of undesired modes on the substrate and negative effects by mismatch caused by phase velocity in optical response, II) reducing losses in microwave electrodes, III) increasing the half-wave voltage ($V_\pi$), IV) improving the impedance of the electrode (almost 50 $\Omega$) to match better and reducing the loss of structure \cite{ren2019integrated,gopalakrishnan1994performance,presti2018intensity}. Using these methods make it possible to increase the modulation depth, so in this paper, we focus on reducing the $V_\pi$ to improve the modulator's response. Theoretically, it has been shown and analyzed that the amplitude of electro-optic (EO) modulation remains stable at the sideband frequency without any losses \cite{rueda2019resonant}. In the experimental case, essential factors like plasmonic losses, impedance mismatching, and microwave optical velocity can decrease the signal's modulation depth and amplitude by increasing sideband frequency. Also, the interaction between modulation voltage and arm length in EO modulators is constant and stable ($V_\pi L$=$\alpha$ where $\alpha$ is constant). Consequently, the arm length under the EO effect increases by decreasing $V_\pi$. According to the bandwidth associated with the time constant ($\tau$) due to the EO arm, the loss drops faster by increasing frequency, and the bandwidth decreases. So in typical cases, between $V_\pi$ and bandwidth, there is a directly proportional relationship. Therefore by increasing the bandwidth, the amplitude of voltage increases too \cite{gopalakrishnan1994performance,sun2018128,sobu201970}. Decreasing mismatching between microwave-optical velocities is one of the recent methods for boosting the bandwidth range of modulator systems by keeping the $V_\pi$ constant \cite{rao2016high}. In that case, it is also possible to decrease the arm length by changing the structure of the modulator, type of excitation, and material of components. The effective light and microwave refractive index neared each other when the plasmonic dielectric and the time constant decreased, and bandwidth rose. The complexity of a modulator increases, so the cost of the modulator structure and the range of bandwidth is not acceptable for new applications like 5G. Another way to achieve the same modulation depth is to use a special material with an improved EO factor. It is possible to achieve more bandwidth range and decrease the losses. Nevertheless, this method is not convenient because of the high cost of this particular material, the incompatibility of this material with the EO integrated circuits, and the low effectiveness of the EO factor \cite{steglich2015novel}. In \cite{demirtzioglou2018frequency}, another method is proposed that by using different resonators (like ring resonators) and features of the EO circuit, it is possible to create a structure with a low amplitude of $V_\pi$. These structures have more complexity than others in manufacturing the devices. Because of the deployment of the resonant feature, the modulation response fluctuates in the range of modulation depths, so the output answer is distorted. Therefore, all of the mentioned methods can only slightly improve the $V_\pi$ or bandwidth of the modulator and cannot significantly improve both parameters simultaneously, so we need to employ simple and low-cost practical applications to enhance the modulator bandwidth and $V_\pi$ without altering the internal structure of the modulator. In this paper, we propose a novel method by which it is possible to use MI phenomena in optic fiber for 5G applications in PAA in transmitting/receiving (T/R) applications. The output to this fiber can repay the attenuation of the frequency response and reduces the required $V_\pi$ of the modulator. In addition, the fiber can increase the power level in an optical link in amplifying and filtering applications \cite{fatome2020polarization}\cite{agrawal2000nonlinear}. Increasing the gain, controlling the beamforming of the array antenna, and having a simple structure are the advantages of this method. One of the main problems in PAAs is beam-squint, which is related to the divergence from the antenna's frequency and the structure of PAAs. Because the number of radiating elements controls the beamwidth in PAAs, a large channel number is necessary for the true-time delay (TTD) to solve the beam-squint problem and improve angular resolution. A convenient method is proposed in \cite{zou2018microwave} that replaces a single fiber and a frequency-comb source with a multiple-fiber and a single source. It is important to note that the number of frequency bands is related to the number of radiated elements. In these structures, the frequency of the difference pulses modulated on each frequency comb causes a time delay between the pulses in a fiber with a suitable dispersion. Therefore, we demonstrate that using the time delay makes it possible to increase the gain and improve the answer of the optical modulator and the bandwidth without adding any complexity to the structure. Also, we propose a new bit-controlled system that can control the directivity angle of PAA only with the length of the fiber. The rest of the paper is organized as follows: In Section II, the MI phenomenon in optical fiber is analyzed. Section III shows the MI effect on $V_\pi$ and performance enhances the intrinsically weak electro-optic development. Section IV introduces the RF and microwave TTD based on Kerr combs and their applications in PAAs. Section V shows a bit-control system based on the fiber length for controlling the beam direction of PAA. \section{Fiber under Modulation instability} \label{section:Modulation instability} Modulation instability (MI) is a nonlinear phenomenon induced by the interaction of non-linearity, dispersion, and diffraction in the presence of an intense optical carrier wave traveling through a nonlinear medium. At the output, the exponential expansion of the spectral sidebands with the carrier wave’s center band is expected. While the carrier is a CW laser optical wave, rapid fluctuations appear as modulated pulse trains \cite{kudryashov2021model,agrawal2000nonlinear}. Because distinct spectral components are associated with the pulse travel at different speeds determined by $\frac{c}{n(w)}$, fiber dispersion is crucial in propagating short optical pulses and optical communication. The effects of fiber dispersion are compensated for by expanding the mode-propagation constant in a Taylor series around the frequency $w_0$ at which the pulse spectrum is centered on accounting for the effects of fiber dispersion, that the representative equation is as follows: \begin{equation} B(w)=\sum_{m=0}^{\infty}\frac{B_m}{m!}(w-w_0)^m \end{equation} The parameters $n(w)$ are group indexes, and $\beta_1$ and $\beta_2$ represent the group delay and dispersion of the group velocity, respectively. The non-linear response of polarization to a strong optical field causes non-linear effects in optical fibers, which is another issue to consider when studying pulse propagation. The lowest-order non-linear effects in optical fibers are the third-order effects since they are constructed of silica, which has an amorphous microstructure. Third-order non-linear phenomena in optical fibers include: The optical Kerr effect, four-wave mixing, stimulated Brillouin scattering, stimulated Raman scattering, and third-harmonic production. The optical Kerr effect has a non-linear reaction that occurs instantly and reacts to light intensity variation. When considering the propagation of strong pulses in optical fibers, both fiber dispersion and non-linearity must be regarded. In that case, using the non-linear Schrodinger equation for optical pulse propagation as follows: \begin{equation} \imath \frac{\partial A}{\partial z}+\imath \frac{\alpha }{2}A-\frac{\beta _2}{2}\frac{\partial^2A}{\partial T^2}+\gamma \left| A\right|^2A=0 \end{equation} where A, $\gamma$, and $\alpha$ are the slowly varying envelope of the optical pulse, the non-linear parameter, and the loss factor of fiber, respectively. Eq. (2) is easily solved to obtain the steady-state continuous radiation solution when the time derivation is ignored. In the case of the lossless response of the laser, the continuous wave for the above equation is a soliton in the form of $\sqrt P_0 e^{i\gamma p_0 z }$ that $P_0$ and $\phi_{NL}=\gamma p_0 z$ are the incident power and the nonlinear phase shift induced by self-phase modulation, respectively. If the steady-state is stable against small perturbations in the power of the laser, the solution is: \begin{equation} A=(\sqrt P_0 +a_1e^{i(Kz-\Omega t) }+a_2e^{-i(Kz-\Omega t) } )e^{i\gamma p_0 z }\end{equation} where K is the wave number and $\Omega$ is frequency perturbation at sideband frequency of laser spectrum \cite{agrawal2000nonlinear}. By replacing Eq. (3) in Eq. (2) it's possible to achieve: \begin{equation} K=\pm \frac{1}{2}\left|B_2 \Omega \right|\left [\Omega^2 +sgn(\beta_2)\Omega_c^2 \right ]^\frac{1}{2} \end{equation} which $\Omega_c$ has an inverse relation with $\beta_2$ and the nonlinear length $L_{NL}$ ($\Omega_c=2/\sqrt{\left| \beta _2\right|L_{NL}}$). When the group velocity dispersion is positive ($\beta_2$ > 0), in all situations, the wave number (K) is real. Also, the steady state is stable in all small perturbations. On other side, when the group velocity dispersion becomes negative ($\beta_2$<0), the wave number is imaginary, and the perturbation increases. Therefore in the negative dispersion, the gain is: \begin{equation} g(\Omega)=\left|\beta_2 \Omega \right| \sqrt{\Omega_c^2-\Omega^2} \end{equation} The maximum gain ($g_{max}$=$2/L_{NL}$) also occurs at frequency $\Omega_{max}=\pm\frac{\Omega_c}{\sqrt2}$. \vspace{0.1cm} Fig. 1, shows the gain spectra for four values of the nonlinear length ($L_{NL}=1km, 4km,7km,10km$) for an optical fiber with $\beta_2=-20 ps^2/km$. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/fig1.eps} \caption{Nonlinear fiber modulation instability gain diagram with the dispersion of the group velocity $\beta_2=-20ps^2/km$ and nonlinear length $L_{NL}$=1km, 4km, 7km, 10km. } \label{MI_gain} \end{figure} By considering frequency deviation on the laser wave, the non-linear fiber with a particular design and under modulation instability amplifies a specific spectral range of carrier sideband. Even more, it can work as a filter in this spectral range. This amplifying/filtering is applied and operated with only the anomalous fiber and does not require a separate pump \cite{devore2013enhancing}. Also, in some long-distance wireless applications that use an array antenna, the signal level received by the receiver is lower than the signal level detected by the receiver. An improved gain performance can maintain the antenna's high transmission capabilities. When antenna systems are required to work at mm-waves for 5G, the communication distances are drastically reduced due to the short wavelengths. Electromagnetic (EM) waves experience a higher signal quality and strength loss by atmospheric attenuations. In this case, achieving high gain is essential to reduce path loss in communication networks. Therefore, by the introduced structure, the modulated signal can be used to be detected by the receiver. The comparison between the power laser as input and the output of fiber under MI conditions is demonstrated in fig. 2. It is essential to note that by the proposed structure, in which the length of fiber is $L=11 km$ and $L_{NL}=3.23 km$, the sideband level is amplified by almost 18 dBm, and also the accessible bandwidth is nearly 20 GHz, which indicates the fundamental of the role of the fiber, especially in the gain case. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/compariosn_two_output.eps}, \caption{Comparison between the output of fiber under MI and power laser wave as input.} \label{compare_in_out} \end{figure} \section{ $V_{\pi}$ challenge in mach Zehnder modulator} \label{section:V_{pi} challenge in mach Zehnder} To design broadband traveling-wave modulators like MZ, one of the fundamental challenges to having approved performance, is raising the $V_{\pi}$ with respect to increasing the frequency. however, in electronic devices like CMOS, this proportion is inverse \cite{golden2021reverse}. The block diagram of the structure's performance of boosting output signal with fiber under MI is demonstrated in fig. 3. With the help of MZ or any similar modulator in this structure, it is possible to modulate the Gaussian pulse on the carrier. Improvement of $V_\pi$ is one of the advantages of this proposed structure. \begin{figure}[!h] \centering\includegraphics[scale=0.3]{photo/fig33.eps} \caption{Block-diagram of EO modulation structure with the fiber under the MI.} \label{diagram} \end{figure} In the improved MZ modulator, the proportional relation between $V_\pi$, input/output power, and instability gain is the following: \begin{equation} P_{RF,out}\propto \frac{1}{V_{\pi}^2}P_{RF,in}G_{MI} \end{equation} Where $P_{RF, in}(w)$, $P_{RF, out}(w)$ and $G_{MI}$ are the input RF power, the output RF power, and modulation instability gain, respectively. MI is stimulated by the sidebands, which results in their expansion at the expense of the carrier. The sideband fields grow by $G_{MI}^{1/2}$ as the sideband power grows by $G_{MI}$. The RF output power is proportional to the $G_{MI}^{1/2}$, as the measured RF current, is caused by carrier-sideband beating. The $V_{\pi}$ necessary to obtain desirable modulation depth is decreased by using the MI in the fiber that leads the MZ modulator. The MI-induced rise of $P_{RF,out}(w)$ by $G_{MI}$, is similar to $V_{\pi}$ decreasing by $G_{MI}^{1/2}$ providing the amplified modulator $V_{\pi}$, according to eq. 7. \begin{equation} V_{\pi,eff}(w_{RF})=V_{\pi}(w_{RF})\frac{L_{Dep}^{1/2}}{G_{MI}^{1/2}(w_{RF})} \end{equation} In this equation, $L_{Dep}^{1/2}$ <1 is the consumption factor for the power carrier. However, in transmitting and receiving communication applications, the modulator performance improves by increasing the gain that reduces the $V_{\pi,eff}$ and also helps to facilitate the detection of the received signal. It is important to note that the pulse amplification created by a fiber under MI, is spontaneous and does not need a separate amplifier or another pump. Fig. 4 shows the comparison of the $V_{\pi}$ in the improved MZ at different non-linear lengths. Therefore, it is possible to achieve the improvement at $V_{\pi}$ with MI. In addition, in photonic microwave structures, the signal-to-noise ratio (SNR) is related to the inverse square of the $V_{\pi}$, which, due to its decrease, increases the SNR and channel capacity. With respect to the bandwidth and the amount of gain, we should design the fiber with particular parameters. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/Vpi2.eps} \begin{picture}(3,3 \put(10,110){$V_\pi \propto f $} \put(-50,65){$V_{\pi,eff} \propto V_{\pi}/{G_{MI}^{1/2}}$} \end{picture} \caption{Comparison of $V_\pi$ between improved MZ with different $L_{NL}$ and normal MZ. } \label{half_wave voltage comparison} \end{figure} \section{True time delay in phase array antenna} \label{section:True time delay in phase array antenna} TTD is one of the essential methods for solving beam-steering and beamforming problems in wideband PAA communication systems. Large bandwidth, immunity to electromagnetic and low loss are some of the advantages of the optical domain that it is possible to implement with the TTD. In 5G communication wireless, beamforming can be used to offer high array gains at both the transmitter (TxBF) and receiver (RxBF), resulting in increased SNR and more radio link margin that mitigates propagation route loss. Multiple beams can be merged at the receiver to reduce path loss even more. Furthermore, interferences can be decreased, and frequency reuse can be improved using appropriate beamforming technology. One of the simplest ways to implement TTD in MW is to use parallel and separate fibers with low dispersion. The changing of the time delay is based on the differential length between the fiber corresponding to the adjacent radiation element in PAA. However, using an individual fiber for each radiation element (multi-fiber structure) as the exciter makes the structure bulky and expensive. A convenient method is proposed in \cite{xu2018photonic} that uses a single fiber with a frequency-comb source instead of a multiple-fiber with a single source. It is important to note that the number of frequency bands is related to the number of radiated elements ($M$). In these types of structures, the differential frequency of modulated pulses on the adjacent frequency combs generates a time delay between the pulses in fiber with an associated dispersion. Eq. 8 displays the relation between the TTD and the length of the fiber ($L$), in which $D$ and $\Delta\lambda$ represent the fiber's dispersion and the difference between adjacent comb wavelengths, respectively. \begin{equation} \Delta\tau=DL \Delta\lambda \end{equation} According to eq. 8, the theoretical value of optical true time delay (OTTD) with a relatively large free spectral range (FSR) of 200 GHz ($\Delta\lambda$ =~1.606 nm) and assuming the length of fiber equivalent to 11km, is achieved as 0.136 ns. Therefore, the time delay depends on the length of the fiber, dispersion, and the frequency distance between each pulse. \begin{equation} \Theta_0=sin^{-1}\frac{c.mT}{d_{PAA}} \end{equation} In eq. 9 it is clear that modifying the steering angle can be tuned by two methods: first, it can be accomplished by changing the FSR. Second, based the eq. 8 by changing the fiber length, and without changing the type of fiber. In the first method, the desired frequency range is chosen from the frequency combs by using a filter. On the other hand, the second method is more practical and considered because of its facility. In an array antenna, beamforming based on TTD has an essential role in communication systems because it shows excellent operating frequency and bandwidth performance. Low loss and immunity to electromagnetic interference are benefits that increase the quality of wireless communications. The array antennas consist of the same and uniformly spaced radiating where $\theta_0$, $d_{PAA}$ and $c$ are radiating steering angle, spacing between each element, and speed of light in the vacuum space, respectively. \begin{figure}[!h] \centering\includegraphics[clip,trim={1.7cm 2.5cm 1cm 2.5cm},scale=0.6]{photo/crazing_ttd.eps} \caption{ Simulated beam patterns of 3 microwave frequencies with TTD-based beamformer and a phase shifter based beamformer at 42 degrees.} \label{ttd and non ttd pattern} \end{figure} Fig. 5 gives us a piece of important information. Without using the TTD, the antenna's beam is dispersed and does not point to the same point. In another case with TTD, it is possible to coordinate the beam of the array antenna in the same direction in all three frequencies at 26, 28, and 31 GHz. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/final_out.eps} \caption{Output of the frequency comb with FSR=200 GHz. } \label{fig:comb1} \end{figure} Fig. 6 shows the system response is improved due to the frequency comb source with Fsr = 200 GHz with central carrier frequency 193 THz. Also, fig. 7 demonstrates the comparison between the output of the central frequency comb and the output signal without using fiber under MI. So we can comprehend that level of the power of the output signal is increased by almost 14 dBm and the bandwidth, in that case, is 17 GHz. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/zoom_output_frequncy_combs.eps} \caption{Comparison of the output of the Mach-Zehnder modulator under MI phenomenon vs. without MI phenomenon. } \label{fig:combss} \end{figure} \section{beamforming bit-controller system} \label{section:results} Multiplexing techniques in the time, frequency, code domains, and spatial domains have been essential research areas to meet the increasing demand for spectral efficiency in fifth-generation mobile wireless communication systems. Because of its steering capability and compactness, a PAA is now widely utilized to achieve microwave beamforming. With a sufficient correlation between the PAA, adaptive beamforming applies to closely spaced antenna arrays. Therefore it is possible to improve network coverage, increase signal quality and exploit the array gain. Fig. 8 demonstrates the microcomb based on a microwave TTD beamformer by arbitrary bit-control. Pumping a non-linear microresonator with a continuous wave laser produces a broadband optical frequency comb. \begin{figure}[!h] \centering\includegraphics[width=9.3cm,height=6.5cm]{photo/control3.eps} \caption{Structure of modulation instability with micro comb based microwave TTD beamformer with the bit-controller-based length of the fiber.} \label{microcomb structure} \end{figure} With the help of the Mach-Zehnder, the microwave signal modulates on the frequency comb source, which is then carried by fiber under MI. Also, this fiber can boost input signals level. A spectral shaper forms a programmable dispersion matrix in the next step. With respect to exaggerating the time delay achieved due to fiber under MI, we use a fiber with positive dispersion $\beta_2>0$. This elaborated solution has two benefits: first decreases the overstate time delay that is appropriate for PAA, and second, controlling the time delay for PAA by tuning the minimum time step. The minimum and maximum fiber lengths used in the control system are $L$ and $15L$. To have the minimum time delay, we proposed the equation $D_1 L_1 = D_2 L_2$, in which $D_1$ and $L_1$ are parameters of the fiber under MI. $D_2$ and $L_2$ are the parameters of the fiber which are used in the control system. This time delay can be increased with respect to decreasing the $D_2$ or $L_2$. The dispersion matrix is built around a binary delay line of optical switch devices and dispersive fibers (four bits are illustrated in fig. 8). By using the controlling system, it is possible to tune the length of the fiber, so it is available to control the time delay. After that, the comb line is photo-detected and de-multiplexed. Then the generated microwave signals are amplified and sent to an antenna array. The beam pattern can be controlled by shaping the comb spectrum with the spectral shaper, and the beam direction can be controlled by switching the dispersion matrix. Fig. 9 shows the time delay state for PAA that minimum time delay is $\Delta\tau=1.44 ps$. Therefore by changing the binary code, we can tune and control the time delay. So by changing the time delay, the beam of PAA will change. \begin{figure}[!h] \centering\includegraphics[scale=0.6]{photo/Time-delay_lenear.eps} \caption{Time delays of the comb lines with the dispersion matrix through the states from “0001” to “1000”.} \label{fig:combdelay} \end{figure} For tuning the angle of the PAA's main beam with the time delay between two radiating elements, we adjust the fiber length with the controlling system. The wavelength of the laser is fixed at 1550 nm. Based on 4-bit, the target controlled fiber in the dispersion matrix is 115 m, 57.5 m, 28.75 m, and 14.375 m. \begin{figure}[!h] \centering\includegraphics[scale=0.25]{photo/control_M.eps} \caption{Comparison of the simulated pattern at 26, 28, and 31 GHz for three different angles 8, 24, and 40 degrees.} \label{fig:figure} \end{figure} Fig. 10 (a) and fig. 10 (b) show the simulated radiation patterns for 4 and 8 array antennas for three different cases at 26, 28, and 31 GHz, respectively. The antenna's phase offset was adjusted to direct the peak lobe at a specific angle. The distance between sub-antennas is 5.4 mm, which is half the microwave wavelength of 1.08 cm. The $\omega_0$ represents the reference angular frequency, where the value is 2$\pi\times$193 THz. The beam shape is Gaussian. The beam direction is 42.7 degrees, and the dispersion matrix state is "1010". For comparison, we also calculated the beam patterns for a phase shifter controlled PAA. All the frequencies in the PAA are assumed to be the same as the 26, 28, and 31 GHz. The rotation angle of cooperative beam-forming, which is constructed and controlled by the bits are 1101, 1001, and 0101 and with respect to the vertical axis, being nearly 8 (a), 24 (b), and 40 (c) degrees, respectively. By increasing the number of radiating elements, the pattern of the array antenna is narrow, and the effect of the back lobe decreases. So for high-technology of wireless communication, it is better to increment the number of antennas to achieve accurate results. \section{Conclusion} The Mach-Zehnder modulator's function and efficiency using MI are developed for even transmitting and receiving 5G applications. With respect to the instability gain of the carrier sideband frequency at the MI phenomenon, we demonstrate that we can improve the $V_\pi$ in MZ modulator. At first, by using laser power as a carrier and the fiber under MI, we achieved 18 dBm and 20 GHz for the sideband's gain and bandwidth, respectively. With the help of the MZ, we modulated the frequency comb on the carrier with the central frequency 193 THz, so the gain is 14 dBm, and the bandwitdh is 17 GHz. By using the fiber under MI, we increment the power of the input without adding any external device like a pump or making the structure complex. To avoid the beam-squint, used the TTD technique to create a constant time delay for every side radiation element in PAA. In TTD, instead of employing many fibers for the excitation of PAA's radiation element, we used a frequency comb with FSR=200 GHz. The patterns by using TTD and then comparing them without using TTD for beamforming at 26, 28, and 31 GHz frequencies are shown, respectively. The beam is controlled with a bit-control system by using normal fiber with a length of 2.75 km. The bit-control creates the minimum time delay=1.44 ps showing three patterns in 8, 24, and 40, degrees with respect to 1101, 1001, and 0101 binary bit-control. \bibliographystyle{IEEEtran}
\section{Overview on Computational Models} \label{sec:compmodels} In all high-power particle accelerators "one of the major limitations is particle losses. Losses may be controlled, resulting in beam particles impinging on dedicated equipment such as collimators, or uncontrolled, resulting in beam particles striking other equipment around the accelerator. Uncontrolled losses can damage and activate any equipment in the accelerator and so must be minimized. Controlled losses need to be carefully considered and also minimized. The amount and cause of loss are investigated by modeling accelerators using simulation codes that model numerically the behaviour of beams. A review of available numerical codes can be found in the article of Smirnov~\cite{PhysRevAccelBeams.20.124801}. In this paper modeling capabilities available in OPAL are discussed in more detail \cite{OPAL-Manual}. \subsection{Single particle modeling} For conventional cyclotrons (and FFAs) the single particle tool box is established and many different codes variants exists ~\cite{PhysRevAccelBeams.20.124801}. For cyclotrons and (horizontal FFAs) the existing tools seem to be comfortable and accurate. New machines like vertical FFAs, currently studied for example at the Rutherford Appleton Laboratory (RAL)~\cite{PhysRevAccelBeams.24.021601}, require non--trivial modifications to the existing codes. These modifications are on the way for example in the code OPAL \cite{OPAL-Manual} and expected to be available in second quarter of 2022. Recently, in the context of very high field and ultra compact H$^-$ cyclotrons beam stripping losses of ion beams by interactions with residual gas and electromagnetic fields are evaluated~\cite{PhysRevAccelBeams.24.090101}. The beam stripping algorithm, implemented in OPAL, evaluates the interaction of hydrogen ions with residual gas and electromagnetic fields. In the first case, the cross sections of the processes are estimated according to the energy by means of analytical functions (see Sec. II-A c\cite{PhysRevAccelBeams.24.090101}). The implementation allows the user to set the pressure, temperature, and composition of the residual gas, which could be selected for the calculations as either molecular hydrogen (\ensuremath{\mathrm{H}_2^+}\xspace) or dry air in the usual proportion. For precise simulations, a two-dimensional pressure field map from an external file can be imported into OPAL, providing more realistic vacuum conditions. Concerning electromagnetic stripping, the electric dissociation lifetime is evaluated through the theoretical formalism (see Sec. II-B \cite{PhysRevAccelBeams.24.090101}). In both instances, the individual probability at each integration step for every particle is assessed. A stochastic process is used to evaluate if an interaction occurs. In this case the particle will be stripped and removed from the beam, or optionally transformed to a secondary heavy particle, dependent on the interaction. In this case, the secondary particle will continue its movement but with the new particle properties. \subsection{Large Scale Multiparticle Modeling} In general, modeling losses in high intensity accelerators require 3D space-charge and sufficient simulation particles. Recent investigations \cite{MURALIKRISHNAN2021100094} propose a sparse grid-based adaptive noise reduction strategy for electrostatic particle-in-cell (PIC) simulations. By projecting the charge density onto sparse grids, high-frequency particle noise is reduced and hence an optimal number of grid points and simulation particles can be obtained. For a 3D Penning trap simulation, a maximum speedup of 2.8 and 15 times memory reduction has been obtained. This method is already integrated into OPAL. \subsection{Surrogate Model Construction} Cheap to evaluate surrogate models have gained a lot of interest lately. Statistical \cite{adelmann_2019} or machine learning techniques are used \cite{info12090351}. These models can for example replace a computationally heavy model in a multi-objective optimization \cite{adelmann-2020-1} or in the future be part of an on-line model. Some surrogate modeling algorithms may include an intrinsic estimator for the model uncertainty \cite{frey_2021}. \section{Physics Modeling} In this section we show latest additions to the open source code OPAL \cite{OPAL-Manual} regarding cyclotron and FFA modeling capabilities. \subsection{Modeling H- Injection and Painting in Vertical and Horizontal FFAs} Fixed Field Accelerators (FFAs) have fixed magnetic fields, like cyclotrons, but increase bending field with momentum and hence more compact designs can be realized. FFAs offer the power efficiency of cyclotrons combined with the energy reach of synchrotrons. FFAs have never been used for high power proton acceleration, however in OPAL the necessary models are available for design. Single particle tracking has been benchmarked against the KURNS FFA \cite{Sheehy:2015cji}. A design for a 3-12 MeV H- FFA prototype ring is being pursued at RAL as a prototype for a MW-class neutron spallation source \cite{PhysRevAccelBeams.24.021601}. Scaling horizontal orbit excursion (hFFA) and a vertical orbit excursion (vFFA) FFA are both under consideration. Both are non--isochronous machines using RF cavities with variable resonant frequency. Injection is planned using charge exchange of H$^-$ to H$^+$ and phase space painting. In hFFAs, magnetic rigidity varies with radius. The dipole field varies as \cite{PhysRev.103.1837} \begin{equation} B_z(z=0) = B_0(\psi) \left(\frac{r}{r_0}\right)^k. \end{equation} $B_0(\psi)$ is the dipole field as a function of a normalised azimuthal coordinate $\psi$, $r$ is the radial coordinate, $r_0$ is a nominal (user-defined) radius, and $k$ is the field index. The field away from the midplane, at $z \neq 0$, may be calculated using a recursion relation arising from consideration of Maxwell's equations in free space. OPAL has capability to calculate the expansion to arbitrary order, within machine precision. The normalised azimuthal coordinate \begin{equation} \psi = \phi - \tan(\delta) \ln\left(\frac{r}{r_0}\right) \end{equation} is a measure of distance around the ring. Here $\phi$ is the geometrical azimuthal angle and $\delta$ is the spiral angle; for a sector FFA magnet $\delta = 0$ and $\psi = \phi$. The arrangement of fields in this way guarantees that single particle trajectories and optical parameters at all orders scale exactly with momentum. In vFFAs, magnetic rigidity varies with height. As particles are accelerated, the closed orbit changes height. Successive acceleration kicks add incoherently, so overall the beam follows the closed orbit with no appreciable emittance growth. Rectangular vFFA magnets have been implemented in OPAL, with a dipole field that varies as \cite{PhysRevSTAB.16.084001} \begin{equation} B_0(x_{v}=0) = B_0(s_{v}) e^{mz_{v}}. \end{equation} $z_{v}$ is the height, $s_{v}$ is a nominal longitudinal coordinate and $x_{v}$ is a nominal horizontal coordinate in the rectangular coordinate system of the magnet. $B_0$ describes the dipole field variation with longitudinal distance. A $\tanh$ model is available for vFFA fields. $m$ is the vFFA field index, roughly equivalent to the field index $k$ in hFFAs. Fields away from the plane having $x_v=0$ are calculated using a field expansion derived from consideration of Maxwell's laws. It is noted that the focusing in the magnet body is, to linear order, skew quadrupole. The fringe field has solenoid components parallel to $s_v$ that may be significant for short magnets. This arrangement of fields guarantees that trajectories and optical functions are identical as momentum increases, barring a vertical displacement. In particular, the path length of the beam is independent of momentum, the momentum compaction factor is exactly 0 and ultra-relativistic particles are isochronous. In order to model injection into the FFA, OPAL was extended with models for: \begin{itemize} \item horizontal \& vertical FFA magnets as described above; \item variable frequency RF cavities; \item arbitrary order multipoles with maxwellian fringe fields; \item foil model (scattering and energy loss); \item pulsed injected beam; and \item pulsed multipoles. \end{itemize} All but the latter two features are available in the latest version of OPAL. This enabled a fully four-dimensional simulation of the injection system, including consideration of effects such as appropriate phasing of the pulsed dipoles and transverse breathing of the beam arising due to initial longitudinal mismatch at injection. As an example, a schematic of an injection system and associated parameters for the 3-12 MeV test ring is shown for a horizontal FFA in Fig. \ref{fig:hffainjection}. Owing to the compact nature of the ring, the injection system is spread across a number of cells. H$^-$ are brought into the ring and onto a foil. Bump magnets in the ring distort the proton closed orbit so that particles passing through the foil are returned to a nominal closed orbit. The foil is placed inside the defocusing (D) dipole magnet so that the distorted H$^+$ closed orbit and H$^-$ beam, initially separated, are brought onto the same trajectory. Electrons are stripped from the H$^-$ leaving H$^+$ (protons). The bump magnets are slowly varied, so that the proton closed orbit is moved away from the injection point for the H$^-$ and newly injected particles are at higher horizontal amplitude. In the H$^-$ injection line, pulsed magnets move the H$^-$ upwards so that newly injected particles are at higher vertical amplitude. Overall, a correlation is introduced between horizontal and vertical amplitude. Sample trajectories and bump magnet field strengths for the magnets in the ring are shown in Fig. \ref{fig:hffainjection}. In this example vertical bumpers are not considered - they are all kept at 0 T field. The beam following injection is shown in fig. \ref{fig:hffainjectedbeam}. \begin{figure} \begin{subfigure}{0.5\textwidth} \vspace{-3.5cm} \includegraphics[width=\textwidth, trim={5cm 0 4cm 0}]{hffa_schematic} \end{subfigure} \begin{subfigure}{0.5\textwidth} \includegraphics[width=0.94\textwidth]{hffa_co} \includegraphics[width=\textwidth]{hffa_fields} \end{subfigure} \caption{Injection system for the hFFA (Left) field map of the hFFA, calculated using OPAL, with labels indicating the position of injection equipment (top right) closed orbits for different bump magnets (bottom right) required bump magnet fields.} \label{fig:hffainjection} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{h_inj_2} \includegraphics[width=0.5\textwidth]{h_inj_3} \caption{Beam (left) after injection is completed, but still on a distorted orbit (right) following collapse of the bump. $x$ is the position of the beam relative to the ring centre and $y$ is the height of the particle above the midplane. Particles are coloured according to the injection turn.} \label{fig:hffainjectedbeam} \end{figure} \subsection{Beam stripping interactions} Beam transmission optimization and loss characterization, where beam stripping interactions are a key issue, play an important role in the design and operation of compact cyclotrons. A beam stripping model has been implemented in the three-dimensional object-oriented parallel code OPAL-cycl, a flavor of the OPAL framework. The model includes Monte Carlo methods for interaction with residual gas and dissociation by electromagnetic stripping. The model has been verified with theoretical models and it has been applied to the AMIT cyclotron according to design conditions \cite{PhysRevAccelBeams.24.090101}. \subsection{Spiral inflector modeling} In \cite{winklehner:spiral} a spiral inflector model implemented in OPAL is presented, that enables us to run highly realistic simulations of the spiral inflector system of a compact cyclotron (c.f.\ Fig.\ \ref{fig:spiralinject}). A new geometry class and field solver can handle the complicated boundary conditions posed by the electrode system in the central region of the cyclotron both in terms of particle termination, and calculation of self-fields. Results are benchmarked against the analytical solution of a coasting beam. As a practical example, the spiral inflector and the first revolution in a $1$ MeV/amu test cyclotron, located at Best Cyclotron Systems, Inc., are modeled and compared to the simulation results \cite{PhysRevAccelBeams.20.124201,Alonso_2015}.\ In conclusion, OPAL can handle realistic and arbitrary boundary geometries. Simulated injection efficiencies and beam shape compare well with measured efficiencies and a preliminary measurement of the beam distribution after injection. \begin{figure} \begin{subfigure}{1.\textwidth} \centering\includegraphics[width=0.6\textwidth]{spiral-1} \end{subfigure} \caption{Spiral inflector with selected particle trajectories from an OPAL simulation. The beam enters axially (from the top) through an aperture (grey) and is bent into the mid-plane by a combination of the electrostatic field generated by the spiral electrodes (green and blue) and the cyclotron's main magnetic field. Then it is accelerated by the two Dees (copper, Dummy-Dees not shown) \cite{winklehner:spiral}.} \label{fig:spiralinject} \end{figure} \subsection{Neighboring Turn Modeling} This article presents a hardware architecture independent implementation of an adaptive mesh refinement Poisson solver that is integrated into the electrostatic Particle-In-Cell beam dynamics code OPAL. The Poisson solver is solely based on second generation Trilinos packages to ensure the desired hardware portability. Based on the massively parallel framework AMREX, formerly known as BoxLib, the new adaptive mesh refinement interface provides several refinement policies in order to enable precise large-scale neighbouring bunch simulations in high intensity cyclotrons. The solver is validated with a built-in multigrid solver of AMREX and a test problem with analytical solution. The parallel scalability is presented as well as an example of a neighbouring bunch simulation that covers the scale of the later anticipated physics simulation \cite{frey2021architecture}. \begin{figure} \begin{subfigure}{1.\textwidth} \centering\includegraphics[width=0.6\textwidth]{neigh-turns.png} \end{subfigure} \caption{ Integrated projection of the electric field component $E_{x}$ onto the xy-plane showing 7 adjacent particle bunches \cite{frey2021architecture}.} \label{fig:neigh-turns} \end{figure} \section{Path Forward} While statistical and machine learning techniques have a lot of potential, high fidelity physics simulations will always be used to, for example, produce the training set. In case of high-intensity machines we will need large numbers of particles and the associated fine mesh to solve the PDE in question. It is imperative that we make use of existing and future high performance infrastructure. A performance portable implementation \cite{frey2021architecture} is of utmost importance. The OPAL collaboration \cite{OPAL-Manual} is in the progress to completely rewrite the code according to the sketch in Fig. \ref{fig:opalx}. With this new architecture we will be able to make efficient use of Exascale-Architecture that will come online soon. \begin{figure}[htbp] \centering \includegraphics[width=.8\textwidth,clip]{opalX} \caption{\label{fig:opalx} Outlook of the future OPAL architecture, targeting in a performance portable way future exascale architectures.} \end{figure} The core algorithms of OPAL are already performance portable as demonstrated in \cite{2205.11052}. \acknowledgments The authors acknowledge the OPAL developer team for their continued support of this open source, community-driven code.
\section{Introduction} High temperature minerals are ubiquitous in the cold outer solar system small bodies. One of the earliest remote sensing detections was for crystalline silicates (CSs) such as olivines and pyroxenes in the grains of comets 1P/Halley, D/1993 F2 (Shoemaker-Levy), C/1987 P1 (Bradfield) \citep{hanner1}, and C/1993 A1 (Mueller) \citep{hanner2}. Subsequent detections were made in comets C/1995 O1 (Hale-Bopp) \citep{hayward,crovisier1997,wooden}, 103P/Hartley \citep{crovisier2000}, and more recently 17P/Holmes \citep{shinnaka}. On the other hand Calcium-Aluminum inclusions (CAIs) that form at even higher temperatures were found in the dust collected by \textit{Stardust} in comet 81P/Wild \citep{brownlee}. We refer the reader to the observational review of \cite{mumma} for more informations. The presence of CSs have been a primary challenge to solar system formation models for decades, as the thermal conditions in the outer protoplanetary disk are not conducive to their formation locally. {CSs can form starting from amorphous silicates through either direct vaporization followed by re-condensation at temperatures higher than $\sim$1800 K, or thermal annealing for T$>800$ K. Annealing is a physical process where sufficiently energetic molecules of a solid slowly regroup into a crystal lattice. This mechanism is not instantaneous and necessitates high temperature exposure for a period of few weeks followed by slow cooling \citep{gail1998,gail2001}. In typical protoplanetary disks, direct condensation can be active only inside $\sim$ 0.1 AU, and annealing is inefficient outside $\sim$ 1.5 AU.} Moreover, there is no acceptable mechanism to transport these particles from the inner disk to the comets formation region. Earlier transport models relied on turbulent diffusion \citep{morvan}, but recent ALMA observations suggest that protoplanetary disks are laminar \citep{Flaherty2015,Flaherty2018}, and thus this mechanism is unlikely to be efficient. Large scale outward advection in the disk's midplane has also been proposed \citep{hughes}, but 3D MHD simulations ruled out the presence of such advection \citep{fromang}. Another possible transport mechanism is photophoresis \citep{mousis}, but this necessitates a relatively large (1-2 AU) central hole in the disk. Finally, \cite{alidib2015} proposed that FU-Ori outbursts might form these particles in situ, but this depends on the outburst trigger radius being large enough, which is uncertain. Here we show how high temperature minerals form naturally, and in-situ, in the envelopes surrounding low mass proto-planets embedded in the disk. We present models showing that the temperatures and pressures at the base of these envelopes easily reach conditions that allow for the formation of crystalline silicates through direct vaporization and re-condensation. Primordial amorphous silicates are thus accreted and then thermally processed in these envelopes, before finally getting ejected back to the disk as crystalline particles via convective diffusion. {We emphasize that this work concerns the formation of generic CSs such as olivines and pyroxenes, and not necessarily chondrules and CAIs due to their additional formation-time constrains that are outside the scope of this work. We present our model in section 2, results in section 3, and conclude in section 4. } \section{Model} We model the atmosphere using the standard atmospheric structure equations. The equation of hydrostatic equilibrium is given by: \begin{equation} \frac{dP}{dr} = -\frac{GM}{r^2}\rho(r) \end{equation} {and we define the temperature gradient equation starting from the standard assumption that heat can be transported using either radiation (if the local envelope is convectively stable) or adiabatic convection (if unstable). It is hence written as: } \begin{equation} \frac{dT}{dr} = \nabla \frac{T}{P} \frac{dP}{dr} \end{equation} {where $\nabla$ is defined, starting from the Schwarzschild convective stability criterion ($\nabla_{\mathrm{rad}}<\nabla_{\mathrm{ad}}$), to be $\nabla = \text{min}(\nabla_{\mathrm{ad}}, \nabla_{\mathrm{rad}})$. Here $\nabla_{\mathrm{ad}}$ is the adiabatic gradient}: \begin{equation} \nabla_{\mathrm{ad}} \equiv\left(\frac{d \ln T}{d \ln P}\right)_{\mathrm{ad}} = \frac{\gamma - 1}{\gamma} \end{equation} where the adiabatic constant $\gamma = 1.5$. $\nabla_{\mathrm{rad}}$ is the radiative gradient: \begin{equation} \nabla_{\mathrm{rad}} \equiv \frac{3 \kappa P}{64 \pi G M\sigma T^{4}} L \end{equation} where $L$ is the envelope's luminosity generated by accretion at a rate $\dot{M}_{acc}$ : \begin{equation} L=\frac{G M \dot{M}_{acc}}{R_c} \end{equation} {$R_c$ is the core radius,} and $\kappa$ is the opacity that we define following \cite{ormel} as: \begin{equation} \kappa=\kappa_{\mathrm{gas}}+\kappa_{\mathrm{gr}} \end{equation} with: \begin{equation} \label{grainopeq} \kappa_{\mathrm{gr}}=\kappa_{\mathrm{geom}} Q_{e} = \frac{3Z_{gr}}{4\rho_s a}\times min( \frac{0.6\pi a}{\lambda_{max}} , 2) \end{equation} where $Z_{gr}$ is the grains abundance, $a_s$ their size, and $\rho_s$ their internal density. we use $\rho_s = \ 3 \ g/cm^3$ for both the core and the dust particles. The equilibrium dust size in the envelope $a_s$ is set by two competing processes: grain growth through coagulation \citep{ormel} and grain collisional destruction \citep{alidibthompson}. The relative relevance of these two processes is decided mainly by whether the collisional speeds reach the silicate fragmentation threshold ($V_f \sim$ 100 cm/s, \cite{blum}). The collisional speed is approximated here as the largest among the dust's convective velocity $V_{\mathrm{con,d}}$ (eq. \ref{vcondust}) and the dust's radial drift velocity: \begin{equation} V_{\mathrm{drift,d}} = \tau_{\mathrm{stop}} \frac{GM}{r^2} \end{equation} where $\tau_{\mathrm{stop}}$ is the stopping time. As discussed in \citep{alidibthompson}, collisions in these envelopes are likely to be destructive. This leads to a small characteristic dust size, increasing the opacity (thus growing the convective zone), and decreasing the vaporization timescale. Here we only select models where max($V_{\mathrm{con,d}}$,$V_{\mathrm{drift,d}}$) is higher than 100 cm/s everywhere in the disk. The convective fragmentation dust size is hence calculated following \citep{alidibthompson} as: \begin{equation} \label{aconveq} a_{s,conv} = \frac{4\pi V_f^2r^3\rho_g^2c_g}{L\rho_s} \end{equation} where $\rho_g$ and $c_g$ are the gas' density and sound speed. The drift fragmentation dust size is given by: \begin{equation} a_{s,drift} = \frac{V_f r^2 \rho_g c_g}{GM\rho_s} \end{equation} with finally $a_{s}$=min($a_{s,conv}$,$a_{s,drift}$). Note that $a_{s,conv}$ is defined everywhere in the envelope, since, as discussed below, we also only select fully convective envelopes. For this approach to be applicable, the particles need to reach the local fragmentation threshold at every point in the envelope. Therefore, for self-consistency, we only keep models where the mean free time for collisions is shorter than the convective timescale. In the convective fragmentation regime this can be written as: \begin{equation} \label{cond1} \frac{a_s}{a_s+4 \ell_g / 9}<9 Z_{gr}^2 \frac{\rho_g}{\rho_s} \mathcal{M}_{\operatorname{con}} \frac{r}{\ell_g} \end{equation} where $\mathcal{M}_{\operatorname{con}}$ is the convective Mach number, and $\ell_g$ the mean free path of the gas. In the drift regime this is replaced by : \begin{equation} \label{cond2} \frac{3}{4 Z_{gr}} \frac{c_g^2 r}{G M} \frac{\mathcal{M}_{\mathrm{con}}}{1+9 a_s/ 4 \ell_g}<1 \end{equation} The gas opacity is given by: \begin{equation} \kappa_{\mathrm{gas}}=10^{-8} \rho^{2 / 3}_{g} T^{3} \end{equation} Finally we close the system with the ideal gas equation of state $P=\rho_g k_B T/\mu$. We solve these equations by integrating inwards from the outer boundary at R$_{\rm out}$, the minimum of the Bondi and Hill radii, to the core. We assumed the disk is radiative and calculate its temperature and density following \cite{alidibcumming}: \begin{equation} T_d = 373 \ r_{au}^{-9/10} K \\ \ \ \mathrm{and} \ \ \rho_d = 1.7\times 10^{-10} \ r_{au}^{-33/20} g/cm^3 \end{equation} Once we have the envelope's thermal structure, we can calculate additional quantities needed for the subsequent analysis. We calculate the silicate particles vaporization rate as : \begin{equation} \frac{1}{a_s}\frac{d a_s}{d t}=-\left(\frac{\mu_{\mathrm{Sil}}}{2 \pi k T}\right)^{1 / 2} \frac{P_{\mathrm{Sil}}^{\mathrm{sat}}}{\rho_s a_s} \end{equation} with \citep{Krieger}: \begin{equation} P_{\mathrm{sil}}^{\mathrm{sat}}(T)=3.2 \times 10^{14} e^{-\left(6 \times 10^4 \mathrm{~K}\right) / T} \end{equation} and hence the silicate grains vaporization timescale is given by : \begin{equation} \tau_{vap,sil} = \bigg(\frac{1}{a_s}\frac{d a_s}{d t}\bigg)^{-1} \end{equation} We define the gas and dust convective velocities respectively as: \begin{equation} V_{\mathrm{con,g}}= \bigg(\frac{L}{4\pi r^2 \rho_g}\bigg)^{1/3} \end{equation} where we assumed that in the convective zone the energy is entirely transported through adiabatic convection, and \begin{equation} \label{vcondust} V_{\mathrm{con,d}} \sim V_{\mathrm{con}}\left(V_{\mathrm{con}} \tau_{\mathrm{stop}} / r\right)^{1 / 2} \end{equation} We finally calculate the dust's convective mixing timescale as: \begin{equation} \tau_{mix,d} = H/V_{\mathrm{con,d}} \end{equation} \section{Results} We start by exploring parameter space in order to find the values that allow for the creation of CSs in proto-envelopes. We explore core masses ranging from Pluto's mass (0.002 M$_\oplus$) to a hypothetical giant planet's core (10 M$_\oplus$), placed between 1 and 30 AU where ambient temperatures are too low to create CSs in the disk. The grains abundance $Z_{gr}$ ranges from subsolar (10$^{-3}$) to supersolar (1.0). Our results are summarized in Fig. \ref{fig:main}. In this plot we show only the areas of parameter space leading to envelopes conducive to the creation of CSs and that are self-consistent to our model assumptions. This is defined by these conditions: \begin{enumerate} \item $\tau_{vap,sil}$ is less than $\tau_{mix,d}$ at the base of the envelope. This simply constrain the envelopes to those where solid silicates at their base can get vaporized faster than they are transported back into the upper cooler zones. \item The envelope is fully convective. This ensures that the newly created CSs can be convectively diffused all the way back into the disk. This condition is inspired by the results of \cite{alidibthompson} who considered a similar setup with a 0.3 M$_\oplus$ core embedded in the disk, and showed that, for typical accretion rates, pebble fragmentation and dust loading increases the opacity and push the convective zone out till it reaches the Bondi radius. Dust particles in these steady-state envelopes are then diffusively ejected back to the disk. Our results rely on this mechanism to transport the newly created CSs from the hot inner envelope back to the disk to be incorporated in proto-comets. \item The collisional velocity is higher than 100 cm/s throughout the envelope, and conditions \ref{cond1} and \ref{cond2} are satisfied. This ensures that our dust size prescription is self-consistent. \end{enumerate} \subsection{Core mass} Figure \ref{fig:main} shows that, while CSs can be created under a variety of parameter ranges, trends do exist. We start with our nominal model, for $\dot{M}_{acc} = 10^{-6} M_{\oplus}/yr$. First, there is a relatively narrow range of masses that extends from around 0.08 M$_\oplus$ (40 times Pluto's mass) to 1.5 M$_\oplus$, beyond which the chances of creating CSs drops drastically. This implies that CSs might have formed in the proto-envelopes of Mars to Earth mass protoplanets that have since disappeared via giant collisions or dynamical ejection, or possibly grown into giant planetary cores. The lower limit on core masses is mainly due to their envelopes' relatively cooler temperatures, increasing $\tau_{vap,sil}$ considerably. On the other hand, cores with masses higher than 1.5 M$_\oplus$ have dust particles large enough in their middle and inner envelopes to switch from the Rosseland mean opacity regime to the geometric opacity regime, as can be seen in Fig. \ref{fig:main2} (left hand panel). This decreases the radiative gradient, creating an inner radiative zone that prevents these envelopes from being fully convective. {It is worth noting that, while our model considers the smallest of the Hill and Bondi radii to be the envelope's outer boundary, all of our acceptable cases that form CSs are in the Bondi regime. This is expected as the Hill regime dominates for higher mass cores (5-10 M$_\oplus$) that were excluded above. The Bondi radius $R_B = 2GM/c_s^2$ is obtained by equating the local sound speed to the gravitational escape velocity, and thus describes a usually light but bound envelope where gas particles do not have enough thermal energy to escape. For higher mass cores, the Bondi radius is large enough for the Hill stability criteria to become the more stringent constrain. } \subsection{Semimajor axis} A complementary piece of information is the semimajor axis, where we find that CSs can form almost anywhere in the disk if the envelope's grain abundance is high enough as discussed further below. Semimajor axis controls the temperature and density at the outer boundary, which seems to be important only in the marginal cases, for example for low core masses where the envelopes would be too cold if placed further out in the disk. The wide range of possible semimajor axis allows for the possibility of creating CSs in the comets formation region. Classically, Oort cloud comets were thought to form among the giant planets all the way down to 5 AU, while Jupiter family comets were thought to form in the scattered disk \citep{duncan,duncan2,dones}. Alternatively, \cite{brasser} proposed that both could have formed in the same region beyond Neptune. \subsection{Grains abundance} {We moreover find that creating CSs necessitate solar to supersolar grain abundance in the envelope ($Z_{gr}$ >= 0.01). This result is not consistent with the subsolar grain abundances found in models that incorporate dust growth \& settling to the core but omit dust fragmentation with convective mixing. \cite{ormel} for example added a simple grain growth equation to the atmospheric structure equations, and found that $Z_{gr}$ can be as low as $10^{-4}$ in parts of the envelope. \cite{morda} also created an atmospheric model incorporating dust settling and coagulation, and found that this mostly results in subsolar opacities.} The main role of $Z_{gr}$ is to increase the opacity and extend the convective zone all the way to the outer boundary (Bondi or Hill radius). \cite{alidibthompson} discussed the gradual buildup of $Z_{gr}$ in the envelope through accretion and fragmentation, and derived a lower limit on $Z_{gr}$ in order to get a fully convective envelope: \begin{equation} Z_{gr}>0.12 \frac{T_{d, 2}^2}{\rho_{d,-11}}\left(\frac{t_{\mathrm{acc}, c}}{\mathrm{Myr}}\right)\left(\frac{M_c}{0.3 M_{\oplus}}\right)^{-2 / 3} \end{equation} which is generally consistent with our $Z_{gr}$ values. In order to get supersolar $Z_{gr}$, multiple conditions need to be satisfied: \begin{itemize} \item The dust size need to be fragmentation-limited, which is a pre-requisite for our dust-size prescription. This depends on many factors, including the accretion rate (setting the luminosity and thus convective speeds) and particles' porosity and chemical composition \citep{blum,Okuzumi,wada1,wada2}. \item A significant fraction of the dust should not get accreted by the core, but remain mixed in the envelope. This is an open question with many complications. In our cases, silicates are in vapor form at the base of the envelope which should stop accretion from taking place unless the temperature is low enough for the inner envelope to reach saturation pressure. This also depends on the nature of convection in these envelopes, whether it is diffusive as we are assuming, or whether it is dominated by large scale eddies that can enhance accretion by the core \citep{johansen}. \end{itemize} \subsection{Accretion rate} Finally we investigate the effects of using a lower accretion rate. Our results for $\dot{M}_{acc} = 10^{-7} M_{\oplus}/yr$ are shown in Fig. \ref{fig:main}. In this case we find that while the semimajor axis range remains the same and the lower mass limit does not change ($\sim 0.08 M_{\oplus}$), the upper limit decreases by over a factor 2 to $\sim 0.6 M_{\oplus}$. This is expected since, lower accretion rate leads to lower luminosities. As seen in Fig. \ref{fig:main2} (right hand side), this decreases the radiative gradient and allows for a radiative zone in the inner envelope even though the dust size in the 2 cases converge to the same inner value. In some cases $Z_{gr}$ can compensate for the lower luminosity and increases the opacity enough to create fully convective envelopes, explaining the overall larger $Z_{gr}$ we find for the lower accretion rate cases. \section{Summary \& conclusions} Crystalline silicates are ubiquitous in comets, but can only form at very high temperatures. Here we investigated the possibility of transforming amorphous silicates into crystalline particles inside the envelopes of protoplanets through vaporization followed by re-condensation, and then ejecting them back to the disk through diffusion in the fully convective envelopes. Using a simplified 1D envelope structure model that incorporates a dust size prescription accounting for fragmentation and growth, we showed that crystalline silicates can be created from a diverse set of parameters. Cores need to be between 0.08 to 1.5 M$_\oplus$ in mass, as lighter cores do not allow for temperatures high enough to vaporize silicates, and the envelopes of more massive cores are often not fully convective. We finally found that the location in the disk (1 to 30 AU) has little influence on the results, except in marginal cases, and that a solar to supersolar grain abundance is needed, but this can be achieved through dust fragmentation and accumulation. Our mechanism is simple and does not rely on assumptions about the disk, although it depends on the assumed diffusive nature of 1D convection. Whether this is realistic needs to be investigated further using 3D hydrodynamic simulations. \begin{figure*} \begin{centering} \includegraphics[scale=0.300]{mainplot_1e-6.png} \includegraphics[scale=0.300]{mainplot_1e-7.png} \caption{The semimajor axis, core mass, and envelope grain abundance for all the cases that satisfy our conditions to form and eject crystal silicates as enumerated in section 3. Left: $\dot{M}_{acc} = 10^{-6} M_{\oplus}/yr$ . Right: $\dot{M}_{acc} = 10^{-7} M_{\oplus}/yr$. {Note the different color scales for the two panels. }} \label{fig:main} \end{centering} \end{figure*} \begin{figure*} \begin{centering} \includegraphics[scale=0.250]{massescomp.pdf} \includegraphics[scale=0.250]{differentaccrate.pdf} \caption{{Left:} solid lines are the opacity efficiency factors $Q_e$ (eq. \ref{grainopeq}) for 2 different core masses with all other parameters being equal {(15 AU, $\dot{M}_{acc} = 10^{-6} M_{\oplus}/yr$)}. These reach the regime switch value of 2 (solid blue line) at different radii, creating a radiative zone in the inner envelope for the 5 M$_\oplus$ case but not for 1 M$_\oplus$ due to its smaller dust size. The dashed lines are the radiative and adiabatic gradients, {indicating the radiative and convective zones}. {Right:} solid lines are the dust size $a_d$ for cases with 2 different accretion rates but all other parameters being equal {(15 AU, 1 M$_\oplus$)}. Dashed lines are the radiative and adiabatic gradients for the same cases. {In all plots, the x-axis is the radius from the core, extending from the core to the envelope's outer boundary.}} \label{fig:main2} \end{centering} \end{figure*} \section*{Acknowledgements} We thank the anonymous referee for their constructive comments that greatly improved this manuscript. This work is supported by Tamkeen under the NYU Abu Dhabi Research Institute grant CAP$^3$. \section*{Data availability} The data underlying this article (numerical simulations output files) will be shared on reasonable request to the corresponding author.
\section*{\Large{Supplementary Material}} \maketitle \section{Theoretical considerations} We provide details concerning the theoretical considerations in the main text. We assume that Mn retains its half-filled $d$ shell in the presence of the weak coupling to the substrate. The uncoupled state of Mn is thus fully rotationally symmetric and coupled to five conduction-electron channels. As the rotational symmetry is broken by the coupling to the substrate, their hybridization $V_m$ with the various conduction-electron channels will be different. In the following, we compute the singlet-triplet splitting perturbatively, focusing on one channel ($m=0$ for definiteness). The general result is obtained by adding the independent corrections for all five channels. \subsection{Spin states of monomer} First consider the spin states of a single Mn adatom. We can generate the spin states $|\frac{5}{2},S_z\rangle$ by applying the spin lowering operator $S_- = \sum_{m=-2}^2 c_{m,\downarrow}^\dagger c_{m,\uparrow}^{\phantom{\dagger}}$ to \begin{equation} |\frac{5}{2},\frac{5}{2}\rangle = \prod_m c^\dagger_{m,\uparrow} |\mathrm{vac} \rangle . \end{equation} Then, we have \begin{eqnarray} |\frac{5}{2},\frac{5}{2}\rangle &=& |\uparrow \uparrow \uparrow \uparrow \uparrow \rangle \nonumber\\ |\frac{5}{2},\frac{3}{2}\rangle &=& \sqrt\frac{1}{5} \sum |\textrm{states with one flipped spin}\rangle \nonumber\\ |\frac{5}{2},\frac{1}{2}\rangle &=& \sqrt\frac{1}{10}\sum |\textrm{states with two flipped spins}\rangle \nonumber\\ |\frac{5}{2},-\frac{1}{2}\rangle &=& \sqrt\frac{1}{10}\sum |\textrm{states with three flipped spins}\rangle \nonumber\\ |\frac{5}{2},-\frac{3}{2}\rangle &=& \sqrt\frac{1}{5}\sum |\textrm{states with four flipped spins}\rangle \nonumber\\ |\frac{5}{2},-\frac{5}{2}\rangle &=& |\downarrow \downarrow \downarrow \downarrow \downarrow \rangle . \end{eqnarray} Similarly, we can derive the states with one less electron, say in the $m=0$ state. One finds \begin{eqnarray} |2,2\rangle &=& |\uparrow \uparrow \uparrow \uparrow \rangle \nonumber\\ |2,1\rangle &=& \sqrt\frac{1}{4}\sum |\textrm{states with one flipped spin}\rangle \nonumber\\ |2,0\rangle &=& \sqrt\frac{1}{6}\sum |\textrm{states with two flipped spins}\rangle \nonumber\\ |2,-1\rangle &=& \sqrt\frac{1}{4}\sum |\textrm{states with three flipped spins}\rangle \nonumber\\ |2,-2\rangle &=& |\downarrow \downarrow \downarrow \downarrow \rangle . \end{eqnarray} Applying $c_{0,\uparrow}$ to the $S=\frac{5}{2}$ states, one finds \begin{eqnarray} c_{0,\uparrow}|\frac{5}{2},\frac{5}{2}\rangle &=& |2,2 \rangle \nonumber\\ c_{0,\uparrow}|\frac{5}{2},\frac{3}{2}\rangle &=& \sqrt\frac{4}{5} |2, 1 \rangle \nonumber\\ c_{0,\uparrow}|\frac{5}{2},\frac{1}{2}\rangle &=& \sqrt\frac{6}{10} |2,0 \rangle \nonumber\\ c_{0,\uparrow}|\frac{5}{2},-\frac{1}{2}\rangle &=& \sqrt\frac{4}{10} |2,-1\rangle \nonumber\\ c_{0,\uparrow} |\frac{5}{2},-\frac{3}{2}\rangle &=& \sqrt\frac{1}{5} |2,-2\rangle \nonumber\\ c_{0,\uparrow} |\frac{5}{2},-\frac{5}{2}\rangle &=& 0. \end{eqnarray} Applying $c_{0,\downarrow}$ to the $S=\frac{5}{2}$ states, one finds \begin{eqnarray} c_{0,\downarrow}|\frac{5}{2},\frac{5}{2}\rangle &=& 0 \nonumber\\ c_{0,\downarrow}|\frac{5}{2},\frac{3}{2}\rangle &=& \sqrt\frac{1}{5} |2, 2 \rangle \nonumber\\ c_{0,\downarrow}|\frac{5}{2},\frac{1}{2}\rangle &=& \sqrt\frac{4}{10} |2,1 \rangle \nonumber\\ c_{0,\downarrow}|\frac{5}{2},-\frac{1}{2}\rangle &=& \sqrt\frac{6}{10} |2,0\rangle \nonumber\\ c_{0,\downarrow} |\frac{5}{2},-\frac{3}{2}\rangle &=& \sqrt\frac{4}{5} |2,-1\rangle \nonumber\\ c_{0,\downarrow} |\frac{5}{2},-\frac{5}{2}\rangle &=& |2,-2\rangle. \end{eqnarray} \subsection{Singlet state of dimer -- tunneling out} The spin state of the dimer can either be expanded in product states $|S_1,M_1\rangle\otimes |S_2,M_2\rangle$ of the two adatoms, or according to magnitude $S_\mathrm{tot}$ and projection $M_\mathrm{tot}$ of the total angular momentum $\mathbf{S}_\mathrm{tot}=\mathbf{S}_1+\mathbf{S}_2$ as $|S_1,S_2;S_\mathrm{tot},M_\mathrm{tot}\rangle$. First consider the singlet state of the dimer. Using Clebsch-Gordan coefficients, we can expand it into product states as \begin{eqnarray} |\frac{5}{2},\frac{5}{2}; 0,0\rangle &=& \sqrt\frac{1}{6} \left( |\frac{5}{2},\frac{5}{2} \rangle \otimes | \frac{5}{2},-\frac{5}{2} \rangle - |\frac{5}{2},\frac{3}{2}\rangle \otimes |\frac{5}{2},-\frac{3}{2} \rangle + |\frac{5}{2},\frac{1}{2}\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle \right.\nonumber\\ && \qquad \left. - |\frac{5}{2},-\frac{1}{2}\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle + |\frac{5}{2},-\frac{3}{2}\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle - |\frac{5}{2},-\frac{5}{2}\rangle \otimes |\frac{5}{2},\frac{5}{2}\rangle \right). \end{eqnarray} Applying $c_{L,0,\uparrow}$ for the left adatom gives \begin{eqnarray} c_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle &=& \sqrt\frac{1}{6} \left( |2,2 \rangle \otimes | \frac{5}{2},-\frac{5}{2} \rangle - \sqrt\frac{4}{5}|2,1\rangle \otimes |\frac{5}{2},-\frac{3}{2} \rangle + \sqrt\frac{6}{10}|2,0\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle \right.\nonumber\\ && \qquad \left. - \sqrt\frac{4}{10} |2,-1\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle + \sqrt\frac{1}{5} |2,-2\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle \right) \end{eqnarray} Similarly, we have \begin{eqnarray} c_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle &=& \sqrt\frac{1}{6} \left( - \sqrt\frac{1}{5}|2,2 \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle + \sqrt\frac{4}{10}|2,1\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle - \sqrt\frac{6}{10}|2,0\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \right.\nonumber\\ && \qquad \left. + \sqrt\frac{4}{5} |2,-1\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle - |2,-2\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle \right) \end{eqnarray} We can compare these states to \begin{eqnarray} |2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle &=& \sqrt\frac{1}{15} |2,2 \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle - \sqrt\frac{2}{15} |2,1\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{1}{5} |2,0\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \nonumber\\ && \qquad - \sqrt\frac{4}{15} |2,-1\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle + \sqrt\frac{1}{3} |2,-2\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle \\ |2,\frac{5}{2}; \frac{1}{2},-\frac{1}{2}\rangle &=& \sqrt\frac{1}{3} |2,2 \rangle \otimes | \frac{5}{2},-\frac{5}{2} \rangle - \sqrt\frac{4}{15} |2,1\rangle \otimes |\frac{5}{2},-\frac{3}{2} \rangle + \sqrt\frac{1}{5} |2,0\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle \nonumber\\ && \qquad - \sqrt\frac{2}{15} |2,-1\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle + \sqrt\frac{1}{15} |2,-2\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle , \end{eqnarray} so that we identify \begin{equation} c_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle = -\sqrt\frac{1}{2}|2,\frac{5}{2}; \frac{1}{2},-\frac{1}{2}\rangle \qquad ; \qquad c_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle = \sqrt\frac{1}{2} |2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle . \end{equation} \subsection{Singlet state of dimer -- tunneling in} Now consider tunneling in of an electron. We can follow the same steps. Now, the $m=0$ state of one of the atoms will be doubly occupied rather than empty, but this is also a zero-spin state. Thus, all the Clebsch-Gordan coefficients remain the same and one finds \begin{equation} c^\dagger_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle = \sqrt\frac{1}{2}|2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle \qquad ; \qquad c^\dagger_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 0,0\rangle = -\sqrt\frac{1}{2} |2,\frac{5}{2}; \frac{1}{2},-\frac{1}{2}\rangle . \end{equation} \subsection{Triplet state of dimer -- tunneling out} We expand the triplet state of the dimer into product states of the two monomers. Due to rotational invariance, we can consider the $M=1$ state without loss of generality, \begin{eqnarray} |\frac{5}{2},\frac{5}{2}; 1,1\rangle &=& \sqrt\frac{1}{7} |\frac{5}{2},\frac{5}{2} \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle - \sqrt\frac{8}{35} |\frac{5}{2},\frac{3}{2}\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{9}{35} |\frac{5}{2},\frac{1}{2}\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \nonumber\\ && \qquad - \sqrt\frac{8}{35} |\frac{5}{2},-\frac{1}{2}\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle + \sqrt\frac{1}{7} |\frac{5}{2},-\frac{3}{2}\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle. \end{eqnarray} Applying $c_{L,0,\uparrow}$ for the left adatom gives \begin{eqnarray} c_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle &=& \sqrt\frac{1}{7} |2,2 \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle - \sqrt\frac{8}{35} \sqrt\frac{4}{5} |2,1\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{9}{35} \sqrt\frac{6}{10} |2,0\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \nonumber\\ && \qquad - \sqrt\frac{8}{35} \sqrt\frac{4}{10} |2,-1\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle + \sqrt\frac{1}{7} \sqrt\frac{1}{5} |2,-2\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle. \end{eqnarray} Similarly, \begin{eqnarray} c_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle &=& - \sqrt\frac{8}{35} \sqrt\frac{1}{5} |2,2 \rangle \otimes | \frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{9}{35} \sqrt\frac{4}{10} |2,1\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle - \sqrt\frac{8}{35} \sqrt\frac{6}{10} |2,0\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle \nonumber\\ && \qquad + \sqrt\frac{1}{7} \sqrt\frac{4}{5} |2,-1\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle. \end{eqnarray} We can compare this to \begin{eqnarray} |2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle &=& \sqrt\frac{1}{15} |2,2 \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle - \sqrt\frac{2}{15} |2,1\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{1}{5} |2,0\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \nonumber\\ &&\qquad\qquad\qquad - \sqrt\frac{4}{15} |2,-1\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle + \sqrt\frac{1}{3} |2,-2\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle \nonumber\\ |2,\frac{5}{2}; \frac{3}{2},\frac{1}{2}\rangle &=& \sqrt\frac{32}{105} |2,2 \rangle \otimes | \frac{5}{2},-\frac{3}{2} \rangle - \sqrt\frac{5}{21} |2,1\rangle \otimes |\frac{5}{2},-\frac{1}{2} \rangle + \sqrt\frac{2}{35} |2,0\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle \nonumber\\ &&\qquad\qquad\qquad + \sqrt\frac{2}{105} |2,-1\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle - \sqrt\frac{8}{21} |2,-2\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle \nonumber\\ |2,\frac{5}{2}; \frac{3}{2},\frac{3}{2}\rangle &=& \sqrt\frac{4}{35} |2,2 \rangle \otimes | \frac{5}{2},-\frac{1}{2} \rangle - \sqrt\frac{9}{35} |2,1\rangle \otimes |\frac{5}{2},\frac{1}{2} \rangle + \sqrt\frac{12}{35} |2,0\rangle \otimes |\frac{5}{2},\frac{3}{2} \rangle - \sqrt\frac{2}{7} |2,-1\rangle \otimes |\frac{5}{2},\frac{5}{2} \rangle, \end{eqnarray} so that we identify \begin{equation} c_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle = \sqrt\frac{7}{15} |2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle + \sqrt\frac{2}{15} |2,\frac{5}{2}; \frac{3}{2},\frac{1}{2}\rangle \qquad ; \qquad c_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle = - \sqrt\frac{2}{5} |2,\frac{5}{2}; \frac{3}{2},\frac{3}{2}\rangle \end{equation} \subsection{Triplet state of dimer -- tunneling in} This follows again by analogy with the tunneling-out terms, so that \begin{equation} c^\dagger_{L,0,\downarrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle = \sqrt\frac{7}{15} |2,\frac{5}{2}; \frac{1}{2},\frac{1}{2}\rangle + \sqrt\frac{2}{15} |2,\frac{5}{2}; \frac{3}{2},\frac{1}{2}\rangle \qquad ; \qquad c^\dagger_{L,0,\uparrow}|\frac{5}{2},\frac{5}{2}; 1,1\rangle = - \sqrt\frac{2}{5} |2,\frac{5}{2}; \frac{3}{2},\frac{3}{2}\rangle \end{equation} \subsection{Singlet-triplet splitting} In the absence of coupling to the substrate, the impurity spins $\mathbf{S}_1$ and $\mathbf{S}_2$ of the two Mn adatoms are subject to antiferromagnetic exchange coupling of the dimer, $H_\mathrm{ex} = J_D \mathbf{S}_1\cdot \mathbf{S}_2$ with $J_D>0$. Depending on the total spin $S_\mathrm{tot}$, the coupling energy is \begin{equation} E_\mathrm{ex}(S_1,S_2; S_\mathrm{tot}) = \frac{J_D}{2} [S_\mathrm{tot}(S_\mathrm{tot}+1) - S_1(S_1+1)-S_2(S_2+1)]. \end{equation} For Mn adatoms with $S_1=S_2=\frac{5}{2}$, the splitting between the triplet ($S=1$) excited state and the singlet ($S=0$) ground state is equal to $\Delta E^{(0)}_\mathrm{st} = J_D$. The singlet-triplet splitting is renormalized due the coupling of the adatoms to the substrate electrons. Tunneling of electrons between adatom $d$ orbitals and substrate couples the singlet to the intermediate states $|2,\frac{5}{2}; \frac{1}{2},\pm\frac{1}{2}\rangle$. The singlet state has exchange energy \begin{equation} E_\mathrm{ex}(\frac{5}{2},\frac{5}{2}; 0) = - \frac{35 J_D}{4} , \end{equation} while the intermediate states have exchange energy \begin{equation} E_\mathrm{ex}(2,\frac{5}{2}; \frac{1}{2}) = - 7 J_D . \end{equation} In the absense of hybridization, we can then write the energy of of singlet state as \begin{equation} E_s^{(0)} = 2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};0), \end{equation} where $E_\mathrm{Mn}$ denotes the energy of the uncoupled Mn adatom and $E_\mathrm{FS}$ the energy of the unperturbed Fermi sea. Similarly, the intermediate state has energy \begin{equation} E^{(0)}_\mathrm{s,out} = 2 E_\mathrm{Mn} + |\epsilon_d| + E_\mathrm{FS} + \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2}) \end{equation} for tunneling out and \begin{equation} E^{(0)}_\mathrm{s,in} = 2 E_\mathrm{Mn} + \epsilon_d + U + E_\mathrm{FS} - \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2}) \end{equation} for tunneling in. Here, $-\epsilon_d>0$ is the energy to remove an electron from the filled $d$-shell and $\epsilon_d +U$ the energy to add an electron. We can then compute the perturbative shift of the singlet state as \begin{eqnarray} \Delta E_s &=& 2 |V_0|^2 \left\{ \sum_{\xi_k> 0} \frac{1}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};0)] - [2 E_\mathrm{Mn} + |\epsilon_d|+ E_\mathrm{FS} + \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2})] } \right. \nonumber\\ && + \left. \sum_{\xi_k< 0} \frac{1}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};0)] - [2 E_\mathrm{Mn} + \epsilon_d+ U + E_\mathrm{FS} - \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2})]} \right\}. \end{eqnarray} Note that the two intermediate states $|2,\frac{5}{2}; \frac{1}{2},\pm\frac{1}{2}\rangle$ give the same contributions, each with a factor $1/2$ due to the matrix elements. Note also that the overall factor of two appears, since electrons can tunnel from either Mn adatom of the dimer. We can then simplify \begin{eqnarray} \Delta E_s &=& - 2 \nu_0 |V_0|^2 \int_0^\infty d\xi \left\{ \frac{1}{ |\epsilon_d| + \xi + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2}) - E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};0) } + \frac{1}{\epsilon_d + U + \xi + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2}) - E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};0) } \right\} \quad \end{eqnarray} or \begin{eqnarray} \Delta E_s &=& - 2 \nu_0 |V_0|^2 \int_0^\infty d\xi \left\{ \frac{1}{ |\epsilon_d| + \xi + \frac{7}{4}J_D } + \frac{1}{\epsilon_d + U + \xi + \frac{7}{4}J_D } \right\} . \end{eqnarray} Here, we introduced the density of states $\nu_0$. Assuming the dimer coupling $J_D$ to be small compared to the atomic-physics scales $|\epsilon_d|$ and $U$, we find \begin{eqnarray} \Delta E_s &=& \textrm{const} + \frac{7J_D }{4} 2 \nu_0 |V_0|^2 \left\{ \frac{1}{ |\epsilon_d| } + \frac{1}{\epsilon_d + U } \right\} , \end{eqnarray} where the constant is a contribution that is independent of the exchange couplings and that cancels out in the singlet-triplet spacing against a similar contribution to the shift of the triplet state. Now consider the shift of the triplet state. There are intermediate states with different energies, which have to be incorporated with the appropriate matrix elements. This yields \begin{eqnarray} \Delta E_t &=& 2 |V_0|^2 \left\{ \sum_{\xi_k> 0} \frac{\frac{7}{15}}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};1)] - [2 E_\mathrm{Mn} + |\epsilon_d|+ E_\mathrm{FS} + \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2})] } \right. \nonumber\\ && + \sum_{\xi_k< 0} \frac{\frac{7}{15}}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};1)] - [2 E_\mathrm{Mn} + \epsilon_d+ U + E_\mathrm{FS} - \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2})]} \nonumber\\ && + \sum_{\xi_k> 0} \frac{\frac{8}{15}}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};1)] - [2 E_\mathrm{Mn} + |\epsilon_d|+ E_\mathrm{FS} + \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{3}{2})] } \nonumber\\ && + \left. \sum_{\xi_k< 0} \frac{\frac{8}{15}}{[2 E_\mathrm{Mn} + E_\mathrm{FS} + E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};1)] - [2 E_\mathrm{Mn} + \epsilon_d+ U + E_\mathrm{FS} - \xi_k + E_\mathrm{ex}(2,\frac{5}{2};\frac{3}{2})]} \right\}. \end{eqnarray} Using the energies \begin{eqnarray} E_\mathrm{ex}(\frac{5}{2},\frac{5}{2};1) &=& -\frac{31 J_D}{4} \\ E_\mathrm{ex}(2,\frac{5}{2};\frac{1}{2}) &=& -7 J_D \\ E_\mathrm{ex}(2,\frac{5}{2};\frac{3}{2}) &=& -\frac{11 J_D}{2} , \end{eqnarray} we find, by the same steps as for the singlet shift, \begin{equation} \Delta E_t = \textrm{const} + \left\{ \frac{7}{15} \frac{3J_D }{4} + \frac{8}{15} \frac{9J_D }{4} \right\} 2 \nu_0 |V_0|^2 \left\{ \frac{1}{ |\epsilon_d| } + \frac{1}{\epsilon_d + U } \right\} = \textrm{const} + \frac{31 J_D}{20} 2 \nu_0 |V_0|^2 \left\{ \frac{1}{ |\epsilon_d| } + \frac{1}{\epsilon_d + U } \right\}. \end{equation} Combining results, we obtain the singlet-triplet splitting \begin{equation} \Delta = J_D + \Delta E_t - \Delta E_s = J_D\left\{ 1 - \frac{1}{5} 2 \nu_0 |V_0|^2 \left[ \frac{1}{ |\epsilon_d| } + \frac{1}{\epsilon_d + U } \right] \right\}. \end{equation} Schrieffer \cite{SSchrieffer1967} has derived the $sd$ exchange coupling $J$ between adatom spins (magnitude $S$) and conduction electrons and finds \begin{equation} J = \frac{|V_0|^2}{2S} \left[ \frac{1}{|\epsilon_d|} + \frac{1}{\epsilon_d + U} \right] \end{equation} (assuming dominant coupling to a single channel). Thus, we can express the renormalized singlet-triplet splitting as \begin{equation} \Delta = J_D + \Delta E_t - \Delta E_s = J_D ( 1 - 2 \nu_0 J ). \end{equation} Accounting for the coupling of the adatom to all five conduction electron channels $m$, this result generalizes to \begin{equation} \Delta = J_D ( 1 - 2 \sum_m \nu_0 J_m ). \end{equation} This equation is quoted in the main text. \section{Additional experimental data} \subsection{Adsorption structure of Mn atoms on $\text{MoS}_\text{2}$} Figure \ref{MNF1}a shows an overview topography image of a monolayer-island of $\text{MoS}_\text{2}$\ decorated with a large number of Mn atoms. A close-up view confirms that the individual atoms appear as round protrusions throughout a bias voltage range of -1 to 1 V (Fig.\ \ref{MNF1}b). Owing to the convolution with the tip shape, the atoms appear with a large width ($\sim$ 0.9 nm), impeding the determination of the exact adsorption site on the atomic lattice constant of $\text{MoS}_\text{2}$. The similarity of apparent heights and spectroscopic signatures suggests that all atoms adsorb in equivalent lattice sites. This is in agreement the observation of unique adsorption sites of Fe on $\text{MoS}_\text{2}$\ \cite{STrishin2021}. DFT calculations further suggest hollow sites to be the energetically most favorable positions \cite{SChen2017,SWang2014}. Occasionally, we find elongated protrusions (see also lineprofiles in Fig.\ \ref{MNF1}c), which we ascribe to dimers. \begin{figure}[h] \centering \includegraphics[width=0.8\textwidth]{FigS1.pdf} \caption{a) Large-scale STM image of a monolayer-island of $\text{MoS}_\text{2}$\ on Au(111) after adsorption of Mn atoms at low temperature. Recorded at 1 V and 100 pA. b) Close-up view showing individual atoms as round protrusions and some elongated structures most probably being Mn dimers. Some point defects can be observed in the $\text{MoS}_\text{2}$\ layer. Recorded at 100 mV and 20 pA. c) Height profiles along the black and red lines shown in b. } \label{MNF1} \end{figure} \clearpage \subsection{Manipulation of Mn atoms} We mainly investigated Mn dimers statistically distributed over the surface. In rare cases, we were able to manipulate the Mn atoms in a controlled manner. Fig.\ \ref{MN7} shows an example of consecutive manipulation events and the d$I$/d$V$ spectra recorded on the obtained structures. In Fig.\ \ref{MN7}a two Mn atoms are separated at sufficiently far distance such that they exhibit a Kondo resonance (spectrum shown in \ref{MN7}d). At closer distance (b), the Kondo resonance is split (Fig.\ \ref{MN7}e). When the atoms are pushed into adjacent lattice sites as in Fig.\ \ref{MN7}c, the singlet-triplet excitation is observed (Fig.\ \ref{MN7}f). \begin{figure}[h] \centering \includegraphics[width=0.8\textwidth]{FigS2.pdf} \caption{Manipulation of two Mn atoms into dimer structures. a-c) STM topographies of the same atoms before and after successive manipulation events. The atom at the bottom of figure (a) was pushed closer towards the other upper atom, as seen in (b). Here the atoms are still distinguishable. In (c) the lower atom was pushed even closer to the upper atom, resulting in a dimer. d-f) d$I$/d$V$ spectra performed on the upper atom in (a), (b) and (c) respectively. The topographies were recorded at 100 mV and 20 pA, the setpoint of the recorded spectra was 15 mV and 3 nA (f) and 10 mV and 3 nA (g). } \label{MN7} \end{figure} Fig.\ \ref{MN8}a shows one dimer where two Mn atoms are two lattice sites apart. The Kondo resonance is split (red line in Fig.\ \ref{MN8}c). Removing one of the atoms leads to an unperturbed Kondo resonance (green line in Fig.\ \ref{MN7}c). \begin{figure}[h] \centering \includegraphics[width=0.8\textwidth]{FigS3.pdf} \caption{Disassembly of a Mn dimer. a,b) STM topographies of a Mn dimer before and after the removal of one atom. Here the right atom in (a) was removed, leading to a single Mn atom as shown in (b). c) d$I$/d$V$ spectra performed on the left atom in (a) and on the same (remaining) atom (b) respectively. The topographies were recorded at 100 mV and 20 pA, the setpoint of the recorded spectra was 10 mV and 3 nA (g). } \label{MN8} \end{figure} \begin{figure}[h] \centering \includegraphics[width=0.8\textwidth]{FigS4.pdf} \caption{ Rotation of Mn dimers. a), b) STM topographies of single Mn dimers before (a) and after (b) applying a high bias voltage. In (a) the dimers 1 and 3 show the same orientation, whereas dimer 2 is rotated by roughly 120$^\circ$ with respect to 1 and 3. After a bias voltage of 1.5 V was applied to the dimers in (a), dimer 1 and 2 appear rotated by 120$^\circ$. The topographies were recorded at 100 mV and 20 pA. } \label{MN13} \end{figure} An unambiguous assignment of the adsorption sites of the Mn atoms within the dimer structures is challenging as the Mn atoms appear very large and cannot be separately resolved. Analyzing the orientation of the dimers on the surface, we observed only three orientations, suggesting the registry with the threefold atomic lattice structure of $\text{MoS}_\text{2}$. While attempting to remove one of the Mn atoms from the densely-packed dimer structures by a voltage pulse, we often observed effectively a rotation of the dimers. Also the resulting dimers follow the main axes (Fig. \ref{MN13}). \subsection{RKKY coupled dimers in different moir\'e sites} \begin{figure}[h] \includegraphics[width=0.5\columnwidth]{FigS5.pdf} \caption{Moir\'e effect on RKKY-coupled Mn dimers. a), d) STM topographies of Mn dimers. Whereas in (a) the dimer is adsorbed close to the moir\'e maximum, in (d) the dimer is adsorbed in the moir\'e valley. c), f) d$I$/d$V$ spectra performed at the crosses in (a) and (d). b),e) show the same scan frame, after one atom has been removed from the dimer. The black spectra in (c) and (f) show the spectra of the respective monomer. The topographies were recorded at 100 mV and 20 pA, the setpoint of the recorded spectra was 15 mV and 3 nA (c) and 10 mV and 3 nA (f). } \label{figS4} \end{figure} In the main text, we showed the variation of singlet-triplet excitations along the moir\'e superstructure. To probe whether RKKY-coupled Mn dimers are equally affected by the moir\'e structure, we investigate Mn dimers with a spacing of two substrate lattice sites (Fig. \ \ref{figS4}). As described in the main text, substrate-mediated interactions lead to small excitation gaps around the Fermi level on top of the Kondo resonance (red lines in Fig.\ \ref{figS4}c,f). Various dimers in different moir\'e sites display similar gap sizes while the height of the Kondo resonance varies. The same height modulation of the Kondo resonance is found on the isolated atoms in the same adsorption sites. This is shown by spectra taken on the same atoms after the neighbor has been removed by STM manipulation (black lines in Fig.\ \ref{figS4}c,f). Hence, once Kondo correlations of the individual atoms dominate the spectra and the coupling enters through a small perturbation, we hardly observe any moir\'e induced modulations in the coupling.
\section{Introduction} \lettrine{S}{upersonic} fluid machinery are applied in high-speed propulsion and power generation systems due to their high power density \cite{PANIAGUA201465}. In supersonic turbines, inlet shock waves are formed and interact with the boundary layers of neighboring blades. The shock-boundary layer interactions (SBLIs) can increase the aerodynamic drag due to flow separation and induce higher heat transfer rates to the blade surface. They can also be a source of flow unsteadiness, where multiple frequencies are excited due to motion of the incident and reflected shock waves, breathing of the separation bubble, besides the incoming turbulent boundary layer. Typically, the shock wave motion leads to strong pressure fluctuations that can compromise the system's structural integrity \cite{babinsky_harvey_2011, GAITONDE2015,Lui2021,lui2022}. Most studies of SBLIs have considered adiabatic wall conditions and, thus, the effects of surface heat transfer are not fully explored. Schülein \cite{Erich2006} used non-intrusive techniques to perform heat transfer and skin-friction measurements in the impingement of an incident oblique shock wave on a flat plate with isothermal wall conditions. Their results show that within the separation region, the heat flux increases in the streamwise direction, while the skin-friction decreases. Jaunet et al. \cite{Jaunet2014} investigated experimentally the impact of the wall temperature on a shock-induced boundary layer separation. They observed that the interaction length considerably increases when the wall temperature is raised. Bernardini et al. \cite{Bernardini2016} and Volpiani et al. \cite{Volpiani2018} carried out direct numerical simulations (DNS) to investigate the wall temperature effects on the physics of SBLIs. Results revealed that wall cooling significantly reduces the size of the separation bubble and interaction scales, while the opposite behavior is noticed in the case of wall heating. In the present work, a high-order overset compressible large eddy simulation (LES) methodology is employed to investigate the flow in a supersonic turbine cascade with two different wall thermal boundary conditions. These include an adiabatic and a cooled walls, where the wall to inlet temperature ratio is set as $T_w/T_\infty = 0.75$. First, the numerical methodology is described including the grid details and flow configurations. Spanwise and time averaged pressure and skin-friction coefficients, as well as the mean flow fields, are presented to assess the effect of cooling on the size and form of the separation bubble. Then, flow snapshots are analyzed to investigate the features of the separation bubbles and the shear layer dynamics at different instants of the SBLI. Finally, the effects of the wall thermal boundary conditions on the turbulence activity are analyzed by assessing the Reynolds stress distributions. \section{Numerical Methodology} The present wall-resolved large eddy simulations solve the compressible Navier-Stokes equations in a curvilinear coordinate system. The fluid is assumed to be a calorically perfect gas, where the molecular viscosity $\mu$ is considered to depend on the local temperature through the nondimensional Sutherland's law. The spatial discretization of the governing equations is performed using a sixth-order accurate finite-difference compact scheme \citep{Nagarajan2003} implemented on a staggered grid. A sixth-order compact interpolation scheme is also used to obtain flow quantities on the different nodes of the staggered grid configuration. Two grids are employed in the present simulations: one is a body-fitted O-grid block which surrounds the airfoil and the other is an H-grid block used to enforce the pitchwise periodicity of the cascade. In the O-grid, the time integration of the equations is carried out by the implicit second-order scheme of \citet{Beam1978}. This method overcomes the stiffness problem arising from the wall-resolving boundary layer mesh. In the background H-grid block, a third-order Runge-Kutta scheme is used for time advancement of the governing equations. A fourth-order Hermite interpolation scheme \citep{Delfis2001,Bhaskaran} is used to exchange information between grid blocks in an overlapping zone. Further details about the numerical procedure can be found in \citep{Bhaskaran}. Due to the non-dissipative characteristics of the compact finite-difference schemes, numerical instabilities may arise from mesh non-curvature, interpolation between the overset grids, and boundary conditions. To preserve stability of the numerical simulations, the high wavenumber compact filter presented by \citet{Lele1992} is applied in flow regions far away from solid boundaries at each time step. A shock capturing scheme is also employed to capture the shock waves forming in the present flows. In order to introduce minimal numerical dissipation in the vicinity of the shocks, without damping the small scales of turbulence, the localized artificial diffusivity (LAD) method \citep{Cook2007} is employed to compute the artificial bulk viscosity and thermal conductivity. The approach LAD-D2-0 proposed by \citet{Kawai2010} is employed here with no artificial shear viscosity. In order to transition the boundary layers, we apply a body forcing on the RHS of the Navier-Stokes equations, as described by \citet{Sansica}. Here, an unsteady actuation with a random spanwise treatment is assumed and the amplitude of the disturbances are chosen experimentally in order to guarantee a bypass transition with minimal flow disturbance. More details of the numerical procedure can be found in \citep{lui2022}. \section{Flow and Mesh Configurations} This section shows details of the flow configuration studied and describes the computational grid used in the LES calculations. Figure \ref{fig:schematic} (a) presents the geometrical parameters and flow conditions. The inlet Mach number is set as $M$ = 2.0 and the Reynolds number based on the inlet velocity $U_{\infty}$ and axial blade chord is $Re$ = 200,000. The ratio of specific heats is chosen as $\gamma = 1.31$, the Prandlt number is $Pr = 0.747$ and the ratio of the Sutherland constant over inlet temperature is set as $S_{\mu}/T_{\infty}$ = 0.07182. These conditions are chosen based on previous studies \cite{LIU2019,Lui2021, lui2022}. \begin{figure}[H] \begin{overpic}[trim = 17mm 10mm 15mm 10mm, clip,width=0.99\textwidth]{flow_configuration.png} \put(0,20){(a)} \put(32,20){(b)} \end{overpic} \caption{Schematics of (a) flow configuration and geometrical parameters, and (b) computational domain skipping every $5$ grid points.} \label{fig:schematic} \end{figure} Figure \ref{fig:schematic} (b) displays a schematic of the overset grid employed in the LES along with the implemented boundary conditions. The O-grid block has $1200 \times 280 \times 144$ points and is embedded in the background Cartesian grid block of size $960 \times 280 \times 72$. Therefore, the grid has approximately $68,000,000$ points. Depending on the case, adiabatic or isothermal boundary conditions are applied along the blade surface. For the latter, the wall to inlet temperature ratio is $T_w/T_{\infty}=0.75$, representing a cooled wall. Supersonic inflow boundary conditions are used to set the inlet conditions. For the outflow, a boundary condition based on the Navier-Stokes characteristic boundary condition (NSCBC) \citep{Poinsot1992} is employed. A damping sponge is also applied near the inflow and outflow boundaries to minimize reflections of disturbances \citep{ISRAELI1981,Nagarajan2003}. Periodic boundary conditions are used in the $y$-direction of the background grid, according to Fig.\ \ref{fig:schematic} (a), in order to simulate a linear cascade of blades and periodic boundary conditions are also applied in the spanwise direction, to enforce a statistically homogeneous flow along the span. For the adiabatic wall case, the grid resolution in terms of wall units is kept in the range given by $6<\Delta s^+<25$, $0.1<\Delta n^+<0.3$, and $3<\Delta z^+<9$, where $s$, $n$ and $z$ represent the streamwise, wall-normal and spanwise flow coordinates. For the isothermal wall simulation, the near-wall grid spacing ranges from $15<\Delta s^+<60$, $0.2<\Delta n^+<0.6$, and $6<\Delta z^+<19$. These numbers are computed for regions where the boundary layers are fully developed and in equilibrium, away from the tripping and recirculation regions. It is worthwhile to mention that the same computational grid is used for both cases, but higher values in terms of wall units are obtained for the isothermal wall case due to a inherent reduction of the viscous length scales caused by cooling. The simulation is initialized with a uniform flow and statistics are computed after the initial transients are discarded. In the simulations, a variable time step is computed based on an inviscid CFL parameter of 0.8. The body-force tripping is applied at $0.22 < x/c_{ax} < 0.27 $ for the suction side, and at $0.10 < x/c_{ax} < 0.15 $ for the pressure side. The wall normal height of the body-foce region is $\delta = 0.001c_{ax}$ and the actuation changes every $\Delta t \approx$ 0.003 in a spanwise-random fashion. \section{Results} This section presents results obtained by the LES computed for adiabatic and isothermal (cooled) wall boundary conditions. Flow quantities are collected for 4 flow through times, based on the inlet velocity and blade axial chord. Figure \ref{fig:q_criterion} shows iso-surfaces of $Q$-criterion colored by the $u$-velocity component together with a background view of density gradient magnitude, $|\nabla \rho|$. The top and bottom rows present results for the adiabatic and cooled wall cases, respectively. \begin{figure}[H] \centering \begin{overpic}[trim = 1mm 1mm 1mm 1mm, clip,width=0.48\textwidth]{cascade_nsnap1864_adiabatic.png} \put(1,58){(a)} \end{overpic} \begin{overpic}[trim = 1mm 1mm 1mm 1mm, clip,width=0.48\textwidth]{SBLI_view_nsnap1864_adiabatic.png} \put(1,58){(b)} \end{overpic} \\ \vspace{2mm} \begin{overpic}[trim = 1mm 1mm 1mm 1mm, clip,width=0.48\textwidth]{cascade_nsnap1664_isothermal.png} \put(1,58){(c)} \end{overpic} \begin{overpic}[trim = 1mm 1mm 1mm 1mm, clip,width=0.48\textwidth]{SBLI_view_nsnap1664_isothermal.png} \put(1,58){(d)} \end{overpic} \caption{Iso-surfaces of $Q$-criterion colored by $u$-velocity component for the adiabatic (top) and cooled (bottom) wall cases. The background plane displays the shock waves by visualizing the density gradient magnitude $|\nabla \rho|$.} \label{fig:q_criterion} \end{figure} In Figs. \ref{fig:q_criterion} (a) and (c), we can observe the complex shock structure across the turbine passage. The detached oblique shock waves generated at the airfoil leading edges interact with the boundary layers of the neighboring blades and are reflected across the cascade. On the pressure side, the incident shock wave becomes normal to the wall and, then, a Mach reflection is formed, while an oblique shock reflection is generated on the suction side. To highlight the effect of cooling on the SBLI, a detailed view of the flow field can be seen in Figs. \ref{fig:q_criterion} (b) and (d), where one can observe differences between the lengths of the separation bubbles, especially on the suction side. For the cooled wall, a smaller recirculation region is noticed. \begin{figure}[H] \centering \subfigure[Skin friction coefficient $c_f$]{\includegraphics[width=.49\linewidth]{./cf.png}} \subfigure[Pressure coefficient $c_p$.]{\includegraphics[width=.49\linewidth]{./cp.png}} \caption{Mean skin-friction and pressure coefficient distributions for the adiabatic (black) and cooled (blue) wall cases. The distributions are shown only along the suction side.} \label{fig:coefficients} \end{figure} \begin{figure}[H] \centering \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.49\linewidth]{mean_uvelocity_adiabatic.png} \put(0,34){(a)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.49\linewidth]{mean_uvelocity_isothermal.png} \put(0,34){(b)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.49\linewidth]{mean_temperature_adiabatic_v1.png} \put(0,34){(c)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.49\linewidth]{mean_temperature_isothermal_v1.png} \put(0,34){(d)} \end{overpic} \caption{Time-averaged contours of normalized $u$-velocity (top) and temperature (bottom) for the adiabatic (left) and cooled (right) wall cases. The black lines display the shock waves visualized by pressure gradient magnitude. The black dashed lines show the sonic line.} \label{fig:mean_flows} \end{figure} The mean skin-friction coefficient distribution $c_f = \frac{\tau_w}{0.5 \rho_\infty U_{\infty}^2}$ is provided in Fig. \ref{fig:coefficients}(a) for the blade suction side. This plot shows the presence of a separation bubble characterized by locations where $c_f < 0$, which is delimited by a horizontal dashed line. The effect of cooling on the size of the recirculation region is evident. For the isothermal case, one can observe a downstream displacement of the separation region compared to the adiabatic wall setup. On the other hand, the reattachment locations are similar for both cases. Hence, the cooled wall depicts a smaller separation bubble. For the adiabatic wall case, the time-averaged characteristic length of the separation bubble is $\langle L_{SB} \rangle = 0.16c_{ax}$ and it is observed along $0.70 < x/c_{ax} < 0.86$. For the cooled wall, $\langle L_{SB} \rangle = 0.10c_{ax}$ and it is formed on $0.75 < x/c_{ax} < 0.85$. After a small negative skin-friction coefficient plateau, a similar recovery is observed downstream of the reattachment location for both cases. Figure \ref{fig:coefficients} (b) plots the mean pressure coefficient $c_p = \frac{p - p_\infty}{0.5 \rho_\infty U_{\infty}^2}$ along the airfoil chord. For both adiabatic and cold wall cases, it is possible to note two pressure rises: the first occurs near the separation point due to the compression waves formed upstream of the separation bubble, and the second takes place near the reattachment location as a result of the incident shock impingement and the turbulence amplification mechanism \cite{fang2020}. For the cooled wall setup, a steeper variation of $c_p$ is observed, especially for the second pressure rise. To highlight the influence of the wall thermal boundary conditions on the size and shape of the separation bubbles, the mean (spanwise and time averaged) $u$-velocity contours are presented in Figs. \ref{fig:mean_flows} (a) and (b), for the adiabatic and isothermal cases, respectively. Here, the velocity component is normalized by the inlet speed of sound. These figures reinforce the findings observed in the friction coefficient distributions. The main effect of wall cooling is to reduce the viscous length scales near the wall \cite{Bernardini2016,Volpiani2018} which in turn affects the shock penetration, as shown in \ref{fig:mean_flows} (a) and (b). One can see that the impinging shock penetrates deeper in the boundary layer for the cooled wall case due to the displacement of the sonic line (displayed as a dashed line) towards the wall. This effect is responsible for the steeper variation in the pressure coefficient observed in Fig. \ref{fig:coefficients}(b). One can also see that, for the cooled wall, the incident shock reaches further downstream compared to the adiabatic case. Figures \ref{fig:mean_flows} (c) and (d) show the mean temperature fields for the the adiabatic and cold wall boundary conditions, respectively. The values are presented normalized by the inlet temperature. For the former case, one can observe that a region of maximum temperature occurs within the separation bubble. On the other hand, when cooling is applied, higher temperature values are observed in the free shear layer, downstream the bubble. For the adiabatic wall, friction from the shear stresses near the wall and around the bubble are converted into heat which is transferred along the boundary layer and inside the bubble. This causes the near-wall flow to reach higher temperatures. However, heat from the flow is transferred to the blade in the isothermal case, which has a lower temperature than the surrounding flow. For the cooled wall case, the maximum temperature values are observed along the free shear layer, behind the bubble, due to strong shearing effects that cause aerodynamic heating. \begin{figure}[H] \begin{center} {\includegraphics[trim = 1mm 1mm 1mm 1mm, clip, width=0.97\textwidth]{./LSB.png}} \end{center} \caption{Temporal variation of the suction side separation bubble length $L_{SB}$ for the adiabatic (top) and cooled (bottom) wall cases.} \label{fig:LSB} \end{figure} \begin{figure} \centering \begin{overpic}[trim = 40mm 20mm 40mm 50mm,clip,width=0.48\textwidth]{z_vorticity_nsnap3629_adiabatic.png} \put(10,52){(a)} \end{overpic} \begin{overpic}[trim = 40mm 20mm 40mmm 50mm,clip,width=0.48\textwidth]{z_vorticity_nsnap4845_adiabatic.png} \put(10,52){(b)} \end{overpic} \begin{overpic}[trim = 40mm 20mm 40mm 50mm,clip,width=0.48\textwidth]{z_vorticity_nsnap5431_isothermal.png} \put(10,52){(c)} \end{overpic} \begin{overpic}[trim = 40mm 20mm 40mm 50mm,clip,width=0.48\textwidth]{z_vorticity_nsnap4412_isothermal.png} \put(10,52){(d)} \end{overpic} \caption{Spanwise $z$-vorticity contours at different time instants for the adiabatic (top) and cooled (bottom) wall cases. The green line delimits the bubble while the black line shows the incident shock wave.} \label{fig:z_vorticity} \end{figure} The temporal evolution of the separation bubble length $L_{SB}$ is shown in Fig. \ref{fig:LSB} for the adiabatic and isothermal walls. The instantaneous length of the bubble is defined as the distance between the instantaneous reattachment and separation locations. One can observe that the separation region undergoes a contraction/expansion motion for both cases. The excursions from the mean appear to be similar for both cases. A spectral analysis of this signal should provide further information on the frequency scales related to the bubble motion and such analysis should be conducted in future work, once longer signals are collected for statistical convergence of the lower frequencies of interest. To highlight the 2D structure of the suction side separation bubble and shear layer at different time instants, snapshots of $z$-vorticity are displayed in Fig. \ref{fig:z_vorticity} for both thermal boundary conditions. These snapshots correspond to the instants indicated by the letters ``a-d'' in Fig. \ref{fig:LSB}. The region enclosed by the green line shows the separation region and the black lines display the impinging shocks. In addition, the mean separation and reattachment positions are indicated by the orange and cyan squares, respectively. For both cases, when the bubble suffers a contraction, the instantaneous separation (reattachment) point moves downstream (upstream) with respect to its mean value, as can be visualized in Figs. \ref{fig:z_vorticity}(a) and (c). On the other hand, when the bubble undergoes an expansion, one can observe the upstream (downstream) movement of the instantaneous separation (reattachment) point with respect to its mean position. This indicates that the bubble has a breathing pattern, but its central position does not have large excursions from the mean. Figure \ref{fig:z_vorticity} also shows that the shear layer downstream of the bubble is more diffused for the adiabatic case, while more concentrated vorticity values are observed when cooling is applied. These findings corroborate the maximum temperature values observed in Figs. \ref{fig:mean_flows}(c) and (d). For example, in the adiabatic case, the shear layer around the bubble creates a zone of intense heating. \begin{figure} \centering \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{ut_ut_adiabatic.png} \put(10,54){(a)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{un_un_adiabatic.png} \put(10,54){(b)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{TKE_adiabatic.png} \put(10,54){(c)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{ut_ut_isothermal.png} \put(10,54){(d)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{un_un_isothermal.png} \put(10,54){(e)} \end{overpic} \begin{overpic}[trim = 40mm 2mm 40mm 2mm, clip,width=.33\linewidth]{TKE_isothermal.png} \put(10,54){(f)} \end{overpic} \caption{Turbulence quantities on the suction side for the adiabatic (top) and cooled (bottom) cases: $\langle u_t u_t \rangle$ (left), $\langle u_n u_n \rangle$ (middle) and TKE (right). } \label{fig:turbulence_quantities} \end{figure} The effects of the thermal boundary conditions on the turbulence properties, are investigated by the tangential and wall-normal Reynolds stresses, $\langle u_t u_t \rangle$ and $\langle u_n u_n \rangle$, respectively, and the turbulent kinetic energy (TKE) are presented in Fig. \ref{fig:turbulence_quantities}. In this figure, the top and bottom rows display results for the adiabatic and isothermal walls, respectively. In Figs. \ref{fig:turbulence_quantities} (a) and (d), it can be seen that the highest fluctuations of $\langle u_t u_t \rangle$ are observed just upstream of the shock-bubble interaction for both cases, with similar fluctuation values. The amplification of $\langle u_t u_t \rangle$ is associated with the development of the shear layer \cite{fang2020}. The peak values of $\langle u_n u_n \rangle$ are found along the free shear layer downstream of the bubble. The magnitude of $\langle u_n u_n \rangle$ decreases when cooling is applied. In Figs. \ref{fig:turbulence_quantities} (c) and (f), one can observe that the turbulent kinetic energy combines the trends observed from the $\langle u_t u_t \rangle$ and $\langle u_n u_n \rangle$ components. In addition, before the SBLI, we can notice a downstream displacement of the maximum turbulence amplification location for the cooled wall case. This occurs due to the higher shock penetration discussed previously. \section{Conclusions} Wall-resolved large eddy simulations are employed to investigate thermal effects in a supersonic turbine cascade. Simulations are performed for adiabatic and isothermal boundary conditions, where in the latter case the blade is cooled. For the present flow configurations, oblique shock waves are generated at the leading edges of the airfoils, and they interact with the boundary layers of the neighboring blades. A study of the shock-boundary layer interactions is presented for the blade suction side, where an incident oblique shock reflects on the wall leading to the formation of a separation bubble. The impact of the thermal boundary conditions on the separation bubbles is investigated. The distributions of mean skin-friction show that the separation bubble is considerably smaller for the cooled wall compared to the adiabatic case. Pressure coefficient distributions show that a steeper pressure rise occurs downstream the incident shock wave for the cooled wall. For this case, cooling induces the formation of a thinner boundary layer and the sonic line forms closer to the wall. Results in terms of mean velocity contours reveal that the more pronounced pressure rise occurs due to the higher penetration of the incident shock in the isothermal (cooled) wall. Maximum temperature values are observed along the bubble, for the adiabatic case, and the free shear layer, for the cooled wall. In the former case, aerodynamic heating is transferred to the bubble due to a surrounding shear layer. For the latter case, intense shearing is observed along the free shear layer, behind the bubble, and leads to high temperatures. An analysis of the instantaneous separation and reattachment locations demonstrates that the separation bubbles have a breathing pattern of contractions and expansions. For the contraction motions, the instantaneous separation point moves downstream while the reattachment point moves upstream. The other way around is observed for the expansion motions. The tangential Reynolds stress distributions reach maximum values just upstream the shock-bubble interactions, being similar for both the adiabatic and isothermal walls. However, due to the higher shock penetration of the isothermal wall, the peaks appear more downstream along the blade chord. The wall-normal Reynolds stresses reach maximum amplitudes downstream the SBLI and they are more pronounced for the adiabatic wall. In future work, further analysis of the SBLI dynamics will be provided for both suction and pressure side boundary layers. \section*{Acknowledgments} The authors acknowledge the financial support received from Funda\c{c}\~ao de Amparo \`a Pesquisa do Estado de S\~ao Paulo, FAPESP, under grants No.\ 2013/08293-7, 2019/26196-5 and 2021/06448-0. The authors also thank Conselho Nacional de Desenvolvimento Científico e Tecnológico, CNPq, for supporting this research under grants No.\ 407842/2018-7 and 308017/2021-8. This work was granted access to the HPC resources of IDRIS under the allocation 2021-A0112A12067 made by GENCI.
\section{Introduction} The phenomenon of the variance of a count data being more than its mean is commonly termed as over-dispersion in the literature. Over-dispersion is relevant in many modelling applications and it is encountered more often compared to the phenomena of under-dispersion and equi-dispersion. A number of count models are available in the literature for over-dispersed data. However, addition of a simple yet adequate model is of importance given the ongoing research interest in this direction (\cite{wongrin2017generalized}, \cite{moghimbeigi2008multilevel}, \cite{tapak2020random}, \cite{wang2017inference}, \cite{sarvi2019gee}, \cite{rodrigues2013multivariate}, \cite{campbell1999analyzing}, \cite{hassanzadeh2016analysis}, \cite{moqaddasi2019mixed}, \cite{tuzen2020simulation}, \cite{bar2021exponential}, \cite{altun2020new} and \cite{wang2001umpu}). The simplest and the most common count data model is the Poisson distribution. Its equi-dispersion characteristic is well-known. This is a limitation for the Poisson model and to overcome this issue, several alternatives have been developed and used for their obvious advantage over the classical Poisson model. Notable among these distributions are the hyper-Poisson (HP) of Bardwell and Crow \cite{Bardwell-Crowl64}, generalized Poisson distribution of Jain and Consul \cite{jainconsul71}, double-Poisson of Efron \cite{Efron86}, weighted Poisson of Castillo and Pérez-Casany \cite{del1998weighted}, weighted generalized Poisson distribution of Chakraborty \cite{chakraborty2010some}, Mittag-Leffler function distribution of Chakraborty and Ong \cite{chakraborty2017mittag} and the popular COM-Poisson distribution Shmueli et al. \cite{sellers2010flexible}. COM-Poisson generalizes the binomial and the negative binomial distribution. The classical geometric and negative binomial models are also used for over-dispersed count datasets. The gamma mixture of the Poisson distribution generates the negative binomial distribution \cite{fisher1943relation}. Thus unlike the Poisson distribution, these two count models posses the over-dispersion characteristic. Consequently, several extensions of the geometric distribution have been introduced in the literature for over-dispersed count data modelling (\cite{chakraborty2016transmuted}, \cite{chakraborty2015exponentiated}, \cite{gomezdeniz10}, \cite{jainconsul71}, \cite{makcutek08}, \cite{nekoukhouetal12}, \cite{Philippouetal83}, and \cite{tripathietal87} among others). Two most widely used distributions for over-dispersed data are of course the negative binomial and COM-Poisson. As pointed out earlier, there is still plenty of opportunity for developing new discrete distributions with simple structure and explicit interpretation, appropriate for over-dispersed data. Recently, Bourguignon et al. have introduced the $BerG$ distribution \cite{bourguignon2017inar} by using the convolution of a Bernoulli random variable and a geometric random variable. In a very recent publication, Bourguignon et al. have introduced the $BerPoi$ distribution from a similar motivation \cite{bourguignon2022simple}. This is a convolution of a Bernoulli random variable and a Poisson random variable. The first one is capable of modelling over-dispersed, under-dispersed and equi-dispersed data whereas the second one is efficient for modelling under-dispersed data. This approach is simple and has enormous potential. Here we use this idea to develop a novel over-dispersed count model. In this article, we propose a new discrete distribution derived from the convolution of two independent count random variables. The random variables are Poisson and geometric. Hence we identify the proposed model as $PoiG$. This two-parameter distribution has many advantages. Structural simplicity is one of them. It is easy to comprehend unlike the COM-Poisson distribution, which involves a difficult normalising constant in its probability mass function. A model with closed-form expressions of the mean and the variance is well-suited for regression modelling. Unlike the COM-Poisson distribution, mean and variance of the proposed distribution can be written in closed form expressions. The proposed distribution extends both the Poisson and geometric distributions. Rest of the article is organized as follows. In section 2, we present the $PoiG$ distribution. In Section 3, we describe its important statistical properties such as recurrence relation, generating functions, moments, dispersion index, mode, reliability properties, monotonic properties and stochastic ordering. In Section 4, we present the moment and the maximum likelihood methods of parameter estimation. We conclude the article with a few limitations and future scopes of the current study. \\ \section{The $PoiG$ distribution} In this section, we introduce a novel discrete distribution by considering two independent discrete random variables $Y_1$ and $Y_2$. Let us denote the set of non-negative integers, $\{0,1,2,...\}$ by $N_0$. Also let, $Y_1$ and $Y_2$ follow the Poisson distribution with mean $\lambda>0$ and the geometric distribution with mean $0<1/ \theta<1$, respectively. Both $Y_1$ and $Y_2$ have the same support $N_0$. For convenience, we write $Y_1\sim P(\lambda)$ and $Y_2 \sim G(\theta)$. Consider, $Y=Y_1+Y_2$. Then, \begin{align}\label{eqn1} \Pr(Y=y)&=\sum_{i=0}^{y}\Pr(Y_1=i)\Pr(Y_2=y-i)\nonumber\\ &=\sum_{i=0}^{y}\dfrac{e^{-\lambda}\lambda^{i}}{i!}\theta(1-\theta)^{y-i}\nonumber\\ &=\theta(1-\theta)^y e^{-\lambda}\sum_{i=0}^{y}\dfrac{1}{i!}\left(\dfrac{\lambda}{1-\theta}\right)^i, \hspace{40pt}y=0,1,2,...\,\, . \end{align} The distribution in (\ref{eqn1}) being the convolution Poisson and geometric, is named the $PoiG$ distribution and we write $Y\sim PoiG(\lambda,\theta)$. Thus, the probability mass function (pmf) of $PoiG(\lambda,\theta)$ can be written as \begin{align}\label{eqn2} p_Y(y)&=\dfrac{\theta {(1-\theta)^y}}{\Gamma(y+1)}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}{\Gamma\left(y+1,\dfrac{\lambda}{1-\theta}\right)}, \hspace{30pt}y=0,1,2,...\,\, . \end{align} Figure~\ref{pmfplot} exhibits nature of the pmf for different choices of $(\lambda,\theta)$. The cumulative distribution function (cdf) of $PoiG$ distribution is \begin{align}\label{eqn3} F_Y(y)&=\Pr(Y_1+Y_2\leq y)\nonumber\\ &=\sum_{y_1=0}^{y}\sum_{y_2=0}^{y-y_1}p_Y(y_1)p_Y(y_2)\nonumber\\ &=\sum_{y_1=0}^{y}F_{G}(y-y_1)p_Y(y_1)\nonumber\\ &=\sum_{y_1=0}^{y}(1-(1-\theta)^{y-y_1+1})p_Y(y_1)\nonumber\\ &=\sum_{y_1=0}^{y}\dfrac{e^{-\lambda}\lambda^{y_1}}{y_1!}-(1-\theta)^{y+1}e^{-\lambda}\sum_{y_1=0}^{y}\dfrac{1}{y_1!}\left(\dfrac{\lambda}{1-\theta}\right)^{y_1}. \end{align} An explicit expression of (\ref{eqn3}) is given by \begin{align}\label{eqn4} F_Y(y)&=\dfrac{\Gamma(y+1,\lambda)}{\Gamma(y+1)}-\dfrac{(1-\theta)^{y+1}}{\Gamma(y+1)}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left (y+1,\dfrac{\lambda}{1-\theta}\right),\hspace{25pt}y=0,1,2,...\,\, . \end{align} Figure~\ref{cdfplot} exhibits nature of the cdf for different choices of $(\lambda,\theta)$. The mean and variance of the $PoiG(\lambda,\theta)$ distribution are given as follows. \begin{equation}\label{eqn5} E(Y)=\mu=\lambda+\dfrac{1-\theta}{\theta}\hspace{10pt}\textrm{and}\hspace{10pt} V(Y)=\sigma^2=\lambda+\dfrac{1-\theta}{\theta^2} \end{equation}\\ \textbf{Special cases} \begin{itemize} \item For $\lambda\xrightarrow{}0$, $PoiG(\lambda,\theta)$ behaves like $G(\theta)$. \item For $\theta\xrightarrow{}1$, $PoiG(\lambda,\theta)$ behaves like $P(\lambda)$. \end{itemize} \textbf{Remark 1} \begin{itemize} \item The incomplete gamma function \cite{abramowitz1964handbook} is defined as $\Gamma(n,x)= \int_{x}^{\infty} t^{(n-1)}e^{-t}dt$ and it can also be rewrite as $\Gamma(n,x)=(n-1)!\sum_{k=0}^{n-1}\dfrac{e^{-x}x^k}{k!}$, which is valid for positive values of $n$ and any value of $x$. Thus the incomplete gamma function in (\ref{eqn2}) can be rewritten as \begin{align*} \Gamma\left(y+1,\dfrac{\lambda}{1-\theta}\right)&=\Gamma(y+1){\sum_{i=0}^{y}}\dfrac{1}{\Gamma(i+1)}\exp{\left(-\dfrac{\lambda}{1-\theta}\right)}{\left(\dfrac{\lambda}{1-\theta}\right)^i}, \end{align*} where $\Gamma(y+1)=y!$ and $\Gamma(i+1)=i!$. \item $ F_Y(0)=p_Y(0)=\theta e^{-\lambda}$. Thus, the proportion of zeros in case of the $PoiG$ distribution tends to $\theta$ as $\lambda \rightarrow 0$ and to zero as $\lambda \rightarrow \infty$. \end{itemize} \begin{figure}[!] \centering \includegraphics[width=16cm,height=20cm]{pmfpoig.png} \caption{Probability mass function of $PoiG(\lambda,\theta)$ for $\lambda\in\{0,0.5,5,10\}$ and $\theta\in\{0.2,0.4,0.6,0.8\}$. The $(i,j)^{th}$ plot corresponds to the $i^{th}$ value of $\lambda$ and $j^{th}$ value of $\theta$ for $i,j=1,2,3,4$. } \label{pmfplot} \end{figure} \begin{figure}[!] \centering \includegraphics[width=16cm,height=20cm]{cdfpoig.png} \caption{Cumulative distribution function of $PoiG(\lambda,\theta)$ for $\lambda\in\{0,0.5,5,10\}$ and $\theta\in\{0.2,0.4,0.6,0.8\}$ .The $(i,j)^{th}$ plot corresponds to the $i^{th}$ value of $\lambda$ and $j^{th}$ value of $\theta$ for $i,j=1,2,3,4$.} \label{cdfplot} \end{figure} \section{Properties of the $PoiG$ distribution} In this section, we explore several important statistical properties of the proposed $PoiG(\lambda,\theta)$ distribution. Some of the distributional properties studied here are the recurrence relation, probability generating function (pgf), moment generating function (mgf), characteristic function (cf), cumulant generating function (cgf), moments, coefficient of skewness and kurtosis. We also study the reliability properties such as the survival function and the hazard rate function. Log-concavity and stochastic ordering of the proposed model are also investigated. \subsection{Recurrence relation} Probability recurrence relation helps in finding the subsequent term using the preceding term. It usually proves to be advantageous in computing the masses at different values. Note that, \begin{align*} p_Y(y)&=\dfrac{\theta {(1-\theta)^y}}{\Gamma(y+1)}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}{\Gamma\left(y+1,\dfrac{\lambda}{1-\theta}\right)}\nonumber\\ &=\theta {(1-\theta)^y}e^{-\lambda}\sum_{i=0}^{y}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda}{1-\theta}\right)^i\nonumber\\ &=\theta {(1-\theta)^y}e^{-\lambda}s_{y}. \end{align*} Where, $$s_{y}=\sum_{i=0}^{y}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda}{1-\theta}\right)^i $$ and $$ s_{y+1}=s_{y}+\dfrac{1}{\Gamma (y+2)}\left(\dfrac{\lambda}{1-\theta}\right)^{y+1}. $$ Now, \begin{center} \begin{align}\label{eqn6} p_Y(y+1)&=\theta {(1-\theta)^{y+1}}e^{-\lambda}s_{y+1}\nonumber\\ &=\theta {(1-\theta)^{y+1}}e^{-\lambda}\left[s_{y}+\dfrac{1}{\Gamma(y+2)}\left(\dfrac{\lambda}{1-\theta}\right)^{y+1}\right]\nonumber\\ &=(1-\theta)p_Y(y)+\theta e^{-\lambda}\dfrac{{\lambda}^{y+1}}{\Gamma(y+2)}. \end{align} \end{center} This is the recurrence formula of the $PoiG$ distribution. It is easy to check that \begin{align*} \dfrac{s_{y+1}}{s_{y}}&=1+\dfrac{1}{s_{y}\Gamma(y+2)}\left(\dfrac{\lambda}{1-\theta}\right)^{y+1}=1 \hspace{25pt}as \hspace{5pt}y\xrightarrow{}\infty, \end{align*} and \begin{align} \dfrac{p_Y(y+1)}{p_Y(y)}&=(1-\theta)+\dfrac{\theta e^{-\lambda}}{p_Y(y)}\dfrac{\lambda^{y+1}}{\Gamma(y+2)}= 1-\theta \hspace{25pt}as \hspace{5pt}y\xrightarrow{}\infty. \label{eqn7} \end{align} From (\ref{eqn7}), it is clear that the behaviour of the tail of the distribution depends on $\theta$. When $\theta\xrightarrow{}0$, the tail of the distribution decays relatively slowly, which implies long tail. when $\theta\xrightarrow{}1$, the tail of the distribution decays fast, which implies short tail. This can easily be verified from Figure \ref{pmfplot}. \subsection{Generating functions} We use the notation $H$ to denote a pgf and use the notation of the corresponding random variable in the subscript. For $Y_1\sim P(\lambda)$ and $Y_2\sim G(\theta)$, \begin{align*} H_{Y_1}(s)&=e^{\lambda(s-1)} \hspace{10pt}\textrm{and}\hspace{10pt} H_{Y_2}(s)=\dfrac{\theta}{1-(1-\theta)s}. \end{align*} Now by using the convolution property of probability generating function we obtain the pgf of $PoiG(\lambda, \theta)$ as \begin{align}\label{eqn8} H_Y(s)&=\dfrac{\theta e^{\lambda(s-1)}}{1-s+\theta s}. \end{align} Similar methods are used to obtain the other generating functions, including the mgf $M_Y(t)$, cf $\phi_Y(t)$ and cgf $K_Y(t)$. These are given below. \begin{align}\label{eqn9} M_Y(t)=\dfrac{\theta e^{\lambda(t-1)}}{1-(1-\theta) t} \end{align} \begin{align}\label{eqn10} \phi_Y(t)&=\dfrac{\theta e^{\lambda(e^{it}-1)}}{1-(1-\theta)e^{it}} \end{align} \begin{align}\label{eqn11} K_Y(t)&=\lambda(e^t-1)+log\left\{\dfrac{\theta}{1-(1-\theta)e^t}\right\} \end{align} Let us discuss some useful definitions and notations for Result 1 given below. The notation $G(\theta)$ has already been introduced in Section 2. Let $R$ be the number of failures preceding the first success in a sequence of independent Bernoulli trials. If the probability of success is $\theta\in(0,1)$, then $R$ is said to follow $G(\theta)$. Suppose, we wait for the $r^{th}$ success. Then the number of failures is a negative binomial random variable with index $r$ and the parameter $\theta$. Let $NB(r,\theta)$ denote this distribution. Suppose $R_i\sim G(\theta)$, for $i=1, 2, ..., r$ independently and $S\sim NB(r,\theta)$. Then $S=R_1+ R_2+ ...+ R_r$. Thus, it is clear that the $G(\theta)$ is a particular case of $NB(r,\theta)$ with $r=1$. Similar to the genesis of $PoiG$ model, if we add one Poisson random variable and an independently distributed negative binomial random variable, it is possible to obtain a generalization of the $PoiG$ model. An appropriate notation for this distribution would have been $PoiNB$. The objective of the current work is not to study this three-parameter distribution in detail. However, the following result establishes that the generalization from the geometric distribution to the negative binomial distribution translates similarly to the $PoiG-PoiNB$ case. This may prove to be a motivation for generalizing the proposed model to $PoiNB$ in future. \textbf{Result 1} The distribution of the sum of $n$ independent $PoiG$ random variables is a $PoiNB$ random variable for fixed $\theta$. Mathematically, if $Y_i\sim PoiG(\lambda_i,\theta)$ for each $i=1, 2, ..., n$ then, $$ \sum_{i=1}^n Y_i\sim PoiNB(\sum_{i=1}^{n}\lambda_i,n,\theta). $$ \textbf{Proof of Result 1} From (\ref{eqn8}), the pgf of $Y_i\sim PoiG(\lambda_i,\theta)$ is \begin{align*} H_{Y_i}(s)&=\dfrac{\theta e^{\lambda_i(s-1)}}{1-s+\theta s} \end{align*} for $i=1, 2, ..., n$. We can derive the pgf of sum of $n$ independent $PoiG(\lambda_i,\theta)$ variates based on the convolution property of the pgf. Let, $Z=Y_1+Y_2+....+Y_n$. Then, \begin{align}\label{eqn12} H_{Z}(s)&=\prod_{i=1}^{n}H_{Y_i}(s)\nonumber\\ &=\dfrac{\theta^n}{(1-s+\theta s)^n} e^{\sum_{i=1}^{n}{\lambda_i(s-1)}}. \end{align} The term $\theta^n/(1-s+\theta s)^n$ in (\ref{eqn12}) is the pgf of $NB(n,\theta)$ which is a generalisation of geometric distribution and $e^{\sum_{i=1}^{n}{\lambda_i(s-1)}}$ is pgf of $P\left(\sum_{i=1}^{n}\lambda_i\right)$. Thus $\sum_{i=1}^{n}Y_i\sim PoiNB\left(\sum_{i=1}^{n}\lambda_i,n,\theta\right)$. \subsection{Moments and related concepts} The $r^{th}$ order raw moment of $Y\sim PoiG(\lambda, \theta)$ can be obtained using the general expressions of the raw moments of $Y_1\sim P(\lambda)$ and $Y_2\sim G(\theta)$ as follows. \begin{align*} E(Y^r)&=E\left(\sum_{j=0}^{r}\binom Yj{Y_1}^j {Y_2}^{y-j}\right)\\ &=\sum_{j=0}^{r}\binom Yj E({Y_1}^j)E({Y_2}^{y-j}) \end{align*} Note that, \begin{align*} E({Y_1}^j)&=\sum_{{Y_1}=0}^{\infty}{Y_1}^{j}\hspace{5PT} \dfrac{e^{-\lambda}{\lambda}^{Y_1}}{Y_1!} \\ &=\sum_{{Y_1}=0}^{\infty} \lambda^{Y_1} S(j,{Y_1})\\ &=\phi_j(\lambda). \end{align*} Here, $S(j,{Y_1})$ is the Stirling number of the second kind \cite{abramowitz1964handbook} and $\phi_j(\lambda)$ is the Bell polynomial \cite{mihoubi2008bell}. Again, \begin{align*} E({Y_2}^{y-j})&=\sum_{{Y_2}=0}^{\infty}{Y_2}^{y-j}\theta(1-\theta)^{Y_2}\\ &=\theta\hspace{5pt}Li_{-(y-j)}(1-\theta), \end{align*} where $Li_{-(y-j)}(1-\theta)$ is the polylogarithm of negative integers \cite{cvijovic2007new}. Hence \begin{align}\label{eqn13} E(Y^r)&=\sum_{j=0}^{r}\binom Yj\phi_j(\lambda)\theta\hspace{5pt}Li_{-(y-j)}(1-\theta). \end{align} The $r^{th}$ order raw moment can also be calculated by differentiating the mgf in (\ref{eqn9}) $r$ times with respect to $t$ and putting $t=0$. That is, \begin{align*} E(Y^r)=M_{Y}^{(r)}(0)=\dfrac{d^r}{dt^r}[M_Y(t)]_{t=0}. \end{align*} Explicit expressions of the first four moments are listed below. \begin{align}\label{eqn14} E(Y)&=\lambda+\dfrac{1-\theta}{\theta}\\ \label{eqn15} E(Y^2)&=\dfrac{1}{\theta ^2}[\theta^2(\lambda^2-\lambda+1)+\theta(2\lambda-3)+2]\\ \label{eqn16} E(Y^3)&=\dfrac{1}{\theta ^3}[\theta^3(\lambda^3+\lambda-1)+\theta^2(3\lambda^2-6\lambda+7)+\theta(6\lambda-12)+6]\\ E(Y^4)&=\dfrac{1}{\theta ^4}[\theta^4(\lambda^4+2\lambda^3+\lambda^2-\lambda+1)+\theta^3(4\lambda^3-6\lambda^2+14\lambda-15)\nonumber\\ \label{eqn17} &\hspace{30pt}+2\theta^2(6\lambda^2-18\lambda+25)+12\theta(2\lambda-5)+24] \end{align} Using the above, explicit expressions of the first four central moments are given as follows. \begin{align}\label{eqn18} \mu_1&=0\\ \label{eqn19} \mu_2&=\lambda+\dfrac{1-\theta}{\theta^2}\\ \label{eqn20} \mu_3&=\frac{\theta ^3 \lambda +\theta ^2-3 \theta +2}{\theta ^3}\\ \label{eqn21} \mu_4&=\frac{\theta ^4 \lambda (3 \lambda +1)-\theta ^3 (6 \lambda +1)+2 \theta ^2 (3 \lambda +5)-18 \theta +9}{\theta ^4} \end{align} The first raw and second central moments are mean and variance of the $PoiG(\lambda,\theta)$ distribution, respectively. Let $\gamma_1$ and $\gamma_2$ denote the coefficients of skewness and kurtosis, respectively. Using the central moments, these coefficients can be derived in closed forms as follows. \begin{align*} \beta_1&=\frac{ {\mu_3}^2}{{\mu_2}^3}=\frac{\left(\theta ^3 \lambda +\theta ^2-3 \theta +2\right)^2}{\left(\theta ^2 \lambda -\theta +1\right)^3}\\ \nonumber\\ \gamma_1&=\sqrt{\beta_1}=\sqrt{\frac{\left(\theta ^3 \lambda +\theta ^2-3 \theta +2\right)^2}{\left(\theta ^2 \lambda -\theta +1\right)^3}}\\ \nonumber\\ \beta_2&=\frac{\mu_4}{{\mu_2}^2}=\frac{\theta ^4 \lambda (3 \lambda +1)-\theta ^3 (6 \lambda +1)+2 \theta ^2 (3 \lambda +5)-18 \theta +9}{\left(\theta ^2 \lambda -\theta +1\right)^2}\\ \nonumber\\ \gamma_2&=\beta_2-3=\frac{\theta ^4 \lambda (3 \lambda +1)-\theta ^3 (6 \lambda +1)+2 \theta ^2 (3 \lambda +5)-18 \theta +9}{\left(\theta ^2 \lambda -\theta +1\right)^2}-3 \end{align*} \textbf{Remark 3} \begin{itemize} \item As $\theta \rightarrow 1$, $\beta_1 \rightarrow \dfrac{1}{\lambda}$ and as $\theta \rightarrow 0$, $\beta_1 \rightarrow 4$. \item As $\theta \rightarrow 1$, $\beta_2 \rightarrow 3+\dfrac{1}{\lambda}$ and as $\theta \rightarrow 0$, $\beta_2 \rightarrow 9$. \end{itemize} The statements made in Remark 3 can easily be realized visually from Figure \ref{skplot} and Figure \ref{kurplot}, respectively. Clearly, as $\lambda\rightarrow\infty$, the distribution tends to attain normal shape with $\beta_1\rightarrow 0$ and $\beta_2\rightarrow 3$. \begin{figure}[!] \centering \includegraphics[width=15cm,height=4.5cm]{skewness.png} \caption{Skewness of $PoiG(\lambda,\theta)$ for $\theta\in\{0.2,0.4,0.6,0.8\}$. The $i^{th}$ plot corresponds to the $i^{th}$ value of $\theta$ for different values of $\lambda$ in the $x$-axis.} \label{skplot} \includegraphics[width=15cm,height=4.5cm]{kurtosisgph.png} \caption{Kurtosis of $PoiG(\lambda,\theta)$ for $\theta\in\{0.2,0.4,0.6,0.8\}$. The $i^{th}$ plot corresponds to the $i^{th}$ value of $\theta$ for different values of $\lambda$ in the $x$-axis.} \label{kurplot} \end{figure} \subsection{Dispersion index and coefficient of variation} The  dispersion index determines whether a distribution is suitable for modelling an over, under and equi-dispersed dataset or not. Let $I_Y$ denote the dispersion index of the distribution of the random variable $Y$. When $I_{Y}$ is more or less than one, the distribution of $Y$ can accommodate over-dispersion or under-dispersion, respectively. The notion of equi-dispersion is indicated when $I_{Y}=1$. The dispersion index is given by \begin{align} I_{Y}&=\dfrac{{\sigma}^2}{\mu}=1+\dfrac{(1-\theta)^2}{\theta(1+\lambda\theta-\theta)}.\nonumber \end{align} From the expression of $I_Y$ above, it follows that the $PoiG$ distribution is equi-dispersed when $\theta= 1$ and over-dispersed for all $0<\theta<1$. From Figure \ref{DIplot}, it can be observed that $I_Y$ increases with decreasing $\lambda$ and $\theta$. The coefficient of variation (CV) is an indicator for data variability. Higher value of the CV indicates the capability of a distribution to model data with higher variability. Note that, \begin{align} CV(Y)= \dfrac{\sqrt{\lambda\theta^2-\theta+1}}{\lambda\theta-\theta+1}\times 100\%.\nonumber \end{align} \begin{figure}[!] \centering \includegraphics[width=17cm,height=7cm]{dispersion_index_plot.png} \caption{Dispersion index of $PoiG(\lambda,\theta)$.} \label{DIplot} \end{figure} \subsection{Mode} In Section 3.7, we show that $PoiG(\lambda,\theta)$ is unimodal. Note that, \begin{eqnarray*} & & p_Y(1)\leq p_Y(0)\nonumber\\ &\implies &(1+\lambda-\theta)\theta e^{-\lambda} \leq\theta e^{-\lambda}\nonumber\\ &\implies & \lambda\theta e^{-\lambda}-\theta^2 e^{-\lambda}\leq 0\nonumber\\ &\implies & \lambda-\theta\leq 0 \nonumber\\ &\implies &\lambda\leq\theta. \end{eqnarray*} The converse is trivially true. Thus, the distribution has mode at zero for $\lambda\leq \theta$. Figure \ref{pmfplot} clearly shows that the mode is zero for $\lambda=0, 0.5$ and $\theta>0, 0.5$. For the equality case, that is $\lambda=\theta$, the masses at zero and at unity are the same. Figure \ref{bimodalplot} clearly exhibits this fact. However, for the $\lambda>\theta$ case, the distribution has non-zero mode. Unfortunately, an explicit expression for this non-zero mode is difficult to find, if not impossible. \begin{figure}[!] \centering \includegraphics[width=15.5cm,height=5cm]{bimodal.png} \caption{Probability mass function of $PoiG(\lambda,\theta)$ for $\lambda=\theta \in \{0.2,0.4,0.6,0.8\}$. } \label{bimodalplot} \end{figure} \subsection{Reliability properties} Reliability function of a discrete random variable $Y$ at $y$ is defined as the probability of $Y$ assuming values greater than or equal to $y$. The reliability function is also termed as the survival function. The survival function of $Y\sim PoiG(\lambda,\theta)$ is \begin{align}\label{eqn22} S_Y(y)&=P(Y \geq y)=1-\dfrac{\Gamma(y,\lambda)}{\Gamma y}+\dfrac{(1-\theta)^{y}}{\Gamma y}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y,\dfrac{\lambda}{1-\theta}\right). \end{align} The hazard rate or failure rate of a discrete random variable $T$ at time point $t$ is defined as the conditional probability of failure at $t$, given that the survival time is at least $t$. The hazard rate function (hrf) of $Y\sim PoiG(\lambda,\theta)$ can be obtained by using (\ref{eqn1}) and (\ref{eqn4}) as follows. \begin{align} h_Y(y)=\dfrac{P(Y=y)}{P(Y\geq y)}&=\dfrac{ \dfrac{\theta(1-\theta)^y}{\Gamma(y+1)}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y+1,\dfrac{\lambda}{1-\theta}\right)} {1-\dfrac{\Gamma(y,\lambda)}{\Gamma y}+\dfrac{(1-\theta)^{y}}{\Gamma y}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y,\dfrac{\lambda}{1-\theta}\right)}\nonumber\\ \nonumber\\ \label{eqn23} &=\dfrac{\theta (1-\theta)^y \exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y+1,\dfrac{\lambda}{1-\theta}\right)}{\Gamma(y+1)-y \Gamma(y,\lambda)+y (1-\theta)^y\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y,\dfrac{\lambda}{1-\theta}\right)}. \end{align} The hrf for different choices of the parameters are exhibited in Figure \ref{hrplot}. The $PoiG$ distribution exhibits constant failure rate when $\lambda$ is very small and it exhibits an increasing failure rate, up to a specific time period, when $\lambda$ increases. In reliability studies, the mean residual life is the expected additional lifetime given that a component has survived until a fixed time. If the random variable $Y\sim PoiG(\lambda,\theta)$ represents the life of a component, then the mean residual life is \begin{align} \mu_Y(y)&= E(Y-y|Y\geq y)\nonumber\\ &=\frac{\sum_{y=k}^{\infty}(y-k)P(Y=y)}{P(Y\geq y)}\nonumber\\ &=\frac{\sum_{y=k}^{\infty}\bar{F}(y)}{\bar{F}(k-1)}\nonumber\\ \label{eqn24} &=\frac{\sum_{y=k}^{\infty}\left(\ 1-\dfrac{\Gamma(y,\lambda)}{\Gamma y}+\dfrac{(1-\theta)^{y}}{\Gamma y}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(y,\dfrac{\lambda}{1-\theta}\right)\right)}{1-\dfrac{\Gamma(k-1,\lambda)}{\Gamma (k-1)}+\dfrac{(1-\theta)^{k-1}}{\Gamma (k-1)}\exp{\left(\dfrac{\lambda\theta}{1-\theta}\right)}\Gamma\left(k-1,\dfrac{\lambda}{1-\theta}\right)}. \end{align} \subsection{Monotonic Properties} $Y\sim PoiG(\lambda,\theta)$ is log-concave if the following holds for all $y \geq 1$. \begin{align*} p_Y^2(y) \geq p_{Y}(y-1)p_{Y}(y+1) \end{align*} A log-concave distribution possesses several desirable properties. Some of the notable examples of log-concave distributions are the Bernoulli, binomial, Poisson, geometric, and negative binomial. Convolution of two independent log-concave distributions is also a log-concave distribution \cite{johnson2007log}. Being the convolution of Poisson and Geometric distributions, the proposed $PoiG$ distribution is log-concave. Consequently, the following statements hold good for the $PoiG$ distribution (\cite{an1997log} and \cite{bagnoli2006log}). \begin{itemize} \item Strongly unimodal. \item At most one exponential tail. \item All the moments exist. \item Log-concave survival function. \item Monotonically increasing hazard rate function (see Figure \ref{hrplot}). \item Monotonically decreasing mean residual life function. \end{itemize} \begin{figure}[!] \label{hazard} \centering \includegraphics[width=15cm,height=20cm]{HAZARDpoig.png} \caption{Hazard rate function of $PoiG(\lambda,\theta)$ for $\lambda\in\{0,0.5,5,10\}$ row-wise and $\theta\in\{0.2,0.4,0.6,0.8\}$ column-wise. The $(i,j)^{th}$ plot corresponds to the $i^{th}$ value of $\lambda$ and $j^{th}$ value of $\theta$ for $i,j=1,2,3,4$.} \label{hrplot} \end{figure} \subsection{Stochastic ordering} Stochastic order is an important statistical property used to compare the behaviour of different random variables \cite{bakouch2014new}. We have considered here the likelihood ratio order $\geq_{lr}$. Let $X\sim PoiG(\lambda_1,\theta)$ and $Y\sim PoiG(\lambda_2,\theta)$. Then $Y$ is said to be smaller than $X$ in the usual likelihood ratio order, that is $Y\leq_{lr}X$) if $L(x)=p_X(x)/p_Y(x)$ is an increasing function in $x$, that is $L(x)\leq L(x+1)$ for all $0<\theta<1$ and $\lambda_2 <\lambda_1$. Note that, \begin{align*} p_X(x)&= \theta (1-\theta)^x e^{-\lambda_1}\sum_{i=0}^{x}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda_1}{1-\theta}\right)^i,\hspace{25pt}x=0,1,2,.. \\ p_Y(x)&= \theta(1-\theta)^x e^{-\lambda_2}\sum_{i=0}^{x}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda_2}{1-\theta}\right)^i,\hspace{25pt}x=0,1,2,...\, .\\ L(x)&=\exp{[-(\lambda_1-\lambda_2)]}\dfrac{\sum_{i=0}^{x}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda_1}{1-\theta}\right)^i}{\sum_{i=0}^{x}\dfrac{1}{\Gamma(i+1)}\left(\dfrac{\lambda_2}{1-\theta}\right)^i},\hspace{12pt}x=0,1,2,.. \end{align*} It is easy to see that, $ L(x)\leq L(x+1)$ for all $0<\theta<1$ and $\lambda_2 < \lambda_1$. Let $Y\leq_{st}X$ denote $P(Y \geq x)\leq P(X\geq x)$ for all $x$. This is the notion of stochastic ordering. Similarly, the hazard rate order $Y\leq_{hr} X$ implies $$ \dfrac{p_X(x)}{P(X \geq x)}\leq \dfrac{p_Y(x)}{P(Y\geq x)} $$ for all $x$. The reversed hazard rate order $Y\leq_{rh}X$ implies $$ \dfrac{p_Y(x)}{P(Y\leq x) }\leq \dfrac{p_X(x)}{P(X \leq x)} $$ for all $x$. From the likelihood ratio order of $X$ and $Y$, the following statements are immediate \cite{bakouch2014new}. \begin{itemize} \item Stochastic order: $Y\leq_{st}X$. \item Hazard rate order: $Y\leq_{hr} X$. \item Reverse hazard rate order: $Y\leq_{rh}X$. \end{itemize} \section{Estimation} Let ${\bf Y} = (Y_1,Y_2, . . . , Y_n)$ be a random sample of size $n$ from the $PoiG(\lambda,\theta)$ distribution and ${\bf y} = (y_1,y_2,. . . , y_n)$ be a realization on ${\bf Y}$. The objective of this section is estimate the parameters $\lambda$ and $\theta$ based on the available data ${\bf y}$. We present two different methods of estimation. We also find asymptotic confidence intervals for both the parameters based on the maximum likelihood estimates. \subsection{Method of moments} Using the expressions in (\ref{eqn14}) and (\ref{eqn19}), the mean and the variance of $Y\sim PoiG(\lambda,\theta)$ are as follows. \begin{align*} \mu_1^{'}=\lambda+\dfrac{1-\theta}{\theta}\hspace{8pt}and\hspace{8pt} \mu_2=\lambda+\dfrac{1-\theta}{\theta^2} \end{align*} Now by subtracting $\mu_2$ from $\mu_1^{'}$, \begin{align} & \quad \quad \,\,\, \mu_1^{'}-\mu_2=\dfrac{1-\theta}{\theta}-\dfrac{1-\theta}{\theta^2}\nonumber\\ &\implies \mu_1^{'}-\mu_2=\dfrac{1-\theta}{\theta}\left(1-\dfrac{1}{\theta}\right)\nonumber\\ &\implies \mu_2-\mu_1^{'}=\left(\dfrac{1-\theta}{\theta}\right)^2\nonumber\\ &\implies \dfrac{1-\theta}{\theta}=\sqrt{\mu_2-\mu_1^{'}}\nonumber\\ &\implies \theta= \dfrac{1}{1+\sqrt{\mu_2-\mu_1^{'}}}\label{eqn25} \end{align} By putting $\theta$ from (\ref{eqn25}) in $\mu_1^{'}$, we obtain \begin{align} \lambda=\mu_1^{'}-\sqrt{\mu_2-\mu_1^{'}}\label{eqn26} \end{align} This method involves equating sample moments with theoretical moments. Thus, by equating the first sample moment about the origin $m_1^{'}=\sum_{i=1}^{n}y_i/n$ to $\mu_1^{'}$ and the second sample moment about the mean $m_2=\sum_{i=1}^{n}(y_i-\bar{y})^2/n$ to $\mu_2$ in equation (\ref{eqn25}) and (\ref{eqn26}), we obtain the following estimators for $\lambda$ and $\theta$. \begin{align} \hat{\lambda}_{MM}&=m_1^{'}-\sqrt{m_2-m_1^{'}}\label{eqn27}\\ \hat{\theta}_{MM}&= \dfrac{1}{1+\sqrt{m_2-m_1^{'}}}\label{eqn28} \end{align} \subsection{Maximum likelihood method} Using the pmf of $Y\sim PoiG(\lambda,\theta)$ in (\ref{eqn1}), the log-likelihood function of the parameters $\lambda$ and $\theta$ can easily be found as \begin{align} \label{ll eqnn29} l(\lambda,\theta;\bm{y})&= n \log\theta + n \overline{y} \log(1-\theta)+\dfrac{n\lambda\theta}{1-\theta}+\sum_{i=0}^n \log\left(\dfrac{\Gamma\left(y_i+1,\dfrac{\lambda}{1-\theta}\right)}{\Gamma(y_i+1)}\right). \end{align} Let us define, $$ \beta=\dfrac{\lambda}{1-\theta} $$ and for $j=1, 2, 3, ...$ $$ \alpha_{j}(y_i)=\dfrac{e^{-\beta}}{\Gamma \left(y_i+1,\beta\right)}\dfrac{1}{(1-\theta)^j}. $$ Differentiating (\ref{ll eqnn29}), with respect to parameters $\lambda$ and $\theta$, we get the score functions as \begin{align} \dfrac{\partial}{\partial\lambda}l(\lambda,\theta;\bm{y})&=\frac{n\theta }{1-\theta }-\sum _{i=1}^n \alpha_{1}(y_i)\beta^{y_i}\label{eqn30}\\ \dfrac{\partial}{\partial\theta}l(\lambda,\theta;\bm{y})&=\frac{n}{\theta }+\frac{n(\lambda-\bar{y}) }{1-\theta }+\frac{ n\lambda\theta}{(1-\theta )^2}-\sum _{i=1}^n \lambda \alpha_{2}(y_i)\beta^{y_i}.\label{eqn31} \end{align} Ideally, the explicit maximum likelihood estimators are obtained by simultaneously solving the two equations obtained by setting right hand sides of (\ref{eqn30}) and (\ref{eqn31}) equal to zero. Unfortunately, the explicit expressions of the maximum likelihood estimators could not be obtained in this case due to the structural complexity. Thus, we directly optimize the log-likelihood function with respect to the parameters using appropriate numerical technique. Let $\hat{\lambda}_{ML}$ and $\hat{\theta}_{ML}$ denote the maximum likelihood estimates (MLE) of $\lambda$ and $\theta$ respectively. Now, our objective is to obtain asymptotic confidence intervals for both the parameters. For this purpose, we require the information matrix. The second-order partial derivative of the log-likelihood are given below. \begin{align*} \dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \lambda^2}&= \sum _{i=1}^n \left[(\beta^{y_i}-y_i \beta^{y_i -1})\alpha_{2}(y_i) -\beta^{2y_i}\alpha_{1}(y_i)^2\right]\\ \dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial\lambda\partial\theta}&= \dfrac{n}{(1-\theta)^2}+\sum _{i=1}^n \left[\lambda(\beta^{y_i}-y_i \beta^{y_i -1})\alpha_{3}(y_i)-\beta^{y_i}\alpha_{2}(y_i)-\lambda(1-\theta)\beta^{2y_i}\alpha_{1}(y_i)^2\right]\\ \dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \theta^2}&=\dfrac{2n\lambda-n\bar{y}(1-\theta)}{(1-\theta)^3}-\dfrac{n}{\theta^2} +\\ &\hspace{12pt}\sum _{i=1}^n \left[((\lambda^2-2\lambda(1-\theta))\beta^{y_i}-\lambda^2 y_i\beta^{y_i-1})\alpha_{4}(y_i)-\lambda^2\beta^{2y_i}\alpha_{2}(y_i)^2\right] \end{align*} The Fisher's information matrix for $(\lambda,\theta)$ is \begin{align*} I= \begin{pmatrix} -E\left(\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \lambda^2}\right) & -E\left(\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial\lambda\partial\theta}\right) \\ & \\ -E\left(\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial\lambda\partial\theta}\right) & -E\left(\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \theta^2}\right). \end{pmatrix} \end{align*} This can be approximated by \begin{align*} \widehat{I}= \begin{pmatrix} -\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \lambda^2} & -\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial\lambda\partial\theta} \\ & \\ -\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial\lambda\partial\theta} & -\dfrac{\partial^2 l(\lambda,\theta;\bm{y})}{\partial \theta^2}. \end{pmatrix}_{(\lambda,\theta)=(\hat{\lambda}_{ML},\hat{\theta}_{ML})} \end{align*} Under some general regularity conditions, for large $n$, $\sqrt n (\hat{\lambda}_{ML}-\lambda,\hat{\theta}_{ML}-\theta)$ is bivariate normal with the mean vector $(0,0)$ and the dispersion matrix \begin{align*} \hat{I}^{-1}= \dfrac{1}{I_{11}I_{22}-I_{12}I_{21}} \begin{pmatrix} I_{22}&-I_{12}\\ & \\ -I_{21}&I_{11} \end{pmatrix} = \begin{pmatrix} J_{11}&-J_{12}\\ & \\ -J_{21}&J_{22}. \end{pmatrix} \end{align*} Thus, the asymptotic $(1 - \alpha)\times 100\% $ confidence interval for $\lambda$ and $\theta$ are given respectively by\\ $$\left(\hat{\lambda}_{ML}-Z_{\dfrac{\alpha}{2}}\sqrt{J_{11}}\hspace{5pt} , \hspace{5pt}\hat{\lambda}_{ML}+Z_{\dfrac{\alpha}{2}}\sqrt{J_{11}}\right) \text{and} \left(\hat{\theta}_{ML}-Z_{\dfrac{\alpha}{2}}\sqrt{J_{22}}\hspace{5pt},\hspace{5pt}\hat{\theta}_{ML}+Z_{\dfrac{\alpha}{2}}\sqrt{J_{22}}\right).$$ \setlength{\arrayrulewidth}{0.50mm} \section{Discussion} In this article, a new two-parameter distribution is proposed, extensively studied. Core of this work is theoretical development, its applied aspect is also important. From the application point of view, the proposed model is easy to use for modeling over-dispersed data. Despite the availability of several other over-dispersed count models, the proposed model may find wide applications due to the interpretability of its parameters. The parameter $\lambda$ controls the tail of the distribution while the parameter $\theta$ adjusts for the over-dispersion present in a given dataset. Their combined effect gives flexibility to the shape of the distribution. When $\theta$ dominates $\lambda$, it keeps the $J$-shaped mass distribution and for large $\lambda$, the bell-shaped mass distribution. Consequently, the hump or the concentration of the observations is well accommodated. Simulation experiment to investigate performance of the point and asymptotic interval estimator and comparative real life data analysis will be reported in the complete version of the article. \newpage \bibliographystyle{acm}
\section{Introduction} Let $\Omega$ be a bounded, connected, sufficiently smooth open set, $p>1$ and $\beta\in\mathbb{R}$. In this paper, we study the asympthotic behaviour, as $p\to 1^+$, of the following minimum problem \begin{equation} \label{lambda_intro} \lambda_1(\Omega,p,\beta)=\inf_{\substack{\varphi\in W^{1,p}(\Omega)\\ \varphi \ne0}} J_p(\varphi) \end{equation} where \begin{equation} \label{functional_Jp_intro} J_p(\varphi)=\dfrac{\displaystyle \int_\Omega F^p(\nabla \varphi)dx+\beta\displaystyle\int_{\partial \Omega} \abs{\varphi}^pF(\nu)d\mathcal{H}^{N-1}}{\displaystyle\int_\Omega \abs{\varphi}^pdx}, \end{equation} $\nu$ is the outer normal to $\partial\Omega$ and $F$ is a sufficiently smooth norm on $\mathbb{R}^n$. If $u\in W^{1,p}(\Omega)$ is a minimizer of \eqref{lambda_intro}, then it solves the following Robin eigenvalue problem \begin{equation*} \begin{cases} -\mathcal Q_p u=\lambda_1(\Omega,p,\beta)\abs{u}^{p-2}u \;&\textrm{in}\;\Omega\\ F^{p-1}(\nabla u) F_\xi(\nabla u)\cdot \nu +\beta F(\nu)\abs{u}^{p-2}u=0\;&\textrm{on}\;\partial \Omega, \end{cases} \end{equation*} where $\mathcal Q_p u$ is the anisotropic $p-$Laplace operator \[ \mathcal Q_p u:= \dive \left(\frac{1}{p}\nabla_{\xi}[F^{p}](\nabla u)\right). \] From the point of view of finding optimal domains for $\lambda_1(\Omega,p\beta)$, there is a significant difference from the case of $\beta>0$ to the case $\beta<0$. It is known that the optimal shape with a volume constraint for \eqref{lambda_intro} depends on the sign of $\beta$. For positive values of the Robin parameter, the so-called Wulff shape (see Section \ref{notation_sec} for details) is a minimizer \cite{fragavitone}: \[ \lambda_1(\Omega,p,\beta)\ge \lambda_1(\mathcal{W},p,\beta)\quad\text{where }|\mathcal{W}|=|\Omega|. \] If $\beta<0$, the problem is not completely solved, even in the Euclidean case (that is when $F(\xi)=\sqrt{\sum_i \xi_i^2}$). Indeed, in 1977 Bareket \cite{bareket1977isoperimetric} conjectured that, the first eigenvalue is maximized by a ball in the class of the smooth bounded domains of given volume. In \cite{ferone2015conjectured} it has been showed that it is true for domains close, in certain sense, to a ball. Subsequently, the authors in \cite{freitas2015first} (see \cite{kovavrik2017p} for the $p$-Laplacian case) have disproved the conjecture for $\left|\beta\right|$ large enough and have showed that it is true for small values of $\left|\beta\right|$ in suitable class of domains. In the Finsler setting, this problem has been addressed in \cite{paoli2019two}. Our final aim is to obtain optimal shapes for the limiting functional of \eqref{lambda_intro}, as $p\to 1^+$. To do that, we first study the limit of $\lambda_1(\Omega,p\beta)$. In particular, we prove that when $\beta>-1$, the functional $J_p$, defined in \eqref{functional_Jp_intro}, $\Gamma-$converges, as $p\to 1^+$, to \[ J(\varphi)=\dfrac{\displaystyle \abs{D\varphi}_F(\Omega)+\min\{1,\beta\}\displaystyle\int_{\partial \Omega} \abs{\varphi}F(\nu)d\mathcal{H}^{N-1}}{\displaystyle\int_\Omega \abs{\varphi}dx}, \] where $|D\varphi|_F(\Omega)$ is the anisotropic total variation of $\varphi$ (see Section \ref{notation_sec} for the precise definition). This will imply that \begin{equation} \label{Lambda_intro} \lim_{p\to 1^+}\lambda_1(\Omega,p,\beta)= \Lambda(\beta,\Omega):=\inf_{\varphi\in BV(\Omega)}J(\varphi). \end{equation} Then, we prove an isoperimetric inequality for $\Lambda(\Omega,\beta)$. In particular, we obtain that keeping the volume of $\Omega$ fixed, the Wulff shape minimises $\Lambda(\Omega,\beta)$ when $\beta \ge 0$, and maximises it when $-1<\beta < 0$. The proof of the convergence result, and then of the two isoperimetric inequalities, relies on two results on the anisotropic total variation, which are also of independent interest. The first one is a trace inequality in the $BV$ space: \begin{equation} \int_{\partial \Omega}\abs{u} F(\nu)\, d\mathcal{H}^{N-1}\leq c_1\abs{Du}_F(\Omega)+c_2\int_{\Omega}\abs{u}dx,\quad \forall u\in BV(\Omega), \end{equation} where $c_1$ and $c_2$ are two constants which depend on the geometry of the domain. This inequality has been revealed very useful in capillarity problems, and it has been studied for example in \cite{anzellotti1978funzioni,gerhardt,giusti1981equilibrium}. The second key result is an interior approximation for $BV$ functions by smooth functions with compact support. It is well known that if $\Omega$ is an open set, then the total variation of a function $u\in BV(\Omega)$ can be approximated with the corresponding total variation of a sequence in $C^\infty(\Omega)$. Actually, an analogous result is not true in general if one need to axpproximate $|Du|$ with a sequence of $C^\infty$ function with compact support in $\Omega$. In order to do that, more regularity is needed on $\Omega$. In the Euclidean setting, this problem has been addressed in \cite{littig2014,schmidt2015strict}. In this paper, we show that for any $u\in BV(\Omega)\cap L^p(\Omega)$, for some $p\in [1,\infty)$, there exists a sequence $\{u_k\}_{k\in\mathbb N}\subseteq C_0^\infty(\Omega)$ such that, for any $q\in [1,p]$, \[ u_k\to u\ \ \text{in}\ \ L^q(\Omega)\quad\text{and}\quad |D u_k|_F(\mathbb R^N)\to |D u|_F(\mathbb R^N). \] We finally stress that the problem we deal with is strictly related to capillarity problems. We refer the reader, for example, to \cite{gerhardt,giusti1981equilibrium} for the Euclidean case and to \cite{philippis2015regularity} for the anisotropic case. The structure of the paper is the following. In Section \ref{notation_sec}, we review some useful tools on the Finsler norm, the anisotropic curvature and functions of bounded variation. In Section \ref{trace_sec} we prove the anisotropic trace inequality for general domains, and for smooth domains. In Section \ref{approx_sec}, we give the strict approximation result and finally, in Section \ref{eig_sec} we prove the $\Gamma-$convergence results and the isoperimetric inequality for $\Lambda(\Omega,\beta)$. \section{Notation and preliminaries} \label{notation_sec} In this Section we give several definitions and properties related the Finsler norm. In particular, we review some basic facts on the anisotropic total variation of a $BV$ function, and on the anisotropic curvatures. \subsection{The Finsler norm} Throughout the paper we will assume that $F$ is a convex, even, $1-$homogeneous function \[ \xi\in \mathbb{R}^{N}\mapsto F(\xi)\in [0,+\infty[, \] such that \begin{equation} \label{eq:omo} F(t\xi)=|t|F(\xi), \quad t\in \mathbb{R},\,\xi \in \mathbb{R}^{N}, \end{equation} and such that \begin{equation} \label{eq:lin} a|\xi| \le F(\xi),\quad \xi \in \mathbb{R}^{N}, \end{equation} for some constant $a>0$. It is easily seen that this hypothesis assure the existence of a positive constant $b\ge a$ such that \[ F(\xi)\le b |\xi|,\quad \xi \in \mathbb{R}^{N}. \] Throughout the paper, we will also assume that $F$ belongs to $C^{2}(\mathbb{R}^N\setminus \{0\})$ and that \begin{equation} \label{strong} \nabla^{2}_{\xi}[F^{2}](\xi)\text{ is positive definite in }\mathbb{R}^{N}\setminus\{0\}. \end{equation} The assumption \eqref{strong} on $F$ ensures that the operator \[ \mathcal Q_p u:= \dive \left(\frac{1}{p}\nabla_{\xi}[F^{p}](\nabla u)\right) \] is elliptic, therefore there exists a positive constant $\gamma$ such that \begin{equation*} \sum_{i,j=1}^{n}{\nabla^{2}_{\xi_{i}\xi_{j}}[F^{p}](\eta) \xi_i\xi_j}\ge \gamma |\eta|^{p-2} |\xi|^2 \qquad\forall\eta\in\mathbb{R}^N\setminus\{0\}, \ \forall\xi\in\mathbb{R}^N. \end{equation*} \begin{comment} On the other hand, for $p\ge 2$, the condition \begin{equation*} \nabla^{2}_{\xi}[F^{2}](\xi)\text{ is positive definite in }\mathbb{R}^{N}\setminus\{0\}, \end{equation*} is sufficient for the validity of \eqref{strong}. \end{comment} The polar function $F^o\colon\mathbb{R}^N \rightarrow [0,+\infty[$ of $F$ is \begin{equation*} F^o(v)=\sup_{\xi \ne 0} \frac{ \xi\cdot v}{F(\xi)}. \end{equation*} It is easily seen that also $F^o$ is a convex function satisfying the properties \eqref{eq:omo} and \eqref{eq:lin}. Furthermore, we have \begin{equation*} F(v)=\sup_{\xi \ne 0} \frac{ \xi\cdot v}{F^o(\xi)}, \end{equation*} and from this follows that \begin{equation}\label{prodscal} | \xi\cdot \eta | \le F(\xi) F^{o}(\eta) \qquad \forall \xi, \eta \in \mathbb{R}^{N}. \end{equation} The Wulff shape centered at the origin is the set denoted by \[ \mathcal W = \{ \xi \in \mathbb{R}^N \colon F^o(\xi)< 1 \}. \] We denote $\kappa_N=|\mathcal W|$, where $|\mathcal W|$ is the Lebesgue measure of $\mathcal W$. More generally, the set $\mathcal W_r(x_0)$ indicates $r\mathcal W+x_0$, that is the Wulff shape centered at $x_0$ with measure $\kappa_Nr^N$. If no ambiguity occurs, we will write $\mathcal W_r$ instead of $\mathcal W_r(0)$. The functions $F$ and $F^o$ enjoy the following properties: \begin{align} & F_{\xi}(\xi) \cdot \xi = F(\xi), \quad F_{\xi}^{o} (\xi)\cdot \xi = F^{o}(\xi) &\forall \xi \in \mathbb{R}^N\setminus \{0\},\\ & F(F_{\xi}^o(\xi))=F^o( F_{\xi}(\xi))=1 &\forall \xi \in \mathbb{R}^N\setminus \{0\}, \label{FF0xi} \\ & F^o(\xi) F_{\xi}(F_{\xi}^o(\xi) ) = F(\xi) F_{\xi}^o( F_{\xi}(\xi) ) = \xi &\forall \xi \in \mathbb{R}^N\setminus \{0\}, \end{align} where $F_{\xi}=\nabla F(\xi)$. Given a bounded domain $\Omega$, the anisotropic distance of $x\in\overline\Omega$ to $\partial\Omega$ is defined as \begin{equation*} d_{F}(x):= \inf_{y\in \partial \Omega} F^o(x-y), \quad x\in \overline\Omega. \end{equation*} We highlight that, when $F(\xi)=\sqrt{\sum_i \xi_i^2}$, then $d_F=d_{\mathcal{E}}$ is the Euclidean distance function from the boundary. The function $d_{F}$ is a uniform Lipschitz function in $\overline \Omega$, and \begin{equation*} F(\nabla d_F(x))=1 \quad\text{a.e. in }\Omega. \end{equation*} We have that $d_F\in W_{0}^{1,\infty}(\Omega)$. Many properties of the anisotropic distance function are studied in \cite{crasta2007distance}. Finally, the anisotropic inradius of $\Omega$ is \begin{equation*} R^{F}(\Omega)=\max \{d_{F}(x),\; x\in\overline\Omega\}, \end{equation*} that is the radius of the largest Wulff shape $\mathcal W_{r}(x)$ contained in $\Omega$. \subsection{Anisotropic curvatures} Here we recall some properties of the anisotropic mean curvature, as well as an integration formula in anisotropic normal coordinates. We refer to \cite{crasta2007distance} for further details. If $\Omega$ has a $C^2$ boundary, the anisotropic outer normal to $\partial\Omega$ is defined as \[ n^F(y)= F_{\xi}(\nu(y)),\qquad y\in \partial\Omega, \] where $\nu(y)$ is the Euclidean outer normal to $\partial \Omega$ at $y$. Moreover, by \eqref{FF0xi} it holds that \[ F^o(n^F(y))=1. \] Let us denote by $T_{y}\partial\Omega$ the tangent space to $\partial\Omega$ at $y$; the anisotropic Weingarten map is defined as \[ d n^F\colon T_{y}\partial\Omega \to T_{n(y)}\mathcal W. \] The eigenvalues $\kappa^{F}_{1}\le \kappa^{F}_{2}\le \ldots \le \kappa_{N-1}^{F}$ of this map are called the anisotropic principal curvatures at $y$ (see also \cite{wang2013sharp}). The anisotropic mean curvature of $\partial\Omega$ at a point $y$ is defined as \begin{equation*} \mathcal H^{F}(y)= \kappa_{1}^{F}(y)+\ldots \kappa_{N-1}^{F}(y) , \quad y\in \partial \Omega. \end{equation*} The anisotropic distance $d_F$ is a $C^2$ function in a tubular neighborhood of $\partial\Omega$; hence we are in position to define the matrix-valued function \[ W(y)=-F_{\xi\xi}(\nabla d_{F}(y))\nabla^{2}d_F(y), \quad y\in\partial\Omega. \] Based on this function, it is possible to give a different definition of the anisotropic principal curvatures \cite[Remark 5.9]{crasta2007distance}. Since $W(y)v\in T_y\partial\Omega$, for any $v\in\mathbb{R}^n$, it remains defined the map $\overline W(y)\colon T_{y}\to T_{y}$, as $\overline W(y)w=W(y)w$, $w\in T_{y}$. The matrix $\overline W(y)$ (that is, in general, non-symmetric) admits the real eigenvalues $\kappa_{1}^{F}(y)\le \kappa_{2}^{F}(y)\le \ldots\le \kappa_{N-1}^{F}(y)$. Actually, the definition is equivalent to the preceding one. Moreover, it holds that \[ \mathcal H^{F}(y)= \dive\left[F_{\xi}\left(-{\nabla d_{F}(y)}\right) \right] = \tr(W(y)) \] (see also \cite[Sec. 3]{wang2013sharp}). To state the change of variable formula in anisotropic normal coordinates, we need some preliminary definitions. Let \[ \Phi(y,t)= y-tF_{\xi}(\nu(y)),\qquad y\in \partial\Omega, \quad t\in \mathbb{R} \] and for $y\in \partial \Omega$, \[ \ell(y)=\sup\{d_{F}(z),\, z\in\Omega\text{ and }y\in \Pi(z) )\} \] where \begin{equation} \label{proiection} \Pi(z)=\{\eta\in \partial\Omega\colon d_{F}(z)=F^{o}(z-\eta)\} \end{equation} is the set of the anisotropic projections of a point $z\in\Omega$ on $\partial\Omega$. Then, we recall the following \begin{thm} (\cite[Theorem 7.1]{crasta2007distance})\label{change_normal} For every $h\in L^1(\Omega)$, it holds \[ \int_\Omega h(x)dx=\int_{\partial\Omega} F(\nu(y))\int_0^{\ell(y)}h(\Phi(y,t))J(y,t)\,dt\,d\mathcal H^{N-1}(y), \] where \begin{equation}\label{jacobian} J(y,t)=\displaystyle\prod_{i=1}^{N-1}(1- t \kappa^{F}_i(y)). \end{equation} \end{thm} Since $1- t \kappa^{F}_i(y)>0$ for any $i=1,\ldots,N-1$ (\cite[Lemma 5.4]{crasta2007distance}), $J(y,t)$ is positive. Moreover it holds that \begin{equation} \label{laplaciano_cambio} \frac{-\frac{d}{dt}\left[J(y,t)\right]}{J(y,t)}=\sum_{i=1}^{N-1}\frac{\kappa^{F}_i(y)}{1-t\kappa^{F}_i(y)}. \end{equation} Finally, we conclude this section, by recalling that, for any $x\in \Omega$ such that $\Pi(x)=\{y\}$, it holds that (\cite[Lemma 4.3]{crasta2007distance}): \begin{equation} \label{dentro_fuori} \nabla d_F(x)=-\frac{\nu(y)}{F(\nu(y))}. \end{equation} \subsection{The anisotropic total variation} Let $u\in BV(\Omega)$, the total variation of $u$ with respect to $F$ is defined as \[ |Du|_F(\Omega)=\sup\left\{\int_\Omega u\dive(g)\ dx \ \ : \ g\in C_0^1(\Omega; \mathbb{R}^N), \ F^o(g)\leq 1\right\} \] and the perimeter of a set $E$ with respect to $F$ is: \[ P_F(E;\Omega)=|D\chi_E|_F(\Omega)=\sup\left\{\int_E \dive(g)\ dx \ \ : \ g\in C_0^1(\Omega; \mathbb{R}^N), \ F^o(g)\leq 1\right\}. \] Moreover, \[ P_F(E;\Omega)=\int_{\Omega\cap\partial^* E}F (\nu_E) d\mathcal H^{N-1} \] where $\partial^*E$ is the reduced boundary of $\Omega$ and $\nu_E$ is the Euclidean normal to $\partial E$. Let us fix $u\in BV(\Omega)$ and assume that $u\equiv 0$ in $\mathbb{R}^N\setminus\Omega$. Then $ u\in BV(\mathbb{R}^N)$ and \begin{equation} \label{salto_variazione} |D u|_F(\mathbb{R}^N)=|Du|_F(\Omega)+\int_{\partial\Omega}| u|F(\nu)d\mathcal H^{N-1} \end{equation} (see for example \cite[Lemma 3.9]{BoundaryTrace}). For the anisotropic perimeter, an isoperimetric inequality holds. More precisely, \begin{equation} \label{wulffinequality} P_F(\Omega)\ge P_F(W_R), \end{equation} where $\mathcal W_R$ is the Wulff shape with the same measure of $\Omega$ (see for example \cite[Theorem 2.10]{fonseca1991uniqueness}). The following approximation results in $BV$ hold (refer to \cite{anzellotti1978funzioni}, \cite[Theorem 1.17]{giusti1984minimal} for the Euclidean case and to \cite[Proposition 2.1]{aflt} for the Finsler case). \begin{prop} \label{approximation_BV} Let $f \in BV(\Omega)$, then there exists a sequence $\{f_k\}_{k\in\mathbb{N}} \subseteq C^{\infty}(\Omega)$ such that: \[\lim_{k\rightarrow+\infty}\int_{\Omega}\abs{f_k-f}dx=0 \] and \[ \lim_{k\rightarrow+\infty}\abs{Df_k}_F(\Omega)=\abs{Df}_F(\Omega). \] \end{prop} \begin{prop} Let $E$ be a set of finite perimeter in $\Omega$. A sequence of $C^{\infty}$ sets $\{E_k\}_k$ exists, such that: \[ \lim_{k \rightarrow +\infty}\int_{\Omega} \abs{\chi_{E_k}-\chi_{E}}dx=0 \] and \[ \lim_{k\rightarrow +\infty}|D\chi_{E_k}|_F(\Omega)=P_F(E;\Omega). \] \end{prop} \section{An anisotropic trace inequality} \label{trace_sec} In this section we prove a trace inequality in $BV$ with respect to the anisotropic total variation. We first give the result in a general case (Proposition \ref{trace_prop_Q}), then we refine the constants involved in the inequality by requiring more regularity on the boundary of $\Omega$ (Proposition \ref{trace_prop_1}). \begin{comment} in the spirit of \cite[Theorem4]{anzellotti1978funzioni}. For that we remeber the following : \begin{lem}(Sobolev-Poincaré inequality) If $\Omega$ is a connected bounded open set with lipschitz boundary such that $\partial\Omega$ is continuous and if $v\in BV(\Omega)$, then \[\set{\int_{\Omega} \abs{v-v_{\Omega}}^{\frac{N}{N-1}}dx}^{1-\frac{1}{N}}\leq c_1(\Omega)\abs{Dv}_F,\] where $v_{\Omega}$ is the mean value of $v$ and $c_1$ is a constant independent of $v$. \end{lem} As consequence of this lemma, it holds that \[\abs{A}^{1-\frac{1}{N}}\leq 2c_1P_F(A;\Omega),$\] for every Caccioppoli set $A$ with $\abs{A}\leq\dfrac{\abs{\Omega}}{2}$. \end{comment} Firstly, let us set \[ q(y)=\lim_{\rho \rightarrow 0^+}\sup\left\{\dfrac{\displaystyle\int_{\partial\Omega} \chi_A F(\nu) d\mathcal{H}^{N-1}}{\abs{D\chi_A}_F(\Omega)}: A \subset \Omega \cap B_{\rho} (y), |A|>0, P_F(A;\Omega)<+\infty\right\} \] and $Q=\sup_{y\in\partial\Omega}q(y)$. The following inequality generalizes the trace inequality given in \cite[Theorem 4]{anzellotti1978funzioni}. \begin{prop} \label{trace_prop_Q} Let $\Omega$ be a bounded open set with $\mathcal H^{N-1}(\Omega)<+\infty$, and let $u$ be a function in $BV(\Omega)$. Then for any $\varepsilon>0$, it holds \begin{equation} \label{trace_inequality_Q} \int_{\partial\Omega}|u| F(\nu)d \mathcal H^{N-1}\leq (Q+\varepsilon) |Du|_F(\Omega)+c(\Omega,\varepsilon)\int_\Omega |u| dx, \end{equation} where $c(\Omega,\varepsilon)$ does not depend on $u$. \end{prop} \begin{proof} Let us fix $y \in \partial \Omega$ and $\rho (y)>0$ such that \[ \int_{\partial\Omega} \chi_{B} F(\nu)d\mathcal{H}^{N-1} \leq (Q+\varepsilon) |D\chi_B|_F(\Omega), \] for any $B\subset \Omega\cap B_{\rho (y)}(y)$ with $P_F(B;\Omega)<+\infty$. If $\spt (u)\subset B_{\rho (y)}(y)$, then \begin{multline*} \int_{\partial\Omega}| u| F(\nu)d\mathcal H^{N-1}=\int_{\partial \Omega}F(\nu)\left(\int_0^{+\infty} \chi_{\{\abs{u}>t\}}(y)dt\right) d\mathcal{H}^{N-1}\\ =\int_0^{+\infty}\left(\int_{\partial\Omega}F(\nu)\chi_{\{\abs{u}>t\}}(y)d\mathcal H^{N-1}\right)dt\leq (Q+\varepsilon)\int_0^{+\infty}|D\chi_{\{\abs{u}>t\}}|_F(\Omega) dt. \end{multline*} By using the coarea formula, we have \[ \int_{\partial\Omega}|u|F(\nu)d\mathcal H^{N-1}\leq (Q+\varepsilon)|D|u||_F(\Omega)\leq (Q+\varepsilon)|Du|_F(\Omega). \] Let $\{B_{\rho}(y)\}_{y \in \partial \Omega}$ be a cover of $\partial \Omega$ and let us extract a finite sub-cover $B_1,\dots,B_k$. Now, considering a partition of unity $\varphi_1,\dots,\varphi_k$ such that \[ 0 \leq \varphi_i \leq 1, \qquad \varphi_i \in C^1_0(B_i), \qquad \sum_{i=1}^k \varphi_i(y)=1 \qquad \textrm{if}\; y\in \partial \Omega. \] If $f \in BV(\Omega)$, then \[ \begin{split} \int_{\partial\Omega} \abs{u} F\left(\nu\right) d\mathcal{H}^{N-1}&\leq (Q+\varepsilon) \left|D\left(\sum_{i=1}^k \varphi_i u\right)\right|_F(\Omega)\\ &\leq (Q+\varepsilon) \sum_{i=1}^k (\abs{\varphi_iDu}_F(\Omega)+\abs{uD\varphi_i}_F(\Omega))\\ &=(Q+\varepsilon) \sum_{i=1}^k\left(\int_\Omega \varphi_id |Du|_F+\int_\Omega ud\abs{D\varphi_i}_F(\Omega)\right)\\ &\leq (Q+\varepsilon)\abs{Du}_F(\Omega)+c(\Omega,\varepsilon)\int_{\Omega}\abs{u}dx. \end{split} \] \end{proof} \begin{comment} Similarly to the Euclidean case, if the boundary of $\Omega$ is smooth enough \cite[Proposition1.5-1.6]{giusti1976boundary}, we are able to say that $Q=1$ in \eqref{trace}. In particular, the following proposition holds. \begin{prop} \label{curvatura_limitata} Let $\partial \Omega$ be of class $C^1$ in a neighborhood of $x_0$ in $\partial\Omega$. If $R>0$ and $K(x)$ is a function in $L^N(\Omega_R)$, with $\Omega_R$ the intersection between $\Omega$ and the ball $B_R(x_0)$, such that \begin{equation} \label{integral} \abs{D\chi_{\Omega_R}}_F(B_R)-\int_{\Omega_R}K\;dx \leq \abs{D\chi_{L}}_F(B_R)-\int_{L}K\;dx \end{equation} for every set $L\subset \Omega_R$, coinciding with $\Omega_R$ outside some compact set in $B_R$, then $q(x_0)=1$. \end{prop} \begin{proof} Let us take a set $A\subset \Omega_r$, with $r<R$ and $L=\Omega_R-A$. By using the condition (\ref{integral}), it holds that \[ \int_{\partial\Omega}\chi_AF(\nu) d\mathcal{H}^{N-1}-\int_{\Omega}Kdx\le \int_A K dx\leq \norm{K}_{L^N({\Omega_r})}\abs{D\chi_A}_F(\Omega). \] If $r$ is sufficiently small, $\abs{\Omega_r}<\dfrac{\abs{\Omega_R}}{2}$ and we can use the corollary of the Sobolev-Poincaré inequality, so it hols that \[ \abs{\Omega_r}^{1-\frac{1}{N}}\leq 2c_1(\Omega_R)\abs{D\chi_A}_F({\Omega}), \] hence \[ \int_{\partial\Omega}\chi_AF(\nu) d\mathcal{H}^{N-1}\leq \{1+2c_1(\Omega_R)\norm{K}_{L^N(\Omega_r)}\}\abs{D\chi_A}_F(\Omega) \] and letting $r\rightarrow0^+$ we get $q(x_0)=1$. \end{proof} This means that the inequality (\ref{trace}) becomes \[ \int_{\partial\Omega}|u| F(\nu_\Omega)d \mathcal H^{N-1}\leq (Q+\varepsilon) |Du|_F(\Omega)+c(\Omega,\varepsilon)\int_\Omega |u| dx. \] For more detailed discussions on the meaning of the curvature in a neighborhood of the boundary, refer to \cite{massari1974esistenza, philippis2015regularity}. \end{comment} If the boundary of $\Omega$ is sufficilently smooth, we can show that $Q$ can be taken equal to $1$ and $\varepsilon=0$. More precisely, we have the following. \begin{prop} \label{trace_prop_1} Let $\Omega$ be a bounded open connected set of class $C^2$. Then there exists a positive constant $c$ such that \begin{equation} \label{trace_inequality_1} \int_{\partial \Omega}\abs{u} F(\nu)\, d\mathcal{H}^{N-1}\leq \abs{Du}_F(\Omega)+c\int_{\Omega}\abs{u}dx,\quad \forall u\in BV(\Omega). \end{equation} \end{prop} \begin{proof} Since $\Omega$ is $C^2$, then a uniform sphere condition of radius $r>0$ holds, in the sense that for every point $y\in\partial\Omega$ there exists $z\in\Omega$ such that $y\in \overline{B_r(z)}\subset\overline\Omega$. Let $R\in]0,+\infty[$ be the maximum of the principal radii of curvature of $\partial \mathcal W$. Such maximum exists being $F$ (and $F^o$) strongly convex. If $\kappa_1^F,\dots,\kappa_{N-1}^F$ are the anisotropic principal curvatures, we have that \[ {\kappa_i}^F(y)\leq \dfrac{1}{\mu}, \quad i=1,\ldots, N-1, \] with $\mu=\frac{r}{R}$ (\cite[Lemma 5.4]{crasta2007distance}). Therefore, in the set $\Omega_{\frac\mu 2}:=\left\{x\in\Omega\ : \ d_F(x)< \frac{\mu}2\right\}$, it holds that $d_F$ is $C^2$ (\cite[Lemma 4.1 and Theorem 4.16]{crasta2007distance}) and \[ \dfrac{{\kappa^F_i(y)}}{1-{\kappa^F_i(y)}d_F(x)}\le \begin{cases} 0 &\text{ if } {\kappa^F_i}\le 0\\ \dfrac{2}{\mu} & \text{ if }0<{\kappa^F_i}\le \dfrac{1}{\mu}, \end{cases} \] where $y\in\partial\Omega$ is the anisotropic projection of $x\in \Omega$ on $\partial\Omega$. Then \begin{equation} \label{boundmc} \sum_{i=1}^{N-1}\dfrac{{\kappa_i}^F(y)}{1-{\kappa_i}^F(y)d_F(x)} \le 2\frac{N-1}{\mu} \end{equation} for $x\in \Omega_{\frac{\mu}2}$. We may restrict ourselves to the case $u$ is nonnegative and smooth. Integrating by parts and recalling that $F(\nabla d_F(x))=1$ in $\Omega$, it holds that \begin{multline*} \int_{\Omega} -\Delta_F d_F(x)\, u(x) \left(\frac{\mu}{2}-d_F(x)\right)^+\,dx\\ =\int_{\Omega}F_{\xi}(\nabla d_F(x) )\cdot \nabla u(x) \left(\frac{\mu}{2}-d_F(x)\right)^+\, dx\\ \quad - \int_{\Omega_{\frac\mu 2}} u(x) F_{\xi}(\nabla d_F(x) )\cdot \nabla d_F(x)\, dx -\frac{\mu}{2}\int_{\partial\Omega} u(x) F_{\xi}(\nabla d_F(x))\cdot \nu\, dx\\ =\int_{\Omega}F_{\xi}(\nabla d_F(x))\cdot\nabla u(x) \left(\frac{\mu}{2}-d_F(x)\right)^+dx-\int_{\Omega_{\frac{\mu}{2}}} u(x)\,dx +\frac{\mu}{2}\int_{\partial \Omega} u(y)\, F(\nu)d\mathcal H^{N-1}. \end{multline*} Now, we estimate the term \[ \int_{\Omega}F_{\xi}(\nabla d_F(x))\cdot \nabla u (x) \left(\frac{\mu}{2}-d_F(x)\right)^+dx. \] By \eqref{prodscal} and \eqref{FF0xi} it holds that \begin{equation} \label{passtracciain} \int_{\Omega}F_{\xi}(\nabla d_F(x))\cdot \nabla u (x) \left(\frac{\mu}{2}-d_F(x)\right)^+dx \ge -\dfrac{\mu}{2}\int_\Omega F(\nabla u(x))\,dx. \end{equation} On the other hand, the change of variable formula \eqref{change_normal} gives that \begin{align*} &\int_{\Omega}F_{\xi}(\nabla d_F(x)) \cdot \nabla u(x) \left(\frac{\mu}{2}-d_F(x)\right)^+dx \\ &=\int_{\partial \Omega}F(\nu)\int_0^{\frac{\mu}{2}}\left(\frac{\mu}{2}-t\right)\dfrac{d}{dt}[ u(\phi(y,t))] J(y,t)dt\,d\mathcal{H}^{N-1}. \end{align*} Integrating by parts and using the fact that $J(y,0)=1$, the above integral becomes \begin{multline*} -\frac{\mu}{2}\int_{\partial\Omega}u(y)F(\nu)d\mathcal H^{N-1}(y) -\int_{\partial\Omega}F(\nu) \int_0^\frac{\mu}{2} u(\phi(y,t)) \left(\dfrac{\mu}{2}-t\right)\frac{dJ}{d t}dt\;d\mathcal{H}^{N-1}(y)\\ \hfill +\int_{\partial\Omega} F(\nu)\int_0^{\frac{\mu}{2}} u(\phi(y,t))J (y,t)dt\;d\mathcal H^{N-1}(y)\\ \le -\frac{\mu}{2}\int_{\partial\Omega}u(y)F(\nu)d\mathcal H^{N-1}(y)+(N-1)\int_{\partial \Omega}F(\nu)\int_0^{\frac{\mu}{2}}u(y)J(y,t)\,dt\;d\mathcal{H}^{N-1}(y)\\ \hfill +\int_{\partial\Omega} F(\nu)\int_0^{\frac{\mu}{2}} u(\phi(y,t))J (y,t)dt\;d\mathcal H^{N-1}(y)\\ \\=-\frac{\mu}{2}\int_{\partial\Omega}u(y)F(\nu)d\mathcal{H}^{N-1}(y)+N\int_{\Omega}u\,dx \end{multline*} where in the inequality we have used \eqref{laplaciano_cambio} and the bound \eqref{boundmc}. Hence, joining with \eqref{passtracciain} it holds that \[ \int_{\partial \Omega}u(y)F(\nu)d\mathcal{H}^{N-1}\le \abs{Du}_F(\Omega)+\dfrac{2N}{\mu}\int_{\Omega}u(x)\,dx. \] \end{proof} \begin{rem} Using the notation of the above theorem, we explicitly observe that the constant in \eqref{trace_inequality_1} is \[ c=\frac{2N}{\mu}. \] \end{rem} \section{Interior approximation}\label{approx_sec} Now we provide an approximation result for $BV$-functions by smooth functions with compact support in $\Omega$. We preliminary state two useful lemmas. Firstly, we recall from \cite[Lemma 3.2]{littig2014} the following result on diffeomorphic perturbations of sets $\Omega$ with Lipschitz boundary. We denote by $\iota$ and $I$ the identical vector and matrix function, respectively. \begin{lem} \label{diff} Let $\Omega\subset \mathbb R^N$ be a bounded open set with Lipschitz boundary. Then there exists $\tau_0>0$ and, for $0\leq\tau\leq\tau_0$, a family of $C^\infty-$diffeomorphisms $\Phi^\tau : \mathbb{R}^N\to\mathbb{R}^N$ with inverses $\Psi^\tau$ such that \begin{itemize} \item $\Phi^0=\Psi^0=\iota$; \item $\Phi^\tau\to \iota$ and $\Psi^\tau\to \iota$ as $\tau\to 0$ uniformly on $\mathbb{R}^N$; \item $\nabla\Phi^\tau (x)\to I$ and $\nabla\Psi^\tau(x)\to I$ as $\tau\to 0$ uniformly with respect to $x$ on $\mathbb{R}^N$; \item $\Phi^\tau(\overline\Omega)\Subset\Omega$ for all $\tau\in(0,\tau_0]$. \end{itemize} \end{lem} Now, we give the anisotropic version of the change of coordinates formula for $BV$-functions, stated in \cite[Lemma 10.1]{giusti1984minimal}. \begin{lem} \label{var} Let $u$ be a function in $BV_\textrm{loc}(\Omega)$, $\Phi:\mathbb{R}^N\to\mathbb{R}^N$ be a diffeomorphism and $A\Subset\Omega$. Then \begin{equation} \label{var_thesis} \abs{D(u\circ \Phi^{-1})}_F(\Phi(A))= \abs{HDu}_F(A), \end{equation} where $H=|\det \nabla\Phi|[\nabla\Phi]^{-1}$. \end{lem} \begin{proof} Let us consider $u\in C^1(\Omega)$ and $g\in C_0^1(A;\mathbb{R}^N)$, then the following change of area formula holds \begin{equation} \label{passgiusti} \begin{split} \int_{\Phi(A)}(g\circ \Phi^{-1}) \cdot \nabla (u\circ \Phi^{-1}) dx&=\int_{\Phi(A)}(g \circ \Phi^{-1}) \cdot ((\nabla u\circ \Phi^{-1})\nabla\Phi^{-1}) dx\\ &=\int_A g \cdot (\nabla u (\nabla \Phi^{-1}\circ \Phi)) |\det \nabla\Phi| dz\\ &=\int_A g \cdot (H \nabla u) dz. \end{split} \end{equation} Thus, the thesis \eqref{var_thesis} holds for $u$ in $C^1(\Omega)$, that is \[ \int_{\Phi(A)} F(\nabla(u\circ\Phi^{-1}))dx= \int_{A} F(H\nabla u)dx. \] Suppose now that $u\in BV_{\text{loc}} (\Omega)$. By Proposition \ref{approximation_BV} we can approximate $u$ by a sequence $\{u_i\}\subset C^\infty$. Moreover, the corresponding functions $u_i\circ \Phi{^-1}$ converge to $u\circ \Phi{^-1}$ in $L^1(A)$. Hence, we can pass to the limit in \eqref{passgiusti}, obtaining \begin{equation} \label{cambio_di_variabili} \int_{\Phi(A)}(g \circ \Phi^{-1})\cdot dD(u\circ \Phi^{-1})= \int_A g\cdot H\, dD u=\int_{A} g\cdot (H \nu)d\abs{Du} \end{equation} where $\nu$ is obtained by differentiating $Du$ with respect to $|Du|$. If $F^o(g)\leq 1$, then also $F^o(g\circ \Phi^{-1})\leq 1$ and $\spt (g\circ \Phi^{-1}))\subseteq \Phi(A)$. Therefore, by definition of total variation with respect to $F$, we have \begin{equation} \label{from_def} \int_{A} g\cdot (H \nu)d\abs{Du} \le\abs{D(u\circ \Phi^{-1})}_F(\Phi(A)), \end{equation} The inequality \eqref{prodscal} implies that \[ \sup_{F^o(g)\leq 1}\int_A g\cdot (H \nu) \ d\abs{Du}= \abs{HDu}_F(A). \] Hence, taking the supremum on the left hand side in \eqref{from_def}, it holds \[ \abs{HDu}_F(A)\leq\abs{D(u\circ \Phi^{-1})}_F(\Phi(A)). \] For the reverse inequality, we consider $g=\gamma\circ\Phi\in C^1_0(A;\mathbb{R}^N)$, where $\gamma\in C^1_0(\Phi(A);\mathbb{R}^N)$ and $F^o(\gamma)\leq 1$. Therefore $g\circ\Phi^{-1}=\gamma$ and by \eqref{cambio_di_variabili}, we have \[ \begin{split} \int_{\Phi(A)}\gamma\cdot dD(u\circ \Phi^{-1})&= \int_A ( \gamma \circ \Phi)\cdot (H \nu)d\abs{D u}(A)\\ &\leq \int_A F^o( \gamma \circ \Phi) |H| d|D u|_F\leq \int_A \abs{H} d\abs{Du}_F. \end{split} \] Hence, we have \[ \abs{D(u\circ \Phi^{-1})}_F(\Phi(A))\leq \abs{HDu}_F(A). \] \end{proof} At this stage, we are in position to state the main approximation result. \begin{thm} \label{approssimazione_thm} Let $\Omega\subset\mathbb{R}^N$ be an open bounded set with Lipschitz boundary and let $u\in BV(\Omega)\cap L^p(\Omega)$ for some $p\in [1,\infty)$. Then there exists a sequence $\{u_k\}_{k\in\mathbb N}\subseteq C_0^\infty(\Omega)$ such that, for any $q\in [1,p]$, \[ u_k\to u\ \ \text{in}\ \ L^q(\Omega)\quad\text{and}\quad |D u_k|_F(\mathbb R^N)\to |D u|_F(\mathbb R^N). \] \end{thm} \begin{proof} Let us fix a family $(\Phi^\tau)_{0 \leq \tau\leq\tau_0}$ of diffeomorphisms fron $\mathbb{R}^N$ to $\mathbb{R}^N$ with inverses $(\Psi^\tau)_{0 \leq \tau\leq\tau_0}$ according to Lemma \ref{diff}, and consider \[ u^\tau\coloneqq u \circ \Psi^\tau \quad \textrm{for} \quad \tau \in [0,\tau_0]. \] By construction $u^\tau=0$ a.e. outside a compact subset of $\Omega$. By \cite[Theorem 3.1]{littig2014}, we know that $u^\tau \in L^p(\Omega)$ for all $\tau \in [0,\tau_0]$, $u^\tau\to u$ in $L^p(\Omega)$ and also in $L^p(\mathbb{R}^N)$.\\ The change of coordinates formula in Lemma \ref{var} implies that \[ \abs{Du^\tau}_F(\mathbb{R}^N)=\int_{\mathbb{R}^N}\abs{(\nabla\Psi^\tau)^ } \;\abs{\det(\nabla\Phi^\tau)}\;d\abs{Du}_F. \] Thus $u^\tau \in BV(\mathbb{R}^N)$ and, since the integrand on the right hand side uniformly converges to $1$, \[ \lim_{\tau \rightarrow 0^+}\abs{Du^\tau}_F(\mathbb{R}^N)=\abs{Du}_F(\mathbb{R}^N) \] It remains only to prove that there exists $v^\tau\in C^\infty_0(\Omega)$ such that \[ ||u^\tau-v^\tau||_p<\tau\quad\text{and}\quad \abs{\abs{Du^\tau}_F(\mathbb{R}^N)-\abs{Dv^\tau}_F(\mathbb{R}^N)}<\tau. \] The first convergence (in $L^p$) has been proved in \cite[Theorem 3.1]{littig2014}; meanwhile the convergence of the total variation is based on the following argument. For any $\varepsilon>0$, let us consider the mollification $u_\varepsilon:=u^\tau*\eta_\varepsilon$, where $\eta_\varepsilon (x)=:\varepsilon^{-n}\eta(\varepsilon^{-1}x)$, for the standard mollifier $\eta$. Hence $u_\varepsilon \to u^\tau$ in $L^p(\Omega)$ and for the zero extensions, in $L^1(\mathbb{R}^N)$ \cite[Proposition 3.2.c]{ambrosio2000functions}. Then, by the lower semicontinuity of the anisotropic total variation, we have \[ \abs{Du^\tau}_F(\mathbb{R}^N) \leq \lim_{\varepsilon \rightarrow 0^+}\inf \abs{Du_\varepsilon}_F(\mathbb{R}^N). \] Therefore, it remains to prove the opposite inequality \begin{equation} \label{dis_anis_alto} \lim_{\varepsilon \rightarrow 0^+}\sup\abs{Du_\varepsilon}_F(\mathbb{R}^N) \leq \abs{Du^\tau}_F(\mathbb{R}^N). \end{equation} Let us choose $\varphi \in C^{\infty}_0(\mathbb{R}^N,\mathbb{R}^N)$ with $F^o(\varphi)\leq 1$ and calculate \begin{equation} \label{diseg_alto} \int_{\mathbb{R}^N}u_\varepsilon \ast \dive ( \varphi)dx\int_{\mathbb{R}^N}u^\tau(\eta_\varepsilon \ast \dive \varphi)dx=\int_{\mathbb{R}^N}u^\tau\dive(\eta_\varepsilon \ast \varphi)dx\leq \abs{Du^\tau}_F(\mathbb{R}^N), \end{equation} where the inequality in the last term holds since $F^o(\eta_\varepsilon \ast \varphi)\le 1$. Indeed, by using the $1$-homogeneity of $F^o$ and Jensen's Inequality (see, for instance, \cite[Lemma 1.8.2]{Jensen}), we gain that \[ F^o\left(\int_{\mathbb{R}^N} \eta_{\epsilon}(x-y)\varphi(y)dy\right) \leq \int_{\mathbb{R}^N} F^o(\eta_{\epsilon}(x-y)\varphi(y))dy=\int_{\mathbb{R}^N} \eta_{\varepsilon}(x-y)F^o(\varphi(y))dy\le 1. \] Hence, by passing to the limit in \eqref{dis_anis_alto}, we reach the inequality \eqref{diseg_alto} by the arbitrariness of $\varphi$. \end{proof} \section{The first Robin eigenvalue of the Finsler $p$-Laplacian as $p\to 1$} \label{eig_sec} In this Section, we give an application of the results proved above to a Robin eigenvalue problem. More precisely, our aim is analyze the $\Gamma$-limit of the functional \begin{equation} \label{functional_Jp} J_p(\varphi)=\dfrac{\displaystyle \int_\Omega F^p(\nabla\varphi)dx+\beta\displaystyle\int_{\partial \Omega} \abs{\varphi}^pF(\nu)d\mathcal{H}^{N-1}}{\displaystyle\int_\Omega \abs{\varphi}^pdx},\quad \varphi\in W^{1,p}(\Omega)\setminus\{0\}, \end{equation} where $\Omega$ is a bounded, connected, sufficiently smooth open set, $p>1$ and $\beta\in\mathbb{R}$, and prove an isoperimetric inequality for the limit, as $p\to 1^+$, of the first eigenvalue \begin{equation} \label{lambda_p} \lambda_1(\Omega,p,\beta)=\inf_{\substack{\varphi\in W^{1,p}(\Omega)\\ \varphi \ne0}}J_p(\varphi), \end{equation} depending on the value of the parameter $\beta$. A key point for proving this result is the convergence of the functional $J_p$ We first recall the following existence result for \eqref{lambda_p} holds. \begin{thm}[\cite{fragavitone,della2022sharp}] \label{existence} Let $p>1$, $\beta\in\mathbb{R}$ and $\Omega$ bounded Lipschitz domain. Then there exists a minimum $u \in C^{1,\alpha}(\Omega)\cap C(\overline{\Omega})$ of (\ref{lambda_p}) that satisfies \begin{equation} \begin{cases} -\mathcal Q_p u=\lambda(\Omega,p,\beta)\abs{u}^{p-2}u \;&\textrm{in}\;\Omega\\ F^{p-1}(\nabla u) F_\xi(\nabla u)\cdot \nu +\beta F(\nu)\abs{u}^{p-2}u=0\;&\textrm{on}\;\partial \Omega. \end{cases} \end{equation} Moreover, $u$ does not change sign in $\Omega$. Finally, $\lambda_1(\Omega,p,\beta)$ is positive if $\beta>0$, while is negative if $\beta<0$. \end{thm} \subsection{The case $p=1$} In order to study the limit case of $J_p$ as $p$ goes to $1$, we consider the functional \begin{equation} \label{functional_J} J(\varphi)=\dfrac{\abs{D\varphi}_F(\Omega)+\min\{\beta,1\}\displaystyle \int_{\partial \Omega}\abs{\varphi}F(\nu)d\mathcal H^{N-1}}{\displaystyle\int_\Omega \abs{\varphi}dx}, \end{equation} where $\varphi\in BV(\Omega)$ and $u\not \equiv0$. Hence, we study the associated minimum problem \begin{equation} \label{Lambda} \Lambda(\Omega,\beta)=\inf_{\substack{\varphi \in BV(\Omega)\\ \varphi \not\equiv 0}}J(\varphi). \end{equation} Depending on $\beta$, we will impose different assumptions on the regularity of the domain. Indeed: \begin{itemize} \item if $\beta\ge 0$, we will suppose that $\partial \Omega$ is Lipschitz; \item if $-1<\beta<0$, we will assume that $\partial \Omega$ is $C^2$. \end{itemize} In particular, this difference depends on the fact that in the case $\beta<0$ we use the trace inequality, studied in Section \ref{trace_sec}. Finally, if $\beta\le -1$ the problem is not well posed; indeed if $\beta<-1$, then $\Lambda(\Omega,\beta)=-\infty$ while if $\beta=-1$, $\Lambda$ is finite but can be not achieved, also in the case of smooth domains. For further details, we refer the reader to the Euclidean case treated in \cite{della2022behavior}. Let us discuss the presence of the term $\min\{\beta,1\}$ in \eqref{functional_J}. For any value of $\beta$, it could seem more natural to study the problem \begin{equation} \label{lambda_1} \lambda(\Omega,1,\beta)=\inf_{\substack{\varphi \in BV(\Omega)\\ \varphi\neq 0}} \dfrac{\abs{D\varphi}_F(\Omega)+\beta\displaystyle \int_{\partial \Omega}\abs{\varphi}F(\nu)d\mathcal H^{N-1}}{\displaystyle\int_\Omega \abs{\varphi}dx}. \end{equation} Actually, we have that for $\beta\ge 1$ it holds \[ \lambda(\Omega,1,\beta)=\Lambda(\Omega,\beta)=h_F(\Omega), \] where $h_F(\Omega)$ is the first Cheeger constant of $\Omega$ in the Finsler setting (see e.g. \cite{BoundaryTrace}): \begin{equation} \label{cheeger_def} h_F(\Omega)=\inf_{\substack{\varphi \in BV(\Omega)\\ \varphi \not\equiv 0}}\dfrac{\abs{D\varphi}_F(\mathbb{R}^N)}{\displaystyle\int_\Omega \abs{\varphi}dx}=\inf_{\substack{E\subseteq \Omega}}\dfrac{P_F(E;\Omega)}{\displaystyle\abs{E}}. \end{equation} Indeed, in this case, it is immediate to see that \[ \lambda(\Omega,1,\beta)\geq h_F(\Omega). \] On the other hand, if $u$ is a minimizer of (\ref{lambda_1}), then, by Theorem \ref{approssimazione_thm}, there exists $u_k \in C^{\infty}_0 (\Omega)$ such that \[ u_k \xrightarrow{L^q}u, \qquad\qquad \abs{\abs{\nabla u_k}}_{L^1(\Omega)}\xrightarrow{L^1} \abs{D u}_F(\mathbb{R}^N), \] for any $q \leq \dfrac{N}{N-1}$. Therefore \[ \lambda (\Omega, 1, \beta)\leq \lim_{k\rightarrow+\infty} \dfrac{\displaystyle\int_\Omega F(\nabla u_k)dx}{\displaystyle\int_\Omega \abs{u_k}dx}=h_F(\Omega). \] Now we focus on the possibility of studying the minimization problem (\ref{Lambda}) restricting our analysis to characteristic functions. Hence if $E\subseteq \Omega$, we have \begin{align*} J(\chi_E =\dfrac{P_F(E;\Omega)+\min\{1,\beta\}\displaystyle\int_{\partial \Omega\cap \partial^* E}F(\nu_E)d\mathcal{H}^{N-1}}{\abs{E}}. \end{align*} By denoting \[ R(E,\beta):=J(\chi_E), \] we consider the minimization problem \begin{equation} \label{ell_problem} \ell(\Omega,\beta)=\inf_{E\subseteq \Omega}R(E,\beta). \end{equation} Before proving the equivalence between problems \eqref{Lambda} and \eqref{ell_problem}, we need the following result on the lower semicontinuity of the numerator of the functional $J$. \begin{lem}\label{prop_modica_salto} Let $\beta \ge -1$. The functional \[ G(u)=|Du|_F(\Omega)+\min\{1,\beta\}\int_{\partial\Omega}|u|F(\nu)d\mathcal H^{N-1} \] is lower semicontinuous on $BV(\Omega)$ with respect to the topology of $L^1(\Omega)$. \end{lem} \begin{proof} If $\beta\ge 0$, the lower semicontinuity (with $\Omega$ Lipschitz) follows immediately by the lower semicontinuity of each term. Then we assume $\beta <0$ (and $\Omega$ in $C^2$). The proof is an adaptation of \cite[Proposition 1.2]{modica1987gradient} to the Finsler case. Let $u\in BV(\Omega)$, and let us consider a sequence $\{u_k \}_{k\in\mathbb{N}}\subseteq BV(\Omega)$ converging to $u$ in $L^1(\Omega)$; we have the following estimate \begin{equation} \label{modica_e1} G(u)-G(u_k)\leq |Du|_F(\Omega)-|Du_k|_F(\Omega)+\int_{\partial\Omega}|u-u_k|F(\nu)d\mathcal H^{N-1}. \end{equation} Now, for a fixed $\delta>0$, let us define $\Omega_\delta=\{x\in\Omega : d_\mathcal E(x)< \delta\}$, where $d_\mathcal E$ is the standard Euclidean distance to the boundary of $\Omega$ ; moreover let us consider $v_\delta=(1-\chi_\delta)(u-u_k)$, where $\chi_\delta$ is a cut-off function such that $\chi_\delta=1$ in $\Omega\setminus\Omega_\delta$ and $|\nabla\chi_\delta|\le \frac{2}{\delta}$ in $\Omega$. The trace inequality \eqref{trace_inequality_1} applied to $v_\delta$ gives \begin{equation} \label{modica_e2} \int_{\partial\Omega}|u-u_k|F(\nu)d\mathcal H^{N-1}\leq \abs{D (u-u_k)}_F(\Omega_\delta)+\frac{2b}{\delta}\int_{\Omega_\delta}|u-u_k|dx+c\int_{\Omega_\delta}|u-u_k|dx. \end{equation} Moreover, we have \begin{equation} \label{modica_e3} |D (u-u_k)|_F(\Omega_\delta)\le |D u|_F(\Omega_\delta)+|D u_k|_F(\Omega_\delta)+|D (u-u_k)|_F(\partial(\Omega\setminus\Omega_\delta)), \end{equation} but last term is zero on a set of $\delta$'s of positive measure because $u-u_k\in BV(\Omega)$, for all $k\in\mathbb{N}$. Hence, by \eqref{modica_e1}-\eqref{modica_e2}-\eqref{modica_e3}, we gain: \[ G(u)-G(u_k)\leq |Du|_F(\Omega)+|D u|_F(\Omega_\delta)-|D u_k|_F(\Omega\setminus\Omega_\delta)+\left(\frac{2b}{\delta}+c\right)\int_{\Omega_\delta}|u-u_k|dx. \] By the lower semicontinuity of the functional $|D u_k|_F(\Omega\setminus\Omega_\delta)$ in $L^1(\Omega\setminus\Omega_\delta)$, we have that \[ \limsup_{k\to+\infty}[ G(u)-G(u_k)]\le 2 |Du|_F(\Omega_\delta). \] The conclusion follows by sending $\delta\to 0^+$. \end{proof} At this stage, we state the main existence result of the minimum problem \eqref{Lambda}. \begin{thm}\label{Lambda=ell_thm} For any $\beta>-1$, there exists a minimum to problem (\ref{Lambda}). In particular, it holds \[ \Lambda(\Omega,\beta)=\ell(\Omega,\beta). \] Moreover, if $u\in BV(\Omega)$ is a minimum of (\ref{Lambda}), then \[ \Lambda(\Omega, \beta)=R(\{u>t\},\beta), \] for some $t \in \mathbb{R}$. \end{thm} \begin{proof} Let $u_n$ be a minimizing sequence in $BV(\Omega)$ of \eqref{Lambda}, such that $\norm{u_n}_{L^1(\Omega)}=1$. If $\beta>0$, then $u_n$ is bounded in $BV(\Omega)$ and hence \[ u_n\overset{\ast}{\rightharpoonup} u \;\textrm{in}\;BV(\Omega)\qquad\textrm{and}\qquad u_n \xrightarrow{L^1} u. \] In particular, if $\beta \geq 1$, $J(u_n)=\abs{Du_n}_F(\mathbb{R}^N)$, by using the lower semicontinuity of the anisotropic total variation \cite{amar1994notion}, we obtain that \[ J(u)\leq \liminf_{n}J(u_n). \] Hence $u$ is the minimum of the functional $J$. If $0<\beta<1$, let $\Omega_\delta=\{x\in \Omega \ | \ d_\mathcal E(x)<\delta\}$, with $\delta>0$. We have \begin{align*} \abs{Du_n}_F(\Omega)=\abs{Du_n}_F(\Omega \setminus \Omega_\delta)+\abs{Du_n}_F(\Omega_\delta)\geq\abs{Du_n}_F(\Omega \setminus \Omega_\delta)+\beta\abs{Du_n}_F(\Omega_\delta) \end{align*} and hence \[ J(u_n)\geq \abs{Du_n}_F(\Omega\setminus\Omega_\delta)+\beta\left[\abs{Du_n}_F( \Omega_\delta)+\int_{\partial\Omega}\abs{u_n}F(\nu)d\mathcal H^{N-1}\right]. \] Moreover, by the lower semicontinuity of $J$, we have \[ \liminf_n J(u_n)\geq \abs{Du_n}_F(\Omega\setminus\Omega_\delta)+\beta\abs{Du_n}_F(\mathbb{R}^N\setminus (\Omega\setminus\Omega_\delta)). \] By using the fact that $u\in BV(\Omega)$, we obtain that \[ \liminf_n J(u_n)\geq J(u), \] as $\delta\rightarrow 0$. Now, let us take $-1<\beta<0$. It easily seen that $J(u_n)\leq C$. Using the trace inequality (\ref{trace_inequality_1}), we obtain \[ J(u_n)\geq (1+\beta)\abs{Du_n}_F(\Omega)+c\beta\geq c\beta \] and \[ \abs{Du_n}_F(\Omega)\leq \frac{C}{1+\beta}-\frac{\beta c}{1+\beta}. \] Being $u_n \in BV(\Omega)$ and by the fact that the functional $J$ is lower semicontinuous (proved in Lemma \ref{prop_modica_salto}), we have that $u$ is a minimum of $J$. Now, we want to prove last part of the Theorem. Obviously, we have \[ \Lambda(\Omega, \beta)\leq \ell(\Omega, \beta). \] To prove the reverse inequality, we take $u\in BV(\Omega)$ a minimizer of (\ref{Lambda}). By using the coarea formula \[ \abs{D u}_F(\Omega)=\int_{-\infty}^{+\infty}P_F(\{u>t\},\Omega)dt, \] we have \begin{align*} \Lambda_F(\Omega,\beta)&=\dfrac{\displaystyle\int_{-\infty}^{+\infty}P_F(\{u>t\},\Omega)dt+\min\{\beta,1\}\int_{-\infty}^{+\infty}\mathcal{H}^{N-1}(\partial \Omega \cap \partial\{u>t\})F(\nu)dt}{\displaystyle\int_{-\infty}^{+\infty}\abs{\{u>t\}}dt}\\ &=\dfrac{\displaystyle\int_{-\infty}^{+\infty}R(\{u>t\},\beta)\abs{\{u>t\}}dt}{\displaystyle\int_{-\infty}^{+\infty}\abs{\{u>t\}}dt}\\&\geq \inf_{E\subseteq \Omega}R(E,\beta)\\&=\ell(\Omega,\beta). \end{align*} This shows that $\Lambda(\Omega,\beta)=\ell(\Omega,\beta)$ and, in particular, we have that \[ \int_{-\infty}^{+\infty}\{R(\{u>t\},\beta)-\ell(\Omega,\beta)\}\abs{\{u>t\}}dt=0 \] and using the definition of $\ell(\Omega,\beta)$ we observe that the integrand is nonnegative. In particular, $u\not\equiv 0$ and we have that $\Lambda(\Omega,\beta)=R(\{u>t\},\beta)$. \end{proof} \subsection{$\Gamma$-convergence of $J_p$} \label{convergence_sec} Now we will prove that the functional $J_p$ $\Gamma-$converges to the functional $J$, as $p\to 1^+$. \begin{defn} A functional $J_p$ $\Gamma$-converges to $J$ as $p\to 1^+$ in the weak$^*$ topology of $BV(\Omega)$ if, for any $u\in BV(\Omega)$, the following hold: \begin{enumerate} \item[(i)] For any sequence $u_p\in BV(\Omega)$ which converges to $u$ weak$^*$ in $BV(\Omega)$ as $p\to 1^+$, then \begin{equation} \label{liminf_J} \liminf_{p\to1^+} J_p(u_p)\geq J(u). \end{equation} \item[(ii)] There exists a sequence $u_p\in W^{1,p}(\Omega)$ which converges to $u$ weak$^*$ in $BV(\Omega)$ as $p\to 1^+$, such that \begin{equation} \label{limsup_J} \limsup_{p\to1^+} J_p(u_p)\leq J(u). \end{equation} \end{enumerate} \end{defn} Now, we are in position to prove the convergence theorem for the functional $J_p$. \begin{thm} \label{convergence_J} Let $\beta>-1$, then $J_p$ $\Gamma$-converges to $J$ as $p\to 1^+$. \end{thm} \begin{proof} Let us suppose $u_p\in W^{1,p}(\Omega)$ and $||u_p||_{L^p(\Omega)}=1$. We give the proof by distinguishing the possible values of $\beta$. In any cases, we will have to prove \eqref{liminf_J} and \eqref{limsup_J}. \textit{The case $\beta \ge 1$.} Let us fix a sequence $u_p\in W^{1,p}(\Omega)$ weak$^*$ converging to $u$ in $BV(\Omega)$, as $p\to 1^+$. By using the H\"older-type inequality contained for example in \cite[Proposition A.1]{dos}, we have: \[ \begin{split} &\left(\int_{\Omega}F(\nabla u_p)dx+\int_{\partial\Omega}|u_p| F(\nu) d\mathcal H^{N-1}\right)^p \\ &\qquad \le \left(\int_{\Omega}F(\nabla u_p)^pdx+\int_{\partial\Omega}|u_p|^p F(\nu) d\mathcal H^{N-1}\right)\left(|\Omega|+P_F(\Omega)\right)^{p-1}. \end{split} \] Hence we have \[ \liminf_{p\to 1^+} J_p(u_p)\ge |D u|_F(\Omega)+\int_{\partial\Omega}|u| F(\nu)d\mathcal H^{N-1}=|Du|_F(\mathbb{R}^N)=J(u). \] This proves \eqref{liminf_J}. To give the proof of \eqref{limsup_J}, we observe that, by Theorem \ref{approssimazione_thm}, there exists a sequence $\{u_k\}_{k\in\mathbb{N}}\subseteq C_0^\infty(\Omega)$ such that, for any $q\in [1,p]$, $u_k$ converges to $u$ in $L^q(\Omega)$ and $||F(\nabla u_k)||_{L^1(\Omega)}$ converges to $|Du|_F(\mathbb{R}^N)$ as $k\to +\infty$. Moreover, it easily seen that that $||F(\nabla u_k)||_{L^p(\Omega)}$ converges to $||F(\nabla u_k)||_{L^1(\Omega)}$ and hence we have that there exists a subsequence $p_k \to 1^+$, as $k\to+\infty$, such that $||F(D u_k)||^{p_k}_{L^{p_k}(\Omega)}$ converges to $|Du|_F(\mathbb{R}^N)$ as $k\to+\infty$. This implies that $\limsup_{k\to+\infty}J_{p_k}(u_k)\ge J(u)$, that concludes the proof of \eqref{limsup_J}. \textit{The case $0\leq\beta<1$.} Let us consider a sequence $u_p$ weak$^*$ converging to $u$ in $BV(\Omega)$, as $p\to 1^+$. A simple application of the Young inequality $a^p\geq pab-(p-1)b^{\frac p {p-1}}$ with $b=\frac 1p$, yields to \[ \begin{split} J_p(u_p)&=\int_\Omega F^p(\nabla u_p) dx+\beta \int_{\partial\Omega} |u_p|^pF(\nu) d\mathcal H^{N-1}\\ &\geq \int_\Omega F(\nabla u_p) dx+\beta \int_{\partial\Omega} |u_p|F(\nu) d\mathcal H^{N-1}-\frac{p-1}{p}\left(|\Omega|+P_F(\Omega)\right), \end{split} \] Therefore, the conclusion \eqref{liminf_J} follows by applying the Proposition \ref{prop_modica_salto}. In order to get the second claim, Proposition \ref{approximation_BV} assures the existence of a sequence $u_k \in C^\infty(\Omega)$ strongly converging to $u$ in $L^1(\Omega)$ and $\|F(D u_k)\|_{L^1(\Omega)}$ converges to $|Du|_F(\Omega)$, as $k\to+\infty$. Moreover $u_k F(\nu)$ converges to $u F(\nu)$ in $L^1(\partial\Omega,\mathcal H^{N-1})$. An argument similar to the previous case leads us to say that $\|F(D u_k)\|_{L^{p_k}(\Omega)}$ converges to $|Du|_F (\Omega)$ and $\displaystyle\int_{\partial\Omega}|u_k|^p F(\nu)d\mathcal{H}^{N-1}$ converges to $\displaystyle\int_{\partial\Omega}|u|F(\nu)d\mathcal{H}^{N-1}$, as $k\to+\infty$. Hence the sequence $\{u_k\}_{k\in\mathbb{N}}$ satisfies \eqref{limsup_J}. \textit{The case $-1<\beta<0$.} Let us consider a sequence $u_p\in W^{1,p}(\Omega)$ weak$^*$ converging to $u$ in $BV(\Omega)$, as $p\to 1^+$. For any $\delta>0$, let us set $\Omega_\delta=\{x\in\Omega : d_\mathcal E(x)< \delta\}$ and consider a smooth function $\psi$ equal to zero in $\Omega\setminus\Omega_\delta$ and to one on $\partial\Omega$, such that $|\nabla\psi|\le \frac{2}{\delta}$. The trace inequality \eqref{trace_inequality_1} applied to the function $v=(u-|u_p|^{p-1}u_p)\psi$ gives \begin{equation} \label{stima_termine_bordo} \begin{split} &\int_{\partial\Omega}|u-|u_p|^{p-1}u_p| F(\nu)d \mathcal H^{N-1}\\ &\qquad \leq |D(u-|u_p|^{p-1}u_p)|_F(\Omega_\delta)+\left(\frac{2b}{\delta}+c\right)\int_{\Omega_\delta} |u-|u_p|^{p-1}u_p| dx\\ & \qquad \leq |Du|_F(\Omega_\delta)+\int_{ \Omega_\delta} F(\nabla (|u_p|^{p-1}u_p))dx+\left(\frac{2b}{\delta}+c\right)\int_{\Omega_\delta} |u-|u_p|^{p-1}u_p| dx, \end{split} \end{equation} where we have used that $|D(u-|u_p|^{p-1}u_p)|_F(\partial\Omega_\delta)=0$ for a set of $\delta$'s of positive measure because $u-|u_p|^{p-1}u_p \in BV(\Omega)$. By using \eqref{stima_termine_bordo}, we have \begin{multline} \label{diff_J} J(u)-J_p(u_p) =|Du|_F(\Omega)-\int_\Omega F^p(\nabla u_p)dx+\beta\int_{\partial\Omega} (|u|-|u_p|^{p-1}u_p)F(\nu)d\mathcal H^{N-1}\\ \le |Du|_F(\Omega)-\int_\Omega F^p(\nabla u_p)dx+|\beta||Du|_F(\Omega_\delta) \\ \qquad+|\beta|\int_{\Omega_\delta} F(\nabla(|u_p|^{p-1}u_p))dx+|\beta|\left(\frac{2b}{\delta}+c\right)\int_{\Omega_\delta} |u-|u_p|^{p-1}u_p| dx:=A. \end{multline} Since $\frac{1}{|\beta|}>1$, we have \begin{equation} \label{stima_A} \begin{split} &\leq 2 |Du|_F(\Omega_\delta) +|Du|_F(\Omega\setminus\Omega_\delta)-\int_\Omega F(\nabla u_p)^pdx+ \int_{\Omega\setminus\Omega_\delta} F(\nabla(|u_p|^{p-1}u_p))dx\\ &\qquad+\left(\frac{K}{\delta}+c\right)\int_{\Omega_\delta} |u-|u_p|^{p-1}u_p| dx. \end{split} \end{equation} The Young inequality gives that \begin{multline} \label{4.6} \int_\Omega F(\nabla (|u_p|^{p-1}u_p))dx=\int_\Omega p|u_p|^{p-1}F(\nabla u_p)dx\\ \le \int_\Omega F^p(\nabla u_p) dx+(p-1)\int_\Omega |u_p|^p dx. \end{multline} Furthermore by \eqref{diff_J}, \eqref{stima_A} and \eqref{4.6}, we have that \begin{multline*} J(u)-J_p(u_p)\leq 2 |Du|_F(\Omega_\delta) +|Du|_F(\Omega\setminus\Omega_\delta)- \int_{\Omega\setminus\Omega_\delta} F(\nabla(|u_p|^{p-1}u_p))dx\\ +(p-1)\int_\Omega |u_p|^p dx +\left(\frac{K}{\delta}+c\right)\int_{\Omega_\delta} |u-|u_p|^{p-1}u_p| dx. \end{multline*} Since $u_p$ converges to $u$ in $L^q(\Omega)$, then $|u_p|^{p-1}u_p$ converges to $u$ in $L^1(\Omega)$, as $p\to 1^+$. Hence, by taking $p\to 1^+$, we have \[ \limsup_{p\to 1^+} \left[J(u)-J_p(u_p)\right]\leq 2 |Du|_F(\Omega_\delta). \] By sending $\delta\to 0^+$, we obtain \eqref{liminf_J}. Finally, the inequality \eqref{limsup_J} is obtained as in the previous case. \end{proof} The proof of the $\Gamma$-convergence of the functional $J_p$ is useful to prove the convergence of the eigenvalues and eigenfunction, as $p\to 1^+$. \begin{prop} \label{convergence} For any $\beta>-1$, it holds \[ \lim_{p\to 1^+}\lambda_1(\Omega,p,\beta)=\Lambda(\Omega,\beta). \] Moreover, the minimizers $u_p\in W^{1,p}(\Omega)$ of \eqref{functional_Jp}, with $\|u\|_{L^p(\Omega)}=1$, weak$^*$ converge to a minimizer $u\in BV(\Omega)$ of \eqref{functional_J} as $p\to 1^+$. \end{prop} \begin{proof} The Theorem \ref{convergence_J} assures the existence of a sequence $w_p$ converging to a fixed minimizer $\bar u$ of \eqref{functional_J}. Let us consider the sequence of minimizers $u_p$ of \eqref{functional_J}, we have: \begin{equation} \label{J_upper_bounded} \limsup_{p\to 1^+} J_p(u_p)\leq \limsup_{p\to 1^+}J_p(w_p)\leq J(\bar u)=\Lambda(\Omega,\beta). \end{equation} This means that $J_p(u_p)$ is upper bounded for any $p>1$. If $\beta<0$, by the trace inequality \eqref{trace_inequality_1}, we have that \[ \int_\Omega F^p(\nabla u_p) dx\leq \Lambda(\Omega,\beta)-\beta|D(u_p^p)|_F(\Omega)-\beta c, \] and, by \eqref{4.6} and \eqref{eq:omo}, that \[ (1+\beta)a^p\int_\Omega |\nabla u_p|^p dx\leq \Lambda(\Omega,\beta)-\beta c-\beta(p-1). \] Hence, by the compactness, we have that $u_p$ is upper bounded in $BV(\Omega)$. If $\beta \ge 0$, this directly follows from \eqref{J_upper_bounded}. Therefore $u_p$ weak$^*$ converges to $u$ in $BV(\Omega)$. Finally, by \eqref{liminf_J} and \eqref{J_upper_bounded}, we have that \[ \Lambda(\Omega,\beta)=J(\bar u)\leq J(u)\leq \liminf_{p\to 1^+}J_p(u_p)\leq\limsup_{p\to 1^+}J_p(u_p) \leq \Lambda(\Omega,\beta), \] and hence the conclusion by observing that $\lambda_1(\Omega,p,\beta)=J_p(u_p)$. \end{proof} \begin{comment} \textcolor{red}{Non capisco bene a che serve questo remark} Let us recall the definition of the first Cheeger constant \eqref{cheeger_def}: \[ h_1(\Omega)=\inf_{ D\subseteq \Omega} \frac{|\partial D|}{|D|}; \] and of the first eigenvalue of the Dirichlet $p$-Laplace operator: \begin{equation} \label{eig_Dir} \lambda^D_1(\Omega,p):=\inf_{w\in W^{1,p}(\Omega)}\frac{\displaystyle\int_\Omega |\nabla w|^pdx}{\displaystyle\int_\Omega |w|^p dx}. \end{equation} If $u$ is a minimizer of \eqref{eig_Dir}, then it solves \[ \begin{cases} -\mathcal{Q}_p u= \lambda^D_1(\Omega,p) |u|^{p-2}u\quad &\text{in}\ \Omega\\ u=0 &\text{on}\ \partial\Omega. \end{cases} \] We highlight that, by using Proposition \ref{convergence}, it holds \[ \lim_{\beta\to+\infty}\lim_{p\to 1^+}\lambda_1(\Omega,p,\beta)=\lim_{\beta\to+\infty}\Lambda(\Omega,\beta)=h_1(\Omega), \] where the last equality hold for every $\beta\ge 1$. On the other hand \[ \lim_{p\to 1^+}\lim_{\beta\to+\infty}\lambda_1(\Omega,p,\beta)=\lim_{p\to 1^+}\lambda_1^D(\Omega,p)=h(\Omega). \] where the last equality can be proved following line by line the proof of the result in Proposition \ref{convergence} (when considering $\beta=+\infty$). \end{comment} \subsection{An isoperimetric inequality} \label{isoperimetric_subsec} Here we treat the shape optimization problem for $\Lambda(\Omega,\beta)$. To this aim, we briefly recall the properties of the eigenvalue problem $\lambda_1(\mathcal W_R,p,\beta)$ and then we prove an explicit computation for $\Lambda(\mathcal W_R,\beta)$. By Theorem \ref{existence}, a minimizer of \eqref{lambda_p} solves the following problem: \begin{equation} \label{anisotropic} \begin{cases} -\mathcal{Q}_p u=\lambda_1(\mathcal{W}_R,p,\beta)\abs{u}^{p-2}u & \textrm{in}\;\mathcal{W}_R\\ (F(\nabla u))^{p-1}F_{\xi}(\nabla u)\cdot \nu +\beta F(\nu)\abs{u}^{p-2}u=0 &\textrm{on}\;\partial\mathcal{W}_R. \end{cases} \end{equation} In particular, the following result holds (refer to in \cite{fragavitone} for the positive values of the Robin parameter). \begin{thm} If $u_p \in C^{1,\alpha}(\mathcal W_R)\cap C(\overline{\mathcal W_R})$ is a positive solution of \eqref{anisotropic}, then there exists a monotone function $\varphi_p=\varphi_p(r)$, $r\in [0,R]$, such that $\varphi_p \in C^{\infty}(0,R)\cap C^1([0,R])$, and \begin{equation} \label{radial} \begin{cases} u_p(x)=\varphi_p(F^o(x)) \qquad\qquad \text{in }\overline{\mathcal{W}}_R\\ \varphi^{'}_p(0)=0\\ |\varphi^{'}_p(R)|^{p-2}\varphi'_p(R) +\beta\varphi_p(R)^{p-1}=0. \end{cases} \end{equation} Moreover, $\varphi_p$ is decreasing if $\beta>0$, while is increasing if $\beta<0$. \end{thm} \begin{comment} For $\beta>0$, it is easily seen that $\lambda_1(\mathcal W_R,p,\beta) \geq0$. To prove that $\lambda_1(\mathcal W_R,p,\beta)>0$, we assume, by contradiction, that $\lambda_1(\mathcal W_R,p,\beta)=0$. Thus, we consider a non-negative minimizer $u$ such that $||{u}||_{L^p(\mathcal W_R)}=1$ and \begin{equation*} 0=\lambda_1(\mathcal W_R,p,\beta)=\displaystyle\int_{W_R}|D{u}|^p\;dx+\beta\int_{\mathcal W_R}|{u}|^pF(\nu)\;d\mathcal{H}^{n-1}. \end{equation*} Consequently, $u$ has to be constant in $\mathcal W_R$ and consequently $u\equiv 0$ in $\mathcal W_R$, which contradicts the fact that the norm of ${u}$ is unitary. The simplicity of $\lambda_1(\mathcal W_R,p,\beta)$ and the rotational invariance of the problem gives the radially symmetry of the solutions. Then, problem \eqref{anisotropic} in the radial case becomes: \begin{equation* \begin{cases} -\dfrac{1}{r^{n-1}}\left(|\varphi_p'(r)|^{p-2} \varphi_p'(r)r^{n-1}\right)'=\lambda_1(\mathcal W,p,\beta) \varphi_p^{p-1}(r)\quad \text{if}\ r\in(0,R),\vspace{0.2cm}\\ \varphi_p'(0)|\varphi_p'(0)|^{p-2} =0, \vspace{0.2cm}\\ |\psi'(R)|^{p-2}\varphi_p'(R)+\beta\varphi_p^{p-1}(R)=0. \end{cases} \end{equation*} Let us observe that for every $r\in(0,R)$ \begin{equation}\label{sign_derivative} -\dfrac{1}{r^{n-1}}\left(|\varphi_p'(r)|^{p-2} \varphi_p'(r)r^{n-1}\right)'=\lambda_1(\mathcal W,p,\beta) \varphi^{p-1}(r)>0, \end{equation} and, as a consequence, \begin{equation*} \left(|\varphi_p'(r)|^{p-2} \varphi_p'(r)r^{n-1}\right)'<0. \end{equation*} Taking into account the boundary conditions $\varphi_p'(0)=0$, it follows that $\varphi_p'(r)<0$, since \begin{equation*} |\varphi_p'(r)|^{p-2}\varphi_p'(r)r^{n-1}<0. \end{equation*} If $\beta<0$, choosing the constant as test function in \eqref{functional_Jp}, we obtain \begin{equation*} \lambda_1(\mathcal W_R,p,\beta)\leq\beta\dfrac{P(\mathcal W_R)}{|\mathcal W_R|}<0. \end{equation*} As a consequence, the left hand side of the equation \eqref{sign_derivative} is negative, and therefore $\varphi_p'(r)>0$. \end{comment} We first compute $\Lambda(\mathcal W_R,\beta)$. \begin{prop}\label{explicit_prop} If $\beta>-1$, then \begin{equation} \label{explicit} \Lambda(\mathcal{W}_R,\beta)=\hat{\beta}h_F(\mathcal{W}_R)=\hat{\beta}\dfrac{N}{R}, \end{equation} where $\hat{\beta}=\min\{\beta,1\}.$ \end{prop} \begin{proof} If $\beta\geq 0$, we recall that \[\Lambda(\mathcal{W}_R,\beta)=\inf_{E\subseteq \mathcal{W}_R}J(\chi_E). \] By using Theorem \ref{Lambda=ell_thm} and the isoperimetric inequality, we have \begin{align*} R(E,\beta)&=J(\chi_E)\\ &=\dfrac{P_F(E,\mathcal{W}_R)+\hat{\beta}\displaystyle\int_{\partial \mathcal{W}_R\cap\partial E}F(\nu_E)d\mathcal{H}^{N-1}}{\abs{E}}\\ &\geq\hat{\beta}\dfrac{P_F(E)}{\abs{E}}\geq\hat{\beta}\dfrac{P_F(\mathcal{W}_r)}{\abs{\mathcal{W}_r}}\geq\hat{\beta}\dfrac{P_F(\mathcal{W}_R)}{\abs{\mathcal{W}_R}}\\&=\hat{\beta}\dfrac{N}{R}, \end{align*} where $\mathcal{W}_r$ is the wulff shape of radius $r<R$, with $\abs{\mathcal{W}_r}=\abs{E}$. This proves $\Lambda(\mathcal{W}_R,\beta)\ge\hat{\beta}\frac{N}{R}$. For the reverse inequality we take $E=\mathcal{W}_R$, hence \[ \Lambda(\mathcal{W}_R,\beta)=\ell(\mathcal{W}_R,\beta)\leq R(\mathcal{W}_R,\beta)=\hat{\beta}\dfrac{N}{R}. \] Now, we study the case $-1<\beta<0$ and we will make use of the $\Gamma$-convergence.\\ Hence, let $u_p\in W^{1,p}(\mathcal{W}_R)$ a minimizer of (\ref{lambda_p}). We know, thanks to the Proposition \ref{convergence}, that \[ \lim_{p\rightarrow1^{+}}\lambda_{1}(\mathcal{W}_R,p,\beta)=\Lambda(\mathcal{W}_R,\beta) \] and we take $u_p=\varphi_p$ as in (\ref{radial}). So, the minimizer converges strongly in $L^1(\mathcal{W}_R)$ to $u\in BV(\mathcal{W}_R)$, almost everywhere in $\mathcal{W}_R$ and $u_p\overset{\ast}{\rightharpoonup} u \;\textrm{in}\;BV(\Omega)$ for $p\rightarrow 1^+$. Moreover, $u_p$ is radially increasing, hence $u$ is nondecreasing and this implies that its superlevel sets $\{u>t\}$ are concentric Wulff shapes $\{r<F^o(x)<R\}$ and, by Theorem \ref{Lambda=ell_thm}, it holds that \[ \Lambda(\mathcal{W}_R,\beta)=\dfrac{N}{R}\dfrac{(\frac{r}{R})^{N-1}+\beta}{1-(\frac{r}{R})^{N-1}} \] for some $r\in [0,R[$. Therefore, by minimizing the function \[ f(t)=\dfrac{t^{N-1}+\beta}{1-t^N}\qquad t\in [0,1[, \] we observe that the minimum is attained at $t=0$. Hence, the thesis follows. \end{proof} Finally, we prove an isoperimetric inequality for $\Lambda(\Omega,\beta)$ when a volume constraint holds: if $\beta\geq 0$, the Wulff shape is a minimizer and, if $\beta<0$, it is a maximizer for $\Lambda(\Omega,\beta)$. \begin{prop} If $\beta\geq 0$ and $\mathcal{W}_R$ is the wulff shape of radius $R$ and $\abs{\mathcal{W}_R}=\abs{\Omega}$, then \[ \Lambda(\mathcal{W}_R,\beta)\leq \Lambda(\Omega,\beta). \] If $-1<\beta<0$, then \[ \Lambda(\mathcal{W}_R,\beta)\geq \Lambda(\Omega,\beta). \] \end{prop} \begin{proof} If $\beta \geq 0$, by using the same argument of the Proposition \ref{explicit_prop}, we have that then \[ R(E,\beta)=J(\chi_E)\geq\hat{\beta}\dfrac{P_F(\mathcal{W}_R)}{\abs{\mathcal{W}_R}}=\hat{\beta}\dfrac{N}{R}=\Lambda(\mathcal{W}_R,\beta), \] for any $E\subseteq\Omega$. The conclusion follows by passing to the infimum on the set $E\subseteq\Omega$ and using Theorem \ref{Lambda=ell_thm}. If $-1<\beta <0$, then using the isoperimetric inequality \cite{fonseca1991uniqueness} and \eqref{explicit}, we have that \[ \Lambda(\Omega,\beta)\leq \beta\dfrac{P_F(\Omega)}{\abs{\Omega}}\leq \beta \dfrac{P_F(\mathcal{W}_R)}{\abs{\mathcal{W}_R}}=\Lambda(\mathcal{W}_R,\beta). \] \end{proof} \section*{Acknowledgement} This work has been partially supported by the MIUR-PRIN 2017 grant ``Qualitative and quantitative aspects of nonlinear PDE's'', by GNAMPA of INdAM, by the FRA Project (Compagnia di San Paolo and Universit\`a degli studi di Napoli Federico II) \verb|000022--ALTRI_CDA_75_2021_FRA_PASSARELLI|. \bibliographystyle{abbrv}
\section{Introduction} Quantum entanglement arises from the tensorproduct structure of the Hilbert space and the superposition principle. Quantum entanglement is one of the most valuable resource of quantum tasks, such as quantum teleportation \cite{L1}, dense coding \cite{L2} and quantum key distribution \cite{L3}. One of the most famous multipartite entangled states is the W state. Up to now, many experiments can generate W states. By tracing out a single particle from the W state, the remaining bipartite state is still entangled. Therefore, the W state exhibits a high persistency of quantum entanglement against particle loss \cite{L4}. W state also has the advantage that bipartite entanglement of its particles persists even if the third particle suffers from decoherence \cite{L6,L7}. Because of these merits, W state has been widely used in quantum information \cite{L5}. General relativity predicts black holes, and the gravitational waves are detected by the Virgo and LIGO detectors from a binary black hole merger system that indirectly proves the existence of black holes in our unverse \cite{L8}. On the other hand, the releasing of the images of M87* \cite{HL25,HL26,HL27,HL28,HL29,HL30} and Sgr A* \cite{HL31} directly proved the existence of black holes. Black holes are basal objects in gravity of Einstein which are totally composed of several conserved quantities, such as angular momentum, mass, and charge. The interior and exterior of the event horizon of the black holes are separated. The Hawking radiation comes from the particle-antiparticle pairs of autonomous creation by quantum fluctuations in vicinal event horizon \cite{qHL31,qqHL31,qqqHL31}. Nowadays, there are a growing number of researchers who pay attention to the study of black holes. Specifically, the Schwarzschild solution of the four spacetime dimensions may represent the simplest black hole. Quantum information takes a significant role in the study of the information loss problem and thermodynamics of black holes \cite{L9,L10,L11,L12}. Therefore, it is important that the influence of the relativistic effect on quantum maneuverability is studied in curved spacetime. Bipartite entanglement has been studied extensively in Schwarzschild spacetime \cite{HL32,HL33,HL34,HL35,HL36,HL36QW}, while tripartite entanglement of W state has not been studied in Schwarzschild spacetime. This is the main motivation of our study. Various types of tripartite entanglement are important and interesting for Alice, Bob and Charlie. Bipartite entanglement includes entanglement between two particles and entanglement between one particle and the remaining two particles as one party. Tripartite entanglement exists in the whole tripartite system, which cannot be simplified by any combination of various bipartite entanglement \cite{L13}. Recently, quantum entanglement has come a long way in quantum information theory. The concepts of one-tangle and two-tangle have been proposed. The one-tangle describes the bipartite entanglement between one particle and the remaining two particles, and the two-tangle describes the bipartite entanglement in any reduced bipartite systems \cite{L14,LAA14}. In terms of one-tangle and two-tangle, we can define the measure of tripartite entanglement, which is called the residual-tangle or residual entanglement \cite{L14}. We define the smallest residual entanglement as genuine tripartite entanglement (GTE). GTE is an important type of quantum entanglement which provides significant advantages in quantum tasks. GTE is a crucial resources for measurement-based quantum computing \cite{L15} and high-precision metrology \cite{L16}, and has an important function in quantum phase transitions \cite{L17,L18}. In this paper, we study GTE, one-tangle and two-tangle of W state for free fermionic modes in the background of eternal Schwarzschild black hole. We assume that Alice, Bob and Charlie initially share a tripartite pure state in an asymptotically flat region. Then Alice still stays stationary at an asymptotically flat region, while Bob and Charlie hover near the event horizon of the black hole. Alice observes a vacuum state, which would be detected as a thermal state from Bob and Charlie's point of view. The Hawking temperature $T$ of the thermal bath rests with the surface gravity $\kappa$ of the black hole from a viewpoint of general relativity. We will study the influence of the Hawking effect on GTE, one-tangle and two-tangle of W state in Schwarzschild spacetime, by making a comparison with the GHZ state in Schwarzschild spacetime. The structure of the paper is as follows. In the next section, we briefly introduce the measures of one-tangle, two-tangle and GTE. In the third section, we describe the quantization of Dirac fields in a Schwarzschild black hole. In the fourth section, we study the influence of the Hawking effect on GTE, one-tangle and two-tangle in Schwarzschild spacetime. The last section is devoted to a brief conclusion. \section{Measures of one-tangle, two-tangle and genuine tripartite entanglement} Quantifying entanglement in tripartite systems is generally complicated. A method to determine the existence of tripartite correlation in an entangled state is to explore the entanglement distribution in the tripartite system. Different from classical correlations, quantum entanglement is monogamous, which is not freely shared in multiple subsystems of a quantum system \cite{L19}. Therefore, we can use the residual entanglement as a way for measuring nonclassical correlations of the tripartite systems. The basis for analyzing residual entanglement is negativity. Negativity has been used extensively, which quantifies the entanglement in a state as the degree of seeing whether the system is still entangled. A system is entangled when its density matrix of the partial transpose has negative eigenvalues. The bipartite entanglement of a tripartite system has two types: entanglement between two subsystems, and entanglement between one subsystem and the remaining two subsystems as one party. The bipartite entanglement between one subsystem and the remaining two subsystems is called one-tangle, \begin{eqnarray}\label{S1} N_{\alpha(\beta\gamma)}=\|\rho^{T_{\alpha}}_{\alpha\beta\gamma}\|-1. \end{eqnarray} The bipartite entanglement between two subsystems is called two-tangle, \begin{eqnarray}\label{S2} N_{\alpha\beta}=\|\rho^{T_{\alpha}}_{\alpha\beta}\|-1. \end{eqnarray} Here $T_{\alpha}$ is partial transpose of $\rho_{\alpha\beta\gamma}$ and $\rho_{\alpha\beta}$ relative to observer $\alpha$. Note that $\|A\|-1 $ is actually equal to the two times of the sum of absolute values of the negative eigenvalues of the operator $A$ \cite{L14,LAA14}. Thus, one-tangle and two-tangle also can be expressed as \begin{eqnarray}\label{S3} N_{\alpha(\beta\gamma)}=2\sum^{n}_{i=1}|\lambda^{(-)}_{\alpha(\beta\gamma)}|^{i}, \end{eqnarray} \begin{eqnarray}\label{S4} N_{\alpha\beta}=2\sum^{n}_{j=1}|\lambda^{(-)}_{\alpha\beta}|^{j}. \end{eqnarray} For three parties, the Coffman-Kundu-Wootters inequality describes the monogamy constraint \begin{eqnarray}\label{S5} N^{2}_{\alpha(\beta\gamma)}\geq\ N^2_{\alpha\beta}+N^2_{\alpha\gamma}. \end{eqnarray} The right hand side of inequality (5) represents the sum of the square of the two two-tangles between subsystem $\alpha$ and the every one of remaining subsystems. The other side quantifies the square of the one-tangle between subsystem $\alpha$ and the remaining subsystems. We choose the minimum of each non-negative difference between the two sides of inequality in a subsystem, which is called minimally residual tripartite entanglement \begin{eqnarray}\label{S6} E_{(\alpha|\beta|\gamma)}=\min_{(\alpha,\beta,\gamma)}[N^{2}_{\alpha(\beta\gamma)}- N^2_{\alpha\beta}-N^2_{\alpha\gamma}], \end{eqnarray} where $(\alpha,\beta,\gamma)$ shows all the permutations of the three mode indices. In the tripartite quantum system, a significance of the minimally residual entanglement denotes the genuine tripartite entanglement (GTE) shared by the three subsystems \cite{L14,LAA14}. \section{Quantization of Dirac fields in a Schwarzschild black hole } The metric in Schwarzschild spacetime can be expressed as \begin{eqnarray}\label{S7} ds^2&=&-(1-\frac{2M}{r}) dt^2+(1-\frac{2M}{r})^{-1} dr^2\nonumber\\&&+r^2(d\theta^2 +\sin^2\theta d\varphi^2), \end{eqnarray} where $M$ is the mass of the black hole, and $r$ is radial coordinates. We set $G$, $c$, $\hbar$ and $k_B$ as unity in this paper. The Dirac equation \cite{HL46} in a general spacetime is written as \begin{eqnarray}\label{S8} [\gamma^a e_a{}^\mu(\partial_\mu+\Gamma_\mu)]\Phi=0, \end{eqnarray} where $\gamma^a$ are the Dirac matrices, the four-vectors $e_a{}^\mu$ is the inverse of the tetrad $e^a{}_\mu$ defined by $g_{\mu\nu}=\eta_{ab}e^{a}{}_{\mu}e^b{}_{\nu}$ with $\eta_{ab}={\rm diag}(-1, 1, 1, 1)$, and $\Gamma_\mu= \frac{1}{8}[\gamma^a,\gamma^b]e_a{}^\nu e_{b\nu;\mu}$ are the spin connection coefficients. Specifically, the Dirac equation in Schwarzschild spacetime can be expressed as \cite{HL47} \begin{eqnarray}\label{S9} &-&\frac{\gamma_{0}}{\sqrt{1-\frac{2M}{r}}}\frac{\partial\Phi}{\partial t}+\gamma_{1}\sqrt{1-\frac{2M}{r}}[\frac{\partial}{\partial r}+\frac{1}{r}\\ \nonumber&+&\frac{M}{2r(r-2M)}]\Phi +\frac{\gamma_{2}}{r}(\frac{\partial}{\partial\theta}+\frac{\cot\theta}{2})\Phi +\frac{\gamma_{3}}{r\sin\theta}\frac{\partial\Phi}{\partial\varphi}=0, \end{eqnarray} where $\gamma_{i}$ (i = 0, 1, 2, 3) are the Dirac matrices. By solving Eq.(9), we obtain the positive (fermion) frequency outgoing solutions outside and inside regions of the event horizon \cite{HL47,HL48,HL49,HL49Q} \begin{eqnarray}\label{S10} \Phi^+_{{k},{\rm out}}\sim \phi(r) e^{-i\omega u}, \end{eqnarray} \begin{eqnarray}\label{S11} \Phi^+_{{k},{\rm in}}\sim \phi(r) e^{i\omega u}, \end{eqnarray} where $\phi(r)$ represents four-component Dirac spinor, $\omega$ is a monochromatic frequency, $k$ is the wave vector, $\omega=|k|$ in the massless Dirac field and $u=t-r_{*}$ with the tortoise coordinate $r_{*}=r+2M\ln\frac{r-2M}{2M}$. Therefore, we expand Dirac field $\Phi$ through Eqs.(10) and (11) as \begin{eqnarray}\label{S12} \Phi&=&\int dk[\hat{a}^{in}_{k}\Phi^+_{{k},{\rm in}}+\hat{b}^{in\dag}_{-k}\Phi^-_{{-k},{\rm in}}\\ \nonumber&+&\hat{a}^{out}_{k}\Phi^+_{{k},{\rm out}}+\hat{b}^{out\dag}_{-k}\Phi^-_{{-k},{\rm out}}], \end{eqnarray} where $\hat{a}^{in}_{k}$ and $\hat{b}^{in\dag}_{-k}$ are the annihilation operator of fermion and the creation operator of antifermion for the interior of the event horizon, respectively, and $\hat{a}^{out}_{k}$ and $\hat{b}^{out\dag}_{-k}$ are the annihilation operator of fermion and creation operator of antifermion for the exterior of the event horizon in the Schwarzschild black hole, respectively. According to Domour and Ruffini's suggestions \cite{HL50}, one provides a complete basis for the positive energy mode (Kruskal mode) by the analytic extension of Eqs.(10) and (11) \begin{eqnarray}\label{S13} \Psi^+_{{k},{\rm out}}=e^{-2\pi M\omega}\Phi^-_{{-k},{\rm in}}+e^{2\pi M\omega}\Phi^+_{{k},{\rm out}}, \end{eqnarray} \begin{eqnarray}\label{S14} \Psi^+_{{k},{\rm in}}=e^{-2\pi M\omega}\Phi^-_{{-k},{\rm out}}+e^{2\pi M\omega}\Phi^+_{{k},{\rm in}}. \end{eqnarray} Therefore, we also use the Kruskal modes to expand the Dirac field \cite{HL48} \begin{eqnarray}\label{S15} \Phi&=&\int dk[2\cosh(4\pi M\omega)]^{-\frac{1}{2}}[\hat{c}^{in}_{k}\Psi^+_{k,in}\\ \nonumber&+&\hat{d}^{in\dagger}_{-k}\Psi^-_{-k,in}+\hat{c}^{out}_{k}\Psi^+_{k,out}+\hat{d}^{out\dagger}_{-k}\Psi^-_{-k,out}], \end{eqnarray} where $\hat{c}^{\sigma}_{k}$ and $\hat{d}^{\sigma\dagger}_{k}$ with $\sigma=(in,out)$ are the annihilation operators of fermion and creation operators of antifermion acting on the Kruskal vacuum. Eqs.(12) and (15) are shown that Dirac field can be decomposed by Schwarzschild and Kruskal modes, respectively, which lead to the Bogoliubov transformations between Schwarzschild and Kruskal operators \begin{eqnarray}\label{S16} \hat{c}^{out}_{k}=\frac{1}{\sqrt{e^{-8\pi M\omega}+1}}\hat{a}^{out}_{k}-\frac{1}{\sqrt{e^{8\pi M\omega}+1}}\hat{b}^{in\dagger}_{-k}, \end{eqnarray} \begin{eqnarray}\label{S17} \hat{c}^{out\dagger}_{k}=\frac{1}{\sqrt{e^{-8\pi M\omega}+1}}\hat{a}^{out\dagger}_{k}-\frac{1}{\sqrt{e^{8\pi M\omega}+1}}\hat{b}^{in}_{-k}. \end{eqnarray} According to Bogoliubov transformations, the expressions of the Kruskal vacuum and excited states in the Schwarzschild black hole are written as \begin{eqnarray}\label{S18} \nonumber |0\rangle_K&=&\frac{1}{\sqrt{e^{-\frac{\omega}{T}}+1}}|0\rangle_{out} |0\rangle_{in}+\frac{1}{\sqrt{e^{\frac{\omega}{T}}+1}}|1\rangle_{out} |1\rangle_{in},\\ |1\rangle_K&=&|1\rangle_{out} |0\rangle_{in}, \end{eqnarray} where $T=\frac{1}{8\pi M}$ is the Hawking temperature, ${|n\rangle_{out}}$ and ${|n\rangle_{in}}$ are the number states for the fermion in the exterior region and the antifermion in the interior region of the event horizon of the black hole. When an outside observer travels through the Kruskal vacuum, Bob's detector records the number of particles, which can be expressed as \begin{eqnarray}\label{S19} N_{F}=_{K}\langle0|\hat{a}^{out\dagger}_{k}\hat{a}^{out}_{k}|0\rangle_{K}=\frac{1}{e^{\frac{\omega}{T}}+1}. \end{eqnarray} The equation represents that the observer detects a thermal Fermi-Dirac distribution of the particles in the exterior of the event horizon of the black hole. \section{The influence of the Hawking effect on GTE, one-tangle and two-tangle in the Schwarzschild black hole} We assume that Alice, Bob and Charlie initially stay stationary at an asymptotically flat region and share a W state \begin{eqnarray}\label{S20} |W\rangle=\frac{1}{\sqrt{3}}[|0_{A}0_{B}1_{C}\rangle+|0_{A}1_{B}0_{C}\rangle+|1_{A }0_{B}0_{C}\rangle], \end{eqnarray} where the subscripts $A$, $B$ and $C$ denote the qubits shared by Alice, Bob and Charlie, respectively. Subsequently, we consider Alice still stays stationary at an asymptotically flat region, while Bob and Charlie hover near the event horizon of the black hole. According to Eqs.(\ref{S18}) and (\ref{S20}), the wave function of W state can be rewritten as \begin{eqnarray}\label{SS21} |\bar W\rangle&=&\frac{1}{\sqrt{3}}[\mu|0_{A}0_{B}0_{\bar B}1_{C}0_{\bar C}\rangle +\mu|0_{A}1_{B}0_{\bar B}0_{C}0_{\bar C}\rangle \nonumber\\ &+&\nu|0_{A}1_{B}0_{\bar B}1_{C}1_{\bar C}\rangle+\nu|0_{A}1_{B}1_{\bar B}1_{C}0_{\bar C}\rangle\nonumber\\ &+&\mu^2|1_{A}0_{B}0_{\bar B}0_{C}0_{\bar C}\rangle+\mu\nu|1_{A}0_{B}0_{\bar B}1_{C}1_{\bar C}\rangle\nonumber\\ &+&\mu\nu|1_{A}1_{B}1_{\bar B}0_{C}0_{\bar C}\rangle+\nu^2|1_{A}1_{B}1_{\bar B}1_{C}1_{\bar C}\rangle], \end{eqnarray} where $\mu=\frac{1}{\sqrt{e^{-\frac{\omega}{T}}+1}}$ and $\nu=\frac{1}{\sqrt{e^{\frac{\omega}{T}}+1}}$. Since Bob and Charlie cannot access the modes inside event horizon of the black hole, we should trace over the inaccessible $\bar B$ and $\bar C$ modes. Therefore, by tracing over the inaccessible modes, we obtain the density matrix \begin{eqnarray}\label{S22} \rho_{ABC}=\frac{1}{3} \left(\!\!\begin{array}{cccccccc} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & \mu^2 & \mu^2 & 0 & \mu^3 & 0 & 0 & 0\\ 0 & \mu^2 & \mu^2 & 0 & \mu^3 & 0 &0 & 0\\ 0 & 0 & 0 & 2\nu^2 & 0 & \mu\nu^2 & \mu\nu^2 & 0 \\ 0 & \mu^3 & \mu^3 & 0 & \mu^4 &0 & 0 &0 \\ 0 & 0 & 0 & \mu\nu^2 & 0 & \mu^2\nu^2 & 0 & 0\\ 0 & 0 & 0 & \mu\nu^2 & 0 & 0 & \mu^2\nu^2 &0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \nu^4 \end{array}\!\!\right). \end{eqnarray} According to Eq.(\ref{S6}), the GTE of W state in Schwarzschild spacetime can be expressed as \begin{eqnarray}\label{S23} E_{(A|B|C)}^W&=&\frac{1}{576}\{8\mu^4-8\mu^2+2\sqrt{2}[35\mu^4+28\mu^4(2\mu^2-1)\nonumber\\ &+&\mu^4(8\mu^4-8\mu^2+1)]^\frac{1}{2}\}^2-\frac{1}{18}\{\sqrt{2}[5\nonumber\\ &+&4(2\mu^2-1)+(8\mu^4-8\mu^2+1)]^\frac{1}{2}-2\}^2. \end{eqnarray} From Eq.(\ref{S23}) we can see that the GTE of W state depends on the Hawking temperature $T$, which means that the Hawking radiation will affect the GTE in the Schwarzschild black hole. On the other hand, the GTE of GHZ state in curved spacetime reads $E_{(A|B|C)}^{GHZ}=\frac{1}{4}[\mu^2-\mu^2\nu^2+\mu\sqrt{\nu^4\mu^2+\mu^2}]^2$ \cite{HL47}. \begin{figure \includegraphics[scale=0.9]{Fig1.eps} \caption{The GTE of W and GHZ states as a function of the Hawking temperature $T$. }\label{Fig1} \end{figure} In Fig.\ref{Fig1}, we plot the GTE of W and GHZ states as a function of the Hawking temperature $T$ in the Schwarzschild black hole. We find that the GTE of W state first decreases and then tends to zero with the increase of the Hawking temperature $T$, while GTE of GHZ state first decreases and then freezes with the increase of the Hawking temperature $T$ \cite{HL47}. We also find that the GTE of W state is smaller than that of GHZ state. This implies that the GTE of GHZ state is more effective for resisting the Hawking effect and is more suitable for processing relativistic quantum information. We also study bipartite entanglement $N_{A(BC)}$, $N_{B(AC)}$, $N_{C(AB)}$, $N_{AB}$, $N_{AC}$ and $N_{BC}$ for the W state in Schwarzschild spacetime. Firstly, we consider the one-tangles $N_{A(BC)}$, $N_{B(AC)}$ and $N_{C(AB)}$. Taking the transpose of $\rho_{ABC}$ with respect mode $A$, we get \begin{eqnarray}\label{S24} \rho^{T_{A}}_{ABC}=\frac{1}{3} \left(\!\!\begin{array}{cccccccc} 0 & 0 & 0 & 0 & 0 & \mu^3 & \mu^3 & 0\\ 0 & \mu^2 & \mu^2 & 0 & 0 & 0 & 0 & \mu\nu^2\\ 0 & \mu^2 & \mu^2 & 0 & 0 & 0 &0 & \mu\nu^2\\ 0 & 0 & 0 & 2\nu^2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \mu^4 &0 & 0 &0 \\ \mu^3 & 0 & 0 & 0 & 0 & \mu^2\nu^2 & 0 & 0\\ \mu^3 & 0 & 0 & 0 & 0 & 0 & \mu^2\nu^2 &0 \\ 0 & \mu\nu^2 & \mu\nu^2 & 0 & 0 & 0 & 0 & \nu^4 \end{array}\!\!\right), \nonumber \end{eqnarray} which has the negative eigenvalue $\frac{1}{48}[-8\mu^4+8\mu^2-2\sqrt{2}\sqrt{35\mu^4+28\mu^4(2\mu^2-1)+\mu^4(8\mu^4-8\mu^2+1)}]$. Thus the one-tangle $N_{A(BC)}$ is \begin{eqnarray}\label{S25} N_{A(BC)}&=&\frac{1}{24}\{8\mu^4-8\mu^2+2\sqrt{2}[35\mu^4+28\mu^4\nonumber\\ &&(2\mu^2-1)+\mu^4(8\mu^4-8\mu^2+1)]^\frac{1}{2}\}. \end{eqnarray} Similarly, taking the transpose with respect the mode $B$, \begin{eqnarray}\label{S26} \rho^{T_{B}}_{ABC}=\frac{1}{3} \left(\!\!\begin{array}{cccccccc} 0 & 0 & 0 & \mu^2 & 0 & 0 & \mu^3 & 0\\ 0 & \mu^2 & 0 & 0 & \mu^3 & 0 & 0 & \mu\nu^2\\ 0 & 0 & \mu^2 & 0 & 0 & 0 & 0 & 0\\ \mu^2 & 0 & 0 & 2\nu^2 & 0 & 0 & \mu\nu^2 & 0 \\ 0 & \mu^3 & 0 & 0 & \mu^4 &0 & 0 &0 \\ 0 & 0 & 0 & 0 & 0 & \mu^2\nu^2 & 0 & 0\\ \mu^3 & 0 & 0 & \mu\nu^2 & 0 & 0 & \mu^2\nu^2 &0 \\ 0 & \mu\nu^2 & 0 & 0 & 0 & 0 & 0 & \nu^4 \end{array}\!\!\right). \nonumber \end{eqnarray} Due to the complexity of the expression of $N_{B(AC)}$, we do not write it out here. Since Bob and Charlie are symmetric, we obtain $N_{B(AC)}=N_{C(AB)}$. \begin{figure \includegraphics[scale=0.9]{Fig2.eps} \caption{The one-tangles of W state as a function of the Hawking temperature $T$. }\label{Fig2} \end{figure} In Fig.\ref{Fig2}, we plot the one-tangles of W state as a function of the Hawking temperature $T$. We can see that one-tangles of W state first decrease and then appear freezing phenomenon with the increase of the Hawking temperature $T$. We also find that one-tangle of GHZ state is bigger than one-tangle of W state in curved spacetime, which means that one-tangle of GHZ state can effectively resist Hawking effect \cite{HL47}. This indicates that one-tangle of GHZ state is more suitable for processing relativistic quantum information. It has been shown that\cite{HL51,HL52}, however, the coherence of W state is always bigger than the coherence of GHZ state in Schwarzschild spacetime, meaning that the coherence of W state is more suitable for processing relativistic quantum information than the GHZ state. Therefore, we should choose suitable quantum resources as required to process relativistic quantum information. Next, we consider the two-tangles $N_{AB}$, $N_{AC}$ and $N_{BC}$. Taking trace over the mode $C$ from $\rho_{ABC}$, one gets \begin{eqnarray}\label{S27} \rho_{AB}=\frac{1}{3} \left(\!\!\begin{array}{cccc} \mu^2 &0 & 0 &0 \\ 0 & 1+\nu^2 & \mu & 0 \\ 0 & \mu & \mu^2 & 0 \\ 0 & 0 & 0 &\nu^2 \end{array}\!\!\right). \end{eqnarray} The transpose with respect mode $A$ is \begin{eqnarray}\label{S28} \rho^{T_{A}}_{AB}=\frac{1}{3} \left(\!\!\begin{array}{cccc} \mu^2 &0 & 0 &\mu \\ 0 & 1+\nu^2 & 0 & 0\\ 0 & 0 & \mu^2 &0 \\ \mu & 0 & 0 &\nu^2 \end{array}\!\!\right). \end{eqnarray} According to Eqs.(\ref{S4}) and (\ref{S28}), the two-tangle $N_{AB}$ can be expressed as \begin{eqnarray}\label{S31} N_{AB}=\frac{1}{6}[\sqrt{2}\sqrt{4(2\mu^2-1)+(8\mu^4-8\mu^2+1)+5}-2]. \end{eqnarray} Since Bob and Charlie are symmetric, we have $N_{AB}$=$N_{AC}$. Similarly, we can get \begin{eqnarray}\label{S29} \rho_{BC}=\frac{1}{3} \left(\!\!\begin{array}{cccc} \mu^4 &0 & 0 & 0 \\ 0 & \mu^2(1+\nu^2) & \mu^2 & 0\\ 0 & \mu^2 & \mu^2(1+\nu^2) &0 \\ 0 & 0 & 0 &\nu^2(2+\nu^2) \end{array}\!\!\right), \end{eqnarray} and its transpose \begin{eqnarray}\label{S30} \rho^{T_{B}}_{BC}=\frac{1}{3} \left(\!\!\begin{array}{cccc} \mu^4 &0 & 0 &\mu^2 \\ 0 & \mu^2(1+\nu^2) & 0 & 0\\ 0 & 0 & \mu^2(1+\nu^2) &0 \\ \mu^2 & 0 & 0 &\nu^2(2+\nu^2) \end{array}\!\!\right). \end{eqnarray} Employing Eqs.(\ref{S4}) and (\ref{S30}), the two-tangle $N_{BC}$ can be written as \begin{eqnarray}\label{S32} N_{BC}&=&\frac{1}{12}(-12-8\mu^4+16\mu^2 \\ \nonumber &+& 2\sqrt{2}\sqrt{18+40\mu^4-48\mu^2}). \end{eqnarray} \begin{figure \includegraphics[scale=0.9]{Fig3.eps} \caption{The $N_{AB}$ and $N_{BC}$ of W state as a function of the Hawking temperature $T$. }\label{Fig3} \end{figure} In Fig.\ref{Fig3}, we plot the two-tangles of W state as a function of the Hawking temperature $T$. It is shown that the two-tangle $N_{AB}$ between Alice and Bob first decreases and then freezes with the increase of the Hawking temperature $T$. However, the two-tangle $N_{BC}$ between Bob and Charlie first decreases and then suffers from sudden death with the growth of the Hawking temperature $T$. This means that the Hawking effect completely destroys the two-tangle $N_{BC}$ of W state. These results are in contrast with the two-tangles of the tripartite GHZ state, which are zero in curved spacetime \cite{HL47}. Finally, we compare fermionic entanglement with bosonic entanglement of tripartite states in Schwarzschild spacetime. We initially assume that Alice, Bob and Charlie stay stationary at an asymptotically flat region and share GHZ and W states of bosonic field. According to Bogoliubov transformations, the Kruskal vacuum and excited states of bosonic field in Schwarzschild spacetime can be expressed as \begin{eqnarray}\label{S31} |0\rangle^B_K&=&\sqrt{1-e^{-\frac{\omega}{T}}}\sum^\infty_{n=0}e^{-\frac{n\omega}{2T}}|n\rangle^B_{out} |n\rangle^B_{in},\\ \nonumber |1\rangle^B_K&=&(1-e^{-\frac{\omega}{T}})\sum^\infty_{n=0}e^{-\frac{n\omega}{2T}}\sqrt{n+1}|n+1\rangle^B_{out} |n\rangle^B_{in}, \end{eqnarray} where ${|n\rangle^B_{out}}$ and ${|n\rangle^B_{in}}$ are the number states for the boson in the exterior region and the antiboson in the interior region of the event horizon of the black hole, respectively \cite{HL33}. Hereafter, we omit the mark $B$ for simplicity unless it causes confusion. Because the tripartite entanglement of bosonic field is very complex in Schwarzschild spacetime, we consider a simpler model: Charlie hovers near the event horizon of the black hole, while Alice and Bob still stay stationary at an asymptotically flat region. According to Eq.(\ref{S31}), the wave functions of GHZ and W states can be rewritten as \begin{eqnarray}\label{S32} |GHZ\rangle^{B}_{ABC}&=&\frac{1}{\sqrt{2}\alpha}\sum^\infty_{n=0}\gamma^n(|00n\rangle|n\rangle_{in} \\ \nonumber &&+\frac{\sqrt{n+1}}{\alpha}|11n+1\rangle|n\rangle_{in}), \end{eqnarray} \begin{eqnarray}\label{S33} |W\rangle^{B}_{ABC}&=&\frac{1}{\sqrt{3}\alpha}\sum^\infty_{n=0}\gamma^n(\frac{\sqrt{n+1}}{\alpha}|00n+1\rangle \\ \nonumber &&+|01n\rangle+|10n\rangle)\bigotimes|n\rangle_{in}, \end{eqnarray} where $\alpha=\frac{1}{\sqrt{1-e^{-\frac{\omega}{T}}}}$ and $\gamma=\frac{1}{\sqrt{e^{\frac{\omega}{T}}}}$. Since Charlie cannot access the modes inside the event horizon of the black hole, we should trace over the inaccessible mode and obtain the density operators \begin{eqnarray}\label{S34} \rho^{B}_{GHZ}&=&\frac{1}{2\alpha^2}\sum^\infty_{n=0}\gamma^{2n}\{|00n\rangle\langle00n| \\ \nonumber &&+\frac{\sqrt{n+1}}{\alpha}[|00n\rangle\langle11n+1|+|11n+1\rangle\langle00n|] \\ \nonumber &&+\frac{n+1}{\alpha^2}|11n+1\rangle\langle11n+1|\}, \end{eqnarray} \begin{eqnarray}\label{S35} \rho^{B}_{W}&=&\frac{1}{3\alpha^2}\sum^\infty_{n=0}\gamma^{2n}\{\frac{n+1}{\alpha^2}|00n+1\rangle\langle00n+1| \\ \nonumber &&+|01n\rangle\langle01n|+|10n\rangle\langle10n| +\frac{\sqrt{n+1}}{\alpha}[|00n+1\rangle\\ \nonumber &&\langle01n|+|01n\rangle\langle00n+1|+|00n+1\rangle\langle10n|+\\ \nonumber &&|10n\rangle\langle00n+1|] +|01n\rangle\langle10n|+|10n\rangle\langle01n|\}. \end{eqnarray} Employing Eqs.(\ref{S3}), (\ref{S4}) and (\ref{S6}), we can obtain the GTE and bipartite entanglement $N^B_{C(AB)}$ of the GHZ and W states of bosonic field in Schwarzschild spacetime. Since the expressions are very complex, we do not write them. \begin{figure} \includegraphics[width=3.3in,height=6.0cm]{Fig4a.eps} \label{fig:side:a} \vspace{0.2cm} \includegraphics[width=3.3in,height=6.0cm]{Fig4b.eps} \label{fig:side:a} \caption{The GTE, $N^{B,GHZ}_{C(AB)}$ and $N^{B,W}_{C(AB)}$ of GHZ and W states of bosonic field as a function of the Hawking temperature $T$. } \label{Fig4} \end{figure} In Fig.\ref{Fig4}, we plot the GTE, $N^{B,GHZ}_{C(AB)}$ and $N^{B,W}_{C(AB)}$ of GHZ and W states of bosonic field as a function of the Hawking temperature $T$. From Fig.\ref{Fig4} (a), we can see that the GTEs of GHZ and W states of bosonic field vanish in the infinite Hawking temperature $T$, while the GTE of GHZ state of fermionic field always survives in curved spacetime \cite{HL47}. This means that the GTE of GHZ state of fermionic field may be more suitable for relativistic quantum information tasks. By the numerical calculation, we find \begin{eqnarray}\label{S36} \lim\limits_{T\to\infty}N^{B,GHZ}_{C(AB)}=0,\qquad \lim\limits_{T\to\infty}N^{B,W}_{C(AB)}=0. \end{eqnarray} It means that $N^{B,GHZ}_{C(AB)}$ and $N^{B,W}_{C(AB)}$ of GHZ and W states of bosonic field vanish in the infinite Hawking temperature $T$. However, one-tangles of GHZ and W states of fermionic field always survive when only Charlie hovers near the event horizon of the black hole \cite{HL47}. The disparity between the Dirac and scalar fields is caused by the differences between Bose-Einstein and Fermi-Dirac statistics. This is because that Fermi-Dirac distribution protects tripartite entanglement of fermionic field. In addition, one-tangles $N^{B,GHZ}_{A(BC)}$ ($N^{B,GHZ}_{B(AC)}$ ) and $N^{B,W}_{A(BC)}$ ($N^{B,W}_{B(AC)}$ ) of GHZ and W states of bosonic field can survive for any $T$ \cite{HL520}. This conclusion is consistent with the fermionic field \cite{HL47}. \section{ Conclusions \label{GSCDGE}} The effect of the Hawking effect on the genuine tripartite entanglement (GTE), one-tangle and two-tangle of W state in Schwarzschild spacetime have been investigated. We assume that Alice, Bob and Charlie initially share a W state at an asymptotically flat region. Then Alice still stays stationary at an asymptotically flat region, while Bob and Charlie hover near the event horizon of the black hole. We have found that, with the increase of the Hawking temperature, the GTE of W state first decreases and then approaches zero, while GTE of GHZ state first decreases and then appears freezing phenomenon \cite{HL47}. This implies that the GTE of GHZ state is more effective for resisting Hawking effect. We have also found that, with the growth of the Hawking temperature, the two-tangle between Alice and Bob (Charlie) of W state first decreases and then freezes, while two-tangle between Bob and Charlie first reduces and then suffers from sudden death. This is different from the case of GHZ state, whose two-tangles are zero in Schwarzschild spacetime\cite{HL47}. We have shown that the one-tangle of W state first decreases and then appears freezing phenomenon with the increase of the Hawking temperature, which is always smaller than the one-tangle of GHZ state in curved spacetime. This is different from the behavior of quantum coherence, where the coherence of W state is bigger than that of GHZ state in Schwarzschild spacetime \cite{HL51,HL52}. Therefore, for different quantum states, we should choose suitable quantum resources to process relativistic quantum information. Finally, we compare bosonic entanglement with fermionic entanglement of tripartite states when only Charlie hovers near the event horizon of the Schwarzschild black hole. We find that the GTEs of GHZ and W states of bosonic field reduce to zero with the growth of the Hawking temperature, while the GTE of GHZ state of fermionic field can survive for any Hawking temperature. We also find that not all the one-tangles of GHZ and W states of bosonic field can survive in the infinite Hawking temperature limit, while all one-tangles of GHZ and W states of fermionic field always survive in Schwarzschild spacetime. This is because that Fermi-Dirac distribution protects tripartite entanglement of fermionic field in Schwarzschild spacetime. It means that tripartite entanglement of fermionic field is more suitable for processing relativistic quantum information. \acknowledgments This work is supported by the National Natural Science Foundation of China (Grant Nos. 12205133, 1217050862, 11275064, 11975064 and 12075050 ), LJKQZ20222315 and 2021BSL013.
\section{INTRODUCTION}\label{sec:intro} Quantum computers exhibit an innate ability to handle exponentially large computations in a parallel fashion yet with a strong probabilistic flavor. Quantum algorithms such as Shor's integer factorization, Grover's search, and the linear system solver of Harrow-Hassidim-Lloyd (HHL) can attain polynomial or even exponential speedups over the best known algorithms on classical computers~\cite{nielsen00}. Nonetheless, some of these quantum algorithms presume a large number of qubits on fault-tolerant quantum computers. In the \emph{near-term intermediate scale} (NISQ) era, quantum computers are noisy and thus oftentimes limited in terms of number of gates and/or qubits. With such limitations in mind, \emph{variational} quantum algorithms have been suggested as promising tools to practically showcase quantum advantage in the NISQ setup~\cite{Simeone}. Variational quantum computers involve a sequence of parameterized gates. Their parameters are updated externally by a classical computer in a closed-loop fashion to steer the quantum state towards a desirable direction. The variational quantum eigensolver (VQE) used to provide high-quality solutions to combinatorial problems is a representative example. The Quantum Approximate Optimization Algorithm (QAOA)~\cite{Farhi14} is a special instance of VQE. In QAOA, not only the parameters but also the architecture of the quantum circuit become problem-dependent. The quantum circuit trained by QAOA operates as a sampler to efficiently generate near-optimal solutions of binary quadratic problems (e.g., MAXCUT); see~\cite{Hadfield19} for a summary of claims on QAOA. While most VQE/QAOA schemes target unconstrained problems, dealing with constraints is crucial to several applications in machine learning, wireless communications, and financial (stock trading) optimization. Adding constraints to QAOA or adiabetic quantum computing~\cite{McGeoch} (the QAOA counterpart for non-gate-based quantum computers) has been pursued in two ways. One approach has been to convert the constrained problem into an unconstrained minimization of a Lagrangian-like function~\cite{Lucas,Ohzeki}. However, the weights for constraint penalties can be safely selected only if constraints are expressed as Boolean functions or linear equalities. An alternative approach modifies the architecture of the quantum circuit (via the mixer Hamiltonian of QAOA) to confine quantum states on the subspace spanned by constraints~\cite{HenSarandy,HenSpedalieri,Hadfield19,Hadfield17}. Nonetheless, constructing such `driver' mixer Hamiltonians is again highly problem-dependent and often limited to equality constraints. Reference~\cite{Ronagh} develops a quantum adiabetic approach to tackle binary linearly-constrained quadratic programs. It targets the dual problem and interfaces the quantum computer with a branch-and-bound scheme ran classically. Reference~\cite{GambellaSimonetto} treats mixed-binary quadratic-plus-convex problems using the alternating direction method of multipliers (ADMM) to split binary and continuous variables into separate minimizations, solved by QAOA and classical convex optimizers respectively per ADMM iteration. \emph{Relation to prior work.} Addressing binary QCQPs by quantum heuristics has been largely unexplored to the authors' knowledge. We put forth a quantum-based heuristic to solve a stochastic binary QCQP. Harnessing the power of quantum circuits to sample from probability mass functions (PMF) that are hard to sample classically, we devise a dual decomposition technique that solves a sequence of standard VQE tasks to systematically adjust Lagrangian multipliers. Numerical tests using quantum computer simulators provided by IBM evaluate this technique on randomly generated stochastic and deterministic binary QCQPs. \vspace*{-1em} \section{Quantum Computing Preliminaries}\label{sec:qc} A quantum system consisting of $n$ quantum bits (qubits) is described by an exponentially large state vector $\ket{\bx}\in\mathbb{C}^N$ with $N=2^n$ assuming the system is in a \emph{pure state}. The Dirac notation $\ket{\bx}$ named \emph{ket} emphasizes that vector $\bx$ is unit-norm or $\sum_{k=0}^{N-1}|x_k|^2=1$. If $\be_k$ is the $k$-th canonical vector of length $N$, we can write $\ket{\bx}=\sum_{k=0}^{N-1}x_k\ket{\be_k}$. The vector $\be_k$ is oftentimes alternatively expressed as $\ket{\be_k}=\ket{k}$, where $k$ is the binary representation of index $k$. For example, a system with $n=2$ qubits has a state in $\mathbb{C}^4$, which is spanned by canonical vectors $\{\be_k\}_{k=0}^3$ and $\be_0=[1~0~0~0]^\top=\ket{00}$. Vector $\ket{\bx}$ provides a statistical characterization for the quantum state: If we measure the quantum system output, its qubits will be in configuration $\ket{k}$ with probability $|x_k|^2$ for all $k$. Symbol $\bra{\bx}$ termed \emph{bra} denotes the conjugate transpose of $\ket{\bx}$, while the \emph{braket} $\braket{\bx | \by}$ denotes the inner product between states. The fundamental operations we can perform on a quantum system is evolution and measurement. The former can be described by the application of a unitary $\bU$ on state $\ket{\bx}$ to produce state $\ket{\by}=\bU\ket{\bx}$. Although $\bU$ is exponentially large, it is usually implemented efficiently using quantum gates. Among various types of measurements, we focus on \emph{projective measurements}. A projective measurement is associated with a Hermitian matrix (named \emph{observable}) and its eigenvalue decomposition $\bH=\sum_{m=1}^M\lambda_m\bv_m\bv_m^H$. If such measurement is performed on $\ket{\bx}$, outcome $m$ is observed with probability $p_m:=|\braket{\bx | \bv_m}|^2$. Define a random variable taking value $\lambda_m$ when outcome $m$ is observed. The expected value of this variable is $\braket{\bx | \bH | \bx}=\sum_{m=1}^M p_m \lambda_m$. If $\bH$ is diagonal, the measurement is on the \emph{computational basis}. This is practically important because now $\bv_m=\be_m$, outcome $m$ relates to $\ket{m}$, and each qubit can be measured individually. If quantum system $i$ has been prepared in state $\ket{\bx_i}$ for $i=1,2$, their joint state would be $\ket{\bx_1}\otimes\ket{\bx_2}$, where $\otimes$ is the Kronecker product. This is oftentimes represented as $\ket{\bx_1}\ket{\bx_2}$ or $\ket{\bx_1,\bx_2}$. The Kronecker product rule generalizes to the composition of $n$ systems. For example, $\ket{1}\ket{1}\ket{0}=\be_1\otimes \be_1\otimes \be_0=\be_6=\ket{110}$, where the canonical vectors shown in the middle are in $\mathbb{R}^2$ and those at the end are in $\mathbb{R}^8$. \section{Variational Quantum Eigensolver (VQE)}\label{sec:vqe} VQE is a heuristic approach to find near-optimal solutions for combinatorial problems of the general form \begin{equation}\label{eq:problem} \min_{\bb\in\{0,1\}^n} f(\bb). \end{equation} A particular example of interest is the quadratic unconstrained binary optimization (QUBO) problem with \begin{equation}\label{eq:qubo} f(\bb)=\bb^\top\bA\bb +\bb^\top \bc+d \end{equation} which is known to be NP-hard. For later developments, it is convenient to reformulate QUBO in terms of the \emph{spin} $\{\pm1\}$ variables through the transformation \begin{equation}\label{eq:trans} s_i=1-2b_i=(-1)^{b_i}~~\text{for}~~i=0,\ldots,n-1. \end{equation} Collecting the spin variables in vector $\bs=\bone-2\bb$, the quadratic objective can be equivalently expressed as \begin{equation}\label{eq:qubo2} f(\bb)=\bar{f}(\bs)=\bs^\top\bbA\bs +\bs^\top \bbc+\bar{d} \end{equation} where $\bbA:=\tfrac{1}{4}\bA$; $\bbc:=-\frac{1}{2}(\bA\bone+\bc)$; and $\bar{d}:=\tfrac{1}{4}\bone^\top\bA\bone+\tfrac{1}{2}\bone^\top\bc+d$. We next explain how VQE samples high-quality solutions of~\eqref{eq:problem} by solving an eigenvalue minimization task. The VQE method falls under the family of \emph{variational} quantum algorithms. The term \emph{variational} pertains to the fact that the quantum circuit is not fixed, but parameterized by relatively few parameters collected in vector $\btheta\in\mathbb{R}^P$. These parameters are iteratively adjusted by classical computer in a closed-loop fashion so that the quantum system eventually reaches a desirable state. The process resembles the training of a neural network whose weights are updated by an optimization algorithm. Similarly to neural networks where the learner has to select an architecture (e.g., network depth/width and type of activations), the parameterized form (also termed \emph{ansatz}) of the variational quantum circuit is specified \emph{a priori}. We will be using a 2-local ansatz where single-qubit $R_Y$ gates are applied to all qubits, followed by a full entanglement circuit, all repeated for 3 layers (iterations)~\cite{Simeone}. Given $\btheta$ and driven by input $\ket{0}^n$, the quantum circuit produces at its output the quantum state $\ket{\bx(\btheta)}=\bU(\btheta)\ket{0}^n$ for a unitary $N\times N$ matrix $\bU(\btheta)$. To simplify notation, we will oftentimes write $\ket{\bx}$ in lieu of $\ket{\bx(\btheta)}$. Albeit $\ket{\bx}\in \mathbb{C}^N$ is exponentially long, it can be easily generated by the quantum circuit though it cannot be read out of the circuit as a vector in a computationally efficient manner. Instead, it is relatively easy to sample from it. Every time we run the quantum circuit driven by $\ket{0}^n$, we will be observing one of the binary outputs $\ket{k}=\ket{\be_k}$ with probability $p_k:=|x_k|^2$ for $k=0,\ldots,N-1$. The quantum circuit thus serves as an efficient sampler from the exponentially large probability mass function (PMF) $\{p_k\}_{k=0}^{N-1}$. To exploit this sampling property, we next relate the cost $f(\bb)$ with a so-termed \emph{Hamiltonian} matrix $\bH$ so that \begin{equation}\label{eq:eigenproperty \bH\ket{\be_k}=f(\ket{k})\ket{\be_k}\quad \text{for all}~k. \end{equation} Matrix $\bH$ is apparently diagonal and carries all $N$ function evaluations $f(\be_k)$ on its diagonal. Moreover, the canonical vectors $\be_k$ constitute the eigenvectors of $\bH$, each with corresponding eigenvalue $f(\ket{k})$. Therefore, the minimization in~\eqref{eq:problem} can be reformulated as the problem of finding the eigenvector corresponding to the minimum eigenvalue of $\bH$ \begin{equation}\label{eq:eigenproblem} \min_{\ket{\bx}} \bra{\bx}\bH\ket{\bx}. \end{equation} As long as $\ket{\bx}$ is allowed to take any of the values $\{\be_k\}_{k=0}^{N-1}$, the minimizer of \eqref{eq:eigenproblem} corresponds to the minimizer of \eqref{eq:problem}. For example, if a quantum system has $n=3$ qubits, its state would be $\ket{\bx}\in\mathbb{C}^8$. Here $\be_k$'s are the columns of the identity matrix $\bI_8$. If the minimizer of \eqref{eq:eigenproblem} is $\ket{\be_5}=\ket{b_1b_2b_3}=\ket{101}$, then the minimizer of \eqref{eq:problem} is $\bb=[1~0~1]^\top$; and vice versa. Although $\bH$ is exponentially large, it can be implemented using only $\mcO(n^2)$ quantum gates since it can be expressed as \begin{equation}\label{eq:H} \bH=\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}\bar{A}_{ij}\bZ_i\bZ_j +\sum_{i=0}^{n-1}\bar{c}_{i}\bZ_i +\bar{d}\bI_N \end{equation} where the $N\times N$ Hermitian matrix $\bZ_i$ is defined as \begin{equation* \bZ_i=\bI_2\otimes\cdots\otimes\bZ\otimes\cdots\otimes\bI_2~~\text{with}~~ \bZ=\left[\begin{array}{cc} 1 &0\\ 0 &-1 \end{array}\right]. \end{equation*} This is a Kronecker product involving $(n-1)$ identity matrices $\bI_2$ and one \emph{Pauli-Z} operator $\bZ$ applied to the $i$-th qubit. Matrix $\bH$ as defined in \eqref{eq:H} is obviously diagonal. To establish \eqref{eq:eigenproperty}, note first that $\bZ\ket{0}=\ket{0}$ and $\bZ\ket{1}=-\ket{1}$, or more compactly, $\bZ\ket{b}=(-1)^b\ket{b}$. Consequently, when $\bZ_i$ is applied to a state $\ket{\bb}=\ket{b_1b_2\cdots b_n}$, the effect is $\bZ_i\ket{\bb}=(-1)^{b_i}\ket{\bb}=s_i\ket{\bb}$ from \eqref{eq:trans}. Similarly, it also holds that $\bZ_i\bZ_j\ket{\bb}=s_is_j\ket{\bb}$. Property~\eqref{eq:eigenproperty} now follows immediately by postmultiplying \eqref{eq:H} by any $\ket{\be_k}$ and using $f(\bb)=\bar{f}(\bs)$. If $\ket{\bx}$ in \eqref{eq:eigenproblem} is restricted to set $\mcE:=\{\be_k\}_{k=0}^{N-1}$, problem \eqref{eq:eigenproblem} is as hard as \eqref{eq:problem}. VQE relaxes \eqref{eq:eigenproblem} to the set of all quantum states $\ket{\bx(\btheta)}$ that can be parameterized by the chosen ansatz and via $\btheta$. Problem~\eqref{eq:eigenproblem} is then solved over $\btheta$ rather than $\ket{\bx}$ \begin{equation}\label{eq:eigenproblem2} \min_{\btheta}~F(\btheta):=\braket{\bx(\btheta) | \bH | \bx(\btheta)}. \end{equation} From the eigenvalue property \eqref{eq:eigenproperty}, it follows $\bra{\be_n}\bH\ket{\be_k}=f(\ket{k})$ for all $k$. How about $\bra{\bx}\bH\ket{\bx}$ for a general state $\ket{\bx}$? Because $\ket{\bx}=\sum_{k=0}^{N-1}x_k\ket{\be_k}$, it is easy to show that \begin{equation} \braket{\bx | \bH | \bx}=\sum_{k=0}^{N-1}|x_k|^2 f(\ket{k})=\sum_{k=0}^{N-1}p_k f(\ket{k}). \end{equation} In other words, function $F(\btheta)$ is the average of $f$ under the PMF defined by $\ket{\bx}$. For instance, the random outcome $\ket{k}=\ket{101}$ occurring with probability $|x_5|^2$ is assigned to the random variable $f$ taking the value $f([1~0~1]^\top)$. Hence, function $F(\btheta)$ is really an expectation (an \emph{observable} in the quantum computation parlance) of function $f(\bb)$ when $\bb$ is drawn from the PMF $\{|x_k(\theta)|^2\}_{k=0}^{N-1}$. Ideally, the global minimizer $\btheta$ of \eqref{eq:eigenproblem2} defines a PMF via $\ket{\bx(\btheta)}$ that samples with non-zero probability only the canonical vectors $\ket{\be_k}$ associated with the smallest eigenvalue of $\bH$. Problem~\eqref{eq:eigenproblem2} is solved in a hybrid fashion: The quantum computer samples from $\ket{\bx(\btheta)}$ and estimates $F(\btheta)$ and possibly its gradient $\nabla_{\btheta} F$. A classical computer uses the previous information and iteratively updates $\btheta$ based on a zero- or first-order optimization algorithm, such as gradient descent or Bayesian optimization. As with training neural networks, $F(\btheta)$ is nonconvex due to the form of the ansatz. Moreover, the ensemble statistic $F(\btheta)$ cannot be computed exactly, but estimated as the sample average $\hat{F}(\btheta):=\sum_{r=1}^R f(\bb_r)/R$ over $R$ runs, where $\bb_r$ is the quantum output after run $r$. \section{CONSTRAINED VQE}\label{sec:cVQE} As discussed earlier, VQE provides a successful heuristic for solving QUBO through the variational formulation of \eqref{eq:eigenproblem2}. Can VQE be generalized to deal with a binary QCQP of the ensuing form? \begin{align}\label{eq:cproblem} \min_{\bb\in\{0,1\}^n}~&~f_0(\bb)\\ \mathrm{s.to}~&~f_m(\bb)\leq 0,\quad m=1:M.\nonumber \end{align} Here $f_m(\bb):=\bb^\top\bA_m\bb+\bb^\top\bc_m+d_m$ for $m=0,\ldots,M$. Solving such problems is also known to be NP-hard. Providing a quantum heuristic to directly deal with \eqref{eq:cproblem} seems to be challenging. To this end, we relax expectations and aim at designing a quantum state $\ket{\bx}$ from which we can draw binary-valued $\bb$ that solve the \emph{stochastic} binary QCQP: \begin{align}\label{eq:sampling} \min_{\ket{\bx}}~&~\mathbb{E}_{\bx}[f_0(\bb)]\\ \mathrm{s.to}~&~\mathbb{E}_{\bx}[f_m(\bb)]\leq 0,\quad m=1:M.\nonumber \end{align} As in the unconstrained setup, rather than minimizing over $\ket{\bx}$, we propose optimizing over a PMF parameterized by $\btheta$ and captured by quantum state $\ket{\bx(\btheta)}$. Specifically, we suggest solving the constrained minimization \begin{align}\label{eq:ceigenproblem} \min_{\btheta}~&~F_0(\btheta)\\ \mathrm{s.to}~&~F_m(\btheta)\leq 0:\quad \lambda_m,\quad m=1:M\nonumber \end{align} where each observable $F_m(\btheta):=\braket{\bx(\btheta)|\bH_m |\bx(\btheta)}$ depends on the Hamiltonian $\bH_m$ defined similar to $\bH$ in \eqref{eq:H} for all $m$. Heed that problem~\eqref{eq:ceigenproblem} can be reformulated and solved as a linear program (LP) over the PMF of $\bb$. Nonetheless, that requires evaluating $\{f_m(\bb)\}_{m=0}^M$ for all $2^n$ values of $\bb$. Moreover, the optimization variable of this LP is the vector of PMF values that is exponentially large too. That is also the case with standard VQE/QAOA. Contrary to \eqref{eq:cproblem}, problem \eqref{eq:ceigenproblem} is over the continuous variable $\btheta$, and thus, we can associate a dual variable $\lambda_m$ for each constraint and define its Lagrangian function \begin{equation}\label{eq:Lagrangian} L(\btheta;\blambda):=F_0(\btheta)+\sum_{m=1}^M \lambda_m F_m(\btheta) \end{equation} where $\blambda\in\mathbb{R}^M$ collects all dual variables. Problem \eqref{eq:ceigenproblem} could be solved via \emph{dual decomposition}, according to which $\blambda$ is updated iteratively via a subgradient ascent step on $L$ as \begin{equation}\label{eq:du} \lambda_m^{t+1}:=\max\left\{\lambda_m^t+\mu_t F_m(\btheta^t),0\right\},~~ m=1:M \end{equation} for a positive step size $\mu_t=\mu_0/(t+\alpha)$ with $\alpha>0$, and $\btheta^t$ is a minimizer of the Lagrangian $L(\btheta;\blambda^t)$ evaluated at $\blambda^t$: \begin{equation}\label{eq:op} \btheta^t\in \arg\min_{\btheta} \braket{\bx(\btheta) |\bH_0+\sum_{m=1}^M\lambda_m^t \bH_m|\bx(\btheta)}. \end{equation} Problem~\eqref{eq:op} takes the QUBO form of \eqref{eq:eigenproblem2}, and is therefore amenable to standard VQE or even the celebrated QAOA approach. Under the latter, the ansatz takes a particular form that depends on the problem Hamiltonian $\bH_0+\sum_{m=1}^M\lambda_m^t \bH_m$. Here, we used a problem-independent ansatz under the general VQE framework and leave QAOA for future work. \section{NUMERICAL TESTS}\label{sec:tests} The novel solver for~\eqref{eq:ceigenproblem} was implemented in Python using the Qiskit library~\cite{Qiskit}. The \emph{VQE} class in Qiskit was used to solve the minimization for the primal update~\eqref{eq:op}. In addition to providing the ansatz described in Section~\ref{sec:vqe}, the VQE class was configured with the `SLSQP' optimizer. The maximum number of iterations was set to $1,000$, and we used the \texttt{aer\_simulator\_statevector} quantum simulation backend. For the dual update in~\eqref{eq:du}, constraint violations were measured over the observables $\bH_m$ using the minimum eigenstate returned by VQE. The stopping criteria $\|\blambda^{t}-\blambda^{t-1}\|_2\leq1\cdot10^{-5}$ was utilized to ascertain the convergence of the dual updates~\eqref{eq:du}. To illustrate the application of the proposed strategy to solving the stochastic binary QCQP in~\eqref{eq:sampling}, several $2$-bit problem instances were sampled randomly by drawing the entries of $\{\bA_0,\bc_0,\bd_0\}$ and $\{\bA_1,\bc_1,\bd_1\}$ from the standard normal distribution, while ensuring the resulting problem was feasible. The VQE approach was compared against a linear program that finds a PMF solving~\eqref{eq:ceigenproblem}; this was possible due to the small value of $2^n$. For the two approaches, the obtained PMFs along with the associated dual variables are reported in Table~1 for 4 randomly sampled problem instances. \begin{table}[t]\label{mytable} \centering \caption{Comparing the exact solution of~\eqref{eq:ceigenproblem} obtained via a linear program and the proposed quantum-based approach.} \vspace*{1em} \begin{tabular}{|r|rr|rr|} \hline\hline \multicolumn{1}{|c|}{\multirow{2}{*} {{\#}}} & \multicolumn{2}{c|}{\textbf{Found PMF}} & \multicolumn{2}{c|}{\textbf{Dual}} \\ \cline{2-5} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{{Quantum}} & \multicolumn{1}{c|}{{LP}} & \multicolumn{1}{c|}{{Quantum}} & \multicolumn{1}{c|}{{LP}} \\ \hline\hline {1} & \multicolumn{1}{l|}{$[0.44, 0, 0.56, 0]$} & {$[0.44, 0, 0.56, 0]$} & \multicolumn{1}{l|}{$0.854$} & $0.851 $ \\ \hline {2} & \multicolumn{1}{l|}{$[0.71, 0, 0.29, 0]$} & {$[0.70, 0, 0.30, 0]$} & \multicolumn{1}{l|}{$0.337$} & $0.337$ \\ \hline {3} & \multicolumn{1}{l|}{$[0, 0.80, 0, 0.20]$} & {$[0, 0.80, 0, 0.20]$} & \multicolumn{1}{l|}{$0.459$} & $0.459$ \\ \hline {4} & \multicolumn{1}{l|}{$[0, 0, 0.61, 0.39]$} & {$[0, 0, 0.60, 0.40]$} & \multicolumn{1}{l|}{$0.566$} & $0.566$ \\ \hline\hline \end{tabular} \end{table} To study the scalability of the approach and to verify the compatibility of the solutions with the deterministic QCQP in~\eqref{eq:cproblem}, we also sampled $30$ feasible 5-bit problem instances with three constraints each. The quadratic cost and constraint functions were generated as in the previous test. To avoid instances with non-binding constraints, the constants $d_m$ in the constraint functions were manually adjusted so that at least one of the constraints was active and yielded a non-zero dual variable. From the sampled problems, it was found that the dual decomposition involving VQE was able to produce the optimal solutions for 28 out of the 30 problem instances tested, whereas infeasible binary candidates were obtained for the remaining 2 instances. Figure~\ref{fig:dual_conv} illustrates the convergence of the dual variables for one of the problem instances, where all three constraints were found to be active. \begin{figure}[t] \centering \includegraphics[scale=0.5]{dual_convergence.png} \caption{Convergence of dual variables under dual updates~\eqref{eq:du} for a stochastic binary QCQP with $M=3$ constraints.} \label{fig:dual_conv} \end{figure} \section{CONCLUSIONS}\label{sec:conclusions} A novel generalization of VQE to address the need for dealing with stochastic binary QCQPs has been developed. Leveraging dual decomposition, the approach entails solving a sequence of judiciously modified VQE tasks. Numerical tests demonstrate that upon convergence of the constrained VQE algorithm, the variational quantum circuit is able to sample from a stochastic policy to generate binary-valued vectors that minimize the binary QCQP and satisfy its constraints in expectation. Some of these samples seem to be feasible for the deterministic binary QCQP too. This novel heuristic sets the foundation for further developments towards constrained discrete optimization. We are currently exploring several exciting directions: \emph{i)} Coupling this approach with QAOA rather than VQE; \emph{ii)} skipping the nested optimization in \eqref{eq:op} through a primal-dual decomposition alternative as in~\cite{GMDK21,OPFandLearn}; and \emph{iii)} dealing with mixed-binary setups. \balance \vfill\pagebreak \bibliographystyle{IEEEbib} \section{INTRODUCTION}\label{sec:intro} Quantum computers exhibit an innate ability to handle exponentially large computations in a parallel fashion yet with a strong probabilistic flavor. Quantum algorithms such as Shor's integer factorization, Grover's search, and the linear system solver of Harrow-Hassidim-Lloyd (HHL) can attain polynomial or even exponential speedups over the best known algorithms on classical computers~\cite{nielsen00}. Nonetheless, some of these quantum algorithms presume a large number of qubits on fault-tolerant quantum computers. In the \emph{near-term intermediate scale} (NISQ) era, quantum computers are noisy and thus oftentimes limited in terms of number of gates and/or qubits. With such limitations in mind, \emph{variational} quantum algorithms have been suggested as promising tools to practically showcase quantum advantage in the NISQ setup~\cite{Simeone}. Variational quantum computers involve a sequence of parameterized gates. Their parameters are updated externally by a classical computer in a closed-loop fashion to steer the quantum state towards a desirable direction. The variational quantum eigensolver (VQE) used to provide high-quality solutions to combinatorial problems is a representative example. The Quantum Approximate Optimization Algorithm (QAOA)~\cite{Farhi14} is a special instance of VQE. In QAOA, not only the parameters but also the architecture of the quantum circuit become problem-dependent. The quantum circuit trained by QAOA operates as a sampler to efficiently generate near-optimal solutions of binary quadratic problems (e.g., MAXCUT); see~\cite{Hadfield19} for a summary of claims on QAOA. While most VQE/QAOA schemes target unconstrained problems, dealing with constraints is crucial to several applications in machine learning, wireless communications, and financial (stock trading) optimization. Adding constraints to QAOA or adiabetic quantum computing~\cite{McGeoch} (the QAOA counterpart for non-gate-based quantum computers) has been pursued in two ways. One approach has been to convert the constrained problem into an unconstrained minimization of a Lagrangian-like function~\cite{Lucas,Ohzeki}. However, the weights for constraint penalties can be safely selected only if constraints are expressed as Boolean functions or linear equalities. An alternative approach modifies the architecture of the quantum circuit (via the mixer Hamiltonian of QAOA) to confine quantum states on the subspace spanned by constraints~\cite{HenSarandy,HenSpedalieri,Hadfield19,Hadfield17}. Nonetheless, constructing such `driver' mixer Hamiltonians is again highly problem-dependent and often limited to equality constraints. Reference~\cite{Ronagh} develops a quantum adiabetic approach to tackle binary linearly-constrained quadratic programs. It targets the dual problem and interfaces the quantum computer with a branch-and-bound scheme ran classically. Reference~\cite{GambellaSimonetto} treats mixed-binary quadratic-plus-convex problems using the alternating direction method of multipliers (ADMM) to split binary and continuous variables into separate minimizations, solved by QAOA and classical convex optimizers respectively per ADMM iteration. \emph{Relation to prior work.} Addressing binary QCQPs by quantum heuristics has been largely unexplored to the authors' knowledge. We put forth a quantum-based heuristic to solve a stochastic binary QCQP. Harnessing the power of quantum circuits to sample from probability mass functions (PMF) that are hard to sample classically, we devise a dual decomposition technique that solves a sequence of standard VQE tasks to systematically adjust Lagrangian multipliers. Numerical tests using quantum computer simulators provided by IBM evaluate this technique on randomly generated stochastic and deterministic binary QCQPs. \vspace*{-1em} \section{Quantum Computing Preliminaries}\label{sec:qc} A quantum system consisting of $n$ quantum bits (qubits) is described by an exponentially large state vector $\ket{\bx}\in\mathbb{C}^N$ with $N=2^n$ assuming the system is in a \emph{pure state}. The Dirac notation $\ket{\bx}$ named \emph{ket} emphasizes that vector $\bx$ is unit-norm or $\sum_{k=0}^{N-1}|x_k|^2=1$. If $\be_k$ is the $k$-th canonical vector of length $N$, we can write $\ket{\bx}=\sum_{k=0}^{N-1}x_k\ket{\be_k}$. The vector $\be_k$ is oftentimes alternatively expressed as $\ket{\be_k}=\ket{k}$, where $k$ is the binary representation of index $k$. For example, a system with $n=2$ qubits has a state in $\mathbb{C}^4$, which is spanned by canonical vectors $\{\be_k\}_{k=0}^3$ and $\be_0=[1~0~0~0]^\top=\ket{00}$. Vector $\ket{\bx}$ provides a statistical characterization for the quantum state: If we measure the quantum system output, its qubits will be in configuration $\ket{k}$ with probability $|x_k|^2$ for all $k$. Symbol $\bra{\bx}$ termed \emph{bra} denotes the conjugate transpose of $\ket{\bx}$, while the \emph{braket} $\braket{\bx | \by}$ denotes the inner product between states. The fundamental operations we can perform on a quantum system is evolution and measurement. The former can be described by the application of a unitary $\bU$ on state $\ket{\bx}$ to produce state $\ket{\by}=\bU\ket{\bx}$. Although $\bU$ is exponentially large, it is usually implemented efficiently using quantum gates. Among various types of measurements, we focus on \emph{projective measurements}. A projective measurement is associated with a Hermitian matrix (named \emph{observable}) and its eigenvalue decomposition $\bH=\sum_{m=1}^M\lambda_m\bv_m\bv_m^H$. If such measurement is performed on $\ket{\bx}$, outcome $m$ is observed with probability $p_m:=|\braket{\bx | \bv_m}|^2$. Define a random variable taking value $\lambda_m$ when outcome $m$ is observed. The expected value of this variable is $\braket{\bx | \bH | \bx}=\sum_{m=1}^M p_m \lambda_m$. If $\bH$ is diagonal, the measurement is on the \emph{computational basis}. This is practically important because now $\bv_m=\be_m$, outcome $m$ relates to $\ket{m}$, and each qubit can be measured individually. If quantum system $i$ has been prepared in state $\ket{\bx_i}$ for $i=1,2$, their joint state would be $\ket{\bx_1}\otimes\ket{\bx_2}$, where $\otimes$ is the Kronecker product. This is oftentimes represented as $\ket{\bx_1}\ket{\bx_2}$ or $\ket{\bx_1,\bx_2}$. The Kronecker product rule generalizes to the composition of $n$ systems. For example, $\ket{1}\ket{1}\ket{0}=\be_1\otimes \be_1\otimes \be_0=\be_6=\ket{110}$, where the canonical vectors shown in the middle are in $\mathbb{R}^2$ and those at the end are in $\mathbb{R}^8$. \section{Variational Quantum Eigensolver (VQE)}\label{sec:vqe} VQE is a heuristic approach to find near-optimal solutions for combinatorial problems of the general form \begin{equation}\label{eq:problem} \min_{\bb\in\{0,1\}^n} f(\bb). \end{equation} A particular example of interest is the quadratic unconstrained binary optimization (QUBO) problem with \begin{equation}\label{eq:qubo} f(\bb)=\bb^\top\bA\bb +\bb^\top \bc+d \end{equation} which is known to be NP-hard. For later developments, it is convenient to reformulate QUBO in terms of the \emph{spin} $\{\pm1\}$ variables through the transformation \begin{equation}\label{eq:trans} s_i=1-2b_i=(-1)^{b_i}~~\text{for}~~i=0,\ldots,n-1. \end{equation} Collecting the spin variables in vector $\bs=\bone-2\bb$, the quadratic objective can be equivalently expressed as \begin{equation}\label{eq:qubo2} f(\bb)=\bar{f}(\bs)=\bs^\top\bbA\bs +\bs^\top \bbc+\bar{d} \end{equation} where $\bbA:=\tfrac{1}{4}\bA$; $\bbc:=-\frac{1}{2}(\bA\bone+\bc)$; and $\bar{d}:=\tfrac{1}{4}\bone^\top\bA\bone+\tfrac{1}{2}\bone^\top\bc+d$. We next explain how VQE samples high-quality solutions of~\eqref{eq:problem} by solving an eigenvalue minimization task. The VQE method falls under the family of \emph{variational} quantum algorithms. The term \emph{variational} pertains to the fact that the quantum circuit is not fixed, but parameterized by relatively few parameters collected in vector $\btheta\in\mathbb{R}^P$. These parameters are iteratively adjusted by classical computer in a closed-loop fashion so that the quantum system eventually reaches a desirable state. The process resembles the training of a neural network whose weights are updated by an optimization algorithm. Similarly to neural networks where the learner has to select an architecture (e.g., network depth/width and type of activations), the parameterized form (also termed \emph{ansatz}) of the variational quantum circuit is specified \emph{a priori}. We will be using a 2-local ansatz where single-qubit $R_Y$ gates are applied to all qubits, followed by a full entanglement circuit, all repeated for 3 layers (iterations)~\cite{Simeone}. Given $\btheta$ and driven by input $\ket{0}^n$, the quantum circuit produces at its output the quantum state $\ket{\bx(\btheta)}=\bU(\btheta)\ket{0}^n$ for a unitary $N\times N$ matrix $\bU(\btheta)$. To simplify notation, we will oftentimes write $\ket{\bx}$ in lieu of $\ket{\bx(\btheta)}$. Albeit $\ket{\bx}\in \mathbb{C}^N$ is exponentially long, it can be easily generated by the quantum circuit though it cannot be read out of the circuit as a vector in a computationally efficient manner. Instead, it is relatively easy to sample from it. Every time we run the quantum circuit driven by $\ket{0}^n$, we will be observing one of the binary outputs $\ket{k}=\ket{\be_k}$ with probability $p_k:=|x_k|^2$ for $k=0,\ldots,N-1$. The quantum circuit thus serves as an efficient sampler from the exponentially large probability mass function (PMF) $\{p_k\}_{k=0}^{N-1}$. To exploit this sampling property, we next relate the cost $f(\bb)$ with a so-termed \emph{Hamiltonian} matrix $\bH$ so that \begin{equation}\label{eq:eigenproperty \bH\ket{\be_k}=f(\ket{k})\ket{\be_k}\quad \text{for all}~k. \end{equation} Matrix $\bH$ is apparently diagonal and carries all $N$ function evaluations $f(\be_k)$ on its diagonal. Moreover, the canonical vectors $\be_k$ constitute the eigenvectors of $\bH$, each with corresponding eigenvalue $f(\ket{k})$. Therefore, the minimization in~\eqref{eq:problem} can be reformulated as the problem of finding the eigenvector corresponding to the minimum eigenvalue of $\bH$ \begin{equation}\label{eq:eigenproblem} \min_{\ket{\bx}} \bra{\bx}\bH\ket{\bx}. \end{equation} As long as $\ket{\bx}$ is allowed to take any of the values $\{\be_k\}_{k=0}^{N-1}$, the minimizer of \eqref{eq:eigenproblem} corresponds to the minimizer of \eqref{eq:problem}. For example, if a quantum system has $n=3$ qubits, its state would be $\ket{\bx}\in\mathbb{C}^8$. Here $\be_k$'s are the columns of the identity matrix $\bI_8$. If the minimizer of \eqref{eq:eigenproblem} is $\ket{\be_5}=\ket{b_1b_2b_3}=\ket{101}$, then the minimizer of \eqref{eq:problem} is $\bb=[1~0~1]^\top$; and vice versa. Although $\bH$ is exponentially large, it can be implemented using only $\mcO(n^2)$ quantum gates since it can be expressed as \begin{equation}\label{eq:H} \bH=\sum_{i=0}^{n-1}\sum_{j=0}^{n-1}\bar{A}_{ij}\bZ_i\bZ_j +\sum_{i=0}^{n-1}\bar{c}_{i}\bZ_i +\bar{d}\bI_N \end{equation} where the $N\times N$ Hermitian matrix $\bZ_i$ is defined as \begin{equation* \bZ_i=\bI_2\otimes\cdots\otimes\bZ\otimes\cdots\otimes\bI_2~~\text{with}~~ \bZ=\left[\begin{array}{cc} 1 &0\\ 0 &-1 \end{array}\right]. \end{equation*} This is a Kronecker product involving $(n-1)$ identity matrices $\bI_2$ and one \emph{Pauli-Z} operator $\bZ$ applied to the $i$-th qubit. Matrix $\bH$ as defined in \eqref{eq:H} is obviously diagonal. To establish \eqref{eq:eigenproperty}, note first that $\bZ\ket{0}=\ket{0}$ and $\bZ\ket{1}=-\ket{1}$, or more compactly, $\bZ\ket{b}=(-1)^b\ket{b}$. Consequently, when $\bZ_i$ is applied to a state $\ket{\bb}=\ket{b_1b_2\cdots b_n}$, the effect is $\bZ_i\ket{\bb}=(-1)^{b_i}\ket{\bb}=s_i\ket{\bb}$ from \eqref{eq:trans}. Similarly, it also holds that $\bZ_i\bZ_j\ket{\bb}=s_is_j\ket{\bb}$. Property~\eqref{eq:eigenproperty} now follows immediately by postmultiplying \eqref{eq:H} by any $\ket{\be_k}$ and using $f(\bb)=\bar{f}(\bs)$. If $\ket{\bx}$ in \eqref{eq:eigenproblem} is restricted to set $\mcE:=\{\be_k\}_{k=0}^{N-1}$, problem \eqref{eq:eigenproblem} is as hard as \eqref{eq:problem}. VQE relaxes \eqref{eq:eigenproblem} to the set of all quantum states $\ket{\bx(\btheta)}$ that can be parameterized by the chosen ansatz and via $\btheta$. Problem~\eqref{eq:eigenproblem} is then solved over $\btheta$ rather than $\ket{\bx}$ \begin{equation}\label{eq:eigenproblem2} \min_{\btheta}~F(\btheta):=\braket{\bx(\btheta) | \bH | \bx(\btheta)}. \end{equation} From the eigenvalue property \eqref{eq:eigenproperty}, it follows $\bra{\be_n}\bH\ket{\be_k}=f(\ket{k})$ for all $k$. How about $\bra{\bx}\bH\ket{\bx}$ for a general state $\ket{\bx}$? Because $\ket{\bx}=\sum_{k=0}^{N-1}x_k\ket{\be_k}$, it is easy to show that \begin{equation} \braket{\bx | \bH | \bx}=\sum_{k=0}^{N-1}|x_k|^2 f(\ket{k})=\sum_{k=0}^{N-1}p_k f(\ket{k}). \end{equation} In other words, function $F(\btheta)$ is the average of $f$ under the PMF defined by $\ket{\bx}$. For instance, the random outcome $\ket{k}=\ket{101}$ occurring with probability $|x_5|^2$ is assigned to the random variable $f$ taking the value $f([1~0~1]^\top)$. Hence, function $F(\btheta)$ is really an expectation (an \emph{observable} in the quantum computation parlance) of function $f(\bb)$ when $\bb$ is drawn from the PMF $\{|x_k(\theta)|^2\}_{k=0}^{N-1}$. Ideally, the global minimizer $\btheta$ of \eqref{eq:eigenproblem2} defines a PMF via $\ket{\bx(\btheta)}$ that samples with non-zero probability only the canonical vectors $\ket{\be_k}$ associated with the smallest eigenvalue of $\bH$. Problem~\eqref{eq:eigenproblem2} is solved in a hybrid fashion: The quantum computer samples from $\ket{\bx(\btheta)}$ and estimates $F(\btheta)$ and possibly its gradient $\nabla_{\btheta} F$. A classical computer uses the previous information and iteratively updates $\btheta$ based on a zero- or first-order optimization algorithm, such as gradient descent or Bayesian optimization. As with training neural networks, $F(\btheta)$ is nonconvex due to the form of the ansatz. Moreover, the ensemble statistic $F(\btheta)$ cannot be computed exactly, but estimated as the sample average $\hat{F}(\btheta):=\sum_{r=1}^R f(\bb_r)/R$ over $R$ runs, where $\bb_r$ is the quantum output after run $r$. \section{CONSTRAINED VQE}\label{sec:cVQE} As discussed earlier, VQE provides a successful heuristic for solving QUBO through the variational formulation of \eqref{eq:eigenproblem2}. Can VQE be generalized to deal with a binary QCQP of the ensuing form? \begin{align}\label{eq:cproblem} \min_{\bb\in\{0,1\}^n}~&~f_0(\bb)\\ \mathrm{s.to}~&~f_m(\bb)\leq 0,\quad m=1:M.\nonumber \end{align} Here $f_m(\bb):=\bb^\top\bA_m\bb+\bb^\top\bc_m+d_m$ for $m=0,\ldots,M$. Solving such problems is also known to be NP-hard. Providing a quantum heuristic to directly deal with \eqref{eq:cproblem} seems to be challenging. To this end, we relax expectations and aim at designing a quantum state $\ket{\bx}$ from which we can draw binary-valued $\bb$ that solve the \emph{stochastic} binary QCQP: \begin{align}\label{eq:sampling} \min_{\ket{\bx}}~&~\mathbb{E}_{\bx}[f_0(\bb)]\\ \mathrm{s.to}~&~\mathbb{E}_{\bx}[f_m(\bb)]\leq 0,\quad m=1:M.\nonumber \end{align} As in the unconstrained setup, rather than minimizing over $\ket{\bx}$, we propose optimizing over a PMF parameterized by $\btheta$ and captured by quantum state $\ket{\bx(\btheta)}$. Specifically, we suggest solving the constrained minimization \begin{align}\label{eq:ceigenproblem} \min_{\btheta}~&~F_0(\btheta)\\ \mathrm{s.to}~&~F_m(\btheta)\leq 0:\quad \lambda_m,\quad m=1:M\nonumber \end{align} where each observable $F_m(\btheta):=\braket{\bx(\btheta)|\bH_m |\bx(\btheta)}$ depends on the Hamiltonian $\bH_m$ defined similar to $\bH$ in \eqref{eq:H} for all $m$. Heed that problem~\eqref{eq:ceigenproblem} can be reformulated and solved as a linear program (LP) over the PMF of $\bb$. Nonetheless, that requires evaluating $\{f_m(\bb)\}_{m=0}^M$ for all $2^n$ values of $\bb$. Moreover, the optimization variable of this LP is the vector of PMF values that is exponentially large too. That is also the case with standard VQE/QAOA. Contrary to \eqref{eq:cproblem}, problem \eqref{eq:ceigenproblem} is over the continuous variable $\btheta$, and thus, we can associate a dual variable $\lambda_m$ for each constraint and define its Lagrangian function \begin{equation}\label{eq:Lagrangian} L(\btheta;\blambda):=F_0(\btheta)+\sum_{m=1}^M \lambda_m F_m(\btheta) \end{equation} where $\blambda\in\mathbb{R}^M$ collects all dual variables. Problem \eqref{eq:ceigenproblem} could be solved via \emph{dual decomposition}, according to which $\blambda$ is updated iteratively via a subgradient ascent step on $L$ as \begin{equation}\label{eq:du} \lambda_m^{t+1}:=\max\left\{\lambda_m^t+\mu_t F_m(\btheta^t),0\right\},~~ m=1:M \end{equation} for a positive step size $\mu_t=\mu_0/(t+\alpha)$ with $\alpha>0$, and $\btheta^t$ is a minimizer of the Lagrangian $L(\btheta;\blambda^t)$ evaluated at $\blambda^t$: \begin{equation}\label{eq:op} \btheta^t\in \arg\min_{\btheta} \braket{\bx(\btheta) |\bH_0+\sum_{m=1}^M\lambda_m^t \bH_m|\bx(\btheta)}. \end{equation} Problem~\eqref{eq:op} takes the QUBO form of \eqref{eq:eigenproblem2}, and is therefore amenable to standard VQE or even the celebrated QAOA approach. Under the latter, the ansatz takes a particular form that depends on the problem Hamiltonian $\bH_0+\sum_{m=1}^M\lambda_m^t \bH_m$. Here, we used a problem-independent ansatz under the general VQE framework and leave QAOA for future work. \section{NUMERICAL TESTS}\label{sec:tests} The novel solver for~\eqref{eq:ceigenproblem} was implemented in Python using the Qiskit library~\cite{Qiskit}. The \emph{VQE} class in Qiskit was used to solve the minimization for the primal update~\eqref{eq:op}. In addition to providing the ansatz described in Section~\ref{sec:vqe}, the VQE class was configured with the `SLSQP' optimizer. The maximum number of iterations was set to $1,000$, and we used the \texttt{aer\_simulator\_statevector} quantum simulation backend. For the dual update in~\eqref{eq:du}, constraint violations were measured over the observables $\bH_m$ using the minimum eigenstate returned by VQE. The stopping criteria $\|\blambda^{t}-\blambda^{t-1}\|_2\leq1\cdot10^{-5}$ was utilized to ascertain the convergence of the dual updates~\eqref{eq:du}. To illustrate the application of the proposed strategy to solving the stochastic binary QCQP in~\eqref{eq:sampling}, several $2$-bit problem instances were sampled randomly by drawing the entries of $\{\bA_0,\bc_0,\bd_0\}$ and $\{\bA_1,\bc_1,\bd_1\}$ from the standard normal distribution, while ensuring the resulting problem was feasible. The VQE approach was compared against a linear program that finds a PMF solving~\eqref{eq:ceigenproblem}; this was possible due to the small value of $2^n$. For the two approaches, the obtained PMFs along with the associated dual variables are reported in Table~1 for 4 randomly sampled problem instances. \begin{table}[t]\label{mytable} \centering \caption{Comparing the exact solution of~\eqref{eq:ceigenproblem} obtained via a linear program and the proposed quantum-based approach.} \vspace*{1em} \begin{tabular}{|r|rr|rr|} \hline\hline \multicolumn{1}{|c|}{\multirow{2}{*} {{\#}}} & \multicolumn{2}{c|}{\textbf{Found PMF}} & \multicolumn{2}{c|}{\textbf{Dual}} \\ \cline{2-5} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{{Quantum}} & \multicolumn{1}{c|}{{LP}} & \multicolumn{1}{c|}{{Quantum}} & \multicolumn{1}{c|}{{LP}} \\ \hline\hline {1} & \multicolumn{1}{l|}{$[0.44, 0, 0.56, 0]$} & {$[0.44, 0, 0.56, 0]$} & \multicolumn{1}{l|}{$0.854$} & $0.851 $ \\ \hline {2} & \multicolumn{1}{l|}{$[0.71, 0, 0.29, 0]$} & {$[0.70, 0, 0.30, 0]$} & \multicolumn{1}{l|}{$0.337$} & $0.337$ \\ \hline {3} & \multicolumn{1}{l|}{$[0, 0.80, 0, 0.20]$} & {$[0, 0.80, 0, 0.20]$} & \multicolumn{1}{l|}{$0.459$} & $0.459$ \\ \hline {4} & \multicolumn{1}{l|}{$[0, 0, 0.61, 0.39]$} & {$[0, 0, 0.60, 0.40]$} & \multicolumn{1}{l|}{$0.566$} & $0.566$ \\ \hline\hline \end{tabular} \end{table} To study the scalability of the approach and to verify the compatibility of the solutions with the deterministic QCQP in~\eqref{eq:cproblem}, we also sampled $30$ feasible 5-bit problem instances with three constraints each. The quadratic cost and constraint functions were generated as in the previous test. To avoid instances with non-binding constraints, the constants $d_m$ in the constraint functions were manually adjusted so that at least one of the constraints was active and yielded a non-zero dual variable. From the sampled problems, it was found that the dual decomposition involving VQE was able to produce the optimal solutions for 28 out of the 30 problem instances tested, whereas infeasible binary candidates were obtained for the remaining 2 instances. Figure~\ref{fig:dual_conv} illustrates the convergence of the dual variables for one of the problem instances, where all three constraints were found to be active. \begin{figure}[t] \centering \includegraphics[scale=0.5]{dual_convergence.png} \caption{Convergence of dual variables under dual updates~\eqref{eq:du} for a stochastic binary QCQP with $M=3$ constraints.} \label{fig:dual_conv} \end{figure} \section{CONCLUSIONS}\label{sec:conclusions} A novel generalization of VQE to address the need for dealing with stochastic binary QCQPs has been developed. Leveraging dual decomposition, the approach entails solving a sequence of judiciously modified VQE tasks. Numerical tests demonstrate that upon convergence of the constrained VQE algorithm, the variational quantum circuit is able to sample from a stochastic policy to generate binary-valued vectors that minimize the binary QCQP and satisfy its constraints in expectation. Some of these samples seem to be feasible for the deterministic binary QCQP too. This novel heuristic sets the foundation for further developments towards constrained discrete optimization. We are currently exploring several exciting directions: \emph{i)} Coupling this approach with QAOA rather than VQE; \emph{ii)} skipping the nested optimization in \eqref{eq:op} through a primal-dual decomposition alternative as in~\cite{GMDK21,OPFandLearn}; and \emph{iii)} dealing with mixed-binary setups. \balance \vfill\pagebreak \bibliographystyle{IEEEbib}
\section{Conclusion} In this paper, we investigate the feasibility of using Wi-Fi based street side determination of riders from a car to assist drivers to locate their riders. This method can potentially enable a smoother pick-up experience. Our approach uses a two-antenna Wi-Fi chipset for this purpose. After extracting CSI values, it computes relevant features by leveraging the motion of the car and utilizes a data-driven technique to determine the rider side on an embedded GPU in real-time. By performing extensive evaluation in the real-world in both LoS and nLoS conditions, we see CarFi\xspace achieves 95.44\% accuracy for estimating the rider side. The approach can potentially be very useful when self-driving cars and robotaxis hit the road. \balance \bibliographystyle{plain} \section{Introduction} As people rely on ride-hailing services, e.g., Uber and Lyft, it becomes increasingly important for drivers and riders to find each other without a hitch. Currently, drivers and riders use smartphones, which rely on GPS or cellular signals, to locate each other while far apart, and require them to recognize each other while nearby. However, in urban cities and areas like downtown, where there are numerous skyscrapers, GPS signals often do not work. In addition, there are places, e.g., in airports, where the drivers need to come indoors (such as parking garages) to pick up riders where the building structure blocks GPS signals. Also, it is challenging to locate the actual rider among many people in crowded environments like stadiums, airports, theatres, and bars. Moreover, the situation can worsen due to lack of visibility, e.g., at night and during bad weather (such as rain, storm, and snow). This issue wastes the time of the riders and drivers, causes more CO$_2$ emissions due to idle driving, causes frustration, and creates a bad user experience. A recent Uber study shows that every user agreed that they do not like to negotiate the pickup point, and 11 out of 16 users find it hard to give directions to the driver when the user is at a new place \cite{uber_study}. Based on our discussion with a few drivers and riders, we find that determining the street side of the rider is very crucial. This is because, if the car is on the other side of the street, the rider sometimes must cross the street, which can be unsafe. Also, the drivers do not want to make a U-turn and realize that they were on the right side in the first place, which leads to a double U-turn. So, we focus on determining the street side of the riders. Several solutions have been proposed to improve the rider pick-up experience. For example, the vehicle can use a camera and facial recognition~\cite{raji2021face} to identify the rider and subsequently compute the location. However, facial recognition requires the rider to upload his or her photo, which can be privacy-invasive. Moreover, for facial recognition to work, the rider needs to be within the camera's field of view and occupy enough pixels to be successfully recognized and have good lighting conditions. One can also ask the user to scan the surroundings with his or her phone, and then a server can perform 3D reconstruction~\cite{jin20203d} and matching~\cite{liu2017efficient} to the previously established real-world model to compute the exact location of the rider. However, this is a computation-intensive approach, and this method also requires the world to be digitized and constructed to allow such matching. As commercial products, Uber and Lyft have multicolored LED-based lights for riders to recognize their cars. However, such a solution does not work in broad daylight, and it is a rider-oriented solution, i.e., the rider has to find the car, and the driver does not have much information about the location/side of the rider. Our proposed solution overcomes these limitations. In this paper, we perform an exploratory study to understand the feasibility of using Wi-Fi to address this problem. We propose to utilize smartphones -- which the riders will mostly like to possess for the ride-hailing booking -- and Wi-Fi-enabled dashcams -- increasingly crucial for safety and legal purposes -- to determine the street side of the rider. We call our proposed system CarFi\xspace. CarFi\xspace neither requires the rider to upload any photos of him or her nor a photo of the surrounding area, which protects the rider's privacy, reduces the computation load, and does not depend on lighting conditions. To this end, CarFi\xspace uses Wi-Fi communications between the rider's smartphone and the dashcam onboard the vehicle. The usage of the dashcam is for the purpose of standalone devices that can be installed on any vehicle, but the proposed system does not exclude vehicles that have Wi-Fi already installed to localize the rider. CarFi\xspace uses a two-antenna Wi-Fi chipset embedded in the dashcam to receive the Wi-Fi packets sent by the smartphone held by the rider. This system does not require any modification to the vehicle and the smartphone. The Wi-Fi packets can be generated by the ride-hailing app, which can share the phone's MAC address (or, a randomized MAC address) through the cloud/server to the vehicle (or, driver's app). Thus, the vehicle can listen to the packets generated from the target phone. The system on the vehicle extracts the Channel State Information (CSI) data from the Wi-Fi chipset. After some preprocessing, it performs sub-carrier selection. Then, it extracts relevant features (amplitude difference between antennas, multipath profile, power delay profile) for rider-side determination. Then, the contextual and motion-related features are encoded into a data-driven model (LSTM) to classify whether the rider is on the right or the left side of the vehicle. Our approach only uses CSI amplitude and does not use CSI phase information. Thus, it avoids effort for phase calibration. This work has the following contributions: \begin{itemize} \item First, we perform a comprehensive exploratory analysis to understand the potential of using Wi-Fi CSI in an automotive environment for shared mobility applications. Our empirical study involves determining the set of features that can effectively work in an automotive environment in both line of sight (LoS) and non-line of sight (nLoS) conditions when a vehicle is being driven and encoding the features into the design and implementation of a data-driven model (LSTM) for estimating the side of the rider using only two antennas and CSI amplitude. Our CarFi\xspace system does not require privacy-invasive personal information from the rider such as a photo, avoids heavy computation on the server, and works in the dark. \item Second, we set up an infrastructure to collect Wi-Fi CSI from a moving vehicle with a drone-based system for annotating the ground truth location of the vehicle when each packet is received. We collect a dataset of 85 rides with over 568,000 Wi-Fi packets in a realistic and challenging environment, considering both LoS and nLoS, where other people and other parked vehicles block Wi-Fi signals. To the best of our knowledge, this is the first dataset to investigate how Wi-Fi CSI changes over time when the receiver is placed inside a moving car for shared mobility applications. \item Third, based on evaluation using data collected from the real-world, our results show that CarFi\xspace is 95.44\% accurate in classifying the rider side in both LoS and nLoS conditions. We also implement several baseline solutions using phase difference and other features and show the superiority of our solution. We also evaluate the execution time of our approach in both powerful and embedded GPUs and show that our solution can be run on an embedded GPU in real-time. \end{itemize} \section{Usage} We describe a real-world usage scenario of CarFi\xspace in this chapter. When a passenger wants to travel to a specific location, he or she uses the ride-hailing app on the phone to book the trip. The server processes the request and finds the driver. The locations of the vehicle and the passenger are determined by their respective location providers, such as GPS on the phone. Once the trip is confirmed, the driver heads toward the passenger's location. As the driver arrives within a certain distance from the passenger based on the location data, the passenger's phone will transmit the WiFi packets at a higher packet rate as the ride-hailing app controls it. Meanwhile, the dashcam starts listening for WiFi packets containing the phone's MAC address. When CarFi\xspace system receives the WiFi packets, it extracts the CSI information and calculates the features. Then it estimates where the passenger is, and the driver can proceed to the correct location. If the driver can only park the vehicle at specific parking spots safely, the relative location can also guide the passenger toward the vehicle. \section{Background} \subsection{Angle of Arrival (AoA)} \label{sec:background_aoa} When antennas receive an RF signal, the signal is coming from a certain direction. The angle of Arrival (AoA) is used to describe this direction. How the AoA is normally defined is shown in Figure~\ref{fig:ant_aoa}. The circular dots represent the antennas. The dashed line is the coordinate system of the antenna array. The vertical dash line, which is perpendicular to the antenna array, is the boresight of this array. Boresight is the axis of maximum gain, and for most antennas, the boresight is also the axis of symmetry. Suppose the antennas shown in the figure are omnidirectional antennas. In that case, signals coming from either side and mirroring along the antenna array (i.e., top or bottom in the figure) will have the same AoA. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{figs/ant_aoa.pdf} \caption[Angle of arrival of RF signals]{Angle of arrival of RF signals are measured as the angle between the signal and the boresight of the antenna array.} \label{fig:ant_aoa} \end{figure} To calculate the AoA, the time difference of arrival (TDOA) is usually utilized. As the distance traveled by the signal is different for each antenna, as shown in the figure, the time will also be different. However, as RF signals traveling at the same speed as light, the time difference is usually too small to be effectively measured by the hardware. As a result, the phase difference between the received signals is generally used to estimate the AoA. \subsection{Received Signal Strength Indicator (RSSI)} Received Signal Strength Indicator (RSSI) is a measurement of the power present in a received radio signal. RSSI is usually derived in the intermediate frequency (IF) stage before the IF amplifier and is a relative index. The 802.11 standards do not specify detailed rules regarding RSSI, and each manufacturer can define their own max value. There is no defined relationship between the RSSI value to the actual power level in milliwatts or decibels referenced on one milliwatt (dBm), and each vendor and manufacture can define their own accuracy, granularity, and range for the actual power. As a result, it is usually not accurate to compare RSSI between different chips, but a higher value with the same chip means a better signal. The RSSI value can also be used internally to determine when the network card is clear to send (CTS). Different from RSSI, which measures the received power in preamble only, Received Channel Power Indicator (RCPI) is introduced to measure the received RF power in the selected channel for the received frame. It is also defined that the RCPI shall equal the received RF power within an accuracy of $\pm5$ dB (95\% confidence interval) within the specified dynamic range of the receiver. \subsection{Channel State Information (CSI)} With newer IEEE 802.11 standards support Multiple-Input and Multiple-Output (MIMO) to increase the performance and stability of the WiFi systems, WiFi chipsets measure the channel at the Orthogonal Frequency-Division Multiplexing (OFDM) subcarrier level. The result is reported in a standard Channel State Information (CSI) format, as shown in Table~\ref{tab:csi_format}. In this table, grouping means the method used to reduce the size of the CSI report by reporting a single value for each group of N adjacent subcarriers. Ns is the number of subcarriers reported. \begin{table*}[] \centering \caption[CSI carriers reported based on carrier grouping]{CSI carriers reported based on carrier grouping. \citep{IEEEwifistandard}} \begin{tabular}{c|c|c|c} \toprule BW & Grouping & Ns & Carriers for which matrices are sent \\ \hline \hline \multirow{3}{*}[-0.5em]{20 MHz} & 1 & 56 & All data and pilot carriers: –28, –27,…–2, –1, 1, 2,…27, 28 \\ \cline{2-4} & 2 & 30 & \makecell{–28,–26,–24,–22,–20,–18,–16,–14,–12,–10,–8,–6,–4,–2,–1,\\1,3,5,7,9,11,13,15,17,19,21,23,25,27,28} \\ \cline{2-4} & 4 & 16 & –28,–24,–20,–16,–12,–8,–4,–1,1,5,9,13,17,21,25,28 \\ \cline{1-4} \multirow{3}{*}[-2em]{40 MHz} & 1 & 114 & All data and pilot carriers: –58, –57, …, –3, –2, 2, 3,…, 57, 58 \\ \cline{2-4} & 2 & 58 & \makecell{–58,–56,–54,–52,–50,–48,–46,–44,–42,–40,–38,–36,–34,–32,–30,\\ –28,–26,–24,–22,–20,–18,–16,–14,–12,–10,–8,–6,–4,–2, \\ 2,4,6,8,10,12,14,16,18,20,22,24,26,28, \\ 30,32,34,36,38,40,42,44,46,48,50,52,54,56,58} \\ \cline{2-4} & 4 & 30 & \makecell{–58,–54,–50,–46,–42,–38,–34,–30,–26,–22,–18,–14,–10,–6, –2,\\2,6,10,14,18,22,26,30,34,38,42,46,50,54,58} \\ \bottomrule \end{tabular} \label{tab:csi_format} \end{table*} As CSI measures the subcarrier level, the information recorded is much granular than RSSI. The properties of such channels are a description of the combined effect of the scattering, fading, and power decay between the transmitter and receiver. Each CSI entry represents the Channel Frequency Response (CFR): \begin{equation} H(f;t) = \sum_n^N a_n(t)e^{-j2\pi f\tau_n(t)} \end{equation} where $a_i(t)$ is the amplitude attenuation factor, $\tau_i(t)$ is the propagation delay, and $f$ is the carrier frequency~\citep{tse2005fundamentals}. Since the signals between the transmitters and receivers are impacted by the environment and the displacement and movement of the antennas themselves, the CSI amplitude $|H|$ and phase $\angle H$ captures the wireless characteristics of the environment. Before the data symbols are transmitted, the transmitter will send Long Training Symbols (LTFs), containing pre-defined symbols for each subcarrier. For each subcarrier, the signal is modeled as $y=Hx + n$, where $y$ is the received signal, $x$ is the transmitted signal, and $n$ is the noise. $H$ is the CSI matrix, as shown before. With the received LTFs and the known pre-defined LTFs that are transmitted, the chipset can estimate the matrix $H$. As a result, the reported CSI values are not the most accurate as it is also affected by other factors within the chipset. In recent studies, researchers have found that CSI can be used for WiFi sensing, including but not limited to: angle of arrival estimation, human detection, breath detection, and etc. \subsection{MUSIC and Variants} For the angle of arrival (AoA) estimation, one classical method is the MUSIC algorithm~\citep{schmidt1986multiple}. If two antennas are separated $d$ apart, the additional phase shift introduced due to the distance is $-2\pi\times d\times\sin(\theta)\times f/c$, where $\theta$ is the AoA, $f$ is the signal frequency, and $c$ is the speed of light. The MUSIC algorithm works by estimating the steering matrix $A$ in: $X = AF$, where $X$ is the measurement matrix of the received signal, and $F$ is the matrix of complex attenuation. In a recent WiFi-based localization algorithm~\citep{kotaru2015spotfi}, the AoA of the direct path (which is relevant to the localization problem) is isolated by taking the eigenvector of the matrix, $XX^H$, for which, the eigenvalue is zero. The eigenvector goes through further processing to obtain the direct path. \section{CarFi\xspace Overview} An overview of the CarFi\xspace system is shown in Figure~\ref{fig:carfi-sys}. When a rider wants to travel to a specific location, s/he uses the ride-hailing phone app on the phone to book a trip. The cloud server of the service providers processes the request and finds a driver. The locations of the vehicle and the rider are determined by their respective location providers, such as GPS on the phone. Once the trip is confirmed, the driver heads toward the rider's location. As the driver arrives within a certain distance, e.g., 0.5 miles from the rider based on the location data, the rider's phone will transmit Wi-Fi packets at a higher transmission rate as the ride-hailing app controls it. In the meantime, the phone's MAC address is shared with the dashcam via the servers in the cloud. A randomized temporary MAC address can be used to preserve the privacy of the rider. As the vehicle is also within this certain range, the dashcam starts listening for Wi-Fi packets containing the phone's MAC address and filters out other packets. When CarFi\xspace system receives the Wi-Fi packets with matched MAC address, it extracts the CSI information, performs some pre-processing, and calculates relevant features. Then it feeds the features to an LSTM, which estimates the street side of the rider. Then, this information is passed to the driver's smartphone app from the dashcam for visualization. The data exchange between the phone and the dashcam can be achieved via either Bluetooth or cellular connection (if the dashcam has it). \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/carfi_overview.pdf} \vspace{-0.5em} \caption{CarFi\xspace system overview} \label{fig:carfi-sys} \vspace{-2em} \end{figure} \section{Challenges} In this section, we discuss the challenges that CarFi\xspace system faces for rider side localization in an automotive environment. \subsection{Automotive Environment} \begin{figure*}[t] \centering \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{figs/spotfi_aoa_single_person_right_nt.pdf} \vspace{-2em} \caption{AoA estimation of when the rider is in LoS condition.} \label{fig:spotfi_1} \end{subfigure} \hfill \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{figs/spotfi_aoa_car_person_right_nt.pdf} \vspace{-2em} \caption{AoA estimation of when the rider is in nLoS condition.} \label{fig:spotfi_2} \end{subfigure} \caption{SpotFi AoA in LoS and in nLoS conditions. The rider is in the right side of the car. The expected AoA is 0 to -90\degree.} \label{fig:my_label} \vspace{-1.5em} \end{figure*} When moving Wi-Fi devices from indoor locations to automotive environments, the characteristics of the environment and its effects on the signals change dramatically. One of the biggest issues in an automotive environment is the metal structure of the vehicle body, which can be similar to a Faraday cage. Although the signal of normal radio frequency communication systems has a higher frequency than what the window can block due to its large size, the vehicle's metal surface can still block and redistribute the signal. Unfortunately, there has not been much work to understand how Wi-Fi CSI looks like inside of a vehicle when the vehicle is being driven. With such a complex RF environment, the current state-of-the-art method, such as SpotFi~\cite{kotaru2015spotfi}, can not accurately estimate the Angle of Arrival (AoA) of the Wi-Fi signal. An example of such an AoA estimation is shown in Figure~\ref{fig:spotfi_1}. The X-axis represents the distance of the rider from the car. The car is coming from the left side of the X-axis, meets the rider in the center, and then leaves. The three antenna arrays are placed at the center of the dashboard of the car, and the AoA should be 0 to -90\degree (0 to 90\degree) when the rider is at the right (left) side. We consider two cases: the rider is standing without anyone blocking the signal (Figure \ref{fig:spotfi_1}), and two other cars and three other people blocking the signal (Figure \ref{fig:spotfi_2}). The rider was on the right side in both cases. We see that in LoS cases, the AoA is relatively stable as the Wi-Fi signal penetrates through the front windshield, but when the car leaves the rider, there is a lot of fluctuation of the AoA as the backside of the car blocks the signal. We observe that when other people and cars block the rider, the AoA is unreliable even when the rider is in front of the car. Since AoA estimation also requires three antennas and phase calibration, we do not use AoA in our approach. \subsection{Speed and Time} We do not expect that the vehicle will approach the rider at highway speed when they are nearby. Instead, we assume that the vehicle will be traveling at a lower speed to be able to stop quickly. Therefore, we assume 10 to 20 miles per hour vehicle speed, which translates to 4.47 to 8.94 meters per second. We also consider the transmission range of the Wi-Fi signal to be around 70 to 120 meters in the outdoor environment. If the rider is 70 meters in front of the car, the driver has about 7.83 to 15.66 seconds to stop the vehicle. Given the human response time is about 1 to 1.5 seconds, we determine that the if CarFi\xspace system takes 3 seconds, it will provide adequate time for the driver to respond and stop safely. Smartphones can transmit several hundreds of Wi-Fi packets in a second. However, there could be a burst of packet loss due to non-line of sight (nLoS). In addition, the more time we take to make a decision, the higher accuracy we can offer. Thus, a small window size with a variable number of received packets poses a difficult challenge for rider side determination. \subsection{Cost} In order to make the solution practical, we need to use inexpensive antennas and a lightweight computing platform. A simpler solution might use two directional antennas to classify left vs. right. However, we need directional antennas with 180-degree horizontal beamwidth, which is expensive. For example, \cite{directional_antenna} costs \$225 per antenna. Cheaper ones have a smaller beamwidth. For example, \cite{directional_antenna_cheaper} costs \$35.94 per antenna, but has only 66 degrees horizontal beam patterns. Also, such directional antennas are bulky and could obstruct the field of view of the driver more. Adding more antennas also helps in improving the accuracy but also increases the cost of the Wi-Fi chipset and antenna chain. Moreover, the solution needs to be lightweight to be able to run on an embedded GPU or accelerators. Although, such an accelerator would increase hardware cost, a dashcam with such capability could provide additional benefits to the drivers by offering additional services e.g., detecting accidents, violence/aggression in the car and providing necessary support by performing audio-visual analysis. \section{Approach} In this section, we describe the CarFi\xspace approach in details. \subsection{Pre-processing} When the receiving unit starts to receive Wi-Fi packets, CarFi\xspace timestamps each packet and keeps all the packets within a window size of 3 seconds for processing together. Then, it uses a stride length of 0.4 seconds to create the next window. \subsection{Feature selection} In this section, we discuss the set of features that we use for left vs. right classification. \subsubsection{Amplitude difference} We use Channel State Information (CSI) from only two antennas for the classification. We assume the distance between them is $d$. In our exploratory analysis, we have $d$ = 5.2 cm. CSI contains how the RF signal propagates through the environment as they are being affected during transmission. The CSI data collected at the receiver side contains those affected and encoded in the complex form with amplitude and phase information. Each CSI data point is also the Channel Frequency Response (CFR): \begin{equation} \label{equ:channel-freq} H(f;t) = \sum_n^N a_n(t)e^{-j2\pi f\tau_n (t)} \end{equation} Where $a_i(t)$ is the amplitude attenuation factor, $\tau_i(t)$ is the propagation delay, and $f$ is the carrier frequency~\cite{tse2005fundamentals}~\cite{ma2019wifi}. Figure \ref{fig:amplitude-difference} shows how CSI amplitude difference between antenna $C$ and antenna $A$ looks like for a portion of a ride for 30 sub-carriers. The rider was on the right side of the car. The X-axis shows the distance of the car with respect to the rider. The car is approaching from the left side of the X-axis, meets the rider at the middle of the X-axis, and then passes the rider after that. When we plot amplitude difference, we plot the CSI amplitude of the antenna $C$ - antenna $A$, where antenna $A$, $B$, and $C$ are placed from left to right parallel to the dashboard (Figure \ref{fig:carfi-ant}). So, a positive value is a good indicator that the rider is on the right side. We see that the amplitude difference values fluctuate over time, and they also vary for different sub-carriers. While Figure\ref{fig:amplitude-difference1} shows a LoS condition, Figure \ref{fig:amplitude-difference-nlos} shows a nLoS condition where the three other people and two other cars were placed between the rider and the Wi-Fi receiver. We see a burst of packet loss there. As the CSI amplitude varies by subcarriers, instead of relying on all the sub-carriers, we determine the relevant sub-carriers for us that are less prone to noise. \begin{figure}[t] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/amplitude-difference.pdf} \vspace{-2em} \caption{Amplitude difference of antennas ($C$ - $A$) when the rider is in LoS.} \label{fig:amplitude-difference1} \end{subfigure}\quad\quad \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/amplitude-difference-nLoS.pdf} \vspace{-1.5em} \caption{Amplitude difference of antennas ($C$ - $A$) when the rider is in nLoS.} \label{fig:amplitude-difference-nlos} \end{subfigure} \caption{CSI amplitude difference in LoS and nLoS conditions.} \vspace{-1em} \label{fig:amplitude-difference} \end{figure} \subsubsection{Sub-carrier selection} Instead of relying on all the sub-carriers, we select sub-carriers that are more resilient to noise. First, we compute the covariance of CSI amplitude of all the subcarriers of antenna C. High covariance between these subcarriers shows they receive effective signal and not the noise. For each subcarrier in antenna C, we select the corresponding subcarrier of antenna A. These subcarriers have similar path properties (e.g., multipath effect, attenuation) and receive correlated CSI data. We vary the number of selected subcarriers from 1 to 30 and choose the number of subcarriers that provide the highest accuracy. Please note that sub-carriers are selected per window of packets. So, different windows may have different sets of sub-carriers. We call this approach Variance-based Sub-carrier Selection (VbSS). When choosing $N$ subcarriers, we choose $N-1$ sub-carriers using VbSS and add the first subcarrier. Figure \ref{fig:amplitude-difference-selected} shows the amplitude difference of the 12 selected subcarriers of a window when the rider is on the right side of the car. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/amplitude-difference-window.pdf} \caption{CSI Amplitude difference between antennas ($C$ - $A$) of 12 selected sub-carriers using Variance-based Subcarrier Selection.} \label{fig:amplitude-difference-selected} \vspace{-1em} \end{figure} \subsection{Multipath Profile} Since Wi-Fi CSI data contains multipath attenuation caused by the environment, the multipath profile extracted from the CSI data can be very useful in location estimation. It can effectively provide whether the rider is in LoS or nLoS conditions. To extract the multipath profile of the CSI data, we explore how MUSIC~\cite{schmidt1986multiple} and SpotFi~\cite{kotaru2015spotfi} algorithms extract signals and estimate their Angle of Arrival. Inspired by this, we first isolate multiple possible signals by performing Eigen decomposition of matrix $XX^H$, where $X$ is the CSI measurement, and $X^H$ is the conjugate transpose of $X$. The eigenvectors and eigenvalues can be used as features as they are affected by the environment and the vehicle. We take the top two dominant multipaths and plot them in Figure~\ref{fig:carfi-multipath-profile} with both LoS and nLoS conditions, and the rider was on the right side. The X-axis in both figures shows the distance from the car as the car is approaching the rider from the left side of the axis. Figure \ref{fig:multipath-profile1} represents the case when the rider is in a LoS condition. We see that as the car approaches, there is a significant difference between the first and the second multipath. However, as the car leaves the rider, the backside of the car blocks the signal and causes nLoS conditions, and hence the difference between the top two multipaths decreases significantly. Figure \ref{fig:multipath-profile2} represents the case when the rider is in a nLoS condition. There were three other people and two other cars blocking the signal. As a result, the first and second dominant multipath is closer from the beginning. However, when the car passes the rider, it gets a line of sight for a brief moment, and hence the difference between the first and the second multipath becomes more prominent. We take the top two Eigenvalues representing the top two dominant multipaths computed using CSI values of two antennas as features for classification. \begin{figure}[t] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/multipath-profile1.pdf} \vspace{-1.7em} \caption{First and second multipaths of when the rider is LoS condition.} \label{fig:multipath-profile1} \end{subfigure}\quad\quad \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/multipath-profile2.pdf} \vspace{-1.7em} \caption{First and second multipaths of when the rider is nLoS condition. Three other people and two other cars are blocking the signal.} \label{fig:multipath-profile2} \end{subfigure} \caption{Multipath profile in LoS and nLoS conditions.} \vspace{-1em} \label{fig:carfi-multipath-profile} \end{figure} \subsection{Power Delay Profile} Power Delay Profile (PDP) describes the power level associated with each multipath along with the propagation delays. However, due to the limited bandwidth of the Wi-Fi channels, the path length resolution is not very precise. For our 802.11ac 40 MHz channel, the path length resolution is 7.5m. But it can be helpful for coarse-grained mobility tracking over time and provide contextual information regarding LoS and nLoS. When the Wi-Fi chipset measures the channel frequency response as written in Equation~\ref{equ:channel-freq}, instead of measuring continuously, it samples the response at discrete frequency points \(f = f_0 + k\Delta f\), where k is the sub-carrier index and \(\Delta f = 312.5kHz\)~\cite{xie2018precise}. Since Equation~\ref{equ:channel-freq} is in the frequency domain, by applying Inverse Fourier Transform, we can get the response in the time domain which is also the Channel Impulse Response (CIR): \begin{equation} f(t) = \sum_{n}^N a_n \delta(t-\tau_t) \end{equation} where \(a_n\) and \(N\) is the same as in Equation~\ref{equ:channel-freq} and $\delta(\cdot)$ is the delta function. By calculating the norm $\|f(t)\|_2$ of the Channel Impulse Response $f(t)$, we can get the Power Delay Profile. Each of the signal samples in the Channel Impulse Response correlates to different multipath as their time to travel from the transmitter to the receiver differs due to differences in the traveled length. By considering the IFFT theory, the time resolution \(\Delta \tau\) is related to the sampling resolution \(\Delta f\) mentioned above. While increasing the number of bins in IFFT, the actual resolution does not change. As such, we set our IFFT bins to the number of subcarriers, which is also the frequency sampling resolution. For our collected data, 30 subcarriers are reported for each antenna. By using two antennas, we obtain 60 PDP values as features per Wi-Fi packet. We show the PDP values from one antenna in LoS condition in Figure \ref{fig:pdp1}, and in nLoS condition in Figure \ref{fig:pdp2}, where there are three people and two cars blocking the signal between the rider and his car. In both cases, the rider was on the right side. We see how the PDP values are changing as the car approaches the rider from the left side of the X-axis and passes him. The PDP values do not necessarily tell if the rider is on the left or right side but help contextualize the packets of similar distance, and in LoS/nLoS conditions to provide additional information to the classification model. \begin{figure}[t] \centering \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=\textwidth]{figs/pdp-1.pdf} \caption{Power delay profile of when the rider is LoS condition..} \label{fig:pdp1} \end{subfigure}\quad\quad \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=\textwidth]{figs/pdp-2.pdf} \caption{Power delay profile of when the rider is nLoS condition.} \label{fig:pdp2} \end{subfigure} \caption{Power delay profile in LoS and nLoS conditions.} \vspace{-1em} \label{fig:pdp} \end{figure} \section{Classification} We consider different classifiers to classify the side of the rider (left vs. right), including k-Nearest Neighbor (kNN), Decision Tree (DT), and Support Vector Machine (SVM). In addition, we design a Long Short-Term Memory (LSTM) neural network classifier by effectively integrating all the features. Now, we describe the design of an LSTM and how we encode the relevant contextual and motion-related features. As the vehicle approaches the rider, the motion of the vehicle, as well as the distance between the transmitter (the phone held by the rider) and the receiver (Wi-Fi receiver on the vehicle), provides additional features in the time domain. For example, Wi-Fi signal differences between different antennas can vary across time. There are also Wi-Fi signal differences on the same antenna with different transmitter and receiver distances. Unlike neural network architectures such as Fully-Connected Neural Network and Convolutional Neural Network (CNN), LSTM can better encode time series data with its feedback connections to remember values over arbitrary time intervals. Thus it can exploit the temporal features introduced by the vehicle's motion. While traditional classifiers like k-NN, DT, and SVM can capture features at a single time step, they lack the ability to take into account the temporal features as the signal is coming from either left or right in both LoS and nLoS situations. The general execution of LSTM is described in equations below: \vspace{-2em} \begin{align} i_t &= \sigma(W_{ii}x_t + b_{ii} + W_{hi}h_{t-1} + b_{hi}) \label{equ:lstm1}\\ f_t &= \sigma(W_{if}x_t + b_{if} + W_{hf}h_{t-1} + b_{hf}) \label{equ:lstm2}\\ g_t &= tanh(W_{ig}x_t + b_{ig} + W_{hg}h_{t-1} + b_{hg}) \label{equ:lstm3}\\ o_t &= \sigma(W_{io}x_t + b_{io} + W_{ho}h(t-1) + b_{ho}) \label{equ:lstm4}\\ c_t &= f_t \odot c_{t-1} + i_t \odot g_t \label{equ:lstm5}\\ h_t &= o_t \odot tanh(c_t) \label{equ:lstm6} \end{align} \vspace{-1.5em} The main advantage of LSTM to other neural networks in temporal feature understanding is the memory cell $c_t$, which is used to accumulate state information in each time step. To decide what to remember and forgot, Equation~\ref{equ:lstm1} and ~\ref{equ:lstm2} calculate the input gate and forget gate value, respectively. The input gate $i_t$ decides which information (which is calculated by Equation~\ref{equ:lstm3}) is saved to the memory cell. On the other hand, the forget gate $f_t$ control which part of the previous cell status could be forgotten. With these calculations, we determine what is the new memory cell status through Equation~\ref{equ:lstm5}. Additionally, how the memory cell $c_t$ propagates to the final state or output $h_t$ (through Equation~\ref{equ:lstm6}) is controlled by the output gate $o_t$ (calculated at Equation~\ref{equ:lstm4}). This design allows the LSTM to take into account previous state information and can be self-learned through the training process. In these equations, $x_t$ is the data at time step $t$, $b$ is the bias in each network connection, the upper case $W_i$ and $W_h$ represents the matrices of the weight of the input data and recurrent connection, respectively, and $\odot$ is the Hadamard product. \begin{figure} \centering \includegraphics[width=0.43\textwidth]{figs/LSTM-architecture.pdf} \vspace{-0.7em} \caption[LSTM]{LSTM architecture} \vspace{-2em} \label{fig:LSTM-architecture} \end{figure} The architecture of LSTM is shown in Figure \ref{fig:LSTM-architecture}. It has an input size of N. 3 LSTM layers are stacked with 256 hidden units. They are followed by a linear layer with an input size of 256 and an output size of 2. A Softmax layer is added after the linear layer. The training uses a cyclic learning rate with a 5e-4 initial learning rate with maximum epochs of 650 with the patience of 200. For loss function, we use cross-entropy loss. We have a dropout of 0.5 in the LSTM layers. The sequence length in LSTM for each sample (or, a window) needs to be the same. However, we observe burst of packet losses in nLoS conditions. As a result, the number of packets varies from windows to windows (in 3 seconds). Hence, the length of the LSTM sequence needs to be determined. We take the median of the number of packets of the windows of the training set, which is 855 packets and set that the sequence length of LSTM. If there are more packets, then we ignore the rest. If there are fewer packets, then we perform zero padding at the end of the sequence. In this way, we actually take 1.5 seconds of Wi-Fi packets half of the time for the classification. Before feeding the CSI amplitude difference, power delay profile, and multipath profile features to LSTM, we normalize them. This is important to make sure different features with different scales (especially the dominant multipath) do not force the network to weigh differently. So, the features from the multipath profile and power delay profile need to be crafted in a way that even after normalization, the distinction of LoS and nLoS does not disappear. In order to ensure that, we create just one feature using the multipath profile by dividing the magnitude of the dominant multipath with that of the less dominant multipath. For the power delay profile, adding 60 input channels to LSTM may cause over-fitting. So, we apply Principal Component Analysis of the 60 PDP features and take the top M principal components to feed to the network. We vary M from 3 to 5 and show the results in the Evaluation section. After this process, the normalization retains the LoS and nLoS distinction and reduces the number of input channels to LSTM to reduce overfitting. \section{Data Collection} \begin{figure*}[ht] \centering \includegraphics[width=0.98\textwidth]{figs/incar_ant.pdf} \caption{In-vehicle system setup. The left picture shows the antenna viewed from outside. The middle picture shows Wi-Fi antennas placed on the central dashboard. Antennas from the left to the right are labeled as $A$, $B$, and $C$. The right picture shows a laptop with an Intel 5300 NIC and connected with antennas through cables.} \vspace{-1.3em} \label{fig:carfi-ant} \end{figure*} \begin{figure}[t] \centering \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=\textwidth]{figs/phone_app.pdf} \caption{Android App developed to generate Wi-Fi traffic.} \label{fig:phone-app} \end{subfigure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=\textwidth]{figs/phone_car.pdf} \caption{View of how the phone is held relative to the car.} \label{fig:phone-car} \end{subfigure} \caption{Data collection equipment and environment.} \vspace{-2em} \label{fig:carfi-collet} \end{figure} \subsection{System Setup} To extract the Wi-Fi data in an automotive environment, we utilize a laptop with an Intel 5300 Wi-Fi Network Interface Card (NIC) for portability, as shown in Figure~\ref{fig:carfi-ant}. We use the Linux CSI tool~\cite{halperin2011tool} to collect PHY layer CSI information from received Wi-Fi packets. The car is driven with this set up for receiving Wi-Fi packets about 10-20 miles per hour. The three antennas are placed in the dashboard. We mark them as A (leftmost), B (middle), and C (rightmost), when viewed from inside of the vehicle. Although we collect data with 3 antennas, we use only two antennas for our approach (antennas A and C). On the rider side, the rider stands with a Pixel 2 XL phone that serves as an Access Point (AP) at 5 GHz to which the laptop is connected to. An Android app from the phone generates Wi-Fi traffic by pinging the laptop as shown in Figure~\ref{fig:phone-app}, that we developed and can achieve a packet transmission rate of up to 350 packets per second. \subsection{Collected Dataset} In order to consider realistic scenarios with LoS and nLoS conditions, we collect data of 85 rides under five different conditions: (a) only rider standing, (b) people standing on both sides of the rider, (c) two other people blocking the signal, (d) two other parked cars blocking the signal, and (e) two other cars and three other people blocking the signal. We collect data when the rider is on the left and right sides of the car in all these conditions. Table~\ref{tab:dataset} shows the number of rides under different conditions. Figure \ref{fig:carfi-three-p-car} shows a drone image of the case (e), where the rider is standing, and three people and two cars are blocking the signal. The Wi-Fi receiving unit is in the blue car that was being driven from the left to the right side. \begin{table}[t] \centering \caption{Distribution of 85 rides under different conditions.} \label{tab:dataset} \resizebox{\linewidth}{!}{ \begin{tabular}{@{}lcc@{}} \toprule & Rider left side & Rider ride side \\ \midrule Only Rider & 7 & 6 \\ \midrule People both sides of the rider (no car) & 5 & 6 \\ \midrule Two other people blocking signal & 13 & 14 \\ \midrule Two cars blocking signal (no other people) & 10 & 12 \\ \midrule Two cars and three other people blocking signal & 6 & 6 \\ \bottomrule \end{tabular} } \vspace{-1em} \end{table} We split the dataset into training (60\%), validation (20\%), and testing (20\%). We do this per for each condition and for each side of the rider. For example, when the rider is at the left side and two cars blocking the signal, we have 10 such rides. We take CSI data of 6, 2, and 2 rides for training, validation, and testing, respectively. In that way, the test set has data of disjoint rides and under all conditions. For each ride, we split the sequence of CSI values into a 3 seconds window with 0.4 seconds stride length. This gives us 1032 windows for training, 286 windows for validation, and 285 windows for testing. \subsection{Ground Truth Collection} In order to collect the ground truth of whether the rider is at the left or right side of the car, one can just record the timestamps of received packets for each side of the rider. However, we would like to collect the (x,y) location of the car when each packet was received to have a better understanding of how the CSI changes when the vehicle approaches the rider and leaves the rider at each side. In order to achieve this goal, we use an off-the-shelf consumer drone hovering above the data collection site to record the process. An example frame from the recorded video is shown in Figure~\ref{fig:carfi-three-p-car}. Before the data collection, we first determine landmark locations (e.g., the rider's location) and four positions that can form a rectangle area with tape-measured ground truth coordinates. Next, we place solid red-colored papers at each location and on top of the car to enable simple color-based pixel tracking through color thresholding. In the recorded video, we use the four locations to perform Homography transformation so that the pixel plane and real-world plane are parallel. This transformation creates a straightforward translation from the pixel coordination system to the real-world coordination system through scaling. Then we can track the vehicle in the pixel domain and interpolate the real-world (x,y) location through the translation. Prior to each data collection, we also time-synchronize the Android phone, the laptop with the Intel Wi-Fi chipset, and the drone. The time-synchronization between the phone and drone is achieved by capturing the phone's time with millisecond accuracy at the beginning of each drone's video; thus, we can calculate the timestamp based on the frame rate and a reference frame that has the phone's time clearly recorded. We also capture a screenshot with both the phone's time (through the laptop's camera) and the laptop's time displayed with millisecond accuracy; thus, the time difference between them can be easily calculated. We apply these time offsets to change the timestamp recorded on the laptop and the drone to match the time on the phone for time synchronization. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/driving_three_p_car.pdf} \caption{Drone image of three people and two vehicles in between the Wi-Fi transmitter and receiver.} \vspace{-1em} \label{fig:carfi-three-p-car} \end{figure} \section{Evaluation} In this section, we estimate the accuracy of CarFi\xspace and compare it with state-of-the-art methods. We investigate the effect of antenna spacing, subcarrier selection, and window size on the performance of the solution. Also, we estimate its execution time, and range in both LoS and nLoS conditions. \subsection{Accuracy} To the best of our knowledge, there is no state-of-the-art Wi-Fi-based rider side determination technique. So, we implement a few baseline methods to compare with our approach in terms of accuracy. \textbf{Baseline 1: CSI phase difference based approach:} Although our approach does not require phase calibration, in order to investigate and compare with a phase difference based approach, we perform phase calibration of the antenna chains of the Intel 5300 chipset attached with the laptop using a method similar to~\cite{xiong2013arraytrack}. We use another laptop with Intel 5300 chipset to transmit Wi-Fi packets through an RF splitter, where all CarFi\xspace three receiver antennas are connected to the RF splitter's output as shown in Figure~\ref{fig:phase-calibration}. These three antennas should receive the Wi-Fi signal at the same time. However, due to the slight path distance difference within the RF splitter, we switch the receiver antennas' connecting locations and record the phase information in each connection combination to eliminate the difference introduced by the RF splitter. By removing the offset we measured, we correct the antenna phase offset in our collected data. The system also introduces Sampling Time Offset (STO) and Sampling Frequency Offset (SFO) as the sampling clocks and frequencies are unsynchronized between the receiver and the transmitter. We follow SignFi~\cite{ma2018signfi} to remove STO and SFO through multiple linear regression. We use only antennas $A$ and $C$, and estimate the phase difference by subtracting unwrapped phase $A$ from unwrapped phase $C$ of each window. Ideally, the phase difference should be positive (negative) when the rider is on the left (right) side. But for 30 different sub-carriers, the patterns vary significantly. As an example, we show the phase difference when the rider is at the right side in LoS condition and when he was blocked by two cars in Figure \ref{fig:phase-difference}. Since the unwrapped phase difference change over time, we consider four different ways to compute the features to capture phase difference between antennas: \begin{figure} \centering \includegraphics[width=0.45\textwidth]{figs/phase-calibration.pdf} \caption{Antenna chain phase calibration of the Intel 5300 chipset.} \vspace{-1.5em} \label{fig:phase-calibration} \end{figure} \begin{figure}[t] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/phase-LoS.pdf} \caption{Unwrapped phase difference of antennas ($C$ - $A$) in LoS condition.} \label{fig:phase-difference1} \end{subfigure}\quad\quad \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\textwidth]{figs/phase-nLoS.pdf} \caption{Unwrapped phase difference of antennas ($C$ - $A$) in nLoS condition.} \label{fig:phase-difference2} \end{subfigure} \caption{Unwrapped phase difference in LoS and nLoS conditions when the rider is in the right side.} \vspace{-1em} \label{fig:phase-difference} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth]{figs/phase-votes.pdf} \vspace{-0.5em} \caption{Positive and negative votes of unwrapped phase difference between antennas when the rider is in the both sides.} \vspace{-1em} \label{fig:phase-votes} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth]{figs/phase-bar.pdf} \vspace{-0.5em} \caption{Estimating effective phase difference between antennas ($C$ - $A$) when the rider is at the right side in LoS.} \vspace{-1.5em} \label{fig:phase-bar} \end{figure} \begin{enumerate}[label=(\alph*)] \item We average all phase differences of all sub-carriers of all packets within a window. The intuition is that mean of phase difference should be different for different sides. \item Similar to (a), but instead of all the sub-carriers, we use just the first sub-carrier. \item We divide the window into a few sub-windows. The reason for sub-windowing is to reduce the propagation error of phase unwrapping. Then, we average all phase differences of all sub-carriers in each sub-window. We remove 20\% sub-windows with large variance. Then, we compute a positive or negative vote for each sub-window based on the sign of its phase difference. We count the numbers of positive and negative votes, and use them as features. We plot the number of positive and negative votes for all the 1032 training windows and plot them in Figure \ref{fig:phase-votes}. The green line shows when the positive and negative votes are the same. It shows that when the rider is on the left (right) side, there are more positive (negative) votes (as they should be). We calculate such votes for all the sub-carriers. \item After sub-windowing, we compute an effective phase difference for each subcarrier. The intuition is that phase difference should be stable for each subcarrier because the central frequency is the same. We choose an effective phase difference that covers most phase differences within two radians and has the smallest mean error. An example of such an effective phase difference is shown in Figure \ref{fig:phase-bar} when the rider is on the right side and in LoS condition. It shows that even though the phase difference fluctuates, the effective phase difference is negative (as it should be since the rider is on the right side). We estimate like this for 30 sub-carriers and use all 30 effective phase differences as features to the classifiers. \end{enumerate} We feed these features to kNN, DT, and SVM classifiers and show the results of rider side classification in Table \ref{tab:phase_diff}. For kNN, we vary the value of k from 3 to 15 and report the accuracy with the best k. We see the highest accuracy we get from the phase difference based approach is only 56\%. \begin{table}[t] \centering \caption{Results of left vs. right classification of baseline methods.} \label{tab:phase_diff} \resizebox{0.75\linewidth}{!}{% \begin{tabular}{@{}lccc@{}} \toprule Baseline & KNN (\%) & DT(\%) & SVM(\%) \\ \midrule 1(a) & 50.2 (k=5) & 46.0 & 48.4 \\ \midrule 1(b) & 54.4 (k=11) & 50.2 & 44.2 \\ \midrule 1(c) & 52.6 (k=3) & 52.6 & 51.6 \\ \midrule 1(d) & 52.6 (k=3) & 56.0 & 49.5 \\ \midrule \midrule 2 & 85.6 (k=10) & 76.1 & 85.6 \\ \midrule \midrule 3(a) & 84.2 (k=5) & 81.1 & 84.6 \\ \midrule 3(b) & 88.1 (k=3) & 83.9 & 87.7 \\ \midrule 3(c) & 83.5 (k=7) & 81.4 & 85.3 \\ \midrule 3(d) & 87.3 (k=8) & 82.5 & 89.5 \\ \bottomrule \end{tabular}% } \end{table} \textbf{Baseline 2: RSS difference based approach:} When we collect data, we also collect RSS (Received Signal Strength) values from each antenna. We feed the average RSS difference of antennas ($C$ - $A$) of each window to different classifiers, including KNN, Decision tree, and SVM, to classify the rider side. The results are shown in Table \ref{tab:phase_diff}. The results show that the highest accuracy is 85.6\% that came from both K-NN and SVM. It provides higher accuracy than the CSI phase difference based approach. \textbf{Baseline 3: CSI amplitude difference based approach:} Since the CSI amplitude difference changes over time, we consider different ways to compute features to capture amplitude difference of antennas ($C$ - $A$): \begin{enumerate}[label=(\alph*)] \item We average all CSI amplitude differences of all sub-carriers of all packets within a window. \item Similar to (a), but we use only the first sub-carrier. \item Similar to (a), but we also add average RSS difference. \item Similar to (b), but we also add average RSS difference. \end{enumerate} We feed the features to kNN, DT, and SVM classifiers. The results are shown in Table \ref{tab:phase_diff}. Its shows the highest accuracy is $89.5\%$, when combining the average CSI amplitude difference and average RSS difference. We also implement our LSTM based network and change network parameters, including the size of hidden dimensions and number of layers to see how that affects performance. The results are shown in Table~\ref{tab:lstm}. It shows that when we use our variance based subcarrier selection, the accuracy is higher than when all sub-carriers are used, or only the first subcarrier is used. We see that we get 95.44\% accuracy when we combine variance based subcarrier selection, power delay profile, and multipath profile. This highest accuracy came from when we select 14 subcarriers with VbSS, obtain 3 PDP features and 1 multipath profile feature. If we feed the exact same features to kNN, DT, and SVM, we get 68.4\%, 69.5\% , 84.2\% accuracy, respectively. Hence, our LSTM based architecture increases accuracy by 11.24\% from exactly the same input. \begin{table*}[t] \centering \caption{Results of left vs. right classification when LSTM with different features are used.} \label{tab:lstm} \resizebox{0.87\linewidth}{!}{% \begin{tabular}{@{}lccccc@{}} \toprule Description & Input Dim & Hidden Dim & Number of layers & Optimizer & Accuracy \\ \midrule Variance-based Subcarrier Selection (VbSS)& 12 & 256 & 3 & RMSProp & 93.33\% \\ \midrule Variance-based Subcarrier Selection (VbSS) & 12 & 256 & 3 & Adam & 91.57\% \\ \midrule Variance-based Subcarrier Selection (VbSS) & 12 & 128 & 3 & RMSProp & 92.28\% \\ \midrule Variance-based Subcarrier Selection (VbSS) & 12 & 256 & 4 & RMSProp & 89.82\% \\ \midrule Variance-based Subcarrier Selection (VbSS) & 12 & 128 & 4 & RMSProp & 92.63\% \\ \midrule First Subcarrier only & 1 & 256 & 3 & RMSProp & 89.47\% \\ \midrule All sub-carriers & 30 & 256 & 3 & RMSProp & 89.47\% \\ \midrule VbSS + Multipath Profile (MP) & 12+1 & 256 & 3 & RMSProp & 93.33\% \\ \midrule VbSS + Power Delay Profile (PDP) & 12+5 & 256 & 3 & RMSProp & 93.33\% \\ \midrule VbSS + Power Delay Profile (PDP) & 12+3 & 256 & 3 & RMSProp & 93.68\% \\ \midrule VbSS + PDP + MP & 12+3+1 & 256 & 3 & RMSProp & 95.08\% \\ \midrule VbSS + PDP + MP & 14+3+1 & 256 & 3 & RMSProp & \textbf{95.44\%} \\ \bottomrule \end{tabular}% } \vspace{-1em} \end{table*} \subsection{Sensitivity Analysis} In this section, we analyze the effect of antenna spacing, subcarrier selection, and window size on CarFi\xspace performance. \textbf{Effect of antenna spacing:} In our analysis, the default antenna spacing was 5.2 cm, which produced 95.44\% accuracy. Since we collected data with three antennas, we can use antenna $A$ and $B$ to see how the performance looks like when the antenna spacing is 2.6 cm. We keep the best performing network's parameter the same and run the experiment with 2.6 cm spacing and find the accuracy is only 55.79\%. Thus, increasing antenna spacing helps improving accuracy. \textbf{Effect of window size:} In our analysis, the default window size is 3 seconds. We keep the best performing network's parameter the same and run the experiment by varying window sizes to 0.5, 1, 1.5, 2, 2.5, and 3 seconds find the accuracy is 62.95\%, 79.36\%, 80\%, 85.17\%, 89.03\%, 95.44\%, respectively as shown in Figure \ref{fig:window-size}. We see that longer windows provide higher accuracy. \begin{figure} \centering \includegraphics[width=0.46\textwidth]{figs/window-size.pdf} \vspace{-0.5em} \caption{Effects of window size on accuracy.} \vspace{-1.5em} \label{fig:window-size} \end{figure} \textbf{Effect of number of sub-carriers:} We keep the best performing network's parameter the same and run the experiment with changing the number of sub-carriers from 1 to 16 and show the impact of the number of sub-carriers through our VbSS method on accuracy in Figure \ref{fig:num-sub-carriers}. When we choose only one subcarrier, we choose subcarrier 1, as it provides 89.47\% accuracy. We achieve the highest accuracy (95.44\%) when the number of sub-carriers is 14. \begin{figure} \centering \includegraphics[width=0.46\textwidth]{figs/num-subcarriers.pdf} \vspace{-0.5em} \caption{Effects of number of sub-carriers on accuracy.} \vspace{-2em} \label{fig:num-sub-carriers} \end{figure} \subsection{Execution Time} We train our LSTM using Nvidia GeForce GTX 1080 Ti GPU. It takes about two hours to train the network. However, the inference is rapid. We estimate how long it takes to perform inference in a powerful GPU like NVidia GeForce GTX 1080 Ti as well as an embedded GPU like Nvidia Jetson Nano. It takes only 101.77 and 850.37 milliseconds to execute the inference process in 1080 Ti and Jetson Nano, respectively. Hence, the solution can be run on embedded GPUs in real-time. Also, there are several ways to optimize (e.g., recompiling with TensorRT can significantly reduce inference time on Jetson devices) and prune the model to compress the network, which will reduce inference time \cite{zhu2017prune} \cite{winata2019effectiveness}. We leave this to future work. \subsection{Range Analysis} In this section, we estimate how far CarFi\xspace can operate in both LoS and nLoS conditions. We collect additional data for this evaluation. We have a person standing at different distances ranging from 10 meters to 120 meters in front of the car in both LoS and nLoS conditions. We transmit 10,003 packets from each location. To create a nLoS condition, we have a person standing between the phone and Wi-Fi receiving unit placed in the car dashboard. The Packet Delivery Ratio (PDR) at different distances from the car is shown in Figure \ref{fig:range}. We see that even at a range of 120 meters, the PDR is 99.30\% in LoS condition. However, in nLoS situation, the PDR drops sharply to 41.65\% in 70 meters. At 120 meters, the PDR is only 0.75\%. So, we see that in LoS conditions, CarFi\xspace will operate beyond 120 meters range. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/range.pdf} \vspace{-0.5em} \caption{ Packet delivery ratio at different distances from the car.} \vspace{-2em} \label{fig:range} \end{figure} \section{Discussion} \subsection{Generalizability} Although the data was collected from one large parking lot, we put an effort to introduce variation in the rides by asking the volunteers to stand differently to block the signal, move while blocking the signal, drive at different speeds, and vary the speed in different rides. As a result, there is a significant variation in the dataset, and we expect the model to generalize to some extent. One particular reason we were not able to collect data from a busy street is that the Wi-Fi of the laptop needed to stay connected to the phone for data collection with CSI Tool \cite{Halperin_csitool}, which is very difficult to obtain in busy streets as the car can easily go out of the Wi-Fi range. Currently, we are switching to Nexmon framework \cite{nexmon:project} for collecting CSI data, where the phone will inject packets at a particular Wi-Fi channel. This will allow us to perform a large-scale data collection from busy streets for testing the generalizability of the solution. We leave it to future work. \vspace{-0.25em} \subsection{Limitations} \vspace{-0.25em} One potential limitation of our approach is that if someone else books the ride on behalf of the rider and the rider has a different phone, then the proposed solution may not work. If the rider does not co-operate (e.g., by disabling Wi-Fi), then it will not work. Also, it will need support from the rider-hailing service providers (e.g., Uber, Lyft) to enable this service into their apps. However, they can incorporate such a service using their apps and dashboard products. Also, our approach assumes that the rider is waiting for the car on a side of a street while the car is moving towards or away from the rider. If the rider books the trip from inside, e.g., from a restaurant, and waits inside for the car to arrive, then we will not be able to leverage the motion related features as effectively, and it may not be able to assist the driver with the rider side. However, when the rider comes out of the restaurant, we can ask him to walk along his side of the street to help us capture some features to determine his side. Due to the time sensitive nature of the application, assuming it takes maximum 3.85 seconds (0.85 seconds for execution and maximum 3 seconds of window, although 50\% time we only need 1.5 seconds to collect enough packets and perform classification) to run CarFi\xspace on a Jetson Nano and Wi-Fi range of 70 meters in nLoS, CarFi\xspace can only determine the rider side when the rider is in front of the car if the vehicle approaches towards the rider at 40.67 miles per hour or less. However, it can work up to 81.34 miles per hour vehicular speed if we are not required to determine rider side while the rider is in front of the car. \subsection{Lessons Learned and Future Work} Our exploratory study shows that the phase difference between antennas in an automotive environment is very noisy and does not provide as high accuracy as amplitude difference-based methods for determining rider side. We also find that increasing the antenna distance even by 2.6 cm helps improving accuracy for the amplitude-based approach significantly. The maximum length of an object that can be placed in a dashboard is 5.5 inches by the laws of California, USA. We plan to increase antenna spacing and see if we can achieve higher accuracy at smaller window sizes within this constraint. We leave this to future work. Also, we estimate the rider side independently from each window. In the future, we can take into account all the packets of the past windows from the same ride, assuming that the rider did not cross the street while the car is approaching and have a bigger window for rider side determination. Also, we plan to collect data from busy streets and evaluate the performance in challenging scenarios. \section{Related Work} \subsection{Human Detection and Identification} There has been a significant amount of work in detecting the presence of humans and identifying them. For the ride-hailing application, the vehicle needs to detect the presence of the rider and identify him/her before localizing him/her. Humans can be detected using cameras~\cite{zhu2006fast, wu2011real}, depth sensors~\cite{mithun2018odds, munir2017real, munir2017fork, flores2019dataset, francis2019occutherm, munir2019dataset, liu2017cod, liu2017long}, IR-array sensors~\cite{mohammadmoradi2017measuring}, mmWave radars~\cite{cui2021high, zhao2019mid}, Wi-Fi~\cite{fang2020eyefi, fang2020fusing, fang2020person, chen2022rfcam}, and using other sensors for various purposes~\cite{huang2019magtrack, preum2021review, prabhakara2022exploring}. Vision-based systems such as~\cite{wang2018learning, tao2017deep, wang2013insight} can be used to identify the person but requires prior knowledge such as the facial features. These systems are privacy invasive (e.g., facial recognition systems are being banned in multiple cities for privacy concerns) and generally do not work if the subject is at a distance and can be occluded. Systems such as ID-Match~\cite{li2016id} uses RFID tags and a 3D depth camera, FORK \cite{munir2017real} uses a depth sensor, and \cite{llorca2017recognizing} uses RFID and BLE to identify individuals. These works require additional sensors or devices, which are not practical in the ride-hailing scenario, difficult to scale, and potentially costly. Similar to EyeFi~\cite{fang2020eyefi} and RFCam~\cite{chen2022rfcam}, we utilize the phone as an identifier as it is already being utilized in the ride-hailing application. \subsection{Localization} Numerous works have focused on localization using Wi-Fi. ~\cite{kotaru2015spotfi} exploits Wi-Fi subcarrier CSI values to create virtual antennas to obtain higher resolution Angle of Arrival (AoA) estimation, then using multiple Wi-Fi receivers to triangulate the transmitter for localization. The usage of multiple Wi-Fi receivers is expensive, and AoA estimation is unstable in our automotive environment. ~\cite{xie2018precise} proposes a higher resolution of power delay profile by utilizing CSI splicing. This method requires a special Wi-Fi configuration, which is impractical for our application. However, it does inspire us to use power delay profile as one of our features. Other works such as ~\cite{vasisht2016decimeter, wang2011robust, wang2016lifs, soltanaghaei2018multipath} have examined using time-of-flight, frequency, and multipath to estimate AoA and triangulate the locations of the transmitter. These methods are more suited for indoor settings and more prone to environmental changes. Using simple features such as RSSI has been explored in previous works to perform vehicle localization~\cite{dinh2017indoor}. Similarly, ~\cite{nguyen2018WiFi} uses a fingerprinting method to localize vehicles in a car park. While fingerprinting is simple and easy to perform, they are prone to environmental changes and lacks generalization ability as it requires prior knowledge for each place. ~\cite{zhang2018WiFi} locates a bus by scanning Wi-Fi APs surrounding the bus route and predicts the time for the bus's arrival. However, it still lacks the generalization ability and can not provide fine-grained location information regarding the rider side. One work that is closely related to our work is~\cite{ibrahim2020wi}, which uses Wi-Fi Fine Time Measurement (FTM) to measure the distance (through ToF) and achieve high precision localization. However, issues such as the time needed to perform such measurement (which can take several seconds), the requirement of the phone to connect, and the need to place antennas on both sides of the vehicle's roof prevent it from being conveniently deployed. Similarly, \cite{pizarro2021accurate} utilizes both CSI and FTM to achieve higher accuracy with added AoA (Angle of Arrival) and AoD (Angle of Departure) measurements. However, this method still depends on FTM that most of the smartphones do not support. \subsection{Wi-Fi Sensing} While some work in Wi-Fi sensing does not directly apply to localization problems, they can provide meaningful features that may be utilized. For example, ~\cite{wu2016widir} use Wi-Fi CSI phase change dynamics with Fresnel zone model to determine the human subject's walking direction. The phase change dynamics contain environmental changes around the transmitter and receiver. In~\cite{jiang2020towards}, the author demonstrated how the Wi-Fi signal contains detailed information that can be used to reconstruct human pose, and a neural network can be used to extract deeper features. In these works, the transmitters and receivers are stationary. However, in our case, the receiver is moving.
\section{Conclusion} In this paper, we proposed to improve the noise robustness of the recently proposed Efficient Conformer CTC-based architecture by processing both audio and visual modalities. We showed that incorporating multi-scale CTC losses between blocks could help to improve recognition performance, reaching comparable results to most recent autoregressive lip reading methods. We also proposed patch attention, a simpler and more efficient attention mechanism to replace grouped attention in the first audio encoder stage. Our Audio-Visual Efficient Conformer achieves state-of-the-art performance of 2.3\% and 1.8\% on the LRS2 and LRS3 test sets. In the future, we would like to explore other techniques to further improve the noise robustness of our model and close the gap between recent lip reading methods. This includes adding various audio noises during training and using cross-modal distillation with pre-trained models. We also wish to reduce the visual front-end network complexity without arming recognition performance and experiment with the RNN-Transducer learning objective for streaming applications. \section*{Acknowledgments} This work was partly supported by The Alexander von Humboldt Foundation (AvH). \section{Experiments} \subsection{Datasets} We use 3 publicly available AVSR datasets in this work. The Lip Reading in the Wild (LRW)~\cite{chung2016lip} dataset is used for visual pre-training and the Lip Reading Sentences 2 (LRS2)~\cite{afouras2018deep} and Lip Reading Sentences 3 (LRS3)~\cite{afouras2018lrs3} datasets are used for training and evaluation. \textbf{LRW dataset.} LRW is an audio-visual word recognition dataset consisting of short video segments containing a single word out of a vocabulary of 500. The dataset comprise 488,766 training samples with at least 800 utterances per class and a validation and test sets of 25,000 samples containing 50 utterances per class. \textbf{LRS2 \& LRS3 datasets.} The LRS2 dataset is composed of 224.1 hours with 144,482 videos clips from the BBC television whereas the LRS3 dataset consists of 438.9 hours with 151,819 video clips extracted from TED and TEDx talks. Both datasets include corresponding subtitles with word alignment boundaries and are composed of a pre-train split, train-val split and test split. LRS2 has 96,318 utterances for pre-training (195 hours), 45,839 for training (28 hours), 1,082 for validation (0.6 hours), and 1,243 for testing (0.5 hours). Whereas LRS3 has 118,516 utterances in the pre-training set (408 hours), 31,982 utterances in the training-validation set (30 hours) and 1,321 utterances in the test set (0.9 hours). All videos contain a single speaker, have a $224\times 224$ pixels resolution and are sampled at 25 fps with 16kHz audio. \begin{table*}[ht] \centering \caption{Comparison of WER (\%) on LRS2 / LRS3 test sets with recently published methods using publicly and non-publicly available datasets for Audio-Only (AO), Visual-Only (VO) and Audio-Visual (AV) models.} \hfill \break \begin{tabular}{ccccccc} \hline \multirow{2}{*}{\textbf{Method}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Model} \\ \textbf{Criterion}\end{tabular}}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Training} \\ \textbf{Datasets}\end{tabular}}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Total} \\ \textbf{Hours}\end{tabular}}} & \multicolumn{3}{c}{\textbf{test WER}}\\ & & & & \textbf{AO} & \textbf{VO} & \textbf{AV} \\\hline\hline \multicolumn{7}{c}{($\downarrow$) \textit{Using Publicly Available Datasets} ($\downarrow$)}\\ \hline Petridis~\textit{et al.}~\cite{petridis2018audio} & CTC+S2S & LRW, LRS2 & 381 & 8.3 / - & 63.5 / - & 7.0 / -\\ \hline Zhang~\textit{et al.}~\cite{zhang2019spatio} & S2S & LRW, LRS2\&3 & 788 / 790 & - & 51.7 / 60.1 & - \\ \hline Afouras~\textit{et al.}~\cite{afouras2020asr} & CTC & VoxCeleb2\textsuperscript{clean}, LRS2\&3 & 1,032 / 808 & - & 51.3 / 59.8 & -\\\hline Xu~\textit{et al.}~\cite{xu2020discriminative} & S2S & LRW, LRS3 & 595 & - / 7.2 & - / 57.8 & - / 6.8 \\\hline Yu~\textit{et al.}\cite{yu2020audio} & LF-MMI & LRS2 & 224 & 6.7 / - & 48.9 / - & 5.9 / - \\ \hline Ma~\textit{et al.}~\cite{ma2021end} & CTC+S2S & LRW, LRS2\&3 & 381 / 595 & 3.9 / 2.3 & 37.9 / 43.3 & 3.7 / 2.3 \\\hline Prajwal~\textit{et al.}~\cite{prajwal2022sub} & S2S & LRS2\&3 & 698 & - & 28.9 / 40.6 & - \\\hline Ma~\textit{et al.}~\cite{ma2022visual} & CTC+S2S & LRW, LRS2\&3 & 818 & - & \textbf{27.3 / 34.7} & - \\\hline \rowcolor{lightgray}\textbf{Ours} & CTC & LRW, LRS2\&3 & 818 & \textbf{2.8 / 2.1} & 32.6 / 39.2 & \textbf{2.5 / 1.9} \\\hline \rowcolor{lightgray}\textbf{+ Neural LM} & CTC & LRW, LRS2\&3 & 818 & \textbf{2.4 / 2.0} & 29.8 / 37.5 & \textbf{2.3~/~1.8} \\\hline\hline \multicolumn{7}{c}{($\downarrow$) \textit{Using Non-Publicly Available Datasets} ($\downarrow$)}\\ \hline Afouras~\textit{et al.}~\cite{afouras2018deep} & S2S & MVLRS, LRS2\&3 & 1,395 & 9.7 / 8.3 & 48.3 / 58.9 & 8.5 / 7.2\\\hline Zhao~\textit{et al.}~\cite{zhao2020hearing} & S2S & MVLRS, LRS2 & 954 & - & 65.3 / - & - \\ \hline Shillingford~\textit{et al.}~\cite{shillingford2018large} & CTC & LRVSR & 3,886 & - & - / 55.1 & -\\ \hline Makino~\textit{et al.}~\cite{makino2019recurrent} & Transducer & YouTube-31k & 31,000 & - / 4.8 & - / 33.6 & - / 4.5 \\\hline Serdyuk~\textit{et al.}~\cite{serdyuk2021audio} & Transducer & YouTube-90k & 91,000 & - & - / 25.9 & - / 2.3 \\\hline Prajwal~\textit{et al.}~\cite{prajwal2022sub} & S2S & MVLRS, TEDx\textsubscript{ext}, LRS2\&3 & 2,676 & - & 22.6 / 30.7 & - \\\hline Ma~\textit{et al.}~\cite{ma2022visual} & CTC+S2S & LRW, AVSpeech, LRS2\&3 & 1,459 & - & 25.5 / 31.5 & - \\\hline \end{tabular} \label{table:results} \vspace{-0.25cm} \end{table*} \subsection{Implementation Details} \textbf{Pre-processing} Similar to~\cite{ma2021end}, we remove differences related to rotation and scale by cropping the lip regions using bounding boxes of $96 \times 96$ pixels to facilitate recognition. The RetinaFace~\cite{deng2020retinaface} face detector and Face Alignment Network (FAN)~\cite{bulat2017far} are used to detect 68 facial landmarks. The cropped images are then converted to gray-scale and normalised between $-1$ and $1$. Facial landmarks of the LRW, LRS2 and LRS3 datasets are obtained from previous work~\cite{ma2022visual} and reused for pre-processing to get a clean comparison of the methods. A byte-pair encoding tokenizer is built from LRS2\&3 pre-train and trainval splits transcripts using sentencepiece~\cite{kudo2018sentencepiece}. We use a vocabulary size of 256 including the CTC blank token following preceding works on CTC-based speech recognition~\cite{majumdar2021citrinet,burchi2021efficient}. \textbf{Data augmentation} Spec-Augment~\cite{park2020specaugment} is applied on the audio mel-spectrograms during training to prevent over-fitting with two frequency masks with mask size parameter $F=27$ and five time masks with adaptive size $pS=0.05$. Similarly to~\cite{ma2022visual}, we mask videos on the time axis using one mask per second with the maximum mask duration set to 0.4 seconds. Random cropping with size $88 \times 88$ and horizontal flipping are also performed for each video during training. We also follow Prajwal~\textit{et al.}~\cite{prajwal2022sub} using central crop with horizontal flipping at test time for visual-only experiments. \textbf{Training Setup} We first pre-train the visual encoder on the LRW dataset~\cite{chung2016lip} using cross-entropy loss to recognize words being spoken. The visual encoder is pre-trained for 30 epochs and front-end weights are then used as initialization for training. Audio and visual encoders are trained on the LRS2\&3 datasets using a Noam schedule~\cite{vaswani2017attention} with 10k warmup steps and a peak learning rate of 1e-3. We use the Adam optimizer~\cite{kingma2014adam} with $\beta_1=0.9$, $\beta_2=0.98$. L2 regularization with a 1e-6 weight is also added to all the trainable weights of the model. We train all models with a global batch size of 256 on 4 GPUs, using a batch size of 16 per GPU with 4 accumulated steps. Nvidia A100 40GB GPUs are used for visual-only and audio-visual experiments while RTX 2080 Ti are used for audio-only experiments. The audio-only models are trained for 200 epochs while visual-only and audio-visual models are trained for 100 and 70 epochs respectively. Note that we only keep videos shorter than 400 frames (16 seconds) during training. Finally, we average models weights over the last 10 epoch checkpoints using Stochastic Weight Averaging~\cite{izmailov2018averaging} before evaluation. \textbf{Language Models.} Similarly to~\cite{li2019jasper}, we experiment with a N-gram~\cite{heafield2011kenlm} statistical language model (LM) and a Transformer neural language model. A 6-gram LM is used to generate a list of hypotheses using beam search and an external Transformer LM is used to rescore the final list. The 6-gram LM is trained on the LRS2\&3 pre-train and train-val transcriptions. Concerning the neural LM, we pretrain a 12 layer GPT-3 Small~\cite{brown2020language} on the LibriSpeech LM corpus for 0.5M steps using a batch size of 0.1M tokens and finetune it for 10 epochs on the LRS2\&3 transcriptions. \subsection{Results} Table~\ref{table:results} compares WERs of our Audio-Visual Efficient Conformer with state-of-the-art methods on the LRS2 and LRS3 test sets. Our Audio-Visual Efficient Conformer achieves state-of-the-art performances with WER of 2.3\%/1.8\%. On the visual-only track, our CTC model competes with most recent autoregressive methods using S2S criterion. We were able to recover similar results but still lack behind~\textit{Ma et al.}~\cite{ma2022visual} which uses auxiliary losses with pre-trained audio-only and visual-only networks. We found our audio-visual network to converge faster than audio-only experiments, reaching better performance using 4 times less training steps. The intermediate CTC losses of the visual encoder could reach lower levels than in visual-only experiments showing that optimizing audio-visual layers can help pre-fusion layers to learn better representations. \subsection{Ablation Studies} We propose a detailed ablation study to better understand the improvements in terms of complexity and WER brought by each architectural modification. We report the number of operations measured in FLOPs (number of multiply-and-add operations) for the network to process a ten second audio/video clip. Inverse Real Time Factor (Inv RTF) is also measured on the LRS3 test set by decoding with a batch size 1 on a single Intel Core i7-12700 CPU thread. All ablations were performed by training audio-only models for 200 epochs and visual-only / audio-visual models for 50 epochs. \begin{figure*}[ht] \centering \includegraphics[width=0.95\linewidth]{figures/inter_preds.pdf} \caption{Output example of our Visual-only model using greedy search decoding on the LRS3 test set with intermediate CTC prediction every 3 blocks. The sentence is almost correctly transcribed except for the missing 'a' before '10 year'.} \label{fig:inter_preds} \end{figure*} \textbf{Efficient Conformer Visual Back-end.} We improve the recently proposed visual Conformer encoder~\cite{ma2021end} using an Efficient Conformer back-end network. The use of byte pair encodings for tokenization instead of characters allows us to further downsample temporal sequences without impacting the computation of CTC loss. Table~\ref{table:back-end} shows that using an Efficient Conformer back-end network for our visual-only model leads to better performances while reducing model complexity and training time. The number of model parameters is also slightly decreased. \begin{table}[ht] \vspace{-0.25cm} \centering \scriptsize \caption{Ablation study on visual back-end network.} \hfill \break \begin{tabular}{c|ccccc} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Visual} \\ \textbf{Back-end}\end{tabular}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{\#Params} \\ \textbf{(Million)}\end{tabular}}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS2}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS3}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{\#FLOPs} \\ \textbf{(Billion)}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Inv} \\ \textbf{RTF}\end{tabular}}\\\\ \hline\hline Conformer & 43.0 & 39.53 & 47.14 & 87.94 & 5.17 \\ Eff Conf & 40.4 & \textbf{37.39} & \textbf{44.96} & 84.52 & 5.26 \\\hline \end{tabular} \label{table:back-end} \end{table} \textbf{Inter CTC residual modules.} Similar to~\cite{nozaki2021relaxing}, we experiment adding Inter CTC residual modules between blocks to relax the conditional independence assumption of CTC. Table~\ref{table:interctc} shows that using intermediate CTC losses every 3 Conformer blocks greatly helps to reduce WER, except for the audio-only setting where this does not improve performance. Figure~\ref{fig:inter_preds} gives an example of intermediate block predictions decoded using greedy search without an external language model on the test set of LRS3. We can see that the output is being refined in the encoder layers by conditioning on the intermediate predictions of previous layers. Since our model refines the output over the frame-level predictions, it can correct insertion and deletion errors in addition to substitution errors. We further study the impact of Inter CTC on multi-modal learning by measuring the performance of our audio-visual model when one of the two modalities is masked. As pointed out by preceding works~\cite{chung2016lip, afouras2018deep, makino2019recurrent}, networks with multi-modal inputs can often be dominated by one of the modes. In our case speech recognition is a significantly easier problem than lip reading which can cause the model to ignore visual information. Table~\ref{table:interctc_mask} shows that Inter CTC can help to counter this problem by forcing pre-fusion layers to transcribe the input signal. \begin{table}[ht] \vspace{-0.25cm} \centering \scriptsize \caption{Ablation study on Inter CTC residual modules.} \hfill \break \begin{tabular}{cccccc} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Model} \\ \textbf{Back-end}\end{tabular}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{\#Params} \\ \textbf{(Million)}\end{tabular}}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS2}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS3}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{\#FLOPs} \\ \textbf{(Billion)}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Inv} \\ \textbf{RTF}\end{tabular}}\\\\ \hline\hline \textit{Audio-only} ($\downarrow$) \\\hline Eff Conf & 31.5 & 2.83 & 2.13 & 7.54 & 51.98 \\\hline + Inter CTC & 32.1 & 2.84 & 2.11 & 7.67 & 50.30 \\\hline\hline \textit{Visual-only} ($\downarrow$) \\\hline Eff Conf & 40.4 & 37.39 & 44.96 & 84.52 & 5.26 \\\hline + Inter CTC & 40.9 & \textbf{33.82} & \textbf{40.63} & 84.60 & 5.26 \\\hline\hline \textit{Audio-visual} ($\downarrow$) \\\hline Eff Conf & 60.9 & 2.87 & 2.54 & 90.53 & 4.84 \\\hline + Inter CTC & 61.7 & 2.58 & 1.99 & 90.66 & 4.82 \\\hline \end{tabular} \label{table:interctc} \end{table} \begin{table}[ht] \vspace{-0.75cm} \centering \scriptsize \caption{Impact of Inter CTC on audio-visual model WER (\%) for LRS2 / LRS3 test sets in a masked modality setting.} \hfill \break \begin{tabular}{c|ccc} \hline \multirow{2}{*}{\textbf{Inter CTC}} & \multicolumn{3}{c}{\textbf{Audio-Visual Eval Mode}}\\ & \textbf{masked video} & \textbf{masked audio} & \textbf{no mask}\\ \hline\hline No & 4.48 / 3.22 & 52.77 / 59.10 & 2.87 / 2.54 \\ Yes & \textbf{3.39 / 2.38} & \textbf{37.62 / 46.55} & \textbf{2.58 / 1.99} \\ \hline \end{tabular} \label{table:interctc_mask} \end{table} \textbf{Patch multi-head self-attention.} We experiment replacing grouped attention by patch attention in the first audio encoder stage. Our objective being to increase the model efficiency and simplicity without harming performance. Grouped attention was proposed in~\cite{burchi2021efficient} to reduce attention complexity for long sequences in the first encoder stage. Table~\ref{table:attention} shows the impact of each attention variant on our audio-only model performance and complexity. We start with an Efficient Conformer (M)~\cite{burchi2021efficient} and replace the attention mechanism. We find that grouped attention can be replaced by patch attention without a loss of performance using a patch size of 3 in the first back-end stage. \begin{table}[ht] \centering \scriptsize \caption{Ablation study on audio back-end attention.} \hfill \break \begin{tabular}{c|ccccc} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Attention} \\ \textbf{Type}\end{tabular}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Group /} \\ \textbf{Patch Size}\end{tabular}}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS2}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{LRS3}\\ \textbf{test}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{\#FLOPs} \\ \textbf{(Billion)}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Inv} \\ \textbf{RTF}\end{tabular}}\\\\ \hline\hline Regular & - & 2.85 & 2.12 & 8.66 & 49.86 \\ Grouped & 3, 1, 1 & 2.82 & 2.13 & 8.06 & 50.27 \\ Patch & 3, 1, 1 & 2.83 & 2.13 & \textbf{7.54} & \textbf{51.98} \\\hline \end{tabular} \label{table:attention} \vspace{-0.25cm} \end{table} \subsection{Noise Robustness} We measure model noise robustness using various types of noise and compare our Audio-Visual Efficient Conformer with recently published methods. Figure~\ref{fig:noise} shows the WER evolution of audio-only (AO), visual-only (VO) and audio-visual (AV) models with respect to multiple Signal to Noise Ratio (SNR) using white noise and babble noise from the NoiseX corpus~\cite{varga1993assessment}. We find that processing both audio and visual modalities can help to significantly improve speech recognition robustness with respect to babble noise. Moreover, we also experiment adding babble noise during training as done in previous works~\cite{petridis2018audio, ma2021end} and find that it can further improve noise robustness at test time. \textbf{Robustness to various types of noise.} We gather various types of recorded audio noise including sounds and music. In Table~\ref{table:noise}, we observe that the Audio-Visual Efficient Conformer consistently achieves better performance than its audio-only counterpart in the presence of various noise types. This confirm our hypothesis that the audio-visual model is able to use the visual modality to aid speech recognition when audio noise is present in the input. \begin{figure}[ht] \begin{minipage}[]{1.0\linewidth} \subfloat[Babble noise]{\includegraphics[width=\textwidth]{figures/chart_aug.pdf}}\\ \subfloat[White noise]{\includegraphics[width=\textwidth]{figures/chart_white.pdf}} \caption{\textbf{LRS2 and LRS3 test WER (\%) as a function of SNR (dB).} * indicates experiments being trained with babble noise. We measure noise robustness by evaluating our models in the presence of babble and white noise.} \label{fig:noise} \end{minipage} \end{figure} \begin{table}[ht] \centering \scriptsize \caption{LRS3 test WER (\%) as a function of SNR (dB).} \hfill \break \begin{tabular}{c|ccccccc} \hline \multirow{2}{*}{\textbf{Noise}} & \multirow{2}{*}{\textbf{Mode}} & \multicolumn{6}{c}{\textbf{SNR (dB)}} \\ & & \textbf{-5} & \textbf{0} & \textbf{5} & \textbf{10} & \textbf{15} & \textbf{20} \\\hline\hline \multirow{3}{*}{babble} & AO & 75.9 & 32.4 & 9.3 & 4.1 & 2.7 & 2.3 \\ & AV & 33.5 & 14.8 & 5.4 & 3.0 & 2.3 & 2.0 \\ & AV* & 11.2 & 4.9 & 3.1 & 2.5 & 2.2 & 2.0 \\ \hline \multirow{3}{*}{white} & AO & 77.6 & 34.0 & 15.5 & 7.3 & 4.1 & 2.8 \\ & AV & 28.9 & 14.7 & 5.5 & 3.0 & 2.3 & 2.0 \\ & AV* & 17.4 & 8.9 & 3.6 & 2.8 & 2.3 & 2.0\\ \hline \multirow{3}{*}{birds} & AO & 51.8 & 23.9 & 10.9 & 5.9 & 3.7 & 2.8 \\ & AV & 21.6 & 11.5 & 6.2 & 4.1 & 2.9 & 2.4 \\ & AV* & 15.9 & 8.3 & 4.9 & 3.4 & 2.7 & 2.4\\ \hline \multirow{3}{*}{chainsaw} & AO & 82.9 & 41.2 & 14.8 & 5.5 & 3.7 & 2.7 \\ & AV & 37.8 & 17.3 & 7.6 & 3.9 & 2.6 & 2.3 \\ & AV* & 25.8 & 10.8 & 5.0 & 3.2 & 2.4 & 2.3 \\ \hline \multirow{3}{*}{jazz} & AO & 25.3 & 9.7 & 4.1 & 3.1 & 2.6 & 2.3 \\ & AV & 13.9 & 6.0 & 3.2 & 2.4 & 2.3 & 2.0 \\ & AV* & 10.6 & 4.2 & 2.8 & 2.4 & 2.2 & 2.0\\ \hline \multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}street \\ raining\end{tabular}} & AO & 58.4 & 23.8 & 8.9 & 4.6 & 3.0 & 2.5 \\ & AV & 27.12 & 10.8 & 5.7 & 3.1 & 2.7 & 2.3 \\ & AV* & 15.9 & 6.9 & 3.8 & 2.7 & 2.3 & 2.2\\ \hline \multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}washing \\ dishes\end{tabular}} & AO & 47.8 & 24.5 & 11.5 & 6.0 & 3.7 & 2.8 \\ & AV & 21.3 & 11.5 & 6.1 & 3.6 & 2.8 & 2.3 \\ & AV* & 14.2 & 7.3 & 4.3 & 2.2 & 2.6 & 2.3\\ \hline \multirow{3}{*}{train} & AO & 51.3 & 18.6 & 7.0 & 4.0 & 2.9 & 2.5 \\ & AV & 23.1 & 10.1 & 4.7 & 3.0 & 2.4 & 2.2 \\ & AV* & 14.5 & 6.2 & 3.5 & 2.6 & 2.3 & 2.2\\ \hline \end{tabular} \label{table:noise} \vspace{-1.0cm} \end{table} \textbf{Comparison with other methods.} We compare our method with results provided by Ma et al.~\cite{ma2021end} and Petridis~\textit{et al.}~\cite{petridis2018audio} on the LRS2 test set. Table~\ref{table:noise_ma} shows that our audio-visual model achieves lower WER in the presence of babble noise, reaching WER of 9.7\% at -5 dB SNR against 16.3\% for Ma~\textit{et al.}~\cite{ma2021end}. \begin{table}[ht] \centering \scriptsize \caption{Comparison with Ma~\textit{et al.}~\cite{ma2021end}. LRS2 test WER (\%) as a function of SNR (dB) using babble noise.} \hfill \break \begin{tabular}{c|ccccccc} \hline \multirow{2}{*}{\textbf{Method}} & \multirow{2}{*}{\textbf{Mode}} & \multicolumn{6}{c}{\textbf{SNR (dB)}} \\ & & \textbf{-5} & \textbf{0} & \textbf{5} & \textbf{10} & \textbf{15} & \textbf{20} \\\hline\hline \multirow{3}{*}{Ma~\textit{et al.}~\cite{ma2021end}} & VO & 37.9 & 37.9 & 37.9 & 37.9 & 37.9 & 37.9 \\ & AO* & 28.8& 9.8 & 7 & 5.2 & 4.5 & 4.2 \\ & AV* & 16.3 & 7.5 & 6.1 & 4.7 & 4.4 & 4.2 \\ \hline \multirow{4}{*}{Ours} & VO & 32.6 & 32.6 & 32.6 & 32.6 & 32.6 & 32.6 \\ & AO & 70.5 & 27 & 8.6 & 4.7 & 3.4 & 3.1 \\ & AV & 25 & 11.2 & 5.1 & 3.2 & 2.8 & 2.6 \\ & AV* & \textbf{9.7} & \textbf{5} & \textbf{3.4} & \textbf{2.9} & \textbf{2.8} & \textbf{2.6} \\ \hline \end{tabular} \label{table:noise_ma} \vspace{-0.25cm} \end{table} \begin{table}[ht] \centering \scriptsize \caption{Comparison with Petridis~\textit{et al.}~\cite{petridis2018audio}. LRS2 test WER (\%) as a function of SNR (dB) using white noise.} \hfill \break \begin{tabular}{c|ccccccc} \hline \multirow{2}{*}{\textbf{Method}} & \multirow{2}{*}{\textbf{Mode}} & \multicolumn{6}{c}{\textbf{SNR (dB)}} \\ & & \textbf{-5} & \textbf{0} & \textbf{5} & \textbf{10} & \textbf{15} & \textbf{20} \\\hline\hline \multirow{3}{*}{Petridis~\textit{et al.}~\cite{petridis2018audio}} & VO & 63.5 & 63.5 & 63.5 & 63.5 & 63.5 & 63.5 \\ & AO* & 85.0 & 45.4 & 19.6 & 11.7 & 9.4 & 8.4 \\ & AV* & 55.0 & 26.1 & 13.2 & 9.4 & 8.0 & 7.3 \\ \hline \multirow{4}{*}{Ours} & VO & 32.6 & 32.6 & 32.6 & 32.6 & 32.6 & 32.6 \\ & AO & 73.1 & 32.3 & 14.3 & 7.2 & 4.4 & 3.5 \\ & AV & 22.5 & 11.5 & 6.2 & 4.1 & 3.2 & 2.9 \\ & AV* & \textbf{14.4} & \textbf{8.0} & \textbf{5.1} & \textbf{3.9} & \textbf{3.1} & \textbf{2.9} \\ \hline \end{tabular} \label{table:noise_petridis} \vspace{-0.25cm} \end{table} \section{Introduction} \begin{figure}[tb] \centering \includegraphics[width=0.75\linewidth]{figures/AVEC.pdf} \caption{\textbf{Audio-Visual Efficient Conformer architecture.} The model is trained end-to-end using CTC loss and takes raw audio waveforms and lip movements from the speaker as inputs.} \label{fig:model} \vspace{-0.5cm} \end{figure} End-to-end Automatic Speech Recognition based on deep neural networks has become the standard of state-of-the-art approaches in recent years~\cite{kriman2020quartznet, zhang2020transformer, han2020contextnet, gulati2020conformer, guo2021recent, majumdar2021citrinet, burchi2021efficient}. The availability of large scale hand-labeled datasets and sufficient computing resources made it possible to train powerful deep neural networks for ASR, reaching very low WER on academic benchmarks like LibriSpeech~\cite{panayotov2015librispeech}. Neural architectures like Recurrent Neural Networks (RNN)~\cite{graves2013speech, hannun2014deep}, Convolution Neural Networks (CNN)~\cite{collobert2016wav2letter, li2019jasper} and Transformers~\cite{dong2018speech, karita2019comparative} have successfully been trained from raw audio waveforms and mel-spectrograms audio features to transcribe speech to text. Recently, Gulati~\textit{et al.}~\cite{gulati2020conformer} proposed a convolution-augmented transformer architecture (Conformer) to model both local and global dependencies using convolution and attention to reach better speech recognition performance. Concurrently, Nozaki~\textit{et al.}~\cite{nozaki2021relaxing} improved CTC-based speech recognition by conditioning intermediate encoder block features on early predictions using intermediate CTC losses~\cite{graves2006connectionist}. Burchi~\textit{et al.}~\cite{burchi2021efficient} also proposed an Efficient Conformer architecture using grouped attention for speech recognition, lowering the amount of computation while achieving better performance. Inspired from computer vision backbones, the Efficient Conformer encoder is composed of multiple stages where each stage comprises a number of Conformer blocks to progressively downsample and project the audio sequence to wider feature dimensions. Yet, even if these audio-only approaches are breaking the state-of-the-art, one major pitfall for using them in the real-world is the rapid deterioration of performance in the presence of ambient noise. In parallel to that, Audio Visual Speech Recognition (AVSR) has recently attracted a lot of research attention due to its ability to use image processing techniques to aid speech recognition systems. Preceding works have shown that including the visual modality of lip movements could improve the robustness of ASR systems with respect to noise while reaching better recognition performance~\cite{son2017lip, sterpu2018attention, petridis2018audio, afouras2018deep, xu2020discriminative, ma2021end}. Xu~\textit{et al.}~\cite{xu2020discriminative} proposed a two-stage approach to first separate the target voice from background noise using the speakers lip movements and then transcribe the filtered audio signal with the help of lip movements. Petridis~\textit{et al.}~\cite{petridis2018audio} uses a hybrid architecture, training an LSTM-based sequence-to-sequence (S2S) model with an auxiliary CTC loss using an early fusion strategy to reach better performance. Ma~\textit{et al.}~\cite{ma2021end} uses Conformer back-end networks with ResNet-18~\cite{he2016deep} front-end networks to improve recognition performance. Other works focus on Visual Speech Recognition (VSR), only using lip movements to transcribe spoken language into text~\cite{assael2016lipnet, chung2017lip, zhang2019spatio, afouras2020asr, zhao2020hearing, prajwal2022sub, ma2022visual}. An important line of research is the use of cross-modal distillation. Afouras~\textit{et al.}~\cite{afouras2020asr} and Zhao~\textit{et al.}~\cite{zhao2020hearing} proposed to improve the lip reading performance by distilling from an ASR model trained on a large-scale audio-only corpus while Ma~\textit{et al.}~\cite{ma2022visual} uses prediction-based auxiliary tasks. Prajwal~\textit{et al.}~\cite{prajwal2022sub} also proposed to use sub-words units instead of characters to transcribe sequences, greatly reducing running time and memory requirements. Also providing a language prior, reducing the language modelling burden of the model. In this work we focus on the design of a noise robust speech recognition architecture processing both audio and visual modalities. We use the recently proposed CTC-based Efficient Conformer architecture~\cite{burchi2021efficient} and show that including the visual modality of lip movements can successfully improve noise robustness while significantly accelerating training. Our Audio-Visual Efficient Conformer (AVEC) reaches lower WER using 4 times less training steps than its audio-only counterpart. Moreover, we are the first work to apply intermediate CTC losses between blocks~\cite{lee2021intermediate, nozaki2021relaxing} to improve visual speech recognition performance. We show that conditioning intermediate features on early predictions using Inter CTC residual modules allows to close the gap in WER between autoregressive and non-autoregressive AVSR systems based on S2S. This also helps to counter a common failure case which is that audio-visual models tend to ignore the visual modality. In this way, we force pre-fusion layers to learn spatiotemporal features. Finally, we replace the Efficient Conformer grouped attention by a more efficient and simpler attention mechanism that we call patch attention. Patch attention reaches similar performance to grouped attention while having a lower complexity. The contributions of this work are as follows: \begin{itemize} \item We improve the noise robustness of the recently proposed Efficient Conformer architecture by processing both audio and visual modalities. \item We condition intermediate Conformer block features on early predictions using Inter CTC residual modules to relax the conditional independence assumption of CTC models. This allows us to close the gap in WER between autoregressive and non-autoregressive methods based on S2S. \item We propose to replace the Efficient Conformer grouped attention by a more efficient and simpler attention mechanism that we call patch attention. Patch attention reaches similar performance to grouped attention with a lower complexity. \item We experiment on publicly available LRS2 and LRS3 datasets and reach state-of-the-art results using audio and visual modalities. \end{itemize} \section{Method} In this section, we describe our proposed Audio-Visual Efficient Conformer network. The model is composed of 4 main components: An audio encoder, a visual encoder, an audio-visual fusion module and an audio-visual encoder. The audio and visual encoders are separated into modality specific front-end networks to transform each input modality into temporal sequences and Efficient Conformer back-end networks to model local and global temporal relationships. The full model is trained end-to-end using intermediate CTC losses between Conformer blocks in addition to the output CTC layer. The complete architecture of the model is shown in Figure~\ref{fig:model}. \subsection{Model Architecture} \textbf{Audio front-end.} The audio front-end network first transforms raw audio wave-forms into mel-spectrograms using a short-time Fourier transform computed over windows of 20ms with a step size of 10ms. 80-dimensional mel-scale log filter banks are applied to the resulting frequency features. The mel-spectrograms are processed by a 2D convolution stem to extract local temporal-frequency features, resulting in a 20ms frame rate signal. The audio front-end architecture is shown in Table~\ref{table:audio-front}. \begin{table}[ht] \centering \scriptsize \caption{Audio Front-end architecture, 1.2 Millions parameters. $T_{a}$ denotes the input audio sample length.} \begin{tabular}[t]{c|cc} \hline \multirow{2}{*}{Stage} & \multirow{2}{*}{Layers} & \multirow{2}{*}{Output Shape} \\\\ \hline\hline $\begin{matrix}$Fourier$\\$Transf$\end{matrix}$& $\begin{matrix}$STFT: 400 window length$\\$160 hop length, 512 ffts$\end{matrix}$ & $(257,~T_{a} // 160 + 1)$\\ \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Mel\\Scale\end{tabular}} & \multirow{2}{*}{Mel Scale: 80 mels} & \multirow{2}{*}{$(80,~T_{a} // 160 + 1)$} \\\\ \hline \multirow{2}{*}{Stem} & \multirow{2}{*}{Conv2d: $3^{2}$, 180 filters, $2^{2}$ stride} & \multirow{2}{*}{$(180,~40,~T_{a} // 320 +1)$} \\\\ \hline \multirow{2}{*}{Proj} & \multirow{2}{*}{Linear, 180 units} & \multirow{2}{*}{$(T_{a} // 320 +1,~180)$}\\\\ \hline \end{tabular} \label{table:audio-front} \vspace{-0.25cm} \end{table} \textbf{Visual front-end.} The visual front-end network~\cite{ma2021end} transforms input video frames into temporal sequences. A 3D convolution stem with kernel size $5\times7\times7$ is first applied to the video. Each video frame is then processed independently using a 2D ResNet-18~\cite{he2016deep} with an output spatial average pooling. Temporal features are then projected to the back-end network input dimension using a linear layer. The visual front-end architecture is shown in Table~\ref{table:visual-front}. \begin{table}[ht] \centering \scriptsize \caption{Visual Front-end architecture, 11.3 Millions parameters. $T_{v}$ denotes the number of input video frames.} \begin{tabular}[t]{c|cc} \hline \multirow{2}{*}{Stage} & \multirow{2}{*}{Layers} & \multirow{2}{*}{Output Shape}\\\\ \hline\hline Stem & $\begin{matrix}$Conv3d: $5 \times 7^{2}$, 64 filters, $1 \times 2^{2}$ stride$\\$MaxPoo3d: $1 \times 3^{2}$, $1 \times 2^{2}$ stride$\end{matrix}$ & $(64,~T_{v},~22,~22)$\\ \hline Res 1 & $2\times\begin{bmatrix}$Conv2d: $3^{2}$, 64 filters$\\$Conv2d: $3^{2}$, 64 filters$\end{bmatrix}$ & $(T_{v},~64,~22,~22)$\\ \hline Res 2 & $2\times\begin{bmatrix}$Conv2d: $3^{2}$, 128 filters$\\$Conv2d: $3^{2}$, 128 filters$\end{bmatrix}$ & $(T_{v},~128,~11,~11)$\\ \hline Res 3 & $2\times\begin{bmatrix}$Conv2d: $3^{2}$, 256 filters$\\$Conv2d: $3^{2}$, 256 filters$\end{bmatrix}$ & $(T_{v},~256,~6,~6)$\\ \hline Res 4 & $2\times\begin{bmatrix}$Conv2d: $3^{2}$, 512 filters$\\$Conv2d: $3^{2}$, 512 filters$\end{bmatrix}$ & $(T_{v},~512,~3,~3)$\\ \hline \multirow{2}{*}{Pool} & \multirow{2}{*}{Global Average Pooling} & \multirow{2}{*}{$(T_{v},~512)$}\\\\ \hline \multirow{2}{*}{Proj} & \multirow{2}{*}{Linear, 256 units} & \multirow{2}{*}{$(T_{v},~256)$}\\\\ \hline \end{tabular} \label{table:visual-front} \vspace{-0.25cm} \end{table} \textbf{Back-end networks.} The back-end networks use an Efficient Conformer architecture. The Efficient Conformer encoder was proposed in~\cite{burchi2021efficient}, it is composed of several stages where each stage comprises a number of Conformer blocks~\cite{gulati2020conformer} using grouped attention with relative positional encodings. The temporal sequence is progressively downsampled using strided convolutions and projected to wider feature dimensions, lowering the amount of computation while achieving better performance. We use 3 stages in the audio back-end network to downsample the audio signal to a 80 milliseconds frame rate. Only 2 stages are necessary to downsample the visual signal to the same frame rate. Table~\ref{table:back-end} shows the hyper-parameter of each back-end network. \begin{table}[htb] \centering \caption{Back-end networks hyper-parameters. \textit{InterCTC blocks} indicates Conformer blocks having a post Inter CTC residual module.} \scriptsize \begin{tabular}{c|ccc} \hline \multirow{2}{*}{Network} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Visual\\ Back-end\end{tabular}}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Audio\\ Back-end\end{tabular}}} & \multicolumn{1}{c}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Audio-Visual\\ Encoder\end{tabular}}} \\ \\ \hline\hline Num Params (M) & 13.6 & 17.9 & 15.9 \\ Num Stages & 2 & 3 & 1\\ Blocks per Stage & 6, 1 & 5, 6, 1 & 5 \\ Total Num Blocks & 7 & 12 & 5 \\ Stage Feature Dim & 256, 360 & 180, 256, 360 & 360 \\ Conv Kernel Size & 15 & 15 & 15 \\ Stage Patch Size & 1, 1 & 3, 1, 1 & 1 \\ InterCTC Blocks & 3, 6 & 8, 11 & 2 \\\hline \end{tabular} \label{table:hp} \end{table} \textbf{Audio-visual fusion module.} Similar to~\cite{petridis2018audio, ma2021end}, we use an early fusion strategy to learn audio-visual features and reduce model complexity. The acoustic and visual features from the back-end networks are concatenated and fed into a joint feed-forward network. The concatenated features of size $2 \times d_{model}$ are first expanded using a linear layer with output size $d_{ff} = 4 \times d_{model}$, passed through a Swish activation function~\cite{ramachandran2017searching} and projected back to the original feature dimension $d_{model}$. \textbf{Audio-visual encoder.} The audio-visual encoder is a single stage back-end network composed of 5 Conformer blocks without downsampling. The encoder outputs are then projected to a CTC layer to maximize the sum of probabilities of correct target alignments. \begin{figure*}[tb] \begin{minipage}[]{1.0\linewidth} \centering \centerline{\includegraphics[width=\linewidth]{figures/patch_attention.pdf}} \caption{\textbf{Patch Multi-Head Self-Attention.} The input sequence is downsampled using an average pooling before applying multi-head self-attention. The output sequence is then upsampled via nearest neighbor upsampling, reducing attention complexity from $O(n^{2}\cdot d)$ to $O((n/k)^{2}\cdot d)$ where $k$ defines the pooling / upsampling kernel size. Patch attention is equivalent to regular attention when $k=1$.} \label{fig:PatchAtt} \end{minipage} \end{figure*} \subsection{Patch Attention.} The Efficient Conformer~\cite{burchi2021efficient} proposed to replace Multi-Head Self-Attention (MHSA)~\cite{vaswani2017attention} in earlier encoder layers with grouped attention. Grouped MHSA reduce attention complexity by grouping neighbouring temporal elements along the feature dimension before applying scaled dot-product attention. Attention having a quadratic computational complexity with respect to the sequence length, this caused the network to have an asymmetric complexity with earlier attention layers requiring more flops than latter layers with shorter sequence length. In this work, we propose to replace grouped attention with a simpler and more efficient attention mechanism that we call patch attention (Figure~\ref{fig:PatchAtt}). \begin{table}[b] \centering \scriptsize \caption{Attention variants complexities including query, key, value and output linear projections. $n$ and $d$ are the sequence length and feature dimension respectively.} \hfill \break \begin{tabular}{c|cc} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Attention \\ Variant\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Hyper \\ Parameter\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Full Attention \\ Complexity\end{tabular}} \\\\ \hline\hline Regular & - & $O(n \cdot d^{2}+n^{2} \cdot d)$ \\ Grouped & Group Size (g) & $O(n \cdot d^{2}+(n/g)^{2}\cdot d \cdot g)$ \\ Patch & Patch Size (k) & $O(n / k \cdot d^{2}+(n/k)^{2} \cdot d)$ \\\hline \end{tabular} \label{table:complexity} \end{table} Similar to the pooling attention proposed by the Multiscale Vision Transformer (MViT)~\cite{fan2021multiscale} for video and image recognition, the patch attention proceed to an average pooling on the input sequence before projection the query, key and values. \begin{align} & X = AvgPooling1d(X_{in})\\ &\text{with}\ Q, K, V=XW^{Q}, XW^{K}, XW^{V} \end{align} Where $W^{Q}$, $W^{K}$, $W^{V}\in \mathbb{R}^{d \times d}$ are query, key and value linear projections parameter matrices. MHSA with relative sinusoidal positional encoding is then performed at lower resolution as: \begin{align} & MHSA(X) = Concat\left(O_{1}, ..., O_{H}\right)W^{O}\\ &\text{with}\ O_{h} = softmax\left(\frac{Q_{h}K_{h}^{T}+S^{rel}_{h}}{\sqrt{d_{h}}}\right)V_{h} \end{align} Where $S^{rel} \in \mathbb{R}^{n \times n}$ is a relative position score matrix that satisfy $S^{rel}[i, j]=Q_{i}E_{j-i}^{T}$. $E$ is the linear projection of a standard sinusoidal positional encoding matrix with positions ranging from $-(n_{max}-1)$ to $(n_{max}-1)$. The attention output sequence is then projected and up-sampled back to the initial resolution using nearest neighbor up-sampling. \begin{align} X_{out} = UpsampleNearest1d(MHSA(X)) \end{align} \begin{figure}[b] \centering \includegraphics[width=1.0\linewidth]{figures/module_flops2.pdf} \caption{\textbf{Audio-only back-end modules FLOPs (Billion).}} \label{fig:module_flops} \vspace{-0.5cm} \end{figure} In consequence, each temporal element of the same patch produce the same attention output. Local temporal relationships are only modeled in the convolution modules while global relationships are modeled by patch attention. We use 1-dimensional patches in this work but patch attention could also be generalized to image and video data using 2D and 3D patches. We leave this to future works. The computational complexity of each attention variant is shown in Table~\ref{table:complexity}. Path attention further reduce complexity compared to grouped attention by decreasing the amount of computation needed by Query, Key, Value and Output fully connected layers while keeping the feature dimension unchanged. Similar to previous work~\cite{burchi2021efficient}, we only use patch attention in the first audio back-end stage to reduce complexity while maintaining model recognition performance. Figure~\ref{fig:module_flops} shows the amount of FLOPs for each attention module variant with respect to encoded sequence length $n$ and model feature dimension $d$. Using patch or grouped attention variants instead of regular MHSA greatly reduce the amount of FLOPs in the first audio back-end stage. \subsection{Intermediate CTC Predictions.} Inspired by \cite{lee2021intermediate} and \cite{nozaki2021relaxing} who proposed to add intermediate CTC losses between encoder blocks to improve CTC-based speech recognition performance, we add Inter CTC residual modules (Figure~\ref{fig:interCTC}) in encoder networks. We condition intermediate block features of both audio, visual and audio-visual encoders on early predictions to relax the conditional independence assumption of CTC models. During both training and inference, each intermediate prediction is summed to the input of the next layer to help recognition. We use the same method proposed in~\cite{nozaki2021relaxing} except that we do not share layer parameters between losses. The $l^{th}$ block output $X^{out}_{l}$ is passed through a feed-forward network with residual connection and a softmax activation function: \begin{align} & Z_{l}=Softmax(Linear(X^{out}_{l}))\\ & X^{in}_{l+1}=X^{out}_{l}+Linear(Z_{l}) \end{align} Where $Z_{l} \in \mathbb{R}^{T \times V}$ is a probability distribution over the output vocabulary. The intermediate CTC loss is then computed using the target sequence $y$ as: \begin{align} & L^{inter}_{l}=-log(P(y|Z_{l}))\\ &\text{with}\ P(y|Z_{l}) = \sum_{\pi \in \mathcal{B}_{CTC}^{-1}(y)}\prod_{t=1}^{T}Z_{t,\pi_{t}} \end{align} Where $\pi \in V^{T}$ are paths of tokens and $\mathcal{B}_{CTC}$ is a many-to-one map that simply removes all blanks and repeated labels from the paths. The total training objective is defined as follows: \begin{flalign} & L = (1 - \lambda)L^{CTC} + \lambda L^{inter}\\ &\text{with}\ L^{inter} = \frac{1}{K}\sum_{k \in \textit{interblocks}}{L^{inter}_{k}} \end{flalign} Where \textit{interblocks} is the set of blocks having a post Inter CTC residual module (Figure~\ref{fig:interCTC}). Similar to \cite{nozaki2021relaxing}, we use Inter CTC residual modules every 3 Conformer blocks with $\lambda$ set to 0.5 in every experiments. \begin{figure}[tb] \centering \includegraphics[width=0.75\linewidth]{figures/interCTCmodule.pdf} \caption{\textbf{Inter CTC residual module.} Intermediate predictions are summed to the input of the next Conformer block to condition the prediction of the final block on it. Intermediate CTC losses are added to the output CTC loss for the computation of the final loss.} \label{fig:interCTC} \vspace{-0.25cm} \end{figure}
\section{Introduction} Quantum memories for photon pulses are crucial for quantum communications~\cite{duan2001long,kimble2008quantum,simon2017towards} and quantum computing~\cite{kok2007linear,cirac1999distributed}. Via the photon echo technique or electromagnetically induced transparency (EIT) effect, storage of weak coherent-state pulse with efficiency $\sim 90\%$ has been achieved~\cite{hedges2010efficient,cho2016highly,geng2014electromagnetically,Chen2013coherent,vernaz2018highly,Hsiao2018highly}. Recently, storage of Fock-state single-photon (FSSP) pulse with efficiency $>85\%$ has also been realized in laser-cooled rubidium atoms~\cite{wang2019efficient}. However, in these experiments, the length of the target pulse ($\tau_p$) is around a few to tens of microseconds and it is almost three orders larger than the lifetime ($1/\gamma$) of the involved excited state of atoms. High-speed optical quantum memories for short pulses ($\sim 1$~ns) has also been demonstrated~\cite{reim2010towards}, but the storage efficiency is relatively low ($< 30\%$)~\cite{corzo2019waveguide}. Storage of single-photon pulses with high efficiency and high speed remains a challenge~\cite{Heshami2016Quantum,Ma2017Optical,Shi2018Quantum}. Compared to an atomic ensemble~\cite{Fleischhauer2000dark,Fleischhauer2002quantum,Kozhekin,Gorshkov2007universal,Nunn2007Mapping}, single-atom system~\cite{Boozer2007Reversible,Specht2011,giannelli2018optimal,Meng2020imaging} provides a novel platform to explore the fundamental limits of single-photon storage, specifically, the trade-off between storage efficiency and storage speed. A closely related problem, i.e., single- or few-photon scattering by an atom, has been extensively studied~\cite{shen2005coherent,Zhou2008Controllable,shi2009Lehmann,witthaut2010photon,roy2011twophoton,zheng2013Persistent,zhou2013quantum}. Recently, the time-delay induced interference effect attracts new interests about photon scattering by a giant atom ~\cite{guo2017giant,zhao2020single,gu2017microwave,kockum2018,guo2020oscillating,wang2021tnable,zou2022tunable,yin2022single}. However, these research works focus more on the reflection and transmission coefficients, not figures of merit of storage. On the other hand, the impact of photon number quantum fluctuations, which play a crucial role in light-atom interaction at the single-photon level, has not been adequately explored. In this work, we investigate the limits of single-atom-based single-photon storage without and with a control field. For a three-level atom placed in a regular one-dimensional waveguide, there exists an upper limit ($50 \%$) on the single-photon storage efficiency. A chiral waveguide~\cite{Gonzalez2016Nonreciprocal,Du2021nonreciprocal,wang2022unconventional,Pucher2022atomic} or Sagnac interference technique~\cite{Shen2012efficient,shen2012-single,Du2021single} could be used to improve the efficiency and to realize perfect storage. In the absence of a control field, we find high storage efficiency could be obtained only for long single-photon pulses ($\tau_p\gg 1/\gamma$). Thus, there is a trade-off between storage efficiency and storage speed. A control field could be applied to enhance the storage speed and improve the storage efficiency for single photon pulses with length $\tau_p=1/\gamma$. However, the storage speed is ultimately limited by the total decay rate of the involved excited state. Different from an atomic ensemble, a single multi-level atom exhibits high non-linearity. We show that the storage efficiency of a coherent-state single-photon (CSSP) pulse is much lower than that of an FSSP pulse, since nonlinear multi-photon processes have been suppressed. This article is structured as follows. In Sec.~\ref{sec:masterEQ}, we begin by introducing the master equation for a single $\Lambda$-type atom driven by a quantum pulse. In Sec.~\ref{sec:nocontrol}, we investigate the storage of single-photon pulses without a control field. In Sec.~\ref{sec:control}, we show the storage speed could be accelerated via a control field. In Sec.~\ref{sec:PerfectStorage}, we show a chiral waveguide and the Sagnac interferometer could be exploited to realize perfect storage of FSSP pulses. We briefly summarize in Sec.~\ref{sec:summary}. Some details about the master equation are given in Appendix~\ref{sec:appendix}. \begin{figure} \centering \includegraphics[width=8.5cm]{Fig1.pdf} \caption{\label{three_levels_atom}Scattering of a single-photon pulse with center frequency $\omega_0$ and wave-packet function $\tilde{\xi}(t)$ by a three-level $\Lambda$-type atom placed in a one-dimensional waveguide. A control pulse with frequency $\omega_c$ and strength $\Omega_c (t)$ is applied to assist the storage process. The decay rates of the excited state $|e\rangle$ to the two ground states are $\gamma_{eg}$ and $\gamma_{es}$ and $\Delta$ is the two-photon detuning. } \end{figure} \section{Master equations for a $\Lambda$-type atom driven by a quantum pulse\label{sec:masterEQ}} Recently, substantial efforts have been devoted to investigating the scattering of propagating quantum pulses by a local quantum system~\cite{Macha2020,giannelli2018optimal,Shi2015multiphoton,Liao2015single-photon,Liao2016Dynamical}. A systematic master-equation approach has been developed to handle the dynamics the local quantum scatter~\cite{gheri1998photon,combes2012Nphoton,combes2017slh}. The input-output relation has also been incorporated to give the information of the outgoing temporal mode~\cite{Kiilerich2019input,Kiilerich2020quantum}. Here, we follow the approach given in~\cite{gheri1998photon} to handle the storage of both FSSP and CSSP pulses in a single $\Lambda$-type atom. We show that the quantum statistics of the quantum pulse affect the storage efficiency significantly. The basic elements of the storage process are illustrated in Fig.~\ref{three_levels_atom}. The $\Lambda$-type atom, which is described by Hamiltonian $H_a = \omega_e |e\rangle\langle e|+\omega_s |s\rangle\langle s|$, contained two stable ground states $|g\rangle$ and $|s\rangle$ and one excited state $|e\rangle$. For a regular one-dimensional waveguide, both the forward-propagating modes $a(\omega)$ and backward-propagating modes $b(\omega)$ have to be considered. The Hamiltonian for the waveguide photons is given by $H_p = \int d\omega (\omega_0+\omega) [a^{\dagger}(\omega) a(\omega) + b^{\dagger}(\omega) b(\omega)]$, where the frequency of the waveguide photons has been expanded to the first-order of the wave-vector along the propagating direction around the near-resonant mode $\omega_0$~\cite{shen2009theory,huang2013controlling}. The interaction between the atom and waveguide photons is described by \begin{equation} H_{\rm int}\!=\!\!\int\!\! d\omega\! \left[g_{eg}(\omega) \sigma_{ge}^{\dagger}\! +\! g_{es}(\omega) \sigma_{se}^{\dagger}\right] [a(\omega)\! +\! b(\omega)]\! +\! h.c., \label{eq:Hint} \end{equation} where $\sigma_{ge}=|g\rangle\langle e|$, and $\sigma_{se}=|s\rangle\langle e|$. In addition, an extra control laser pulse could be applied to assist and accelerate the storage process. The interaction to the control field is described by Hamiltonian $H_c = [\Omega_c(t)\exp(-i\omega_c t)\sigma_{se}+\rm{h.c.}]$. To enhance the storage efficiency, the two-photon-resonance condition is required ,i.e., $\omega_e-\omega_0 = \omega_e-\omega_s-\omega_c = \Delta$. Both CSSP pulses and FSSP pulses have been commonly used in storage experiments~\cite{liu2022ondemand,Jelena2022Storage}. The dynamics of a nonlinear scatter exhibit very different features under these two types of quantum pulses~\cite{gheri1998photon,Wang2011Efficient,yang2018concept}. The single-photon wave-packet creation operator $a_{\xi}=\int d\omega \xi(\omega)a^{\dagger}(\omega)$ is usually used to generate quantum photon pulse wave function~\cite{loudon2000quantum}. The pulse shape is determined by the normalized spectral amplitude function $\int d\omega |\xi(\omega)|^2=1$. A forward-propagating CSSP and FSSP pulses are described by $|1_{\rm CS}\rangle = \exp(a^{\dagger}_{\xi}-1/2)|0\rangle$ and $|1_{\rm FS}\rangle = a^{\dagger}_{\xi}|0\rangle$, respectively. Initially, the atom is prepared in the ground state $|g\rangle$. The incident single-photon quantum pulse excites the atom and transfers it to state $|s\rangle$ to realize the storage. A CSSP pulse can be treated as a classical driving field. The dynamics of the atom density matrix are governed by a Lindblad master equation $\dot{\rho}(t) = [\mathcal{L}_{ac}+\mathcal{L}_p(t)]\rho(t)$, where \begin{align} \mathcal{L}_{ac} \rho(t) = &- i [H_a+H_c,\rho(t)] - \frac{\gamma_{eg}+\gamma_{es}}{2} \{ |e\rangle\langle e| , \rho(t) \} \nonumber\\ & + \gamma_{eg}\sigma_{ge} \rho(t) \sigma_{ge}^{\dagger}+\gamma_{es} \sigma_{ge} \rho(t) \sigma_{ge}^{\dagger}, \end{align} describes the spontaneous decay of the excited state $|e\rangle$ with a classical control on the storage channel. The pumping of the atom by the CSSP pulse is described by the Liouville operator~\cite{gheri1998photon} \begin{equation} \mathcal{L}_p (t)\rho(t) = -i\sqrt{\frac{\gamma_{eg}}{2}} \left\{ \left[\tilde{\xi}(t)\sigma_{ge}^{\dagger}, \rho(t)\right]+ \left[\tilde{\xi}^{*}(t)\sigma_{ge}, \rho^{\dagger}(t)\right]\right\},\label{eq:Lp} \end{equation} where $\tilde{\xi}(t)$ is the wave-packet function of the CSSP pulse determined by the Fourier transform of $\xi(\omega)$~\cite{yang2018concept}. We emphasize that there is a factor $1/\sqrt{2}$ in $\mathcal{L}_p$, because both the forward and backward waveguide modes will contribute to the decay of the excited state $|e\rangle$, but the target pulse only contains forward modes. Here, we see that a CSSP pulse functions as a classical driving, since $\rho^{\dagger}(t)=\rho(t)$. The traditional Lindblad master equation cannot be used to describe the interaction between a FSSP pulse and a localized quantum system~\cite{gheri1998photon}. A generalized Fock-state master equation has been developed~\cite{gheri1998photon,combes2012Nphoton}, \begin{align} \dot{\rho}(t) &= \mathcal{L}_{ac} \rho(t) +\mathcal{L}_p(t)\rho_{01}(t) \label{evolution equation of rhoS}\\ \dot{\rho}_{01}(t) &= \mathcal{L}_{ac} \rho_{01}(t) - i \sqrt{\frac{\gamma_{eg}}{2}} \tilde{\xi}^*(t) [\sigma_{ge},\rho_{00}(t)], \label{eq:MEQrho_01}\\ \dot{\rho}_{00} (t) &= \mathcal{L}_{ac} \rho_{00}(t), \label{evolution equation of rhor} \end{align} where \begin{equation} \begin{aligned} \rho(t) &= {\rm Tr}_R [U(t) \rho(0) \otimes |1_{\rm FS}\rangle\langle 1_{\rm FS} |\otimes |0_b\rangle\langle 0_b| U^{\dagger}(t)],\\ \rho_{01}(t) &= {\rm Tr}_R[U(t) \rho(0) \otimes |0_a\rangle\langle 1_{\rm FS}|\otimes |0_b\rangle\langle 0_b| U^{\dagger}(t)],\\ \rho_{00}(t) & = {\rm Tr}_R[U(t) \rho(0) \otimes |0_a\rangle\langle 0_a|\otimes |0_b\rangle\langle 0_b| U^{\dagger}(t)], \end{aligned} \end{equation} and $U(t)=\mathcal{T} \exp[-i \int_0^t (H_a + H_p +H_c +H_{\rm int}) dt]$ is the time evolution operator of the whole system. The initial state waveguide modes is $|1_{\rm FS}\rangle\otimes |0_{b}\rangle$. We note that significantly different from a CSSP pule, the pumping by an FSSP pulse [i.e., $\mathcal{L}_p(t)\rho_{01}(t)$] can not be regarded as a classical driving since $\rho_{01}^{\dagger}(t)\neq \rho_{01}(t)$. \begin{figure} \centering \includegraphics[width=9cm, height=4.5cm, clip]{Fig2} \caption{\label{fig2}Optimization of the storage efficiency for a Fock-state single-photon pulse [panel (a)] and a coherent-state single-photon [panel (b)] by varying pulse length $\tau_p$ and decay rate $\gamma_{eg}$. No control field is applied (i.e., $\Omega_c = 0$) and the two-photon detuning $\Delta$ is set as zero.} \end{figure} \begin{figure}[!htbp] \centering \includegraphics[width=8.8cm]{Fig3} \caption{\label{fig3}Contrast between the storage efficiency of a Fock-state single pulse (FSSP) and a coherent-state single-photon (CSSP) pulse. The two-photon detuning $\Delta$ is set as zero. (a) Optimized storage efficiency in the absence of control field with $\Omega_c = 0$ and $\gamma_{eg} = \gamma_{es} = \gamma/2$. (b) Optimized storage efficiency in the presence of a control field with strength $\Omega = 0.7 \gamma$, length $a = 0.9\tau_p$, and relative delay $b = 0.6\tau_p$. The other parameters have been taken as $\gamma_{eg} = 0.9 \gamma$, and $\gamma_{es} = 0.1 \gamma$.} \end{figure} \section{Storage of a single-photon pulse without control field \label{sec:nocontrol}} In this section, we study the storage of a single-photon pulse in the absence of a control pulse, i.e., $\Omega_c = 0$. The advantage of this storage scheme is that no information about the arrival time of the target pulse is needed. The atom initially prepared in state $|g\rangle$ will be excited to state $|e\rangle$ and spontaneously decays to state $|g\rangle$ or the storage state $|s\rangle$. The storage efficiency of a single-photon pulse is defined as the steady-state probability $P_s$ of state $|s\rangle$. We show that the decay rates of the storage channel and the pumping channel must be carefully matched to optimize storage efficiency. We also show that the storage efficiency of a CSSP pulse will be much lower than that of an FSSP pulse. There are three parameters to optimize the storage efficiency, i.e., the two decay rates $\gamma_{eg}$ and $\gamma_{es}$ and the length of the target pulse. Without loss of generality, we assume the target pulse is of the Gaussian shape \begin{equation} \tilde{\xi}(t) = \left(\frac{1}{2 \pi\tau_p^2}\right)^{\frac14} \exp\left[-\frac{\left(t - t_0 \right)^2}{4 \tau_p^2}\right], \label{xi in real space} \end{equation} where $t_0 $ is the time of the pulse arriving at the atom and $\tau_p$ is the half-length of the pulse. In the following, we fix the total decay rate $\gamma = \gamma_{eg}+\gamma_{es}$ of state $|e\rangle$ and take it as the unit of frequency, i.e., $\gamma = 1$. Maximum storage efficiency will be obtained if the decay rates of the pumping and storage channels are equal to each other, i.e., $\gamma_{eg} = \gamma_{es} = \gamma/2$. In Fig.~\ref{fig2}, we plot the storage efficiencies for an FSSP pulse [panel (a)] and a CSSP pulse [panel (b)] as a function of $\gamma_{eg}$ and pulse length $\tau_p$. For a given pulse length, the maximum storage efficiency locates at $\gamma_{eg} = \gamma /2$ for both FSSP and CSSP pulses. On the other hand, the storage efficiency of a longer pulse is larger. This can be seen more clearly in Fig.~\ref{fig3}(a). To obtain higher storage efficiency, one needs to sacrifice the storage speed. \begin{figure} \centering \includegraphics[width=8.8cm]{Fig4.pdf} \caption{\label{fig4}(a) Sketch map of the relative delay $b$ between the target pulse (blue solid line) and the control pulse (orange dashed line). (b) Storage efficiency of a Fock-state pulse varies with the magnitude $\Omega$ and width $a$ of a control pulse. $\gamma_{eg} = 0.9\gamma$, $\gamma_{es} = 0.1\gamma$, and $b = 0.6 \tau_p$. The fitting white dashed line $2a\Omega\sqrt{\pi} = 2.26$ characterizes the constant area under the envelope function $\Omega_c (t)$.} \end{figure} \begin{figure*} \centering \includegraphics[width=16cm]{Fig5.pdf} \caption{\label{fig5}Optimization of storage efficiency of a Fock-state single-photon pulse with $\gamma_{eg} = 0.9\gamma$, $\gamma_{es} = 0.1\gamma$, and $\Omega= 0.7 \gamma$. (a) Optimization with fixed pulse length $\tau_p = 1/\gamma$ and two-photon detuning $\Delta=0$. The fitting white dashed line is given by $b + 2 a = 1.2\times 2 \tau_p$. (b) Optimization with fixed delay $b = 0.6 \tau_p$ and $\Delta=0$. (c) Optimization with half-length $ a = 0.9 \tau_p$ and delay $b = 0.6 \tau_p$ of the control pulse.} \end{figure*} The storage efficiency is strongly affected by the quantum statistics of the target pulse. As shown in Fig.~\ref{fig3}(a), the storage efficiency of an FSSP pulse is much higher than that of a CSSP pulse. The few-level atom functions as a nonlinear system~\cite{yang2018concept,Yao_2020}, and multi-photon processes are suppressed in the extremely weak (single photon) pumping case. We also note that there exists an upper limit in the storage efficiency. When $\tau_p\gg 1/\gamma$, the storage efficiency of the FSSP (CSSP) pulse CSSP reaches the upper limit $0.5$ ($0.4$). This low storage efficiency fundamentally results from the fact that the pumping rate is half of the decay rate of the $|g\rangle\leftrightarrow |e\rangle$ channel~\cite{Liao2015single-photon,yang2018concept}. Perfect storage of single-photon pulses can be realized by enhancing the pumping rate as shown in Sec.~\ref{sec:PerfectStorage}. \section{Storage of a single-photon pulse with a control field \label{sec:control}} In Sec.~\ref{sec:nocontrol}, we show that the storage efficiency for short single-photon pulses ($\tau_p \leq 1/\gamma$) is relatively low. To assist and accelerate the single-photon storage, an extra control field could be applied to $|e\rangle\rightarrow |s\rangle$ channel~\cite{Fleischhauer2000dark,Kozhekin2000Quantum,Nunn2007Mapping,Boozer2007Reversible}. In the absence of a control pulse, maximum storage efficiency is obtained under the decay-rate matching condition $\gamma_{eg}=\gamma_{es}$. The control pulse provides new parameters, which can be much more easily controlled in experiments, to optimize storage efficiency. We show that the total decay rate $\gamma=\gamma_{eg}+\gamma_{es}$ plays an essential role in the storage process. Specifically, it limits the maximum storage speed. This marks a significant difference from the storage of a single-photon pulse in an atomic ensemble, where more attention was paid to the $\sqrt{N}$-enhanced ($N$ is the atom number) coupling strength between the target photon and the collective atomic states ~\cite{Gorshkov2007I,Gorshkov2007II,Gorshkov2008IV}. In the following, we take a Gaussian control pulse as an example. Our main results are also valid for other types of control pules. The envelope of the control pulse is given by \begin{equation} \Omega_c(t) = \Omega \exp {- \left(\frac{t - t_0 - b}{2 a}\right)^2}, \label{Gaussian wave packet of control} \end{equation} where $\Omega$ characterizes the effective strength of the control pulse, $a$ is its half-width, and $t_0$ is the time of the pulse center arriving at the atom. As shown in Fig.~\ref{fig4} (a), $b$ is the relative delay between the target single-photon pulse and the control pulse. In addition to $\gamma_{eg}$ and $\gamma_{es}$, we now have three more easily controlled parameters to optimize single-photon storage. Similar to the $\Omega_c =0$ case, transition rates between the pumping channel and the storage channel also need to be balanced to obtain larger storage efficiency. As shown in Fig.~\ref{fig4} (b), maximum storage efficiency locates around $(\Omega +\gamma_{es})/\gamma_{eg}\approx 1$ when the length of the control pulse is long enough. For a short control pulse ($a < \tau_p$), a larger strength $\Omega$ is required to guarantee that the energy of the control pulse is enough to transfer the population from state $|e\rangle$ to state $|s\rangle$. The white dashed line denotes the fitting curve $2a\Omega \sqrt{\pi} = 2.26$, i.e., the area under the envelope function $\Omega_c(t)$ is a constant. To investigate the benefit of the control pulse, we will take $\gamma_{eg} = 0.9\gamma$ and $\gamma_{es}=0.1\gamma$ when a control pulse is applied. The relative delay $b$ and half-length $a$ of the control pulse need to be matched to obtain larger storage efficiency. In Fig.\ref{fig5} (a), we plot the storage probability $P_s$ of an FSSP pulse as a function of $a$ and $b$. The largest storage efficiency locates at $b= 0.6 \tau_p$ and $a= 0.9 \tau_p$, i.e., a positive delay and a length comparable to the length of the target pulse. A similar delay was also required for an atomic ensemble optical memory~\cite{Nunn2007Mapping}. For a negative delay $b$, higher storage efficiency could also be obtained around the line $b+2a = 1.2\times 2\tau_p$. This guarantees that the control pulse and the target single-photon pulse always have sufficient overlap. There exists a favorable length $\tau_p$ of the target pulse in storage efficiency optimization with fixed delay $b$ and strength $\Omega$ of the control pulse. A larger storage efficiency could be obtained for $\tau_p= 1/\gamma$ as shown in Fig.~\ref{fig3} (b). This marks a significant difference from the case in the absence of a control pulse, in which longer single-photon pulses ($\tau_p\gg 1/\gamma$) always have higher storage efficiency [see Fig.~\ref{fig3} (a)]. In Fig.\ref{fig5} (b), we plot the storage probability $P_s$ of an FSSP pulse as a function of $\tau_p$ and $a=0.9\tau_p$ with $b= 0.6 \tau_p$ and $\Omega = 0.7\gamma$. We show that larger storage efficiency is obtained around $\tau_p=1/\gamma$. Thus, the control pulse could be used to improve the storage speed. Previously, off-resonant Raman technique~\cite{Nunn2007Mapping} has been explored to store a single broadband (short) photon in an atomic ensemble beyond the adiabatic storage frame based on EIT~\cite{Fleischhauer2000dark}. However, in the single-atom case, the two-photon detuning $\Delta$ will reduce the storage efficiency greatly as shown in Fig.~\ref{fig5} (c). Moreover, large storage efficiency is still obtained around $\tau_p=1/\gamma$ for fixed $a$ and $b$. No extra acceleration is obtained with non-zero detuning $\Delta$. The storage of a CSSP pulse is similar to that of an FSSP pulse, but with lower efficiency. \begin{figure} \centering \includegraphics[width=8.5cm]{Fig6.pdf} \caption{\label{fig:6}Sketch map of two possible approaches to improving storage efficiency: (a) The atom only couples to the forward propagating photons in a perfect chiral waveguide. (b) For the Sagnac interferometry method, the target pulse is split into two smaller pulses, which enter the waveguide at different ends.} \end{figure} \begin{figure} \centering \includegraphics[width=8cm]{Fig7} \caption{\label{fig:7} Comparison of improved storage efficiency of a Fock-state single-photon pulse (a) and a coherent-state single-photon pulse (b) without a control field.} \end{figure} \section{Efficient storage via exploiting a chiral waveguide or a Sagnac interferometer\label{sec:PerfectStorage}} In previous sections, we show that the storage of an FSSP pulse in a single three-level atom is limited to $0.5$ with or without a control pulse. The storage efficiency for a CSSP is even lower. This low efficiency strongly hampers the practical application of the single-atom storage scheme. In this section, we show that perfect storage of single-photon pulse in a three-level atom can be realized by exploiting a chiral waveguide~\cite{Mitsch2014Quantum,Jan2014chira,Sollner2015Deterministic,Sayrin2015nanophotonic} or a Sagnac interferometer~\cite{Shen2012efficient,shen2012-single}. Previously, these two methods have been applied successfully to enhance the frequency conversion efficiency~\cite{yan2013tunable,jia2017efficient,Du2021single} and to control single-photon transport~\cite{Gonzalez2016Nonreciprocal,Chen2022Nonreciprocal,lu2017coherent,fan2018tunable,Du2021nonreciprocal}. The underlying mechanism of both approaches is the same, i.e., increasing the coupling efficiency between the atom and the pulse modes. \begin{figure} \centering \includegraphics[width=9cm]{Fig8} \caption{\label{fig:8}Comparison of the improved storage efficiency of Fock-state single-photon (FSSP) and coherent-state single-photon (CSSP) pulses without (a) and with (b) a control pulse. The two-photon detuning is set as $\Delta = 0$. (a) $\gamma_{eg} = \gamma_{es} = \gamma/2$. (b) $\gamma_{eg} = 0.9\gamma$, $\gamma_{es} = 0.1 \gamma$, $\Omega = 0.7\gamma$, $a = 0.9 \tau_p$, and $b = 0.6 \tau_p$.} \end{figure} \begin{figure} \centering \includegraphics[width=8.8cm]{Fig9} \caption{\label{fig:9} Optimization of storage efficiency of a Fock-state single-photon pulse in presence of control field. $\gamma_{eg} = 0.9\gamma$, $\gamma_{es} = 0.1 \gamma$, $\Omega=0.7 \gamma$, $b = 0.6 \tau_p$. (a) Two-photon resonance case with $\Delta = 0$. (b) Off-resonance case with$a = 0.9 \tau_p$.} \end{figure} For a perfect chiral waveguide, the atom only interacts with photons propagating in one direction [see Fig.~\ref{fig:6} (a)], such as the forward-propagating modes $a(\omega)$. The backward-propagating modes will not contribute to the scattering and storage of the target single-photon pulse. The spontaneous decay of the excited state comes solely from the interaction with forward-propagating modes. In this case, the pumping rate of the single-photon pulse does not change, but the decay rates of state $|e\rangle$ are halved. Thus, the $1/\sqrt{2}$-factor in Eqs.~(\ref{eq:Lp}) and (\ref{eq:MEQrho_01}) will be removed. For a Sagnac interferometer case, the incident single-photon pulse will be split into two identical small pulses via a $50:50$ beam splitter. These two small pulses enter the waveguide at two different ends [see Fig.~\ref{fig:6} (b)]. Mathematically, the wave-guide modes can always be re-expanded with even and odd modes $a_{\pm}(\omega)=\left[ a(\omega) \pm b(\omega)\right]/\sqrt{2}$. From Eq.~(\ref{eq:Hint}), we see that the atom is only coupled to even modes. Thus, only even modes will contribute to the spontaneous decay of the atomic excited state. By carefully tuning the relative phase between the two small pulses, one can guarantee that the target pulse (i.e., the superposition of two small pulses) only contains even modes. The target pulse is now described by a new single-photon wave-packet creation operator $a_\xi=\int d\omega \xi (\omega)[a^{\dagger}(\omega)+b^{\dagger}(\omega)]/\sqrt{2}=\int d\omega \xi (\omega)a^{\dagger}_{+}(\omega)$. In this case, the decay rates of state $|e\rangle$ do not change, but the pumping rate of the single-photon pulse gets doubled. Thus, the $1/\sqrt{2}$-factor in Eqs.~(\ref{eq:Lp}) and (\ref{eq:MEQrho_01}) will be removed. \begin{figure} \includegraphics[width=8.5cm]{Fig10}\caption{\label{fig:10} Global optimization of storage efficiency of a Fock-state single-photon pulse in high-dimensional parameter space. (a) The shift of the favorable length of the target pulse. The three lines \{blue solid, orange dotted, yellow dashed\} are obtained with parameters $b=\{1.3\tau_p,0.6\tau_p,-0.4\tau_p\}$, $a=\{0.7\tau_p,0.9\tau_p,1.2\tau_p\}$, $\Omega=\{1.5\tau_p,0.7\tau_p,0.4\tau_p\}$, and $\Delta = 0$. (b) Comparison of the storage efficiency with and without a control pulse. The blue solid line gives the global maximum storage efficiency with $\gamma_{eg} = 0.9\gamma$. The orange dashed line describes the optimal storage efficiency without control pulse ($\gamma_{eg}=\gamma_{es}=0.5\gamma$). The yellow dashed line denotes the case without control pulse and $\gamma_{eg}=0.9\gamma$.} \end{figure} We now show that the perfect storage of single-photon pulses in a single three-level atom can be realized with a chiral waveguide or Sagnac interferometer. In Fig.\ref{fig:7}, we plot the storage probability versus $\tau_p$ and $\gamma_{eg}$ for an FSSP [panel (a)] and a CSSP pulse [panel (b)] in the absence of control pulse. Similar to the regular waveguide case (see Fig.~\ref{fig2}), larger storage efficiency is obtained under the decay-rate matching condition $\gamma_{eg}=\gamma_{es}$. However, the maximum storage efficiency of an FSSP pule can now reach $1$ at the long-pulse limit $\tau_p \gg 1/\gamma$ as shown in Fig.~\ref{fig:8} (a). The upper limit of the storage efficiency of a CSSP pulse has also been raised from $0.4$ to be larger than $0.6$. The storage process can be accelerated by a control pulse without sacrificing the storage efficiency too much. Similar to Sec.~\ref{sec:control}, there exists an favorable pulse length $\tau_p$ in storage efficiency optimization with fixed $b$ and $\Omega$ as shown in Fig.~\ref{fig:8} and Fig.~{\ref{fig:9}}. We emphasize that the maximum storage efficiency in Fig.~\ref{fig:9} is a local one, not the global maximum in the high-dimensional parameter space $\{a,b,\Omega,\Delta,\tau_p\}$. As shown in Fig.~\ref{fig:10} (a), the favorable $\tau_p$ moves toward longer pulses by varying the control pulse parameters, specifically the relative delay $b$. We give the global maximum storage efficiency via brute-force numerical simulations as shown by the blue solid line in Fig.~\ref{fig:10} (d). Compared to cases without a control pulse (the orange solid and yellow dotted lines), much larger storage efficiency for relatively short pulses $\tau_p\sim 1/\gamma$ can be obtained under a control pulse. The storage efficiency of an FSSP pulse with $\tau_p=1/\gamma$ can reach $\sim 0.9$ [see Fig.~\ref{fig:8} (b)]. However, the storage speed is still limited by the total spontaneous decay rate $\gamma$ of the excited state $|e\rangle$. \section{Conclusion\label{sec:summary}} We use a simple model, which is composed of a single $\Lambda$-type atom placed in a 1D waveguide, to explore the limits of single-photon storage. We show that for a regular waveguide, the storage efficiency of an FSSP pulse is limited to $0.5$ and the efficiency of a CSSP pulse is even lower. Perfect single-photon storage could be achieved by exploiting a chiral waveguide or a Sagnac interferometer. We find that there is a trade-off between storage efficiency and storage speed. A control pulse can be applied to accelerate the storage process. However, the storage speed is ultimately limited by the total decay rate of the involved excited state. One of the authors (L.P.Y) showed that the absorption speed of a single-photon pulse is limited by the width of the atom-light interaction spectrum~\cite{yang2018concept}. For an atom interacting with 1D wave-guide modes, the interaction spectrum is almost flat. Thus, the storage speed is mainly limited by de-excitation processes. In most experiments, an atomic ensemble instead of a single atom was used as the storage media. In addition to the pumping strength, the decay rate of the pumping channel is also enhanced by a factor of $N$ ($N$ is an effective atom number). Single-photon storage with high efficiency and high speed could be achieved in the atomic ensemble. \section*{Acknowledgements} The authors thank Xin Yue and Prof. C. P. Sun for the helpful discussion. This work is supported by National Key R\&D Program of China (Grant No. 2021YFE0193500) and NSFC Grant No.12275048.
\section{Introduction} \label{sec:introduction} Recent years have witnessed a remarkable growth in the number and variety of mobile devices and applications in the Internet of Things (IoT) networks. The flourish of IoT, however, has resulted in the generation of a substantial amount of private messages exchanged over public channels, which has grabbed one's attention. Unfortunately, IoT devices are susceptible to various threats and security challenges, which pose hazards for the advancement of IoT in sensitive fields, such as smart homes, unmanned vehicles, e-health, and military networks~\cite{iot2021}. In order to avoid being revealed to a third party, a message is usually encrypted using a secret key shared among the communicating devices. Thus, a key prerequisite of achieving IoT network security is secret key sharing that avoids eavesdropper interception~\cite{end2end2016}. In a classic cryptographic scheme, two legitimate parties, namely Alice and Bob use the public-key cryptosystem (PKC) for key distribution. It is extremely difficult for a third party, namely Eve, to derive the private key or message computationally, due to the intractability of certain mathematical problems used in encryption algorithms. However, the emerging quantum computing technology has the potential to make some previously-intractable problems tractable~\cite{qc2013}. Thus, the security of computational security-based key distribution will be rendered insecure by substantial progress in quantum computing in the coming years, which necessitates the study of alternative solutions that do not rely on computational security. \begin{table*}[htbp] \label{table1} \centering \caption{A Summary and Comparation of Typical Secret Key Distribution Methods} \begin{tabular}{|c|c|c|c|c|c|} \hline \diagbox{Method}{Metric}& Security Level& Mobility Support & Distribution Distance & User Cost \\ \hline PKC& Computational secure& Middle&\textbf{Long}& Middle \\ \hline QKD&\textbf {Information theoretically secure} & Weak&\textbf{Long}&High\\ \hline CRKG& \textbf{Information theoretically secure} &\textbf{Strong}& Short&\textbf{Low}\\ \hline \textbf{CR-QKD}& {\textbf{Information theoretically secure}} &{\textbf{Strong}}&{\textbf{Long}}&{\textbf{Low}} \\ \hline \end{tabular} \end{table*} In this context, much attention has been paid to emerging techniques, such as quantum key distribution (QKD)~\cite{Q6G2022} and channel reciprocity-based key generation (CRKG)~\cite{Li2019Physical}, which can provide secret key sharing service with information-theoretic security, also known as unconditional security or physical security. \begin{itemize} \item QKD is a well-known quantum-resistant mechanism, which distributes secret keys to distant parties by transmitting single photon through a quantum channel~\cite{2013Nature}. Employing the laws of quantum physics, QKD can detect eavesdroppers during the key generation process, in which unauthorized observation of quantum communication induces a discernible increase of errors. This sensitivity to eavesdropping makes QKD possible to ensure the secrecy of the key, even against computationally unbounded adversaries. \item CRKG is built on the basis of channel reciprocity, which means that the channel responses of the forward and backward communication links are very similar in a time division duplex (TDD) system. In addition, the dynamic and complex wireless communication environment makes the channel responses change over time and hard to predict. Therefore, legitimate users can share a pair of common randomness from their radio channel measurements. Since CRKG does not require assistance from a third party nor expensive infrastructure, it has recently emerged as a new paradigm that provides a lightweight and information-theoretic secure key sharing solution for decentralized or device-to-device sensor applications~\cite{maurer1993secret}. \end{itemize} Table~\ref{table1} summarizes these typical secret key distribution methods, and identify their characteristics from perspectives of security level, mobility support, distribution distance and user cost. We find that although the separate construction of QKD and CRKG can be supported in the physical layer, there is no investigation of a secret key sharing scheme for the security demands from remote mobile devices. Although point-to-point connections are suitable to form a backbone quantum core network to bridge long distances, they are less suitable to provide the last-mile service needed to give a multitude of users access to this QKD infrastructure~\cite{2013Nature}. Similarly, despite many research efforts in the field of CRKG, its widespread application is unfortunately hindered by the short distance between transceivers. With a rapid growth of handheld devices, wide-area mobile applications, such as remote environmental and elderly monitoring, have become an inseparable part of IoT networks. A new architecture needs to be developed where end-users between two access networks are connected to a metro network, thus realizing unconditionally secure key sharing in a more cost-effective and flexible manner. In this article, we introduce and experimentally demonstrate the concept of a ‘channel reciprocity-aided quantum key distribution (CR-QKD)’ based on simple and cost-effective telecommunication technologies. This scheme can expand the scope of QKD to IoT networks and therefore vastly broaden users' appeal. The contributions of this article are three-fold: \begin{itemize} \item We introduce a novel secret key sharing architecture, referred to as CR-QKD, which bridges a backbone quantum core network and IoT users by exploiting the technique of CRKG to provide the last-mile service. CR-QKD is information-theoretically secure and it does not require IoT users to be equipped with expensive quantum infrastructures for exchanging secret keys, thereby significantly reducing the hardware requirements. \item We propose a multi-user mechanism to realize the concept of CR-QKD with an elaborate design of key alignment. We also identify challenges that arise due to the hybrid architecture of CR-QKD from the perspective of feasibility and security, respectively. Countermeasures have been studied to reduce the time delay and to improve the secret key generation rate in a secure manner. \item We implement a prototype CR-QKD system in a metropolitan area network, in which secret keys are shared between two remote IoT devices that are roughly fifteen kilometers apart from each other. The experimental results have verified that CR-QKD can provide a secret key rate of 424 bits per second with a retransmission rate of 2.1\%. \end{itemize} \begin{figure*}[htbp] \centering \includegraphics[height=4.8cm,width=12cm]{figures/Mode.pdf} \caption{An illustration of combining QKD and CRKG to realize secure communication between two remote users.} \label{mode} \end{figure*} \section{An Overview of the CR-QKD architecture} In this section, we first introduce QKD and CRKG, and then discuss their combination modes to realize secure communication in wide-area mobile applications. \subsection{QKD} QKD protocols exploit a quantum communication channel and an authenticated classical channel to ensure the exchange of a cryptographic key between two remote parties with proven security. Since its inception in~\cite{BB84}, QKD protocol design and analyses have flourished as a field yielding numerous protocols, security analyses, and practical implementation methodologies. Although QKD research has made remarkable progress, these developments have been largely focused on securing large-scale infrastructures using long distance fiber transmission and free space transmission between fixed terminals. Some efforts have been made toward handheld free-space QKD by exploiting a beam-steering module, which compensates for hand movement of the QKD module at the transmitter~\cite{Chun17,Elmabrok2018Wireless}. However, these schemes have limited transmission range and their QKD receiver is currently difficult to be miniaturized. In other words, they can not provide a bi-directional transmission and are thus not applicable to the case of distributing a quantum key from a core network to an end-user. In this article, QKD is exploited to form a backbone quantum core network to bridge long distances. \subsection{CRKG} CRKG exploits wireless channels between transceivers as random sources for key generation, and these keys can be replenished dynamically as wireless channels vary over time. Eavesdroppers in such situations experience physical channels independent of those of the legitimate users as long as they are a few wavelengths away from these legitimate parties, which is generally the case in wireless networks. So far, the CRKG field has yielded fruitful results from aspects of theoretical exploration, modeling, protocol design, and prototype implementation in various IoT platforms~\cite{ZHANG2020Frontier}. However, these developments have been largely focused on wireless communication technologies for short-range applications, such as ZigBee, ultra-wideband, Bluetooth and WiFi. When the distance is in the order of a few kilometers, the signal-to-noise ratio is small and the time delay between uplink and downlink packets becomes large. Therefore, CRKG at a long distance is challenging to meet the requirement of high correlation between channel parameter measurements for secret key generation~\cite{ZHANG2020Frontier}. Due to these reasons, CRKG is more suitable for secret key sharing between wireless transceivers that are within one kilometer apart and thus exploited in this article to complete the last-mile secret key distribution task from quantum access points (QAP) to IoT users. \subsection{The Combination Mode of QKD and CRKG} Neither QKD nor PKG is applicable to long-range IoT networks, therefore, a critical problem is how to combine their advantages to apply to the new scenario. Fig.~\ref{mode} describes the system model and illustrates one possible combination mode. Alice and Bob are two distant wireless users, who do not have direct links with each other. QAP1 and QAP2 are two quantum nodes that are connected through long-distance optical fibers, or ground-to-satellite free-space links. QAP1 and QAP2 have a wireless link to Alice and Bob, respectively. To complete the secret key distribution between Alice and Bob, three keys are first shared between Alice and QAP1 (link 1), QAP1 and QAP2 (link 2), and QAP2 and Bob (link 3). Channel keys are generated from wireless links 1 and 3 by using the technique of CRKG, while quantum key is distributed from QAP1 to QAP2, or in the reverse direction, with mature QKD techniques. Next, the quantum key is securely delivered to Alice and Bob by encrypting it with channel keys. In other words, Alice and Bob share a unified key, which is then used to encrypt and to decrypt the message in the data transmissions. Therefore, this mode is also abbreviated as unified-key mode. Notably, Alice and Bob are free to choose wireless and Internet routes for message transmission. This consideration is due to the following reasons. First, due to the limited rate of the quantum link, its message transmission rate is relatively small. Second, as Alice and Bob are mobile devices, they are more likely to use communication routes that are different from those in the key distribution process. Finally, the unified-key requires less time delay for message transmission as it only needs one time of message encryption and decryption. The essential process to obtain unified quantum keys is referred to as CR-QKD, which is elaborated in the following section. \begin{figure*}[htbp] \centering \includegraphics[height=6cm,width=17.2cm]{figures/buffer.pdf} \caption{An illustration of CR-QKD in a multi-user scenario: edges distribute quantum keys to users according to their needs, where $N_{A_i,B_j}$ represents the number of key groups required by $A_i-B_j$ user pair and ${N_{A_i}}$ represents the total number of key groups required by user $A_i$.} \label{mutiuser} \end{figure*} \section{Conceptual design of CR-QKD} In this section, we will first introduce the basic mechanism of CR-QKD and then study the key aligment, efficiency and security issues that exist in CR-QKD. \subsection{Mechanism description}\label{sec:IIIA} As shown in Fig.~\ref{mode}, Alice and Bob intend to share quantum key with the help of QAP1 and QAP2, against an adversarial eavesdropper, Eve, tapping on the quantum channel and listening to all the exchanges on the classical channels. Similar to most existing QKD and CRKG protocols, the classical communication channels are assumed to be authenticated, in which the identities of the communicating parties have been verified and the integrity of the transmitted messages is promised. The CR-QKD protocol comprises three main phases, i.e, QKD~\footnote{Our study is not bound to specific QKD protocols, and we choose the BB84 protocol as a representative to introduce the CR-QKD mechanism.}, CRKG and edge forwarding, which will be elaborated below. \begin{itemize} \item {\textbf {QKD phase:}} First, QAP1 prepares and sends to QAP2 a set of random qubits via a single-photon signal over a quantum channel. These qubits are selected from a set of four states with two bases. For every incoming state from QAP1, QAP2 randomly chooses one of the two bases to measure and record the results. Once quantum communication has finished, QAP2 starts base reconciliation by announcing the position of the detected bits and the basis used to QAP1 over a classic channel. Then, QAP1 and QAP2 retain the bits with a coincident basis and discard the rest. After that, QAP1 publishes a subset of these bits to QAP2 for eavesdropping detection. If the error rate between what QAP2 detects and what QAP1 has sent is high, the eavesdropping is detected and these shared bits will be invalid. Otherwise, QAP1 and QAP2 perform information reconciliation and privacy amplification over the rest of the bits that have not been made public. At last, QAP1 and QAP2 check whether they obtain the same result via key verification. If so, they retain the pair of bits as quantum key $K_Q$, otherwise, they discard both of them. \item {\textbf {CRKG phase:}} A CRKG protocol typically contains four stages, i.e., channel probing, quantization, information reconciliation, and privacy amplification. Alice and QAP1 first carry out channel probing, which involves bidirectional measurements within a channel coherence time. They then convert the analog measurements into digital binaries. There will probably be a mismatch between these binaries, hence information reconciliation has to be adopted to correct the mismatch. To avoid information leakage, privacy amplification is employed to distill the reconciliated binaries. Finally, after key verification, Alice and QAP1 retain the pair of bits as channel key $K_{C1}$ and Bob and QAP2 retain the pair of bits as channel key $K_{C2}$. \item {\textbf {Edge forwarding phase:}} In the last phase, previous quantum keys shared between QAP1 and QAP2 are forwarded to Alice and Bob, completing the ultimate task of secret key sharing. Security is the primary concern here, as eavesdroppers should not learn any information about the quantum key through this forwarding process. With the help of channel keys, it is possible for edges to encrypt quantum keys with them using the One-Time-Pad (OTP) encryption algorithm and then forward the ciphertext to users. So far, the secret key sharing task is completed. \end{itemize} Although CR-QKD provides a potential solution, it still faces some challenges to be implemented in practice. We divide these challenges into three categories and discuss along countermeasures below. \subsection{Key alignment} OTP is a well-known example of encryption scheme that provides ``perfect secrecy", however, one challenge here is that the channel key used for OTP must be at least as long as the quantum key to be encrypted. As channel keys, $K_{C1}$ and $K_{C2}$, are generated from different wireless channels, their key generation rates are likely to be different from each other, and that of the quantum key $K_{Q}$. As a result, the quantum keys distributed to Alice and Bob may be disordered. We address the key alignment issue by segmenting quantum key and channel key into groups and numbering them before edge forwarding. Each group has a fixed bit number of $L_G$. Those quantum key and channel key bits belonging to the same group are encrypted through a binary XOR operation. Then, the ciphertext is forwarded, together with the group number. Alice and Bob eventually obtain the quantum key by decrypting the ciphertext using their corresponding channel keys. Here, the trade-off between overhead and real-time must be taken into account in the selection of the group size. If the group size is small, the group number will occupy a field length comparable to that of the ciphertext, and the communication overhead will become significant. Otherwise, if the group size is large, the communication overhead is reduced but it will take a long time to accumulate sufficient keys for forwarding. Next, we extend the key alignment issue into a multi-user scenario, where $A = \{A_1, A_2, \cdots, A_{M_1}\}$ and $B = \{B_1, B_2, \cdots, B_{M_2}\}$ are two sets of IoT users at the service range of QAP1 and QAP2, respectively. Users in $A$ desire to share secret keys with users in $B$. When CR-QKD is applied to this case, a new problem arises, i.e., how to distribute quantum keys from the edge to multiple users, who have different requirements and channel conditions. In this article, we introduce a multi-user edge forwarding strategy, which distributes quantum keys to each user according to its needs. Fig.~\ref{mutiuser} illustrates one round of the quantum key distribution process using this strategy. To start with, users in $A$ broadcast the name of their target users for key sharing and the number of required key groups. After receiving these requests, QAP1 shares the information with QAP2. Then, QAP2 broadcasts it over the air and the relevant users in $B$ record them locally. Next, quantum key sequences are shared between QAP1 and QAP2 through the above QKD phase. These quantum key sequences are segmented into groups and numbered, each having $L_G$ bits. QAP1 allocates quantum key groups for each user pair according to their requests. The mapping relationship of user pairs and the key group number is transmitted to QAP2. This allocation information is saved in a quantum key buffer. In this way, the quantum keys are synchronized at QAP1 and QAP2. Next, they yield channel keys with these demanding users, respectively. For each user, the CRKG process is performed multiple times until it has accumulated sufficient number of key groups. Finally, QAP1 and QAP2 use these CRKG keys to encrypt the corresponding quantum keys and broadcast the ciphertext together with the user pairs and group number to end-users. Each end-user obtains quantum keys by decrypting the related ciphertext with its own CRKG keys. Finally, these quantum keys are divided into each user pair for message encryption and this round of quantum key distribution has come to an end. \subsection{Efficiency improvement} The basic CR-QKD mechanism is time-consuming as it interacts heavily to obtain identical keys in both QKD and CRKG phases. This situation becomes more severe in a multi-user case. For each round of multi-user key distribution, in a time division multiple access (TDMA) system, the time delay is the sum of the time spent on yielding quantum keys and channel keys plus the time used for key forwarding. The time spent on quantum keys is calculated by dividing the number of quantum key bits by the quantum key generation rate. The time spent on channel keys is equal to the larger one of QAP1 and QAP2. For each QAP, its time delay is the sum of that used for yielding channel keys between it and all users. One approach to reducing the time delay is to make QKD and CRKG processes work in parallel. However, its reduction ratio is less than 50\% due to the positive forwarding time and the maximum operation. Another solution to further reduce the time delay is to improve the secret key generation rate. In practice, key generation rates are largely subject to the long time delay caused by information reconciliation, which exchanges parity information or syndromes over classic channels to detect and correct errors in the preliminary key material. According to OTP with un-identical keys~\cite{OTP}, we propose a simplified CR-QKD mechanism that abolishes the sophisticated information reconciliation step in the CRKG phase and forwards quantum keys using non-reconciled channel keys. The challenge is to decrypt the quantum keys correctly when the non-reconciled channel keys of two parties are different but highly correlated. We deem the XOR encryption and decryption modules along with the physical channel as an equivalent cascade channel. Then, the tiny differences between keys can be seen as part of the transmission error, and thus can be corrected by the off-the-shelf channel coding with a stronger correction capability. \begin{figure}[htbp] \centering \includegraphics[height=7cm,width=9.31cm]{figures/communication.eps} \caption{Performance improvements of time delay and secret key generation rate in a typical WiFi scenario: the transmission distance is set as 150 meters and the bandwidth is set as 20 MHz. The fixed overhead of a WiFi frame under the Non-HT (Non-High Throughput) and HT-Mixed mode is $20$ us and $40$ us, respectively. } \label{Communication Consuming Proportion} \end{figure} \begin{figure*}[htbp] \centering \includegraphics[height=5.5cm,width=16cm]{figures/map.pdf} \caption{An illustration of the CR-QKD prototype platform in a metropolitan area network at Nanjing, which is the capital of Jiangsu Province, East-central China. One is located in Yuhuatai District and the other is at Chinese Network Valley in Jiangning District.} \label{map} \end{figure*} Fig.~3 plots performance improvement ratios of the simplified CR-QKD mechanism compared with the paralleled CR-QKD mechanism in terms of time delay and upper bound of secret key generation rate in a typical WiFi scenario. As shown in the left panel, the proportion of delay reduction decreases with the rise of $L_G$, still achieving a reduction ratio above 20\% at $L_G \le 1024$. The reduction of HT-Mixed mode is more remarkable than Non-HT mode, as the former has a larger time overhead than the latter. The right panel shows that the growth of the upper bound of the secret key generation rate is more remarkable when the bit disagreement ratio between quantized channel measurements gets larger, while it has a slight fall with the rise of $L_G$. When $L_G =1024$ and $\epsilon_q =0.1$, the proportion of delay reduction and upper bound of secret key rate growth are roughly 20\% and 10\%, respectively. These simulation results verify the effectiveness of the proposed simplified CR-QKD mechanism. \subsection{Security enhancement} Another challenge of CRKG lies in the increased security risks caused by its hybrid architecture, as security is only as strong as its weakest link. We assume that the terminal security of QAP1 and QAP2 is guaranteed by techniques such as trusted computing. Operations that are relevant to secret keys are run in a trusted execution environment, thereby attackers can read neither quantum keys nor channel keys from the hybrid interface on QAP1 and QAP2. Since the edge forwarding phase employs the OTP encryption scheme, its security depends on the key used for OTP. The security of existing CRKG approaches, however, heavily relies on the channel variation and thus suffers from vulnerabilities in slowly varying environments~\cite{2020Physical}. When users have low mobility, e.g. in a wireless sensor network, there exist inevitable and unknown temporal correlations between adjacent channel samples, resulting in a large proportion of repeated bit segments in the quantized bit sequences. Several solutions can be used to facilitate the practical usage of CRKG in slowly varying environments. One solution is to introduce helper devices, e.g., relays and reconfigurable intelligent surface (RIS) to boost the key generation rate and randomness~\cite{WCM}. However, this solution encounters some practical problems, such as the unavailability of trust relays and additional hardware overheads of RIS devices. Another idea is to scramble these bits segments through some permutation or interleaving techniques. However, the security of the key may be compromised when the permutation information is public. \cite{INFOCOM} has proposed a new physical-layer secret key generation approach with channel obfuscation, which improved the dynamic property of channel parameters based on random filtering and random antenna scheduling, which have mutual remedying parameters in hiding the obfuscation information. \section{Case study: An Implementation of CR-QKD} To realize the concept of CR-QKD, we implement a single-user confidential transmission prototype system in a metropolitan area network. \subsection{Experimental Setup} As shown in the left panel of Fig.~\ref{map}, QAP1 and QAP2 are two quantum access points at a distance of fifteen kilometers. Alice and Bob are two remote IoT users in the wireless service ranges of QAP1 and QAP2, respectively. Without loss of generality, we zoom in on the wireless access network at Chinese Network Valley, as depicted in the right panel of Fig.~\ref{map}. Here, QAP2 is composed of a QKD terminal under the series of QKDM-POL40-S for yielding quantum keys~\footnote{The quantum keys meet strict key randomness, as they conform to the specification of the GM/T 0005-2012.}, a USRP N210 SDR device embedded with the CBX daughterboards for providing a wireless connection service, and a computer under the trusted execution environment for yielding wireless channel keys and distributing quantum keys. Both the QKD terminal and USRP N210 are connected to the computer via the ethernet cable in QAP2. The end-user, Bob, and a passive eavesdropper, Eve, are realized through two USRP N210 SDR devices, respectively. We design a TDD frame for channel sounding, which consists of a sinusoidal sequence for synchronization and an M-sequence for channel estimation. The signal operates at 2.605GHz and 20MHz bandwidth to avoid collisions with ubiquitous 2.4GHz signals such as WiFi. Once Bob receives the channel sounding signal from AP2, it will immediately switch to TX mode and send the same channel sounding signal. By using the same channel sounding signal for channel estimation, the amplitude part of the CSI is further preprocessed and quantized to generate the wireless keys. \subsection{Performance Results} Considering the comparable experimental scenarios and results of QAP1 and QAP2, we only take QAP2 as an example for performance analysis. Table~\ref{table2} summarizes the secret key sharing results from QAP2 to Bob and Eve in three typical indoor scenarios, namely office, hall and corridor. First, the measured key generation rates (KGRs) of the channel keys between QAP2 and Bob in above scenarios are 315.4, 424.7 and 383.7 bits per second (bps), respectively. They are sufficient for traditional symmetric encryption algorithms (such as AES) to update 256-bit keys every second for secure communications. In the random test, we examined a bit sequence of length 3.4 million bits that was obtained at the output of the quantization stage without further processing. The generated channel keys passed 14 NIST statistical tests, indicating their randomness. However, while the simplified CR-QKD mechanism leads to high KGRs and high randomness, removing the complicated information reconciliation step also results in relatively high key disagreement rates (KDRs) of 8.1\%, 4.7\% and 5.8\% between QAP2 and Bob, respectively. The number of personnel, the frequency of movement, and the switching time of USRP affect the reciprocity of uplink and downlink channels, eventually leading to KDR differences in the noisy office, occasionally infested corridor, and empty hall. Meanwhile, along with forwarding quantum keys using non-reconciled channel keys based on channel error correction coding, the need arises to retransmit quantum keys when unsuccessfully decoded. The corresponding retransmission rates (RRs) using Polar codes from QAP2 to Bob are 11.6\%, 2.1\%, and 6.7\%, respectively, which are proportional to the KDRs. To demonstrate the security of our proposed scheme, we also evaluate the quantum key cracking performance of the near-end eavesdropper Eve in terms of KDR and cracking rate (CR). The KDRs between QAP2 and Eve under these three scenarios are all around 50\%, where the line of sight in the straight corridor contributes to a relatively lower KDR but is still above 45\%. What's more, the experimental results show that the CRs of Eve in the three scenarios are all zero, which means that none of the quantum keys have been cracked. \begin{table}[htbp] \caption{The Quantum Key Wireless Distribution Performance in Three Indoor Scenarios} \label{table2} \centering{}% \begin{tabular}{|c|c|c|c|c|c|c|} \hline Scenario & \multicolumn{4}{c|}{QAP2 - Bob} & \multicolumn{2}{c|}{QAP2 - Eve}\tabularnewline \hline Metrics & KGR/bps & NIST & KDR & RR & KDR & CR\tabularnewline \hline Office & 315.4 & 14 & 8.1\% & 11.6\% & 48.1\% & 0\%\tabularnewline \hline Hall & 424.7 & 14 & 4.7\% & 2.1\% & 49.2\% & 0\%\tabularnewline \hline Corridor & 383.7 & 14 & 5.8\% & 6.7\% & 45.3\% & 0\%\tabularnewline \hline \end{tabular} \end{table} \section{Conclusion and Future Directions} Integrating QKD into IoT networks is beneficial for QKD’s practical deployment and end-user’s security enhancement. This article proposed a framework of CR-QKD over IoT networks. QKD and CRKG assembly were adopted for secret key sharing over backbone core networks and the last-mile wireless access networks in CR-QKD, respectively. The demonstration of CR-QKD prototype represented a major step towards real-world information theoretically security for wide-area mobile applications, such as confidential VoLTE and confidential VoWiFi. Some open issues in future work are given below. \begin{itemize} \item \textbf{Device Authentication}: Considering the hybrid architecture of CR-QKD, it is more vulnerable to spoofing attacks from either user's side or QAP's side. However, neither QKD nor CRKG provides a means to authenticate the transmission source. Therefore, source authentication in CR-QKD should be further studied by using asymmetric cryptography techniques or emerging physical-layer techniques, such as radio frequency fingerprinting identification and physical unclonable function~\cite{iot2021}. \item \textbf{Untrusted QAPs: } The proposed CR-QKD scheme relies on the trust of the intermediate QAPs. In this paper, we use techniques of trust computing to ensure that the the information stored in QAP is protected from external software attacks. When a trusted platform is not available, designing a scheme that relaxes this assumption could also be a very good future research direction. \item \textbf{Performance Optimization}: In this article, we presented a multi-user edge forwarding strategy, in which quantum keys were allocated as needed. Unfortunately, its performance metrics, e.g., delay, secret key generation rate, and energy efficiency, are limited by those user pairs with weak channel reciprocity. How to optimize these performance metrics by allocating power or spectrum resources among different user pairs becomes an interesting topic and needs to be investigated. \item \textbf {System Integration and Compatibility}: Our prototype was built on the USRP platform, which was different from commercial-off-the-shelf (COTS) devices. It is unknown whether these performances are still achievable on existing communication standards and whether CR-QKD will affect the network efficiency. More studies should be done on its system integration and compatibility issues, including frame format design, key management scheme and efficiency evaluation in practical communication systems. \end{itemize} \section{Acknowledgment} We thank our colleagues Prof. Linning Peng, Mr. Yanjun Ding, Dr. Dong Wang, Mr. Siyun Wu and Dr. Xuyang Wang from the Purple Mountain Laboratories, for their help with the experimental platform. This work was supported in part by the National Key Research and Development Program of China under Grant 2020YFE0200600 and 2022YFB2902202, in part by the National Natural Science Foundation of China under Grant 62171121, in part by the Natural Science Foundation of Jiangsu Province under Grant BK20211160 and in part by Jiangsu Provincial Key Laboratory of Network and Information Security under Grant BM2003201. \bibliographystyle{IEEEtran} \section{Introduction} \end{document}
\section{Introduction.}\label{intro} \section{Introduction.} We consider the standard unconstrained convex minimization problem \begin{equation}\label{eq:opt} f_\star\triangleq\min_{x\in\mathbb{R}^n} f(x), \end{equation} where $f$ is $L$-smooth (i.e., it has an $L$-Lipschitz gradient) and $\mu$-strongly convex. We study the worst-case performances of a few famous variants of \emph{nonlinear conjugate gradient methods} (NCGMs) for solving~\eqref{eq:opt}. More specifically, we study {Polak-Ribi\`ere-Polyak}~(PRP)~\cite{polyak1969conjugate,polak1969note} and Fletcher-Reeves~(FR)~\cite{fletcher1964function} schemes with exact line search. With exact line search, many other NCGMs such as the Hestenes and Stiefel method~\cite{hestenes1952methods}, the conjugate descent method due to Fletcher~\cite{fletcher1987practical}, and the Dai and Yuan method~\cite{dai1999nonlinear} reduce to either~{\PRP} or~{FR}. Under exact line search,~{\PRP} and~{FR} can be presented in the following compact form: \begin{equation} \begin{aligned} & \gamma_{k}\in\underset{\gamma}{\mathrm{argmin}}\,f(x_{k}-\gamma\,d_{k}),\\ & x_{k+1}=x_{k}-\gamma_{k}d_{k},\\ & \beta_{k}=\frac{\|\nabla f(x_{k+1})\|^{2}-\eta\,\left\langle \nabla f(x_{k+1});\,\nabla f(x_{k})\right\rangle }{\|\nabla f(x_{k})\|^{2}},\\ & d_{k+1}=\nabla f(x_{k+1})+\beta_{k}d_{k}, \end{aligned} \tag{$\mathcal{M}$}\label{eq:NCG} \end{equation} where PRP and FR are respectively obtained by setting $\eta=1$ and $\eta=0$. NCGMs have a long history (see, e.g., the nice survey~\cite{hager2006survey}), but are much less studied compared to their many first-order competitors. For instance, even though FR is generally considered the first NCGM \cite[\S 1]{hager2006survey}, we are not aware of non-asymptotic convergence results for it. On a similar note, some variants of NCGMs are known for their generally good empirical behaviors (which we illustrate on~\Cref{fig:log_reg}) with little of them being backed-up by classical complexity analyses. In this work, we apply the performance estimation approach~\cite{drori2014performance,taylor2017smooth} to~\eqref{eq:NCG} for filling this gap by explicitly computing some worst-case convergence properties of~PRP and~FR. \begin{figure}[!ht] \centering \begin{tabular}{cc} \begin{tikzpicture} \begin{semilogyaxis}[ylabel={$f(x)-f_*$}, plotOptions, ymin=1e-4, ymax=1] \addplot [color=colorP1] table [x=k,y=SteepestDescent] {NormalizedLogisticRegr_logregularizationInf.txt}; \addplot [color=colorP2] table [x=k,y=AccGradient] {NormalizedLogisticRegr_logregularizationInf.txt}; \addplot [color=colorP3, dashed] table [x=k,y=AccGradient_strCvx] {NormalizedLogisticRegr_logregularizationInf.txt}; \addplot [color=colorP4] table [x=k,y=OGM] {NormalizedLogisticRegr_logregularizationInf.txt}; \addplot [color=colorP5] table [x=k,y=NCG_FR] {NormalizedLogisticRegr_logregularizationInf.txt}; \addplot [color=colorP6, dashed] table [x=k,y=NCG_PRP] {NormalizedLogisticRegr_logregularizationInf.txt}; \end{semilogyaxis} \end{tikzpicture} & \begin{tikzpicture} \begin{semilogyaxis}[plotOptions, ymin=1e-9, ymax=1] \addplot [color=colorP1] table [x=k,y=SteepestDescent] {NormalizedLogisticRegr_logregularization4.txt}; \addplot [color=colorP2] table [x=k,y=AccGradient] {NormalizedLogisticRegr_logregularization4.txt}; \addplot [color=colorP3, dashed] table [x=k,y=AccGradient_strCvx] {NormalizedLogisticRegr_logregularization4.txt}; \addplot [color=colorP4] table [x=k,y=OGM] {NormalizedLogisticRegr_logregularization4.txt}; \addplot [color=colorP5] table [x=k,y=NCG_FR] {NormalizedLogisticRegr_logregularization4.txt}; \addplot [color=colorP6, dashed] table [x=k,y=NCG_PRP] {NormalizedLogisticRegr_logregularization4.txt}; \addlegendentry{Gradient} \addlegendentry{Nesterov} \addlegendentry{Nesterov (SC version)} \addlegendentry{Optimized gradient} \addlegendentry{FR} \addlegendentry{PRP} \end{semilogyaxis} \end{tikzpicture} \end{tabular} \caption{Convergence of a few first-order methods on a logistic regression problem on the small-sized Sonar dataset~\cite{gorman1988analysis}. Experiments with normalized features (zero mean and unit variance). Left:~without regularization. Right:~with an $\ell_2$ regularization of parameter $10^{-4}$. All methods were featured with an exact line search: (i)~gradient descent, (ii)~Nesterov's accelerated gradient~\cite{nesterov1983method} (exact line search instead of backtracking), (iii)~Nesterov's accelerated method for strongly convex problems, version~\cite[Algorithm 28]{d2021acceleration} with exact line search instead of the gradient step, (iv)~optimized gradient method~\cite[Algorithm (OGM-LS)]{drori2020efficient}, (v)~{FR}, and (vi)~{\PRP}. No method was tuned, the results correspond to the first run for each method and are only meant for illustrative purposes.} \label{fig:log_reg} \end{figure} \subsection{Contributions.} The contribution of this paper is twofold. First, we compute worst-case convergence bounds and counter-examples for {\PRP} and {FR}. Those bounds are obtained by formulating the problems of computing worst-case scenarios as nonconvex quadratically constrained quadratic optimization problems (QCQPs) and then by solving them to global optimality. Second, these computations also allow us to construct mathematical proofs that establish an improved non-asymptotic convergence bound for {\PRP}, and, to the best of our knowledge, the first non-asymptotic convergence bound for {FR}. Furthermore, the worst-case bounds for {\PRP} and {FR} obtained numerically show that there are simple adversarial examples on which those methods do not behave better than gradient descent with an exact line search ({GDEL}), thus leaving very few room for improvements on this class of problems. From a methodological point of view, the approach of computing worst-case scenarios and bounds through optimization is often referred to as \emph{performance estimation}. In many situations, those problems are amenable to convex semidefinite programs~\cite{drori2014performance,taylor2017smooth,taylor2017exact}, but it is generally not the case for \emph{adaptive} first-order methods such as {\PRP} and {FR} \cite{barre2020complexity, barre2021worst}. For studying those methods, we evaluate the worst-case performances of \eqref{eq:NCG} by solving nonconvex QCQPs, extending the more standard SDP-based approach from~\cite{drori2014performance,taylor2017smooth,taylor2017exact} developed for non-adaptive methods. This contribution is similar in spirit with that in~\cite{gupta2022branch} which was developed for devising optimal (but non-adaptive) first-order methods. \paragraph{Organization.} The paper is organized as follows. In Section~\ref{s:NCG_as_GD}, we establish non-asymptotic convergence rates for {\PRP} and {FR} by viewing the search direction $d_{k}$ in \eqref{eq:NCG} as an approximate gradient direction. In Section~\ref{sec:analysis}, we compute the exact numerical values of the worst-case $\nicefrac{f(x_{N})-f_{\star}}{f(x_{0})-f_{\star}}$ and $\nicefrac{f(x_{k+N})-f_{\star}}{f(x_{k})-f_{\star}}$ for {\PRP} and {FR} by formulating the problems as nonconvex QCQPs and then solving them to certifiable global optimality using a custom spatial branch-and-bound algorithm. \subsection{Related works.} Conjugate gradient (CG) methods are particularly popular choices for solving systems of linear equations and quadratic minimization problems; in this context, they are known to be information-optimal in the class of first-order methods~\cite[Chapter 12 \& Chapter 13]{nemirovski1994efficient} or~\cite[Chapter 5]{nemirovski1999optimization}. There are many extensions beyond quadratics, commonly referred to as \emph{nonlinear conjugate gradient methods} (NCGMs). They are discussed at length in the textbooks~\cite[Chapter 5 \& Chapter 7]{nocedal1999numerical} and~\cite[Chapter 5]{bonnans2006numerical} and in the nice survey~\cite{hager2006survey}. In particular, when exact line searches are used, many variants become equivalent and can be seen as instances of quasi-Newton methods, see~\cite[Chapter 7, \S``Relationship with conjugate gradient methods'']{nocedal1999numerical} or~\cite[Chapter 5,~\S5.5]{bonnans2006numerical}. For instance, it is well known that standard variants such as Hestenes-Stiefel~\cite{hestenes1952methods} and Dai-Yuan~\cite{dai1999nonlinear} are equivalent to~\eqref{eq:NCG} when exact line searches are used, while being different in the presence of more popular line search procedures (such as Wolfe's~\cite[Chapter 3]{nocedal1999numerical}). Beyond quadratics, obtaining convergence guarantees is often reduced to the problem of ensuring the search direction to be a descent direction, see for instance~\cite[\S 5.5 ``Extensions to non-quadratic problems'']{nemirovski1999optimization} or~\cite{al1985descent,hager2005new}. Without exact line searches, even when $f$ is strongly convex, there are counter-examples showing that even popular variants may not generate descent directions~\cite{dai1997analysis}. Note that NCGMs are often used together with restart strategies, which we do not consider here; see, e.g.,~\cite{royer2022nonlinear} and the references therein. In this work, we use the performance estimation framework~\cite{drori2014performance,taylor2017smooth,taylor2017exact}. This methodology is essentially mature for analyzing ``fixed-step'' (i.e., non-adaptive) first-order methods (and for methods whose analyses are amenable to those of fixed-step methods), whose stepsizes are essentially chosen in advance. This type of methods include many common first-order methods and operator splitting schemes, including the heavy-ball method~\cite{polyakintroduction} and Nesterov's accelerated gradient~\cite{nesterov1983method,beck2009fast}. Only very few adaptive methods were studied using the PEP methodology, namely gradient descent with exact line searches~\cite{de2017worst}, greedy first-order methods~\cite{drori2020efficient}, and Polyak stepsizes~\cite{barre2020complexity}. A premise to the study of NCGMs using PEPs was done in~\cite[\S 4.5.2]{barre2021worst}. This work is also closely related in spirit with the technique developed in~\cite{gupta2022branch} for optimizing coefficients of fixed-step first-order methods using nonconvex optimization. \subsection{Preliminaries.} In this short section, we recall the definition and a result on smooth strongly convex functions, as well as a base result on steepest descent with an exact line search. We use the standard notation $\langle\,\cdot\,;\,\cdot\,\rangle:\mathbb{R}^n\times\mathbb{R}^n\rightarrow \mathbb{R}$ to denote the Euclidean inner product, and the corresponding induced Euclidean norm $\|\cdot\|$. The class of $L$-smooth $\mu$-strongly convex functions is standard and can be defined as follows. \begin{definition}Let $f:\mathbb{R}^n\rightarrow\mathbb{R}$ be a proper, closed, and convex function, and consider two constants $0\leq \mu<L<\infty$. The function $f$ is $L$-smooth and $\mu$-strongly convex (notation $f\in\mathcal{F}_{\mu,L}(\mathbb{R}^n)$), if \begin{itemize} \item ($L$-smooth) for all $x,y\in\mathbb{R}^n$, it holds that $f(x)\leq f(y)+\langle \nabla f(y);\, x-y\rangle+\frac{L}{2}\|x-y\|^2$, \item ($\mu$-strongly convex) for all $x,y\in\mathbb{R}^n$, it holds that $f(x)\geq f(y)+\langle \nabla f(y);x-y\rangle+\frac{\mu}{2}\|x-y\|^2$. \end{itemize} We simply denote $f\in\mathcal{F}_{\mu,L}$ when the dimension is either clear from the context or unspecified. We also denote by $q\triangleq \frac{\mu}{L}$ the inverse condition number. For readability, we do not explicitly treat the (trivial) case $L=\mu$. \end{definition} Smooth strongly convex functions satisfy many inequalities, see e.g.,~\cite[Theorem 2.1.5]{nest-book-04}. For the developments below, we need only one specific inequality characterizing functions in $\mathcal{F}_{\mu,L}$. The following result can be found in~\cite[Theorem 4]{taylor2017smooth} and is key in our analysis. \begin{theorem}\cite[Theorem 4, $\mathcal{F}_{\mu,L}$-interpolation]{taylor2017smooth}\label{thm:interp} Let $I$ be an index set and $S=\{(x_i,g_i,f_i)\}_{i\in I}\subseteq \mathbb{R}^n\times\mathbb{R}^n\times \mathbb{R}$ be a set of triplets. There exists $f\in\mathcal{F}_{\mu,L}$ satisfying $f(x_i)=f_i$ and $\nabla f(x_i)=g_i$ for all $i\in I$ if and only if \begin{equation}\label{eq:interp} \begin{aligned} f_i\geq f_j+&\langle g_j;x_i-x_j\rangle+\frac{1}{2L}\|g_i-g_j\|^2+\frac{\mu}{2(1-\mu/L)}\|x_i-x_j-\tfrac{1}{L}(g_i-g_j)\|^2 \end{aligned} \end{equation} holds for all $i,j\in I$. \end{theorem} Another related result from \cite[\S 2.1]{drori2022oracle} that we record next involves constructing a strongly-convex smooth function from a given set of triplets. \begin{theorem}\cite[\S 2.1, strongly convex and smooth extension]{drori2022oracle}\label{thm:scvx-extension} Suppose $I$ is a set of indices and $S=\{(x_{i},g_{i},f_{i})\}_{i\in I}\subseteq\mathbb{R}^{n}\times\mathbb{R}^{n}\times\mathbb{R}$ is a set of triplets such that \eqref{eq:interp} holds for all $i,j\in I$ for some $0\leq \mu<L<\infty$. Then the function $f:\mathbb{R}^{n}\to\mathbb{R}$ defined by \begin{align} f(y)= & \max_{\alpha\in\Delta}\Big[\frac{L}{2}\|y\|^{2}-\frac{L-\mu}{2}\|y-\frac{1}{L-\mu}\sum_{i\in I}\alpha_{i}(g_{i}-\mu x_{i})\|^{2}\nonumber \\ & \quad +\sum_{i\in I}\alpha_{i}\Big(f_{i}+\frac{1}{2(L-\mu)}\|g_{i}-Lx_{i}\|^{2}-\frac{L}{2}\|x_{i}\|^{2}\Big)\Big]\label{eq:scvx-extension} \end{align} where $\Delta=\{\alpha\in\mathbb{R}^{n}\mid\alpha\geq0,\,\sum_{i=1}^{n} \alpha_i=1\},$ satisfies $f\in\mathcal{F}_{\mu,L}(\mathbb{R}^{n})$, $f(x_{i})=f_{i}$ and $\nabla f(x_{i})=g_{i}$ for all~$i\in I$. \end{theorem} Finally, consider a function $f\in\mathcal{F}_{\mu,L}$ and the approximate steepest descent method: \begin{equation}\label{eq:GD_ELS} \begin{aligned} & \gamma_{k}=\underset{\gamma}{\argmin}\,f(x_{k}-\gamma d_{k})\\ & x_{k+1}=x_{k}-\gamma_{k}d_{k}, \end{aligned} \end{equation} where the search direction $d_k$ satisfies a relative accuracy criterion: \begin{equation}\label{eq:rel_dir} \|\nabla f(x_k)-d_k\|\leq \epsilon\|\nabla f(x_k)\|. \end{equation} In particular,~\eqref{eq:rel_dir} holds when $|\sin \theta|\leq \epsilon$ with $\theta$ being the angle between $\nabla f(x_k)$ and $d_k$. With line searches, this amounts to checking that $d_k$ is a descent direction. We will use the following result in~\Cref{s:NCG_as_GD}. \begin{theorem}\cite[Theorem 5.1]{de2017worst}\label{thm:approx_GD} Let $f\in\mathcal{F}_{\mu,L}(\mathbb{R}^n)$, $x_\star\triangleq \argmin_{x\in\mathbb{R}^n} f(x)$ be a minimizer of $f$, and $f_\star\triangleq f(x_\star)$. For any $x_k\in\mathbb{R}^n$ and search direction $d_k$ satisfying~\eqref{eq:rel_dir}, we have: \begin{equation}\label{eq:ELS_inex} f(x_{k+1})-f_\star\leq \left(\frac{1-q_\epsilon}{1+q_\epsilon}\right)^2\left(f(x_k)-f_\star\right), \end{equation} where $x_{k+1}$ is computed as~\eqref{eq:GD_ELS} and $ q_\epsilon \triangleq \nicefrac{\mu (1-\epsilon)}{L (1+\epsilon)}$. \end{theorem} Note that similar results (without line searches) to that of Theorem~\ref{thm:approx_GD} can be found in~\cite{de2020worst}, which might help in future analyses of NCGMs without line searches. \section{Base descent properties of NCGMs.}\label{s:NCG_as_GD} In this section, we analyze NCGMs as approximate steepest descent methods through a computer-assisted approach. Because the NCGMs make use of exact line searches, only the generated search directions matter, and not their magnitudes. This renders the analysis somehow simpler, and we argue that this is a reasonable setting for improving the analysis and understanding of NCGMs. This section builds on the idea that when $|\sin\theta_k|$ (where $\theta_k$ is the angle between minus the gradient and the search direction at iteration $k$) is upper bounded in an appropriate fashion, one can use \Cref{thm:approx_GD} for obtaining convergence guarantees. In particular, we get nontrivial convergence guarantees as soon as $\theta_k$ can be bounded away from~$\pm \frac{\pi}{2}$, i.e., $\sin \theta_k$ should be bounded away from $1$ for ensuring that $d_k$'s are descent directions. Of course, viewing NCGMs as approximate gradient methods is very adversarial by nature, as it misses the point that the directions of NCGMs are meant to be better than those of vanilla gradient descent, while such analyses can only provide worse rates. Albeit being pessimistic by construction, the analyses of this section are, to the best of our knowledge, already better than the state-of-the-art bounds for NCGMs. Further, we show in the next sections that there is actually nearly no room for improving those analyses. \paragraph{Properties of NCGMs with exact line search.} Before going into the detailed approach, let us review a few properties of the iterates of~\eqref{eq:NCG}. First, note that the exact line search condition $\gamma_{k}=\textrm{argmin}_{\gamma}f(x_{k}-\gamma\pg_{k})$ in \eqref{eq:NCG} implies the following equalities: \begin{equation} \begin{aligned} & \left\langle \nabla f(x_{k+1});\,d_{k}\right\rangle =0,\\ & \left\langle \nabla f(x_{k+1});\,x_{k}-x_{k+1}\right\rangle =0,\\ & \left\langle \nabla f(x_{k});\,\pg_{k}\right\rangle =\|\nabla f(x_{k})\|^{2}, \end{aligned} \label{eq:relaxed-line-search-cond} \end{equation} which we can show as follows. The exact line search condition is equivalent to \begin{align} 0 & =\left[\nabla_{\gamma}f(x_{k}-\gamma\pg_{k})\right]_{\gamma=\gamma_{k}}\nonumber \\ & =-\left\langle \nabla f(x_{k}-\gamma_{k}\pg_{k});\,\pg_{k}\right\rangle \nonumber \\ & =-\left\langle \nabla f(x_{k+1});\,\pg_{k}\right\rangle \label{eq:pseudo-orthogonality-proof-1} \end{align} thereby obtaining the first line of~\eqref{eq:relaxed-line-search-cond}. Then, the definition of $x_{k+1}$ implies the second equality. The last line follows from applying the first line to \begin{equation}\label{eq:NCG_eq1} \left\langle \nabla f(x_{k});\,\pg_{k}\right\rangle =\left\langle \nabla f(x_{k});\,\nabla f(x_{k})+\beta_{k-1}\pg_{k-1}\right\rangle =\|\nabla f(x_{k})\|^{2}. \end{equation} Combining~\eqref{eq:NCG_eq1} with $\langle\nabla f(x_{k});d_{k}\rangle=\|\nabla f(x_{k})\|\|d_{k}\|\cos\theta_{k}$, we obtain that $\nicefrac{\|\nabla f(x_{k})\|}{\|d_{k}\|}=\cos\theta_{k}$, thereby reaching $\sin^{2}\theta_{k}=1-\nicefrac{\|\nabla f(x_{k})\|^{2}}{\|d_{k}\|^{2}}$. Thus, any upper bound on the ratio $\nicefrac{\|d_{k}\|}{\|\nabla f(x_{k})\|}$ can be converted to a worst-case convergence rate using Theorem \ref{thm:approx_GD}. \paragraph{Section organization.} For obtaining the desired bounds measuring the quality of the angle~$\theta_k$, Section~\ref{sec:worst-case-search-dir} first frames the problems of computing the worst-case $\nicefrac{\|d_k\|}{\|\nabla f(x_k)\|}$ for PRP and FR as optimization problems, referred to as \emph{performance estimation problems}~(PEPs). These PEPs are nonconvex but practically tractable QCQPs and can be solved numerically to certifiable global optimality using spatial branch-and-bound algorithms (detailed in \appref{app:ncg-pep-alg}), which allows (i)~to construct ``bad'' functions on which the worst-case $\nicefrac{\|d_k\|}{\|\nabla f(x_k)\|}$ for {\PRP} and {FR} is achieved, and (ii)~to identify closed-form solutions to the PEPs leading to proofs that can be verified in a standard and mathematically rigorous way. The convergence rates for PRP and FR are provided and proved in~Section~\ref{s:NCGs_inexact_GD_results}. \subsection{Computing worst-case search directions.}\label{sec:worst-case-search-dir} In this section, we formulate the problems of computing the worst-case ratios of $\nicefrac{\|d_{k}\|}{\|\nabla f(x_{k})\|}$ as optimization problems. Following a classical steps introduced in~\cite{taylor2017smooth,taylor2017exact}, we show that it can be cast as a nonconvex~QCQP. For doing that, we assume that at iteration $k-1$ the NCGM has not reached optimality, so $\nabla f(x_{k-1})\neq0.$ Because $\|\nabla f(x_{k-1})\|^{2}\leq\|d_{k-1}\|^{2}$ (follows from applying Cauchy--Schwarz inequality to \eqref{eq:NCG_eq1}), without loss of generality we define the ratio $c_{k-1}\triangleq \nicefrac{\|d_{k-1}\|^{2}}{\|\nabla f(x_{k-1})\|^{2}}$ where $c_{k-1}\geq1$. Then, denoting by $c_{k}$ the worst-case ratio $\nicefrac{\|d_{k}\|^{2}}{\|\nabla f(x_{k})\|^{2}}$ arising when applying~\eqref{eq:NCG} to the minimization of an $L$-smooth $\mu$-strongly convex function, we will compute $c_k$ as a function of $L$, $\mu$, and $c_{k-1}$. In other words, we use a \emph{Lyapunov}-type point of view and take the stand of somewhat \emph{forgetting} about how $d_{k-1}$ was generated (except through the fact that it satisfies~\eqref{eq:relaxed-line-search-cond}). Then, we compute the worst possible next search direction $d_k$ that the algorithm could generate given that $d_{k-1}$ satisfies a certain quality. Thereby, we obtain an upper bound on the evolution of the \emph{quality} of the search directions (quantified by $c_k$) obtained throughout the iterative procedure. Formally, we compute \begin{equation} c_{k}(\mu,L,c_{k-1})\triangleq\left(\begin{array}{ll} \underset{\substack{f,n,x_{k-1},d_{k-1}\\x_k,d_k,\beta_{k-1}}}{\mbox{maximize}} & \frac{\|d_{k}\|^{2}}{\|\nabla f(x_{k})\|^{2}}\\ \textrm{subject to} & n\in\mathbb{N},\,f\in\mathcal{F}_{\mu,L}(\mathbb{R}^{n}),\,d_{k-1},x_{k-1}\in\mathbb{R}^{n},\\ & x_{k},d_{k}\text{ and }\beta_{k-1}\text{ generated by~\eqref{eq:NCG} from }x_{k-1}\text{ and }d_{k-1},\\ & \left\langle \nabla f(x_{k-1});\,d_{k-1}\right\rangle =\|\nabla f(x_{k-1})\|^{2},\\ & \|d_{k-1}\|^{2}=c_{k-1}\|\nabla f(x_{k-1})\|^{2}. \end{array}\right)\label{eq:angle_PEP} \end{equation} For computing $c_{k}(\mu,L,c_{k-1})$, we reformulate~\eqref{eq:angle_PEP} as follows. Denote $I \triangleq \{ k-1, k\}$. An appropriate sampling of the variable $f$ (which is inconveniently infinite-dimensional) allows us to cast~\eqref{eq:angle_PEP} as: \begin{equation} c_{k}(\mu,L,c_{k-1})=\left(\begin{array}{ll} \underset{\substack{n,\{d_{i}\}_{i\in I},\gamma_{k-1},\beta_{k-1}\\ \{(x_{i},g_{i},f_{i})\}_{i\in I} } }{\mbox{maximize}} & \frac{\|d_{k}\|^{2}}{\|g_{k}\|^{2}}\\ \textrm{subject to} & n\in\mathbb{N},\,\beta_{k-1}\in\mathbb{R},\,d_{k-1},d_{k}\in\mathbb{R}^{n},\\ & \{(x_{i},g_{i},f_{i})\}_{i\in I}\subset\mathbb{R}^{n}\times\mathbb{R}^{n}\times\mathbb{R},\\ & \exists f\in\mathcal{F}_{\mu,L}:\left\{ \begin{array}{l} f(x_{i})=f_{i}\\ \nabla f(x_{i})=g_{i} \end{array}\right.\forall i\in I,\\ & \gamma_{k-1}=\underset{\gamma}{\mathrm{argmin}}\,f(x_{k-1}-\gamma\,d_{k-1}),\\ & x_{k}=x_{k-1}-\gamma_{k-1}d_{k-1},\\ & \beta_{k-1}=\frac{\|g_{k}\|^{2}-\eta\left\langle g_{k};\,g_{k-1}\right\rangle }{\|g_{k-1}\|^{2}},\\ & d_{k}=g_{k}+\beta_{k-1}d_{k-1},\\ & \left\langle \nabla f(x_{k-1});\,d_{k-1}\right\rangle =\|g_{k-1}\|^{2},\\ & \|d_{k-1}\|^{2}=c_{k-1}\|g_{k-1}\|^{2}. \end{array}\right) \label{eq:intermed_pep} \end{equation} Using \Cref{thm:interp}, the existence constraint can be replaced by a set of linear/quadratic inequalities~\eqref{eq:interp} for all pairs of triplets in $\{(x_{i},g_{i},f_{i})\}_{i \in I}$ without changing the objective value. Furthermore, if $\beta_{k-1}$ and $\gamma_{k}$ were pre-defined parameters (instead of variables), the problem would be amenable to a convex semidefinite program~\cite{taylor2017smooth,taylor2017exact}. So, applying \Cref{thm:interp} to \eqref{eq:intermed_pep} followed by an homogeneity argument and a few substitutions based on \eqref{eq:relaxed-line-search-cond}, we arrive at: \begin{equation} c_{k}(\mu,L,c_{k-1})=\left(\begin{array}{ll} \underset{\substack{n,\{d_{i}\}_{i\in I},\gamma_{k-1},\beta_{k-1}\\ \{(x_{i},g_{i},f_{i})\}_{i\in I} } }{\mbox{maximize}} & \|d_{k}\|^{2}\\ \textrm{subject to} & n\in\mathbb{N},\,d_{k-1},x_{k-1}\in\mathbb{R}^{n},\\ & f_{i}\geq f_{j}+\langle g_{j};\,x_{i}-x_{j}\rangle+\frac{1}{2(1-\frac{\mu}{L})}\Big(\frac{1}{L}\|g_{i}-g_{j}\|^{2}\\ & \qquad+\mu\|x_{i}-x_{j}\|^{2}-2\frac{\mu}{L}\left\langle g_{i}-g_{j};\,x_{i}-x_{j}\right\rangle \Big),\quad i,j\in I,\\ & \left\langle g_{k-1};\,\pg_{k-1}\right\rangle =\|g_{k-1}\|^{2},\\ & \left\langle g_{k};\,\pg_{k-1}\right\rangle =0,\\ & \left\langle g_{k};\,x_{k-1}-x_{k}\right\rangle =0,\\ & x_{k}=x_{k-1}-\gamma_{k-1}\pg_{k-1},\\ & \beta_{k-1}=\frac{\|g_{k}\|^{2}-\eta\left\langle g_{k};\,g_{k-1}\right\rangle }{\|g_{k-1}\|^{2}},\\ & \pg_{k}=g_{k}+\beta_{k-1}\pg_{k-1}\\ & \|d_{k-1}\|^{2}=c_{k-1}\|g_{k-1}\|^{2},\\ & \|g_{k}\|^{2}=1. \end{array}\right)\tag{$\mathcal{D}$}\label{eq:c_k_fnt_intract} \end{equation} Note that without the variable $n$ this problem is amenable to a finite-dimensional nonconvex QCQP (see \appref{formulation-pseud-grad-ratio}). Fortunately standard arguments (e.g.,~\cite[Theorem 5]{taylor2017smooth}, or \appref{formulation-pseud-grad-ratio}) allows setting $n=4$ without changing the optimal value of this problem, thereby discarding this dimension issue. We can then solve the QCQP equivalent to~\eqref{eq:c_k_fnt_intract} to certifiable global optimality using a custom branch-and-bound algorithm. Reformulation details are provided in \appref{formulation-pseud-grad-ratio}, whereas a description of the custom spatial branch-and-bound algorithm is given in \appref{app:ncg-pep-alg}. Finally, we recall that numerical solutions to~\eqref{eq:c_k_fnt_intract} correspond to worst-case functions that can be obtained through the reconstruction procedure from Theorem~\ref{thm:scvx-extension}. In addition, numerical solutions can serve as inspirations for devising rigorous mathematical proofs, as presented next. \subsection{Worst-case bounds for {\PRP} and {FR}.} \label{s:NCGs_inexact_GD_results} In this section, we provide explicit solutions to~\eqref{eq:c_k_fnt_intract} for PRP and FR. Those results are then used for deducing simple convergence bounds through a straightforward application of Theorem~\ref{thm:approx_GD}. \subsubsection{A worst-case bound for Polak-Ribière-Polyak (PRP).} Solving~\eqref{eq:c_k_fnt_intract} with $\eta = 1$ to global optimality allows obtaining the following worst-case bound for {\PRP} quantifying the \emph{quality} of the search direction with respect to the gradient direction. \begin{lemma}[Worst-case search direction for {\PRP}]\label{thm:PRP_1} Let $f\in\mathcal{F}_{\mu,L}$, and let $x_{k-1},d_{k-1}\in\mathbb{R}^{n}$ and $x_{k}$, $d_{k}$ be generated by the {\PRP} method (i.e.,~\eqref{eq:NCG} with $\eta=1$). It holds that: \begin{equation} \frac{\|d_{k}\|^{2}}{\|\nabla f(x_{k})\|^{2}}\leq\frac{(1+q)^{2}}{4q},\label{eq:PRP_angle} \end{equation} with $q\triangleq\nicefrac{\mu}{L}$. Equivalently, $\|d_{k}-\nabla f(x_{k})\|\leq\epsilon\|\nabla f(x_{k})\|$ holds with $\epsilon=\nicefrac{1-q}{1+q}$. \end{lemma} \proof{Proof.} Recall that $x_{k}=x_{k-1}-\gamma_{k-1}\,d_{k-1}$ and $d_{k}=\nabla f(x_{k})+\beta_{k-1}d_{k-1}$. The proof consists of the following weighted sum of inequalities: \begin{itemize} \item optimality condition of the line search, with weight $\lambda_{1}=-\beta_{k-1}^{2}\frac{1+q}{L\gamma_{k-1}q}$: \[ \langle\nabla f(x_{k});d_{k-1}\rangle=0, \] \item smoothness and strong convexity of $f$ between $x_{k-1}$ and $x_{k}$, with weight $\lambda_{2}=\frac{\beta_{k-1}^{2}(1+q)^{2}}{L\gamma_{k-1}^{2}(1-q)q}$: \[ \begin{aligned}f(x_{k-1})\geq & f(x_{k})+\langle\nabla f(x_{k});x_{k-1}-x_{k}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|x_{k-1}-x_{k}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\\ = & f(x_{k})+\gamma_{k-1}\langle\nabla f(x_{k});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2} \end{aligned} \] \item smoothness and strong convexity of $f$ between $x_{k}$ and $x_{k-1}$, with weight $\lambda_{3}=\lambda_{2}$: \[ \begin{aligned}f(x_{k})\geq & f(x_{k-1})+\langle\nabla f(x_{k-1});\,x_{k}-x_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|x_{k-1}-x_{k}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\\ = & f(x_{k-1})-\gamma_{k-1}\langle\nabla f(x_{k-1}),d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2} \end{aligned} \] \item definition of $\beta_{k-1}$ with weight $\lambda_{4}=\frac{\beta_{k-1}(1+q)}{L\gamma_{k-1}q}$: \[ \begin{aligned}0 & =\langle\nabla f(x_{k-1});\,\nabla f(x_{k})\rangle-\|\nabla f(x_{k})\|^{2}+\beta_{k-1}\|\nabla f(x_{k-1})\|^{2}\\ & =\langle\nabla f(x_{k-1});\,\nabla f(x_{k})\rangle-\|\nabla f(x_{k})\|^{2}+\beta_{k-1}\langle\nabla f(x_{k-1});\,d_{k-1}\rangle. \end{aligned} \] \end{itemize} We arrive at the following weighted sum: \[ \begin{aligned}0\geq & \lambda_{1}\langle\nabla f(x_{k});d_{k-1}\rangle\\ & +\lambda_{2}\bigg[f(x_{k})-f(x_{k-1})+\gamma_{k-1}\langle\nabla f(x_{k});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad\quad\quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\bigg]\\ & +\lambda_{3}\bigg[f(x_{k-1})-f(x_{k})-\gamma_{k-1}\langle\nabla f(x_{k-1});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad\quad\quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\bigg]\\ & +\lambda_{4}\big[\langle\nabla f(x_{k-1});\,\nabla f(x_{k})\rangle-\|\nabla f(x_{k})\|^{2}+\beta_{k-1}\langle\nabla f(x_{k-1});\,d_{k-1}\rangle\big] \end{aligned} \] which can be reformulated exactly as (expand both expressions and observe that all terms match) \[ \begin{aligned}0\geq & \|d_{k}\|^{2}-\frac{(1+q)^{2}}{4q}\|\nabla f(x_{k})\|^{2}\\ & \quad+\frac{4\beta_{k-1}^{2}q}{(1-q)^{2}}\left\Vert d_{k-1}-\tfrac{1+q}{2L\gamma_{k-1}q}\nabla f(x_{k-1})+\tfrac{2\beta_{k-1}(1+q)-L\gamma_{k-1}(1-q)^{2}}{4\beta_{k-1}L\gamma_{k-1}q}\nabla f(x_{k})\right\Vert ^{2},\\ \geq & \|d_{k}\|^{2}-\frac{(1+q)^{2}}{4q}\|\nabla f(x_{k})\|^{2}, \end{aligned} \] thereby arriving to the desired conclusion. \Halmos \endproof In Appendix~\ref{sec:num_vec_wcsd} we numerically showcase the tightness of the worst-case bounds~\eqref{eq:PRP_angle} for {\PRP}. By tightness, we mean that we verified numerically that there exist $n\in\mathbb{N}$, functions $f\in\mathcal{F}_{\mu,L}$ and $x_{k-1},d_{k-1}\in\mathbb{R}^n$ such that ${\|d_{k}\|^{2}}=\nicefrac{(1+q)^{2}}{4q}\|\nabla f(x_{k})\|^{2}$. This is done by exhibiting feasible points to~\eqref{eq:c_k_fnt_intract} (obtained by solving~\eqref{eq:c_k_fnt_intract} numerically for $\eta = 1$) for different values of the inverse condition number $q$ and $c_{k-1}$. Those feasible points were verified through other (independent) software~\cite{goujaud2022pepit,taylor2017performance}. The following rate is a direct consequence of \Cref{thm:PRP_1} and \Cref{thm:approx_GD}. Perhaps surprisingly, the following guaranteed convergence rate for PRP corresponds to that of gradient descent with an exact line search (\Cref{thm:approx_GD} with $\epsilon=0$) when the condition number is squared. \begin{theorem}[Worst-case bound for {\PRP}] Let $f\in\mathcal{F}_{\mu,L}$, and $x_{k},d_{k}\in\mathbb{R}^n$ and $x_{k+1}$, $d_{k+1}\in\mathbb{R}^n$ be generated by respectively $k\geq 0$ and $k+1$ iterations of the {\PRP} method (i.e.,~\eqref{eq:NCG} with $\eta=1$). It holds that \[ f(x_{k+1})-f_\star\leq \displaystyle \left(\frac{1 - q^{2}}{1 + q^{2}}\right)^{2} \left(f(x_{k})-f_\star\right),\] with $q\triangleq \nicefrac{\mu}{L}$. \end{theorem}\proof{Proof.} The desired claim is a direct consequence of \Cref{thm:approx_GD} with $\epsilon=\frac{1-q}{1+q}$. That is, the {\PRP} scheme can be seen as a descent method with direction $d_k$ satisfying $\|d_{k}-\nabla f(x_{k})\|\leq \epsilon\|\nabla f(x_{k})\|$. \Halmos \endproof As a take-away from this theorem, we obtained an improved bound on the convergence rate of PRP, but possibly not in the most satisfying way: this analysis strategy does not allow beating steepest descent. Furthermore, this bound is tight for one iteration assuming that the current search direction satisfies $\nicefrac{\|d_k\|^2}{\|\nabla f(x_k)\|^2}=\nicefrac{(1+q)^{2}}{4q}$. However, it does not specify whether such an angle can be achieved on the same worst-case instances as those where~\Cref{thm:approx_GD} is achieved. In other words, there might be no worst-case instances where the bounds~\eqref{eq:ELS_inex} and~\eqref{eq:PRP_angle} are tight simultaneously, possibly leaving room for improvement in the analysis of {\PRP}. We show in~\Cref{sec:analysis} that we could indeed slightly improve this bound by taking into account the \emph{history} of the method in a more appropriate way. \begin{remark} The only worst-case complexity result that we are aware of in the context of {\PRP} for smooth strongly convex problems was provided by Polyak in~\cite[Theorem 2]{polyak1969conjugate}: \[ f(x_{k+1})-f_{\star}\leq{\displaystyle \frac{q}{1+\frac{1}{q^{2}}}\left(f(x_{k})-f_{\star}\right).} \] This bound is about two times worse compared to the rate achieved by gradient descent ($\nicefrac{1-q}{1+q}$) when the condition number is put to the cube. From what we can tell, this is due to two main weaknesses in the proof of Polyak~\cite[Theorem 2]{polyak1969conjugate}: a weaker analysis of gradient descent, and a weaker analysis of the direction (and in particular that $\nicefrac{\|d_{k}\|^{2}}{\|\nabla f(x_{k})\|^{2}}\leq1+\nicefrac{1}{q^{2}}$). That is, whereas gradient descent with exact line searches is guaranteed to achieve an accuracy $f(x_{k})-f_{\star}\leq\varepsilon$ in $O(\nicefrac{1}{q}\log\nicefrac{1}{\varepsilon})$, our analysis provides an $O(\nicefrac{1}{q^{2}}\log\nicefrac{1}{\varepsilon})$ guarantee for {\PRP}, where Polyak's guarantee for {\PRP} is $O(\nicefrac{1}{q^{3}}\log\nicefrac{1}{\varepsilon})$. As a reference, note that the lower complexity bound (achieved by a few methods, including many variations of Nesterov's accelerated gradients) is of order $O(\sqrt{\nicefrac{1}{q}}\log\nicefrac{1}{\varepsilon})$. \end{remark} \subsubsection{A worst-case bound for Fletcher-Reeves (FR).} Similar to the obtaining of the bound for PRP, our bound for FR follows from solving~\eqref{eq:c_k_fnt_intract} (for $\eta=0$) in closed-form. We start by quantifying the \emph{quality} of the search direction with respect to the steepest descent direction. For doing that, we first establish the following bound on the FR update parameter $\beta_{k-1}$. \begin{lemma}[Bound on $\beta_{k-1}$ for {FR}\label{Bound-on-beta}] Let $f\in\mathcal{F}_{\mu,L}$, and let $x_{k-1},d_{k-1}\in\mathbb{R}^{n}$ and $x_{k}$, $d_{k}$ be generated by the {FR} method (i.e.,~\eqref{eq:NCG} with $\eta=0$). For any $c_{k-1}\in\mathbb{R}$ such that $\nicefrac{\|d_{k-1}\|^{2}}{\|\nabla f(x_{k-1})\|^{2}}=c_{k-1}$, where $c_{k-1}>1$, it holds that: \begin{equation} 0\leq\beta_{k-1}\leq\frac{1}{c_{k-1}}\frac{\left(1-q+2\sqrt{(c_{k-1}-1)q}\right)^{2}}{4q},\label{eq:case_2_beta_FR} \end{equation} where $q \triangleq \nicefrac{\mu}{L}$. \end{lemma} \proof{Proof.} First, note that $\beta_{k-1}\geq0$ by definition. The other part of the proof consists of the following weighted sum of inequalities: \begin{itemize} \item relation between $\nabla f(x_{k-1})$ and $\pg_{k-1}$ with weight $\lambda_{1}=\gamma_{k-1}(L+\mu)-\frac{2\sqrt{\beta_{k-1}}}{\sqrt{(c_{k-1}-1)c_{k-1}}}$: \[ 0=\left\langle \nabla f(x_{k-1});\,\pg_{k-1}\right\rangle -\|\nabla f(x_{k-1})\|^{2}, \] \item optimality condition of the line search with weight $\lambda_{2}=\frac{2}{c_{k-1}}-\gamma_{k-1}(L+\mu)$: \[ 0=\left\langle \nabla f(x_{k});\,d_{k-1}\right\rangle , \] \item definition of $\beta_{k-1}$ with weight $\lambda_{3}=\frac{\sqrt{c_{k-1}-1}}{\sqrt{\beta_{k-1}c_{k-1}}}$: \[ 0=\|\nabla f(x_{k})\|^{2}-\beta_{k-1}\|\nabla f(x_{k-1})\|^{2}, \] \item initial condition on the ratio $\frac{\|d_{k-1}\|^{2}}{\|\nabla f(x_{k-1})\|^{2}}$ with weight $\lambda_{4}=-\gamma_{k-1}^{2}L \mu +\frac{\sqrt{\beta_{k-1}}}{c_{k-1}\sqrt{(c_{k-1}-1)c_{k-1}}}$ : \[ 0=\|\pg_{k-1}\|^{2}-c_{k-1}\|g_{k-1}\|^{2} \] \item smoothness and strong convexity of $f$ between $x_{k-1}$ and $x_{k}$, with weight $\lambda_{5}=L-\mu$: \[ \begin{aligned}0\geq & -f(x_{k-1})+f(x_{k})+\langle\nabla f(x_{k});\,x_{k-1}-x_{k}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|x_{k-1}-x_{k}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\\ = & f(x_{k})+\gamma_{k-1}\langle\nabla f(x_{k});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2} \end{aligned} \] \item smoothness and strong convexity of $f$ between $x_{k}$ and $x_{k-1}$, with weight $\lambda_{6}=\lambda_{5}$: \[ \begin{aligned}0\geq & -f(x_{k})+f(x_{k-1})+\langle\nabla f(x_{k-1});\,x_{k}-x_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|x_{k-1}-x_{k}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\\ = & f(x_{k-1})-\gamma_{k-1}\langle\nabla f(x_{k-1});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2} \end{aligned} \] \end{itemize} The weighted sum can be written as: \begin{align*} 0 & \geq\lambda_{1}\left[\left\langle \nabla f(x_{k-1});\,\pg_{k-1}\right\rangle -\|\nabla f(x_{k-1})\|^{2}\right]+\lambda_{2}\left[\left\langle \nabla f(x_{k});\,d_{k-1}\right\rangle \right]\\ & +\lambda_{3}\left[\|\nabla f(x_{k})\|^{2}-\beta_{k-1}\|\nabla f(x_{k-1})\|^{2}\right]+\lambda_{4}\left[\|\pg_{k-1}\|^{2}-c_{k-1}\|g_{k-1}\|^{2}\right]\\ & +\lambda_{5}\Big[f(x_{k})+\gamma_{k-1}\langle\nabla f(x_{k});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad\quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\Big]\\ & +\lambda_{6}\Big[f(x_{k-1})-\gamma_{k-1}\langle\nabla f(x_{k-1});\,d_{k-1}\rangle+\tfrac{1}{2L}\|\nabla f(x_{k-1})-\nabla f(x_{k})\|^{2}\\ & \quad\quad+\tfrac{\mu}{2(1-\mu/L)}\|\gamma_{k-1}d_{k-1}-\tfrac{1}{L}(\nabla f(x_{k-1})-\nabla f(x_{k}))\|^{2}\Big], \end{align*} which can be reformulated exactly as (expand the expressions and observe that all terms match): \begin{align*} 0\geq & \|\nabla f(x_{k})\|^{2}-\nu(\beta_{k-1},\gamma_{k-1},c_{k-1},\mu,L)\|\nabla f(x_{k-1})\|^{2}\\ & +\left\Vert \sqrt[4]{\frac{\beta_{k-1}}{(c_{k-1}-1)c_{k-1}^{3}}}d_{k-1}-\sqrt[4]{\frac{\beta_{k-1}c_{k-1}}{c_{k-1}-1}}\nabla f(x_{k-1})+\sqrt[4]{\frac{c_{k-1}-1}{\beta_{k-1}c_{k-1}}}\nabla f(x_{k})\right\Vert ^{2}\\ \geq & \|\nabla f(x_{k})\|^{2}-\nu(\beta_{k-1},\gamma_{k-1},c_{k-1},\mu,L)\|\nabla f(x_{k-1})\|^{2}, \end{align*} where \[ \nu(\beta_{k-1},\gamma_{k-1},c_{k-1},\mu,L)=2\sqrt{1-\frac{1}{c_{k-1}}}\sqrt{\beta_{k-1}}-c_{k-1}\gamma_{k-1}^{2}L\mu+\gamma_{k-1}(L+\mu)-1. \] So, we have: \begin{equation*} \begin{aligned} \beta_{k-1}&\leq\nu(\beta_{k-1},\gamma_{k-1},c_{k-1},\mu,L)\\ &\Leftrightarrow \beta_{k-1}-2\sqrt{1-\frac{1}{c_{k-1}}}\sqrt{\beta_{k-1}}\leq-c_{k-1}\gamma_{k-1}^{2}L\mu +\gamma_{k-1}(L+\mu)-1\\ &\Rightarrow \beta_{k-1}-2\sqrt{1-\frac{1}{c_{k-1}}}\sqrt{\beta_{k-1}}\leq\max_{\gamma}\left(-c_{k-1}\gamma_{k-1}^{2}L\mu +\gamma_{k-1}(L+\mu)-1\right). \end{aligned} \end{equation*} Because, $-c_{k-1}\gamma_{k-1}^{2}L\mu +\gamma_{k-1}(L+\mu)-1$ is a concave function in $\gamma_{k-1},$ its maximum can be achieved by differentiating the term with respect to $\gamma_{k-1},$ equating it to $0$, and then solving for $\gamma_{k-1}$. The corresponding maximum value is equal to $\nicefrac{(L+\mu)^{2}}{4c_{k-1}L \mu}-1$ and achieved at $\gamma_{k-1}=\nicefrac{L+\mu}{2c_{k-1}L\mu }$. Hence, the last inequality becomes: \begin{equation*} \begin{aligned} \beta_{k-1}-&2\sqrt{1-\frac{1}{c_{k-1}}}\sqrt{\beta_{k-1}}-\frac{(L+\mu)^{2}}{4c_{k-1}L\mu}+1\leq0\\ &\Leftrightarrow \left(\sqrt{\beta_{k-1}}\right)^{2}-2\sqrt{1-\frac{1}{c_{k-1}}}\sqrt{\beta_{k-1}}+\left(\sqrt{1-\frac{1}{c_{k-1}}}\right)^{2}-\frac{(L+\mu)^{2}}{4c_{k-1}L\mu}-\left(\sqrt{1-\frac{1}{c_{k-1}}}\right)^{2}+1\leq0\\ &\Leftrightarrow \left(\sqrt{\beta_{k-1}}-\sqrt{1-\frac{1}{c_{k-1}}}\right)^{2}\leq\frac{(L+\mu)^{2}}{4c_{k-1}L\mu}+\cancel{1}-\frac{1}{c_{k-1}}-\cancel{1}=\frac{1}{c_{k-1}}\left(\frac{(L+\mu)^{2}}{4L\mu}-1\right)\\ &\Leftrightarrow \sqrt{\beta_{k-1}}\leq\sqrt{1-\frac{1}{c_{k-1}}}+\sqrt{\frac{(L+\mu)^{2}}{4c_{k-1}L\mu }-\frac{1}{c_{k-1}}}. \end{aligned} \end{equation*} Thereby, squaring both sides (which are nonnegative) of the last inequality and then through some algebra, we reach \begin{align*} \beta_{k-1} & \leq1+\frac{(L-\mu)}{c_{k-1}}\sqrt{\frac{(c_{k-1}-1)}{\mu L}}+\frac{\mu^{2}-6\mu L+L^{2}}{4c_{k-1}\mu L}\\ & =\frac{1}{c_{k-1}}\frac{\left(1-q+2\sqrt{(c_{k-1}-1)q}\right)^{2}}{4q}. \end{align*} As $\beta_{k-1}\geq0$ by definition, we have thus proven the desired statement. \Halmos \endproof Next, we prove a bound quantifying the quality of the search directions of {FR}. \begin{lemma}[Worst-case search direction for FR]\label{thm:FR_1} Let $f\in\mathcal{F}_{\mu,L}$, and let $x_{k-1},d_{k-1}\in\mathbb{R}^{n}$ and $x_{k}$, $d_{k}$ be generated by the {FR} method (i.e.,~\eqref{eq:NCG} with $\eta=0$). For any $c_{k-1}\in\mathbb{R}$ such that $\nicefrac{\|d_{k-1}\|^{2}}{\|\nabla f(x_{k-1})\|^{2}}=c_{k-1}$, where $c_{k-1}>1$, it holds that: \begin{equation} \frac{\|d_{k}\|^{2}}{\|\nabla f(x_{k})\|^{2}}\leq c_{k}\triangleq1+\frac{\left(1-q+2\sqrt{(c_{k-1}-1)q}\right)^{2}}{4q},\label{eq:FR_angle} \end{equation} with $q\triangleq\nicefrac{\mu}{L}$. Equivalently, $\|d_{k}-\nabla f(x_{k})\|\leq\epsilon\|\nabla f(x_{k})\|$ holds with $\epsilon=\sqrt{1-\nicefrac{1}{c_{k}}}$. \end{lemma} \proof{Proof.} The proof consists of the following weighted sum of inequalities: \begin{itemize} \item optimality condition of the line search with weight $\lambda_{1}=2\beta_{k-1}$: \[ 0=\langle\nabla f(x_{k});d_{k-1}\rangle, \] \item the quality of the search direction with weight $\lambda_{2}=\beta_{k-1}^{2}$: \[ 0=\|d_{k-1}\|^{2}-c_{k-1}\|\nabla f(x_{k-1})\|^{2}, \] \item definition of $\beta_{k-1}$ with weight $\lambda_{3}=-c_{k-1}\beta_{k-1}$: \[ \begin{aligned}0=\|\nabla f(x_{k})\|^{2}-\beta_{k-1}\|\nabla f(x_{k-1})\|^{2}.\end{aligned} \] \end{itemize} The weighted sum can be written as \[ \begin{aligned}0\geq & \lambda_{1}\left[\langle\nabla f(x_{k});d_{k-1}\rangle\right]+\lambda_{2}\left[\|d_{k-1}\|^{2}-c_{k-1}\|\nabla f(x_{k-1})\|^{2}\right]+\lambda_{3}\left[-\|\nabla f(x_{k})\|^{2}+\beta_{k-1}\|\nabla f(x_{k-1})\|^{2}\right],\end{aligned} \] and can be reformulated exactly as \[ \begin{aligned}0\geq\|d_{k}\|^{2}-(1+c_{k-1}\beta_{k-1})\|\nabla f(x_{k})\|^{2}\Leftrightarrow\|d_{k}\|^{2} & \leq(1+c_{k-1}\beta_{k-1})\|\nabla f(x_{k})\|^{2}\\ & \leq\left(1+\frac{\left(1-q+2\sqrt{(c_{k-1}-1)q}\right)^{2}}{4q}\right)\|\nabla f(x_{k})\|^{2}, \end{aligned} \] where in the last line we have used the upper bound on $\beta_{k-1}$ from~\eqref{eq:case_2_beta_FR}. \Halmos \endproof Similar to PRP, we compare this last bound with the worst example that we were able to find numerically (i.e., worst feasible points to \eqref{eq:c_k_fnt_intract}) in \appref{sec:num_vec_wcsd}. Thereby, we conclude tightness of the bound on the quality of the search direction~\eqref{eq:FR_angle}. That is, we claim that for all values of $q$ and $c_{k-1}$, there exist $n\in\mathbb{N}$, functions $f\in\mathcal{F}_{\mu,L}$ and $x_{k-1},d_{k-1}\in\mathbb{R}^n$ such that the bound from Lemma~\ref{thm:FR_1} is achieved with equality. That being said, this bound only allows obtaining unsatisfactory convergence results for FR, although not letting much room for improvements, as showed in the next sections. \begin{theorem}[Worst-case bound]\label{thm:FR_2} Let $f\in\mathcal{F}_{\mu,L}$, and $x_{k},d_{k}\in\mathbb{R}^n$ and $x_{k+1}$, $d_{k+1}\in\mathbb{R}^n$ be generated by respectively $k\geq 0$ and $k+1$ iterations of the {FR} method (i.e.,~\eqref{eq:NCG} with $\eta=0$). It holds that \[ f(x_{k+1})-f_\star\leq \displaystyle \left(\frac{1 - q \frac{1-\epsilon_k}{1+\epsilon_k}}{1+q\frac{1-\epsilon_k}{1+\epsilon_k}}\right)^{2} \left(f(x_{k})-f_\star\right),\] with $\epsilon_k=\sqrt{\nicefrac{(1-q)^2 (k-1)^2}{4 q + (1-q)^2 (k-1)^2}}$. \end{theorem} \proof{Proof.} The desired claim is a direct consequence of \Cref{thm:approx_GD} with \Cref{thm:FR_1}. Indeed, it follows from \[c_{k} \leq 1+\frac{\left(1-\frac{\mu}{L}+2 \sqrt{(c_{k-1}-1)\frac{\mu }{L}}\right)^2}{\frac{4 \mu }{L}}\] (the guarantee from~\Cref{thm:FR_1} for the quality of the search direction) which we can rewrite as \[ \sqrt{c_{k+1}-1}\leq \frac{1-q+2\sqrt{(c_k-1)q}}{2\sqrt{q}}\] with $c_{0}-1=0$, thereby arriving to $c_{k}\leq 1 + k^2 \nicefrac{(1-q)^2}{4q}$ by recursion. For applying \Cref{thm:approx_GD}, we compute $\epsilon_k=\sqrt{1-\nicefrac{1}{c_k}}\leq\sqrt{\nicefrac{(1-q)^2 k^2}{4 q + (1-q)^2 k^2}}$ and reach the desired statement. \Halmos \endproof It is clear that the statement of \Cref{thm:FR_2} is rather very disappointing, as the convergence rate of the FR variation can become arbitrarily close to 1. While this guarantee clearly does not give a total and fair picture of the true behavior of FR in practice, it seems in line with the practical necessity to effectively restart the method as it runs~\cite{hager2006survey}. The next section is devoted to studying the possibilities for obtaining tighter guarantees for~PRP and~FR beyond the simple single-iteration worst-case analyses of this section (which are tight for one iteration, but not beyond), showing that we cannot hope to improve the convergence rates for those methods without further assumptions on the problems at hand. \section{Obtaining better worst-case bounds for NCGMs.} \label{sec:analysis} In the previous section, we established closed-form bounds on ratios between consecutive function values for NCGMs by characterizing worst-case search directions. Albeit being tight for the analysis of NCGMs for one iteration, the bounds that we obtained are disappointingly inferior to those of the vanilla gradient descent. In this section, we investigate the possibility of obtaining better worst-case guarantees for NCGMs. For doing this using our framework, one natural possibility for us is to go beyond the study of a single iteration (since our results appear to be tight for this situation). Therefore, in contrast with the previous section, we now proceed only numerically and provide worst-case bounds without closed-forms. More precisely, we solve the corresponding PEPs in two regimes. In short, the difference between the two regimes resides in the type of bounds under consideration. \begin{enumerate} \item The first type of bounds can be thought to as a ``Lyapunov'' approach which studies $N$ iterations of~\eqref{eq:NCG} starting at some iterate $(x_k, d_k)$ (for which we ``neglect'' how it was generated). In this first setup, we numerically compute worst-case bounds on $\nicefrac{f(x_{k+N} ) - f_\star}{f(x_{k})-f_\star}$ for different values of $N$ (namely $N \in \{ 1,2,3,4 \}$). As for the results of Section~\ref{s:NCG_as_GD}, we quantify the quality of the couple $(x_k,d_k)$ by requiring that $\| d_k \|^2 \leq c_k \| \nabla f(x_k)\|^2$. When $N=1$, this setup corresponds to that of Section~\ref{s:NCG_as_GD}. Stemming from the fact the worst-case behaviors observed for $N=1$ might not be compatible between consecutive iterations, we expect the quality of the bounds to improve with $N$. Of course, the main weakness of this approach is the fact that we neglect how $(x_k,d_k)$ was generated. \item As a natural complementary alternative, the second type of bounds studies $N$ iterations of~\eqref{eq:NCG} initiated at $x_0$ (with $d_0=\nabla f(x_0)$). Whereas the first type of bounds is by construction more conservative, it has the advantage of being \emph{recursive}: it is valid for all $k\geq 0$. On the other side, the second type of bounds is only valid for the first $N$ iterations (the bound cannot be used recursively), but it cannot be improved at all. That is, we study \emph{exact} worst-case ratio $\nicefrac{f(x_{N} ) - f_\star}{f(x_{0})-f_\star}$ for a few different values of $N$ (namely $N\in \{1,2,3,4\}$). In this setup, we obtain worst-case bounds that are only valid close to initialization. However, it has the advantage of being unimprovable, as we do not neglect how the search direction is generated. \end{enumerate} \paragraph{Section organization.} This section is organized as follows. First, Section~\ref{subsec:NCG-PEP-ift-formulation} presents the performance estimation problems for~\eqref{eq:NCG} specifically for computing the worst-case ratios $\nicefrac{f(x_{k+N})-f_{\star}}{f(x_{k})-f_{\star}}$ and $\nicefrac{f(x_{N})-f_{\star}}{f(x_{0})-f_{\star}}$. Then, Section~\ref{sec:num-res-prp} and Section~\ref{subsec:Numerical-results-for-FR} presents our findings for respectively~{\PRP} and~{FR}. Details on how we managed to solve the resulting nonconvex QCQPs numerically are provided in Appendix~\ref{sec:ncqcqp_for_Lyapunov_and_exact}. \subsection{Computing numerical worst-case scenarios.} \label{subsec:NCG-PEP-ift-formulation} Similar to~\eqref{eq:angle_PEP}, the problem of computing the worst-case ratio $\nicefrac{f(x_{k+N} ) - f_\star}{f(x_{k})-f_\star}$ is framed as the following nonconvex maximization problem (for $c\geq 1$ and $q\triangleq\nicefrac{\mu}{L}$): \begin{equation} \rho_N(q,c)\triangleq\left(\begin{array}{ll} \underset{\substack{f,n,\{x_{k+i}\},\{d_{k+i}\}_{i},\\ \{\gamma_{k+i}\}_{i},\{\beta_{k+i}\}_{i} } }{\mbox{maximize}} & \frac{f(x_{k+N})-f_{\star}}{f(x_{k})-f_{\star}}\\ \textrm{subject to} & n\in\mathbb{N},\,f\in\mathcal{F}_{q,1}(\mathbb{R}^{n}),\,d_{k},x_{k}\in\mathbb{R}^{n},\\ & \left\langle \nabla f(x_{k});\,d_{k}\right\rangle =\|\nabla f(x_{k})\|^{2},\\ & \|d_{k}\|^{2}\leq c\|\nabla f(x_{k})\|^{2},\\ & \begin{pmatrix}x_{k+1}\\d_{k+1}\\\beta_{k}\end{pmatrix},\ldots,\begin{pmatrix}x_{k+N}\\d_{k+N}\\\beta_{k+N-1}\end{pmatrix}\text{ generated by~\eqref{eq:NCG} from }x_{k}\text{ and }d_{k}. \end{array}\right)\tag{$\mathcal{B}_\textup{Lyapunov}$}\label{eq:PEP_rho_N} \end{equation} We proceed similarly for $\nicefrac{f(x_{N} ) - f_\star}{f(x_{0})-f_\star}$: \begin{equation} \rho_{N,0}(q)\triangleq\left(\begin{array}{ll} \underset{\substack{f,n,\{x_{k+i}\},\{d_{k+i}\}_{i},\\ \{\gamma_{k+i}\}_{i},\{\beta_{k+i}\}_{i} } }{\mbox{maximize}} & \frac{f(x_{N})-f_{\star}}{f(x_{0})-f_{\star}}\\ \textrm{subject to} & n\in\mathbb{N},\,f\in\mathcal{F}_{q,1}(\mathbb{R}^{n}),\,x_{0}\in\mathbb{R}^{n},\\ & d_0=\nabla f(x_0),\\ & \begin{pmatrix}x_{1}\\d_{1}\\\beta_{0}\end{pmatrix},\ldots,\begin{pmatrix}x_{N}\\d_{N}\\\beta_{N-1}\end{pmatrix}\text{ generated by~\eqref{eq:NCG} from }x_{k}\text{ and }d_{k}. \end{array}\right)\tag{$\mathcal{B}_\textup{exact}$}\label{eq:PEP_rho_N0} \end{equation} Obviously, $\rho_N(q,c)\geq \rho_{N,0}(q)$ for any $c\geq 1$. We solve~\eqref{eq:PEP_rho_N} and~\eqref{eq:PEP_rho_N0} numerically to high precision (details in Appendix \ref{sec:ncqcqp_for_Lyapunov_and_exact}) for $N\in\{1,2,3,4\}$ and report the corresponding results in what follows. In the numerical experiments, we fix the values of $c$ using Lemma~\ref{thm:PRP_1} for {\PRP} in~\eqref{eq:PEP_rho_N}, thereby computing $\rho_N\left(q,\nicefrac{(1+q)^{2}}{4q}\right)$ whose results are provided in Figure~\ref{fig:PRP_Lyapunov}. For {FR}, $c$ can become arbitrarily bad and we therefore only compute $\rho_{N,0}(q)$ via~\eqref {eq:PEP_rho_N0}. The numerical values for $\rho_{N,0}(q)$ respectively {\PRP} and {FR} are provided in Figure~\ref{fig:PRP_exact} and Figure~\ref{fig:FR_exact}. The next sections discuss and draw a few conclusions from the numerical worst-case convergence results for~PRP and~FR. \subsection{Improved worst-case bounds for PRP.}\label{sec:num-res-prp} Figure~\ref{fig:PRP_Lyapunov} reports the worst-case values of the ``Lyapunov'' ratio $\nicefrac{f(x_{k+N} ) - f_\star}{f(x_{k})-f_\star}$ as a function of the inverse condition number $q\triangleq \nicefrac{\mu}{L}$ and for $c=\nicefrac{(1+q)^{2}}{4q}$ and $N=1,2,3,4$. This worst-case ratio seem to improve as $N$ grows, but does not outperform gradient descent with exact line search ({GDEL}). The diminishing improvements with $N$ also suggests the worst-case performance of {\PRP} in this regime might not outperform {GDEL} even for larger values of $N\geq 4$, albeit probably getting close to the same asymptotic worst-case convergence rate. \begin{figure}[!ht] \centering % \input{prp_Lyapunov_master.tex} \caption{This figure reports the worst-case values for the ``Lyapunov'' ratio $\sqrt[N]{\nicefrac{f(x_{k+N} ) - f_\star}{f(x_{k})-f_\star}}$ vs.~the (inverse) condition ratio $q\triangleq \tfrac{\mu}{L}$ for {\PRP}. We compute $\rho_N(q,c)$ with $c=\nicefrac{(1+q)^{2}}{4q}$ for $N=1,2,3,4$. As $N$ increases, the worst-case $\sqrt[N]{\nicefrac{f_{k+N}-f_{\star}}{f_{k}-f_{\star}}}$ improves, but remains worse than that of gradient descent with exact line search ({GDEL}). The curve $(1-\sqrt{q})^2$ (orange) corresponds to the rate of the lower complexity bounds for this class of problems~\cite{drori2022oracle}.\label{fig:PRP_Lyapunov}} \end{figure} As a complement, Figure~\ref{fig:PRP_exact} shows how {\PRP}'s worst-case ratio $\nicefrac{f_{N}-f_{\star}}{f_{0}-f_{\star}}$ evolves as a function of $q$ for $N=1,2,3,4$. The worst-case performance of {\PRP} in this setup seems to be similar to that of {GDEL}. Further, for small $q$ (which is typically the only regime of interest for large-scale optimization), {\PRP}'s worst-case performance seems to be slightly better than than of~{GDEL}. On the other hand, for larger~$q$, {\PRP} performs slightly worse than {GDEL}. \begin{figure}[!ht] \centering % \input{prp_restarted_master.tex} \caption{This figure reports the worst-case values for the ratio $\sqrt[N]{\nicefrac{f_{N}-f_{\star}}{f_{0}-f_{\star}}}$ vs.~$q$ for {\PRP} for $N=1,2,3,4$. For $N=1$, {\PRP} and {GDEL} perform the same iteration. For $N=2,3,4$, the worst-case ratio of {\PRP} is better than that of {GDEL} for $ q \leq 0.1$. The curve $(1-\sqrt{q})^2$ (orange) corresponds to the rate of the lower complexity bounds for this class of problems~\cite{drori2022oracle}.\label{fig:PRP_exact}} \end{figure} As a conclusion, we believe there is no hope to prove uniformly better worst-case bounds for~PRP than those for~GDEL for base smooth strongly convex minimization. However, we might be able to prove improvements for small values of $q$ at the cost of possibly very technical proofs. As for the Lyapunov approach, the numerical results from this section could be improved by further increasing $N$, but we believe that the transient does not suggest this direction to be promising. We recall that we computed the bounds by solving an optimization problem whose feasible points correspond to worst-case examples. Therefore, the numerical results provided in this section are backed-up by numerically constructed examples on which PRP behaves ``badly'' (more details in Appendix \ref{sec:ncqcqp_for_Lyapunov_and_exact}). \subsection{Improved worst-case bounds for {FR}.} \label{subsec:Numerical-results-for-FR} Figure~\ref{fig:FR_exact} reports the worst-case values for the ratio $\nicefrac{f_{N}-f_{\star}}{f_{0}-f_{\star}}$ as a function of~$q$, for $N\in\{1,2,3,4\}$. The convergence bounds appears to be marginally better than {GDEL} for some sufficiently small inverse condition numbers. Further, the range of values of $q$ for which there is an improvement appears to be decreasing with~$N\geq 2$. Beyond this range, the worst-case values become significantly worse than that of {GDEL}. Though apparently not as dramatic as the worst-case bound from Theorem~\ref{thm:FR_2}, the quality of the bound appears to be decreasing with $N$, which stands in line with the practical need to restart the method~\cite{hager2006survey}. \begin{figure}[!ht] \centering % \input{fr_restarted_master.tex} \caption{This figure reports the worst-case values for the ratio $\sqrt[N]{\nicefrac{f_{N}-f_{\star}}{f_{0}-f_{\star}}}$ vs.~$q$ for {FR} for $N=1,2,3,4$. For $N=1$, {FR} and {GDEL} perform the same iteration. For $N=2,3,4$, the worst-case bound for {FR} is slightly better than that of {GDEL} for small enough values of~$q$, and gets larger than {GDEL} for larger values of~$q$. The range of $q$ for which {FR} is better than {GDEL} gets smaller as $N\geq 2$ increases. The curve $(1-\sqrt{q})^2$ (orange) corresponds to the rate of the lower complexity bounds for this class of problems~\cite{drori2022oracle}.\label{fig:FR_exact}} \end{figure} As in the previous section, we recall that those curves were obtained by numerically constructing ``bad'' worst-case examples satisfying our assumptions. In other words, there is no hope to obtain better results without adding assumptions or changing the types of bounds under consideration. \section{Conclusion.}\label{sec:conclusion} This works studies the iteration complexity of two variants of nonlinear conjugate gradients, namely the Polak-Ribière-Polyak (PRP) and the Fletcher-Reeves (FR) methods. We provide new improved complexity bounds for both those methods, and show that albeit unsatisfying, not much can a priori be gained from a worst-case perspective, as both method appear to behave similar or worse to regular steepest descent in the worst-case. Further, those results suggest that explaining the good practical performances of NCGMs might be out of reach for traditional worst-case complexity analyses on classical classes of problems. A limitation of this work stands in the fact that only somewhat ``ideal'' variants of nonlinear conjugate gradients were considered, as we make explicit use of exact line search procedures. However, there is a priori no reason to believe that different line search procedures would help avoiding the possibly bad worst-case behaviors. Further, the \emph{performance estimation} methodology allows tackling such alternate line search procedures into account, so the same methodology could be applied for tackling those questions. We leave such investigations for future work. \paragraph{Code.} All the numerical results in this paper were obtained on \texttt{MIT Supercloud Computing Cluster} with Intel-Xeon-Platinum-8260 processor with 48 cores and 128 GB of RAM running Ubuntu 18.04.6 LTS with Linux 4.14.250-llgrid-10ms kernel \cite{reuther2018interactive}. We used \texttt{JuMP}---a domain specific modeling language for mathematical optimization embedded in the open-source programming language \texttt{Julia} \cite{JuMPDunningHuchetteLubin2017}---to model the optimization problems. To solve the optimization problems, we use the following solvers: \texttt{Mosek 9.3} \cite{mosek}, \texttt{KNITRO 13.0.0} \cite{byrd2006k}, and \texttt{Gurobi 10.0.0}, which are free for academic use. The relative feasibility tolerance and relative optimality tolerance of all the solvers are set at $\textrm{1e-6}$. We validated the ``bad'' worst-case scenarios produced by our methodology using the \texttt{PEPit} package \cite{goujaud2022pepit}, which is an open-source \texttt{Python} library allowing to use the PEP framework. The codes used to generate and validate the results in this paper are available at: \begin{center} \url{https://github.com/Shuvomoy/NCG-PEP-code}. \end{center} \section*{Acknowledgments.} R.~M.~Freund acknowledges support by AFOSR Grant No.~FA9550-22-1-0356. A. Taylor acknowledges support from the European Research Council (grant SEQUOIA 724063). This work was partly funded by the French government under management of Agence Nationale de la Recherche as part of the ``Investissements d’avenir'' program, reference ANR-19-P3IA-0001 (PRAIRIE 3IA Institute). The authors thank Ian Ruffolo for careful reading of the manuscript and constructive feedback. \bibliographystyle{unsrt}
\section{INTRODUCTION} Noncentrosymmetric superconductors (NCS) have attracted considerable interest, since in the absence of inversion symmetry, an antisymmetric potential gradient gives rise to an antisymmetric spin-orbit coupling (ASOC). The ASOC lifts the two-fold spin degeneracy of the electronic bands, potentially allowing for unconventional superconducting properties such as the admixture of spin-singlet and spin-triplet pairing states \cite{mixture,ASOC}. In the noncentrosymmetric heavy fermion superconductor CePt$_3$Si, measurements of the magnetic penetration depth, thermal conductivity and specific heat showed the presence of line nodes in the energy gap \cite{CePt3Silinenode,CePt3Si2,CePt3Si3}, and nodal superconductivity was subsequently found in other NCS, such as Li$_2$Pt$_3$B \cite{Li2Pt3B,Li2Pt3B1NMR}, Y$_2$C$_3$ \cite{Y2C32}, K$_2$Cr$_3$As$_3$ \cite{K2Cr3As3Cao,K2Cr3As3Pang}, and ThCoC$_2$ \cite{Bhatt2019}. However, many NCS are found to be fully gapped superconductors, such as Mo$_3$Al$_2$C \cite{Bonalde2011,Bauer2014}, $RT$Si$_3$ ($R$ = La, Sr, Ba, Ca; $T$ = transition metal) \cite{Bauer2009,LaTSi31,LaTSi32,Kneidinger2014,Eguchi2011}, BiPd \cite{BiPdJL2,BiPd2NC}, Re$_6T$ \cite{Re6ZrRPSingh,Re6Zr1pang,Re6Hf}, La$_7T_3$ \cite{La7Ir3,La7Rh3}, BeAu \cite{Amon2018} and PbTaSe$_2$ \cite{PbTaSe21,PbTaSe22,Wilson2017}. Even though some of these systems have been found to have multiple superconducting gaps, many NCS show evidence for single gap \emph{s}-wave superconductivity, indicating negligible contributions from a spin-triplet pairing component. The predominance of such $s$-wave superconductivity even in systems with strong ASOC has posed the question as to what conditions are required to give rise to mixed parity pairing. In addition, even in NCS exhibiting unconventional properties, unambiguosly demonstrating the presence of singlet-triplet mixing remains challenging, and obtaining direct evidence may require probing associated topological superconducting phenomena such as gapless edge modes and Majorana modes \cite{Sato2009,Sato2010}. Time reversal symmetry breaking (TRSB) has been observed in the superconducting states of some weakly correlated NCS, such as LaNiC$_2$ \cite{LaNiC2TRS}, La$_7T_3$ \cite{La7Ir3,La7Rh3}, and several Re-based superconductors \cite{Re6ZrRPSingh,Re24Ti5,Re24Nb5}. TRSB has primarily been revealed by muon-spin relaxation measurements, which detect the spontaneous appearance of small magnetic fields in the superconducting state, even in the absence of external applied fields \cite{Ghosh2020}. In most cases, such systems have been found to have nodeless superconducting gaps, which has often been difficult to reconcile with the unconventional nature of the pairing state implied by TRSB. On the other hand, different behavior was recently found in the weakly correlated NCS CaPtAs, where there is evidence for both nodal superconductivity and TRSB \cite{CaPtAs1,CaPtAs2}. Consequently, it is important to survey a wide range of different classes of NCS, so as to look for novel behaviors arising from ASOC, as well as to reveal the origin of any time reversal symmetry breaking and to understand its relationship to the broken inversion symmetry. LaRhSn crystallizes in the noncentrosymmetric hexagonal ZrNiAl-type structure (space group \emph{P$\bar{6}2$m}) displayed in the inset of Fig.~\ref{figure1}, where the rare-earth atoms form a distorted kagome lattice. Compounds in this family with a magnetic rare-earth atom have been extensively studied due to the interplay of strong electronic correlations and frustrated magnetism \cite{Zhao2019,Tokiwa2015,CeIrSn}, while several other systems with nonmagnetic rare-earth elements are superconductors. For example, Sc(Ir,Rh)P, LaRhSn, LaPdIn are superconductors with relatively low transition temperatures $T_{\rm c}$ \cite{LaRhSn1,ScIrP,ScRhP,LaPdIn}, while (Zr,Hf)RuP, ZrRu(As,Si) and Mo(Ni,Ru)P have $T_c$'s over 10~K \cite{ZrHfRuP,ZrRuAs,ZrRuAs2,ZrRuSi,MoNiRuP}, where the higher $T_c$ values may be a consequence of the phonon spectra and electron-phonon coupling strengths \cite{ZrRuAs2,HfIrSi,ZrRuPDFT}. In this article, we study the order parameter of LaRhSn via measurements of the electronic specific heat and magnetic penetration depth, where the latter is probed using both the tunnel-diode oscillator (TDO) based method and muon-spin rotation ($\mu$SR). The experimental results obtained by various techniques can be consistently described by a single-gap \emph{s}-wave model corresponding to weak electron-phonon coupling. In addition, zero-field $\mu$SR measurements do not exhibit detectable changes below $T_c$, and therefore there is no evidence for TRSB in the superconducting state. \section{EXPERIMENTAL DETAILS} \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig1.eps} \vspace{-12pt} \caption{\label{figure1}(Color online) Temperature dependence of the electrical resistivity $\rho(T)$ of LaRhSn from room temperature down to 0.5~K. The insets show $\rho(T)$ near the superconducting transition, and the crystal structure of LaRhSn.} \vspace{-12pt} \end{figure} Single crystals of LaRhSn were synthesized using the Czochralski method, as described in Ref \onlinecite{LaRhSn3}. The specific heat was measured in a Quantum Design Physical Property Measurement System (PPMS) with a $^3$He insert. The resistivity $\rho(T)$ was measured in a $^3$He cryostat from room temperature down to 0.5~K, using a standard four-probe method. $\mu$SR measurements were performed using the MuSR spectrometer at the ISIS pulsed muon source of the Rutherford Appleton Laboratory, UK \cite{MuSR,MuSRdata}. The $\mu$SR experiments were conducted in transverse-field (TF) and zero-field (ZF) configurations, so as to probe the flux line lattice (FLL) and the presence or absence of time-reversal symmetry breaking, respectively. Powdered single crystals of LaRhSn were mounted on a high-purity silver sample holder, which was mounted on a dilution refrigerator, with a temperature range from 0.05~K to 2.5~K. With an active compensation system, the stray magnetic field at the sample position can be canceled to within 1 $\mu$T. TF-$\mu$SR experiments were carried out in several fields up to 60~mT. The shift of the magnetic penetration depth from the zero-temperature value $\Delta\lambda(T)=\lambda(T)-\lambda(0)$ was measured down to 0.3~K in a $^3$He cryostat, using a tunnel-diode oscillator (TDO) based method \cite{TDOdevice,Gfactor,TDO2}, with an operating frequency of 7~MHz and a noise level of 0.1~Hz. Samples with typical dimensions of $550 \times 450 \times 300$ $\mu$m$^3$, were mounted on a sapphire rod. The generated ac field is about 2 $\mu$T, which is much smaller than the lower critical field $H_{c1}$, ensuring that the sample remains in the Meissner state. $\Delta\lambda(T)$ is proportional to the frequency shift from zero temperature $\Delta f(T)$, i.e., $\Delta\lambda(T)$ = $G\Delta f(T)$, where $G$ is the calibration factor determined from the geometry of the coil and sample \cite{Gfactor}. \section{RESULTS} \subsection{Electrical resistivity and specific heat} \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig2.eps} \vspace{-12pt} \caption{\label{figure2}(Color online) Temperature dependence of the electronic specific heat as $C_{el}(T)/\gamma_n$\emph{T} of LaRhSn, where the solid line represents fitting with a single-gap \emph{s}-wave model. The inset displays the total specific heat $C(T)/T$, where the dashed line represents the fitting to the normal state contribution.} \vspace{-12pt} \end{figure} The single crystals of LaRhSn were characterized by measurements of the electrical resistivity and specific heat. Figure~\ref{figure1} displays the electrical resistivity $\rho(T)$ from room temperature down to 0.5~K, which exhibits metallic behavior in the normal state. The inset shows $\rho(T)$ at low temperatures, where there is a sharp superconducting transition at around 2.0~K. \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig3.eps} \vspace{-12pt} \caption{\label{figure3}(Color online) (a) Temperature dependence of the electronic specific heat as $C_{el}/\gamma_n$\emph{T} of LaRhSn under various applied fields. The inset displays the temperature dependence of the upper critical field $B_{c2}(T)$, derived from the specific heat measurements, where the solid line represents fitting with the WHH model where $B_{c2}(0)= 0.219(2)$~T. (b) Field dependence of the residual Sommerfeld coefficient plotted as $\gamma_{0.38\mathrm{K}}(B)$/$\gamma_n$ versus $B/B_{c2}(0)$ for LaRhSn, Re$_{24}$Nb$_{5}$ \cite{Re24Nb5}, MgB$_2$ \cite{MgB2} and LaNiC$_2$ \cite{LaNiC22}. The dashed and dashed-dotted lines correspond to the expected behaviors of nodal and single-gap \emph{s}-wave superconductivity, respectively.} \vspace{-12pt} \end{figure} The inset of Figure. \ref{figure2} displays the total specific heat $C(T)/T$ of LaRhSn in zero field, where there is a clear superconducting transition with a midpoint $T_c$~=~1.9~K, in line with the behavior of $\rho(T)$. In the normal state, the specific heat data are fitted by $C(T)/T = \gamma_n +\beta T^2 + \delta T^4$, with $\gamma_n$~=~11.15(4)~mJ mole$^{-1}$~K$^{-2}$, $\beta$~=~0.410(6)~mJ mole$^{-1}$~K$^{-4}$ and $\delta$~=~0.87(1)~$\mu$J mole$^{-1}$ K$^{-6}$. Here $\gamma_n$ is the normal state Sommerfeld coefficient, and the latter two terms represent the phonon contribution. The Debye temperature $\theta_D$ is estimated to be 241(1)~K using $\theta_D$~=~$(12\pi^4Rn/5\beta)^{1/3}$, where $R$~=~8.31 J mole$^{-1}$ K$^{-1}$ is the molar gas constant and \emph{n}~=~3 is the number of atoms per formula unit. The electron-phonon coupling constant $\lambda_{\textrm{el-ph}}$ can be approximated via \begin{equation} \lambda_{\textrm{el-ph}}~=~\frac{1.04+\mu^*\textrm{ln}(\frac{\theta_D}{1.45T_c})}{(1-0.62\mu^*)\textrm{ln}(\frac{\theta_D}{1.45T_c})-1.04}. \label{equation1} \end{equation} Using the typical values for $\mu^*$ of 0.1 -- 0.15, $\lambda_{\textrm{el-ph}}$~=~0.47 -- 0.57 are obtained, close to the derived values for isostructural LaPdIn \cite{LaPdIn}, indicating weakly coupled superconductivity in LaRhSn. In addition, the value of $\gamma_n$ is very similar to that of LaPdIn, but larger than the values for LuPdIn and LaPtIn which are not superconducting down to at least 0.5~K \cite{LaPdIn}. This is consistent with the magnitude of the density of states at the Fermi level playing an important role in giving rise to superconductivity in this family of compounds. The main panel of Fig.~\ref{figure2} shows the low temperature electronic specific heat $C_{el}(T)/\gamma_n T$, from which the phonon contribution has been subtracted. In the superconducting state, the entropy \emph{S} can be calculated by \cite{MgB22} \begin{equation} S~=~-\frac{3\gamma_n}{\pi^3}\int_0^{2\pi}\int_0^\infty[f\textrm{ln}f+(1-f)\textrm{ln}(1-f)]d\varepsilon d\phi, \label{equation2} \end{equation} where the $f(E,T)$~=~[1+exp(\emph{E}/$k_BT)]^{-1}$ is the Fermi-Dirac distribution function. Here, $E=\sqrt{\varepsilon^2+\Delta_k^2}$, where $\Delta_k(T)=\Delta(T)g_k$ is the superconducting gap function. Therefore, the electronic specific heat of superconducting state can be obtained by $C_{el}=TdS/dT$. In the case of a single-gap \emph{s}-wave model, there is no angle dependent component ($g_k=1$), and $\Delta(T)$ was approximated by \cite{delta0} \begin{equation} \Delta(T)~=~\Delta(0){\rm tanh}\left\{1.82\left[1.018\left(T_c/T-1\right)\right]^{0.51}\right\}, \label{equation3} \end{equation} \noindent where $\Delta(0)$ is the zero-temperature superconducting gap magnitude. As shown by the solid line in Fig. \ref{figure2}, the zero field $C_{el}/\gamma_n T$ can be well described by this single-gap \emph{s}-wave model, with $\Delta(0)=1.76(1)k_BT_c$. Upon applying a magnetic field, the bulk superconducting transition is shifted to lower temperatures and is completely suppressed at about 0.25~T (see Fig. \ref{figure3} (a)). The inset displays the extracted upper critical field $B_{c2}(T)$ and the corresponding fitting using the Werthamer-Helfand-Hohenberg (WHH) model \cite{WHH}, with a zero temperature upper critical field $B_{c2}(0)=0.219(2)$~T. Using $\lambda(0)=\sqrt{\Phi_0B_{c2}(0)}/\sqrt{24\gamma_n}\Delta(0)$ \cite{lamda0}, where the units of $B_{c2}(0)$ and $\gamma_n$ are gauss and ergs~cm$^{-3}$~K$^{-2}$, respectively, a penetration depth at zero temperature $\lambda(0)=244(1)$~nm is estimated using $\Delta(0)=1.76(1)k_BT_c$. Combined with a Ginzburg-Landau (GL) coherence length of $\xi_{GL}=\sqrt{\Phi/2\pi B_{c2}(0)}=38.7(2)$~nm, the GL parameter $\kappa$ is estimated to be 6.30(4), indicating that LaRhSn is a type-\uppercase\expandafter{\romannumeral2} superconductor. Using the values of $\lambda(0)$=244(1)~nm, a residual normal state resistivity $\rho_0= 25~\mu\Omega$~cm and $\gamma_n=11.15(4)$ mJ mole$^{-1}$K$^{-2}$, the mean free path $\ell$ and BCS coherence length $\xi_{\mathrm{BCS}}$ are estimated to be $\ell$=17.91(8)~nm and $\xi_{\mathrm{BCS}}$=43.8(2)~nm \cite{V3Si}. The mean free path $\ell$ is smaller than $\xi_{\mathrm{BCS}}$, indicating that the sample is in the dirty limit. Figure \ref{figure3} (b) displays the field dependence of the Sommerfeld coefficient value at 0.38~K, normalized by its value in the normal-state, i.e., $\gamma_{0.38\mathrm{K}}(B)$/$\gamma_n$. It can be seen that $\gamma_{0.38\mathrm{K}}(B)$/$\gamma_n$ shows a nearly linear field dependence, being similar to the fully gapped superconductor Re$_{24}$Nb$_{5}$ \cite{Re24Nb5}. On the other hand, $\gamma_{0.38\mathrm{K}}(B)$/$\gamma_n$ clearly deviates from the square-root field dependence (dashed line) expected for line nodal superconductors, as well as the typical behaviors of the multiband superconductors MgB$_2$ \cite{MgB2} and LaNiC$_2$ \cite{LaNiC22}. Note that $\gamma_{0.38\mathrm{K}}(B)$/$\gamma_n$ of LaRhSn are determined from the specific heat at the lowest measured temperature, and therefore even in zero-field the data have a finite value. \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig4.eps} \vspace{-12pt} \caption{\label{figure4}(Color online) ZF-$\mu$SR spectra of LaRhSn at 2.5~K ($T>T_c$) and 0.1~K ($T<T_c$). The solid lines show the results from fitting using Eq. \ref{equation4}.} \vspace{-12pt} \end{figure} \subsection{$\mu$SR measurements} Figure \ref{figure4} displays the zero-field (ZF) $\mu$SR spectra collected at 2.5~K ($T>T_c$) and 0.1~K ($T<T_c$). These are fitted with a damped Gaussian Kubo-Toyabe (KT) function \begin{equation} G_\textrm{ZF}(t)=A\left[\frac{1}{3}+\frac{2}{3}(1-\delta^2t^2)\textrm{exp}\left(-\frac{\delta^2t^2}{2}\right)\right]\textrm{exp}(-\Lambda t)+A_{\textrm{bg}}, \label{equation4} \end{equation} \noindent where \emph{A} is the initial asymmetry, and $A_{\textrm{bg}}$ corresponds to the time independent background term from muons stopping in the silver sample holder. $\delta$ and $\Lambda$ are the Gaussian and Lorentzian relaxation rates, respectively. Upon fitting with Eq. \ref{equation4}, $\delta=0.086(3)~\mu{\rm s}^{-1}$ and $\Lambda=0.0134(11)~\mu{\rm s}^{-1}$ were obtained at 2.5 K, while $\delta=0.082(3)~\mu{\rm s}^{-1}$ and $\Lambda=0.0157(10)~\mu{\rm s}^{-1}$ at 0.1~K. Therefore, we find no evidence for TRSB in the superconducting state of LaRhSn, and these results suggest that any spontaneous internal fields should be no larger than 6.6 $\mu$T, which is smaller than the corresponding fields in other reported TRSB superconductors \cite{Ghosh2020}. \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig5.eps} \vspace{-12pt} \caption{\label{figure5}(Color online) Transverse field $\mu$SR spectra of LaRhSn at (a) 2.5~K ($T>T_c$) and (b) 0.05~K ($T<T_c$) in an applied field of 40~mT. The solid lines show the results of fitting with Eq.~\ref{equation5}} \vspace{-12pt} \end{figure} \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig6.eps} \vspace{-12pt} \caption{\label{figure6}(Color online) (a) Temperature dependence of the Gaussian relaxation rate of the TF-$\mu$SR spectra in different applied fields between 40~mT and 60~mT. (b) Field dependence of the superconducting contribution to the TF-$\mu$SR relaxation rate $\sigma_{sc}$ at various temperatures, where the solid lines correspond to fitting using Eq. \ref{equation8}.} \vspace{-12pt} \end{figure} Transverse-field $\mu$SR (TF-$\mu$SR) measurements were carried out in the mixed state with applied fields in the range 40~mT to 60~mT, where the data were collected upon field-cooling in order to probe a well-ordered flux-line lattice (FLL). The results at 2.5~K and 0.05~K in a field of 40~mT are displayed in Fig.~\ref{figure5}. The significant increase of the depolarization rate corresponds to the inhomogeneous field distribution in the sample, characteristic of the formation of a FLL. The TF-$\mu$SR asymmetry were fitted to the sum of oscillations damped by Gaussian decaying functions \begin{equation} G_\textrm{TF}(t)~=~\sum_{i=1}^nA_i\textrm{cos}(\gamma_{\mu}B_it+\phi)e^{-(\sigma_it)^2/2} + A_{\textrm{BG}}, \label{equation5} \end{equation} \noindent where $A_i$ is the amplitude of the oscillating component, which precesses about a local field $B_i$ with a common phase offset $\phi$ and a Gaussian decay rate $\sigma_i$, while $\gamma_{\mu}/2\pi$~=~135.5 MHz/T and $A_{\textrm{BG}}$ are the muon gyromagnetic ratio and background term, respectively. The asymmetry can be well fitted with three oscillatory components ($n$~=~3), where $\sigma_3$ was fixed to zero, corresponding to muons stopping in the silver sample holder. Figure \ref{figure6}(a) displays the temperature dependence of $\sigma(T)$ obtained following the multiple-Gaussian method described in Ref \onlinecite{multigaussian}. Here, the first and second moment of the field distribution are calculated as \begin{equation} \langle B\rangle~=~\sum_{i=1}^{n-1}\frac{A_i~B_i}{A_1+\cdot\cdot\cdot A_{n-1}}, \label{equation6} \end{equation} \begin{equation} \langle B^2\rangle~=~\sum_{i=1}^{n-1}\frac{A_i}{A_1+\cdot\cdot\cdot A_{n-1}}[(\sigma_i/\gamma_\mu)^2+[B_i - \langle B\rangle]^2], \label{equation7} \end{equation} \noindent and $\sigma=\gamma_{\mu}\sqrt{\langle B^2\rangle}$. The relaxation rate in the normal state is ascribed to a temperature independent contribution arising from quasistatic nuclear moments, with a nuclear dipolar relaxation rate $\sigma_N~=~0.0851(27)~\mu s^{-1}$. The superconducting component of the variance $\sigma_{sc}$ is calculated as $\sigma_{sc}$~=~$\sqrt{\sigma^2-\sigma_N^2}$, and its field dependence is displayed in Fig. \ref{figure6}(b) for several temperatures. For small applied fields and large $\kappa$, $\sigma_{sc}$ is field independent and proportional to $\lambda^{-2}$, which is not applicable for the current measurements of LaRhSn. On the other hand, for $\kappa \geq5$ and 0.25/$\kappa^{1.3}$ $\leq$ $b$ $\leq$ 1, $\sigma_{sc}$ may be approximated by~\cite{sigmafit} \begin{equation} \sigma_{sc}~=~4.854 \times 10^4\frac{1}{\lambda^2}(1-b)[1+1.21(1-\sqrt{b})^3], \label{equation8} \end{equation} where \emph{b}~=~$B/B_{c2}$ is the applied field normalized by the upper critical field. Since the $\kappa$ of LaRhSn was determined to be about 6.30(4), the measurements of LaRhSn are within the applicability of Eq. \ref{equation8}. Therefore by fixing $B_{c2}(T)$ to the bulk values derived from the specific heat in Fig.~\ref{figure3}, the temperature dependence of $\lambda^{-2}(T)$ can be obtained from fitting with Eq.~\ref{equation8} [Fig.~\ref{figure6}(b)], and the results are shown in Fig. \ref{figure8}, together with the TDO results described in following section. \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig7.eps} \vspace{-12pt} \caption{\label{figure7}(Color online) The change of magnetic penetration depth $\Delta\lambda(T)$ of LaRhSn at low temperatures. The solid red, dashed blue and dashed-dotted magenta lines represent fitting to an \emph{s}-wave model, and power-law dependences $\sim T^{4.4}$ and $\sim T^2$, respectively. The inset displays the frequency shift $\Delta f(T)$ from 2.5~K down to 0.3~K, where there is a sharp superconducting transition at around $T_c$~=~2~K.} \vspace{-12pt} \end{figure} \subsection{TDO measurements and superfluid density analysis} Figure \ref{figure7} shows the penetration depth shift $\Delta\lambda(T)$ of LaRhSn at low temperatures, with a calibration factor \emph{G}~=~14.2~$\textrm{{\AA}/Hz}$. The inset displays the frequency shift $\Delta f(T)$ from 2.5~K down to the base temperature of 0.3~K, where a sharp superconducting transition is observed at $T_c=2$~K, in accordance with other measurements. Upon further cooling, $\Delta\lambda(T)$ flattens at the lowest measured temperatures, indicating fully gapped superconductivity in LaRhSn. For an \emph{s}-wave superconductor, the temperature dependence of $\Delta\lambda(T)$ for $T\ll T_c$ can be approximated by \begin{equation} \Delta\lambda(T)=\lambda(0)\sqrt{\frac{\pi\Delta(0)}{2k_BT}}\textrm{exp}\left(-\frac{\Delta(0)}{k_BT}\right). \label{equation9} \end{equation} \noindent As shown by the solid line, the experimental data below $T_c/3$ can be well described by the \emph{s}-wave model with $\Delta(0)=1.80(1)k_BT_c$, where $\lambda(0)=227.9$~nm was fixed to the value derived from TF-$\mu$SR. The data were also fitted by a power law dependence $\Delta\lambda(T)\propto T^n$, from 0.3~K up to 0.75~K. A large exponent of \emph{n}~=~4.4 is obtained, which is much larger than two, excluding nodal superconductivity in LaRhSn. \begin{figure} \includegraphics[angle=0,width=0.49\textwidth]{Fig8.eps} \vspace{-12pt} \caption{\label{figure8}(Color online) Temperature dependence of $\lambda^{-2}(T)$ as a function of the normalized temperature $T/T_c$. The data are derived from measurements using the TDO based method and TF-$\mu$SR measurements, which correspond to the empty circle and solid symbols, respectively. The lines show the results from fitting with different models for the gap structure.} \vspace{-12pt} \end{figure} To further characterize the superconducting pairing state of LaRhSn, the temperature dependence of $\lambda^{-2}(T)$ was analyzed, which is proportional to the superfluid density $\rho_s(T)$ as $\rho_s(T)=[\lambda(0)/\lambda(T)]^2$. Figure \ref{figure8} displays $\lambda^{-2}(T)$ as a function of the reduced temperature $T/T_c$, where the data are derived from both the TDO and TF-$\mu$SR measurements, which show nearly identical behavior. Since the previous analysis suggested that the sample is in the dirty limit, the results from TF-$\mu$SR were fitted with the following expression for a dirty \emph{s}-wave model \cite{dirtys} \begin{equation} \rho_s(T)~=~\frac{\Delta(T)}{\Delta(0)}\textrm{tanh}\left\{\frac{\Delta(T)}{2k_BT}\right\}. \label{equation11} \end{equation} \noindent As shown by the dashed line in Fig. \ref{figure8}, the dirty \emph{s}-wave model can well describe the experimental data, with $\lambda(0)=227.9(9)~$nm and $\Delta(0)=1.77(4)k_BT_c$. The data were also analyzed using the clean limit expression \begin{equation} \rho_{\rm s}(T)=\frac{\lambda^{-2}(T)}{\lambda^{-2}(0)}=1+2 \left\langle\int_{\Delta_k}^{\infty}\frac{EdE}{\sqrt{E^2-\Delta_k^2}}\frac{\partial f}{\partial E}\right\rangle_{\rm FS}, \label{equation10} \end{equation}\noindent where a clean single gap \emph{s}-wave model can also fit the data well, yielding a larger gap value of $\Delta(0)=2.05(3)k_BT_c$. Here the gap value obtained from the dirty \emph{s}-wave model is in very good agreement to those derived from the analysis of specific heat and low temperature $\Delta\lambda(T)$, while the clean limit value is considerably larger, which is in-line with the previous dirty limit calculation. We note that due to the samples being in the dirty limit, we cannot exclude an anisotropic superconducting gap in LaRhSn, since impurity scattering can suppress any gap anisotropy. On the other hand, as also shown in Fig. \ref{figure8}, a \emph{d}-wave model with $g_k$~=~cos~2$\phi$ and \emph{p}-wave model with $g_k$~=~sin~$\theta$ ($\phi$= azimuthal angle, $\theta$= polar angle) cannot account for the data, further indicating a lack of nodal superconductivity in LaRhSn. Meanwhile, the value of $\lambda(0)$ obtained from $\mu$SR experiments is very close to that from specific heat results. Using this value of $\lambda(0)=227.9(9)$nm, $\kappa=5.89(4)$ is estimated, which corresponds well to the value from the specific heat analysis. The obtained superconducting parameters of LaRhSn are displayed in Table~\ref{ResTab}. Therefore, the results of specific heat, TDO-based measurements and $\mu$SR can all be consistently described by a single-gap \emph{s}-wave model with a gap magnitude very close to that of weak-coupling BCS theory, and there is no evidence for time-reversal symmetry breaking below $T_{\rm c}$. \begin{table}[t] \centering \caption{Superconducting parameters of LaRhSn, where the parentheses with $C$ and $\mu$SR denote the results from the specific heat and $\mu$SR, respectively.} \label{ResTab} \begin{ruledtabular} \begin{threeparttable} \resizebox{\columnwidth}{!}{ \begin{tabular}{c c c} \multirow{1}*{Property}&\multirow{1}*{Unit}&\multicolumn{1}{c}{Value}\\[2pt \cline{1-3} \\[1pt] $T_{c}$&K&1.9\\[2pt] $B_{c2}$(0)&T&0.219(2)\\[2pt] $\gamma_n$&mJ mole$^{-1}$K$^{-2}$&11.15(4)\\[2pt] $\Theta_D$&K&241(1)\\[2pt] $\lambda_{el-ph}$& &0.47-0.57\\[2pt] $\xi_{GL}$&nm&38.7(2)\\[2pt] $\ell$&nm&17.91(8)\\[2pt] $\xi_{\mathrm{BCS}}$&nm&43.8(2)\\[2pt] $\lambda_{0}$(C)&nm&244(1)\\[2pt] $\lambda_{0}$$(\mu\mathrm{SR})^{\mathrm{dirty}}$&nm&227.9(9)\\[2pt] $\kappa$(C)& &6.30(4)\\[2pt] $\kappa$$(\mu\mathrm{SR})^{\mathrm{dirty}}$& &5.89(4)\\[2pt] $\Delta(0)$(C)&$k_BT_c$&1.76(1)\\[2pt] $\Delta(0) $$(\mu\mathrm{SR})^{\mathrm{dirty}}$&$k_BT_c$&1.77(4)\\[2pt] \end{tabular} } \end{threeparttable} \end{ruledtabular} \end{table} \section{SUMMARY} In summary, we have studied the order parameter of the noncentrosymmetric superconductor LaRhSn. Both the specific heat and magnetic penetration depth show exponentially activated behavior at low temperatures, providing strong evidence for fully gapped superconductivity. $\lambda^{-2}(T)$ derived from the TDO based method and TF-$\mu$SR, as well as the specific heat can be consistently well described by a single-gap \emph{s}-wave model, with a gap magnitude very close to that of weak coupling BCS theory. Together with findings for LaPdIn \cite{LaPdIn} and ZrRuAs \cite{ZrRuAs2}, our results suggest that fully gapped \emph{s}-wave superconductivity, together with a lack of evidence for time reversal symmetry breaking, are consistent common features of weakly correlated NCS with the ZrNiAl-type structure and there is a lack of significant singlet-triplet mixing. \begin{acknowledgments} This work was supported by the National Key R$\&$D Program of China (Grant No.~2017YFA0303100), the Key R$\&$D Program of Zhejiang Province, China (Grant No.~2021C01002), the National Natural Science Foundation of China (Grant No.~11874320, No.~11974306 and No.~12034017), and the Zhejiang Provincial Natural Science Foundation of China (R22A0410240). D.T.A. would like to thank the Royal Society of London for Advanced Newton Fellowship founding between UK and China. Experiments at the ISIS Pulsed Neutron and Muon Source were supported by a beamtime allocation from the Science and Technology Facilities Council (Grant No.~RB2010190 \cite{MuSRdata}) \end{acknowledgments}
\section{Introduction} Sequence labeling, which refers to assign sequences of labels to observed sequential data, is widely used in Natural Language Processing (NLP) tasks including Part-of-Speech (POS) tagging, Chunking and Named Entity Recognition (NER). Many downstream NLP applications (e.g. relation extraction and machine translation ) can benefit from sequential label assignments of these fundamental NLP tasks. Traditional sequence labeling models like Hidden Markov Models (HMMs) and Conditional Random Fields (CRFs) require handcrafted features which need to be carefully designed to obtain good results on a specific dataset. Over the past decade, deep sequence models have resulted in improving the performance of sequence labeling. For example, Bi-LSTM-CRF \cite{re1} and Transformer\cite{re2}. However, these sequence labeling models require a large amount of training data with exact annotations, which is costly and laborious to produce. In recent years, well-developed commercial crowdsourcing platforms (e.g. Amazon Mechanical Turk and CrowdFlower \cite{re3}) have flourished as effective tools to obtain large labeled datasets. Crowdsourcing utilizes contribution of the group's intelligence, but the quality of crowd labels still cannot be guaranteed as the expertise level of annotators varies. Therefore the major focus of learning from crowds is on estimating the reliability of annotators and building prediction models based on the estimated ground-truth labels. For example, Snow et al. \cite{re4} used bias correction to combine non-expert annotation. Raykar et al. \cite{re5} proposed to jointly estimate the coefficients of a logistic regression classifier and the annotators’ expertise. Many effective models like HMM-Crowd \cite{re6} and Sembler \cite{re7} extend crowdsourcing to sequence labeling, which enables better aggregating crowd sequential annotations. But these approaches measure the quality of crowd labels under the assumption of only one ground-truth. As a result, the disagreement between annotators has to be considered as noisy labelings. However, research in NLP field shows that inter-disagreement among experts could be a good indicator for ambiguity and uncertainty that is inherent in language \cite{re8}. Apparently, there is no clear answer for the linguistically hard cases. As shown in Figure 1, ``like” can be tagged as conjunction or adjective. Furthermore, inter-disagreement between experts could reveal confusing label information that is related to the distribution of hard cases over label pairs. Figure 2 demonstrates label confusion matrix in POS tagging task, where ``ADJ" (adjectives) and ``NOUN" (nouns) are more likely to be confused. Wisely incorporating confusing label information into supervised learning can make the classifier more robust \cite{re8}. However, existing crowd sequential models do not take inter-disagreement between annotators into account. \begin{figure} \centering \includegraphics[width=3.3in,height = 1.3 in ]{mainfig/f1.jpg} \caption {Two examples of doubly-annotated twitter POS tagging data by different experts.} \label{fig:secondfigure} \end{figure} \begin{figure} \centering \includegraphics[width=3in,height = 1.8in ]{mainfig/cfnoa.png} \caption {Label confusion matrix derived from two gold annotations of 500 twitters POS tagging.} \label{fig:secondfigure} \end{figure} To explore the inter-disagreement between reliable annotators and effectively preserve confusing label information, in this paper, we propose a framework called Learning Ambiguity from Crowd Sequential Annotations (LA-SCA). Our contributions can be summarized as follows: First, we develop a hierarchical Bayesian model to group annotators into different clusters. By imposing an hierarchical prior on the confusion matrix that describes the reliability of annotators in the same cluster, the hierarchical Bayesian model allows the annotators that belong to the same cluster to be characterized with different but similar reliability, which aims to preserve inter-disagreement between reliable annotators. Second, a low-rank model is formulated to model the relationship between the size of group the annotator involved in, annotator’s reliability and element's unambiguity in each sequence. Then inter-disagreement between reliable annotators on ambiguous elements can be obtained to compute label confusion matrix. Third, cost-sensitive mechanism is combined to sequence labeling to encourage two more confusing label sequences that contain the ground-truth incur a lower Hamming loss, which aims to improve the robustness of sequence model. \section{Related Work} Hidden Markov Models (HMMs) \cite{re9,re10} and Conditional Random Fields (CRFs) \cite{re12,re16} form the most popular generative-discriminative pair for sequence labeling. With the great success of DL models, the combination of deep learning and graphical models receives increasing attention \cite{re17}. For example, Bi-LSTM-CRF \cite{re1} is proposed to efficiently encode past and future input features by combining a bidirectional LSTM network and a CRF layer. Furthermore, Transformer \cite{re2} is proposed with attention mechanism to learn long-range dependencies, which demonstrates significant improvement in efficiency and performance. However, both traditional and DL models require a large amount of training data with exact annotations, which is financially expensive and prohibitively time-consuming. Incorporating semi-supervised learning to sequence labeling models (e.g. semi-supervised CRFs and semi-SVM) can partly lighten the burden of sequential annotations, but this learning mechanism still needs exact labelings. Crowdsourcing provides an effective tool to collect large labeled dataset. Existing crowdsourcing learning models can be grouped into two types: wrapper and joint models. The former uses the inferred ground-truths from crowds for subsequent classifier learning while joint models simultaneously estimate annotators' reliability and learn the prediction model. Dawid \& Skene (DS) \cite{re18} aggregation model and its variants (e.g. GLAD \cite{re19}) explore different ways to model the relationship between the ground-truth, annotators' reliability and corresponding annotations, and then use Expectation Maximization (EM) approach to estimate the ground-truth labels and annotators' reliability. Sembler \cite{re7} and HMM-Crowd \cite{re6} models are proposed to aggregate multiple annotations to learn sequence model. \citet{re20} further took label dependency in sequential annotation into consideration and used a Bayesian approach to model crowd sequential labels. It should be addressed that the above crowdsourcing learning models assume only one ground-truth and do not consider the inter-disagreement among annotators. As a result, these models fail to capture inherent semantic ambiguity in NLP tasks and preserve confusing label information. To explore inter-disagreement between annotators, \citet{re23} derived a label confusion matrix from doubly gold annotations and showed that the POS tagging classifier sensitive to confusing label information is more robust. \citet{re21} proposed CrowdTruth methodology to model ambiguity in semantic interpretation and treat all reliable annotator's labelings on ambiguous cases as high quality annotations. \citet{re22} used ambiguity-aware ground-truths to train the classifier for open-domain relation extraction and the results showed that ambiguity-aware crowds are better than the experts regarding the quality and efficiency of annotation. However, CrowdTruth based models only preserve multiple ground-truths for ambiguous instances and ignore confusing label information that can benefit robust classifier learning. In recent years multi-label crowdsourcing has been developed to identify multiple true labels from crowds for multi-label tasks. Different from discovering inter-disagreement between annotators in single-label crowdsourcing, most multi-label crowdsourcing methods assume that multiple ground-truths are assigned by one annotator. For example, \citet{re31} extended generative single-label crowdsourcing method by combining the correlation among labels while \citet{re30} further utilized neighbors’ annotation and effort-saving annotating behavior of each annotator to jointly estimate annotators' expertise and multi-label classifier. There have also been some research works exploring multi-label crowd consensus \cite{re32, re33} with the assumption that reliable annotators share the same label correlations, which fails to preserve inter-disagreement among reliable annotators, though. \section{Proposed framework} The proposed framework LA-SCA contains three parts: infer ground-truths and reliable annotators by hierarchical modeling of crowds; obtain confusing label information from inter-disagreement between reliable annotators on ambiguous elements via a low rank model; incorporate label confusion information in cost-sensitive sequence labeling. The details are described as follows: \subsection{Hierarchical Modeling for Crowd Annotations} Let $Y =\left\{y_{i1},y_{i2},...,y_{iL}\right\}_{i=1}^{N}$ denotes the crowd annotations provided by $L$ annotators over $N$ instances. Each annotator $l$ is belonged to a cluster $c\in \left \{ 1,2,...C \right \}$ and characterized by a confusion matrix $\Psi ^{c_l}\in[0,1]^{T\times T}$ where $T$ denotes the size of possible label set for $Y$. We assume that the annotators in the same cluster have similar reliability but the corresponding annotations could be different. For example, annotators with lower reliability will provide various annotations in labeling a specific instance while reliable annotators have different opinions on ambiguous instances. To preserve disagreement between the annotators in the same cluster, we use the following hierarchical prior on each row of the confusion matrix $\Psi ^{c_l}$: \begin{equation} \eta^{c}_t \sim \mathrm{Exponential}(\lambda_t), \eta^{c}_t >0, \end{equation} \begin{equation} \bm{\beta}_t^{c}\sim \mathrm{Dirichlet}({\bm{\alpha}_t}), 0< \bm{\beta}_{tj}^{c} <1, \sum_{j=1}^{T}\bm{\beta}_{tj}^{c} = 1, \end{equation} \begin{equation} \Psi _t^{c_l}\sim \mathrm{Dirichlet}(\eta^{c}_t\bm{\beta}_t^{c}), \end{equation} \begin{equation} y_{il}\sim \mathrm{Multinomial}(\Psi _{z_i}^{c_l}), \end{equation} where $c_l$ denotes that annotator $l$ belongs to cluster $c$ and $z_i$ is the ground truth label of $i_{th}$ instance. $\eta^{c}_t $ and $\bm{\beta}_t^{c}$ can be understood as the precision and mean of $\Psi _t^{c_l}$ respectively. Besides, the cluster assignment $c_l$ and the ground truth $z_i$ follows multinomial distribution as follows: \begin{equation} c_l\sim \mathrm{Multinomial}(\bm{\nu}), \end{equation} \begin{equation} z_i\sim \mathrm{Multinomial}(\bm{\gamma}), \end{equation} where $\bm{\nu}$ and $\bm{\gamma}$ are sampled from $\mathrm{Dirichlet}(\bm{\epsilon_{{\nu}}})$ and $\mathrm{Dirichlet}(\bm{\epsilon_{\gamma}})$ respectively. We employ collapsed Gibbs sampling \cite{re24, re34} to estimate the conditional distribution over hidden variables $z_i$ and $c_l$ (more computation details can be found in Technical Appendix A). Let $\bm{c}$ and $\bm{z}$ denote the cluster assignments and true labels respectively, $\bm{c}^{-l}$ indicates that annotator $l$ is excluded from the cluster assignment and $\bm{z}^{-i}$ excludes $i_{th}$ instance. The conditional distribution of cluster assignment of annotator $l$ given the rest variables is computed as: \begin{equation} \begin{aligned} &p(c_l=c|\bm{c}^{-l},\bm{z},Y,\eta,\bm{\beta })\\ &\propto p(c_l=c|\bm{c}^{-l})\times p(Y^{l}|Y^{-l},\bm{z},\bm{c},\eta,\bm{\beta})\\ &\propto (n_c^{-l}+\bm{\epsilon _\upsilon}/C )\times \prod_{t}\frac{\Gamma (\eta _{t}^{c})}{\Gamma (n_{lt}+\eta _{t}^{c})}\prod_{s}\frac{\Gamma (n_{lts}+\eta _{t}^{c}\bm{\beta }_{ts}^{c})}{\Gamma (\eta _{t}^{c}\bm{\beta }_{ts}^{c})},\end{aligned} \end{equation} where $n_c^{-l}$ denotes the number of annotators (exclude $l$) assigned to cluster $c$. $n_{lt}$ is the number of instances that are annotated by $l$ and have true label $t$. $n_{lts}$ denotes the number of instances that are annotated with label $s$ by $l$ and have true label $t$. Similarly, $p(z_i=t|\bm{z}^{-i},Y,\bm{c},\eta,\bm{\beta })$ is given as \begin{equation} \begin{aligned} &p(z_i=t|\bm{z}^{-i},Y,\bm{c},\eta,\bm{\beta} )\\ &\propto p(z_i=t|\bm{z}^{-i})\times p(y_{i}|Y^{-i},z_i = t,\bm{z}^{-i},\bm{c},\eta,\bm{\beta})\\ &\propto (n_t^{-i}+\bm{\epsilon _\gamma} /T)\times \prod_{c}\prod_{c_l=c}\frac{\prod_{s}(n_{lts}^{-i}+\eta _{t}^{c}\bm{\beta} _{ts}^{c})^{I(y_{il}=s)}}{n_{lt}^{-i}+\eta _{t}^{c}}, \end{aligned} \end{equation} where $n_{t}^{i}$ denotes the number of instances (exclude $i$) with true label $t$. $n_{lt}^{i}$ denotes the number of instances (exclude $i$) that are annotated by $l$ and have true label $t$. $n_{lts}$ denotes the number of instances (exclude $i$) that are annotated with label $s$ by $l$ and have true label $t$. Due to non-conjugacy of Exponential and Dirichlet prior for the likelihood function $p(Y|\bm{z},\bm{c},\eta,\bm{\beta})$, we use Metropolis-Hastings (MH) algorithm \cite{re25} to estimate the conditional posterior distribution $p(\bm{\beta}_{tj}^c|\bm{\beta}_{t(\sim j)}^c,\eta _t^c,Y^c)$ and $p(\eta _t^c|\bm{\beta}_t^c ,Y^c)$ for each cluster, and the symmetric proposal distribution (i.e. uniform distribution) is selected to simulate a candidate sample (algorithm details are presented in Technical Appendix C Algorithm 1 and 2). $p(\bm{\beta}_{tj}^c|\bm{\beta}_{t(\sim j)}^c,\eta _t^c,Y^c)$ is given as \begin{equation} \begin{aligned} &p(\bm{\beta}_{tj}^c|\bm{\beta}_{t(\sim j)}^c,\eta _t^c,Y^c)\propto p(Y^{cj}|Y^{-cj},\bm{\beta}_{t}^c,\eta _t^c)\times p(\bm{\beta}_{tj}^c|\bm{\beta}_{t(\sim j)}^c)\\ &\propto \prod_{c_l= c}\left \{ \frac{\Gamma (n_{ltj}+\eta _t^c\bm{\beta}_{tj}^c)}{\Gamma (\eta _t^c\bm{\beta}_{tj}^c)} \frac{\Gamma (n_{ltt}+\eta _t^c\bm{\beta}_{tt}^c)}{\Gamma (\eta _t^c\bm{\beta}_{tt}^c)}\right \}\\&\times \left ( \frac{\bm{\beta}_{tj}^c}{1-u_{tj}^c} \right )^{\lambda_t \bm{\alpha} _{tj}-1}\left ( 1- \frac{\bm{\beta}_{tj}^c}{1-u_{tj}^c}\right )^{\lambda_t \bm{\alpha} _{tt}-1}, \end{aligned} \end{equation} where $\bm{\beta}_{t}^c=\left [\bm{ \beta}_{t1}^c ,...,\bm{\beta}_{tj}^c,...,\bm{\beta}_{tT}^c\right ]$. $u_{tj}^c=1-\sum_{s=1,s\neq t,s\neq j} ^{T}\bm{\beta}_{ts}^{c}$. The conditional posterior distribution of $\bm{\beta}_{tt}^c$ is obtained via $\bm{\beta}_{tt}^c=1-\sum_{j=1,j\neq t}^T \bm{\beta}_{tj}^{c}$. Derivation details of $p(\bm{\beta}_{tj}^c|\bm{\beta}_{t(\sim j)}^c,\eta _t^c,Y^c)$ can be found in Technical Appendix B. $p(\eta _t^c|\bm{\beta}_t^c ,Y^c)$ is defined as \begin{equation} \begin{aligned} p(\eta _t^c|\bm{\beta}_t^c ,Y^c)\propto& \prod_{c_l= c}\frac{\Gamma(\eta _t^c)}{\Gamma (n_{lt}+\eta _t^c)}\\ &\times\prod_{j}\frac{\Gamma(n_{ltj}+\eta _t^c\bm{\beta} _{tj}^c)}{\Gamma (\eta _t^c\bm{\beta} _{t}^c)}\times \lambda_t e^{-(\lambda_t\eta _t^c)}. \end{aligned} \end{equation} \cite{re35} By iteratively estimating $z_i$, $c_l$, $\bm{\beta}_{t}^c$ and $\eta_t^c$ until convergence, annotators that have similar reliability could be grouped into the same cluster. Since inter-disagreement among experts could reveal linguistically ambiguous cases, to identify the cluster with reliable annotators, we compute the shared confusion matrix of each cluster based on the estimated ground truths $\bm{z}$. One ground-truth for each instance does not affect estimation of the shared confusion matrix as ambiguous cases only take up a very small part in the whole dataset \cite{re23}. The entry of the shared confusion matrix $M^c \in \mathcal{R}^{T \times T}$ for the cluster $c$ is defined as \begin{equation} M^c_{t,s}=\frac{\sum_{i}I(z_i=t)\prod\nolimits_{{l\in c}}I(y_{il}=s)}{\sum_{i}I(z_i=t)}, \end{equation} and the high-reliability cluster is obtained with $\arg\max_c\sum_{t=1}^{T}M^c_{t,t} \Big /T$. \subsection{Identifying Ambiguity via Low Rank Model} Based on the identified reliable annotators, to estimate ambiguity degree of each element in a sequence, we assume that in the high-reliability cluster the decisions of annotators form small groups for ambiguous elements and annotators who is more reliable in labeling this sequence is consistent with other annotators for unambiguous elements. Inspired by the quantitative formula used to describe the relationship between the size of group, annotator's reliability and task clarity \cite{re26}, we construct an $L\times N^s$ matrix $A$ for $s_{th}$ sequence where $N^s$ is the length of the sequence. In this matrix, each entry $A(l,N_j^s)$ denotes the size of group for annotator $l$ involved in labeling $j_{th}$ element in $s_{th}$ sequence. We define $A(l,N_j^s)$ as \begin{equation} A(l,N_j^s)=\omega_l^s\times \mu _j^s, \end{equation} where $\omega_l^s$ represents the reliability of annotator $l$ in labeling $s_{th}$ sequence and $\mu _j^s$ is the degree of unambiguity of $j_{th}$ element. Intuitively, if the annotator is more reliable or the element is less ambiguous, the size of group is more larger. Thus we employ rank-1 factorization to formulate the relationship between $A(l,N_j^s)$, $\omega_l^s$ and $\mu _j^s$. The degree of unambiguity of each element in $s_{th}$ sequence is computed as follows: \begin{equation} A^s=U\Lambda V^T, \end{equation} \begin{equation} \bm{\omega}^s=U_{.1}\sqrt{\Lambda _{11}}, \end{equation} \begin{equation} \bm{\mu}^s=V_{.1}\sqrt{\Lambda _{11}}, \end{equation} where $\bm{\omega}^s=\left [ \omega^s_1,\omega^s_2,...,\omega^s_L \right ]$ and $\bm{\mu}^s=\left [ \mu_1,\mu_2,...,\mu_{N_s} \right ]$. There are three steps concerning identifying ambiguity: \textbf{a. identify ambiguous elements.} We rank the set of estimated degree of unambiguity for the whole sequential data and choose an appropriate percentage $p$ to identify the element that falls in the range of top $p$ minimum as ambiguous cases. \textbf{b. compute inter-disagreement between annotators.} For the identified ambiguous cases, the disagreement among reliable annotators provides multiple possible ground-truths. Let $\left \{ y_{jt} \right \}_{t=1}^{t=L'}(L'<= L)$ denotes the set of labels assigned by annotators for $j_{th}$ ambiguous elements in $s_{th}$ sequence, the score of $y_{jt}$ can be defined as \begin{equation} S(y_{jt})=\frac{\sum_{l=1}^{L}I(y_{jl}=y_{jt})\omega^s_l}{\sum_{l=1}^{L}I(y_{jl}=y_{jt})}. \end{equation} In practice ambiguous instances have limited gold annotations \cite{re8}. We select top two labels for each ambiguous element by $S(y_{jt})$ in descending order and combine them with the inferred ground-truth in hierarchical modeling. \textbf{c. obtain confusing label information.} Label confusion matrix $CF\in \mathcal{R}^{T \times T}$ is utilized to show the degree of confusion between label pairs, and the entry $CF(i,j)$ is defined as the mean of $p(z(x)=i,z(x)=j)$ and $p(z(x)=j,z(x)=i)$ where $p(z(x)=i,z(x)=j)$ is computed as \begin{equation} p(z(x)=i,z(x)=j)=\frac{\sum_{k}I(z(x_k)=i,z(x_k)=j)}{\sum_{k}I(z(x_k)=i)}, \end{equation} where $k$ denotes $k_{th}$ element in the whole sequential dataset, and $p(z(x)=j,z(x)=i)$ is computed in a similar way. \subsection{Cost-sensitive sequence labeling} Given $\left \{\bm{x}_i,\bm{z}_i \right \}_{i=1}^{N}$ sequential dataset, where $\bm{z}_i$ are the inferred ground-truths via hierarchical Bayesian modeling. Traditional training criteria is to maximize the likelihood of conditional log-linear model, which does not distinguish the ground-truth from all incorrect outputs that are penalized equally through normalization. To improve sequence labeling, we employ cost-sensitive mechanism to incorporate confusing label information in the training, where the label sequence that is more confusing with the ground-truth incurs lower cost. The objective of cost-sensitive sequence labeling is defined as \iffalse \begin{equation} \scalebox{0.83}{$ L_{\mathrm{CS}}(\bm{\theta})=\sum_{i=1}^{N}\left \{ \bm{\theta}^T\bm{f}(\bm{x}_i,\bm{z}_i)- \log\sum\limits_{\bm{z}_j}\mathrm{cost}(\bm{z}_j,\bm{z}_i) \bm{\theta}^T\bm{f}(\bm{x}_i,\bm{z}_j) )\right \}$}, \end{equation} \fi \begin{equation} L_{\mathrm{CS}}(\bm{\theta}) =\sum_{i=1}^{N}\log \frac{\exp\left \{\bm{\theta}^T\bm{f}(\bm{x}_i,\bm{z}_i)\right \}}{\sum\limits_{\bm{z}_j}\mathrm{cost}(\bm{z}_j,\bm{z}_i)\exp \left\{ \bm{\theta}^T\bm{f}(\bm{x}_i,\bm{z}_j)\right \} }, \end{equation} where $\bm{f}(\bm{x}_i,\bm{z}_i)$ denotes the feature function. $\mathrm{cost}(\bm{z}_j,\bm{z}_i)$ is used to measure the influence of confusing label information on the loss. A weighted Hamming loss is defined to describe $\mathrm{cost}(\bm{z}_j,\bm{z}_i)$ as \begin{equation} \mathrm{cost}(\bm{z}_j,\bm{z}_i)=\frac{1}{K_i}\sum_{k=1}^{K_i}\left ( 1-p(\bm{z}_{jk},\bm{z}_{ik})\right )*\left ( \bm{z}_{jk}\oplus \bm{z}_{ik}\right ), \end{equation} where $K_i$ is the number of tokens in $i_{th}$ sequence. $\oplus$ is the XOR boolean operator, $p(\bm{z}_{jk},\bm{z}_{ik})$ is obtained from label confusion matrix. \section{Experiments} We conduct experiments on POS tagging and NER for English. It is widely debatable of POS analysis where there are many hard cases that annotators disagree on \cite{re8}, while in NER the definition and partition of named entity still remains arguable. In the following sections, we present quantitative results to investigate the effectiveness of our framework in inferring the ground-truths, predicting unknown sequences and preserving confusing label information. \subsection{Datasets} Current published datasets cannot satisfy both crowd annotations and multiple gold annotations. We employ multiple gold-annotated and crowd-annotated datasets as follows: \textbf{POS tagging}: Most POS tagging datasets only contain one gold annotation which fail to identify hard cases. Therefore we use three twitter POS tagging datasets in the work of studying cost-sensitive POS tagger \cite{re22}, which include 500 tweets with doubly gold annotations ( denoted as T-DGA for simplicity), RITTER-TEST (118 tweets) dataset and INHOUSE (200 tweets) dataset. We employ T-DGA as training data (doubly gold annotations guarantee the existence of hard cases), and RITTER-TEST and INHOUSE as test datasets\footnote{Both RITTER-TEST and INHOUSE have only one gold annotation.}. \textbf {NER}: CoNLL-2003 shared NER dataset \cite{re27} is one of the most common benchmarks used in NLP community for sequence labeling, which contains four types of entities: persons (PER), locations (LOC), organizations (ORG) and miscellaneous (MISC). Rodrigues et al. \cite{re28} put 400 articles from CoNLL-2003 on Amazon’s Mechanical Turk to collect crowd annotations. There are total 47 annotators and the average number of annotators per article is 4.9. In this paper, after pre-processing these crowd-labeled data we select 3000 sentence-level sequences, and use CoNLL 2003 test data\footnote{CoNLL 2003 testset has only one gold annotation.}. \subsection{Baselines} We use the following six models to learn from crowd sequential data as baselines. MVtoken \cite{re27}: The ground-truth label sequence is obtained by choosing the label with more votes in token level. DS \cite{re18}: The EM algorithm is employed to assign weight to each vote in token level. MACE \cite{re29}: By including a binary latent variable that denotes if and when each annotator is spamming, the model can identify which annotators are trustworthy and produce the true label. Sembler \cite{re7}: The model extends crowdcoursing learning on instance level to sequence level and jointly estimate annotators' reliability and sequence model. HMM-Crowd \cite{re6}: Based on HMMs, the model further models the “crowd component” by including the parameters for the label quality of annotators and crowd variables. HC-CLL: To verify the effectiveness of cost-sensitive sequence labeling, we also train the sequence prediction model by maximizing conditional log-likelihood. \subsection{Experimental setting} Synthetic crowd annotations: As T-DGA does not have real crowd annotations, we simulate annotators with different reliability by controlling the precision of their annotations. In practice the number of annotators is limited, we set the total number of annotators as 15 and arrange three different assignments: $[5,5,5]$, $[8,4,3]$ and $[3,4,8]$. In each assignment, three different ranges of precision: $[0.9,0.7]$, $[0.7,0.4]$ and $[0.4,0.1]$ are set to indicate various reliability from high to low levels. LA-SCA framework: The optimal number of clusters for annotators is selected between the range $[2,5]$ based on Bayesian information criteria. $\lambda_t$ is set to 2. To confirm that crowd annotations are better than randomly labeling, the diagonal of $\bm{\alpha}_t$ is set to 0.7 while the off diagonal elements are set to 0.3. Furthermore, we select $p = 10\%$ to identify ambiguous elements. \subsection{Experimental results} \subsubsection{Comparing with baselines} We evaluate the effectiveness of the proposed framework in inferring ground-truths for training data and predicting testset. \textbf{POS tagging task:} For simplicity, we denote three different crowd annotations $[8,4,3]$, $[5,5,5]$ and $[3,4,8]$ as $\mathrm{ca}_1$, $\mathrm{ca}_2$ and $\mathrm{ca}_3$, respectively. Table 1 shows accuracy of inferring ground-truths in T-DGA dataset (HC-CLL is the same as LA-SCA in inferring ground-truths). We can see that most of crowd models achieve better performance by increasing the proportion of high quality annotations. The performance of each comparing model varies in Gold 1 and Gold 2 as these two gold annotations have different label assignments for some tokens. For the case of low quality annotations (i.e. $\mathrm{ca}_3$), the developed hierarchical Bayesian model effectively identifies the annotators with high reliability, which can help guide the estimation of ground-truths and thus improves the performance. DS and HMM-Crowd achieve competitive results as the mechanism of iteratively estimate annotators' reliability and the ground-truths alleviates the negative effect of low quality annotations. \begin{table}[H] \centering \caption{Accuracy of inferring ground-truths for T-DGA dataset (\%).} \begin{adjustbox}{width=0.48\textwidth} \begin{tabular}{lcccccc} \hline\addlinespace[0.1cm] \multirow{2}{*}{~Model} & \multicolumn{3}{c}{Gold1} & \multicolumn{3}{c}{Gold2} \\ & ca1 & ca2 & ca3 & ca1 & ca2 & ca3 \\ \hline\addlinespace[0.1cm] MVtoken & 91.82 & 90.84 & 83.70 & 81.94 & 81.81 & 73.20 \\\addlinespace[0.1cm] DS & 93.34 & 90.97 & 91.99 & 83.53 & \textbf{81.90} & 82.14 \\\addlinespace[0.1cm] MACE & 89.80 & 84.79 & 84.56 & 80.76 & 76.26 & 75.89 \\\addlinespace[0.1cm] Sembler & 93.05 & 89.58 & 85.78 & 83.36 & 80.22 & 76.99 \\\addlinespace[0.1cm] HMM-Crowd & \textbf{93.40} & 91.59 & 90.38 & \textbf{83.72} & 82.06 & 81.12 \\\addlinespace[0.1cm] LA-SCA & 93.30 & \textbf{92.59} & \textbf{92.22} & 83.47 & 81.73 & \textbf{83.71} \\ \hline \end{tabular} \end{adjustbox} \end{table} Table 2 reports F1 score of comparing methods on RITTER-TEST and INHOUSE datasets. Generally the model that learns from higher quality of ground-truths can achieve better prediction performance. For the wrapper models that input the inferred ground-truths to the sequence model (i.e. MVtoken, DS and MACE), prediction performance heavily depends on the quality of the estimated ground-truths. Therefore in $\mathrm{ca}_3$ setting, the F1 score of wrapper models (i.e. MVtoken, DS and MACE) is lower than that of joint models (i.e. Sembler and HMM-Crowd). The developed hierarchical Bayesian model HC-CLL effectively identifies the cluster with high reliability which enables stable performance in handling low quality annotations. Compared with HC-CLL, LA-SCA achieves better results in $\mathrm{ca}_1$ and $\mathrm{ca}_2$ settings as low quality crowd annotations (i.e. $\mathrm{ca}_3$) fail to provide effective confusing label information, which is more likely to add much noise in cost-sensitive sequence labeling and then degrades prediction performance. \begin{table}[H] \centering \caption{Performance of the models on RITTER-TEST and INHOUSE dataset (\%).} \begin{adjustbox}{width=0.48\textwidth} \begin{tabular}{lcccccc} \hline\addlinespace[0.1cm] \multirow{2}{*}{Model} & \multicolumn{3}{c}{ RITTER- TEST } & \multicolumn{3}{c}{INHOUSE} \\ & $\mathrm{ca}_1$ & $\mathrm{ca}_2$ & $\mathrm{ca}_3 $ & $ \mathrm{ca}_1$ & $\mathrm{ca}_2$ & $\mathrm{ca}_3 $ \\ \hline\addlinespace[0.1cm] MVtoken &59.35 & 58.72 & 58.72 & 53.15 & 52.29 & 48.03 \\\addlinespace[0.1cm] DS & \textbf{67.58} & 60.43 & 58.69 & 54.33 & 48.49 & 48.14 \\\addlinespace[0.1cm] MACE & 59.89 & 58.04 & 60.05 & 47.92 & 53.33 & 49.12 \\\addlinespace[0.1cm] Sembler & 59.82 & 61.74 & 60.53 & 49.65 & 50.22 & 49.93 \\\addlinespace[0.1cm] HMM-Crowd & 61.10 & 61.30 & 61.79 & 49.98 & 49.12 & 52.40 \\\addlinespace[0.1cm] HC-CLL & 61.18 & 65.12 & \textbf{62.57} & 52.97 & 54.55 & \textbf{52.88} \\\addlinespace[0.1cm] LA-SCA & 66.20 & \textbf{67.32} & 61.57 & \textbf{55.65} & \textbf{57.25} & 50.84 \\ \hline \end{tabular} \end{adjustbox} \end{table} \textbf{NER task:} In NER tagging task class ``O" accounts for a great proportion of the total classes, thus we use F1 score instead of accuracy to report the performance of inferring ground-truths for training data of CoNLL 2003 NER task. As shown in Table 3, the developed hierarchical Bayesian model achieves the best F1 score and DS model also achieves competitive result. Table 3 also demonstrates the performance of predicting labels for testing data. Due to limited crowded training data the overall performance of comparing methods is well below the reported results \cite{re28}. The proposed framework LA-SCA still outperforms the baselines but only by a narrow margin. Since cost-sensitive learning mechanism inevitably produces label noises in NER task as there are a few confusing labels that should be attended to each other, directly maximizing log-likelihood can be competitive with cost-sensitive maximization. \begin{table}[H] \centering \caption{Evaluation on CoNLL 2003 NER task (\%).} \begin{tabular}{lcc} \hline Model & Infer ground-truths & Prediction \\ \hline MVtoken & 63.17 & 38.52 \\ DS & 65.32 & 39.21 \\ MACE & 60.07 & 37.10 \\ Sembler &63.25 & 38.87 \\ HMM-Crowd &63.44 & 39.31 \\ HC-CLL &\textbf{67.54} & 40.56 \\ LA-SCA & \textbf{67.54} & \textbf{41.56} \\ \hline \end{tabular} \end{table} \subsubsection{Identifying ambiguous cases} In this section, we investigate the performance of LA-SCA in identifying ambiguous cases and preserving confusing label information. We present the results on T-DGA dataset ($\mathrm{ca}_1$ setting) as it provides the standard for comparison. \begin{figure}[h] \centering \stackunder{\includegraphics[scale=0.4]{mainfig/a1.png}}{} \par\bigskip \stackunder{\includegraphics[scale=0.4]{mainfig/a2.png}}{} \caption{Two examples from T-DGA with gold and derived labelings on ambiguous cases.} \end{figure} First, we measure the performance of identifying ambiguous cases with the following measures: \begin{equation} \mathrm{acc}_1 = \frac{ \# \mathrm{correctly}\ \mathrm{identified}\ \mathrm{ambiguous}\ \mathrm{cases}}{\# \mathrm{all}\ \mathrm{ambiguous}\ \mathrm{cases}}, \end{equation} \begin{equation} \mathrm{acc}_2 = \frac{ \# \mathrm{correctly} \ \mathrm{double} \ \mathrm{annotated} \ \mathrm{ambiguous} \ \mathrm{cases}}{\# \mathrm{all}\ \mathrm{ambiguous}\ \mathrm{cases}}, \end{equation} and we obtain that $\mathrm{acc}_1 = 725/931= 0.779$ and $\mathrm{acc}_2 = 614/931= 0.660$. It can be concluded that LA-SCA successfully identifies most of ambiguous cases in T-DGA. We further present two examples from T-DGA with gold and derived labelings on ambiguous cases, as demonstrated in Figure 3, LA-SCA identifies ambiguous cases with label confusing pairs of [``ADJ", ``NOUN"] and [``DET", ``ADV"] successfully. \begin{figure}[h] \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/cfs1.png} \caption{Gold matrix.} \label{fig7:a} \vspace{4ex} \end{subfigure \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/ca1cf.png} \caption{Derived matrix ($\mathrm{ca}_1$).} \label{fig7:b} \vspace{4ex} \end{subfigure} \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/ca2cf.png} \caption{Derived matrix ($\mathrm{ca}_2$).} \label{fig7:c} \end{subfigure \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/ca3cf.png} \caption{Derived matrix ($\mathrm{ca}_3$).} \label{fig7:d} \end{subfigure} \caption{Comparison between the gold the derived label confusion matrices on T-DGA.} \label{fig7} \end{figure} \begin{figure*} \minipage{0.3\textwidth} \includegraphics[width=0.95\linewidth]{mainfig/icp1.png} \subcaption{Cluster 1}\label{fig:awesome_image1} \endminipage\hfill \minipage{0.3\textwidth} \includegraphics[width=0.95\linewidth]{mainfig/icp2.png} \subcaption{Cluster 2}\label{fig:awesome_image2} \endminipage\hfill \minipage{0.3\textwidth}% \includegraphics[width=0.95\linewidth]{mainfig/icp3.png} \subcaption{Cluster 3}\label{fig:awesome_image3} \endminipage \caption{Shared confusion matrices of three clusters on POS tagging task.} \end{figure*} Figure 4 shows the gold label confusion matrix and the derived confusion matrices of three settings respectively. As crowds contain noisy label information, the agreement for some labels is lower than the gold one, which may generate wrong confusing label information. For example, in the twitter ``FollowerSale is most Trusted company to buy”, the gold annotation of ``to” is [``VERB”] while the derived confusing label set is [``VERB”, ``PRON”]. But the derived matrices also preserve some confusing label information that is similar to the gold. For example, the agreement between adjectives [``ADJ”] are nouns [``NOUN”], and [``X”] category is more likely to be confused with punctuations [``.”] and nouns [``NOUN”]. \subsubsection{Interpreting clusters} Clustering for crowd annotations can help discover common patterns of the annotators with similar reliability. Here we demonstrate how to interpret the shared confusion matrices of the estimated clusters in POS tagging and NER tasks. \textbf{POS tagging task:} We choose $\mathrm{ca}_1$ setting and present the shared confusion matrices of three clusters. By reviewing the diagonal elements in three shared confusion matrices of Figure 5, we can see that the developed Bayesian hierarchical model separates the annotators with different reliability well. Cluster 1 demonstrates the annotators with high reliability where the average successful identification value is above 0.7, while the annotators with lower reliability are clustered into the third cluster where the average successful identification value is below 0.3. \textbf{NER task:} We present clustering results of crowd annotations collected from AMT. Generally these crowd annotations are of good quality. It can be seen from Figure 6 that both two clusters are reliable in assigning ``I-PER", ``O", ``I-LOC" and ``B-ORG". Cluster 1 shows the more reliable annotations where the average diagonal value is 0.742, and the average diagonal value in cluster 2 is 0.535. \begin{figure}[h] \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/icn1.png} \caption{Cluster 1.} \label{fig7:a} \vspace{4ex} \end{subfigure \begin{subfigure}[b]{0.5\linewidth} \centering \includegraphics[width=1\linewidth]{mainfig/icn2.png} \caption{Cluster 2.} \label{fig7:b} \vspace{4ex} \end{subfigure} \caption{Shared confusion matrices of clusters on NER task.} \label{fig7} \end{figure} \subsection{Discussion} The major concern regarding LA-SCA evaluation is to perform on the dataset with both crowd annotations and multiple gold annotations. For T-DGA, we have to simulate crowd annotations and use precision to indicate annotator's reliability in global view. A situation will arise that simple cases are more likely to be incorrectly annotated in the precision with $[0.9, 0.7]$, which is not in line with the decision of reliable annotators. In the crowd-annotated CoNLL-2003 NER task, the size of assigned annotators per article is limited and crowd annotations are of good quality, which more or less hinders exploration of labeling diversity. While the incomplete datasets partially limit the applicability of LA-SCA, the proposed hierarchical Bayesian modeling shows its competitiveness in inferring ground-truths from real crowd annotations and synthetic crowds with low reliability. As cost-sensitive mechanism expects sparse label confusion matrix in the task (e.g. NER) where only a few labels are more confused with each other, it still remains to be explored to achieve significant improvement in predicting unknown sequences. \section{Conclusion} In this paper, we propose a framework called Learning Ambiguity from Crowd Sequential Annotations (LA-SCA) to explore inter-disagreement between reliable annotators and effectively preserve confusing label information to improve robust sequence classifier learning. Experimental results show that LA-SCA achieves competitive performance in inferring ground-truth from crowds and predicting testset. Further, identified clusters can help interpret labeling patterns of the annotators with similar reliability, which can help task designers improve labeling guideline.
\section{Introduction} Among the various gamma-ray sources detected in the MeV/GeV and/or even the TeV band, binary systems are a well-established subclass, although their number is yet small. Interestingly, despite their small number, several varieties of binaries exist with different gamma-ray emission mechanisms. For a recent review, see \cite{Dubus2015}. First, \textit{Fermi}-LAT has detected gamma-ray binaries themselves, usually defined as a subclass of high mass X-ray binaries (HMXBs) with O or B companion star, with two main features: they emit modulated gamma rays peaking above 1 MeV and present orbital variability at all frequencies. The spectral energy distribution is usually thought to be powered by the pulsar/stellar wind interaction, although so far the central compact object has been associated to known pulsars only in three cases: PSR B1259-63/LS 2883 \citep[see][and references therein]{HESS2020,Chernyakova2020a}, PSR J2032+4127/MT91 213 \citep[see][and references therein]{Coe2019}, and the recent identification of LS I +61 303 \citep{Weng2022}. Recycled pulsars in binaries, called redbacks \& black widow systems, are tight (orbital periods less than a day), low mass ($< 0.1 M_\odot$) gamma-ray binaries with a main sequence degenerate companion. In these systems the pulsar wind is ablating the companion star, leading to eclipses, radio variability, X-ray/radio anti-correlation, and pulsar nulling \citep[see, e.g.,][]{Bogdanov2018}. Transitional pulsars are special among these systems, since they exhibit two different states (accretion and rotation powered) which may interchange in a matter of weeks and persist for years \citep[see e.g.,][]{Archibald2009,Papitto2013,deMartino2015}. These state changes produce significant gamma-ray variability \citep{Stappers2014,Torres2017}. Other \textit{Fermi}-LAT detected binaries include microquasars, for which the gamma rays seem to be associated with a relativistic jet. Notable examples are Cyg X-1 \citep[see e.g.,][]{Albert2007,Zanin2016,Zdziarski2017} and Cyg X-3 \citep[see e.g.,][]{Abdo2009c,Tavani2009,Zdziarski2018,Sinitsyna2019}. The microquasar SS 433, whose central object is still undetected, was unexpectedly found to produce gamma rays far from the jet \citep{HAWC2018,Rasul2019,Xing2019a,Fang2020} with a GeV source showing variability with the precession period of the system \citep{Li2020}. Finally, one finds the accreting millisecond pulsar SAX J1808.4$-$3658 \citep{Emma2016}: a ``\textit{bona fide}'' accreting system apparently emitting gamma rays, although yet not significantly. This is the only such system for which a gamma-ray detection was hinted so far. % Putting upper limits on accreting sources or detecting them is a must to understand the different variety. 1A~0535+262 is one of the best studied HMXB accreting pulsars. It was discovered in 1975 by the Rotation Modulation Collimator on \textit{Ariel V}, with a pulsation period of 104 s \citep{Rosenberg1975}. The compact object in the system is a highly magnetized neutron star which accretes mass from the O9.7IIIe companion star \citep{Steele1998}. The orbital period of the system is $\sim 111$ days \citep{Coe2006} and the eccentricity of the orbit is $e=0.47\pm0.02$ \citep{Finger1996}. 1A~0535+262 is relatively close to Earth with a distance of $1.8\pm0.1$ kpc, as measured by \textit{Gaia} \citep{Bailer2018}. Since its discovery, 1A~0535+262 has exhibited different X-ray outbursts with peak flux ranging from $\sim100$ mCrab to $\sim12.5$ Crab. In particular, three giant X-ray outbursts were detected since the launch of the {\it Fermi} satellite: in 2009 December \citep{Acciari2011}, 2011 February \citep{Sartore2015} and 2020 November \citep[][and references therein]{Kong2022,Mandal2022}. Figure \ref{fig:lc} shows the long-term light curves of 1A 0535+262 in different energy bands obtained from the \textit{Swift}/BAT and \textit{MAXI}/GSC Broadband Transient Monitor\footnote{\url{http://sakamotoagu.mydns.jp/bat_gsc_trans_mon/web_lc/1_Day.php?name=1A_0535+262}}. There was also a double-peaked outburst \citep{Caballero2013} just prior to the 2009 giant one, which is, however, not included in the monitor database. VLA observations during the 2020 outburst revealed non-thermal radio emission from the source position \citep{Eijnden2020}. 1A~0535+262 was earlier associated with the EGRET unidentified gamma-ray source 3EG J0542+2610 \citep{Romero2001} and thus has long been considered as a high-energy (HE; $E >100$ MeV) and very-high-energy (VHE; $E >100$ GeV) emitter candidate. The first gamma-ray search for 1A~0535+262 dates back to more than 10 years, during its giant 2009 outburst. On that occasion, the X-ray outburst in December of 2009 triggered VHE VERITAS observations. Only upper limits have been derived \citep{Acciari2011}. These authors also did a search for HE gamma-ray emission from 1A~0535+262 with {\it Fermi}-LAT in a period spanning the onset of the X-ray outburst to the successive apastron of the pulsar (2009 November 30 to 2010 February 22). No significant GeV excess was seen and a flux upper limit of $F(>0.2{\,\rm GeV})<1.9 \times 10^{-8}$ photons cm$^{-2}$ s$^{-1}$ at 99\% confidence level was imposed. Recently, \cite{Lundy2021} updated the VERITAS VHE search for 1A~0535+262 during its 2020 giant outburst. Again, only upper limits have been obtained. Also, \cite{Harvey2022} used 12.5 years LAT data to search for gamma-ray emission from 1A~0535+262. They claimed a marginal persistent gamma-ray excess (3.5$\sigma$) at the position of the source and found that the gamma-ray activity may be correlated with the X-ray outbursts. In addition, they found that essentially all of the gamma-ray excess is concentrated in the orbital phase bin preceding periastron, thus providing evidence of the gamma-ray excess originating from this binary system. If real, these hints are relevant, and thus can help to get insights to the particle acceleration and emission process during the accretion. In this work, we analyze the three giant outbursts, in 2009, 2011 and 2020, and the previous double-peaked outburst of 1A~0535+262. The time span of each outburst was defined by investigating the X-ray light curves presented in the literature \citep{Acciari2011,Sartore2015,Mandal2022,Kong2022}. We perform a deep search for gamma-ray emission and pulsations from 1A 0535+262 using more than 13 years of {\it Fermi}-LAT data and the latest 12-year source catalog. We use the latest Instrument Response Functions (IRFs) and background diffuse models. Our work therefore extends the result presented in \cite{Harvey2022}. The paper is organized as follows: we describe the data analysis procedure and results in Section \ref{result}, and discuss our findings in Section \ref{discuss}. We finally conclude in Section \ref{conclude}. \section{Data analysis and results} \label{result} \subsection{Timing solutions} For the 2009 double-peaked and giant outbursts, we adopted the spin measurements and the orbital ephemeris of 1A 0535+262 from the {\it Fermi}/GBM monitoring\footnote{\url{https://gammaray.nsstc.nasa.gov/gbm/science/pulsars/lightcurves/a0535.html}}. We used a polynomial function to describe the spin evolution approximately. For the 2011 outburst, we used the timing solution reported in \cite{Sartore2015} derived using \textit{INTEGRAL} observations. For the recent 2020 outburst, thanks to the extensive coverage of {\it Insight}-HXMT observations \citep{Wang2022}, we used the phase-connection technique \citep{Deeter1981} to determine the spin evolution accurately. In practice, for each 1000\,s segment we folded background-subtracted light curves in the energy range of 25$-$80\,keV, for which the pulse profile shape is relatively stable. The 1000\,s was chosen because this is the typical interval for \textit{Insight}-HXMT's good time. The time-of-arrival (TOA) of each segment was estimated by cross-correlating these pulse profiles with an averaged template. Then the spin evolution was determined by using the software {\sc Tempo2} \citep{Hobbs2006}. We summarize the timing solutions for different outbursts used in the following pulsation search (Section \ref{pulsation}) in Table~\ref{tab:spin}. \subsection{\textit{Fermi}-LAT data set and reduction} We used the Pass 8 data set \citep{pass8Atwood,Bruel2018} available at the \textit{Fermi} Science Support Center (FSSC)\footnote{http://fermi.gsfc.nasa.gov/ssc/}. This spans 166 months, from 2008 August 4 to 2022 June 9, with reconstructed energy in the range 0.1$-$300 GeV. We selected SOURCE class events (Front and Back) with a zenith angle smaller than $90^\circ$ to avoid the Earth limb contamination. The events were further filtered based on the criteria \texttt{``DATA\_QUAL>0 \&\& LAT\_CONFIG==1''} to get the good time intervals in which the satellite was working in standard data taking mode and the data quality was good. We did not apply a Region of Interest (ROI)-based zenith angle cut\footnote{https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/data\_preparation.html}. The data set was centered at 1A~0535+262 with coordinates $(\alpha,\delta)=(84\fdg7274,26\fdg3158)$, with a radius of $10^\circ$. The coordinates of 1A~0535+262 were taken from the SIMBAD\footnote{http://simbad.u-strasbg.fr/simbad/} database and in the J2000 frame. The analysis was performed using the P8R3\_SOURCE\_V3 IRFs and the latest Fermitools\footnote{https://fermi.gsfc.nasa.gov/ssc/data/analysis/software/} (v2.2.0) available at the FSSC. \subsection{\textit{Fermi}-LAT spectral analysis} In the spectral analysis, the latest 4FGL-DR3\footnote{https://fermi.gsfc.nasa.gov/ssc/data/access/lat/12yr\_catalog/} (gll\_psc\_v30.fit) \citep{4DFL-DR3} sources within a $20^\circ$ circle around 1A~0535+262 were included to build a complete spatial and spectral source model. We also included the latest Galactic interstellar emission model, ``gll\_iem\_v07.fits'', as well as the isotropic emission spectrum ``iso\_P8R3\_SOURCE\_V3\_v1.txt'', with the latter taking into account the extragalactic emission and the residual instrumental background\footnote{https://fermi.gsfc.nasa.gov/ssc/data/access/lat/BackgroundModels.html}. Both the normalizations and spectral indices of sources within $5^\circ$ around 1A~0535+262 were set free to vary except for 4FGL J0534.5+2201i, which is recommended to be fixed to account for the Inverse Compton Scattering component of the Crab Nebula. Extended sources were modeled using the 12-year templates. Since the closest source in the model is $\sim1.6^\circ$ away from 1A~0535+262, we added 1A~0535+262 manually in the model as a point source with a simple Power Law spectral model. This allows us to check whether the addition of such source is significant. Model fitting was performed in a $14^\circ \times 14^\circ$ ROI using the maximum likelihood method \citep{mattox96}. We followed the binned likelihood procedure outlined in the FSSC using a $0\fdg1 \times 0\fdg1$ pixel size and thirty logarithmic energy bins over 0.1$-$300 GeV. Two extra energy bins have been added to take into account the energy dispersion except for the isotropic component. The significance of a given source in the model is characterized by the Test Statistic (TS), which is expressed as TS $=2(\log \mathcal{L}-\log \mathcal{L}_{0})$, where $\log \mathcal{L}$ and $\log \mathcal{L}_{0}$ are the logarithms of the maximum likelihood of the complete source model and of the background model (i.e. the source model without the given source included), respectively. We first performed a global binned likelihood fit to the whole data set by fixing the spectral index of 1A~0535+262 to 2, 2.3 and 3, respectively. Such spectral indices are chosen to represent possible emission mechanisms. At the same flux level, if the source were to emit a hard spectrum (as the assumed 2) across the {\it Fermi}-LAT energy regime, it should be easier to detect it due to the diminishing background at higher energies. Then, using the best-fit source model from the whole data set fit, we performed binned likelihood fits to the different X-ray outbursts that 1A~0535+262 has experienced in the past, following the same fitting setup and procedure as for the whole data set. To increase the detection possibility and statistics, we also stacked all the outbursts together to perform the fit. 1A~0535+262 was not detected in any of these cases and we therefore computed a 95\% confidence level energy flux upper limit accordingly. The fitting results are presented in Table \ref{tab:fermiflux}. \subsection{Gamma-ray variability} \label{variability} We performed two different types of variability analysis for 1A~0535+262. First, to investigate the long-term gamma-ray flux variability, we computed light curves with a 180-day binning as in \cite{Harvey2022} in the energy range of 0.1$-$300 GeV for all spectral indices used in the spectral analysis (Figure \ref{fig:lc}). The full data best-fit source model was used as an input for each time bin and the normalizations of sources within $3^\circ$ around 1A~0535+262 were set free to vary. Upper limits at 95\% confidence level were calculated when 1A~0535+262 had TS $<4$ in a given time bin. We did not see any significant detection in all the time bins when fixing the spectral index to 2 or 2.3. For the light curve with index fixed to 3, there are two bins with TS being about 10 and 20, corresponding to approximately 3$\sigma$ and 4$\sigma$. However, these two bins correspond to the period where its X-ray emission was faint according to the X-ray monitoring of 1A~0535+262 (Figure \ref{fig:lc}). Thus, we conclude that no correlation between gamma-ray and X-ray was observed, contrary to what \cite{Harvey2022} has claimed. Furthermore, the variability significance was computed following the same method used in \cite{3FGL}. Only the light curve with index fixed to 3 has a non-negligible significance ($1.7\sigma$ for 27 degrees of freedom), but this is far from declaring a significant variability, which requires usually a significance of at least $3\sigma$. Any gamma-ray emission is thus consistent with being steady on a timescale of a few months based on our analysis. Since gamma-ray binaries usually exhibit orbital flux variability, we also computed the orbital flux for 1A~0535+262 with 10 bins per orbit and calculated upper limits at 95\% confidence level when 1A~0535+262 had TS $<4$ in a given orbital bin, as was done in \cite{Harvey2022}. Similar to the long-term light curve, the full data best-fit source model was used as an input for each orbital bin and the spectral index was fixed to 2, 2.3 and 3, respectively. No significant orbital variability was observed. The orbital light curves are shown in Figure \ref{fig:orbit10bins}. \subsection{Gamma-ray pulsation search} \label{pulsation} We performed a pulsation search using reconstructed LAT photons within $1^\circ $ of 1A~0535+262 in the energy range of 0.1$-$300 GeV. The signal significance was qualified using the weighted H-test developed by \cite{Kerr2011}, which is based on the original one proposed by \cite{Jager1989}: \begin{equation} H_{mw}={\rm max}\left[Z^2_{iw}-c\times (i-1)\right], \,\,\,\,\,\, 1\leq i \leq m , \end{equation} where \begin{equation} Z^2_{mw} = \frac{2}{\sum_{i=1}^{N} w_i^2} \times \sum_{k=1}^{m}(\alpha_{wk}^2+\beta_{wk}^2), \end{equation} and \begin{equation} \alpha_{wk}=\sum_{i=1}^{N} w_i\cos{(2\pi k\phi_{i})}, \;\;\;\;\;\;\beta_{wk}=\sum_{i=1}^{N} w_i\sin{(2\pi k\phi_{i})}. \end{equation} Here, $N$ is the total photon number, $\phi_i$ is the pulsar rotational phase and $w_i$ is the photon weight, $m$ is the maximum search harmonic and $c$ is the offset for each successive harmonic. We used the standard value $c=4$ and varied $m$ in our analysis. We verified that taking the standard value $m=20$ did not change the result. We employed the Simple Weights method descried in \cite{Bruel2019} and \cite{Smith2019} to compute the weight for each photon. This is considered as a proxy for the probability that the photon comes from 1A~0535+262. Assuming that the target source is faint compared to the diffuse background and that the background emission is isotropic, for a photon with energy $E$ (in MeV) and angular distance $\Delta \theta$ to the target source, the weight is: \begin{equation} w(E,\Delta \theta) = f(E)\times g(E, \Delta \theta), \end{equation} where \begin{equation} f(E)= \rm exp(-2log_{10}^2(\it E/E_{\rm ref})) \end{equation} is the weight at the pulsar position, which depends on the pulsar and background spectra and on the LAT's energy-dependent Point Spread Function (PSF). The geometrical factor $g(E, \Delta \theta)$ describes the angular distribution of the gamma-ray photons emitting from a point source and can be written as \begin{equation} g(E, \Delta \theta)= \left(1+\frac{9\Delta \theta^2}{4\sigma_{\rm psf}^2(E)}\right)^{-2}, \end{equation} where \begin{equation} \sigma_{\rm psf}(E) = \sqrt{p_{0}^2(E/100)^{-2p_1}+p_2^2} \end{equation} is the PSF 68\% containment angle with $p_0=5.445, p_1=0.848$ and $ p_2=0.084$ for LAT P305 Pass 8 data \citep{pass8Atwood}. Defining the reference energy $E_{\rm ref}=10^{\mu_w}$, the H-test versus $\mu_w$ follows a Gaussian distribution \citep{Bruel2019}. Thus, searching for pulsations means finding the maximum H-test by scanning over $\mu_w$. After searching a thousand radio pulsars for possible gamma-ray emission, \cite{Smith2019} indicate that in most cases $\mu_w=3.6$ is a good choice to yield a significant signal. We adopted this value in our pulsation search for 1A~0535+262. Considering that this value was found for non-accreting (and many isolated) radio pulsars that have a power law with an exponential cutoff (PLEC) spectrum \citep{Abdo2013}, and thus may not be appropriate for an accreting system that could have a different spectral shape, we also verified that scanning over $\mu_w$ to find the best value does not affect the result significantly. We used the ephemerides for different observations (Table \ref{tab:spin}) to phase-fold the gamma-ray photons of 1A~0535+262, restricting the pulsation search range to the validity of the corresponding ephemerides. However, no significant pulsation was detected during the individual outbursts. Although a signal of $\sim1.5\sigma$ was hinted for the 2009 outburst, the significance is far from the LAT detection threshold of 4$\sigma$. \section{Discussion} \label{discuss} In general, we obtained very different results compared to \cite{Harvey2022}. We had no detection of either persistent or transient or pulsed gamma-ray emission from 1A~0535+262. Although we have two time bins with TS$\sim$20 and $\sim$10, they did not correspond to the X-ray outburst periods. Therefore, our result does not support their conclusion that the gamma-ray emission is correlated with the X-ray outburst of the source and is mostly concentrated in specific orbital bins. Such difference may mainly come from the fitting procedure and whether or not considering the energy dispersion. We normally fitted the sources within $5^\circ$ around 1A~0535+262 in the spectral fit and orbital flux variability study, and within $3^\circ$ for the long-term light curves, while they fitted only $1^\circ$ around 1A~0535+262. In addition, the spectral index was fixed to different values to account for possible emission mechanisms in our study, while they let the index free to vary. Actually, for the long-term variability, no detailed fitting procedure information was found in \cite{Harvey2022}, making a detailed comparison difficult. Unlike those cases when a detection is found from an astrophysical source, the possible reasons for a non-detection are essentially unlimited. Gamma-ray binary systems such as LS I +61 303 are radio sources, and their X-ray spectra contain a significant non-thermal component. Recently, radio pulsations were detected from this system \citep{Weng2022}. Thus, it is worth noting that LS I +61 303 is probably not a significantly accreting system, and thus it likely has a different acceleration and emission mechanism than that acting in 1A 0535+26, if there is any in the latter. On the other hand, in 1A~0535+262, the absence of a significant quiescent radio emission that could later be associated with non-thermal processes may simply indicate that leptons are not sufficiently accelerated there. This observation had earlier promoted hadronic models. From our results, though, we can also rule out hadronic production acting according to a mechanism originally proposed by \cite{Cheng1991}, where a proton beam accelerated in a magnetospheric electrostatic gap impacts the transient accretion disk. This model was applied to 1A~0535+262 by \cite{Romero2001}, \cite{Anchordoqui2003} and \cite{Orellana2007}. Particularly in the latter paper the theoretical flux prediction of $3.8\times 10^{-8} \, \rm ph\ cm^{-2}$ \citep[derived by extrapolating the result of][]{Orellana2007}, i.e., a gamma-ray luminosity of about 10$^{33}$ erg s$^{-1}$ at 0.3 TeV at the end of giant outbursts to the \textit{Fermi}-LAT energy range \citep[see][]{Acciari2011} is above our limit which is $\sim$(2.3$-$4.7)$\times 10^{32}\, \rm erg \, s^{-1}$ by one order of magnitude (and should have been detected earlier on in the mission) depending on different spectral indices assumed. Taking the X-ray luminosity (2$-$150 keV) reported for the largest 2020 outburst \citep{Kong2021} to be 1.2$\times$10$^{38}\, \rm erg \, s^{-1}$, the ratio of $L_{\rm \gamma}$ to $L_{\rm X}$ is then calculated to be (1.9$-$3.9)$\times10^{-6}$. It remains to be seen, of course, whether the flux was overestimated but the mechanism is still viable, or whether a longer integration might lead to low-flux quiescent emission or to an occasional detection. None of these possibilities has happened in the long integration time we have analyzed. At least with the current gamma-ray sensitivity, 1A~0535+262 is not a gamma-ray source. With our current limits, there appears to be no reasonable combination of the hadronic model parameters to still accommodate a persistent gamma-ray flux. Another interpretation could simply be that none of the possible shocks in the system is energetic enough to produce sufficiently accelerated particles able to emit gamma-rays. Or that if they do, the radiation produced is absorbed due to the matter in the surroundings, see e.g., the discussion in \cite{Orellana2007}. Regarding the latter, it would be reasonable to expect that any absorption would be quite variable. Thus if the emission is produced in the system at all, it would be unlikely that it is absorbed all the time. In addition, secondary electrons (and positrons) from the pair production process would generate gamma rays at MeV–GeV energies, \citep[see e.g.,][]{Bednarek1997,Bednarek2006,Sierpowska-Bartosik2008}. These could be attenuated by X-ray photons, but probably not fully attenuated after the X-ray peak has passed. Giant (or Type II) outbursts, though they are rare and unrelated to the orbital cadence, may have X-ray luminosities close to the Eddington limit. They are likely associated with the formation of a transient accretion disk. Recently, \cite{Eijnden2020} detected a radio counterpart during the 2020 outburst. This was the first time that a coupled increase in X-ray and radio flux was seen in 1A~0535+262 and shows that the radio emission may relate to the accretion state. This would be similar to the behaviour seen in the transient Be X-ray binary Swift J0243.6+6124 \citep{Eijnden2018}. \cite{Bednarek2009,Bednarek2009b} proposed that it is possible that HMXBs produce gamma-ray emission during accretion periods. The possibility that particle acceleration can take place even when mass accretion is going on is supported by some observational results: the hinted gamma-ray emission from SAX J1808.4$-$3658 \citep{Emma2016}, the gamma-ray emission found from the sub-luminous state of the transitional pulsars (as quoted in the introduction) and interpreted as propeller emission \cite[see e.g.,][]{Papitto2014,Papitto2015} or a mini pulsar wind nebula (\cite{Papitto2019}, see also \cite{Veledina2019}) and finally, the discovery of optical and ultraviolet pulsed emission from the accreting millisecond pulsar SAX J1808.4$-$3658 \citep{Ambrosino2021}. However, the neutron star Eddington luminosity ($L_{\rm Edd} \sim 1.8 \times 10^{38}$ erg s$^{-1}$) is many orders of magnitude above our upper limits, pointing to a very inefficient mechanism, if at play at all. Similarly to the case of other transients, for instance, the Be X-Ray Binary 4U 1036$-$56 (RX J1037.5$-$5647), which could be associated to \textit{AGILE} transients, we cannot discard that a low level of gamma-ray flux is emitted at lower energies, below 100 MeV \citep[see][and in particular their figure 6 for an associated discussion]{Li2012}. This remains to be tested with the advent of MeV missions such as AMEGO \citep{McEnery2019}, e-ASTROGAM \citep{Angelis2018}, or COSI \citep{Beechert2022}. \section{Conclusions} \label{conclude} We have searched for gamma-ray emission and pulsations from 1A~0535+262 using more than 13 years of \textit{Fermi}-LAT data. Neither persistent nor transient nor pulsed gamma-ray emission has been detected significantly in our study for the whole data set or during the X-ray outbursts that 1A~0535+262 has experienced since the launch of the \textit{Fermi} satellite. Upper limits on the luminosity at the 95\% confidence level were derived to be around (2.3$-$4.7)$\times 10^{32}\, \rm erg \, s^{-1}$ depending on different spectral indices assumed, the deepest ones to date. The emission of 1A~0535+262 is considered to be consistent with being steady on a timescale of a few months. Although two time bins in the long-time light curve hint to have gamma-ray emission at roughly 3 and 4$\sigma$, they occurred when the source was faint in X-rays. Thus, no correlation between gamma-ray and X-ray activities was observed based on our result. In addition, we did not see any significant orbital gamma-ray variation. We conclude that 1A~0535+262 is not a gamma-ray emitter at the level of the current gamma-ray sensitivity. \acknowledgments The \textit{Fermi} LAT Collaboration acknowledges generous ongoing support from a number of agencies and institutes that have supported both the development and the operation of the LAT, as well as scientific data analysis. These include the National Aeronautics and Space Administration and the Department of Energy in the United States; the Commissariat \`a l'Energie Atomiqueand and the Centre National de la Recherche Scientifique/Institut National de Physique Nucl\'eaire et de Physique des Particules in France; the Agenzia Spaziale Italiana and the Istituto Nazionale di Fisica Nucleare in Italy; the Ministry of Education, Culture, Sports, Science and Technology (MEXT), High Energy Accelerator Research Organization (KEK), and Japan Aerospace Exploration Agency (JAXA) in Japan; and the K.~A.~Wallenberg Foundation, the Swedish Research Council, and the Swedish National Space Board in Sweden. Additional support for science analysis during the operations phase is gratefully acknowledged from the Istituto Nazionale di Astrofisica in Italy and the Centre National d'\'Etudes Spatiales in France. This work was performed in part under DOE Contract DE-AC02-76SF00515. The authors are supported by the National Natural Science Foundation of China through grants U1938103, 12041303, 12173103, U2038101, 11733009. WZ and DFT work have been supported by the grant PID2021-124581OB-I00 funded by MCIN/AEI/10.13039/501100011033 and by the Spanish program Unidad de Excelencia María de Maeztu CEX2020-001058-M. DFT acknowledges as well USTC and the Chinese Academy of Sciences International Presidential Fellowship Initiative 2021VMA0001. This research has made use of the SIMBAD database, operated at CDS, Strasbourg, France.
\section{Introduction} In Evolutionary Computation, we often use large sets of training data to evaluate the quality of candidate solutions. For instance, most Genetic Programming (GP) systems evaluate programs using input/output examples (training cases) that specify the expected behavior of a correct program. Many GP selection strategies aggregate each program's performance across all training cases to produce one \emph{fitness} score that can be used for selection. In contrast, lexicase selection \citep{Spector2012AssessmentOP, Helmuth:2015:ieeeTEC} avoids aggregation and considers each training case separately, which has been shown to improve diversity maintenance \citep{Helmuth16Diversity, dolson_ecological_2018} and problem-solving success across a wide range of domains \citep{moore2017lex, Metevier2019, aenuguLCS2019, Ding2022optimizing, lalejini_artificial_2022}. However, standard lexicase selection has the drawback that we have to evaluate all individuals on all training cases, which can be computationally expensive when evaluation is non-trivial. To reduce lexicase selection's computational cost, recent work introduced down-sampled lexicase selection \citep{moore2017lex, Hernandez:2019:subsampling, Ferguson2020Characterizing}. In down-sampled lexicase selection, the training set is randomly down-sampled, reducing the number of test case evaluations required to assess the quality of each candidate solution. This in turn reduces the cost of evaluating an entire set of individuals, allowing us to reallocate computational resources to other aspects of an evolutionary search (e.g., increasing search time or population size), which can substantially improve problem-solving success \citep{Helmuth2020explaining, Helmuth2021benefits, Hernandez:2019:subsampling}. However, a naive random down-sample can leave out potentially important test cases, resulting in a loss of diversity \citep{Ferguson2020Characterizing, helmuth_importance_2020, hernandez_exploration_2022}. In order to put more computational effort towards evaluating individuals on important training cases, we propose \textit{informed down-sampling} (IDS), which uses runtime population statistics to build a down-sample that contains more distinct cases. Given a set of solutions, two training cases are distinct from each other if the subsets of solutions that solve each of the two test cases have little-to-no overlap. Two training cases are synonymous if the opposite is true: there is substantial overlap between the subsets of solutions that solve each case\footnote{Synonymous cases can also be thought of as cases that have different inputs and outputs yet measure a very similar functionality such that there is a high correlation between individuals' performance on these cases.}. Consequently, Informed down-sampling favors the distinct training cases over synonymous cases when building a down-sample to use for selection. We expect these informed down-samples to better maintain unique individuals, increasing overall population diversity while also putting more selection pressure on individuals whose descendants are more likely to solve the problem. These unique individuals are often viewed as the stepping-stones for evolution to use in finding a perfect solution program \citep{helmuth_importance_2020}. To assess the performance of Informed Down-Sampled Lexicase Selection, we compare lexicase selection without down-sampling (standard lexicase), with random down-sampling, and with informed down-sampling across eight problems from the first and second program synthesis benchmark suites \citep{Helmuth2015psb1, helmuth2021psb2}. We conduct our experiments in two independent GP frameworks, Grammar-Guided Genetic Programming (G3P) \citep{whigham1995grammatically, forstenlechner2016grammar, forstenlechner2017grammar} and PushGP \citep{spector2002autoconstructive, SpectorPush3}. We find that building a down-sample based on information we collect from the population is a valuable way to improve the success rates of evolutionary runs at a fixed computational cost. Furthermore, simply tracking which cases are distinct, and ensuring they are placed in a down-sample, can significantly improve problem solving performance. Our results provide evidence that informed down-sampling improves the success rate of search in the two GP systems used. By analyzing the composition of down-samples, we also verify that informed down-sampling builds down-samples that contain more informative test cases (i.e. edge cases) than random down-sampling. \section{Related Work}\label{sec:relatedWork} In most GP applications, parent selection uses the performance of candidate solutions on a set of training cases to pick individuals that contribute genetic material to the next generation. Most selection algorithms aggregate the scores on these training cases to get a single score per candidate and then select the most fit candidates using tournament selection \citep{brindle_1980}, implicit fitness sharing \citep{Smith93IFS}, fitness proportionate selection \citep{Holland1975AdaptationIN}, or another selection strategy. The fitness aggregation procedure for these methods often results in a loss of semantic information about which training cases the individual performs well on \citep{Krawiec15}, motivating the development of selection strategies that consider each individual's performance on all training cases encountered \citep{VanneschiSemantic2014,goings_ecology_based_2012,deb_fast_2002,horn_niched_1994}. In contrast, lexicase selection does not aggregate fitness or performance measures \citep{Spector2012AssessmentOP}. For each parent selection event, the lexicase selection procedure first places all individuals in the population into a ``parent pool'' (i.e., the pool of individuals eligible to be selected). To select a parent, lexicase selection shuffles the training cases into a random ordering, and each training case is considered in sequence. For each training case, the parent pool is filtered down to just the individuals that have the best (or tie for the best) performance, removing all but the best candidates from further consideration. If there is only one individual that remains in the pool during this filtering process, this individual is selected. If the training cases are exhausted and there are still individuals in the pool, one of these individuals is selected at random. Meanwhile, many variants of lexicase selection have been proposed for use in different problems or domains. For example, epsilon lexicase selection \citep{lacavaEpLex, moore2017lex}, batch lexicase selection \citep{aenuguLCS2019, sobania_2022_batch}, gradient lexicase selection \citep{Ding2022optimizing}, lexicase selection for GAs \citep{Metevier2019}, weighted shuffle lexicase selection \citep{Troise:2017:GPTP}, and fast lexicase selection \citep{ding2022scale}. One of the most promising variants of lexicase selection is down-sampled lexicase selection, which was first proposed for expensive evolutionary robotics runs by \cite{moore2017lex} and later formalized by \cite{Hernandez:2019:subsampling} for GP runs. So far, down-sampled lexicase selection increased the success and generalization rates for a variety of problems \citep{Ferguson2020Characterizing}. Down-sampled lexicase selection works by randomly sampling once in each generation the training set to create a smaller set of cases. These cases are then used to perform all selection events in the population for that one generation. This limitation on the number of test cases reduces the computational costs of evaluating the individuals, which is usually one of the most expensive operations in evolutionary runs. These savings could be used to perform computationally cheaper GP runs, increase the population size, or run evolution for more generations. Down-sampled lexicase selection has also been found to significantly outperform regular lexicase selection in a variety of program synthesis benchmarks \citep{Hernandez:2019:subsampling, Ferguson2020Characterizing, Helmuth2020explaining, Helmuth2021benefits,helmuth_benchmarking_2020}. However, creating a down-sample randomly can exclude important training cases from the current down-sample for a number of generations \citep{hernandez_exploration_2022}, while synonymous cases may be overused. As a first attempt at changing the composition of cases in the down-sample, \cite{boldi2022exploring} explored using a rolling down-sample and a disjoint down-sample for lexicase selection runs. While the results were neutral-if-not-negative, they highlighted the presence of synonymous cases in practice and suggest that an attempt at mediating the time put into evaluating individuals on these synonymous cases might improve search performance. Work in the EC literature that is related to informed down-sampling primarily includes the co-evolution of fitness predictors and maximizers \citep{Schmidt2005coevolving,Schmidt2008CoevolutionOF, sekanina2012CGP}. That work attempts to evolve a smaller set of training cases, or fitness predictors, to evaluate the fitness of individuals instead of using the entire training set. While our studied methods do not involve co-evolution, they both result in a compressed training set that is roughly as informative as the set of all available data. Another example is the use of random down-sampling to improve performance of AutoML runs that use Genetic Programming \citep{zogaj_doing_2021}. In the broader machine learning community, random down-sampling is used to generate mini-batches for stochastic gradient descent \citep{ruder_overview_2017}, and forms of non-random down-sampling are used to detect hard or informative parts of the training data \citep{Loshchilov2015OnlineBS, Bachem2017PracticalCC, paul2021deep, Chrysakis2020OnlineCL}. \section{Informed Down-Sampling}\label{sec:IDS} Informed down-sampling addresses randomly down-sampled lexicase's drawback of sometimes including many synonymous training cases in a down-sample, which is computationally inefficient and can result in a failure to accurately assess candidate solution quality. For example, down-sampled lexicase selection might fail to select candidate solutions that specialize on training cases absent from a particular random down-sample, resulting in the loss of potentially important genetic material from the population. Instead of down-sampling randomly, informed down-sampling creates down-samples composed of more distinct training cases than a random sample would contain using runtime population statistics. As a result, we expect informed down-sampling lexicase selection to maintain more diverse populations, while reducing computation spent on evaluating individuals on synonymous training cases. We suggest two methods of building an informed down-sample. First, we explore the idealized effectiveness of informed down-sampling by presenting it with full information. This method requires evaluating the entire population on all training cases, performing the same number of program executions per generation as normal lexicase selection. Therefore, informed down-sampling with full information cannot capitalize on the computational savings afforded by random down-sampling. However, the full information approach provides useful intuition for building an informed down-sample, allowing us to measure the problem-solving success of our sampling approach under idealized conditions. Next, we present an approach for creating an informed down-sample that reduces the number of per-generation evaluations required for selection (relative to standard lexicase selection). This second approach, referred to as the ``sparse information'' approach, estimates the distinctness of training cases based on a sample of individuals from the parent population. Indeed, building an informed down-sample using sparse information results in nearly the same per-generation evaluation savings as when using random down-sampling. \subsection{Building an Informed Down-Sample with Full Information} \label{sec:ids:full-info} In our informed down-sampling approach with full information, we create one down-sample of training cases per generation, and we use candidate solution performances on only the sampled training cases to choose parents with lexicase selection. To construct an informed down-sample with full information, we evaluate all members of the population on all training cases. In this work, each of these evaluations is on a pass/fail basis. Next, we construct the ``solve vector'' $S_{j}$ for each training case $c_j$, which is a vector of binary values that specifies which individuals in the population have solved the training case. We then calculate the Hamming distance between solve vectors for all pairs of training cases, allowing us to measure how distinct training cases are relative to one another. We begin constructing the down-sample by randomly selecting an initial training case to include. Then we find the training case whose solve vector is maximally distant from the \textit{closest} training case already included in the down-sample, and add it to the down-sample. We repeatedly add training cases to the down-sample in this way until reaching a parameterized sample size. Figure~\ref{fig:distanceVisual} provides an example set of binary solve vectors for a set of five training cases and a population of six individuals. The columns in this matrix $I_i$ describe the performance of the $i^{\text{th}}$ individual on all cases. A value of 1 at $(I_i, c_j)$ implies that the $i^\text{th}$ individual solved the $j^\text{th}$ test case ($\textrm{error}=0$), or $S_{j}^i = 1$. Since all members of a population of size $p$ are evaluated on all test cases (at least initially), we can say that $\lVert S_{j}\rVert = p$ for all cases, $c_j$. Thus, the number of columns corresponds to the population size. \begin{figure} \centering $$ \begin{blockarray}{ccccccc} & I_1 & I_2 & I_3 & I_4 & I_5 & I_6 \\ \begin{block}{c[cccccc]} S_{1} &0 & 1 & 0 & 1 & 1 & 0\topstrut\\ S_2 & 1 & 1 & 0 & 0 & 1 & 1\\ S_3 & 1 & 0 & 1 & 1 & 0 & 1\\ S_4 & 0 & 1 & 0 & 0 & 1 & 1 \\ S_5 & 0 & 1 & 0 & 1 & 1 & 0\botstrut\\ \end{block} \end{blockarray} $$ \caption{Example of the data structure that is used to determine distances between cases. $c_{1,\dots,5}$ are cases, with their respective solve vectors $S_{1,\dots, 5}$, and $I_{1,\dots,6}$ are individuals. The entry at $S_j$ and $I_i$ represents whether the $i^\text{th}$ individual solved the $j^\text{th}$ test case or not. The binary solve vectors $S_j$ can be read off as the respective row for the $j^\text{th}$ case. The distance between two cases, $D(c_x, c_y)$, is the Hamming distance between their respective solve vectors. For example, $D(c_1, c_2) = 3$ and $D(c_2, c_3) = 4$.} \label{fig:distanceVisual} \end{figure} We define the distance between two training cases $D(c_x, c_y):=\text{Hamming}(S_{x}, S_{y})$ where $\text{Hamming}(\mathord{\cdot} , \mathord{\cdot})$ is the Hamming distance between two vectors. For binary vectors, the distance function is defined as: $D(c_x, c_y) = \sum_{i=1}^{p}|S_{x}^i - S_{y}^i|$. Thus, two training cases that are solved by the same set of individuals are deemed to have $D(c_1, c_2) = 0$ and are called ``synonymous cases". For example, for the cases in Figure~\ref{fig:distanceVisual}, $c_1$ and $c_5$ have identical solve vectors, and therefore are synonymous ($D(c_1, c_5) = 0$). We think of this distance function as indicating the joint information contained in a pair of cases. Two cases that have exactly the same individuals solving them (i.e. are synonymous) have little to no joint information because having both of the cases in the sample would be about as informative as just having one of them. Two cases that have a high distance from each other, due to being solved by different subsets of the population, have high joint information as each case is responsible for informing the system about the performance of one set of individuals. Having both of these cases, as opposed to one alone, would be a more faithful approximation of using the full training set. Once we have a method to evaluate the pairwise distance between two cases, we can use it to select a down-sample of the training set for use in the current generation. In this work, we apply a variant of Farthest First Traversal to select the down-sample \citep{Hochbaum1985ABP}. The creation of the down-sample starts with the selection of one random case to include. Then, at each step, we scan each unselected test case and measure it's minimum distance to any test in the current down-sample. We select the case that has the largest minimum distance. In other words, we successively add the test case that is furthest from the current down-sample at its nearest point. Our Farthest First Traversal algorithm is shown in algorithm~\ref{alg:FFT}. Starting with an empty down-sample, we first add a random case to the down-sample (line 4), and then iteratively add the cases that are maximally far from the closest case to it (5-9). If there are multiple cases with the same maximum minimum distance, ties are broken randomly. The $MinDist_i$ value stores the distance from a given case, $c_i$ to the closest case to it in the down-sample. The $\mathbf{cases}.popMaxMinDistCase()$ function removes and returns the case in $\mathbf{cases}$ that has the maximum value for $MinDist_i$. Note here that it is often the case that the minimum distances all go to zero at a point during the down-sample formation. At this point, every case left over in the training set has a synonymous case in the down-sample already. When this happens, the farthest first procedure will automatically select cases at random from the training set to fill up the required down-sample size. Figure~\ref{fig:runningExample} shows an example of performing informed down-sampling with full information using the case solve vectors from Figure~\ref{fig:distanceVisual}. \begin{algorithm} \caption{Farthest First Traversal Down-Sample Selection}\label{alg:FFT} \begin{algorithmic}[1] \Require ${D(\cdot,\cdot)}: D(c_i, c_j) = D(c_j, c_i) = \text{distance from case } i \text{ to case } j, \hfill$ $r = \text{ down-sample rate}$ \State $\mathbf{cases} \gets $ set of all cases in training set \State $\mathbf{ds} \gets $ empty set \Comment{the down-sample} \State $\mathbf{size} \gets r\times |\mathbf{cases}|$ \Comment{desired size of down-sample} \State $\mathbf{ds}.add(\mathbf{cases}.popRandomCase())$ \While{$\lVert\mathbf{ds}\rVert < \mathbf{size}$} \For{every case $c$ in $\mathbf{cases}$} \State {$MinDist_i \gets $ minimum distance from $c_i$ to any case in $\mathbf{ds}$} \EndFor \State $\mathbf{ds}.add(\mathbf{cases}.popMaxMinDistCase())$ \EndWhile \State \bf{return} $\mathbf{ds}$ \end{algorithmic} \end{algorithm} \begin{figure} \centering \begin{subfigure}[b]{0.45\textwidth} $$ D = \begin{blockarray}{cccccc} & c_1 & c_2 & c_3 & c_4 & c_5\\ \begin{block}{c[ccccc]} c_{1} & 0 & 3 & 4 & 2 & 0\topstrut\\ c_2 & 3 & 0 & 4 & 1 & 3\\ c_3 & 4 & 4 & 0 & 5 & 5\\ c_4 & 2 & 1 & 5 & 0 & 2\\ c_5 & 0 & 3 & 5 & 2 & 0\botstrut\\ \end{block} \end{blockarray} $$ \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \vspace{3em} $$ \overbrace{\textbf{ds}=\{c_1\}}^{\text{Random}} \ \ \ \ \rightarrow \overbrace{\textbf{ds}=\{c_1, c_3\}}^{c_3\text{ had max. distance to } c_1}$$ $$ \rightarrow \overbrace{\textbf{ds}=\{c_1, c_3, c_2\}}^{c_2\text{ had max. min. distance to $\{c_1, c_3\}$}} $$ \vspace{-3em} \end{subfigure} \caption{Example running procedure of informed down-sampling with full information to pick a down-sample of size 3 (or $r = \frac{3}{5})$. We have a tabular representation of the distance function $D$ generated by computing the Hamming distance between each pair of cases' solve vectors. Beginning with a randomly selected case $c_1$, we sequentially add the cases that are at the maximum distance to their closest case in the down-sample. The first step is simply finding the case ($c_3$) in the training set with the maximum distance to $c_1$. To select the next case, we need to find, for $c_2$, $c_4$ and $c_5$, which of $c_1$ and $c_3$ is closest to them, respectively, and then which of \emph{those} cases is farthest away. In this example, $c_2$ was added as it had a higher distance (3) to its closest case than did $c_4$ or $c_5$ (2 and 0, respectively). Notice that the cases that were left out, $c_4$ and $c_5$, are synonymous or nearly synonymous with cases already in the down-sample: $c_2$ and $c_1$, respectively.}\label{fig:runningExample} \end{figure} \subsection{Building an Informed Down-Sample with Sparse Information} \label{spareseInfoSection} Down-sampled lexicase selection's problem-solving benefits stem from the computational savings gained by not evaluating the entire population on the whole training set for every generation. For a fixed computational budget, down-sampling allows more computational resources to be allocated to other aspects of evolutionary search, such as running for more generations or increasing population size. As a result, a larger portion of the search space can be explored \citep{Helmuth2021benefits}. Informed down-sampling with full information requires the evaluation of all individuals on all training cases in order to construct the down-sample to use in selection. This entire process is counter productive, as we could have just used the initial population evaluation to select individuals and circumvent the entire down-sampling process. The benefit of down-sampling comes from its ability to use sparse information in the individual selection process. Since our aim is to improve on random down-sampling, we must reduce the number of necessary program executions in order to calculate distances between training cases, so that we can benefit from sparse evaluations in both our individual selections and our down-sample creation. We present two methods to decrease the number of evaluations required for the pairwise distance calculation procedure. The first method, \textit{parent sampling}, samples a proportion $\rho$ of the parents to evaluate the distances for every generation. These parent-samples are evaluated on the \emph{entire} training set. In our runs with a population size of $1000$, if we were to randomly sample $0.01$ (or $\rho=0.01$) of these parents to become the parent sample, these $10$ parents would be evaluated on \emph{all} training cases. This results in case solve vectors of length $10$ that are used to calculate the distances between cases. Distances between cases are determined purely based on these parent-sample evaluations. We use the distance matrix generated from these parents to estimate the joint informativeness. The second method, \textit{scheduled case distance computation}, involves recomputing the distance matrix from the current population every $k$ generations, as opposed to every generation. This schedule reduces the amount of computation required for the evaluation of case distances even further by not performing it every generation. While such a schedule does not update the distances between cases as often, we still re-sample the down-sample based on these distances \emph{every generation}. Due to the stochastic nature of the down-sample selection process (specifically the random selection of the first case), it is likely that the same down-sample will not be used to evaluate the population in consecutive generations. In combination, parent sampling and scheduled case distance computation allow us to select a down-sample using far less information about individuals while losing only a small amount of information about cases and their similarity. This technique enables informed down-sampling to explore nearly as many individuals as random down-sampling does. Putting it all together, the informed down-sampling with sparse information algorithm is detailed in Algorithm~\ref{alg:IDSTotal}. This algorithm walks through a single generation's selection events, returning the parents for the next generation. \begin{algorithm} \caption{Informed Down-Sampling with Sparse Information} \label{alg:IDSTotal} \begin{algorithmic}[1] \Require \Statex $\mathcal{P}:$ population, \Statex $\textbf{cases}$: set of all training cases, \Statex$k: $ scheduled case distance computation parameter, \Statex $\rho: $ parent sampling rate, \Statex $\mathcal{G}:$ current generation counter, \Statex $\mathcal{D}: $ case distance matrix. \Comment{all distances initialized to be maximally far} \Ensure A list of selected parents \If{$\mathcal{G} \% k == 0$} \State{$\hat{\mathcal{P}} \gets$ sample $\rho{\times}|\mathcal{P}|$ parents from $\mathcal{P}$} \State{evaluate $\hat{\mathcal{P}}$ on $\textbf{cases}$} \State{calculate $\mathcal{D}$ from case solve vectors from solutions in $\hat{\mathcal{P}}$ on $\textbf{cases}$} \EndIf \State{$D(\cdot, \cdot) \gets $ distance function derived from indexing into $\mathcal{D}$} \State{$\textbf{ds} \gets $ create downsample using farthest first traversal down-sampling (See Algo~\ref{alg:FFT})} \State{$\mathcal{P} \gets$ select $|\mathcal{P}|$ new parents using lexicase selection from $\mathcal{P}$ using $\textbf{ds}$ as cases} \State \bf{return} $\mathcal{P}$ \end{algorithmic} \end{algorithm} \section{Experimental Methods}\label{sec:experiments} We conducted a series of experiments to study the performance of informed down-sampled lexicase selection. We compared the performance of informed down-sampled, random down-sampled, and standard lexicase selection on a series of program synthesis benchmark problems. We performed all experiments in two independent genetic programming systems to show that the findings are robust across different program representations: PushGP and Grammar Guided Genetic Programming (G3P). This section introduces the benchmark problems and genetic programming systems used in our experiments and describes our experimental design. \subsection{Program Synthesis Benchmark Problems} We evaluate each system using eight program synthesis benchmark problems from the first and second general program synthesis benchmark suites \citep{Helmuth2015psb1, helmuth2021psb2}. These problems are well-studied and are commonly used to compare parent selection algorithms in a GP context \citep{sobania2022comprehensive, sobania2022copilot}. These two benchmark suites include a variety of introductory program synthesis problems that require the manipulation of multiple data types with complex looping or conditional structures. Each benchmark problem is defined by a set of input/output examples (referred to as \emph{cases}) that specify the desired behavior of a correct program. For each problem, we split the input/output examples into a training set and a testing set. During evolution, we assessed program quality using only the training set. We used the testing set to measure how well a program generalized on examples unseen during evolution. We consider each input/output example on a pass/fail basis; that is, a program passes a test case if it produces the correct output when run with the associated input. A program is a \textit{solution} if it passes all of the training cases; it \textit{generalizes} if it passes all training \emph{and} all testing cases. We refer to runs as ``success" if they result in the production of a generalizing solution. We used the same training and testing data sets across both PushGP and G3P for each problem to ensure the data available is not biasing performance. Table~\ref{tab:problems} shows the eight program synthesis benchmark problems that we have chosen, along with their input and output types. We selected these particular problems to allow us to test informed down-sampling on a set of easy, medium, and hard problems as established by published success rates using PushGP and random down-sampled lexicase selection \citep{Helmuth2021benefits, helmuth_applying_2022}. We also ensured that these problems require qualitatively different programmatic paradigms to solve, such as looping and conditional execution \citep{helmuth_applying_2022}. \begin{table}[t] \caption{Program synthesis benchmark problems selected from the first and second general program synthesis benchmark suite, along with their respective input and output types and multiplicities.} \begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}} lccc} \hline \textbf{Problem} & \textbf{Suite} & \textbf{Input Type } & \textbf{Output Type} \\ \hline Count Odds & PSB1 & Vector of Integer & Integer\\ Find Pair & PSB2 & Vector of Integer & Two Integers \\ Fizz Buzz & PSB2 & Integer & String \\ Fuel Cost & PSB2 & Vector of Integer & Integer \\ GCD & PSB2 & Two Integers & Integer \\ Grade & PSB1 & Five Integers & String \\ Scrabble Score & PSB1 & String & Integer\\ Small or Large & PSB1 & Integer & String \\ \hline \end{tabular*} \label{tab:problems} \end{table} \subsection{Genetic Programming Systems} PushGP is a system that evolves computer programs in the \emph{Push} programming language, a stack-based language specifically invented for use in genetic programming \citep{spector2002autoconstructive, SpectorPush3}. Push literals are pushed onto one of a set of datatype specific stacks while instructions are also stored on a stack during interpretation. These instructions usually act on data from the stacks and leave their return value on the stacks. Instructions take values from and return results to the appropriately typed stack, including from and to the instruction stack, allowing for programs to use multiple data types and complex conditional execution paradigms. In this work, we used the propeller implementation of PushGP\footnote{\url{https://github.com/ryanboldi/propeller/releases/tag/Informed-Downsampling}}. G3P uses a context-free grammar in Backus-Naur form to evolve individuals in a desired programming language and supports the use of different data types and control structures \citep{whigham1995grammatically, forstenlechner2016grammar, forstenlechner2017grammar}. To prevent the generation of many invalid solutions during search, we use a tree-based representation instead of the common genotype-phenotype mapping known from classical grammatical evolution \citep{ryan1998grammatical,sobania2020challenges}. For the implementation of G3P, our code\footnote{\url{https://gitlab.rlp.net/mbriesc/informed-down-sampled-lexicase-selection}} is based on the PonyGE2 framework \citep{fenton2017ponyge2}. \begin{table}[t] \centering \caption{General and System-Specific Evolution Parameters} \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r} \hline \textbf{General Parameter} & \textbf{Value} \\ \hline runs per problem & 100 \\ population size & 1,000 \\ size of training set & 200 \\ size of test set & 1,000 \\ program execution limit & 60 million \\ maximum number (base) of generations & 300 \\ \hline \textbf{PushGP Parameter} & \textbf{Value} \\ \hline variation operator & UMAD \\ UMAD rate & 0.1 \vspace{0.3em}\\ \hline \textbf{G3P Parameter} & \textbf{Value}\\ \hline crossover operator & subtree crossover\\ crossover probability & 0.95\\ mutation operator & subtree mutation \\ mutation steps & 1 \\ maximum tree depth & 17 \\ elite size & 5 \\ initialisation & position-independent grow \\ maximum initial tree depth & 10 \vspace{0.3em}\\ \hline \end{tabular*} \label{tab:sysParams} \end{table} Table~\ref{tab:sysParams} shows the system-specific parameters for PushGP and G3P, and the general parameters that are used in both systems. The ``runs per problem" parameter refers to the number of independent evolutionary runs that were conducted for each problem and experimental configuration. The PushGP system uses the uniform mutation by addition and deletion (UMAD) mutation operator \citep{Helmuth18UMAD}. This UMAD operator works with a 0.1 mutation rate. For G3P, we use subtree mutation and crossover, with a crossover probability of 0.95. The initialization for G3P is position-independent grow \citep{Fagan16PI}. We use grammars based on those provided by the PonyGE2 framework with small adjustments to make them better comparable to the PushGP instructions. \subsection{Evaluation and Generation Limits} \label{sec:genLimits} In order to make a fair comparison between methods that perform different numbers of program executions per generation, we use the recommendation from the PSB2 benchmark suite to limit each GP run to 60 million program executions \citep{helmuth2021psb2}. Since program executions typically take up the majority of the computational requirements of a GP run, this ensures runs receive similar amounts of computation regardless of whether they use down-sampling. In standard runs using all training cases, the 60 million executions are used by at most 300 generations of a population size of 1000 individuals evaluated on 200 cases. With random down-sampling, we increase the maximum number of generations by the same factor as the down-sampling. For example, if one tenth of the training data is used in each sample, we can run evolution for ten times the number of generations while keeping the number of individual program executions constant. More generally, if we let $G$ be the maximum number of generations for a run using all training cases, we allow our random down-sampling runs a limit of $\hat{G}$ generations where $\hat{G}$ is given by $$\hat{G} = \dfrac{G}{r},$$ where $r$ is the down-sample rate. For informed down-sampled lexicase selection the generational limit is calculated by $$\hat{G} = \dfrac{G}{r + \frac{\rho(1-r)}{k}},$$ where $\rho$ is the parent sampling rate and $k$ is the parameter for the scheduled case distance computation. The exact generational limits for each experimental configuration are shown in table~\ref{tab:hyperparamSweep}.\footnote{As our implementations evaluate the fitness of individuals in the parent sample twice, we run the IDS with sparse information runs for slightly ($<40$) fewer generations to compensate the additional computational effort.} \subsection{Experimental Configurations} We explore 11 different configurations of lexicase selection for each problem: standard lexicase selection (Lex), random down-sampled lexicase selection (Rnd), IDS lexicase selection with full information, as well as three sparse information configurations. To better match previous literature, all down-sampling methods were performed both with $r\in\{0.05; 0.1\}$. Table~\ref{tab:hyperparamSweep} shows the configurations of the different runs performed in this work. These runs, due to different generational computational costs, have different generational limits as explained in section~\ref{sec:genLimits}. Full information down-sampling is simply using a parent-sample rate of $1$, which means that the distances between training cases are determined by all parents' performance on every test case. With this, the quality of the distance metric between two cases is not limited by the parent-sampling or generational gaps we are using to reduce computational load. Full information down-sampling is included as a control experiment to compare with using all cases for selection in standard lexicase selection. It is important to note that we run for the same number of generations as with regular lexicase selection because we need to evaluate \emph{all} parents on \emph{all} test-cases in order to determine the distances between the cases. Finally, the six informed down-sampling methods we have chosen for this work include, for both the 0.05 and 0.1 down-sample rate ($r$), 0.01 parent sampling ($\rho$) rate with a few different distance calculation scheduling ($k$) parameters. Through a set of preliminary experiments, the value of $\rho = 0.01$ for the parent sampling rate was determined to be effective while not resulting in too many extra program executions\footnote{As we are trying to approach the computational savings of random down-sampled lexicase selection, the smaller the value of $\rho$, the better. We found that the relatively small value of $\rho = 0.01$ resulted in sampling that was good enough to determine the joint case information.}. In conjunction, these hyper-parameters mean that every $k$ generations, 10 parents are used to determine the distances between \emph{all} training cases, where $k\in\{1, 10, 100\}$. \renewcommand{\arraystretch}{1.35} \begin{table} \caption{Different settings conducted in our experiments for standard lexicase selection (Lex), random down-sampled lexicase selection (Rnd) and informed down-sampled lexicase selection (IDS). The variable $r$ denotes the down-sampling rate, $\rho$ is the parent sampling rate, $k$ is generational interval at which we update the distance matrix and $\hat{G}$ specifies the maximum number of generations. } \tabcolsep=0.17cm \begin{tabular}{l|c|c|cccc|c|cccc} \hline \textbf{Method} & \textbf{Lex} & \textbf{Rnd} & \multicolumn{4}{c|}{\textbf{IDS}} & \textbf{Rnd} & \multicolumn{4}{c}{\textbf{IDS}}\\ \hline $r$ & - & 0.05 & \multicolumn{4}{c|}{0.05} & 0.1 & \multicolumn{4}{c}{0.1} \\ $\rho$ & - & - & 1 & 0.01 & 0.01 & 0.01 & - & 1 & 0.01 & 0.01 & 0.01 \\ $k$ & - & - & 1 & 1 & 10 & 100 & - & 1 & 1 & 10 & 100\\ $\hat{G}$ & 300 & 6000 & 300 & 5042 & 5888 & 5988 & 3000 & 300 & 2752 & 2973 & 2997\\ \hline \end{tabular}\label{tab:hyperparamSweep} \end{table} \section{Results and Discussion}\label{sec:Results} We discuss the success rates achieved by both GP systems using standard lexicase selection, random down-sampling, and different configurations of IDS. Further, we study how the composition of the down-samples found by IDS change over the number of generations. \subsection{Informed Down-Sampling Improves Problem-solving Success} Tables~\ref{tab:push_results} and~\ref{tab:ge_results} show the success rates for PushGP and G3P respectively on the chosen program synthesis benchmark problems for different parameter configurations. The success rate is defined as the number of runs that result in a program that passes the complete training set as well as the entire unseen test set. For random down-sampling and IDS, we measured solutions on only the down-samples during the actual run. As such, we execute these runs to the maximum generational limit, and then conduct a post-hoc analysis to see if any solutions passed all of the training cases. If so, this is the solution that we then evaluate on the unseen test set to determine whether it generalizes or not. For all studied configurations, we report success rates based on 100 runs. For each benchmark problem, we highlight in \textbf{bold} the best success rate at each of the down-sample sizes. Problem names in \textbf{bold} are those where an informed down-sampling run outperformed random at \emph{both} down-sample rates on that problem. Problem names that are \underline{underlined} are those where a random down-sampling run outperformed an informed down-sampling run at both down-sample rates. Asterisks signify results that are significantly better than random down-sampling \emph{at the same down-sample size}. Standard lexicase selection was not included in our statistical analyses, as IDS is presented to improve upon random down-sampling at a fixed down-sample size. We performed significance analysis with a two proportion z-test and Bonferroni-Holm correction. Shown with * are those significant at the $\alpha=0.1$ level, ** the $\alpha=0.05$ level, and *** the $\alpha=0.01$ level. \renewcommand{\arraystretch}{1.35} \definecolor{lightgray}{gray}{0.9} \newcommand{\sig}[1]{\textbf{#1}} \afterpage{ \begin{landscape} \begin{table}[h!] \centering \vspace*{30mm} \caption{Number of generalizing solutions (successes) out of 100 runs achieved by PushGP on the test set. } \label{tab:push_results} \renewcommand{\arraystretch}{1.3} \begin{tabular}{l|c|ccccc|ccccc} \hline \multicolumn{1}{l|}{\textbf{Method}} & \textbf{Lex} & \textbf{Rnd}& \multicolumn{4}{c|}{\textbf{IDS}}& \textbf{Rnd} & \multicolumn{4}{c}{\textbf{IDS}} \\ \multicolumn{1}{l|}{\textbf{ $r$ }} & \textbf{-} & \multicolumn{5}{c|}{\textbf{0.05}} & \multicolumn{5}{c}{\textbf{0.1}} \\ \multicolumn{1}{l|}{\textbf{$\rho$}} & \textbf{-} & \textbf{-}& \textbf{1} & \textbf{0.01} & \textbf{0.01} & \textbf{0.01} & \textbf{-}& \textbf{1} & \textbf{0.01} & \textbf{0.01} & \textbf{0.01} \\ \multicolumn{1}{l|}{\textbf{$k$}} & \textbf{-} & \textbf{-}& \textbf{1} & \textbf{1} & \textbf{10} & \textbf{100} & \textbf{-}& \textbf{1} & \textbf{1} & \textbf{10} & \textbf{100} \\ \hline \hline \sig{Count Odds} & 24 & 25 & 43*** & 99*** & \sig{100***} & 98*** & 26 & 55*** & 95*** & \sig{99***} & 97*** \\ \rowcolor{lightgray} \textbf{Find Pair} & 5 & 27 & 9 & 32 & 32 & \textbf{36} & 15 & 7 & 19 & 19 & \textbf{21} \\ \sig{Fizz Buzz} & 13 & 64 & 2 & 85*** & 94*** & \sig{95***} & 45 & 3 & 75 & 78* & \sig{81**} \\ \rowcolor{lightgray} \sig{Fuel Cost} & 41 & 72 & 1 & 83 & \textbf{85} & 83 & \textbf{76} & 7 & 69 & 72 & 70 \\ \sig{GCD} & 20 & 74 & 4 & \textbf{76} & 67 & 69 & 54 & 6 & 56 & \textbf{63} & 62 \\ \rowcolor{lightgray} Grade & 0 & 0 & 0 & 0 & \sig{1} & 0 & \sig{1} & 0 & 0 & \sig{1} & \sig{1} \\ \sig{Scrabble Score} & 8 & 8 & 6 & 69*** & 64*** & \sig{75***} & 16 & 9 & 55*** & \textbf{74***} & 64*** \\ \rowcolor{lightgray} \underline{\smash{Small or Large}} & 34 & \textbf{93} & 37 & 69 & 69 & 69 & \textbf{69} & 39 & 60 & 66 & 54 \\ \hline \end{tabular} \end{table} \end{landscape} } \afterpage{ \begin{landscape} \begin{table}[h!] \centering \vspace*{30mm} \caption{Number of generalizing solutions (successes) out of 100 runs achieved by G3P on the test set. }\label{tab:ge_results} \renewcommand{\arraystretch}{1.3} \begin{tabular}{l|c|ccccc|ccccc} \hline \multicolumn{1}{l|}{\textbf{Method}} & \textbf{Lex} & \textbf{Rnd}& \multicolumn{4}{c|}{\textbf{IDS}}& \textbf{Rnd} & \multicolumn{4}{c}{\textbf{IDS}} \\ \multicolumn{1}{l|}{\textbf{$r$ }} & \textbf{-} & \multicolumn{5}{c|}{\textbf{0.05}} & \multicolumn{5}{c}{\textbf{0.1}} \\ \multicolumn{1}{l|}{\textbf{$\rho$}} & \textbf{-} & \textbf{-}& \textbf{1} & \textbf{0.01} & \textbf{0.01} & \textbf{0.01} & \textbf{-}& \textbf{1} & \textbf{0.01} & \textbf{0.01} & \textbf{0.01} \\ \multicolumn{1}{l|}{\textbf{$k$}} & \textbf{-} & \textbf{-}& \textbf{1} & \textbf{1} & \textbf{10} & \textbf{100} & \textbf{-}& \textbf{1} & \textbf{1} & \textbf{10} & \textbf{100} \\ \hline \hline Count Odds & 65 & \textbf{66} & 45 & 53 & 62 & 63 & 67 & 58 & 60 & 58 & \textbf{72} \\ \rowcolor{lightgray} Find Pair & 0 & 0 & 0 & \textbf{1} & 0 & 0 & \textbf{1} & 0 & 0 & \textbf{1} & 0 \\ \textbf{Fizz Buzz}& 62 & 83 & 50 & 84 & 78 & \textbf{85} & 78 & 53 & 81 & \textbf{89} & 72 \\ \rowcolor{lightgray} Fuel Cost& 33 & \textbf{34} & 17 & 28 & 27 & 29 & 29 & 21 & 21 & 25 & \textbf{33} \\ GCD & 0 & \textbf{1} & 0 & 0 & 0 & \textbf{1} & 0 & 0 & 0 & 0 & 0 \\ \rowcolor{lightgray} \textbf{Grade} & 36 & 39 & 29 & 51 & \textbf{57*} & 44 & 44 & 37 & 46 & \textbf{51} & 48 \\ Scrabble Score & 6 & 10 & 1 & \textbf{11} & 10 & 10 & \textbf{14} & 0 & 6& 3 & 3 \\ \rowcolor{lightgray} \textbf{Small or Large} & 41 & 52 & 49 & 54 & \textbf{63} & \textbf{63} & 59 & 52 & 57 & 55 & \textbf{63} \\ \hline \end{tabular} \end{table} \end{landscape} } For the PushGP results, let us consider the \emph{Fizz Buzz} problem. Standard lexicase selection had 13 successful runs. Using random down-sampling at the $0.05$ down-sampling rate improved this result to 64, in line with the findings of \cite{Helmuth2021benefits}. Using the same down-sampling rate with IDS, a $0.01$ parent rate, and $k=100$ yielded $95$ successful runs. This is significantly better than random down-sampling at the $0.01$ level. This is an important result as IDS is significantly improving on random down-sampling, which in turn improves on lexicase selection. Another set of PushGP IDS runs where we observed significant improvements were those of the \emph{Count Odds} problem. While standard lexicase selection achieves 24 successes, random down-sampling at either down-sample rate ($r=0.05$ or $r=0.1$) does not produce more than 26 successful runs. The failure to meaningfully improve success rates by random down-sampling seemed to be addressed by informed down-sampling. This is clear as informed down-sampling at all configurations ensures that close to if-not-all 100 runs successfully generalize to the held out test set. This and similar results hint that while randomly down-sampled lexicase selection works well usually, there are some problems where important cases might be being dropped out, resulting in a similar performance to standard lexicase selection despite the increased search generations. Informed down-sampling has the ability to improve success rates both when random down-sampling improves upon standard lexicase selection, and when it does not. Only one configuration of G3P resulted in a significant improvement on random down-sampling at the same down-sample rate. For the Grade problem at the $0.05$ down-sample rate, we see significantly more successes when using IDS with $\rho = 0.01$ and $k = 10$. For this problem, using this informed down-sample configuration resulted in 57\% of the runs yielding a generalizing solution, where, using random down-sampling resulted in only 39\% of the runs yielding a success. The fact that only a single configuration of IDS resulted in a significant improvement suggests that the problem-solving benefits of using IDS are representation- and problem-dependent, motivating future work to continue improving IDS to achieve more universal improvements to problem-solving success. We have a number of hypotheses explaining this improved performance. The first of these is that the informed down-sampling procedure increases the number of specialists (individuals exceptional on a few cases, but have a high \emph{total} error) that survive over the course of evolutionary time. These individuals could be better maintained with IDS as the cases they are exceptional on are still placed in the down-samples throughout evolution, preventing them from being lost as could happen when randomly down-sampling. Another hypothesis for IDS's improved performance is that it reduces the computation used to evaluate individuals on synonymous cases. When two cases are fully synonymous, all individuals that solve one case solve the other as well. When using lexicase selection, having both of these cases in the down-sample would result in little difference in the probability of selecting each individual compared to having only one case in the down-sample. After one of the two cases has been used to filter the pool of candidate solutions, the other will have no filtering pressure because all remaining individuals perform identically on the synonymous cases. Having a synonymous case \textit{does} increase the chance that one of the two cases appears earlier in the shuffled case ordering, producing a minor (though perhaps undesired) change in selection probability. Synonymous (or near synonymous) cases additionally take spots in the down-sample that cannot be allocated to other, more-informative cases. When using IDS, we ensure that the first few cases added to the down-sample measure relatively different behaviors. This may allow IDS to select a larger variety of individuals than random down-sampling, instead approximating the variety that could be selected by full lexicase selection. These results, in general, make it clear that informed down-sampling by farthest first traversal is significantly outperforming randomly down-sampled lexicase selection on a portion of these program synthesis benchmark problems for the PushGP evolutionary framework. The G3P results are less clearly in favor of informed down-sampling, but still point to minor improvements in success rates. It is important to note that all of our down-sampled runs (besides full-information) consistently and significantly outperform standard lexicase selection, which has in turn been shown to significantly outperform other selection strategies. This result agrees with that of \cite{helmuth_benchmarking_2020}, showing down-sampled lexicase selection being, before this work, the state of the art in program synthesis with genetic programming. Our informed down-sampling runs outperform random down-sampling (higher success rate for both down-sample rates) on 6/8 of the problems we studied for PushGP, with 3/8 of them being statistically significant. For G3P, informed down-sampling improves on 3/8 problems, with 1/8 being significant. Random down-sampling outperformed informed down-sampling (across both down-sampling levels) on only one problem (\emph{Small or Large}) for PushGP, and none for G3P. For \emph{Small or Large} with PushGP, we see that the worse performance with informed down-sampling can be attributed to a lower generalization rate (and not worse performance on the training sets). The generalization rates can be found in Appendix Figure~\ref{tab:push_generalization} for PushGP and Appendix Figure~\ref{tab:ge_generalization} for G3P. Future work should explore the effect that informed down-sampling has on generalization in more depth. \subsection{Using Smaller Informed Down-Samples Tends to Improve Success Rates} In general, our IDS runs at a 0.05 down-sample rate have a higher success rate than their equivalent counterparts at the 0.1 down-sample rate. This difference is likely due to the fact that the runs at a 0.1 down-sample rate have a substantially lower generational limit, meaning that we are exploring a smaller portion of the space of possible solution programs. With 200 training cases, our down-sample contains 10 and 20 cases respectively for the 0.05 and 0.1 down-sample rates. A possible reason for the improved performance at 0.05 is that a larger proportion of these cases are indeed our distinct, or informative, cases. Note that once the Farthest First Traversal process selects a representative case for every synonymous group in the down-sample, every remaining solution's minimum distances to the current sample will be equal to 0, so the selections are performed randomly to fill the rest of the cases. Since we are using the same problems, with the same number of behavioral niches, we will see the runs with 20 cases in the down-sample having more synonymous cases in the down-sample. Due to the fact that the content of the training cases is not notably more informative to make up for the decreased generational limit, we see a lower success rate. We will analyze the specific cases that compose the down-samples in section~\ref{sec:caseComp}. The exceptions to this trend are the full information down-sampling runs. For these runs, the larger down-samples tend to perform better. This result is likely due to the fact that the generational limit was set to 300 for both sampling levels (as they both evaluate all individuals on all test cases), and so having a smaller down-sample size would not change the number of evaluations. With more cases in the sample, the GP method can take into account more information when performing selection, which could result in more informed search. The magnitude of the differences for success rate across sample size for the full IDS runs suggests that there are diminishing returns for including more cases in the sample. \subsection{Informed Down-Sampling Automatically Discovers Important Training Cases}\label{sec:caseComp} To gain a deeper insight into how IDS composes down-samples, we visualize how the selected training cases (used for a down-sample) develop over the generations of an evolutionary run. Figures~\ref{fig:push_downsample_comp_1} and~\ref{fig:ggg_downsample_comp_1} show the composition of down-samples for every problem at every generation using PushGP (Fig.~\ref{fig:push_downsample_comp_1}) and G3P (Fig.~\ref{fig:ggg_downsample_comp_1}) with down-sample rate $r=0.05$. We present results for a full information configuration ($\rho=1$ and $k=1$) as well as a sparse information configuration ($\rho=0.01$ and $k=10$). We chose to analyze both a full information and sparse information run in order to see whether our sparse information configurations are finding the same training cases to be informative as if we had used all parents to evaluate the distances between training cases. The plots show how often certain training cases are included in the down-sample at every generation, averaged over all active runs. Each row represents a case in the training data, ordered by its position in the training set. The training sets used were generated by first adding some human-expert defined edge cases, and filling the rest with cases that were randomly generated by an function that already implements our desired program (oracle function). For each figure, there is a single marker on the $y$-axis that shows where exactly the expert-case cutoff for the training set was. Thus, the rows above the marker in the visuals are representing cases that humans determined to be important based on the problem definition. Brighter colors imply that a case is included more often, darker colors imply a lower number of inclusions. \begin{figure}[!ht] \centering \includegraphics[width=0.85\textwidth]{figures/4x2_Push_1.pdf} \caption{Down-sample composition over generations for PushGP with 0.05 down-sample rate for a full information ($\rho=1$ and $k=1$) and a sparse information configuration ($\rho=0.01$ and $k=10$). } \label{fig:push_downsample_comp_1} \end{figure} \begin{figure}[!ht] \ContinuedFloat \centering \includegraphics[width=0.85\textwidth]{figures/4x2_Push_2.pdf} \caption{Continued.} \label{fig:push_downsample_comp_2} \end{figure} \begin{figure}[!ht] \centering \includegraphics[width=0.85\textwidth]{figures/4x2_G3P_1.pdf} \caption{Down-sample composition over generations for G3P with 0.05 down-sample rate for a full information ($\rho=1$ and $k=1$) and a sparse information configuration ($\rho=0.01$ and $k=10$). \\ } \label{fig:ggg_downsample_comp_1} \end{figure} \begin{figure}[!ht] \ContinuedFloat \centering \includegraphics[width=0.85\textwidth]{figures/4x2_G3P_2.pdf} \caption{Continued.} \label{fig:ggg_downsample_comp_2} \end{figure} For PushGP (Figure~\ref{fig:push_downsample_comp_1}), we see that the configurations with sparse information often include the same cases in the down-sample as the runs with full information. This result means that by using a parent sampling rate of $\rho = 0.01$ and a case distance evaluation schedule parameter of $k=10$, we can significantly reduce the number of evaluations needed to calculate distances between cases, while still maintaining a good approximation to the ground truth (full information, where we use all parents every generation to calculate distances). However, the composition for our sparse information runs are slightly more noisy than that for full information, suggesting that using parent sampling could introduce some extra stochasticity to the down-sample creation process. For all studied benchmark problems, we see that IDS has a strong bias toward specific training cases that are included substantially more often in the down-sample. These selected training cases are mainly consistent with the human-defined edge cases that exist at the beginning of the training set. This result shows that informed down-sampling is indeed often finding the same cases to be informative as those that a human expert would, without any knowledge of the problem definition. However, with IDS, we can draw further comparisons of informativeness within this expert-defined groups of cases. This can be seen as some cases are selected more often that others \emph{within} the first several cases. We then look at the labels of the specific training cases that are found to be important. We see that these training cases make sense to be included more often than others in the down-samples. Note that the labels of the specific training cases are not included in the plots for simplicity, but can be queried based on their specific index in the data sets provided in our code implementation. For example, for the \emph{Small or Large} problem, cases around the decision boundaries as well as numbers between $0$ and $1000$ are more often included. For the \emph{Grade} problem, those edge cases with very close decision boundaries are included while the ones with far away boundaries are not taken into account for the down-sample. For \emph{Fuel Cost}, nearly all of the human defined edge cases are found to be important, while for the \emph{GCD} problem the first two cases in particular make it in nearly every down-sample, while the rest are selected less often. For the \emph{Scrabble Score} problem, we see that the first edge cases, which specify the score for each letter, does not seem to be informative at all. This result is not surprising, as this information is already available to PushGP through a vector with these scores on the vector stack. However, the three edge cases after them with empty strings and special characters as input are included a lot. For \emph{Count Odds}, the edge cases denoting empty lists, or lists with zero or a single odd number were found to be important, indicating that those contain all the important information to learn what are odd and even numbers as well as how to handle a list. For \emph{Fizz Buzz}, all edge cases seem important while for the \emph{Find Pair} problem only those edge cases with lists of length $3$ are consistently included. Those lists of length $2$ in the edge cases are represented in the down-sample less often. Lastly, we see that the composition of the down-sample stays rather stable during the evolutionary run for the PushGP system, explaining why there is only a small difference in our experiments between calculating the distances every $k=1$ and $k=100$ generations (see Table~\ref{tab:push_results}). For G3P (Fig~\ref{fig:ggg_downsample_comp_1}), we see similar results as with PushGP. However, for the problems that require iterative structures to be solved (\emph{Count Odds}, \emph{Find Pair}) we see that the down-sample quickly dissolves into random noise instead of any form of structure. This dynamic occurs despite the fact that the same edge cases as with PushGP are initially identified in the first few generations. This result is not surprising as finding iterative structures is known to be challenging for grammar-guided approaches, as such structures are difficult to be built step-by-step guided by the performance on a set of training cases. \citep{sobania2020challenges, sobania2022comprehensive}. Another difference between the case compositions are that, while IDS with G3P tends to discover the same cases as those found with PushGP, their use is less consistent, resulting in lines that are more faint than those for PushGP. Both of these hypotheses could help explain the relatively worse improvement that IDS yields for G3P than for PushGP. However, for the problems that require conditionals, like \emph{Small or Large} and \emph{Grade}, we see that the important cases are identified and used during evolution. This result is also reflected in the success rates compared to random down-sampling (see Table~\ref{tab:ge_results}). Interestingly, IDS identifies many of the same cases as important for G3P as well as PushGP. This result suggests that the structure of the problem itself determines which cases are important rather than the considered representation. This dynamic makes IDS potentially useful across many different systems and approaches. \section{Conclusion and Future work}\label{sec:conclusion} In this work, we proposed a novel approach to construct down-samples in an informed manner during evolution when using down-sampled lexicase selection. We find that changing the composition of down-samples to include cases that are more ``informative" helps improve problem solving performance with a fixed computational budget. Informativeness, we hypothesize, is linked to how distinct the cases in the down-sample are. Cases that are solved by the same subset of the population are likely testing for the same behavior, and thus need not be included in the down-sample at the same time. Cases that test for different behaviors likely maintain different behavioral groups of individuals, which could promote and maintain higher levels of diversity in the population. In our empirical comparisons of these down-sampling methods, we find evidence to support the conclusion that selecting cases in an informed manner increases the success rate of GP runs. These results were confirmed across two independent GP systems by using well studied benchmark problems. We find that using IDS often increases the proportion of informative cases in the down-sample as verified by improved success rates as well as by directly inspecting the content of the down-samples. IDS improves upon the state of the art selection method across the majority of the program synthesis problems explored in this work. This work is a first exploration into changing the case composition of down-samples for lexicase selection runs. As such, it opens many potential directions for future research. Due to the modular nature of the informed down-sampling system, different methods could be used for either the pairwise information measurement, or for the down-sample creation portions of the algorithm. An exploration into different down-sampling levels, and the effects levels have on the informational content of down-samples is also a promising direction for future work. Additionally, IDS introduces new hyperparameters for the parent sampling rate and generational schedule; it would be beneficial to create a method for automatically setting these dependant on the problem and the state of the GP search. Finally, even though there are reasons to believe that IDS and down-sampling in general work well with lexicase selection, there is nothing that ties them to a particular selection method; it may be informative to explore the effects of IDS on other parent selection methods such as tournament selection. Finally, comparing the extent to which different down-sampling strategies blunt lexicase's ability to maintain specialists could also yield important insights into why informed down-sampling improves success rates as much as it does. \section{Acknowledgements} This material is based upon work supported by the National Science Foundation under Grant No. 1617087. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the authors and do not necessarily reflect the views of the National Science Foundation. This work was performed in part using high performance computing equipment obtained under a grant from the Collaborative R\&D Fund managed by the Massachusetts Technology Collaborative. Parts of this research were conducted using the supercomputer Mogon and/or advisory services offered by Johannes Gutenberg University Mainz (hpc.uni-mainz.de), which is a member of the AHRP (Alliance for High Performance Computing in Rhineland Palatinate, www.ahrp.info) and the Gauss Alliance e.V. The authors would like to thank Anil Saini, Austin Ferguson, Cooper Sigrist, Constantin Weiser, Edward Pantridge, Jose Hernandez, Li Ding and the Members of the PUSH lab at Amherst College for discussions that helped shape this work. \small \bibliographystyle{apalike}
\section{Introduction} Technical advancement of mankind is driving an increase of man-made radio-frequency transmitters, both terrestrial and in space. This raises the bar for radio astronomical studies that try to detect sky signals that are many orders of magnitude fainter than man-made transmissions. Now that radio-astronomy is evolving into a science where it is the norm to measure data volumes in petabytes, mitigation of radio-frequency interference (RFI) needs to be computationally efficient and fully automated. Apertif is a receiver system upgrade for the Westerbork Synthesis Radio Telescope (WSRT) that makes use of phased-array feeds to allow for 40 simultaneous adjacent beams on the sky \citep{apertif-van-cappellen-2022}. Observations are performed at a central frequency of 1280 or 1370~MHz with an instantaneous bandwidth of 300~MHz. The data volume produced by Apertif is considerable. Voltages from the 12 dishes with Apertif receivers are correlated for all beams, typically integrated for 30 seconds and recorded with four polarizations. The bandwidth of 300~MHz is split into 384 sub-bands, each with 64 channels of 12.2~kHz. Because of the large bandwidth, it overlaps with various services, including GPS and air-traffic communications. Although the WSRT resides in a radio protected zone, it is not shielded from satellites and air-traffic. Moreover, starting 2020, 5G transmissions make use of the 1452 -- 1492 MHz bandwidth. For these reasons, Apertif requires an efficient approach to deal with RFI. Due to the large amount of data, such an approach has to work fully automatically. The most common method to deal with RFI, is to detect data samples that have a significant contribution of RFI and ignore affected data in the processing (e.g. \citealt{statistical-rfi-removal,pieflag-middelberg-2006,offringa-2010-post-correlation-rfi-classification,prasad-flagcal-2012,serpent-peck-2013,nn-rfi-detection-2020,sun-2022}). This process is referred to as data flagging, and is also our method of choice for dealing with RFI in Apertif data in this work. Our detection methodology builds upon the RFI detection pipelines for the Low-Frequency Array (LOFAR; \citealt{lofar-2013,LOFAR-RFI-pipeline}) and the Murchison Widefield Array (MWA; \citealt{mwa-2013,offringa-2015-mwa-rfi}). Those pipelines integrate an \textsc{aoflagger} flagging strategy, which combines filtering, sumthresholding, morphological operations and heuristics. Details of the \textsc{aoflagger} approach will be discussed in \S\ref{sec:aoflagger-method}. \begin{figure*} \begin{center} \includegraphics[width=13cm]{images/AOFlagger-diagram}% \caption{The default \textsc{aoflagger} strategy for RFI-detection (before modifications for Apertif). These steps are independently performed on smaller subsets of the data. The input data of one independent run through these steps typically consists of approximately an hour of correlations from a single pair of antennas and a single beam, with the full bandwidth and all four linearly polarized cross-correlations present.} \label{fig:aoflagger-diagram} \end{center} \end{figure*} Apertif supports a transient (beam-formed) mode and an imaging mode. The RFI detection approach for these two modes are fundamentally different. In this work we aim at RFI detection in imaging mode, i.e., after having correlated and integrated the voltages from all the antennas. See \citet{sclocco-2019} for an approach to mitigate RFI in beam-forming mode. Our approach is part of a fully automated Apertif imaging pipeline called \textsc{apercal} \citep{adebahr-apercal}. A multi-beam receiver makes it possible to perform spatial filtering techniques to suppress interference \citep{spatial-filtering-parkes-multibeam,spatial-filtering-parkes-multibeam-for-pulses,rfi-spatial-processing-hellbourg-2014}. This requires fast dedicated computing hardware that processes the raw signals from all the beams, which for Apertif is not available. Spatial filtering is also mainly used to filter out a limited number of known transmitters, which for Apertif is likely not sufficient by itself, although it might save some part of the bandwidth. Another approach to detect interference is by using the spectral kurtosis statistic \citep{hardware-implementation-spectral-kurtosis,taylor-2019,purver-2021}. This has shown results that are competitive with amplitude-based detection. However, this requires a specialized correlator and a doubling of the data volume to be able to calculate the kurtosis. Recently, machine learning has been used to address the issue of RFI detection \citep{harrison-2019,nn-rfi-detection-2020,xiao-2022,sun-2022}. \citet{nn-rfi-detection-2020} argue that convolutional neural networks can achieve an accuracy that is higher than that of their {\sc sumthreshold} implementation. For this comparison, the authors use their own customized implementation of the {\sc sumthreshold} method, whereas in platforms such as \textsc{aoflagger} the method is typically applied iteratively and combined with filters \citep{offringa-2010-post-correlation-rfi-classification,LOFAR-RFI-pipeline} and morphological operators \citep{offringa-2012-scale-invariant-rank-operator,vdgronde-siroperator-2016} to enhance the accuracy. With these additions, it has been shown that pipelines such as \textsc{aoflagger} typically detect all interference that astronomers would manually flag. In this work, we will showcase what can be achieved with traditional methods --- including their computational requirements --- thereby providing an updated base-line to compare against. In this paper, we introduce a flagging strategy for Apertif data using the AOFlagger framework, and demonstrate our designed strategy on Apertif data. In \S\ref{sec:method}, we will start by introducing the AOFlagger steps used to construct the Apertif approach, and introduce several new operations that are integrated into the Apertif flagging strategy. In \S\ref{sec:results}, results of applying this strategy are presented, including long-term statistics and the computational requirements. Finally, in \S\ref{sec:discussion-conclusions} we discuss the results and draw conclusions. \section{Method} \label{sec:method} For this work, we have designed an interference detection approach for Apertif based on the existing \textsc{aoflagger} approach and integrated this into the \textsc{apercal} pipeline. \textsc{apercal} is an automated processing pipeline for Apertif imaging observations \citep{adebahr-apercal}, consisting of common steps such as data formatting, interference detection, calibration and imaging. Interference detection is one of the first steps during data reduction and is fundamental for achieving a good and persistent calibration and image quality and later steps of the processing. To improve the detection quality, several modifications to \textsc{aoflagger} are required. This consists of extensions of existing algorithms and optimizing parameters for \textsc{apertif}, which we will discuss in this section. We will start with an overview of the detection approach. \subsection{Overview} \label{sec:aoflagger-method} Fig.~\ref{fig:aoflagger-diagram} shows an overview of the steps that the default \textsc{aoflagger} strategy performs. The \textsc{aoflagger} approach to RFI detection in a subset can be summarized as i) estimation and subtraction of the sky signal by applying a Gaussian high-pass filter in time-frequency space (see \S\ref{sec:high-pass-filter}); and ii) detection of excessive values, with increased sensitivity towards spectral-lines and broadband features. The detection is performed with the \textsc{sumthreshold} algorithm \citep{offringa-2010-post-correlation-rfi-classification}. Steps i) and ii) are typically iterated three times with increased sensitivity to make sure that the final sky signal estimate is minimally biased by interference. As a final step, the flags from different polarizations are combined and are extended in time and frequency, using the scale-invariant rank (SIR) operator \citep{offringa-2012-scale-invariant-rank-operator,vdgronde-siroperator-2016}. This latter step improves detection of interference that tapers off below the noise floor and fills gaps in the flag mask when a persistent transmitter is not fully detected. With \textsc{aoflagger}, detection of interference is performed independently on subsets of the data, and the pipeline of Fig.~\ref{fig:aoflagger-diagram} runs independently for each subset. For Apertif, such a subset was chosen to contain the data from all four linearly polarized correlations (XX, XY, YX, YY), the full bandwidth (300~MHz), an interval of typically half an hour for a single beam and a single correlated baseline. Hence, the detection of interference for different beams, baselines and time intervals is independently performed, even though these are part of the same observation. The motivation for flagging these subsets independently is two fold: \begin{itemize} \item It improves performance: it allows parallel and distributed detection of subsets. The independent flagging of beams and time intervals matches with the format of the data. Despite this, data access is still not ideal, because the data for one baseline is stored dispersed over the time direction. \item Combined detection does not significantly improve detection: the added value of detection on combined subsets of data is small, i.e., one subset contains little information about the RFI in another subset. This is because the impact of RFI can vary greatly between different beams and different baselines. Furthermore, it rarely occurs that RFI which affects image quality is not detectable in half an hour of data, but is detectable when multiple half hour intervals are combined. \end{itemize} Performing detection on integrated baselines has, in some cases, been shown to make faint RFI detectable \citep{offringa-2015-mwa-rfi,wilensky-2019}. Early tests with Apertif data, however, indicated that there is no gain in combining baselines. We have also performed tests that flag after integrating over multiple beams, but again found no improvement in doing so. These tests were not exhaustive and it could be that combined detection on baselines or beams could still improve the accuracy somewhat. \textsc{aoflagger} aims to take out RFI that requires raw, high-resolution data flagging. Because of the high resolution of processed data, the computational performance of detection is critical. It is important to perform high-resolution flagging early, because it results in the highest accuracy and the impact of flagging is reduced compared to low-resolution flagging \citep{offringa-lofar-environment-2013}. On the other hand, some phenomena cause the loss of large time intervals or frequency ranges. Common instrumental causes are correlator failures, temporary local RFI or strong broadband transmitters. Detection of such issues does not require the high-resolution data, and it is therefore less critical to detect such issues in the first \textsc{aoflagger} detection run. Such issues can be found in post-processing of lower-resolution data for which the performance is less critical. \subsection{Invalid data} There are several instrumental issues that may result in data with invalid values that interrupt the data in time or frequency. A few examples of such issues are correlator malfunctions, dish shadowing, incorrectly set sub-band gains, network failures (between stations and the correlator) or data corruption. Such instrumental issues result in visibilities that may have non-physical values for certain times, frequencies, feeds or antennas, or could lead to visibilities with a not-a-number (NaN) value. We will refer to such data as invalid data. In most cases, invalid data can be detected and flagged early in the processing. For example, shadowing can be determined from the target direction and the layout of the array, and missing sub-band data caused by network congestion can be detected by the correlator. In this paper, we consider the detection of such issues outside the context of interference detection. It does, however, make it necessary for the detector to continue to work in the presence of (pre-detected) invalid data, which may affect only specific times, frequencies or some other selection of data. Making the \textsc{aoflagger} algorithm aware of invalid data is one of the changes that was required for Apertif. The \textsc{aoflagger} algorithm was originally designed to work on raw high-resolution single-subband LOFAR data. It rarely happens that such a span of data is partially invalid, and initially \textsc{aoflagger} algorithms therefore do not take invalid data into account. In the case of Apertif, the full bandwidth is offered to \textsc{aoflagger}, and the loss or corruption of a single subband causes therefore gaps in the bandwidth. Being a different instrument, Apertif is also affected by different issues that may not affect LOFAR, such as shadowing. For these reasons, we have extended the \textsc{aoflagger} algorithm to take invalid data into account. This requires changes to the \textsc{sumthreshold} and \textsc{sir-operator} steps of the algorithm, which we will discuss in the next two sections. \subsection{Extension of the \textsc{sumthreshold} algorithm} \begin{figure*} \begin{center} \includegraphics[width=10cm]{images/sumthreshold-input.pdf}\\% \includegraphics[width=5cm]{images/sumthreshold-include-invalid-data.pdf}% \includegraphics[width=5cm]{images/sumthreshold-zero-invalid-data.pdf}% \includegraphics[width=5cm]{images/sumthreshold-exclude-invalid-data.pdf}% \caption{Three methods of handling invalid data in the \textsc{sumthreshold} step. The top image shows the simulated input data, which consists of Gaussian complex noise, spectral line RFI every 10 channels that increases in strength in frequency direction, and a block of invalid data (time indices 50--100), simulating e.g. a temporary correlator failure. The bottom images show a zoom in on the left edge of the invalid data. Flagged data is marked in yellow. Bottom-left: normal \textsc{sumthreshold} without using knowledge of the invalid data; bottom-centre: invalid samples are set to zero before \textsc{sumthreshold}; bottom-right: invalid samples are removed before \textsc{sumthreshold}.} \label{fig:sumthreshold} \end{center} \end{figure*} The \textsc{sumthreshold} algorithm is a combinatorial thresholding method that detects line-like structures in the time-frequency data \citep{offringa-2010-post-correlation-rfi-classification}. This method is effective for the detection of RFI, because most RFI raises the amplitude of consecutive time or frequency samples. The method iteratively thresholds the average over an increasing number of neighbouring samples with a decreasing threshold. With $i$ the zero-indexed iteration number, $M_i$ the number of samples, $\chi_i$ the threshold and $\rho$ a constant normally chosen to be 1.5, \begin{eqnarray} M_i &=& 2^i\\ \chi_i &=& \chi_0 \, \rho^{-\log_2 M_i }. \end{eqnarray} $\chi_0$ is a user parameter that controls the total sensitivity of the method. The various default \textsc{aoflagger} algorithms use values of $\chi_0=$ 6\ldots8.5 $\sigma$. The mode of the noise $\sigma$ is determined from the data that is (at that point in the detection) determined to be RFI free, and is estimated by calculating the truncated mode of the RFI free data, skipping 20\% of the outlier values (the 10\% minimum and maximum values), thereby assuming that the inner 80\% follow a Rayleigh distribution. Assuming that the contribution of the noise is Gaussian distributed in the real and imaginary components of the visibilities, this results in a stable estimate of its standard deviation \citep{fridman-variance-estimates-2008}. A single iteration consists of thresholding all sequences of size $M_i$ in both the time and the frequency direction (unless $M_i=1$), possibly with different thresholds for the two dimensions, to separately control the sensitivity towards spectral line RFI and transient broadband RFI. Typically, a total of 9 of these iterations are performed, giving a maximum size of $M_8=256$. A sample that is flagged in an earlier iteration or direction, is (temporarily) replaced by the mean of the non-flagged samples in the sequence. The following description demonstrates the first three iterations, using $\chi_0=6$ and $\rho=1.5$: \begin{enumerate} \item Flag samples with an absolute value $\ge 6 \sigma$. \item \begin{enumerate} \item Flag every sequence of 2 consecutive samples in time with an absolute average $\ge 4 \sigma$ (because $\chi_2=6\sigma\times1.5^{-\log_2 (2^2)} = 4\sigma$). \item Flag every sequence of 2 consecutive samples in frequency with an absolute average $\ge 4 \sigma$. \end{enumerate} \item Repeat 2.(a) and (b) with 4 samples and a threshold of $\chi_4=6\sigma \times 1.5^{-\log_2 (2^3)} = 2\frac{2}{3}\sigma$. \end{enumerate} Subsequent iterations will threshold sequences of 8, 16, 32, $\ldots$ samples with an average above $\chi_8 \approx 1.8 \sigma$, $\chi_{16} \approx 1.2 \sigma$, etc. In the form described by \citet{offringa-2010-post-correlation-rfi-classification}, pre-existing classification of invalid data is not taken into account in the \textsc{sumthreshold} method. An example of such a case is shown in Fig.~\ref{fig:sumthreshold}, which considers a simulated observation with 200 timesteps and 100 channels. The observation contains spectral-line interference that affects one channel out of every ten channels and increases power at higher frequencies. Timesteps 50---100 are known to be invalid data, and are set to high values by raising them with 10 times the standard deviation. The second row of Fig.~\ref{fig:sumthreshold} zooms in on time indices 30-60. The first image of the second row shows the result of a basic application of \textsc{sumthreshold}. For this result, the knowledge that some data was invalid is not used. As a result, the invalid data is considered to be RFI, and samples before and after the block of invalid data are flagged with an increased sensitivity. As a result, the false-positive rate is clearly increased. A simple approach to mitigate this is to consider invalid values to be zero when applying the \textsc{sumthreshold} method. This results in the plot shown in the middle of the second row of Fig.~\ref{fig:sumthreshold}. This result does not show increased false positives because of the invalid data. With this approach, information about flagged samples on either side (before/after) of the missing data does not (significantly) aid detection, because the invalid data is considered to be zero, and this lowers the average absolute sum in the iterations of the \textsc{sumthreshold} method that consider longer consecutive ranges. This results in a higher false-negative rate than would theoretically be possible if the information on both sides of the invalid data would have been used together. In particular, the faintest interfering line at channel index 5 is no longer detected. While the loss in accuracy is minimal, there is a simple method to aid the detection of interference on one side of the block of invalid data with information from the other block: by completely skipping data in the summed direction (time or frequency). In other words, samples that are directly before and after a block of invalid data are treated as if they are consecutive. The result of this is shown in the third column of Fig.~\ref{fig:sumthreshold}, which indeed shows a lower false-negative rate. In particular, the faintest spectral line at channel 5 is now fully detected. When comparing these two approaches to deal with invalid data, the approach to exclude the invalid data leads to a small increase in false-positive detections when the RFI is not consistently present in time or frequency, i.e. when it is present on one side of the invalid data block and not present on the other side. This should be weighted against the increased sensitivity when the RFI is consistently present. The optimal choice therefore depends on the behaviour of the RFI. Because persistent RFI is common, and because it is more important to avoid false negatives in persistent RFI (which might negatively affect later processing steps) over avoiding false negatives in transient RFI (which would lead to a small loss of data), we use the method of excluding invalid data in our Apertif strategy. We have implemented this in two ways: i) stack all valid data into a temporary storage, run the normal \textsc{sumthreshold} algorithm on these data and reverse the stacking operation on the resulting mask; and ii) skip over the invalid data inside the \textsc{sumthreshold} method. We have timed these two implementations on simulated complex Gaussian data with 10,000 timesteps $\times$ 256 channels. Each run is repeated 100 times. The first implementation runs about $2.5\times$ faster (0.18~s per data set) compared to the second implementation (0.45~s per data set). The first method is still $6\times$ slower compared to the regular algorithm (which takes 0.03~s per data set). This can be explained by the extra copying of data that is required in each iteration (both for the time and for the frequency direction). \subsection{Extension of the \textsc{scale-invariant rank operator}} The SIR-operator is a morphological operation that is used in \textsc{aoflagger} to extend the detected RFI mask in the time and frequency direction. It is an effective step to follow threshold-based methods to detect faint RFI based on the morphology of detected flags \citep{offringa-2012-scale-invariant-rank-operator, vdgronde-siroperator-2016}. It is scale invariant, which implies that the fractional increase in flags in one dimension is constant, i.e., independent of the scale of that feature in that dimension. The SIR-operator is essentially a one-dimensional operator that can be applied to a sequence of flag values. To apply it to radio interferometric data, \citet{offringa-2012-scale-invariant-rank-operator} apply the operator in both the time and frequency dimensions: in time it is separately applied to all the channels, and in frequency it is applied separately to all timesteps. The union of these to steps is taken as the result. Assume that $X$ is a single sequence of flag values, such that $X[i]$ holds a Boolean value that represents the state of the flag. The output $\rho(X)$ of the SIR-operator applied to $X$, is defined as the union of all subsequences of the input $X$, for which \begin{equation} \label{eq:sir-operator-eq} \#^{i:j}_{\mathcal{F}} \ge (1 - \eta) \left( j - i \right). \end{equation} Here, $\#_{\mathcal{F}}^{i:j}$ is brief for $\#_{\mathcal{F}}(X[i : j])$, which is the count-operator that returns the number of flagged samples in a sequence. $X[i : j]$ is the subsequence of samples consisting of all elements $X[k]$ for $i \le k < j$ and $\eta \in [0 \ldots 1]$ is a tunable parameter that sets the aggressiveness of the operator. Eq.~\eqref{eq:sir-operator-eq} implies that a sequence of flags caused by invalid data is extended on both sides by a ratio of $\eta$. An example of this is given in the centre-left panel of Fig.~\ref{fig:sir-operator-gaus}. This behaviour is undesirable because, unlike most RFI signals, invalid data typically has a sharp boundary and should be flagged like that. The extension of invalid data causes a high number of false positives. \begin{figure*} \begin{center} \includegraphics[width=8cm]{images/siroperator-gaus-input.pdf}\\% \includegraphics[width=8cm]{images/siroperator-gaus-include-invalid-data.pdf}% \includegraphics[width=8cm]{images/siroperator-gaus-unflag-invalid-data.pdf}\\% \includegraphics[width=8cm]{images/siroperator-gaus-exclude-invalid-data.pdf}% \includegraphics[width=8cm]{images/siroperator-gaus-penalize-invalid-data.pdf}% \caption{Different ways of handling invalid data in the \textsc{sir-operator} step on a simulated data set with a Gaussian burst of interference in a few channels. Purple marks invalid data, yellow is detected as interference. The SIR-operator operates on the flag mask, hence the visibility values are not used. Top: input data. Centre-left: Invalid data is counted as flagged data. Centre-right: Invalid data is counted as unflagged data. Bottom-left: Invalid data is removed before applying the SIR-operator. Bottom-right: Invalid data is penalized with $\rho=0.1$.} \label{fig:sir-operator-gaus} \end{center} \end{figure*} A simple solution is to count invalid data as unflagged data in the SIR operator. This implies that Eq.~\eqref{eq:sir-operator-eq} is modified so that the count operator only counts the number of flags corresponding to valid data: \begin{equation} \label{eq:sir-operator-unflag-invalid} \#^{i:j}_\mathcal{FV} \ge (1 - \eta) \left( j - i \right), \end{equation} where $\#_\mathcal{FV}$ is the number of valid samples that are flagged in the interval $X[i:j]$ (as opposed to $\#_\mathcal{F}$, which counts flagged values that can both be valid or invalid). Because the right side is unchanged and the left side remains equal or is decreased compared to Eq.~\eqref{eq:sir-operator-eq}, this modification always flags an equal or fewer amount of samples. An application of this approach is demonstrated in the centre-right panel of Fig.~\ref{fig:sir-operator-gaus}. This approach remedies the extending of flags around invalid data. The downside of the approach of Eq.~\eqref{eq:sir-operator-invalid-skipped} is that a continuous transmitter is assumed not to be present in the invalid data range, causing flags on either side to have a decreased probability of getting flagged. For example, in case a correlator fails for a minute during which a transmitter remains present in one channel with decreasing power, the transmitter is less likely to be flagged after the correlator failure. To address this, we further modify Eq.~\eqref{eq:sir-operator-eq} to: \begin{equation}\label{eq:sir-operator-invalid-skipped} \#_\mathcal{F}^{i:j} \ge (1 - \eta) \, \#_\mathcal{V}^{i:j}, \end{equation} where $\#_\mathcal{V}^{i:j}$ is the number of valid (flagged or unflagged) samples in interval $X[i:j]$. This approach is effectively the same as removing the invalid samples from the sequence before applying Eq.~\eqref{eq:sir-operator-eq}. Therefore, a transmitter that gets interrupted by invalid data receives a higher probability to get flagged. An example of this approach is given in the bottom-left panel of Fig.~\ref{fig:sir-operator-gaus}. Invalid samples are skipped in this approach, and flagged samples on one side of a sequence of invalid samples may increase the probability of samples on the other side of the sequence, irregardless of the size of the invalid sample sequence. The approach of Eq.~\eqref{eq:sir-operator-invalid-skipped} can overstep its goal of using information from before and after a sequence of invalid data, in particular in the case of very long sequences of invalid samples. For example, when considering a transmitter that is active for one minute before the receiving antenna is shadowed for 6 hours (causing invalid data), it is undesirable that samples after shadowing receive higher detection probability because of what happened 6 hours ago. A final modification to the SIR operator we consider is therefore to introduce a penalty parameter $\rho$ that can balance between Eqs.~\eqref{eq:sir-operator-unflag-invalid} and \eqref{eq:sir-operator-invalid-skipped}: \begin{equation}\label{eq:sir-operator-penalty} \#_\mathcal{F}^{i:j} \ge (1 - \eta) \left((j-i)\rho + \, \#_\mathcal{V}^{i:j} (1-\rho) \right). \end{equation} With $\rho=0$, invalid samples are skipped, making the method equal to Eq.~\eqref{eq:sir-operator-invalid-skipped} and with $\rho=1$, invalid samples are counted as unflagged samples, making the method equal to Eq.~\eqref{eq:sir-operator-unflag-invalid}. A value of $\rho=0.2$ implies that five invalid samples count as one unflagged sample, thereby lowering the probability of flagging through a block of invalid data, but still transferring some of the flag information from before to after the invalid data and vice versa. This method is demonstrated with a setting of $\rho=0.1$ in the bottom-right panel of Fig.~\ref{fig:sir-operator-gaus}. Considering the results of all approaches in Fig.~\ref{fig:sir-operator-gaus}, it is clearly undesirable to generally extend invalid data using the traditional SIR-operator defined in Eq.~\ref{eq:sir-operator-eq}. Any of the three different variations of the algorithm (Eqs.~\ref{eq:sir-operator-unflag-invalid}, \ref{eq:sir-operator-invalid-skipped} and \ref{eq:sir-operator-penalty}), which can be described by choosing different $\rho$-values in Eq.~\eqref{eq:sir-operator-penalty}, solve this issue. The different values of $\rho$ do not cause significant changes. We have tested values of $\rho$ on a few observations, some with artificially added invalid data, and visually compared the flagging results. Based on these results and the arguments given earlier about finding a balance between Eqs.~\eqref{eq:sir-operator-unflag-invalid} and \eqref{eq:sir-operator-invalid-skipped}, we use $\rho=0.1$. Introducing the parameter for invalid-data weighting $\rho$ has no significant effect on the speed of the algorithm. The original algorithm can be implemented with a computational complexity of $\mathcal{O}(N)$ \citep{offringa-2012-scale-invariant-rank-operator}, and the same holds for the algorithm that includes the invalid-data penalty parameter. \begin{figure*} \begin{center} \includegraphics[width=8cm]{images/bandpass-before-correction.pdf}% \includegraphics[width=8cm]{images/bandpass-flagged-before-correction.pdf}\\% \includegraphics[width=8cm]{images/bandpass-after-correction.pdf}% \includegraphics[width=8cm]{images/bandpass-flagged-after-correction.pdf}% \caption{Static sub-band band-pass correction before flagging with the Apertif flagging strategy. Top-left: input before correction; top-right: flagged without correction; bottom-left: input after correction; bottom-right: flagged with correction.} \label{fig:bandpass} \end{center} \end{figure*} \subsection{High-pass filtering} \label{sec:high-pass-filter} The high-pass filter that is applied to remove astronomical source contribution before thresholding is, for computational reasons, implemented as a Gaussian low-pass filter followed by subtracting the difference between the input and the low-pass filtered result. The high frequency resolution of Apertif makes it necessary to use a large filtering kernel in the frequency direction. Effectively, a kernel with a Gaussian sigma of 875 channels and 2.5 timesteps is used. Before filtering, the data is averaged in the frequency direction by a factor of 175, and after low-pass filtering, the result is upscaled to the original resolution using nearest neighbour resampling. This allows a convolution with a much smaller kernel, improving the speed of this operation. The result is an approximate of a Gaussian high-pass filter, but for the purpose of removing the sky signal, this is sufficiently accurate. \subsection{Bandpass correction} \label{sec:bandpass} In the Apercal Apertif processing pipeline, the entire bandwidth of Apertif is used at once during RFI detection. This is different from the original LOFAR strategy, that flagged small (200~KHz) subbands independently. Using the entire bandwidth has the benefit that broadband RFI that covers several sub-bands can be detected. This is relevant for Apertif observations, which are affected by broadband transmitting satellites and radar. Because the bandwidth of Apertif is subdivided into sub-bands using a poly-phase filter bank, the band shape of the poly-phase filter is imprinted on the data. An example of this is shown in the top-left panel of Fig.~\ref{fig:bandpass}. This is corrected for during calibration, but during flagging (which needs to be done before calibration) the shape is still present. Performing detection using the entire bandwidth but without correcting for the poly-phase filter bank causes sub-band edge channels to be flagged, because the edges cause sharp transitions that trigger the detector. Moreover, the deviations in the data caused by the band-edges decrease the sensitivity of the detection toward actual RFI. The top-right panel of Fig.~\ref{fig:bandpass} shows an example of flagging without bandpass correction. To remedy this, we implement a sub-band band-pass correction step in the detector. This step corrects the poly-phase filter shape using a static, observation-independent correction. We determine the shape by performing gain-calibration on a clean region of the band, and average the solutions over the subbands. The bottom-left panel of Fig.~\ref{fig:bandpass} shows the resulting corrected data set, and the bottom-right panel of Fig.~\ref{fig:bandpass} shows the result of flagging the bandpass. As can be seen, the band-pass correction has decreased the number of false detections considerably. Some edge channels are still flagged, even after correction. This is caused by aliasing in the sub-band edge channels, which change the statistics of those edge channels slightly. This can lead to artefacts which are very similar to RFI, hence they are occasionally flagged. This flagging is normally of limited concern, because those sub-band edge channels that are flagged are of lower quality. Because of this, they are often discarded during imaging. \begin{figure} \begin{center} \includegraphics[width=9cm]{images/autocor-input.pdf}\\\includegraphics[width=9cm]{images/autocor-residual.pdf}\\\includegraphics[width=9cm]{images/autocor-flagged}\\% \caption{Flagging of auto-correlations. Top image: input after sub-band band-pass correction; centre image: same after iterative high-pass filtering and with 10x more sensitive colour scale; bottom image: after flagging with the auto-correlation specific strategy. Because auto-correlations have different properties compared to cross-correlations, they require a specialized flagging strategy.} \label{fig:autocors} \end{center} \end{figure} \subsection{Flagging of auto-correlations} Given the output voltage of the two feeds of the same antenna, $\mathbf{e} = \left( e_x, e_y \right)$, auto-correlated visibilities are formed by taking the product $\mathbf{e}^H\mathbf{e}$ (i.e., the outer product $\mathbf{e}\otimes\mathbf{e}$) and integrating, resulting in \texttt{XX}, \texttt{XY}, \texttt{YX} and \texttt{YY} visibilities. While auto-correlations are not often used for scientific data products, they are useful for system monitoring and quantifying the system noise. For such analyses, it is desirable to flag RFI. Compared to cross-correlated visibilities, auto-correlated visibilities have different properties: in the \texttt{XX} and \texttt{YY} correlations, system noise and RFI will not decorrelate, and auto-correlated visibilities are sensitive to the global sky signal instead of fluctuations in the sky signal. An example of auto-correlated dynamic spectrum from Apertif is shown in the top image of Fig.~\ref{fig:autocors} (after sub-band band-pass correction as described in \S\ref{sec:bandpass}). Compared to cross-correlations such as shown in Fig.~\ref{fig:bandpass}, the dynamic spectrum of auto-correlated visibilities appears much smoother, is systematically offset from zero and contains stronger structure in the frequency direction. The flagging strategy that was optimized for the cross-correlations detects RFI by comparing high-passed filtered amplitudes of visibilities to the variance of these amplitudes. Because the amplitude variance is much lower compared to cross-correlations, this results in flagging auto-correlations with increased sensitivity. At the same time, the auto-correlations contain stronger instrumental frequency-structure. These two effects combined causes the cross-correlation flagging strategy to flag all of the visibilities of the auto-correlations of Fig.~\ref{fig:autocors}. To solve this, we use a different flagging configuration for the auto-correlations. The difference with the cross-correlation strategy is as follows: \begin{itemize} \item[-] The time-direction \textsc{sumthreshold} step (sensitive to consistently high values in the time direction, e.g. band-pass structure) is reduced in sensitivity by a factor of 6. \item[-] The frequency-direction \textsc{sumthreshold} step (sensitive to consistently high values in the frequency direction, e.g. broad-band RFI) is reduced in sensitivity by a factor of 2. \item[-] The size of the high-pass filter kernel is reduced by 3.5 in the frequency direction, to filter out more of the spectral gain fluctuations of the instrument. \item[-] The number of iterations is increased from 3 to 5. This increases the required computations but improves robustness in the presence of a large dynamic range, as is the case for auto-correlations. \item[-] Only the \texttt{XX}, \texttt{XY} and \texttt{YY} correlations are used for detection, to reduce unnecessary computations. \texttt{YX} correlations are equal to the conjugated \texttt{XY} correlations, and using these for flagging does not provide additional information. \end{itemize} A result of this auto-correlations strategy is shown in the bottom image of Fig.~\ref{fig:autocors}. Visual inspection shows that all visible RFI is indeed detected, and the number of false detections appears low. Because we do not have a ground truth, we do not try to quantify these results. Similar to the cross-correlation strategy, the auto-correlation strategy flags parts of the sub-band edges. The centre image of Fig.~\ref{fig:autocors} shows the high-pass filtered data of the final iteration. \begin{figure*} \begin{center} \includegraphics[width=9cm]{images/hi-signal-input.pdf}\hspace*{3mm}\includegraphics[width=9cm]{images/hi-signal-hi-flagged.pdf}\\ \includegraphics[width=9cm]{images/hi-signal-quv-flagged.pdf}\hspace*{3mm}\includegraphics[width=9cm]{images/hi-signal-flagged.pdf}\\% \caption{Band-pass corrected M31 data from WSRT RT9 $\times$ RTA with a strong HI signal. Top-left image: input data. The bright emission around 1420~MHz is from HI and should not be flagged. The vertical lines are instrument or RFI artefacts that should be flagged. Top-right image: after RFI detection without HI modifications, showing in pink what is flagged. Bottom-left image: after RFI detection using Stokes Q, U and V. Bottom-right image: after RFI detection using a specialized strategy for 1418-1424 MHz.} \label{fig:hi-signal} \end{center} \end{figure*} \subsection{Avoiding HI removal} \label{sec:avoid-hi} In observations that cover bright nearby galaxies or the Galactic plane, the 1420~MHz HI line may be detectable in the visibilities from a single cross-correlated baseline. For example, the top-left image of Fig.~\ref{fig:hi-signal} shows one baseline from a M31 observation, which clearly shows a contribution from HI-emission around 1420~MHz. This poses a challenge for RFI detection, because such a fine, spectrally-consistent signal is quite similar to RFI. As shown in the top-right image of Fig.~\ref{fig:hi-signal}, when standard flagging is performed on these data, the HI emission is detected as RFI. We analyze different ways to mitigate this. In the Netherlands, frequencies between 1400-1427 MHz are reserved for radio astronomy and other forms of passive research\footnote{The Dutch spectrum allocations can be found at \url{https://www.agentschaptelecom.nl/}}, and transmitting inside this band is not allowed. As a result, these frequencies are almost free of man-made emission. A simple mitigation strategy is therefore to disable RFI detection inside this band. Unfortunately, the recorded visibilities do occasionally contain strong, non-astronomical values inside this band. The three vertical lines in the images of Fig.~\ref{fig:hi-signal} are an example of such an observation. Most frequently, these are caused by saturation of a receiver, causing a broadband-like signal in the recorded visibilities, although they might occasionally be caused by RFI emitted at these frequencies (e.g. from a sparking device or lightning). Leaving these broadband contaminants in the data causes degradation of the images. In particular, they cause visible stripes in continuum, full bandwidth images. Another approach is to flag only based on Stokes Q, U and V. Man-made RFI is often polarized, whereas the sky emission in these polarizations is generally much fainter. The result of this approach is shown in the bottom-left image of Fig.~\ref{fig:hi-signal}. While a part of the HI emission has been left intact, it is still bright enough in these polarizations to get detected. This is even the case when flagging on only one of these polarizations: the HI emission is present in all of the polarizations. Moreover, we occasionally observe RFI that is only visible in Stokes I, and removing any of the polarizations decreases the effectiveness of RFI detection. In Fig.~\ref{fig:hi-signal}, the transmitter around 1425 MHz / 0:00 UTC is for example not as well detected in this approach compared to standard flagging. Because none of these approaches give good results, we consider another approach, and run the flagger twice: in run A) we flag the data with the normal detection strategy, and in run B) we run the detection with a strategy that is insensitive to spectral lines. For frequencies outside the HI range we use the flags from run A), and inside the HI range (1418--1424 MHz) we use B). The result of this approach is shown in the bottom-right image of Fig.~\ref{fig:hi-signal}. With this approach, broadband structures have been detected as RFI and HI emission is left in the data. To avoid flagging spectral lines in run B), we adjust the following flagging settings during this run): \begin{itemize} \item[-] The high-pass filter in frequency direction is set to have a kernel size of one channel, to filter out fluctuations in frequency. \item[-] The sensitivity of the time-direction sumthreshold step is decreased by a factor of 4, to reduce flagging of line-like structures. \item[-] The sensitivity of the frequency-direction sumthreshold step is decreased by a factor of 2. This reduces flagging of temporal fringes in HI emission. \item[-] The number of iterations is increased to remain robust in the presence of strong HI emission. \end{itemize} On overall, the resulting strategy is almost entirely insensitive to spectral-line-like structures. The sensitivity to broadband structures will also be reduced because of these changes, but given that this strategy remains sensitive to faint broadband structures such as shown in Fig.~\ref{fig:hi-signal}, we consider this tolerable. Because run B) requires only a small part of the full bandwidth, the second flagging run is relatively fast, hence the increase in computations caused by this is modest (about 20\%). \subsection{Reading overhead and memory considerations} During the AOFlagger stage of the \textsc{apercal} pipeline, observations are stored in the Casacore Measurement Set format. In this format, the data of an observation is lexicographically sorted in time, and then in baseline and frequency. While this ordering is suitable for calibration, flagging requires the data baseline by baseline. Unfortunately, the data for a single baseline is spread throughout the file. Therefore, reading a baseline requires reading the file from beginning to end. Because of the block size and caching of storage media, it is inefficient to read the baselines one by one with this approach. AOFlagger supports three methods for accessing the data: \begin{itemize} \item [-] Direct reading. In this mode, the data is directly read from the measurement set just before they are needed. Because multiple baselines are processed in parallel using multi-threading, a few baselines are read from the measurement set at once. This mode results in scanning through the input data multiple times, which is computationally costly. \item [-] Reorder before processing. In this mode, the whole measurement set is reordered by baseline, frequency and then time and rewritten to disk in a binary, internal format before processing is started. This results in reading the data only twice and is generally faster than the direct reading mode, but requires disk space to store the copy of the data. \item [-] In-memory data. In this mode, the whole measurement set is read into memory before starting processing. This results in reading the data only once and is generally the fastest mode, but requires a considerable amount of memory. \end{itemize} Apertif data sets are large and expensive to read: reading the data more than once is undesirable. As a result, the only acceptable reading mode is the in-memory mode. In the particular computing mode where Apercal runs, the amount of memory required by this mode is a considerable constraint, and requires a dedicated node for each flagging operation performed. Other observatories have solved this issue by integrating \textsc{aoflagger} into a multi-step preprocessing pipeline that stream through the data, split the data in time for flagging and hand these data over part by part to AOFlagger via its application programming interface. Examples of such pipelines are \textsc{cotter} \citep{offringa-2015-mwa-rfi} and \textsc{DP3} \citep{vandiepen-dp3}, which are preprocessing pipelines for the Murchison Widefield Array and the Low-Frequency Array, respectively. In this approach, several tasks (e.g. conversion, phase rotation, flagging, averaging, compression) can be applied with a single read through the data, thereby reducing the read overhead. In the case of Apertif, such a streaming pipeline does not exist. Instead, aoflagger runs as a stand-alone tool inside Apercal. To solve the memory and reading issue for Apertif, we implemented a time-chunking approach into aoflagger. In this mode, aoflagger reads small chunks in time and flags these independently. This makes it possible to use the memory reading mode, because the data for individual chunks is small enough to fit in memory. It does imply that the algorithm has less information available to do its RFI detection. Therefore, it is important to let time chunks still have a significant size, because AOFlagger would otherwise not be able to find faint RFI, that is persistent in time, but not detectable in a small chunk. For Apertif, we use a chunk size corresponding to about half an hour of data. \subsection{Use of Lua} Before AOFlagger version 3, AOFlagger strategies were written in the extensible markup language (XML). An XML file specifies a sequence of steps and is interpreted by AOFlagger, and this sequence is executed separately for the data from every baseline. The sequences run multi-threaded, and reading and writing of data is done outside of the strategy. Examples of XML steps are to calculate visibility amplitudes; running \textsc{sumthreshold} or \textsc{sir} operations on the data; or to combine the flags of all polarizations. Over the years, the use of AOFlagger extended to more and more use-cases: different telescopes, flagging after calibration, high-resolution flagging, etc. It became desirable to make the strategies more flexible. In particularly, it became desirable to support standard scripting structures such as loops, conditionals, variables and to provide standardized documentation of the steps. The idea was therefore formed to embed a standard interpreter into AOFlagger and provide a function interface for each step. The data-intensive computations are still performed by high-performance precompiled C++ code, while these are glued together using an interpreted script, thereby combining flexibility with high performance. Our first approach was to embed it into Python, because of its popularity in astronomical data science. After having implemented a prototype that embeds the Python interpreter into AOFlagger, it turns out some of the features of the Python interpreter conflict with how AOFlagger runs these scripts. Particular challenges were to deal with the global interpret lock; memory management; and fast restarts of the interpreter. While there are various ways to work around these issues, the design goals of the Python language and interpreters do not focus specifically to make the language embeddable. Lua\footnote{https://www.lua.org/} is a scripting language that is widely used for embedding scripts in applications, notably in computer games to implement scripted game sequences. This scenario is close to the AOFlagger use-case: the interpreter is integrated into such games, called many times and supports multi-threaded script execution. Algorithmic code that requires high performance can be implemented in compiled languages (C++ in the AOFlagger case). With this idea in mind, we decided to integrate the Lua interpreter into AOFlagger and implement all steps as Lua functions. The use of a full scripting language has increased the possibilities inside the flagging strategies considerably. For example, it is now possible to adapt the strategy based on properties such as the baseline length, frequency, auto- or cross-correlation, etc. A consequence of the new interface is that existing strategies need to be rewritten, which can not be done automatically. All default strategies have been rewritten to use Lua, which currently includes specialized scripts for 11 observatories (Aartfaac, APERTIF, Arecibo, ATCA, Bighorns, JVLA, MWA, WSRT, LOFAR, NenuFAR). These have all been verified to produce the same result as the old XML-based strategies. Because the new function interface gives better control over what steps need to be run, the speed of the new strategies is slightly higher (several percent). We do not notice any significant overhead from using Lua: the computational time is dominated by the computations inside the function calls. \section{Results} \label{sec:results} Apertif observations are processed by the automated Apercal pipeline. This pipeline includes the flagging strategy as described in Sec.~\ref{sec:method}. In this section, we present results of the full flagging step on Apertif observations. The data that we look at has been recorded between 2019 and 2022. Science products from the first year of observing have been described in the first Apertif data release \citep{adams-2022, kutkin-2022}. \subsection{RFI detection examples} The detection strategy described in Sec.~\ref{sec:method} runs fully automated, and does not require further flagging before calibration and continuum imaging. In general, manual inspection of data after RFI detection shows no residual RFI and few false positives. Fig.~\ref{fig:full-example-quiet} shows the $1280$--$1430$~MHz range of a typical observation. The top plot shows the data before RFI detection, and the bottom plot shows in white what has been detected as RFI. Fig.~\ref{fig:full-example-loud} shows a challenging case with wider bandwidth, with a moderate amount of RFI, missing data (1200--1220~MHz) and strong fringes. Top and bottom plots show again before and after detection. This also demonstrates the challenging situation for radio astronomical science between 1150 and 1300~MHz. For continuum imaging, it is often useful (or at least pragmatic) to take out any visibility that appears to have a contribution from RFI. For spectral imaging, a flagging result such as shown in Fig.~\ref{fig:full-example-loud} is problematic, because many channels are fully removed. In those cases, it is possible to reduce the sensitivity of the RFI detection. The sensitivity is specified as a variable in the script. For the detection result shown in Fig.~\ref{fig:full-example-less-sensitive}, the sensitivity was decreased by a factor of 3. Compared with the result in Fig.~\ref{fig:full-example-loud}, this reduced the flagging from 49\% to 33\%. This takes out the strongest RFI, but leaves weak (but visible) RFI in the data. Decreasing the sensitivity further continues to trade the availability of visibilities with a lower quality of those visibility. \subsection{RFI characteristics and long-term statistics} During the flagging step, statistics are collected that summarize the (detected) RFI occupancy and data quality. We have collected these statistics for 304 of the currently processed observations. Averaged over all these observations and the full bandwidth, the total detected RFI occupancy is 11.1\% in the cross-correlated baselines and 14.6\% in auto-correlated baselines. Fig.~\ref{fig:rfi-percentage-spectra} shows the detected spectral RFI occupancy for each observation, as well as the occupancy averaged over all observations. Only cross-correlated data is included. At most frequencies, the average loss of data due to RFI is about 10\%, but with a spread of approximately 0-15\% between observations, and a few larger outliers. Frequencies between 1400 and 1427 MHz are reserved for radio astronomy. At these frequencies, the average RFI occupancy is slightly lower (approximately 8\%), but is evidently still affected by instrumental effects (such as receiver saturation) or natural and unintended RFI (such as lightning). Fig.~\ref{fig:hi-signal} shows data that is affected by such broadband artefacts. It is likely that the $\sim$10\% base-level of occupancy is caused by such artefacts. Some observations show a small excess RFI occupancy at 1420~MHz. This is caused by HI that is detected as RFI. The methods to avoid flagging HI that are described in \S\ref{sec:avoid-hi} were implemented only halfway 2021. Some of the observations that are flagged before that still show false-positive detections at HI frequencies, but all observations after avoiding HI was implemented show indeed no HI flagging. The same base level of 10\% is not visible at frequencies above 1430~MHz. The reason for this difference is that only a relative small number of observations cover frequencies above 1430~MHz. Frequencies between 1427 and 1492~MHz are allocated to various services, including mobile communication and fixed transmissions\footnote{See \url{https://www.agentschaptelecom.nl/}}. Some of these are satellite based. In 2020, the 1452---1492~MHz band was auctioned in the Netherlands and thereafter allocated for the use of 5G mobile phone downlink. As shown in Fig.~\ref{fig:rfi-percentage-spectra}, the use of data above 1430 MHz is limited. Some channels between 1300--1400~MHz contain a few outlier RFI occupancies. These are caused by a nearby radar station that is occasionally turned on. Frequencies between 1130 and 1300\,MHz are predominantly affected by RFI from Global Navigation Satellite Systems (GNSS), such as the US GPS, Russian GLONASS, Chinese BeiDou, and European Galileo satellite constellations. All these constellations use satellites in orbits at $\sim$$2000$\,km and with high orbital inclinations ($i=54$--$65\degr$) to provide global coverage. Frequencies for wide band transmissions are assigned to, and shared between, these systems at 1176.45, 1191.795, 1207.14, 1227.6, 1278.75\,MHz (for GPS, BeiDou, Galileo) and 1202.025 and 1242.9375--1251.6875\,MHz (for GLONASS). Wide band signals are detected at these frequencies throughout the entire observation of Fig.~\ref{fig:full-example-loud} covering the band down to 1130\,MHz. Using orbital ephemerides of these satellite constellations, we find that the strong temporal RFI observed in Fig.~\ref{fig:full-example-loud} at 13:06, 14:46, 16:29, 18:13 and 19:54UTC is caused by BeiDou satellites passing within $5\degr$ from the pointing of the APERTIF compound beam. The pass of 18:13UTC had a minimum separation of $0\fdg31$ and led to saturation of the receiver, affecting the entire observing band. Two GPS satellites passed at $1\fdg47$ and $2\fdg30$ separation from the beam pointing at 22:02 and 23:02UTC, and one Galileo satellite at $3\fdg72$ at 22:59UTC, and coincident increases of the RFI levels are observed, but not as strong as with the passes of BeiDou satellites. The GNSS signals observed away from these passes near the primary APERTIF beam are likely due to far sidelobes or multi-path reflections of GNSS signals from the WSRT focus structure or other nearby structures directly into the receiver. \begin{figure*}[hbtp] \begin{center} \includegraphics[width=18cm]{images/full-example-150MHz-input.pdf}\\% \includegraphics[width=18cm]{images/full-example-150MHz-result.pdf}% \caption{Typical flagging result for a single baseline in a wideband observation. The top panel shows the input visibilities, and the bottom panel shows the visibilities overlaid with the detection result in white. These plots show the Stokes I visibilities. Some interference features are only visible in Stokes Q, U or V, such as the vertical features around midnight. All interference features have successfully been detected, and no obvious undesirable detections are visible, with the exception of horizontal flagged features every 200~kHz, caused by the sub-band bandpass (see Fig.~\ref{fig:bandpass}). 18\% of the data gets flagged for the baseline in this observation.} \label{fig:full-example-quiet} \end{center} \end{figure*} \begin{figure*}[hbtp] \begin{center} \includegraphics[width=18cm]{images/full-example-input.pdf}\\% \includegraphics[width=18cm]{images/full-example-result.pdf}% \caption{Detection result for a full 300-MHz bandwidth observation.} \label{fig:full-example-loud} \end{center} \end{figure*} \begin{figure*}[hbtp] \begin{center} \includegraphics[width=18cm]{images/full-example-less-sensitive.pdf}\\% \caption{Same as Fig.~\ref{fig:full-example-loud}, but flagged with 3$\times$ lower sensitivity.} \label{fig:full-example-less-sensitive} \end{center} \end{figure*} \begin{figure*}[h] \begin{center} \includegraphics[width=14cm]{images/rfipercentage-spectra.pdf}% \caption{Percentage of RFI over frequency detected in 304 Apertif observations, excluding auto-correlations.} \label{fig:rfi-percentage-spectra} \end{center} \end{figure*} \subsection{Computational requirements} \label{sec:speed} In this section we summarize the computational requirements of the Apertif RFI detection strategy, with the aim of making it possible to approximate the computational requirements for other telescopes when a similar flagging strategy is used. Since the total throughput is depending on many complex factors of the computing platform (e.g. clock speed, cores, memory bandwidth, instruction set, vectorization), we aim at giving a first-order estimate only. We measure the performance of flagging a set with visibilities from a single observation. We use an Apertif observation with 1346 timesteps, 24572 channels and 4 polarizations, for a total of 132M visibilities. This makes the visibility data, which consists of 4-byte single-precision real and imaginary values, 1.1~GB in size. We perform our test on a desktop machine with an AMD Ryzen 7 2700X 8-Core processor and 64 GB of memory. This processor can perform hyper-threading, and thus we run 16 detections in parallel. We load the data in memory before detection and do not store the results, to avoid any disk access. Averaged over 10 runs, it takes 46 seconds to run 16 detections, which amounts to a throughput of 370 MB/s (or 46M visibilities/second). At the time of writing, a typical fast spinning disk achieves a sustained reading throughput of a few hundred MB/s. Hence, disk access can be a significant cost of a stand-alone RFI detection step. This can be problematic for supercomputers, because they have high computing power, but not a high I/O throughput. \subsection{Comparison against a machine learning approach} Some studies have found that machine learning can improve the accuracy of RFI detection. In \citet{nn-rfi-detection-2020}, the authors test their own \textsc{sumthreshold} implementation against a machine learning approach, using a ground truth flag mask that is manually determined by an engineer. Such a ground truth mask is difficult to make in general, including for Apertif data, where broadband RFI tapers off and it is unclear from which points samples are truly unaffected by RFI. We can however conclude that, after our pipeline, all visibly affected samples have been identified. Moreover, imaging results have achieved the thermal noise of the instrument, thereby indicating that the accuracy of interference detection is not a limitation. This conflicts somewhat with the conclusions made by \citet{nn-rfi-detection-2020}. The \textsc{sumthreshold} implementation that is used there to compare their results with, does not achieve the published accuracy of \textsc{aoflagger}, because residual interference is visually present. Potential explanations for these differences could be i) that \citeauthor{nn-rfi-detection-2020} train their network for a specific scenario but did not optimize their \textsc{sumthreshold} approach; or ii) that they do not use a full (i.e. \textsc{aoflagger}-like) \textsc{sumthreshold}-based pipeline that includes the \textsc{sir} operation and that is similarly optimized for their instrument. An important consideration is that morphological operations are aimed at detecting RFI that is below the noise, therefore invisible to scientists that manually classify RFI. In the comparisons done in \citealt{nn-rfi-detection-2020}, samples detected by the morphological operator would all be counted as false positives, whereas this operator has been shown to improve the final science results \citep{offringa-2012-scale-invariant-rank-operator}. It can therefore not yet be stated that, based on accuracy, machine learning methods are outperforming traditional based methods. Rather, it is clear that both methods are competitive and are accurate enough to largely mitigate the problem of interference in radio data. There are differences in the computational performance though. In \citet{xiao-2022}, machine learning methods flag a one-hour FAST observation of 67 GB in 61\% of the observing time using 8 computing nodes \citep{xiao-2022}. This amounts to a single-node computational performance of 14 GB/hour. On the other hand, the single-node performance of the \textsc{aoflagger} approach listed in \S\ref{sec:speed} is 370 MB/s, or 1.3 TB/hour, and \textsc{aoflagger} is therefore almost two orders of magnitude faster. While the performance of the computing nodes used for the computational performance analyses may differ somewhat, and it is therefore not a direct comparison, it is evident that the \textsc{aoflagger} approach is significantly faster. In \citet{sun-2022}, authors compare the run-time of \textsc{aoflagger} to their convolutional neural network (CNN) approach and find that \textsc{aoflagger} is two to four times faster. However, the authors measured the total run-time of the aoflagger executable, which would include disk access, start-up overhead and time spent in the \textsc{casacore} library to transfer the measurement set data. Because the flagging speed is near the disk access speed, this overhead can be substantial. A better benchmark is possible by using the C++ or Python API of \textsc{aoflagger} directly. On their \texttt{Sim\_RFI-1} dataset, they reach an \textsc{aoflagger} speed of 250 GB/hour, while in this work, with a more advanced strategy, we reach 1.3 TB/hour on similar hardware. Their CNN method reaches a speed of 145 GB/hour, which is an order of magnitude faster than what is reached by \citet{xiao-2022}, but is an order of magnitude below what we reach with our \textsc{aoflagger} approach. \section{Discussion \& conclusions} \label{sec:discussion-conclusions} We have described and demonstrated an automated RFI detection strategy aimed at flagging Apertif data. Our detection strategy implements novel \textsc{sumthreshold} and \textsc{sir}-operator algorithms that take prior information about invalid data into account. It also avoids the flagging of HI emission, works on auto-correlations, corrects the sub-band band-pass and contains some further parameter optimizations for Apertif. The change from the AOFlagger \texttt{XML} strategies towards fully scripted strategies provides flexibility that made these changes quite easy to implement and supports flexibility during experimentation. Besides making the process easier and faster, an automated RFI detection strategy also makes the results reproducible, compared to when RFI is flagged manually, and it allows reducing the data size by averaging early on in the data reduction processing. We expect that our RFI detection strategy will work for data from other instruments, in particular those with a frequency coverage comparable to Apertif, such as MeerKAT, ASKAP, JVLA and future SKA-mid observations around 1.0 -- 1.5 GHz. Different bands might require some changes to the strategy parameters, but should be able to reuse a large part of the approach. While machine learning techniques may compete with the accuracy of AOFlagger, they do not compete with its speed. Moreover, we have shown it is possible to add new features to AOFlagger, such as avoiding the 21-cm HI signal, accurate detection in the presence of invalid data and flagging of auto-correlations. None of the current available machine learning techniques support these scenarios. Most parameters, such as the sensitivity towards broadband and line RFI, or the expected smoothness of the data, are intuitive and easy to tweak for science cases that e.g. require that transients do not get flagged, or that require a difference balance between taking out all visible RFI on one hand, and keeping as much data available for further processing on the other hand. This will be challenging, if at all possible, to implement in a machine learning framework. In this work, we have not made use of the multi-beaming capabilities of Apertif: beam are flagged independently. While some first-order testing indicates that using data integrated over all beams does not improve flagging accuracy, it can be expected that RFI does correlate somewhat over beams. A strategy where the integrated data is searched for RFI, and where this is used as additional input for the flagging of individual beams, might be effective for detecting RFI that is below the noise for a single beam. \begin{acknowledgements} This work makes use of data from the Apertif system installed at the Westerbork Synthesis Radio Telescope owned by ASTRON. ASTRON, the Netherlands Institute for Radio Astronomy, is an institute of the Dutch Research Council (de Nederlandse Organisatie voor Wetenschappelijk Onderzoek, NWO). BA acknowledges funding from the German Science Foundation DFG, within the Collaborative Research Center SFB1491 ''Cosmic Interacting Matters - From Source to Signal''. EAKA is supported by the WISE research programme, which is financed by NWO. JMvdH and KMH, acknowledge funding from the European Research Council under the European Union’s Seventh Framework Programme (FP/2007-2013)/ERC Grant Agreement No. 291531 (‘HIStoryNU’). JvL, YM and LCO acknowledge funding from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013)/ERC Grant Agreement No. 617199 (‘ALERT’; PI: JvL). KMH further acknowledges financial support from the State Agency for Research of the Spanish Ministry of Science, Innovation and Universities through the ``Center of Excellence Severo Ochoa'' awarded to the Instituto de Astrof\'isica de Andaluc\'ia (SEV-2017-0709) from the coordination of the participation in SKA-SPAIN, funded by the Ministry of Science and innovation (MICIN) and grant RTI2018-096228-B-C31 (MCIU/AEI/FEDER,UE). JvL further acknowledges funding from Vici research programme `ARGO' with project number 639.043.815, financed by NWO. DV acknowledges support from the Netherlands eScience Center (NLeSC) under grant ASDI.15.406. \end{acknowledgements} \DeclareRobustCommand{\TUSSEN}[3]{#3} \bibliographystyle{aa}
\section{Introduction} The multi-disciplinary field of Music Information Research (MIR) is focused on making music and information about music accessible to a variety of users. This ranges from systems for search and retrieval, e.g., Shazam \citep{Wang2003} or TunePal \citep{Duggan2011a}, to recommendation, e.g., Spotify or Pandora, and even to more creative applications like generation. These systems consist of many computational components working in domains between the acoustic and symbolic where computability is possible \citep{Muller2015a}. The effectiveness and reliability of these complex systems and their components are of prime importance to the MIR researcher, not to mention other stakeholders. The MIR researcher performs experiments to compare approaches for modelling and retrieving music data. A principal focus is on users, but the cost of performing experiments with users is high, and the replicability of such studies is difficult. This has motivated the use of computer-based experiments where ``test collections'' serve as proxies for human users, known as the {\em Cranfield Paradigm} \citep{Cleverdon:1991}: the researcher predicts the usefulness of an MIR system by applying it to a representative sample of the problem domain (e.g., queries and relevant documents). While such an approach is inexpensive and replicable, its relevance and reliability for MIR, and information retrieval in general, have been questioned \citep{Voorhees2001a,urbano:etal:2013}. Under the Cranfield Paradigm, state-of-the-art MIR systems perform exceptionally well in reproducing the ground truth of some datasets, e.g., inferring rhythm, genre or emotion from audio data. However, slight and irrelevant transformations of the audio can suddenly render these systems ineffectual \citep{sturm:2014,kereliuk:etal:2015,Rodriguez-Algarra2016a,prinz2021end}. In one case \citep{Rodriguez-Algarra2016a}, a ``genre recognition'' system relies on infrasonic signatures, seemingly originating from the data collection, but nonetheless imperceptible and irrelevant for human listeners. In another case \citep{Sturm2015a}, a ``rhythm recognition'' system seemingly uses tempo to infer rhythm, a confusion originating again from the data collection. Related are discussions about ``glass ceilings'' of MIR systems \citep{Aucouturier2004,Pohle2008}, i.e., that the observed barrier to improving system performance to perfect or human level is due to the psychophysical and cultural factors of music missing from computable features extracted from audio recordings \citep{wiggins:2009}. MIR researchers striving for great improvement of those numbers in established problems and datasets might actually make no practical difference for human users \citep{urbano2012significant}. \cite{flexer:grill:2016} identifies one reason contributing to performance glass ceilings: the data used to train and test MIR systems can arise from tasks that are not well-posed (e.g., music similarity), and thus render meaningless the pursuit of better numbers using that data. The lack of definition in research problems motivates \cite{sturm2014kiki} to propose MIR researchers solve synthetic yet well-defined simplifications of harder, ill-posed problems. At the heart of an MIR experiment is the relationship between conclusions drawn from its results and their {\em validity}, or ``truth value'' \citep{shadish:etal:2002}. Ideally, an experiment will be carefully designed and implemented to answer a well-defined hypothesis.\footnote{We encourage readers to review \cite{Chase2001} to see the remarkable lengths an experimentalist must go to test even a simple hypothesis.} Its components -- units, treatments, design, observations, and settings -- should be operationalised (translated from theory into practice) to maximize quality and minimize cost (money, time, ethics). This is the purview of the discipline {\em Design of Experiments}: how can one get the best evidence for the least cost? A look through the proceedings of MIR's premier conference ISMIR\footnote{\href{https://ismir.net/conferences/}{https://ismir.net/conferences/}} and related publications, however, reveals a general lack of awareness of validity in the MIR community. The first reference explicitly introducing validity to MIR is \cite{Urbano2011b}, discussing it in relation to text information retrieval (IR) literature, and specifically advocating validity-based meta-evaluation of MIREX results.\footnote{‘Music Information Retrieval Evaluation eXchange’ (MIREX) is an annual evaluation campaign for MIR algorithms \citep{downie2006music}.} This is further developed in \cite{urbano:etal:2013}, embracing the validity typology of \cite{shadish:etal:2002}, and bringing in notions of reliability and efficiency. While the review of \cite{Schedl:etal:2013} does not explicitly refer to validity or even mentions the Cranfield Paradigm, it makes clear how central computer experiments are to MIR, and criticizes a general lack of consideration of users in its conclusions. \cite{Sturm:2013} asserts that just reporting figures of merit like accuracy is not sufficient to decide whether an MIR system is really recognizing ``genre'' in musical signals, or whether it relies on irrelevant confounding factors, later stating that these uncontrolled factors are a danger to the validity of conclusions drawn from such experiments \citep{sturm:2014,Sturm:2017}. \cite{Sturm2014b} attempts to define music description (including the ``use case'') to motivate evaluating music description systems in ways that allow for valid and relevant conclusions. More recently, \cite{rodriguez2019characterising} propose and test a method for detecting the existence of confounding in MIR experiments, thus addressing the lack of construct validity of conclusions drawn from them. \cite{liem2020can} studies construct validity of high-level musical concepts like genre by confronting MIR systems with data different from what they have been trained on. \cite{flexer2021evaluation} criticizes the lack of external validity of experiments on general music similarity and demands focus on specific aspects of music similarity and definition of a specific use case. Probably the most recent attempt to comprehensively discuss validity and reliability in MIR is an unpublished tutorial held at ISMIR 2018 \citep{urbano2018statistical}. The above review of previous work on validity in MIR shows it to be dispersed and fragmented across only relatively few publications. Despite a small chorus of calls to address major methodological problems of MIR experiments to improve validity in the discipline, e.g., \cite{Urbano2011b,Schedl:etal:2013, sturm:2014,urbano2018statistical,liem2020can,flexer2021evaluation}, there has yet to be published a systematic and critical engagement of what validity means in the context of MIR, and how to consider it when designing, implementing and analyzing experiments. In this article, we review the four principal types of validity in \cite{shadish:etal:2002}, an authoritative resource about validity in causal inference and experimental science. Other typologies exist, e.g., \cite{Lund2021q}, but we focus on that of \cite{shadish:etal:2002} because it is an established point of reference, and has already been introduced to MIR \citep{urbano:etal:2013}. For each type, we discuss common threats, relate it to the MIR discipline in general, and then more concretely in terms of a typical MIR experiment, presented in Sec. \ref{Sec:typical}. We include a python jupyter notebook that runs the experiment and computes a variety of statistics and results discussed below.\footnote{\url{https://github.com/boblsturm/mirvaliditytutorial}\label{footnote:github}} Section \ref{sec:experiment} reviews the components of the experiment, on which the discussion of validity hinges. Each section \ref{sec:statistical_validity}--\ref{sec:external_validity} reviews the four types of validity and presents actionable questions which can help MIR researchers to scrutinize the conclusions they draw from their experiments. \section{A Typical MIR Experiment}\label{Sec:typical} To ground our general discussion of validity, we present a typical MIR experiment that exemplifies a considerable amount of MIR research: audio classification using machine learning and a benchmark dataset. Consider the BALLROOM dataset \citep{Dixon2004}, created around 2004 from downloading excerpts of music CDs for sale at a website focused on ballroom dancing. BALLROOM consists of 698 audio recordings, each about 30 seconds long and labeled with one of eight dance styles or music rhythms, e.g., ``Waltz''. BALLROOM has appeared in dozens of studies \citep{Sturm:2017}, and most often in experiments measuring the amount of ground truth labels reproduced by different combinations of classifiers and features. We create a random 70/30 partition, with 488/210 recordings comprising the training/testing dataset. From each recording we compute the spectral flux onset strength envelope using a hop size of 1024 samples, or 46 ms \citep{McFee2015b}. We compute the normalised autocorrelation of the envelope and retain the portion relating to lags in $[0.23, 4.14]$ seconds. Finally, we model the autocorrelation by a 12th-order autoregressive model, which results in a feature of 13 dimensions describing the 30-second audio recording. We normalise each dimension of the training features to be zero mean and unit variance. We normalise the testing data features using the same parameters as for normalising the training data features. \begin{table}[t] \footnotesize\centering \begin{tabular}{c|c|c|c|c|} & Accuracy & Precision & Recall & f1-score \\ \hline LDA & $0.714$ & $0.711$ & $0.711$ & $0.703$ \\ \hline QDA & $0.719$ & $0.715$ & $0.723$ & $0.717$ \\ \hline 1NN & $0.662$ & $0.644$ & $0.635$ & $0.638$ \\ \hline 3NN & $0.681$ & $0.673$ & $0.651$ & $0.656$ \\ \hline 5NN & $0.719$ & $0.699$ & $0.687$ & $0.689$ \\ \hline 7NN & $0.695$ & $0.669$ & $0.656$ & $0.659$ \\ \hline 9NN & $0.700$ & $0.681$ & $0.664$ & $0.668$ \\ \hline unif &$0.12\pm 0.02$ &$0.13\pm 0.03$ &$0.12\pm 0.02$ &$0.12\pm 0.02$\\ \hline freq &$0.13\pm 0.02$ &$0.13\pm 0.03$ &$0.13\pm 0.02$ &$0.13\pm 0.02$\\ \hline maj &$0.16$ &$0.02$ &$0.12$ &$0.03$\\ \hline \end{tabular} \caption{Accuracy, and macro-averaged precision, recall and f1-score observed for several models in a testing partition of BALLROOM \citep{Dixon2004}. The performance of two models randomly selecting labels (with standard deviation) are shown in the rows labeled: {\em unif} samples labels uniformly; {\em freq} samples labels according to training data label frequency. The last row {\em maj} shows the performance of a model choosing the label most frequent in the training data.} \label{tab:modelsBALLROOM} \end{table} We model features using multivariate Gaussian distributions (linear and quadratic discriminant analysis, LDA and QDA), or k-nearest neighbours (KNN). We compare the labels inferred by a model to the ground truth and compute the accuracy, and macro-averaged precision, recall, and f1-score.\footnote{A macro-averaged figure of merit is the mean figure of merit measured across classes, regardless of the number of observations of each class.} Table \ref{tab:modelsBALLROOM} shows the outcomes of this experiment, which can be reproduced with the supplementary python jupyter notebook.\footnote{See footnote \ref{footnote:github}.} The last rows show statistics of three other strategies: {\em unif} samples labels according to a uniform prior and {\em freq} samples labels according to training data label frequency;\footnote{The mean and standard deviation of these figures of merit can be found in theory, but here they are found empirically. See the accompanying code in footnote \ref{footnote:github}.} {\em maj} selects the most frequent label in the training data. These provide comparison points. A criticism can be made here that the above experiment is not really representative of MIR experiments today: datasets are now several orders of magnitude larger, and deep learning has in many cases made obsolete the engineering of features. However, we will press on with this example for four reasons. First, the BALLROOM dataset is analyzed to such an extent that classification experiments with it illustrate the four types of validity in clear and graspable ways. Using a larger dataset can illustrate the same things, but would first require a thorough analysis of its composition and provenance. Second, concerns about validity are not rendered moot by simply increasing data or shifting the machine learning approach. Third, the experiment above is typical in its {\em design}: a dataset is collected and processed, submitted to a variety of machine learning approaches, and measurements are made by applying the trained systems to some test collection. Finally, the BALLROOM dataset is unique in that an ``extended'' version of it was created a decade later from the same web resource \citep{Marchand2016a}. This allows us to meaningfully test the external validity of conclusions about systems trained in BALLROOM, e.g., the concepts learned from BALLROOM are relevant to ballroom dance music, and not just ballroom dance music in 2004 (see Sec. 7.2). \section{Components of an Experiment}\label{sec:experiment} Before discussing the validity of conclusions drawn from the typical MIR experiment, we must identify its units, treatments, design, observations, and settings. {\em Treatments} are the things applied to units in order to cause an effect (or not in the case of a {\em control}), {\em units} are the things that are treated, and {\em observations} are what is measured on a unit. The {\em design} specifies which treatment is applied to which unit, and {\em settings} involve time, place, and condition. To make this more concrete, consider a medical experiment in which the effect of a treatment on blood pressure is being studied. A number of people are sampled from a population, some of whom will receive the treatment while the others receive a placebo (control). The design describes which people get the treatment, and which do not. The observation is the blood pressure of a person after one month. The setting can include particulars of the population (rural or urban), place of treatment (hospital or home), and so on. The experimentalist contrasts blood pressure observations across groups to conclude if the treatment has an effect. Returning to our typical MIR experiment, we wish to determine the effectiveness of different machine learning (ML) algorithms in predicting the labels of a test recording dataset. There are two possibilities here. We can see the treatments as the ten algorithms, and the units as the entire testing dataset (how does the dataset respond to each algorithm?), or we can see the entire testing dataset as the one treatment, and the units as the ten algorithms (how does each algorithm respond to the dataset?). Since Table \ref{tab:modelsBALLROOM} reports figures of merit (observations) of each algorithm on the entire dataset, the latter interpretation motivates conclusions about the effectiveness of particular algorithms. In this case, the design is simple: each unit is given the same treatment. The setting involves the partitioning of BALLROOM, the features extracted, random seeds, software libraries, and so on. \vspace{-0.1in} \section{Statistical Conclusion Validity} \label{sec:statistical_validity} Statistical conclusion validity is ``the validity of inferences about covariation between two variables'' \citep{shadish:etal:2002}. This includes concluding that a covariation exists, and perhaps its strength as well. This is the level at which one is concerned with {\em statistical significance}, i.e., that an observed covariation between treatment and effect is not likely to arise by chance. \cite{shadish:etal:2002} (p.\ 45) includes a table of nine different threats to statistical conclusion validity. Four threats relevant to computer-based experiments are: violated assumptions about the statistics underlying the responses (and the use of the wrong statistical test, a {\em type III error} \citep{Kimball1957}); a sample size too small to reliably detect covariation (lack of power); the purposeful search for significant results by trying multiple analyses and data selections (``p-hacking'', \cite{p_hacking}); and increased variance in observations due to the heterogeneity of units. \subsection{MIR concerns about statistical conclusion validity} {\em Are my results statistically significant?} Null hypothesis statistical testing (NHST) quantifies whether the observed effects of the treatments on the responses arise by mere chance, as well as the direction of effect and its size. This answers the question: are the results statistically significant? Fundamentals about statistical testing in MIR are discussed by \cite{Flexer:2006}, for Artificial Intelligence in general by \cite{cohen1995empirical}, and for machine learning by \cite{Japkowicz2011}. One must take care in selecting a statistical test to use; each one makes strong assumptions that could be violated. NHST is most straightforwardly applicable to completely randomized experimental designs \citep{Bailey2008}, thereby reducing the possibility of structure in units and treatments interfering with the responses (which results in confounding, discussed in the next section). Most MIR experiments cannot use complete randomisation because the target population from which samples come is unclear (what is a random sample of ``sad'' music, with the term ``sad'' being quite ill-defined?), and so the kinds of conclusions that can be made with NHST in MIR are limited.\footnote{Experimental designs that cannot be completely randomised are called {\em quasi-experimental designs}, which is another major topic of \cite{shadish:etal:2002}.} {\em Is the observed statistical significance relevant for a user?} In MIR, even if one finds statistical significance, this may not generalise to a perceivable difference for actual users interacting with the ``improved'' MIR system. As an example from MIR, a crowd-sourced user evaluation \citep{urbano2012significant} demonstrates that there is an upper bound of user satisfaction with music recommendation systems of about $80\%$, since this was the highest percentage of users agreeing that two systems ``are equally good.'' In addition, for the MIREX task of {\em Audio Music Similarity and Retrieval} \cite{urbano2012significant} demonstrate that statistically significant differences between algorithms can be so small that they make no practical difference for users. \subsection{Statistical conclusion validity in the typical MIR experiment} Let us now consider the typical MIR experiment in Sec. \ref{Sec:typical} and reason about what conclusions we can draw from it that have statistical conclusion validity. Table \ref{tab:modelsBALLROOM} clearly shows that each response of machine learning (ML) to the dataset is greater than the random approaches {\em unif}, {\em freq} and {\em maj}. How likely is it that any of the responses of ML is due to chance, i.e., that any of the ML approaches is actually no better than one of the random approaches? Since we have the empirical distributions for {\em unif} and {\em freq}, we can estimate the probability of either of them resulting in, e.g., a macro-average recall at least as large as $0.6$: $p<e^{-200}$.\footnote{ This is the probability of observing a macro-averaged recall at least as big as 0.6 from the models selecting labels randomly. Specifically, it is the probability of sampling a number from a random variable distributed Gaussian with mean $0.125$ and standard deviation $0.02$ in the domain $[0.6, \infty)$. See the accompanying jupyter notebook. Also note that a macro-averaged recall of 0.6 is a pessimistic choice. Using the higher numbers in Table \ref{tab:modelsBALLROOM} results in even lower probability.} Hence, a valid statistical conclusion is that we observe a significant covariation between the use of ML with these particular features and the responses measured on a specific partition of BALLROOM. An equivalent conclusion is that each response of these trained ML systems treated by this partition of BALLROOM are inconsistent with choosing randomly. Whereas the conclusions above relate to the use of ML, one might consider statistical conclusions relating to the type of ML, i.e., Gaussian modelling (LDA and QDA) vs. nearest neighbour modelling (KNN), or LDA vs.\ QDA. One may want to conclude that Gaussian modelling is better than nearest neighbour modelling with these features on BALLROOM, or even more precisely, QDA performs the best with these features on BALLROOM. This involves looking at the differences between responses, called {\em contrasts}. While there is not much reason to suspect that the particular 70/30 partition of BALLROOM used is unusually beneficial to one kind of ML model over the other, what we do not know from our experiment is the distribution of any response due to ML, and so of any difference of responses due to ML, related to the random partitioning of BALLROOM. We have two measurements of Gaussian models, and five of nearest neighbour models, but we cannot simply compute and compare statistics of these without involving auxiliary information not present in the experiment, e.g., how the decision boundaries of an ML model vary according to variation in the training data. In fact, if we conclude from Table \ref{tab:modelsBALLROOM} that Gaussian modelling performs better than nearest neighbour modelling with these features on 70/30 partitions of BALLROOM, we would be wrong. This is a ``type I error'', which is concluding there to be a significant difference when in fact there is none. When we perform this experiment 1000 times with random 70/30 partitions we observe that the difference between the best response of a Gaussian model and the best response of a nearest neighbour model is distributed Gaussian, and that the probability of observing zero difference or less is $p>0.41$ for any of the figures of merit (see the accompanying jupyter notebook). That is, the more statistically valid conclusion is that three out of five times randomly partitioning BALLROOM the best Gaussian model performs better than the best nearest neighbor model. With this new data we see that the results in Table \ref{tab:modelsBALLROOM} do not merit a valid statistical conclusion that one of the modelling approaches is significantly better or worse than any other in BALLROOM using these features for any significance level $\alpha<0.4$. On the other hand, if we were to conclude that QDA performs better than nearest neighbour modelling with these features on 70/30 random partitions of BALLROOM, we would be correct -- but only for macro-averaged recall. Performing 1000 repetitions of our experiment shows that the distribution of the difference between the response from QDA and the best response of all others is distributed such that the probability of observing a negative difference is $p < 0.046$ only for recall (see the accompanying jupyter notebook). In other words, less than one out of 20 times do we see QDA perform worse than the other models in terms of recall. In summary, the most general statistical conclusion we can make from Table \ref{tab:modelsBALLROOM} is that the responses we observe from ML are highly inconsistent with the responses of models choosing randomly. Each ML model knows {\em something} about BALLROOM linking the features computed from a music recording with its label. Because we do not know the amount of variation in any response due to partitioning in Table \ref{tab:modelsBALLROOM}, we cannot make any valid statistical conclusion about which type of ML model is the best, or which particular realisation is the best, for this particular dataset. In order to go further, we had to run the experiment multiple times to obtain distributions of the contrasts. Even then, however, we cannot say anything about the {\em cause} of significant differences yet. This is where the notion of internal validity becomes relevant. \section{Internal Validity} \label{sec:internal_validity} Internal validity is ``the validity of inferences about whether the observed covariation between two variables is causal'' \citep{shadish:etal:2002}. While statistical conclusion validity is concerned only with the strength of covariation between treatment and responses, internal validity is focused on the {\em cause} of a particular response to the treatment. \cite{shadish:etal:2002} (p. 55) includes a table of nine different threats to causal conclusions. Several of these involve {\em confounding}, which is the confusion of the treatment with other factors arising from poor operationalisation in an experiment. As a concrete example, consider an experiment measuring the effects of two different medicines on lowering blood pressure, but where one medicine is given to young patients and the other is given to elderly patients. This experimental design confounds the two medicines and patient age, and so the effects caused by the two factors cannot be disambiguated. Any conclusion from this experiment about the effects of the medicines lacks internal validity. \subsection{MIR concerns about internal validity} {\em Does my data collection introduce confounds?} One's methodology for collecting music data might unintentionally introduce structure. For instance, \cite{Sturm:2017} discusses how the BALLROOM dataset was assembled by downloading excerpts of music CDs sold at a website selling music for ballroom dance competitions. Ballroom dance competitions are regulated by organisations, e.g., World DanceSport Federation (WDSF),\footnote{\href{https://www.worlddancesport.org/}{https://www.worlddancesport.org/}} to ensure uniformity of events for competitors around the world. These organisations set strict requirements of tempo of each dance such that high skill is required of the dancers. Hence, the labels of the BALLROOM dataset can mean: 1) the rhythm of the music; 2) the type of dance; 3) the strict tempo requirements of the dance. {\em Does my data partitioning introduce confounds?} Dataset partitioning can also introduce confounds, e.g., ``bleeding ground truth.'' An example is to first segment recordings into short (e.g., 40ms) time frames and then partition these frames into training and testing sets, thus spreading highly correlated features across these sets. In the context of audio-based genre classification, the presence of songs from the same artists or albums in both training and test data has been shown to artificially inflate performance \citep{pampalk2005improvements,flexer2010effects}. \cite{flexer2007closer} shows that audio-based genre classification using very direct representations of spectral content degrade more when employing artist/album filters than classification based on more abstract kind of features like rhythmic content (fluctuation patterns). This insight that problems of data partitioning can affect MIR systems in quite different ways and hence change performance rankings has been confirmed in another meta-study \citep{sturm2014jnmr}. Research on explainable and interpretable MIR might help to identify confounds, see e.g., \citep{mishra2018understanding}, but latest results have shown that many popular explainers struggle when being probed with deliberate confounding transformations \citep{Praher2021Veracity,hoedt2022plausibility}. A general framework for detecting and characterising effects of confounding in MIR experiments through interventions is proposed by \cite{sturm:2014} and further refined in \cite{rodriguez2019characterising}. More work has yet to be done in the domain of causal inference in MIR, but is difficult because its core concepts, like ``similarity'', need to be operationalised first. Otherwise disentangling variables potentially influencing measurements is not possible. \subsection{Internal validity in the typical MIR experiment}\label{sec:IVMIR} Of interest is {\em what} it is in our trained ML models of Sec. \ref{Sec:typical} causing their response to be inconsistent with random selection. Knowing how Gaussian models used in LDA and QDA are built -- mean and covariance parameters are estimated from training data -- an internally valid conclusion is that these models work well in BALLROOM because likelihood distributions estimated from the training data also fit the testing data well. Similarly, knowing how nearest neighbour classifiers work, an internally valid conclusion is that in BALLROOM the neighbourhoods of the labeled features in the training data include to a large extent testing data features with the same labels. Another internally valid conclusion is that the high performances of these ML models in BALLROOM are caused by the features together with the expressivity of the models capturing information related to the labels in BALLROOM. Our ML models have learned {\em something} about BALLROOM, which causes their performance to be significantly better than random selection. With reference to the aims of MIR research, we want to conclude something more specific, e.g., our ML models have learned to recognize the rhythms in BALLROOM. This is certainly one explanation consistent with the performance of our systems, but is it the only one? The internal validity of this conclusion relies on a key assumption: inferring the correct labels of BALLROOM can {\em only} be the result of learning to discriminate between and identify the rhythms in BALLROOM. In other words, we must assume that there is no other way to accurately infer labels in BALLROOM than by perceiving rhythm. It is not difficult to imagine other ways to infer the labels in BALLROOM by considering the multitude of variables present in the music recordings. One can hear instrumentation unique to each class, e.g., many recordings labeled ``Tango'' feature strings, piano and accordion. Many recordings labeled ``Waltz'' and ``Viennese Waltz'' feature strings. Many recordings labeled ``Quickstep'' and ``Jive'' feature brass, piano, vocals, and drums. So perceiving instrumentation is one way to infer labels in BALLROOM with more success than random selection. We can reject such an explanation knowing that the time-domain nature of the features we are using are not sensitive to timbre, and so cannot clearly express the sound characteristic of an instrument. Then, are there time-domain variables other than rhythm that are closely associated with the labels in BALLROOM? One possible variable is tempo. If tempo is correlated with rhythm in BALLROOM then tempo estimation is another way a ML model can reproduce the ground truth labels. From listening to BALLROOM recordings labeled ``Waltz'', ``Quickstep'' or ``Cha cha cha'', one can hear they feature different rhythms and different tempi, but discriminating between them can be done on the basis of tempo alone. Tempo and rhythm are related musical characteristics, but they are not one and the same thing \citep{Sethares2007x}. Let us perform an experiment to test the sensitivity of our trained ML models to tempo. We perform an intervention where we alter all test recordings by some amount of pitch-preserving time dilation, and then measure the responses of the models to these new ``treatments''. Dilating a recording by an amount 1.1 increases its duration by 10\% -- or equivalently, makes the music in the recording have a tempo that is 10\% slower. Dilating a recording by an amount 0.9 decreases its duration by 10\% -- or equivalently, makes the music in the recording have a tempo that is 10\% faster. Figure \ref{fig:AccTempo} shows how the accuracy of all ML models from Table \ref{tab:modelsBALLROOM} covaries with the amount of dilation. Our intervention has clearly revealed the extent to which the ML models rely on the tempi in the test data -- which is no surprise given the background information of BALLROOM in the previous subsection. \begin{figure}[t] \centerline{ \includegraphics[width=0.7\columnwidth]{AccTempo.png}} \caption{Accuracies of the ML models in Table \ref{tab:modelsBALLROOM} with test recordings undergoing pitch-preserving time dilation. Horizontal dashed line in grey is the mean accuracy of the best random system plus twice its standard deviation.} \label{fig:AccTempo} \end{figure} The validity of the conclusion that the responses of our ML models are caused by their recognition of the rhythms in BALLROOM relies on too strong of an assumption about BALLROOM, i.e., that rhythm recognition is the only way to infer labels in BALLROOM. The experimental design does not account for the structure present in the dataset; we do not control for other ways of inferring the labels of BALLROOM, which are guaranteed to exist by its very construction. From Table \ref{tab:modelsBALLROOM} and our experimental design, we thus cannot be any more specific in our causal inference than this: the responses of our ML models are caused by their having learned {\em something} about BALLROOM. At best, they are relying on at least tempo and rhythm. This then calls into question how comparing predictions with ground truth in BALLROOM relates to the ability we might actually want to measure, that is the recognition of rhythm. This is where the notion of construct validity becomes relevant. \section{Construct Validity} \label{sec:construct_validity} Construct validity is ``the validity of inferences about the higher order constructs that represent sampling particulars'' \citep{shadish:etal:2002}. This involves the relationship between what is meant to be inferred by the experimentalist from an experiment and what is actually measured, i.e., the {\em operationalisation} of the experimentalist's intention. For instance, directly measuring the blood pressure of a person involves an invasive procedure inserting a measuring device in their veins. Blood pressure can be measured less invasively but indirectly by externally applying known pressure to a vein and listening for when blood flow ceases. Knowledge about the incompressibility of liquids in closed systems makes the measurement of pressure in the balloon a relevant measure of blood pressure. \cite{shadish:etal:2002} (p. 73) includes a table of fourteen different threats to construct validity, but several of these are irrelevant to computer-based experiments. The main threat is a questionable relationship between what is being measured and what is intended to be measured. Selecting a measure by convenience but not relevance, sampling from convenient populations, and a lack of definition of what is intended to be measured, are threats to construct validity. Construct validity involves more than just how something is measured; it also involves what is measured and in what settings. \subsection{MIR concerns about construct validity} {\em How is classification accuracy, or any figure of merit, in a labeled music dataset related to {\em X}?} Two examples in MIR are the use of ``genre'' classification accuracy as an indirect measure of music similarity \citep{Pohle2008}, or IR user satisfaction (see, e.g., \citep{Schedl:etal:2013} for a discussion). The relationship between these is very tenuous, especially so considering that accuracy itself is an unreliable measure of whether or not a system has learned anything relevant to music \citep{Sturm:2013,sturm:2014}. A key reference in this respect is that of \cite{Pfungst1911} describing a series of experiments in trying to reliably measure the arithmetic acumen of a horse that was only able to tap out answers. Counting the number of correct answers tapped out by the horse, no matter how many questions are asked, is irrelevant without considering how each question is posed (the setting). The key to Pfungst discovering the cause of the horse's apparent arithmetic acumen involved changing the setting: the questions remained the same, and accuracy of correct response was measured, but how the questions were posed was changed in order to control for different factors of the experiment. The same is true for MIR. {\em What is the ``use case'' of the system to be tested?} To counter threats to construct validity the MIR experimentalist must operationalise as much as possible the use case of the system to be built and tested. An attempt to do so for music description is in \cite{Sturm2014b}, which emphasises the need to define success criteria. The experimentalist must determine how their method of measurement relates to the success criteria, e.g., relating classification accuracy in BALLROOM to the satisfaction of a specific user. {\em How can we test the construct validity of a conclusion?} One possibility is to assess the outcomes of different experiments which are supposed to measure the same higher order constructs. An example in MIR is to study correlations of different genre classifiers when given identical inputs \citep{liem2020can}. Low correlations between classifiers point to problems of construct validity. A related topic is that of adversarial examples, which casts doubt on the conclusion that the high accuracy of an MIR system in some dataset reflects its ``perception'' of the music in the waveform. Adversarial examples have first been described in image analysis \citep{Szegedy2014IntruigingProperties}, where imperceptible perturbations of input data significantly degraded classification accuracy. For music genre classification systems, irrelevant audio filtering transformations of music signals are used in \cite{sturm:2014} to both deflate and inflate classification accuracy to be no better than chance level or perfect $100\%$. The irrelevance is ascertained with listening tests and real human subjects, with the transformation being audible but not changing the clear impression of a certain musical genre. The same problematic behavior has been documented concerning music emotion classification \citep{sturm:2014}. For deep music embedding a test based on imperceptible audio transformations has been proposed \citep{kim2019nearby}, essentially verifying distance consistency both in the input audio space and corresponding latent deep space. Following these so-called untargeted attacks which try to change a prediction to an arbitrary target, targeted attacks aiming at changing predictions to specific classes have been explored. A targeted attack on genre recognition has been reported \citep{kereliuk:etal:2015}, where magnitude spectral frames computed from audio are treated as images and attacked using approaches from image object recognition. For music instrument classification a targeted attack allowing to add perturbations directly to audio waveforms instead of spectrograms has also been presented \citep{prinz2021end}. Quite similar to the results by \citep{kereliuk:etal:2015}, the attacks were able to reduce the accuracy close to a random baseline and produce misclassifications to any desired instrument. Signal perturbations were almost imperceptible apart from some high-frequency deviations. The authors also artificially boosted playcounts via an attack on a real-world music recommender, thereby demonstrating that such attacks can be a security issue in MIR. Follow-up work presented lines of defence against such malicious attacks \citep{Hoedt2022DefenceSoundpark}. \subsection{Construct validity in the typical MIR experiment} When it comes to our typical MIR experiment in Sec. \ref{Sec:typical}, we are interested in making construct inferences around the latent ability of rhythm recognition we are supposedly measuring. For instance, one construct inference is that our features measure relevant aspects of rhythm in recorded music. In some sense, by their definition from basic signal processing components, our features come from temporal aspects that are certainly relevant to rhythm. Our features are also reliant on acoustic information, and in particular there being high-contrast differences in onsets captured by spectral flux -- hence limiting their relationship to rhythms played by particular kinds of instruments with sharp attacks. However, we have seen above that the features are also indicative of tempo, which is not rhythm \citep{Sethares2007x}, and that tempo is another path an ML algorithm can use to get to the rhythm label. Hence we are left to question the relationship of our features to the concept we are trying to operationalise, i.e., rhythm. The construction of the BALLROOM dataset, intended to reflect different ballroom dance rhythms, is closely related to the validity of construct inferences derived from its use. How do the ``Waltz'' excerpts exemplify the ``Waltz'' rhythm? Is there one ``Waltz'' rhythm? In BALLROOM, there are actually two different labels for waltz: ``Waltz'' and ``Viennese Waltz.'' The distinction between them is based in part on tempo, according to the World Sport Dance Federation, a Viennese waltz is to be performed at a tempo between 174-180 BPM \cite{WSDF2014}. Having a system label any partition of the BALLROOM dataset provides no reliable measure of a system's ability to recognise rhythm without changing the setting to control for other factors. It is not as simple as choosing a different feature, measure, cross-validation method, or using a particular statistical test. One must change the experiment itself such that {\em rhythm recognition} is what is actually being measured. This means that BALLROOM can still be useful to measuring the rhythm recognition of a ML system. Indeed, in the previous section we used it to disprove the causal claim that the good performance of the ML systems of Table \ref{tab:modelsBALLROOM} is caused by their ability to recognize rhythm. Might performance in BALLROOM also be an indication of performance in other datasets focused on rhythm? This is where the notion of external validity becomes relevant. \section{External Validity} \label{sec:external_validity} External validity is ``the validity of inferences about the extent to which a causal relationship holds over variations in experimental units, settings, treatment variables and measurement variables'' \citep{shadish:etal:2002}. More generally, external validity is the truth of a generalised causal inference drawn from an experiment. An example is inferring that medicine found to lower blood pressure in patients living in Germany will also lower blood pressure in people living in Mexico -- a conclusion that can lack validity due to differences in diet, living and working conditions, and so on. Another example is that increasing the dose of the medicine will cause blood pressure to lower further in the studied population. If a causal inference we draw from an experiment lacks internal validity, then generalising that inference to include variations not tested will not have external validity. \cite{shadish:etal:2002} (p. 87) includes a table of five different threats to external validity, which are in addition to the threats to internal validity. The main threat is that variation of the components of the experiment might destroy the causal inference that holds in the experiment. For instance, a medication may work for the type of illness tested, but that type of illness may not be generalisable to other closely related illnesses. \subsection{MIR concerns about external validity} {\em Does my model generalize to out-of-sample data?} The standard approach in evaluating MIR classification systems is to use separate train and test sets in cross-validation experiments to obtain seemingly unbiased estimates of performance. However, if such MIR systems are exposed to independent out-of-sample data often severe loss of performance is observed. One example are experiments on genre recognition where accuracy results do not hold when evaluated across different collections that are not part of the training sets \citep{bogdanov2016cross,bogdanov2019acousticbrainz}. The results do not generalize to supposedly identical genre labels in different collections, which reflects a lack of external validity. Genre labels like e.g.\ 'Rock' will be used differently by different annotators working on these collections -- which is a threat to construct validity. Another example are how different audio encodings affect subsequent computation of descriptors and classification results \citep{urbano2014effect}, or how in general differences in software implementations diminish replicability \citep{mcfee2018open}. {\em Do different raters agree on a ground truth?} Human perception of music is highly subjective resulting in possible low inter-rater agreement. Therefore only a certain amount of agreement can be expected if several human subjects are asked to rate the same song pairs according to their perceived similarity, depending on a number of subjective factors \citep{Schedl:etal:2013,flexer:grill:2016} like personal taste, listening history, familiarity with the music, current mood, etc. Concerning annotation of music, \cite{Seyerlehner:etal:2010} shows that the performance of humans classifying songs into 19 genres ranges from modest $26\%$ to $71\%$. Audio-based grounding of everyday musical terms shows the same problematic results \citep{Aucouturier:2009}. It has even been argued \citep{wiggins:2009} that no such thing as an immovable `ground' exists in the context of music, because music itself is subjective, highly context-dependent and dynamic. The lack of inter-rater agreement presents a problem of external validity because inferences from the experiment do not generalize from users or annotators in the experiment to the intended target population of arbitrary users/annotators. It is also a problem of reliability, since different groups of users or annotators with their differing subjective opinions will impede repeatability of experimental results. This lack of inter-rater agreement presents an upper bound for MIR approaches, since it is not meaningful to have computational models going beyond the level of human agreement. Such upper bounds have been reported \citep{Jones:etal:2007,Schedl:etal:2013,flexer:grill:2016} for the MIREX tasks of `Audio Music Similarity and Retrieval' (AMS) and `Music Structural Segmentation' (MSS). For AMS the upper bound has already been reached in 2009, while for MSS the upper bound is within reach for at least some genres of music. Comparable results exist concerning music structure analysis \citep{Nieto:etal:2014} and chord estimation \citep{Ni:etal:2013,Koops:2019}. {\em Do raters agree with themselves at different points in time?} Going beyond the question of whether different annotators agree on a ground truth one can also access what the level of agreement within one person is when faced with identical annotation tasks at different points in time. A high intra-rater agreement would help to overcome the problem of upper bounds in MIR systems since it would make personalization of models meaningful, i.e.\ to have separate models for individual persons. However, at least for the task of general music similarity it has been shown that intra-rater agreement is only slightly higher than inter-rater agreement \citep{flexer2021evaluation}, with the absolute level also depending on music material and mood of raters at test time. An approach to personalize chord labels for individual annotators via deep learning was more successful \citep{koops2020automatic}. Returning to the impact of irrelevant transformations \citep{sturm:2014,kereliuk:etal:2015,Rodriguez-Algarra2016a} and the existence of adversarial examples \citep{prinz2021end}, one can ask, does my model generalize to these kinds of attacks? More constructively, one can seek ways to lessen the impact of these attacks, thus possibly increasing the generalization of the models \citep{Hoedt2022DefenceSoundpark}. \subsection{External validity in the typical MIR experiment} Considering the typical MIR experiment in Sec. \ref{Sec:typical}, we cannot validly conclude that any of our models is recognizing rhythm in general because we do not know if they are recognizing rhythm in BALLROOM. Our dilation intervention experiment in Sec. \ref{sec:IVMIR} reveals that all of the models lose their supposed ability to recognize rhythm in BALLROOM, so there is no reason to infer they will recognize rhythm elsewhere. One causal conclusion we might generalise is that all our models perform well in BALLROOM because they have learned something about BALLROOM --- a curated set of recordings downloaded from a specific website in 2004. Might our models have also learned something about other recordings from that same website but collected many years later? The extended BALLROOM dataset (X-BALLROOM) \citep{Marchand2016a} consists of 3,484 audio recordings in the same eight dance styles or music rhythms as BALLROOM, but downloaded from the same website over a decade later. This gives us a chance to test our hypothesis. The figures of merit measured from our models trained in BALLROOM but applied to all of X-BALLROOM are shown in Table \ref{tab:modelsExtendedBALLROOM}. We still see significant covariation between response and the use of ML with our features. By and large, whatever concepts our ML models have learned about BALLROOM carry over to X-BALLROOM -- but we still do not know whether or not those concepts have to do with rhythm. \begin{table}[t] \footnotesize\centering \begin{tabular}{c|c|c|c|c|} & Accuracy & Precision & Recall & f1-score \\ \hline LDA & $0.659$ & $0.647$ & $0.643$ & $0.643$ \\ \hline QDA & $0.682$ & $0.678$ & $0.672$ & $0.673$ \\ \hline 1NN & $0.622$ & $0.616$ & $0.602$ & $0.604$ \\ \hline 3NN & $0.636$ & $0.629$ & $0.610$ & $0.613$ \\ \hline 5NN & $0.644$ & $0.643$ & $0.617$ & $0.619$ \\ \hline 7NN & $0.647$ & $0.646$ & $0.619$ & $0.621$ \\ \hline 9NN & $0.645$ & $0.643$ & $0.615$ & $0.618$ \\ \hline unif &$0.12\pm 0.01$ &$0.13\pm 0.01$ &$0.12\pm 0.01$ &$0.12\pm 0.01$\\ \hline freq &$0.13\pm 0.01$ &$0.13\pm 0.01$ &$0.12\pm 0.01$ &$0.12\pm 0.01$\\ \hline maj &$0.13$ &$0.02$ &$0.12$ &$0.03$\\ \hline \end{tabular} \caption{As in Table \ref{tab:modelsBALLROOM}, models trained in BALLROOM and tested in all of X-BALLROOM \citep{Marchand2016a}.} \label{tab:modelsExtendedBALLROOM} \end{table} We can take this opportunity to test the generalizability of a conclusion about Gaussian modelling outperforming nearest neighbor modelling from Table \ref{tab:modelsBALLROOM}. Training and testing the same ML models with a 70/30 random partition of X-BALLROOM produces the results in Table \ref{tab:modelsExtendedBALLROOM2}. We still see QDA performing the best, but the nearest neighbor models show large performance increases. The cause of this change in performance should be investigated, and related to the confounding known to exist in BALLROOM. Does the confounding also exist in X-BALLROOM, suggested by the results in Table \ref{tab:modelsExtendedBALLROOM}? This shows how the observations made in the typical MIR experiment represent the beginning of avenues for exploration, sources of hypotheses, and not the final result. \begin{table}[t] \footnotesize\centering \begin{tabular}{c|c|c|c|c|} Mod & Accuracy & Precision & Recall & f1-score \\ \hline LDA & $0.726$ & $0.721$ & $0.722$ & $0.717$ \\ \hline QDA & $0.763$ & $0.764$ & $0.773$ & $0.758$ \\ \hline 1NN & $0.702$ & $0.691$ & $0.693$ & $0.690$ \\ \hline 3NN & $0.741$ & $0.731$ & $0.727$ & $0.727$ \\ \hline 5NN & $0.750$ & $0.744$ & $0.736$ & $0.738$ \\ \hline 7NN & $0.753$ & $0.746$ & $0.736$ & $0.738$ \\ \hline 9NN & $0.751$ & $0.746$ & $0.734$ & $0.737$ \\ \hline unif &$0.12\pm 0.01$ &$0.13\pm 0.01$ &$0.12\pm 0.01$ &$0.12\pm 0.01$\\ \hline freq &$0.13\pm 0.01$ &$0.13\pm 0.01$ &$0.13\pm 0.01$ &$0.12\pm 0.01$\\ \hline maj &$0.13$ &$0.02$ &$0.12$ &$0.03$\\ \hline \end{tabular} \caption{As in Table \ref{tab:modelsBALLROOM}, but models trained and tested in X-BALLROOM \citep{Marchand2016a}.} \label{tab:modelsExtendedBALLROOM2} \end{table} \section{Conclusion} This article provides a review of the notion of validity based on the typology given in \cite{shadish:etal:2002}. It brings together the few sources in MIR that mention anything to do with validity, and several sources that do not but are related. This article does not aim to prescribe how to design and perform experiments such that valid conclusions can be drawn from them. Instead it aims to bring within the realm of MIR what validity means, why it is important, and how it can be threatened. In MIR the predominant experimental methodology is given by the Cranfield paradigm: train a model on a partition of a dataset and count the number of correct answers on another partition. This kind of experiment is inexpensive to do with the data conveniently at hand, and provides numbers that can be compared in ways that convince peer reviewers that progress has been accomplished \citep{Hand2006}. Despite various appeals \citep{Peeters2012,Schedl:etal:2013} and beseechings \citep{urbano2012significant,urbano:etal:2013,Sturm:2013,sturm:2014,flexer:grill:2016,flexer2021evaluation}, such an experimental approach is still standard in the field and its serious flaws are ignored. Any inference from this experiment that is more general than ``the system has learned something about this dataset'' lacks internal, construct and external validity. This does not mean that all such inferences are false, just that they cannot follow from the experiment as designed and implemented. Reproducing the ground truth of a dataset represents a beginning and must be followed by a search for the causes of the observed behavior. One must resist the urge to conclude that a system must be doing whatever is hoped for. \cite{shadish:etal:2002} provides an established starting point for MIR, but there exist other types of validity. For instance, \cite{Lund2021q} revises the typology of \cite{shadish:etal:2002} to address ambiguities between causes and treatments, to better define aspects of settings, and to establish a hierarchical ordering of five types of validity: statistical conclusion, causal, construct, generalization and theoretical. An important distinction in this typology from that of \cite{shadish:etal:2002} is its emphasis on a major aim of basic research: to contribute theory. Other kinds of validity include ecological, convergent, and criterion \citep{Urbano2011b}; but these still deal with the kind of conclusion one is drawing from evidence collected in some way. As a final note, a frustration when encountering \cite{shadish:etal:2002} as an engineer is that of its 623 pages there are only five pages with at least one equation on them. Instead, \cite{shadish:etal:2002} describe experiments and how each type of validity manifests in the conclusions drawn, with specific threats to the reasoning of those conclusions. Experiments, not to mention experimentalists, are such complex assemblages that expressing them in formal ways that appear to permit the computation of numbers that relate to each type of validity would probably have very limited applicability, and then only be understood by a limited audience. The language of validity is {\em reason}, and we hope this manuscript will inspire MIR researchers to think creatively about the phenomena they observe to discover their causes. \section*{Acknowledgments} We thank Juli\'an Urbano and Hugo Maruri-Aguilar for helpful discussions during the drafting of this manuscript, as well as the constructive criticisms of reviewers from the Transactions of the Society for Music Information Retrieval. The contribution of Sturm is supported by a project that has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (Grant agreement No. 864189 MUSAiC: Music at the Frontiers of Artificial Creativity and Criticism). The contribution of Flexer is supported by funding from the Austrian Science Fund (FWF, project number P 31988). For the purpose of open access, the authors have applied a CC BY public copyright license to any author accepted manuscript version arising from this submission.
\section*{Search algorithm for bifurcations of multiple equilibria} To design parametric configurations corresponding to bifurcations of multiple equilibria we develop a search gradient continuation algorithm that takes advantage of their nested structure. Bifurcations associated with $k$ equilibria (minima plus maxima) are degenerate singularities where the first $k$ derivatives of the potential vanish. Thus they can be found iteratively by searching for singularities of the potential with increasing order, solving for one constraint at a time. We find that this method is especially efficient in finding experimentally realizable parametric configurations corresponding to bifurcations of multiple equilibria. Moreover, this method naturally extends to searching for bifurcations with desired properties by introducing further constraints, for example optimizing the robustness of the bifurcation's associated states to external noise. For ease of illustration we describe how to use this approach to find the symmetrized butterfly bifurcation described above with parameters $a_1,a_2,a_4$ and variable $\theta$. For a random combination of parameters we find an equilibrium angle where $dV/d\theta = 0$. Generically, this point is part of a smooth manifold over which this constraint holds. We then vary $a_1,a_2,a_4$ and $\theta$ within this manifold to minimize the next constraint $|d^2V/d\theta^2|$. The trajectory follows the gradient of the second constraint as closely as possible while maintaining the first constraint $dV/d\theta = 0$ until we reach a point on a saddle node surface, which is a manifold where both the first and second constraints hold.\footnote{A local minimum of \(|\partial_\theta^2 V|\) with respect to variation of all parameters, that lies on the fixed point manifold will throw the algorithm off, but this is a co-dimension \(m\) point for a system with \(m\) parameters, and so highly unlikely.} Minimizing the third derivative within the saddle node manifold maintains the first two constraints and allows for finding a cusp bifurcation associated with two stable equilibria. Successive iterations allow for identifying bifurcations between an increasing number of equilibria and eventually the butterfly bifurcation. Our gradient continuation algorithm adapts standard algorithms from the dynamical systems literature \cite{Kuznetsov2004,PyDSTool,Guckenheimer} and retools them to locally follow the gradient of the unsatisfied constraint (see SI for further details). We depict the resulting search path in Fig.~\ref{Fig:Search}b, which highlights the fact that, independent of the number of parameters, the search algorithm follows a 1D trajectory, which is organized by the nested structure of the intermediate bifurcations. These properties enable the algorithm to find realizable bifurcations for systems with hundreds of parameters. \begin{figure}[ht!] \centering \includegraphics[width=.6\columnwidth]{fig3v6.pdf} \caption{ \textbf{Bifurcations of multiple equilibria. a)} \uline{Work cycle near a butterfly:} A system operating near a hypothetical symmetrized butterfly bifurcation can cycle between three states. The bifurcation is associated with a potential \(V = \theta^6+a_4 \theta^4 + a_2 \theta^2 + a_1 \theta\) and three accessible states denoted by large (L), medium (M) and small (S). As the system follows the trajectory denoted by black arrows with colored background marking its state \(\theta\), it cycles between the three states snapping from S to M to L and back to S by changing \(a_2\) and \(a_1\) while \(a_4=0.1\). The snaps occur at saddle node bifurcations (colored curves) whose color signifies the state \(\theta\) of the minima that is annihilated at each boundary. \textbf{b)} \uline{Gradient Continuation algorithm:} The search algorithm finds bifurcations of multiple equilibria by following a one dimensional curve. Starting from a bifurcation of \(k\) equilibria the algorithm searches for a bifurcation of \(k+1\) equilibria by following a curve in the augmented parameter space, tangent to the gradient of \(|V^{k+1}|\) in the \(k^{th}\) bifurcation manifold. We draw a search for a butterfly bifurcation in its symmetric normal form potential. The entire volume denotes the equilibrium manifold. Starting from a fixed point, the algorithm finds a saddle node bifurcation (along the white curve), Parameters are then varied on the saddle node surface (yellow), and cusp surface (thin lines) to respectively find a cusp bifurcation (along the gray curve) and a swallow tail bifurcation (along the black curve) near a butterfly bifurcation (black point). } \label{Fig:Search} \end{figure} \section*{Three states and the Butterfly Bifurcation}\label{Sec:Search} As a proof of concept for our approach we demonstrate the construction and operation of a magneto elastic machine with 3 stable states operating near a bifurcation of multiple equilibria. The first step in designing such a machine is to implement our gradient continuation algorithm to design a magneto elastic potential with a butterfly bifurcation between three stable states. To realize a system operating near such a bifurcation where only three control parameters ($x$,$y$,$z$ positions of panel 1) are actively varied, we allowed the algorithm to also determine the $x$,$y$ positions of two of the nine magnets on panel 1.\footnote{Typically, a butterfly bifurcation requires four control parameters to navigate between all of the stable states. Here, we have identified a nonlinear mapping of the three active control parameters ($x$,$y$,$z$) onto the four dimensional space, which enables transitions between arbitrary minima.} With these seven parameters, the algorithm was able to identify multiple butterfly bifurcations that satisfied these criteria (See SI for details). Having found an appropriate butterfly bifurcation, we use standard dynamical systems continuation algorithms\cite{guckenheimer2007cusp,Kuznetsov2004} to compute and plot the saddle node surfaces in the control parameter space ($x$,$y$,$z$) near the bifurcation (Fig.~\ref{Fig:Triple}). We find multiple distinct surfaces where the color denotes the angle $\theta$ at which the saddle node bifurcation occurs\footnote{There is further local data in the potential at a saddle node surface that can instruct the design of a trajectory. For example the sign of the third derivative of the potential signals whether the state's angle will increase or decrease as it bifurcates. Moreover, the merging of saddle node surfaces can also be delineated by plotting the cusp bifurcations. Here, we do not include this additional information for ease of viewing}. Instructed by these surfaces, we design a cyclic path through the parameter space such that the system snaps between the large, medium, and small minima. The path color at each point denotes the system state, $\theta$. As with the cusp and symmetrized butterfly bifurcations depictions in Figs.~\ref{Fig:landscape}d and \ref{Fig:Search}a, transitions occur at intersections of the path and saddle node surfaces where their colors match. We note that for the generic butterfly bifurcation, the surface structure can be quite complicated as shown by the two projections in Fig.~\ref{Fig:Triple}a,b. In contrast to the symmetrized butterfly bifurcation structure (Fig.~\ref{Fig:Scaling}a), this complicated structure necessitate using all three control parameters $x$, $y$, and $z$, to design a pathway that cycles between the three states. Importantly, despite the surface complexity the design is robust. Specifically, since the trajectory crosses surfaces, slight deviations in the control parameters should still lead to similar snaps, snap sequences, and ultimately the resulting complex actions of the entire magneto elastic machine. Using the design parameters determined by our search algorithm, we built a magneto elastic machine similar to that depicted in Fig.~\ref{Fig:landscape}a, but with a different magnetic dipole pattern and with two of the magnets in panel 1 displaced in the panel plane (See SI). By following the theoretically predicted path, we found three snap through transitions from small to large, large to medium, and medium to small (Fig.~\ref{Fig:Triple}c and Movie S1). Two of the transitions occurred at the predicted locations, while the large to medium transition was displaced by 0.4 cm from its predicted location. In addition, we found excellent fidelity between the predicted and measured angles $\theta$ for the equilibrium states. Using the same magneto elastic machine, we also designed and demonstrated cyclical paths with two transitions (See Fig.S3 and Movie S3). Finally, when the system was taken apart and reassembled, we were able to reliably reproduce the transitions associated with the designed trajectories. \begin{figure*}[th!] \centering \includegraphics[width=0.95\linewidth]{figures/Fig4forwardv3.pdf} \caption{ \textbf{3-state Cycle Near Butterfly Bifurcation Point} \textbf{(a.)} \uline{Theory} The saddle node surfaces of a magneto-elastic system with three active control parameters, x,y and z are plotted, their color denotes the angle \(\theta\) at which the snap occurs. The system's magnetic pattern is designed using the gradient continuation algorithm such that it operates near a butterfly bifurcation where multiple saddle node surfaces coalesce, enabling multiple snap-through transitions at the surfaces. A trajectory (colored tube with white arrows) is chosen such that the system snaps in cycles between three states Large (L), Medium (M) and Small (S) angles. The system's predicted state is denoted by the tube's color. At intersections of the trajectory with a surface where their colors match the system is predicted to snap to a new state. \textbf{(b.)} \uline{Experimental demonstration:} The colored dots mark the experimental value of the system's state as it follows the designed trajectory. We observe three distinct transitions as predicted. }\label{Fig:Triple} \end{figure*} \section*{Discussion} The experimental validation of this design paradigm with a butterfly bifurcation of 5 equilibria strongly supports the conjecture that this framework could be extended to design systems performing increasingly sophisticated functions by operating near bifurcations with a growing number of equilibria. Potential energies with these increasingly rare bifurcations can be found efficiently, because the gradient continuation algorithm follows a one dimensional search path. Moreover, the associated lever mechanisms provide a design feature where the operation of the machine will likely be confined to a small parameter volume, enabling the execution of these actions by realizable machines. Microscopic magneto-elastic machines could prove to be a useful instance of design instructed by bifurcations of multiple equilibria: An important emerging strategy for manufacturing microscopic and soft machines is fabricating them using two dimensional lithographic and printing techniques \cite{kim2012designing,Ware2015Voxelated,na2015programming,gladman16biomimetic,Miskin2020electronically}. Such fabrication techniques, however, restrict the implementation of compound mechanisms composed of springs, cogs, screws etc. that are used to achieve complex actions in traditional macroscale machines. These lever mechanisms could be replaced with magneto elastic mechanisms with lever advantages induced by bifurcations. Magnetic interactions are especially well suited for this purpose since they are long ranged and not easily screened. This long range allows for global changes to the conformation in response to local actuation of system components. Importantly, since bifurcations of multiple equilibria are notoriously sensitive to variations of parameters, there is a concern that a machine operating near such bifurcations will be very sensitive to environmental noise, such as thermal vibrations, as well as to fabrication precision. Indeed, close to a bifurcation the sensitivity of the system to variations of certain combinations of the system parameters grows exponentially as the number of associated equilibria increases. Mathematically this is captured by mapping the potential to a canonical normal form via a change of coordinates \cite[~Sec. 36.6]{Berry1977,NIST:DLMF} (see SI for derivation). Practically, however, this increased sensitivity is often blunted outside of the infinitesimal environment of the bifurcation. At a finite distance from the bifurcation the mapping to the normal form or its linearization will often cease to be valid because of other singularities of the potential or the nonlinear fall off in the potential. This non-linearity is especially pronounced in keplerian potentials such as that of magnetic interactions. Critically, the saddle node manifolds coalescing at the bifurcation are generically preserved outside this radius of convergence as they are topologically protected and can only annihilate at a cusp or a bifurcation of more equilibria. Thus, operating a machine near a bifurcation of multiple equilibria, but at a finite distance from it, allows the design of trajectories that take advantage of the multiple saddle node transitions associated with it, and their lever advantages, while avoiding the local exponential sensitivity. Similarly, the sensitivity of a system designed near a bifurcation of multiple equilibria to external noise grows exponentially with the number of associated states. This growth in sensitivity arises from the decrease in the potential barriers between adjacent states. For example in a potential with \(k\) equilibria where all the potential barriers are of equal height, and the minima are equally deep (which is proportional to a Chebyshev polynomial of the first kind of order \(k+1\)) the barrier heights decay as \(2^{-k}\). This sensitivity seems prohibitive as we imagine implementing this design principle to create systems cycling between multiple states. Despite this increased sensitivity, however, we estimate that the strength of magnetic interactions assures that magneto elastic systems are robust to thermal noise at the microscale. Specifically, in magneto elastic systems the potential is proportional to the dipole-dipole interaction strength \(\mu_0\mu^2 L^6/R^3\) of two magnets with magnetic dipole densities \(\mu\) panel size \(L\) and typical distance between dipoles \(R\). Thermal noise is then comparable to the magneto elastic potential barrier height when the number of equilibria \(k\sim \log_2\left(\frac{\mu_0\mu^2 L^3/(R/L)^3}{ k_b T}\right)\). The magnetic dipole densities \(\mu\) are of order \(10^6 A/m\) at the microscale \cite{cui2019nanomagnetic}. The smallest two state door (equivalent to the device in Fig.~\ref{Fig:landscape}a) that is robust to thermal noise is then \(\sim.1\mu m\) in size, approaching the size limit of 30nm for fabricating stable magnetic domains \cite{Ran2019magnetic}. Conversely, a 100 $\mu m$ machine will become sensitive to thermal noise near a bifurcation of \(\sim 40\) equilibria, that is 20 distinct states compressed in a span of \(100\) degrees. Finally, the designs that we have implemented in this paper assume operation in a low Reynolds number regime where inertia can be neglected. In the macroscale implementation this was achieved by attaching a damping panel immersed in a solution of glycerol. We expect our designs to work even better as these machines are implemented at smaller scales since the importance of inertia drops quadratically with the system size. Operation of a 100 $\mu m$ scale machine in water, for example, would enable the system to be in the low Re regime while operating at rates that are 1000 fold faster than those in the macroscale experiment. \section*{Conclusions}\label{sec:Discussion} We have shown that the operation of multi-parameter machines near bifurcations of multiple equilibria allows them to efficiently and robustly cycle between multiple conformation. Moreover, we developed a generic step-by-step framework to design and implement systems that operate near such bifurcations. Specifically, we: 1) created a search algorithm that optimizes over fabrication and other system parameters to enable operation near such bifurcations; 2) mapped the manifold of saddle node bifurcations to determine a useful trajectory for the machine operation and; 3) demonstrated the robustness of this approach by constructing and operating a magneto elastic machine that can cycle and robustly snap between multiple distinct configurations in response to small variations of a few control parameters. Importantly, this design approach and step-by-step implementation is generic and could be applied to many complex systems with multiple interacting components ranging from artificial proteins, where the interactions are electrostatic, to neural networks (both biological and synthetic) where the interactions are governed by network topology. Cycling between transitions in mechanical implementations of such systems can generate work or locomotion. If the system is over-damped, as is often the case in microscopic systems operating in fluids, work and locomotion can be achieved by coupling the system to mechanisms that break time reversal symmetry. These mechanisms include ratchets or cilia-like flexible rods \cite{lauga2011life}. In the case of the magneto elastic hinge described here, time reversal symmetry is broken by combining the smooth translations of the control panel with abrupt transitions in the state of the dynamic panel. In systems where the control variable is not a mechanical parameter time reversal symmetry can be broken by using the angle as an effective dynamical variable governing a system with multiple degrees of freedom such as is often used to parameterize robot locomotion. More broadly, it is interesting to consider the extension of our work to systems with a larger number of dynamical variables ($\theta_1, \theta_2, \ldots$). Here, we envision that by working near bifurcations of multiple variables (e.g. elliptic umbilic bifurcations) one could organize snaps between states separated along multiple variables. Such designs require extending our search algorithm to multiple variables while maintaining its low dimensional search path. Alternatively, one could design mechanisms based on multiple local bifurcations that are weakly coupled across the machine. For example, one bifurcation of $n$ states could be used to control $\theta_1$ while a second bifurcation of $m$ states organizes the dynamics of the variable $\theta_2$. By weakly coupling the panels, and hence the variables $\theta_1$ and $\theta_2$, the machine can transform between $n \times m$ states in a coordinated fashion. Indeed this approach is already being implemented for bifurcations with two states \cite{coulais2018multistep,bense2021pathways,shohat2022memory}. Increasing the number of states associated with each variable would enable a similarly rich landscape for machine design with far fewer mechanical elements or panels. Finally, it is interesting to consider whether this design paradigm can be used to understand natural systems beyond the Venus fly trap and hummingbird beak. For example, molecular machines such as proteins often transition between different configurations. It is interesting to consider whether such transitions can be thought of as snaps organized by bifurcations of many states \cite{huang2016coming,eckmann2019colloquium}. As another example, bifurcation theory has been implemented to identify and explain epigenetic dynamics of cell differentiation \cite{Rand2021gene,marco2014scuba, setty2016wishbone}. These approaches often focus on consecutive 2-state bifurcations. The results presented here however, suggest that a comparably simple evolutionary pathway could entail development of multi-state bifurcations. Such a structures could allow the addition of new states while maintaining the existing configuration through an evolutionary process, similar to the path taken by the gradient continuation algorithm. \section{Materials and methods:} \subsection*{Construction of experimental hinge system} Panel P1 is constrained to a set of linear translation stages that allow its position to be adjusted manually to any $x$ or $y$ coordinates near the cusp. For experiments near the butterfly bifurcation point, an extra translation stage is attached to Panel P1 to allow adjustment of its $z$ coordinate. Panel P2 is attached to an OVA friction-less thrust air bushing with a 13mm shaft. The air bushing is attached to a fixed metal housing to limit Panel P2 to its rotational degree of freedom. A T-shaped paddle is attached to the bottom of the shaft and immersed in glycerol to introduce damping to the system. Additionally, we position a Basler Ace aca3088-57um area scan camera above the center of the air bushing to take top-view images of the air bushing which are then used to calculate the angle response of Panel P2 to high precision. \subsection{Panels for experiments near cusp point} Each magnetic panel is constructed using two 1/16 in thick laser-cut acrylic pieces and nine grade N48 neodymium magnets of diameter 1/16 in and height 1/8 in. Magnets are arranged in a 3-by-3 square lattice with lattice constant of 2.5 cm. \subsection{Panels for experiments near butterfly point} Each magnetic panel is constructed using two 1/16 in thick laser-cut acrylic pieces and nine grade N48 neodymium magnets of diameter 1/8 in and height 1/8 in. Magnets are arranged in a 3-by-3 square lattice with lattice constant of 2.5 cm. In panel P1 the \(x,y\) position of two of the magnets is displaced according to the design determined by the search algorithm. The two magnets whose position is offset are the magnet in the bottom row on the right column, whose offsets are $dx1 = 1.418 \text{cm}$, $dy1 = -0.273 \text{cm}$, and the magnet in the middle row on the left column, with offsets $dx2 = -0.826 \text{cm}$, $dy2 = -0.986 \text{cm}$. A technical drawing illustrating the panels used for the butterfly experiment is included in the SI. \begin{figure}[h] \centering \includegraphics[width=0.6\linewidth]{Setup.pdf} \caption{\textbf{Experimental Setup} Sketch of the experimental system used for demonstration of cycles and angle measurements. Panel P1 is attached to a set of translation stages which allows us to implement the spatial control parameters in all experiments. Panel P2 is attached to an air bushing that is fixed in space. An attachment submerged in glycerol is added to the base of Panel P2 to introduce damping to the system. }\label{Fig:Setup} \end{figure} \subsection*{Angle measurements} A marker is attached to the top of the air bushing, and a camera records the location of the marker during the experiment. At each given time, the measured angle is the determined by three points: current marker location, location of the center of rotation, and marker location at $\theta = 0$. We calibrate the system by recording the location of the pixel at $\theta = 0$ and several other distinct angles. The pixel location corresponding to the center of rotation is obtained using a fitted circle through the calibration data points. The resulting angle is then deduced from the three measured points. This data collection process is conducted in MATLAB. \textbf{Acknowledgments } We thank Michael Brenner, Chrisy Xiyu Du, Yan Yang, Robert Distasio, and John Guckenheimer for inspiring discussions. This work was financially supported primarily by NSF Grant DMREF-89228, NSF Grant EFRI-1935252, NSF Grant CBET-2010118, Cornell Center for Materials Research DMR-1719875, and by Air Force Office of Scientific Research Grant MURI: FA9550-16-1-0031. I.G was also supported by the Cornell Laboratory of Atomic and Solid State Physics. D.H was supported by an NSF Graduate Research Fellowship Grant No. DGE-2139899. {
\section{Introduction} Heavy fermion compounds are prototypical examples of strongly correlated electron systems, and have been found to host a range of emergent phenomena including unconventional superconductivity, complex magnetic order and strange metal behavior \cite{weng2016multiple,si2010heavy,coleman2007heavy}. Ce-based heavy fermions contain a Kondo lattice of Ce-ions with an unpaired $4f$ electron, which can both couple to other $4f$ moments via the Ruderman-Kittel-Kasuya-Yosida (RKKY) interaction and undergo the Kondo interaction due to hybridization with the conduction electrons. Here the RKKY interaction gives rise to long-range magnetic order, while the Kondo interaction favors a non-magnetic Fermi-liquid ground state with greatly enhanced quasiparticle masses. Due to the small energy scales, the relative strengths of these competing interactions can often be tuned by non-thermal parameters such as pressure, magnetic fields and chemical doping \cite{Doniach_1977}, and in many cases the magnetic ordering can be continuously suppressed to zero temperature at a quantum critical point (QCP). A major question for heavy fermion systems is the relationship between quantum criticality, and the dome of unconventional superconductivity sometimes found to encompass the QCP. CeIn$_3$ is a canonical example of this phenomenon, which at ambient pressure orders antiferromagnetically below $T_{\rm N}$ = 10.1~K, but exhibits a pressure-induced QCP around 2.6~GPa, which is surrounded by a superconducting dome with a maximum $T_{\rm c}$ of 0.2~K \cite{mathur1998magnetically}. The layered Ce$M$In$_5$ ($M$= transition metal) compounds consist of alternating layers of $M$In$_2$ and CeIn$_3$ along the $c$-axis \cite{Thompson_2012}, and among the remarkable properties is a significantly enhanced superconducting $T_{\rm c}$ for the $M$= Rh and Co systems, reaching over 2~K \cite{Tuson_2006,Petrovic_2001}, giving a strong indication that quasi-two-dimensionality is important for promoting heavy fermion superconductivity. Meanwhile the Ce$_2M$In$_8$ compounds correspond to a stacked arrangement of two units of CeIn$_3$, and one of $M$In$_2$ \cite{PhysRevB.64.144411}, and are expected to have an intermediate degree of two dimensionality relative to Ce$M$In$_5$. Correspondingly, the superconducting phases have lower $T_{\rm c}$ values of 0.4 and 0.68~K for Ce$_2$CoIn$_8$ \cite{chen2002observation} and Ce$_2$PdIn$_8$ \cite{PhysRevLett.103.027003} at ambient pressure, and a maximum of $T\rm_c$ = 2~K at 2.3 GPa for Ce$_2$RhIn$_8$ \cite{PhysRevB.67.020506}. On the other hand, these different series of related Ce-based heavy fermion systems also exhibit different magnetic ground states and crystalline electric field (CEF) level schemes \cite{Curro2000,Bao2000,Bao2001,Christianson2002,Christovam2019} and therefore it is challenging to disentangle the role of these factors from that of the reduced dimensionality. The elucidation of the interplay between these different aspects requires examining additional families of layered Ce-based heavy fermion systems for quantum critical behaviors, as well as detailed characterizations of the magnetic ground states and exchange interactions. The properties of layered Ce-based heavy fermion gallides have been less studied than the indium-based systems. CeGa$_6$ has a layered tetragonal structure (space group $P4/nbm$), with four Ga-layers between each Ce layer \cite{Pelleg1981}. This compound orders magnetically below $T_{\rm N}$ = 1.7~K, and there is evidence for the build-up of magnetic correlations at significantly higher temperatures \cite{Erik_1999}. A more layered structure is realized in the Ce$_2M$Ga$_{12}$ ($M$= Cu, Ni, Rh, Pd, Ir, Pt) series, where the Ce-layers are alternately separated by four Ga-layers, and units of $M$Ga$_6$, leading to a larger interlayer separation of the Ce-atoms \cite{Macaluso_2005,Cho_2008}. Several members of this series show evidence for both antiferromagnetism and heavy fermion behavior \cite{Macaluso_2005,Cho_2008, Nallamuthu_2014,Sichevych_2012,Gnida_2013,PhysRevB.101.024421}, where pressure can readily suppress the antiferromagnetic transitions of Ce$_2$NiGa$_{12}$ and Ce$_2$PdGa$_{12}$ \cite{Kawamura_2014,Ohara_2012}, while evidence for field-induced critical fluctuations is revealed in Ce$_2$IrGa$_{12}$ \cite{PhysRevB.101.024421}. CePdGa$_6$ has a different layered tetragonal structure (space group $P4/mmm$) displayed in Fig.~\ref{fig1}(a), consisting of square layers of Ce-atoms, with each Ce contained in a CeGa$_4$ prism, separated by PdGa$_2$ layers \cite{MACALUSO2003296}. Correspondingly, there is a distance between Ce-layers of 7.92~\AA, while the nearest neighbor in-plane Ce-Ce separation is 4.34~\AA, compared to respective values of 7.54~\AA~ and 4.65~\AA~in CeRhIn$_5$ \cite{Hegger_2000}. CePdGa$_6$ orders antiferromagnetically below $T_{\rm N}$ = 5.2~K, and heavy fermion behavior is evidenced by an enhanced Sommerfeld coefficient \cite{MACALUSO2003296,Macaluso_2005}. As such, CePdGa$_6$ is a good candidate to look for novel behaviors arising in quasi-two-dimensional heavy fermion systems, but there is both a lack of detailed characterizations of the magnetic ground state, and no reports of the evolution under pressure. In addition, most measurements of CePdGa$_6$ are reported in Ref.~\onlinecite{MACALUSO2003296}, where the results are affected by the inclusion of an extrinsic antiferromagnetic phase Ce$_2$PdGa$_{12}$, which can be eliminated using a modified crystal growth procedure \cite{Macaluso_2005}. In this article we report detailed measurements of the magnetic properties of single crystals of CePdGa$_6$, including their evolution upon applying magnetic fields and hydrostatic pressure. We find that CePdGa$_6$ orders antiferromagnetically in zero-field, where the Ce-moments are orientated along the $c$-axis and align ferromagnetically within the $ab$-plane, but there is antiferromagnetic coupling between layers. At low temperatures, two metamagnetic transitions are observed for fields along the $c$-axis, the lower of which corresponds to a spin-flip transition to a phase with magnetization one-third of the saturated value. From our analysis of the magnetic susceptibility, we propose a CEF level scheme which can explain the low temperature Ising anisotropy, and we find that from considering interactions between the nearest-neighbor and next nearest neighbor Ce-layers, the field evolution of the magnetic state can be well accounted for. \begin{figure}[h] \includegraphics[width=8cm]{fig1.eps} \setlength{\abovecaptionskip}{-0.cm} \caption{(Color online) (a) Crystal structure of CePdGa$_{6}$ where the red, blue and green atoms correspond to Ce, Pd and Ga, respectively. $\mathcal{J}_0$ represents magnetic exchange interactions between nearest neighbor Ce atoms within the $ab$-plane, $\mathcal{J}_1$ is between nearest neighboring layers and $\mathcal{J}_2$ is between next nearest layers. An image of a typical single crystal of CePdGa$_{6}$ is also displayed, where each square in the background is $2$~mm~$\times~2$~mm. (b) X-ray diffraction pattern measured on a single crystal of CePdGa$_{6}$. The red dashes correspond to the positions of the ($00l$) Bragg peaks, indicating that the [001] direction is perpendicular to the large face of the plate-like samples. } \label{fig1} \end{figure} \section{Experimental details} Single crystals of CePdGa$_{6}$ were grown using a Ga self-flux method with a molar ratio of Ce:Pd:Ga of 1:1.5:15 \cite{Macaluso_2005}. Starting materials of Ce ingot (99.9$\%$), Pd powder (99.99$\%$) and Ga pieces (99.99$\%$) were loaded into an alumina crucible which was sealed in an evacuated quartz tube. The tube was heated to 1150$~^\circ$C and held at this temperature for two hours, before being rapidly cooled to 500$~^\circ$C at a rate of 150 K/h and then cooled more slowly to 400$~^\circ$C at 8 K/h. After being held at 400$~^\circ$C for two weeks, the tube was removed from the furnace, and centrifuged to remove excess Ga. The obtained crystals are plate-like with typical dimensions $2\times1.5\times0.3$~mm$^3$. Note that when slower cooling rates of 6 K/h or 4 K/h were used, the resulting crystals were significantly smaller. Single crystals of the non-magnetic analog LaPdGa$_6$ were also obtained using a similar procedure. The composition was confirmed using a cold field emission scanning electron microscope (SEM) equipped with an energy dispersive x-ray spectrometer. The phase of the crystals were checked using both a PANalytical X’Pert MRD powder diffractometer using Cu-K$\alpha$ radiation, and a Rigaku-Oxford diffraction Xtalab synergy single crystal diffractometer equipped with a HyPix hybrid pixel array detector using Mo-K$\alpha$ radiation. The obtained lattice parameters from the single crystal diffraction data of $a$ = 4.3446(3)~$\rm\AA$ and $c$ = 7.9173(10)~$\rm\AA$ are in excellent agreement with previous reports \cite{MACALUSO2003296}. Measurements of a crystal using the powder diffractometer are displayed in Fig.~\ref{fig1}(b), where all the Bragg peaks are well-indexed by the (00$l$) reflections of CePdGa$_6$, demonstrating that the $c$-axis is perpendicular to the large face of the crystals. Resistivity and specific heat measurements were performed in applied fields up to 14~T using a Quantum Design Physical Property Measurement System (PPMS-14) down to 1.8~K, and to 0.3~K using a $^3$He insert. Resistivity measurements were performed after spot welding four Pt wires to the surface, with the excitation current in the $ab$-plane. Magnetization measurements were performed in the range 1.8 - 300 K in applied fields up to 5~T using a Quantum Design Magnetic Property Measurement System (MPMS) SQUID magnetometer. Heat capacity measurements under pressure were carried out in a piston cylinder cell, using an ac calorimetric method. \section{results} \begin{figure}[t] \includegraphics[width=8.6cm]{fig2.eps} \caption{(Color online) Temperature dependence of the resistivity $\rho(T)$ of CePdGa$_{6}$ between 1.8 and 300 K. The inset displays the low temperature resistivity, where there is a sharp anomaly at the antiferromagnetic transition. } \label{fig2} \end{figure} \begin{figure}[t] \includegraphics[width=8.6cm]{fig3.eps} \caption{(Color online) (a) Magnetic contribution to the specific heat $C\rm_m$ at low temperatures, where the red solid line shows the results from fitting with Eq.~\ref{EqSpinW}. The inset shows the total specific heat $C$ of CePdGa$_{6}$ and the non-magnetic analog LaPdGa$_{6}$. (b) Temperature dependence of $C\rm_m/T$ and the magnetic entropy $S\rm_m$ of CePdGa$_{6}$. The pink dotted line displays the low temperature contribution to the specific heat calculated from the CEF scheme deduced from the analysis of $\chi(T)$. } \label{fig3} \end{figure} \begin{figure}[h] \includegraphics[width=8.6cm]{fig4.eps} \caption{(Color online) (a) Low temperature magnetic susceptibility $\chi(T)$ of CePdGa$_{6}$, with an applied field of $\mu_0H$ = 0.1 T both parallel to the $c$-axis and within the $ab$-plane. (b) Temperature dependence of 1/($\chi$-$\chi_0$) up to 300 K for 0.5~T applied along the two field directions, where the dashed and solid lines show the results from fitting with the CEF model described in the text. } \label{fig4} \end{figure} \subsection{Antiferromagnetic transition and CEF excitations of CePdGa$_{6}$ } Figure~\ref{fig2} displays the temperature dependence of the resistivity $\rho(T)$ of CePdGa$_{6}$ between 1.8 and 300 K, which has a residual resistivity ratio [RRR = $\rho$(300~K)/$\rho(2~K)]=3.8$. A broad shoulder is observed at around 50 K, which likely arises due to both the Kondo effect, and as a consequence of CEF excitations. At higher temperatures, quasilinear behavior is observed, which could be due to electron-phonon coupling. As shown in the inset, there is an anomaly at around $T_{\rm N}=5.2$~K, below which $\rho(T)$ decreases more rapidly with decreasing temperature, which corresponds to the antiferromagnetic transition reported previously \cite{Macaluso_2005}, while no signature of the spurious transition at higher temperatures is detected \cite{MACALUSO2003296}. The total specific heat of CePdGa$_{6}$ and nonmagnetic isostructural LaPdGa$_{6}$ are shown in the inset of Fig.~\ref{fig3}(a). The temperature dependence of the magnetic contribution to the specific heat $C_m$ was estimated by subtracting the data of LaPdGa$_{6}$, which is shown in Fig.~\ref{fig3}(a), while the specific heat coefficient $C_{\rm m}/T$ and the magnetic entropy $S_{\rm m}$ of CePdGa$_{6}$ are displayed in Fig.~\ref{fig3}(b). A pronounced $\lambda$-like anomaly is observed at $T\rm_{N}$ = 5.2~K, as is typical for a second-order magnetic phase transition. For $T>T_{\rm N}$, $C_{\rm m}/T$ increases with decreasing temperature, and extrapolates to a relatively large zero temperature value of $250~\mathrm{mJ} / \mathrm{mol}~\mathrm{K}^{2}$. As discussed below, the analysis of the magnetic susceptibility $\chi(T)$ suggests the presence of a low lying CEF level, which could contribute to $C_{\rm m}/T$ in this temperature range. The dotted line in Fig.~\ref{fig3}(b) shows the calculated $C_{\rm m}/T$ for the CEF level scheme described below, which has a sizeable value in the vicinity of the transition. Subtracting the contribution from the CEF at $T\rm_{N}$ yields an estimate of $\gamma\sim121.4~\mathrm{mJ} / \mathrm{mol}~\mathrm{K}^{2}$ associated with the ground state doublet, and such an enhanced value could arise both due to heavy fermion behavior, as well as the presence of short range magnetic correlations, as inferred in CeRhIn${_5}$\cite{PhysRevB.69.024419,PhysRevB.66.054433}. The data below $T\rm_N$ were analyzed using \cite{de2000quantum}: \begin{equation} \begin{aligned} C_{\mathrm{m}} &=\gamma T+c \Delta_{\mathrm{SW}}^{7 / 2} \sqrt{T} \exp \left(\frac{-\Delta_{\mathrm{SW}}}{T}\right) \\ & \times\left[1+\frac{39 T}{20 \Delta_{\mathrm{SW}}}+\frac{51}{32}\left(\frac{T}{\Delta_{\mathrm{SW}}}\right)^{2}\right] \end{aligned} \label{EqSpinW} \end{equation} \noindent where the first term corresponds to the electronic contribution and the second term arises due to antiferromagnetic spin-waves. Here the coefficient $c$ is related to the spinwave stiffness $D$ via $c \propto D^{-3}$, while $\Delta_{\text {SW }}$ is the spin-wave gap. The results from fitting the zero-field data are displayed in the main panel of Fig.~\ref{fig3}(a), where $\gamma=121.4~\mathrm{mJ} / \mathrm{mol}~\mathrm{K}^{2}$ was fixed, yielding $\Delta_{\mathrm{SW}}=2.3~\mathrm{K}$ and $c=23~\mathrm{mJ} / \mathrm{mol} ~\mathrm{K}^{2}$. The moderate value of $\Delta_{\text {SW }}$ is smaller than $T_{\rm N}$, unlike the layered heavy fermions gallides Ce$_2$PdGa$_{12}$ and Ce$_2$IrGa$_{12}$ where $\Delta_{\text {SW }}>T_{\rm N}$ \cite{PhysRevB.101.024421,Gnida_2013}, likely reflecting the weaker magnetocrystalline anisotropy in CePdGa$_6$. The temperature dependence of the magnetic entropy $S_{\mathrm{m}}$ of CePdGa$_6$ is also displayed in Fig.~\ref{fig3}(b), obtained by integrating $C_{\mathrm{m}}/T$, where $C_{\mathrm{m}}/T$ was linearly extrapolated below 0.4~K. At $T_{\mathrm{N}}$, $S_{\mathrm{m}}$ reaches $0.76R \ln 2$, which together with the expected sizeable contribution from the excited CEF level discussed above, suggests a reduced entropy corresponding to the ground state doublet due to Kondo screening. Figure~\ref{fig4}(a) displays the temperature dependence of the magnetic susceptibility $\chi(T)$ of CePdGa$_{6}$ at low temperatures, with an applied field of $\mu_0H$ = 0.1 T along the $c$-axis and within the $ab$-plane, which both exhibit an anomaly at $T\rm_{N}$. At low temperatures, $\chi(T)$ is significantly larger for fields along the $c$-axis than in the $ab$-plane, demonstrating that the $c$-axis is the easy-axis of magnetization. At $T\rm_{N}$, there is a peak in $\chi(T)$ for $H\parallel c$, while for $H\parallel ab$ $\chi(T)$ weakly increases below $T\rm_{N}$, indicating that this corresponds to an antiferromagnetic transition with moments ordered along the easy $c$-axis. At higher temperatures, the data above 100 K can be analyzed using the Curie-Weiss law: $\chi$=$\chi_0$+$C$/$(T-\theta_{\rm CW})$, where $\chi_0$ is a temperature-independent term, $C$ is the Curie constant and $\theta_{\rm CW}$ is the Curie-Weiss temperature, yielding $\theta^c_{\rm CW}=-11.7(3)$~K and an effective moment of $\mu\rm_{eff}^c$ = 2.35$\mu_B$/Ce for $H\parallel c$, as well as $\theta^{ab}_{\rm CW}=-12.9(8)$~K and $\mu\rm_{eff}^{ab} = 2.49\mu_B$/Ce for $H \parallel ab$. The obtained values of $\mu\rm_{eff}$ for both directions are close to the full value of $2.54~\mu_B$ for the $J=\frac{5}{2}$ ground state multiplet of Ce$^{3+}$. At lower temperatures, there is a deviation of $\chi(T)$ from Curie-Weiss behavior, due to the splitting of the ground state multiplet by crystalline-electric fields. To analyze the CEF level scheme, we considered the following Hamiltonian for a Ce$^{3+}$ ion in a tetragonal CEF \cite{hutchings1964point} \begin{equation} \begin{aligned} \mathcal{H}_{\rm CF} =B_{2}^{0} O_{2}^{0}+B_{4}^{0} O_{4}^{0}+B_{4}^{4} O_{4}^{4} \end{aligned} \end{equation} \noindent where $O_{l}^{m}$ and $B_{l}^{m}$ are Stevens operator equivalents and parameters, respectively. The $B_2^0$ parameter can be estimated from the high temperature susceptibility using \cite{JensenBook} \begin{equation} \begin{aligned} B_{2}^{0}=\frac{10 k_{B}\left(\theta^{ab}_{\rm CW}-\theta^{c}_{\rm CW}\right)}{3(2 J-1)(2 J+3)}, \end{aligned} \label{B20eq} \end{equation} \noindent where $J=\frac{5}{2}$ for the ground state multiplet of Ce$^{3+}$, yielding $B^0_2$ = -0.01077 meV. $\chi(T)$ along both directions was analyzed taking into account the contribution from the CEF $\chi^{i}_{\rm CEF}$, as well as molecular field parameters $\lambda^{i}$ using \begin{equation} \begin{aligned} \chi^i=\chi^{i}_{0}+\frac{\chi^{i}_{\mathrm{CEF}}}{1-\lambda^{i} \chi^{i}_{\mathrm{CEF}}}, \end{aligned} \end{equation} \noindent where the superscript $i$ denotes the $c$-axis or $ab$-plane. With $B^0_2$ fixed from Eq.~\ref{B20eq}, values of $B^0_4$ = -0.0746 meV and $|B^4_4|$ = 0.496 meV were obtained, together with molecular field parameters of $\lambda^c$ = -3.55~mol/emu and $\lambda^{ab}$ = 8.15~mol/emu, $\chi^{c}_{0}=2.2\times10^{-4}$emu/mol and $\chi^{ab}_{0}=-2.3\times10^{-3}$emu/mol, and the fitted results are shown in Fig.~\ref{fig4}(b). These parameters yield a CEF scheme with a $\Gamma_7$ ground state Kramer’s doublet $\left|\psi_{1}^{\pm}\right\rangle =0.883\left|\pm \frac{5}{2}\right\rangle-0.469\left|\mp \frac{3}{2}\right\rangle$ (for positive $B^4_4$), and excitations to $\Gamma_6$ and $\Gamma_7$ levels of $\Delta_1$ = 2.8 meV and $\Delta_2$ = 32.1 meV, respectively. At high temperatures, the small negative $B^0_2$ leads to a nearly isotropic $\chi(T)$, while at low temperatures, the negative $B^0_4$ leads to the observed Ising anisotropy with an easy $c$-axis. The predicted moment along the $c$-axis is given by $\left\langle\mu_{z}\right\rangle=\left\langle\psi_{1}^{\pm}\left|g_{J} J_{z}\right| \psi_{1}^{\pm}\right\rangle=1.4~\mu_B$/Ce, which is larger than the value obtained from the saturated magnetization. The positive value of $\lambda^{ab}$ is consistent with ferromagnetic coupling between spins within the basal plane, while the smaller negative $\lambda^c$ is consistent with weaker antiferromagnetic coupling between Ce layers. \begin{figure}[t] \includegraphics[width=8.6cm]{fig5.eps} \caption{(Color online) Temperature dependence of the specific heat of CePdGa$_{6}$ in various applied magnetic fields (a) parallel to the $c$-axis, and (b) within the $ab$-plane. } \label{fig5} \end{figure} \begin{figure}[t] \includegraphics[width=8.6cm]{fig6.eps} \caption{(Color online) Temperature dependence of the magnetic susceptibility $\chi(T)$ of CePdGa$_{6}$ in different magnetic fields parallel to the $c$-axis for fields (a) below, and (b) above 1~T. The vertical arrows mark the position of the antiferromagnetic transition. Panel (c) shows $\chi(T)$ for various fields applied within the $ab$-plane, where the dashed line shows the evolution of $T_{\rm N}$ with field. } \label{fig6} \end{figure} \begin{figure}[t] \includegraphics[width=8.6cm]{fig7.eps} \caption{(Color online) (a) Isothermal field dependence of the magnetization $M(H)$ of CePdGa$_{6}$ for fields along the $c$-axis, at three temperatures below $T_{\rm N}$. The lower inset displays the low field region of the data in the main panel, demonstrating hysteresis about the metamagnetic transition, while the upper inset shows $M(H)$ at 2~K for fields within the $ab$-plane. (b) Field dependence of the resistivity $\rho(H)$ of CePdGa$_6$ at several temperatures for fields along the $c$-axis. The dashed lines show the evolution of the two metamagnetic transitions. } \label{fig7} \end{figure} \begin{figure}[h] \includegraphics[width=8.6cm]{fig8.eps} \caption{(Color online) Temperature dependence of the ac heat capacity of CePdGa$_6$ at various hydrostatic pressures up to 2.2~GPa. The vertical dashed line shows the position of the ambient pressure $T_{\rm N}$, which remains nearly unchanged with pressure. } \label{fig8} \end{figure} \begin{figure}[h] \includegraphics[width=8.6cm]{fig9.eps} \caption{(Color online) Temperature-field phase diagram of CePdGa$_6$ at ambient pressure for fields along the easy $c$-axis, from measurements of the resistivity, magnetization, and specific heat. The solid line shows the evolution of $T_{\rm N}$, while the dashed lines show the positions of the low temperature metamagnetic transitions. The magnetic structures at low temperature are also illustrated by the orange arrows, where in zero-field there is an antiferromagnetic ground state, while upon applying a field the system passes through an intermediate $\uparrow\uparrow\downarrow$ phase, before entering the spin polarized state. The inset shows the field dependence of the magnetization based on mean-field calculations of the magnetic ground state calculated using the \textsc{McPhase} software package \cite{Rotter2004}, with the parameters described in the text. } \label{fig9} \end{figure} \subsection{Field dependence of the magnetic properties} In order to determine the behavior of the magnetic ground state in magnetic fields, and to map the field-temperature phase diagrams, measurements of the specific heat and magnetization were performed in different applied fields. Figure~\ref{fig5}(a) displays the low temperature specific heat of CePdGa$_{6}$ with different fields applied along the $c$-axis. It can be seen that $T\rm_{N}$ is gradually suppressed with increasing field, and at fields greater than 2~T, no magnetic transition is observed. Instead, there is a broad hump in $C/T$, which shifts to higher temperature with increasing field, corresponding to the Schottky anomaly from the splitting of the ground state doublet in the applied field. In Fig.~\ref{fig5}(b), $C/T$ is displayed for fields within the $ab$-plane, where the antiferromagnetic transition is more robust than for fields along the $c$-axis, and the broad Schottky anomaly is only clearly resolved in a field of 12~T. The differences in the field dependence for the two different field directions is consistent with the low temperature Ising anisotropy in CePdGa$_{6}$, where a smaller field along the easy $c$-axis can bring the system to the spin-polarized state. The low temperature $\chi(T)$ in different applied fields are displayed in Fig.~\ref{fig6}. For fields along the $c$-axis distinctly different behaviors are observed for different field ranges. In a field of 0.1~T, there is a sharp peak at $T\rm_{N}$, corresponding to entering the antiferromagnetic ground state. At a larger field of 0.5~T, only a small hump is observed at $T\rm_{N}$, while at low temperatures there is an increase in $\chi(T)$, and at higher fields there is broad peak which is gradually suppressed with field. Meanwhile for fields within the $ab$-plane up to at least 8~T, there is a gradual suppression of $T\rm_N$, in line with the specific heat results. The isothermal magnetization as a function of field along the $c$-axis at three temperatures below $T\rm_{N}$ is displayed in Fig.~\ref{fig7}(a), measured upon both sweeping the field up and down. In zero-field there is no remanent magnetization, consistent with a purely antiferromagnetic ground state. At 2~K, there are two metamagnetic transitions at $H_{m1}=0.4$~T and $H_{m2}=2.1$~T, where hysteresis is also observed indicating a first-order nature, whereas otherwise the magnetization plateaus, with only a weak change of the magnetization with field. This is consistent with $H_{m1}$ and $H_{m2}$ corresponding to spin-flip transitions, with the spins remaining orientated along the $c$-axis. For fields above $H_{m2}$, no magnetic transition is observed in the specific heat, and therefore this likely corresponds to the system reaching the spin polarized state, with a saturation magnetization of $M_s=1.1~\mu_{\rm B}$/Ce. On the other hand, above $H_{m1}$ the magnetization reaches a value of $0.35~\mu_{\rm B}$/Ce, corresponding to $\approx M_s/3$, indicating a change of magnetic structure with a ferromagnetic component. While there is little change in the field-dependence of the magnetization at 3~K, the curves at 4~K are drastically different. Instead of there being abrupt step-like metamagnetic transitions, the magnetization smoothly increases with field, reaching a very similar saturation value. This suggests that at higher temperatures, the spins continuously rotate upon increasing the applied field, rather than undergoing abrupt spin flip transitions. The field dependent magnetization at 2~K for fields in the $ab$-plane is also shown in the inset of Fig.~\ref{fig7}(a), which smoothly changes with field, with no sign of saturation up to at least 5~T, consistent with this being the hard direction of magnetization. The metamagnetic transitions are also revealed in the field dependence of the resistivity $\rho(H)$, as displayed in Fig.~\ref{fig7}(b) for fields along the $c$-axis. At 0.3~K, two abrupt anomalies are observed corresponding to $H_{m1}$ and $H_{m2}$, which are also detected at 1.8~K and 3~K. Above these transitions, there is a decrease of $\rho(H)$, consistent with the reduced spin-flip scattering arising from a larger ferromagnetic component to the magnetism. On the other hand, no metamagnetic transitions are detected at 5~K, where instead there is a broad peak in $\rho(H)$, again consistent with a more gradual reorientation of the spins with field at higher temperatures. \subsection{Magnetism of CePdGa$_{6}$ under pressure } To determine the evolution of the magnetic order under pressure, the temperature dependence of the ac specific heat of CePdGa$_{6}$ was measured at several different hydrostatic pressures up to 2.2~GPa, which are displayed in Fig.~\ref{fig8}. It can be seen from the dotted line that there is little change of $T\rm_N$ with pressure indicating the robustness of magnetic order. In the case of the layered Ce$_2M$Ga$_{12}$ compounds, the $T\rm_N$ of Ce$_2$NiGa$_{12}$ and Ce$_2$PdGa$_{12}$ decrease with pressure, and antiferromagnetism is suppressed entirely above 5.5 and 7~ GPa, respectively \cite{Kawamura_2014,Ohara_2012}. On the other hand the $T\rm_N$ of Ce$_2$IrGa$_{12}$ undergoes a moderate enhancement from 3.1 to 3.7~K for pressures up to 2.3~GPa, indicating that this compound is located on the left side of the Doniach phase diagram \cite{PhysRevB.101.024421}. In the case of CePdGa$_6$, the robustness of $T\rm_N$ suggests that measurements to higher pressures are required to situate this compound within the framework of the Doniach phase diagram and to examine whether there is pressure-induced quantum criticality in CePdGa$_{6}$. \section{DISCUSSION} Our measurements of the resistivity, magnetic susceptibility and specific heat show that CePdGa$_{6}$ orders antiferromagnetically below $T\rm_N$ = 5.2~K, with the moments orientated along the $c$-axis. Figure~\ref{fig9} displays the temperature-field phase diagram for magnetic fields applied along the $c$-axis. The phase boundaries obtained from different measurements are highly consistent, showing that $T\rm_N$ shifts to lower temperatures with field, before abruptly disappearing in a field of 2~T. At low temperatures, there are two step-like metamagnetic transitions shown by the dashed lines, where the second transition is to the spin polarized state, while the lower transition corresponds to a change of magnetic state to a phase with a magnetization of 0.35 $\mu\rm_{B}$/Ce, about one-third of the saturated value. Such step-like changes in the magnetization suggest that the spins are strongly constrained along the $c$-axis, and therefore there are abrupt spin-flip transitions for fields applied along the ordering direction. On the other hand, at 4~K the magnetization changes smoothly with field, reaching the same saturated magnetization, indicating that at this temperature the spins continuously rotate in the applied field. Such a change with temperature may be a consequence of only a moderate magnetocrystalline anisotropy, as also evidenced by the relatively small value of the spin-wave gap $\Delta_{\mathrm SW}/T_{\rm N}\approx0.4$, as compared to the other heavy fermion gallides Ce$_2$IrGa$_{12}$ and Ce$_2$PdGa$_{12}$ which have $\Delta_{\mathrm SW}/T_{\rm N}$ of 1.5 and 2.8, respectively \cite{PhysRevB.101.024421,Gnida_2013}. From the analysis of the magnetic susceptibility including the CEF contribution, the molecular field parameter is positive in the $ab$-plane ($\lambda^{ab}$), while a smaller negative value is obtained along the $c$-axis ($\lambda^{c}$). Together with the fact that only a relatively small field along the $c$-axis is required to reach the spin polarized state, this suggests that the antiferromagnetic ground state consists of ferromagnetically ordered Ce-layers coupled antiferromagnetically along the $c$-axis. The simplest model for such a system would consist of ferromagnetic Heisenberg exchange interactions between nearest neighbor Ce atoms within the $ab$-plane $\mathcal{J}_0>0$, and antiferromagnetic exchange interactions $\mathcal{J}_1<0$ between nearest neighboring layers, as well as a sufficiently strong Ising anisotropy. This yields an $A$-type antiferromagnetic ground state consisting of ferromagnetic layers with moments orientated along the $c$-axis, where the moment direction alternates between adjacent layers, ``$\uparrow\downarrow\uparrow\downarrow$''. This model however cannot account for the field induced phase with one-third magnetization, since for fields along the $c$-axis, only a metamagnetic transition directly from the $\uparrow\downarrow\uparrow\downarrow$ phase to the spin polarized state is anticipated. In order to realize the intermediate field-induced phase, it is necessary to consider an antiferromagnetic exchange $\mathcal{J}_2$ between next nearest neighboring layers. In this case, from considering the classical ground state energies with sufficiently strong Ising anisotropy, the same $\uparrow\downarrow\uparrow\downarrow$ ground state is realized for $\mathcal{J}_1/\mathcal{J}_2>2$, while a $\uparrow\uparrow\downarrow\downarrow$ state occurs for $\mathcal{J}_1/\mathcal{J}_2<2$ \cite{Li2019}. Upon applying a magnetic field along the $c$-axis, there is a metamagnetic transition at a field $H_{m1}$ to an $\uparrow\uparrow\downarrow$ state with a net magnetization one-third of the saturated value, and another at $H_{m2}$ to the spin polarized state, where $H_{m2}/H_{m1}$ is determined by $\mathcal{J}_1/\mathcal{J}_2$. We performed mean-field calculations of the magnetic ground state and magnetization using the \textsc{McPhase} software package \cite{Rotter2004}, which determines the most stable magnetic structure at a given temperature and magnetic field from considering multiple random starting moment configurations. These took into account the Heisenberg exchange interactions described above, as well as the CEF Hamiltonian $\mathcal{H}_{\rm CF}$ with our deduced values of the Stevens parameters. As shown in the inset of Fig.~\ref{fig9}, the observed values of $H_{m1}=0.4$~T and $H_{m2}=2.1$~T, from the midpoints of the metamagnetic transitions at 2~K, are well reproduced from the mean-field calculations at 2~K with $\mathcal{J}_1=-0.023$~meV and $\mathcal{J}_2=-0.0085$~meV, where for $H_{m1} < H < H_{m2}$ the $\uparrow\uparrow\downarrow$ ground state has the lowest energy. Keeping these values fixed, we find that a nearest neighbor in-plane ferromagnetic interaction $\mathcal{J}_0=0.034$~meV can yield the observed value of $T_{\rm N}=5.2$~K. Therefore our analysis suggests stronger in-plane ferromagnetic interactions, where the value of $4\mathcal{J}_0/(2\mathcal{J}_1+2\mathcal{J}_2)=2.16$ is close to our fitted value of $\lambda^{ab}/\lambda^c=2.3$. Note that here we have assumed a $\uparrow\downarrow\uparrow\downarrow$ ground state with $\mathcal{J}_1/\mathcal{J}_2>2$. Although a $\uparrow\uparrow\downarrow\downarrow$ phase has been reported in CeCoGe$_3$ \cite{PhysRevB.88.134416}, such a scenario is less likely in CePdGa$_6$ due to the larger interlayer distances. Compared to the layered heavy fermion antiferromagnet CeRhIn$_5$, the magnetism in CePdGa$_6$ appears to have a much more three dimensional character, whereas it is rather two-dimensional in the former, with $\mathcal{J}_1/\mathcal{J}_0=0.13$ deduced from inelastic neutron scattering \cite{Das2014}. In addition, in CeRhIn$_5$ the easy plane anisotropy and presence of in-plane antiferromagnetic interactions give rise to spiral magnetic order which is incommensurate along the $c$-axis \cite{Curro2000,Bao2000}, and these features may be important factors for realizing the unconventional quantum criticality and superconductivity. On the other hand, the $T_{\rm N}$ of CePdGa$_6$ is much more robust with pressure, remaining almost unchanged at pressures up to 2.2~GPa. Therefore an understanding of the relationship between the magnetism and any quantum critical behaviors will require measurements at considerably higher pressures. In addition, despite the layered arrangement of Ce atoms, the \textit{local} environment of the Ce atoms is relatively three dimensional, as evidenced by the derived CEF parameters being close to that for a cubic system (where $B_2^0=0$ and $|B_4^4|=5|B_4^0|$). This CEF scheme can correctly predict the low-temperature Ising anisotropy, but the predicted moment along the $c$-axis is larger than that observed. While such a reduced moment compared to that predicted from the CEF level-scheme is often observed in heavy fermion antiferromagnets due to screening of the moments by the Kondo effect \cite{PhysRevB.88.134416,Bao2000,Christianson2002,Stockert2004,Goremychkin1993}, confirming whether such a scenario is applicable to CePdGa$_6$ requires a more precise determination of the CEF parameters, by measurements such as inelastic neutron scattering. \section{Conclusion} In summary, we have characterized the magnetic properties of the heavy fermion antiferromagnet CePdGa$_6$, and their evolution upon the application of magnetic fields and pressure. We have constructed the temperature-field phase diagram for fields along the $c$-axis, where at low temperatures there are two abrupt metamagnetic transitions corresponding to spin-flip transitions. From the analysis of the magnetic susceptibility, we propose a CEF level scheme for the splitting of the ground state $J=5/2$ multiplet, indicating that the Ising anisotropy at low temperatures is driven by the sizeable $B_4^0$ parameter. Moreover, our results are consistent with an antiferromagnetic ground state consisting of ferromagnetically coupled Ce-layers, with antiferromagnetic coupling between layers. We have proposed a model for the exchange interactions which can explain the evolution of the magnetic ordering with applied magnetic field, which has sizeable nearest neighbor and next-nearest neighbor layer interactions, indicating the presence of significant long-range magnetic interactions. Despite evidence for heavy fermion behavior, there is negligible change of $T_{\rm N}$ upon applying pressures up 2.2~GPa, and hence measurements at much higher pressures are necessary to look for evidence of quantum criticality. \section{acknowledgments} We are grateful to Martin Rotter for advice with the \textsc{McPhase} software. This work was supported by the National Key R$\&$D Program of China (2017YFA0303100), the Key R$\&$D Program of Zhejiang Province, China (2021C01002), and the National Natural Science Foundation of China (12174332, 12034017 and 11974306).
\section{Introduction} Before the advent of social medias, brand crises were largely caused by journalists’ contributions. Nowadays, a firestorm is a cluster of consumers' digital word of mouth that highlights some communication error, or some terrible mistake made by a company~\cite{hansen2018brand}. The Cambridge dictionary\footnote{\url{https://dictionary.cambridge.org}} defines the firestorm as \textit{``a sudden, and sometimes violent reaction''} and the shitstorm as \textit{``a wildly chaotic and unmanageable situation, controversy, or sequence of events''}. In this paper, I will use both these terms interchangeably. During the last years, many firestorms took place on the Internet~\cite{pfeffer2014understanding,MCdonald,Astrazeneca}, mainly due to the increase of the number of users on social networks. In some cases, firestorms have been formally studied to better understand this phenomenon~\cite{nuortimo2020establishing, pfeffer2014understanding, hansen2018brand}. In 2007, several researchers debated over firestorms, and one of the main outcomes is that \textit{``a natural science model of the research process is suitable for studying the social world but a central issue remaining of whether the social world can, and should be, studied according to the same principles, procedures, and philosophy as the natural sciences''} ~\cite{BrymanBell2007}. This is relevant because today I are actually able to study and evaluate social dynamics by using the massive amount of data coming from the digital world, with particular emphasis on social networks~\cite{Rinaldi2017RealtimeMA}. Firestorms are not made of a single event with a standard behaviour, instead they are caused by non-linear dynamics leading to complex behaviours. Due to this, companies must have appropriate procedures to respond to various crisis situations. Lehtonen's theory \cite{lehtonen1999kriisiviestinta} shows that a firestorm develops in five stages: \textit{(1) latent stage, where weak signals of the upcoming crisis are received; (2) triggering event, where the subject becomes the target of news and social media attention; (3) the subject is in the top-news and the media attention spikes; (4) the media attention calms down to the level of general philosophical and ethical discussion; and (5) there are only minor media hits and attention is guided to other issues} \cite{nuortimo2020establishing}. As firestorms begin when there is a service failure, a social failure or when a company fails to communicate properly~\cite{hansen2018brand}, this kind of errors can be reduced by following appropriate procedures. However, most of the existing quality and security procedures, such as the ones suggested by ISO 9001:2015~\cite{ISO9001} and ISO/IEC 27002:2022~\cite{ISO27002} are not adequate for a multi-domain cyber and social attack. Because, regard to the 27002:2022, social attacks are outside the scope, while, 9001:2015, even if it focuses on better business process quality, thus, less firestorm risk from the public, it does not mitigate the firestorm from an attacker. Hence, in this paper I theorise that it is possible for an attacker to intentionally cause a firestorm attack to undermine the reputation of a company, with the side-effect of advantaging the competitors. I argue that self-organised Firestorm attacks require a high number of bots that are already active on social medias: in this case, bots start the firestorm on the target company, spreading fake news (or magnifying a certain event, e.g., a mistake made by the company in the past) that will cause a high volume of real people to react negatively and continue the social attack, unknowingly on behalf of the adversary. Additionally, I argue that Open Source Intelligence (OSINT) could allow an adversary to identify weak spots in the organization, namely people who most likely cannot react properly or defend themselves from the firestorm, hence not being able to timely mitigate its impact. Many workers have a LinkedIn, Facebook, or Twitter account: moving the firestorm on the social media accounts of people who work for the target company can lead to an extremely stressful situation for workers. This could be even worse for people who do not often deal with public relations, and could cause confusion, panic and distress. In fact, when a firestorm arises, even people who work on communication processes and managers can panic, and the fear of losing customers and partners can be very detrimental for any company. When people working in the target firm are in this altered status, I argue it is possible to elaborate a social engineering strategy to capture protected information: in this case, not only firestorms serve the purpose to undermine the corporate image, but they are also used as a diversion for a social engineering attack. In fact, while most important organisations adhere to best-practices listed in security standards like ISO/IEC 27002:2022 \cite{ISO27002}, during a social attack like firestorms, some best-practices and procedures may be distorted or bypassed, both intentionally or by mistake, due to the pressure applied to people who are in charge of complying to such procedures \cite{halkos2010effect}. \textbf{Contributions.} The paper makes these contributions: \begin{enumerate} \item I explain how to make an automated and organized firestorm attack, with only a few manual operations such as the choice of a topic and of a hashtag; \item I introduce a taxonomy of possible actions that the attacker could perform while doing the firestorm; \item I illustrate how the author of a firestorm can evade detection for their attack by targeting single workers instead of the company profiles, while increasing the damage done to the firm. \item I show possible long and short term procedures that a company can implement to mitigate the effect of firestorms attacks. \end{enumerate} \section{Cyber-Attack Planing Prelude} \label{classAnalysis} In this section, I illustrate a novel strategy to artificially cause a firestorm, leveraging a botnet to start agitating real people against a target company. Due to the large number of posts that bots can create within seconds, they can be used to amplify any idea on social networks, influencing political affairs~\cite{carrerandbechis2020} and business company value~\cite{barcellona_2021}. For example, due to a cyber-attack on a Twitter newspaper profile, such newspaper shared a fake news about President Obama being injured by a bomb in the White House, causing a flash-crash in Wall Street and the stop all of economic transactions for some minutes. This led to a loss of about 121 billion dollars for S\&P 500 and its related companies~\cite{Flashcrash}. I structure the attack plan in six stages: \begin{enumerate} \item \textbf{Finding an event/topic to build the firestorm attack on.} This can be a past event or an error that the firm has committed in the past, which will be used as a basis for the upcoming attack. I define this event as the \textit{target topic}. \item \textbf{Using bots to create or amplify the latent state.} By leveraging a botnet, an adversary can create a high number of posts on social media, allowing the target topic to reach more people and giving them the opportunity to react negatively. This can eventually lead to a state where real people start to autonomously talk about the subject and begin to spread information about the target topic on their own. To facilitate this, the attacker can reuse an old trending hashtag or create a new one: the hashtag is the keyword to incite social action due to the information symbolised by the word itself. \item \textbf{Letting the topic spread among people.} The ideal situation for the attacker is that real people begin posting about the target topic, after learning about it from the botnet's posts. This will bring more attention to the topic, possibly making it a trending one. For example, Twitter allows users to check what topics and hashtags are currently popular. If this happens, there will be moment in which there are enough people posting about the target topic, so that the firestorm can sustain itself for days, without any other post coming from the attacker's botnet. I call this moment the \textit{fire point}.\footnote{In chemistry, the \textit{fire point} is the lowest temperature at which a certain fuel will continue to burn for a minimum of five seconds, when ignited.} Instead, if real people did not react negatively to the topic, or the topic did not reach enough people to allow the firestorm to reach the fire point, the discussion on the topic will slow down and will eventually end. In this case, I say that the firestorm is \textit{extinguished}. However, the attacker can change the target topic and restart from Stage 1. \item \textbf{Identifying human targets.} Managers (e.g., Chief Technical Officers, Chief Executive Officers) are the decision makers of a company. The attacker might want to keep a list of these people in order to use these names when the attack will move over from the company's social network profiles to the employees' ones. Identifying the people who are most proud to work for the attacked company can also be helpful in exerting more pressure on the company (since they have more to do with the value of the company). \item \textbf{Focusing on workers.} During the peak activity of the firestorm, those same bots that built the latent state will move their focus on the public social media profiles owned by employees of the attacked firm. These profiles were identified in the previous step of the attack. This may cause the attention of the firestorm to shift towards the employees, also causing them to experience discomfort. Because the brand is usually at the center of the firestorm, focusing people will have a stronger impact on them, and it can disrupt internal processes. \item \textbf{Performing the cyber attack.} Because people will put less attention in following internal procedures, many safety best-practices adopted by the company may not be followed properly, or may even be ignored. The attacker can exploit this behaviour to their own advantage. \end{enumerate} In order to shift the focus from the company to the worker, it is necessary to optimise the timescale and timing of the transition, as it is not linear for people to attack the worker, but it can happen more easily if the negative event is of high negative impact and value. Shifting the attack on employees has another side-effect, which is beneficial to the attacker: the organisations that are responsible for the public cyber security in every country cannot see the Firestorm attack on the company page, because the Firestorm is focused on workers only Such organisations will hardly be able to detect all comments and posts focused on workers, allowing the attacker to create a smoky form of the attack, which can bypasses conventional security measures, procedures and strategies. Since they have to focus primarily on the company under attack, therefore, possibly not give so much attention to analysing every single interaction against all the operators of the attacked company. \\ \section{Business Social mood-disease and network strategy} \label{testGeneration} The Cambridge Analytica case highlighted the role and the importance of social media for the majority of the population and organisations. A document produced by the American Ministry of Justice, to examine the possible foreign influence on US, showed how there actually exist organisations (such as the IRA - Internet Research Agency)~\cite{intelligencesenate} that aim to influence individuals, public and private organisations~\cite{ReportUSA}. A great part of what is needed to successfully influence people lies to understand the initial conditions of the system, i.e. in the correct profiling of such people through data obtained on social networks. People who are more sensitive to certain issues, and those key people who can influence the most the community where they live and work are the main focused people for a social attack, because they have a central role (hubs) in the network. Profiling consists in obtaining (through a process of data collection and subsequent processing) an absolute or almost absolute understanding of a group of individuals or a single person, comprehending their habits and preferences \cite{Profilazionesicurezza}. The information obtained concerns political, musical and social interests, including the identification of their network of friends, colleagues, and much more. This information allow a much easier conveying of any content, as it is possible to understand who is most susceptible and interested on various topics, affecting their weaknesses, fears and interests. Furthermore, it is possible to infer who could possibly propagate a certain content through their network, exponentially increasing the chance of success if the subject in question is a person with an important or main role. Cambridge Analytica used the OCEAN model, related to personality traits, to understand preferences of many people in the US during the national election on 2016 \cite{intelligencesenate}. The OCEAN model allows to send specific messages and contents to people who are sensible to a certain topic. This method is very different from the classic and standard mass communication, because it is possible to send the right content to the right person. Unfortunately, the CA scandal was defined as classic political influence, the old-fashioned way, thus including prostitution, favouritism, etc. In reality, the scandal found ``a new type of weapon'' as Brittany Kaiser (former CA business development director) said during her question time (on Commons culture committee in 2018) to describe the work done from CA, but also to categorize AI as a real soft-power weapon~\cite{Profilazionesicurezza}. However, understanding hot topics for workers is not enough -- in order to modify their mood and obtain a good social attack, a subject topic needs to be found as well. On social networks, during firestorms , people are usually triggered by three kinds of errors \cite{hansen2018brand}: \begin{enumerate} \item Social failure \item Communication failure \item Product or service failure \end{enumerate} Although they may seem similar, different types of events can lead to different types of dynamics and reactions. In the case of product or service failures, for example, performance-related crises raise doubts about the brand's ability to deliver basic functional performance \cite{dawar2000impact}. Another research has also identified not only short-term effects to a brand after a firestorm, but also measured long-term ones, at least two years after the latest firestorm \cite{hansen2018brand}. I hereby give an example for each of the aforementioned triggering factors. \begin{enumerate} \item \textbf{Social failure.} The firm might be an accomplice of some accident or crime, like Nike with children shoes~\cite{nike, Brent} or the ING-DiBa case in 2012~\cite{pfeffer2014understanding}. \item \textbf{Communication failure.} The firm might fail to communicate properly, for example making negative comments regarding a certain community or movement~\cite{MCdonald}. \item \textbf{Product or service failure.} The firm might distribute a product that harms consumers, for example a vaccine that can kill people~\cite{Astrazeneca}. \end{enumerate} These failures and the firestorm stemming from them might cause affected employees to experience discomfort and panic, because coworkers, friends and other people in their network might see affected employees as the root-cause of the Firestorm. The social-cyber attack also provokes unlikely passive consequences for companies: \begin{enumerate} \item The value of the company on the financial market could rapidly decrease; \cite{Flashcrash} \item People who worked in the company during the firestorm might be subject to discrimination in future, especially if the firestorm was caused by a (supposedly) unacceptable mistake that could have been avoided~\cite{scottishleft,VolkswagenRallied}. \item As the people, also the offended brand could carry a long-term stigma that would motivate other companies to make job offers to the personnel of the attacked firm. This could put it on an even greater disadvantage, as workers would be incentivized to leave the attacked company and accept the new offer. \end{enumerate} The network, as well as the importance and scope of the news, can thoughtfully influence the reaction and dynamics of the company. The network, as well as the importance and scope of the news, can thoughtfully influence the reaction and dynamics of the company. For example, when a company's workers receive an high importance news, they may behave helplessly in relation to the importance of the news; feeling relieved of responsibility, since the event is bigger than their actions, they tend to pass much of the responsibility on to the company's managers. Indeed, in times of disorder or chaos, Entropy increases with decreasing order, and emergency increases with increasing order: this happens because people within the organisation understood the emergency, and the organisation improve them-self to respond to it~\cite{Entropyemergence}. When many workers in the company are panicking, the organisation's CCO (Chief Communication Officer) will elaborate and react to Firestorm on company pages, however, this cannot stop the social attack on the individual profiles of the employees. Hence, even people who are in charge of running communication processes and managers can panic, as the more is the duration of the firestorm, the higher is the chance of losing clients and reputation. This is a terrible situation for any company, especially after many years of work. However, managers are considered "critical workers" on the organisation chart, hence, they cannot be influenced by social manipulations and social diseases, because of the responsibilities they have in the company. While during the last century such organization charts had the form of a pyramid, usually with the CEO on the top, nowadays the AGILE model allows companies to organise their personnel in different ways within their organization charts. However, the legal and personal responsibility for every error or critical issue will be always be of the top manager of that area -- for example, the CISO (Chief Information Security Officer) is usually responsible for the cyber security. A network side strategy can hard-influence workers close to managers and directors, contaminating directly the mood of the team, including the manager. In a more specific way, the attacker the hub from the company network, defusing also other workers from the company Once the social-disease is already widespread on the company, and many people are stressed about the firestorm, the cyber attack can begin. \section{Assessing the Attack Surface} In this section, I introduce the possible actions that the adversary (or the real people that contribute to firestorm) can perform to further disrupt the target company's business processes, to sink its corporate image, or to get classified information. To do so, I introduce a novel classification of these actions and analyze their impact on the fundamental properties of information security, that is, Confidentiality, Integrity and Availability~\cite{samonas2014cia}. I show these actions can be divided in three categories: \begin{enumerate} \item \textbf{Controlling Large Scale Entities}, that is, thousands or even millions of different actors performing several concurrent actions against a firm. These actors can act both remotely and physically, and can be both robots and humans. \item \textbf{Leveraging Internal People}, namely, exploiting mistakes performed by employees (e.g., because they are stressed due to the firestorm), or having an insider threat who can extract classified information. \item \textbf{Asking for Ransoms}, that is, the adversary may want to ask for a payment to stop the firestorm. This would cause the bots to be shutdown, or even to defend the company on social medias. \end{enumerate} I hereby analyse the different actions within each category and their impact. This analysis is summarised in Table~\ref{tab:attack-surface-assessment}. \subsection{Controlling Large Scale Entities} \paragraph{Denial of Service (DoS) Attacks} The adversary might want to harm the firm's reputation by negating the availability of the services it offers. To this avail, the attacker can leverage botnets to send a very high number of requests per second to the target service, overwhelming the server and resulting in the service going down. If possible, the attacker could even reuse the botnet used to create the latent state, and rearm it with a DoS script. Alternatively, if the adversary is not a single entity but a large group of organised people, a DoS attack can be performed with simple scripts, without leveraging any botnet, as the large number of adversaries could be able to generate the traffic required to overload the server. In this case, however, the adversaries would have to carefully time their attack, and they might want to hide their location, for example by using a VPN. Finally, the adversary could encourage real people to overload the target firm's servers, as they could co-ordinate the attack by using the bot profiles used for the hashtag propaganda. \paragraph{Physical Actions} Business processes can be also interrupted or slowed by legal, yet harmful, physical actions. One example is a demonstration around the firm's premises: employees might not get to their workplace in time because people manifesting outside the building are blocking or slowing access to the premises, or they are creating more traffic than usual on the way to the building. Another example is people calling the organisation's call centers with the only goal of protesting. \subsection{Leveraging Internal People} \paragraph{Human Error} Even though it is widely known that human error is one of the most prominent causes of security incidents~\cite{HumanError1993, HumanFactor2021}, most companies still do not adequately invest in training for their personnel, resulting in data breaches or other security related events~\cite{langlois20202020}. This means that, if the attacker wants to obtain an initial foothold on the target organization's systems, they might be able to do so without needing a firestorm attack, depending on the employees' ability of recognizing phishing emails or scam websites. However, workers who are experiencing firestorm, be it on the company they are working with or on their own profile, will be more inclined to break internal policies, hence committing mistakes, due to the perceived crisis~\cite{bakos2019human}. \paragraph{Offering Help} During the firestorm's peak activity, the adversary itself contacts the attacked firm, pretending to be a professional (e.g, a consultant) who can help in mitigating the effects of the firestorm, for example as a Social Media Manager who has dealt with Firestorms before. This can happen via emails, social networks or through the corporate's website, for example if the firm has some job openings and the adversary pretends to be a candidate. For smaller enterprises, the adversary may even show up in person to the attacked company's premises. If the attacker manages to get hired, they might get access to classified information. I argue the attacker does not want to tamper with documents or attack the firm's infrastructure while being an employee themselves. \paragraph{Insider Threats} Instead of joining the firm themselves, the adversary might establish a contact with employees who are still in the attacked company but are not showing support on social media, or even manifested dissatisfaction towards the company. The attacker might want to try to persuade them in sharing confidential information, making them insider threats~\cite{insiderthreatsincs} -- if they have success, not only they acquire classified information, but if the stolen content is also compromising for the firm, it could be published online to damage the firm's reputation even more. \subsection{Asking for Ransoms} \paragraph{Extortion to Stop the Attack} The adversary contacts the attacked firm and proves the botnet that is performing the firestorm is in their control. They then ask for an arbitrary amount of money in Bitcoins to shutdown the bots, stopping a (hopefully) substantial part of the attack. In fact, if the firestorm already managed to incite many people in joining the social attack, the shutdown of the botnet might not stop or slow down the firestorm. If the adversary plans to attack multiple firms with their firestorms, they to avoid situations like this, because the odds of a victim paying a ransom is proportional to the reliability of the attacker in stopping the attack once they receive the money. In other words, the attacker must be considered ``trusted'' in stopping the attack if the ransom is paid, so victims are more incentivized to pay~\cite{cartwright2019pay}. \paragraph{Defence as a Service} The adversary contacts the attacked firm, but instead of showing they are in charge of running the attack and asking money to stop it, they try to sell a fire(storm)fighter service to the victim, supposedly consisting on bots defending the reputation of the firm: this is basically a reversed firestorm, in which those same bots that built the latent state now defend the company: to avoid drawing excessive attention, the attacker might slowly change the proportion of attacking bots versus defending ones, until they are all defending the company. \begin{table}[!ht] \caption{Social Attack Surface Assessment} \footnotesize \label{tab:attack-surface-assessment} \begin{center} \resizebox{\columnwidth}{!}{ \begin{tabular}{ l l c c c c } \hline \multirow{2}{*}{\textbf{Category}} & \multirow{2}{*}{\textbf{Action}} & \multicolumn{4}{c}{\textbf{Impacts}} \\ \cline{3-6} & & \textbf{Confid.} & \textbf{Integ.} & \textbf{Avail.} & \textbf{Rep.} \\ \hline \multirow{2}{*}{Large Scale} & DoS Attack & No & No & Yes & Yes \\ & Phys. Actions & No & No & Yes & Yes \\ \hline \multirow{3}{*}{Internal People} & Human Error & Yes & Yes & Yes & Yes \\ & Help Offer & Yes & No & No & No \\ & Insider Threat & Yes & No & No & Yes \\ \hline \multirow{2}{*}{Ransoms} & Extortion & No & No & No & No \\ & Defence Service & No & No & No & No \\ \hline \end{tabular} } \end{center} \footnotesize{\textbf{Confid.:} The action can affect the Confidentiality property. | \textbf{Integ.:} The action can affect the Integrity property. | \textbf{Avail.:} The action can affect the Availability property. | \textbf{Rep.:} The action can negatively affect the reputation of the company.} \end{table} \section{Case Study: CD PROJEKT RED} On December 10, 2020, CD PROJEKT RED released a long awaited game called Cyberpunk 2077. This game was very popular even before its release and it generated continuous social hype from the video game community throughout its development, also winning the ``Best Game Awaited'' from Golden Joystick Awards for two consecutive years.\cite{Wikipedia_CD} As shown on Figure~\ref{FIG:1} and Figure~\ref{FIG:2}, hype for the game substantially increased during the 10 days before the release of the game, reaching its apex on December 10, when the hashtag \texttt{\#Cyberpunk2077} was tweeted 193,900 times on Twitter, from users of 53 different nationalities. During this time span, many other hashtags regarding the game were very popular, for example \texttt{\#Cyberpunk2077Hype} was retweeted 10,000 times \cite{Getdaytrends}. However, a few days after the release , the Cyberpunk 2077 topic arise again, this time associated with queries related to patches and refunds. In fact, the game was released too early and many bugs were present: due to this, several people had asked a refund to CD PROJEKT RED, often also writing a bad review for the game on online stores. This created a "information-disease" within the company, just like the one described in Section~\ref{testGeneration}: in this case, CD PROJEKT RED's employees became stressed and felt pressure related to the quality of Cyberpunk 2077, in which they had invested more than two years of hard work. \cite{Wikipedia_CD} In early February 2021, only 60 days after the game's release, CD PROJECT RED was hit by a ransomware attack and attackers were able to extract the source code of several games, including administrative files~\cite{CDproject}. The attackers then threatened the company of leaking or selling the stolen code and files, unless the firm paid a large amount of money to the cyber-criminals. In the end, CD PROJECT RED refused to negotiate with the attackers, stating on a press release that they would ``not give in to demands or negotiate with the actor'', also confirming that no personal information was obtained in the attack and that they were working with law enforcement to track down the attackers~\cite{CDproject2,CDproject3}. Later on, security analysts found the stolen source code while being auctioned on the dark web for a minimum price of 1 million USD. \cite{Arstechnica} The auction was closed after the attackers stated they had received an offer that satisfied them \cite{Arstechnica} Within a week of these auctions, the code was shared online via social media, and CD PROJECT RED began using DMCA take down notices to remove posts containing their code \cite{Vice}. The social hype that CD PROJEKT RED generated for Cyberpunk 2077, was used by hackers to threaten the company in order to extorting money, but also, had a side effect, i.e. damaging the company's reputation, that can bring to undermine the sales of other long awaited games. In Table~\ref{table:Vader} I show the results of the sentiment analysis, obtained from tweets and comments for the hashtag \texttt{\#CDprojectRED}. Data collected from Twitter respects the timeline of Cyberpunk 2077's release and its development; data shown in the table can be organised in three categories: before release (October and November), during release (December and January) and after the release of Cyberpunk 2077 (February). It is possible to observe that in October and November the sentiment remained neutral-positive with a few oscillations. In December, when the game was released, I can observe a small increase in the negative sentiment due to the high number of bugs present in the game, however, this increment is quite negligible. In January, when a greater number of players were playing the game, the negative sentiment became stronger than the positive one, causing not only a negative compound (-0.111), but also a neutral-negative sentiment for the game and for the developers. Finally, on February the sentiment returned neutral overall, however, the presence of negative sentiment is still stronger compered to the one in October and November. These data show how much pressure the CD PROJEKT RED company had to experience during the release of the game. Additionally, in Figure~\ref{FIG:3}, I show the financial value of the company during the whole game release timeline, also marking the two critical events that occurred: the yellow line indicates the release of the game, while the red line indicates the ransomware attack. I can see that, after the release of the game, the financial value of the company suffered a sudden drop, that was likely conditioned by customers losing trust in the company due to the presence of many bugs in the game, bad reviews and critics. I can see that the company regains more than half the value lost during the next two months, however, the ransomware attack causes another drop in the financial value of the company due to customers losing trust in the company again, this time from a security perspective. \begin{table}[ht] \caption{Vader Sentiment on \#Cyberpunk2077 from Twitter} \centering \begin{tabular}{l c c c c} \hline Months&Negative&Neutral&Positive&Compound\\ [0.5ex] \hline October & 0,085 & 0,757 & 0,150 & 0,163\\ November & 0,079 & 0,766 & 0,149 & 0,163 \\ December & 0,087 & 0,750 & 0,161 & 0,153 \\ January & 0,143 & 0,758 & 0,093 & -0,111 \\ February & 0,104 & 0,745 & 0,145 & 0,120 \\ [1ex] \hline \end{tabular} \label{table:Vader} \end{table} \begin{figure} \centering \includegraphics[width=\linewidth]{img/Cyberpunk2077.png} \caption{Interest Score showing social hype for the release of Cyberpunk 2077} \label{FIG:1} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{img/Query.png} \caption{Queries showing social hype for the release of Cyberpunk 2077} \label{FIG:2} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{img/Financial_value_and_timing_event_B_parole.png} \caption{Financial value of CD PROJEKT RED and critical events} \label{FIG:3} \end{figure} \section{Business defence strategy} \label{experiments} To avoid dangerous events for companies, human factor is a crucial element \cite{formicheumano}, however it is also possible to create specific defence strategies. Failures introduced in Section~\ref{testGeneration}, i.e. social failures, communication failures and product or service failures can be analysed to prevent incidents. To the most of us, the news that a particular piece of information (e.g. a meme, a hashtag) went “viral”, reaching millions of nodes in a short period of time may seem purely random and hence unpredictable, but Kolli et al.~\cite{KolliCascade} discovered that, at least 20\% of the times, the cascade volume changes in a manner that appears to be random, and in the remaining 80\% it is possible to predict the cascade’s future volume. Hence, it is possible to create short-term strategies to detect firestorm attacks while they are still in the early stages, i.e. while the latent state is being built. However, it is also possible to create long-term defence strategies with a proactive governance. A possible proactive strategy for the long-term could be as follows: \begin{enumerate} \item Organise internal company procedures to help employees protect themselves against various attacks on social media (like Linkedin); \item Organise procedures outside the company, such as contacting allied/partner companies for help with the various attacks on social media; \item Create in advance supporting bots that will defend the company automatically; \item Create an international database of accounts that have made firestorm. The database, accessible to all organisations, both public and private, will help to understand whether the type of firestorm taking place is real or artificially created. \cite{cyberthreatintelligence} \end{enumerate} These three possible actions can be highlighted by the mass media, which will publicly show that the firestorm is being fought because other people or organisations began defending the attacked company. Hence, these actions allow the firestorms to calm down, and eventually to be extinguished, faster than simply doing nothing.\cite{hansen2018brand} If a company has done something enormously wrong in the past, it is possible that every time the same company does something wrong, there is a chance that another firestorm can restart, either for the recent event or also for the past one. In fact, the firestorm can come back with an interval of about 2 years \cite{hansen2018brand}. In case of social failures, there is also an additional side-effect that must be mitigated, that is, the firestorm naturally expands to the employees without the manipulation of the adversary. Example defence strategies against this side-effect could be implemented as follows: \begin{enumerate} \item{Let people from outside and inside the company on social network, dialogue about that topic (such as the case of carnivores vs vegetarians at ING-DiBa \cite{pfeffer2014understanding}). This strategy can increases the number of followers;} \item Blame an entity that is external to the company as a scapegoat, so the Firestorm can move from the company to the designed entity. Even if it is not very moral, it is something that usually works; \item{Depending on the strength, length, and breadth of the attack, it is possible to make strategy about possible reaction for company. } \begin{enumerate} \item Social failure: If the firestorm is linked to a partner company, or only a certain sector of the company is under attack, immediately distance yourself from them. \item Communication failure: The goal here is to safeguard the company's reputation and authority. In this case, try to detach yourself immediately from the communication error, and continue with the company's reputations strategy, making it appear that it was just an accident on the road. Furthermore, apologising for the event never hurts. \item Product or service failure: Instantly block the production of the affected product or the provision of the service. Organise a commission that can evaluate the quality of product/service. Even if it is complicated given the amount of partners, quality standards and corporate continuity, this action, if done in time, creates a good defensive shield at the communication level, as people can understand that the company itself has also understood the problem, limiting the damage; \end{enumerate} \end{enumerate} Timing is essential during Firestorms, first of all to understand whether the type of firestorm is real or artificial (you can tell by the date of creation of the accounts that do firestorm -- if the initial accounts were born recently, they are probably bots, hence artificial); secondly for improving the cyber defence and be prepared for a possible cyber attack; tertiary for the public reaction, because it means that the affected company has noticed the failure faster or as fast as other people (who are doing the firestorm on social networks) and will promptly react to the problem, reassuring customers that it will be solved. This will help in calming down or extinguishing the firestorm. For example, the carnivores vs vegetarians case at ING-DiBa was caused by a communication failure. The company had never had so much traffic on its Facebook page before, and they saw in this an opportunity to increase the number of their followers. In fact, after a few days had passed from the firestorm, and the attackers were still posting, newly-acquired followers jumped into the debate and started defending the company. \cite{pfeffer2014understanding}\\ \\ Obviously, depending on the type of firestorm,real or artificial, it is necessary for the company to adapt its strategies according to the type of attack (real or artificial). The prevention part, of course, works in both cases, but understanding who you are fighting against and the causes, helps to save the reputation of the company, and sometimes even the company itself. \section{Future Work} \label{related} In one of the next jobs, I would like to implement different pressure dynamics, i.e., either implement rapid, massive, and incisive firestorms, or permanent, with few accounts firestorm. Depending on the firestorm, these types of dynamics can change the pressure on companies and workers in different ways, perhaps showing that for some companies it is better to have a permanent firestorm, or for others a rapid one. Another aspect I would like to draw attention to in future work is also how people are contacted in the company, i.e. with messages that are more likely to provoke an ethical reaction, for example, when people are contacted by bots and they point out to the worker the disaster he has made to his company. This case is very interesting, as it is possible, after 'moralising' the worker, to apply social engineering strategies to facilitate the cyber attack. On the other hand, on the side outside the company, i.e. not focused on employees, strategies can be used to increase the chance of a successful cyber attack, or extortion of information or money. For instance, during the firestorm, it is possible to contact the company under attack, and pose as the national cyber security agency, initiating strategies such as: \begin{enumerate} \item Passing themselves off as the national cyber security agency, they say that most are fake accounts and get information on their security; \item Passing themselves off as the national cyber security agency, enter in their computer system. \item Passing themselves off as the national cyber security agency, saying they are carrying out a cyber attack to test their cyber defences, carry out a second attack immediately afterwards, exploiting the information from the first attack and passing on part of the defences, or, say they are not defending themselves against the first attack so as to obtain the desired data. \end{enumerate} In any case, these kinds of interactions will be carried out by means of computer simulations, since for obvious ethical reasons it is impossible if not extremely difficult to apply these strategies. \section{Conclusions} \label{conclusions} In this paper, I have shown how some events related to cyber security are linked to certain social dynamics. When social dynamics are mixed and linked to cyber purposes, classic attack types (cyber or social attack) can no longer be defined, but social-cyber attacks, as the effectiveness of one also induces a probability of success of the other. \\ I introduce an novel model allowing researchers and companies to (1) understand when companies and organisations have fragile defence against a social-cyber attack, (2) illustrate how company and organisation can defence them self from firestorm, (3) proving that social-cyber attack must be defined as a possible high risk event as multi domain sector, and (4) showing a now model of cyber attack, with a multidisciplinary sociological approach to increase the potentiality of common cyber attack. The data collected from CD project red's event case, shows how these types of attacks, although still little known, may become a norm in the future, as the company's assets are not only its human capital, or the production of goods and/or services, but also its own reputation. \section{Authors \& Paper Information} \subsection{Data gathering} I collect tweets related to the topics \#Cyberpunk2077 by using Tweepy and the Twitter archive API. Both service use the permission from Twitter to obtain and gather data, but any downloaded topic need revisions and cleaning process to increase the quality of the research. For example, I found many copy-paste tweets (caused by spamming process, or fake-account/bot), and also several tweets had (during the Vader Sentiment Analysis) incomprehensible word for the Vader program, and I deleted it. For any topic I use the same methodology to obtained standard and quality data. In addition, to obtain the correct amount of tweet (define as the number of tweet) for each day/hour I use getdaytrends.com, a specific site where it is possible to monitoring every topic in real-time and also aged topic. In total, our data count more then $\sim$5000 Tweet. I obtain the Financial data of CD project RED from https://www.investing.com/equities/cdproject-historical-data site. \subsection{Author Contributions} Investigation and data resources, methodology, data cleaning and software, A.R.; All authors have read and agreed to the published version of the manuscript. \subsection{Funding} The author(s) disclosed receipt of the following financial support for the research, authorship, and/ or publication of this article: This project has received funding from the University of Catania. \subsection{Author biographies} Andrea Russo is a PhD candidate in Complex Systems at the University of Catania. He is currently working at the Department of Physics and Astronomy. He collaborated with CNR Ibam, he also has worked purely on projects involving technology and society. \\ His main research field and interests are focused on the study and the development of Computational social method to explain social complexity, in particular field like Politics - Economics - Business and Defense-Security sector applications. \\ Orchid: 0000-0003-3816-0539\\ Corresponding author. Email: Andrea.russo@phd.unict.it\\ I would like to thank "Vereos" and "Andrea metal clone", who helped me in idealising and refining the paper. \nocite{*} \bibliographystyle{abbrv}
\section{Introduction} \label{sec:intro} Optimal mass transport (OT), originally proposed by Monge in his seminal work \cite{monge1781memoir}, has gathered a widespread interest in the field of learning representations. The original deterministic OT problem was later relaxed by Kantorovich \cite{kantorovich1942transfer} and considered a probabilistic transport problem. This formulation seeks solution for the optimal transport plan which can transport mass between two measures by incurring the minimum cost and is solved using a linear program. The modern day OT is also attributed to the phenomenal work of Kantorovich. Following the OT theory, barycenters in Wasserstein space was proposed by Agueh and Carlier in their remarkable work \cite{agueh2011barycenters}. Further, using entropic regularization \cite{cuturi2013sinkhorn}, a fast method of computing barycenters was proposed by Cuturi and Doucet \cite{cuturi2014fast}. Recent works addresses the challenge of computational complexity of barycenters using neural networks \cite{lacombe2021learning}. In this work, we investigate the barycenters towards robust learning of deep learning models. {D}{eep} learning systems have shown impressive performance in various applications. However, these systems are vulnerable to adversarial perturbations \cite{wong2020fast}, \cite{croce2020reliable}, \cite{xie2019improving}. In order to counter these attacks, several defense mechanisms have also been proposed. In one of the early works, Szegedy {\textit{et al.}}~\cite{szegedy2013intriguing} formulated the adversarial attack as an optimization problem and obtained the adversarial sample using L-BFGS. Several adversarial attacks have been proposed since Szegedy' work \cite{goodfellow2014explaining,kurakin2016adversarial}. On the other hand, strong defense measures have been studied in \cite{madry2017towards}, \cite{theagarajan2019shieldnets}, \cite{wong2020fast}, \cite{rebuffi2021fixing}. \begin{figure}[h] \centering \includegraphics[width=.45\textwidth]{images/IJCAI22teaser.drawio.pdf} \caption{Illustration: Classical defense methods use Adversarial Training (AT) as a major defense technique. Our method obtains barycenter from rotated inputs and uses them for training the model using a cross-entropy loss. During inference time also we compute barycenter of the given sample. The dashed boundary of barycenter indicates that the barycenter is close to input samples in terms of appearance but there are some differences. In the computation of barycenter of adversarial sample, the barycenter shows the changes in same color as that of the background to imply that barycenter suppresses the adversarial noise.} \label{fig:teaser} \end{figure} In the field of adversarial attacks and defense, $l_p$ space has been extensively studied. However, only a few works investigate attacks under OT framework \cite{wong2019wasserstein}, \cite{li2021internal}. There are even fewer works which investigate robustness using OT theory \cite{kwon2020principled}, \cite{subramanyam2022barycentric}. Distinct from these works, we first introduce Beckman barycenter, a concept analogous to Wasserstein barycenter. We use proximal operator methods to solve for the barycenter. The barycenters obtained from the clean samples are used to train a pretrained adversarially robust network. We note that in the absence of adversarial samples in the training, the model would give a better clean accuracy but will suffer in terms of adversarial accuracy. Therefore, we use a pre-trained adversarially robust network to overcome this challenge. An abstract illustration of our method is given in Figure \ref{fig:teaser}. Beckman barycenter is obtained from input marginals via a non-linear interpolation. The input marginals are linearly transformed versions of the input and thus interfere with the adversarial noise. Using these marginals the barycenter generates a sample which is similar in appearance to the input and is closer in terms of class label. Thus, the class label is preserved when the input is a clean sample, whereas, the adversarial noise gets suppressed when the input is an adversarial sample. Further, the network needs to be trained with barycenter of clean samples so as to correctly classify them. However, this training is cheap as a single epoch is sufficient. We prove our hypothesis using extensive qualitative and quantitative experiments. \section{Related Works} \textbf{Adversarial Attacks} Given an adversarial sample $\mathbf{x}$ with label $y$, a target network $f$ parameterized by $\theta$, the adversary tries to find $\mathbf{x}_{adv}$ by adding an adversarial noise such that the prediction $f_{\theta}(\mathbf{x}_{adv}) \neq f_{\theta}(\mathbf{x}) = y$. Some of the robust attacks are iterative FGSM \cite{kurakin2016adversarial}, PGD \cite{madry2017towards}, Carlini and Wagner attacks \cite{carlini2017towards}, Jacobian based attack \cite{papernot2016limitations}, physical attack Athalye \cite{athalye2018synthesizing}, and Autoattack \cite{croce2020reliable}. These attacks are primarily focused in $l_p$ domain. \noindent \textbf{Adversarial Defense} In response to adversarial attacks, several defenses have been proposed. One of the best defense approach is adversarial training \cite{szegedy2013intriguing}, \cite{goodfellow2014explaining}, \cite{moosavi2016deepfool}. Madry {\textit{et al.}}~\cite{madry2017towards} formally studied adversarial training and proposed that such training allows network to defend well against first order adversary. Adversarial logit pairing uses a pair of logits from clean and adversarial examples to defend against adversarial samples \cite{kannan2018adversarial}. TRADES \cite{zhang2019theoretically} prove the bounds based on regularization term which minimizes the difference in prediction between clean and adversarial examples. In \cite{wong2020fast}, authors proposed to effectively combine FGSM and random initialization to demonstrate better adversarial training. RST \cite{carmon2019unlabeled} propose a self-training technique using unlabelled samples to improve the robustness. Observing the correlation between flatness of weight loss landscape and adversarial robustness, Wu {\textit{et al.}}~proposed adversarial weight perturbation (AWP) to regularize the flatness of weight loss \cite{wu2020adversarial}. On similar lines, \cite{yu2022robust} propose a criterion called Loss Stationary Condition (LSC) for constrained perturbation, which regulates the weight perturbation to prevent overfitting. LBGAT \cite{cui2021learnable} constrains the logits of a robust model, trained with adversarial examples, to be similar to the logits of a clean model trained on natural data. While adversarial training uses all the samples, many techniques propose that naively using adversarial samples in adversarial training is not efficient. This primarily involves training the model with a weak attack first, and then gradually increasing the strength of the adversary - CAT \cite{cai2018curriculum}, DART \cite{wang2019dynamic}, MART \cite{wang2019improving}, FAT \cite{zhang2020attacks}. Aforementioned methods rely on pre-determined attack parameters for adversarial sample generation. However, this restricts the model's robustness. To address this issue, LAS-AT \cite{jia2022adversarial} propose a framework for adversarial training that introduces the notion of learnable attack strategy. It is composed of two components: a target network that uses adversarial examples for training to improve robustness, and a strategy network that produces attack strategies to control adversarial sample generation. In similar spirit, A2 \cite{xu2022a2} and \cite{cheng2022cat} have also been proposed. A classical review of defense methods can be obtained in \cite{ijcai2021p591}. In a parallel line of defense works, input purification has also been explored. At the test time, these techniques try to remove the adversarial noise \cite{shi2021online}, TRADES$_{\text{SSL}}$ \cite{mao2021adversarial}, Hedge$_{\text{RST}}$ \cite{wu2021attacking}. Score based generative models such as \cite{yoon2021adversarial} and \cite{nie2022diffusion} have also been used to purify the images before sending them for classification. Our work is inspired from two different theories, namely, OT barycenters and distributional robust optimization. We discuss these theories in the following. \noindent \textbf{Wasserstein Barycenter} In the following we discuss Wasserstein distance and barycenter. Given probability distributions, $ \boldsymbol{\mu}_1, \boldsymbol{\mu}_2$ $\in$ $\Omega$, the Wasserstein distance is defined as, \begin{align} \mathcal{W}(\boldsymbol{\mu}_1, \boldsymbol{\mu}_2) = \inf_{\Omega \times \Omega} c(x,y) \pi(x,y) dx dy, \label{eq:wbary} \\ s.t. \;\int_{\Omega} \pi(x,y) dx = \boldsymbol{\mu}_1(x), \int_{\Omega} \pi(x,y) dy = \boldsymbol{\mu}_2(y), \nonumber \end{align} where the cost matrix $c(x,y) = \lVert x - y\rVert_1$ and $\pi$ denotes the transport plan. This is also known as Earth Mover' Distance (EMD). This form is also used to compute barycenter \cite{cuturi2016smoothed} wherein the summation of Wasserstein distance between the barycenter and each input marginal is considered. However, barycenters are costly to compute and the best known complexity scales exponentially with the number of marginals \cite{fan2022complexity}. EMD can also be represented as dual of the dual of Eq \ref{eq:wbary} in variational form popularly introduced by Beckman \cite{beckmann1952continuous}, \cite{li2018parallel}, \cite{lee2020unbalanced}, \begin{align} \mathcal{W}(\boldsymbol{\mu}_1, \boldsymbol{\mu}_2) =\inf_{\mathbf{M}} \int_{\Omega} \lVert \mathbf{M} \rVert \label{eq:EMD}\\ s.t.\; \text{div}(\mathbf{M}) + \boldsymbol{\mu}_1 - \boldsymbol{\mu}_2 = 0 \nonumber \\ \nonumber \mathbf{M}.\mathbf{n} = 0\; \forall x \in \partial \boldsymbol{\Omega}; n \; \text{is normal to}\; \partial \boldsymbol{\Omega} \nonumber \end{align} Under appropriate discretization, $\mathbf{M} = (\mathbf{M}_x, \mathbf{M}_y)$, $\mathbf{M} \in \mathcal{R}^{n \times 2}$ is flux vector satisfying zero flux boundary conditions. $\boldsymbol{\mu}_1, \boldsymbol{\mu}_2 \in \mathcal{R}^{n}$, and, \begin{equation} \text{div}(\mathbf{M}) = (\mathbf{M}_x[i,j] - \mathbf{M}_x[i-1,j]) + (\mathbf{M}_y[i,j] - \mathbf{M}_y[i,j-1]) \nonumber \end{equation} and the zero-flux boundary conditions mean that $\mathbf{M}_x[i,j] = \mathbf{M}_y[i,j] = 0$ outside the boundary. Eq \ref{eq:EMD} is favorable compared to Eq \ref{eq:wbary} as it reduces the complexity from $\mathcal{O}(n^2)$ to $\mathcal{O}(n)$ \cite{li2018parallel}. Motivated by the recent developments of OT barycenters, we make use of Eq \ref{eq:EMD} to propose Beckman barycenter as they can be efficiently solved using well known techniques like \cite{goldstein2009split}, \cite{chambolle2011first}. \noindent \textbf{DRO} One of the influential works in DRO was proposed by Scarf \cite{scarf1957min}. Following this work, significant research has been done in this field \cite{ben2009robust}, \cite{duchi2021statistics}, \cite{staib2017distributionally}. DRO aims to address the problem of uncertainty or shift in the data distribution that can arise due to measurement errors and admits a solution for the worst case scenario. Let $\mathcal{L}(\boldsymbol{\theta}, \mathbf{x})$ be the loss function where $\boldsymbol{\theta}$ are network parameters. Then, DRO solves for, \begin{equation} \inf_{\boldsymbol{\theta}} \sup_{Q \in \mathcal{Q}} \mathbb{E}_{\mathcal{Q}} \mathcal{L}(\boldsymbol{\theta}, \mathbf{x}) \label{eq:DRO} \end{equation} Here, $\mathcal{Q}$ is the distribution against which DRO minimizes the loss. For instance, $\mathcal{Q}$ can be considered as a distribution set which contains perturbations of input samples $\mathbf{x}$. Here we note that adversarial training can be considered to be a specific instance of DRO wherein the distribution $\mathcal{Q}$ is drawn from adversarial samples. In our case, we consider the barycenters as the samples drawn from the distribution $\mathcal{Q}$ and thus provide robustness against perturbed samples. \subsection{Proposed Algorithm} In this work, we propose a novel Beckman barycenter formulation and derive the barycenter analytically. We use the barycenter to demonstrate that it can be applied for adversarial defense. We first obtain the barycenter using the marginals from the given input image and then train the network using barycenter. While OT barycenters are a good choice for the distribution $\mathcal{Q}$ in Eq \ref{eq:DRO}, computing OT barycenter suffers from high complexity and exponentially increases with the number marginals \cite{fan2022complexity}. To counter this high complexity challenge, we first discuss an analogous barycenter problem by building upon the formulation given in Eq \ref{eq:EMD}, \begin{align} \inf_{\substack{\mathbf{M}_1,\mathbf{M}_2\\ \mathbf{r}_1,\mathbf{r}_2,\boldsymbol{\mu}}} \lVert \mathbf{M}_1 \rVert_{2,1} + \lVert \mathbf{M}_2 \rVert_{2,1} + \alpha(\lVert \mathbf{r}_1 \rVert_1 \label{eq:EMD-barycenter1} \\ + \lVert \mathbf{r}_2 \rVert_1) + \beta\lVert \boldsymbol{\mu} \rVert_1 \nonumber \\ \nonumber s.t.\; \text{div}(\mathbf{M}_1) + \boldsymbol{\mu}_1 - \boldsymbol{\mu} = \mathbf{r}_1 \nonumber\\ \nonumber \text{div}(\mathbf{M}_2) + \boldsymbol{\mu}_2 - \boldsymbol{\mu} = \mathbf{r}_2 \nonumber\\ \nonumber \end{align} where, $\mathbf{r}_1, \mathbf{r}_2, \boldsymbol{\mu} \in \mathcal{R}^n$. Our formulation is loosely inspired from the Beckman OT formulation that is given in \cite{li2018parallel}, \cite{lee2020unbalanced}. There are notable changes in Eq \ref{eq:EMD-barycenter1} from Eq \ref{eq:EMD}. First we solve for Beckman barycenter $\boldsymbol{\mu}$ in addition to other variables. Similar to Wasserstein barycenter which acts as a representative of marginals using Wasserstein metric, the Beckman barycenter $\boldsymbol{\mu}$ minimizes the flux with respect to input marginals $\boldsymbol{\mu}_1$ and $\boldsymbol{\mu}_2$. In our experiments, these marginals are obtained by rotating the input image with $\pm4^{\circ}$. Second, the variables $\mathbf{r}_1$ and $\mathbf{r}_2$ allow the mass to be created or destroyed \cite{lee2020unbalanced} and the regularization over $\mathbf{r}_1$, $\mathbf{r}_2$ and $\boldsymbol{\mu}$ ensure that these variable do not take arbitrarily large values. Third, Eq \ref{eq:EMD-barycenter1} can be easily converted to Lagrange formulation and solved in linear time using primal-dual method of Chambolle and Pock \cite{chambolle2011first}. In order to make the objective strongly convex, we first apply proximal operators. The $l_2$ regularizer makes the objective strongly convex. Using the proximal operator, \begin{align} \inf_{\substack{\mathbf{M}_1,\mathbf{M}_2,\mathbf{r}_1\\ \mathbf{r}_2, \boldsymbol{\mu}_1',\boldsymbol{\mu}_2',\boldsymbol{\mu}}} \lVert \mathbf{M}_1 \rVert_{2,1} + \lVert \mathbf{M}_2 \rVert_{2,1} + \alpha(\lVert \boldsymbol{r}_1 \rVert_1 \label{eq:EMD-barycenter2}\\ + \lVert \boldsymbol{r}_2 \rVert_1) + \frac{1}{2\rho}(\lVert \boldsymbol{\mu}_1' - \boldsymbol{\mu}_1 \rVert_2 + \lVert \boldsymbol{\mu}_2' - \boldsymbol{\mu}_2 \rVert_2) +\beta\lVert \boldsymbol{\mu} \rVert_1\nonumber\\ s.t.\; \text{div}(\mathbf{M}_1) + \boldsymbol{\mu}_1' - \boldsymbol{\mu} = \boldsymbol{r}_1 \nonumber \\ \nonumber \text{div}(\mathbf{M}_2) + \boldsymbol{\mu}_2' - \boldsymbol{\mu} = \boldsymbol{r}_2 \nonumber \end{align} The Lagrangian of Eq \ref{eq:EMD-barycenter2} is given as, \begin{align} \inf_{\substack{\mathbf{M}_1,\mathbf{M}_2,\mathbf{r}_1\\ \mathbf{r}_2, \boldsymbol{\mu}_1',\boldsymbol{\mu}_2',\boldsymbol{\mu}}} \lVert \mathbf{M}_1 \rVert_{2,1} + \lVert \mathbf{M}_2 \rVert_{2,1} + \alpha(\lVert \boldsymbol{r}_1 \rVert_1 \label{eq:EMD-barycenter3}\\ + \lVert \boldsymbol{r}_2 \rVert_1) + \frac{1}{2\rho}(\lVert \boldsymbol{\mu}_1' - \boldsymbol{\mu}_1 \rVert_2 + \lVert \boldsymbol{\mu}_2' - \boldsymbol{\mu}_2 \rVert_2)+\beta\lVert \boldsymbol{\mu} \rVert_1\nonumber \\\nonumber +\sum_i \langle \boldsymbol{\lambda}_i, \text{div}(\mathbf{M}_i) + \boldsymbol{\mu}_i' - \boldsymbol{\mu} - \boldsymbol{r}_i \rangle \nonumber \end{align} Eq \ref{eq:EMD-barycenter3} can be solved using first-order primal dual method of Chambolle and Pock \cite{chambolle2011first}\footnote{We use similar notations to that of \cite{li2018parallel}, \cite{chambolle2011first} for consistency and simplicity.}. \begin{gather*} \mathbf{M}_i^{t+1} \leftarrow \argmin_{\mathbf{M}_i} \lVert \mathbf{M}_i \rVert_{2,1} + \langle \boldsymbol{\lambda}_i, \text{div}(\mathbf{M}_i) + \boldsymbol{\mu}_i' - \\ \boldsymbol{\mu} - \mathbf{r}_i \rangle + \frac{1}{2\tau_1} \lVert \mathbf{M}_i - \mathbf{M}_i^t \rVert_2 \;\;\;\;\forall i = \{1, 2\} \nonumber\\ {\boldsymbol{\mu}^{\prime}_i}^{t+1} \leftarrow \argmin_{{\boldsymbol{\mu}^{\prime}_i}} \frac{1}{2\tau_1}(\lVert \boldsymbol{\mu}_i' - \boldsymbol{\mu}_i \rVert_2) + \langle \boldsymbol{\lambda}_i, \boldsymbol{\mu}_i' \rangle \\ +\frac{1}{2\tau_1} \lVert \boldsymbol{\mu}_i' - {\boldsymbol{\mu}^{\prime}_i}^{t} \rVert_2\\ \nonumber \mathbf{r}_i^{t+1} \leftarrow \argmin_{\mathbf{r}_i} \alpha \lVert \boldsymbol{r}_i \rVert_1 + \langle \boldsymbol{\lambda}_i^t, -\mathbf{r}_i \rangle + \frac{1}{2\tau_1} \lVert \boldsymbol{r}_i - \boldsymbol{r}_i^t \rVert_2\\ \nonumber \boldsymbol{\mu}^{t+1} \leftarrow \argmin_{\boldsymbol{\mu}} \lVert \boldsymbol{\mu} \rVert_1 + \langle \boldsymbol{\lambda}_i^t, -\boldsymbol{\mu} \rangle + \frac{1}{2\tau_1} \lVert \boldsymbol{\mu} - \boldsymbol{\mu}^t \rVert_2\\ \nonumber \boldsymbol{\lambda}_i^{t+1} \leftarrow \argmax_{\boldsymbol{\lambda}_i} \langle \boldsymbol{\lambda}_i, \boldsymbol{\kappa}^{t+1} \rangle - \frac{1}{2\tau_2}\lVert \boldsymbol{\lambda}_i - \boldsymbol{\lambda}_i^t\rVert_2, \end{gather*} where, $\boldsymbol{\kappa}^{t+1} = 2(\text{div}(\mathbf{M}_i)^{t+1} +{\boldsymbol{\mu}^{\prime}_i}^{t+1} - \boldsymbol{r}_i^{t+1})-(\text{div}(\mathbf{M}_i)^t + {\boldsymbol{\mu}^{\prime}_i}^{t} - \boldsymbol{r}_i^t)$. We now discuss the solution of each individual optimization. \textbf{Solving for} $\mathbf{M}_i$: The rows $\mathbf{m}_{ij}$ of $\mathbf{M}_i$ can be expressed and solved using $l_{21}$ norm shrinkage operator, \begin{equation} \mathbf{m}_{ij}^{t+1} \leftarrow \text{shrink}_{\tau_1}^{l_2}(\mathbf{m}_{ij}^t - \tau_1 \text{div}^*(\boldsymbol{\lambda}_i^t)_j) \label{eq:solveforM} \end{equation} Here, $\text{div}^*$ denotes the adjoint of div operator, and $\text{shrink}_{\tau_1}^{l_2}{\boldsymbol{\eta}} = \max(\lVert \boldsymbol{\eta} \rVert_2 - \tau_1, 0) \odot \frac{\boldsymbol{\eta}}{(\lVert \boldsymbol{\eta} \rVert_2)}$. \enquote{$\odot$} denotes the Hadamard product. \textbf{Solving for} $\boldsymbol{\mu}_i'$: \begin{equation} \centering {\boldsymbol{\mu}^{\prime}_i}^{t+1} \leftarrow \max\{0, \frac{\rho\tau_1}{1+ \rho\tau_1}\boldsymbol{\mu}_i' + \frac{1}{1+\rho \tau_1}({\boldsymbol{\mu}_i'}^t - \tau_1 \boldsymbol{\lambda}_i^t) \}, \end{equation} \textbf{Solving for} $\mathbf{r}_i$: We use an $l_1$ shrinkage operator. \begin{equation} \mathbf{r}_{i}^{t+1} \leftarrow \text{shrink}_{\alpha \tau_1}^{l_1}(\mathbf{r}_{i}^t + \tau_1 \boldsymbol{\lambda}_i^t) \end{equation} Here, $\text{shrink}_{\alpha\tau_1}^{l_1}(\boldsymbol{\eta}) = \text{sign}(\boldsymbol{\eta}) \odot \max(\lVert \boldsymbol{\eta} \rVert - \alpha\tau_1, 0)$. \textbf{Solving for barycenter} $\boldsymbol{\mu}$: \begin{equation} \boldsymbol{\mu}^{t+1} \leftarrow \text{shrink}_{\beta \tau_1}^{l_1}(\boldsymbol{\mu}^t + \tau_1 (\boldsymbol{\lambda}_1^t+\boldsymbol{\lambda}_2^t)) \end{equation} \textbf{Solving for} $\boldsymbol{\lambda}$: \begin{equation} \boldsymbol{\lambda}_i^{t+1} \leftarrow \boldsymbol{\lambda}_i^{t} + \tau_2 \boldsymbol{\kappa}^{t+1} \label{eq:solveforlambda} \end{equation} \subsection{Toy example} We demonstrate the barycenter computation using a Gaussian image in Figure \ref{fig:clean-and-adversarial}. The barycenter of clean samples, sample with random noise and adversarial sample are shown. As we see, for the clean case the barycenter is very similar to that of the original image. In the second column where random noise is added, the barycenter reduces the noise. Similar effect is also seen for the case where adversarial noise is present. This indicates that non-linear interpolation of barycenter suppresses the adversarial noise. \iffalse \begin{figure}[h] \centering \includegraphics[width=.14\textwidth]{images/clean.png} {\includegraphics[width=.14\textwidth]{images/randomnoise.png}} \includegraphics[width=.14\textwidth]{images/adversarialsample.png}\\ \includegraphics[width=.14\textwidth]{images/cleanBary.png} \includegraphics[width=.14\textwidth]{images/randomnoiseBary.png} \includegraphics[width=.14\textwidth]{images/adversarialBary.png} \caption{Top: Clean image, noisy image, adversarial image. Bottom: Barycenter of clean image, noisy image, adversarial image.} \label{fig:clean-and-adversarial} \end{figure} \fi \begin{figure}[h] \centering \begin{subfigure}{.12\textwidth} \includegraphics[width=\textwidth]{images/clean.png} \end{subfigure} \begin{subfigure}{.12\textwidth} {\includegraphics[width=\textwidth]{images/randomnoise.png}} \end{subfigure} \begin{subfigure}{.12\textwidth} {\includegraphics[width=\textwidth]{images/adversarialsample.png}} \end{subfigure} \begin{subfigure}{.12\textwidth} \includegraphics[width=\textwidth]{images/cleanBary.png} \caption{Clean} \end{subfigure} \begin{subfigure}{.12\textwidth} \includegraphics[width=\textwidth]{images/randomnoiseBary.png} \caption{Random} \end{subfigure} \begin{subfigure}{.12\textwidth} \includegraphics[width=\textwidth]{images/adversarialBary.png} \caption{Adversarial} \end{subfigure} \caption{Top: Clean image, noisy image, adversarial image. Bottom: Barycenter of clean image, noisy image, adversarial image.} \label{fig:clean-and-adversarial} \end{figure} \subsection{Training} Let a model be given by $f_{\boldsymbol{\theta}}$, the barycenter of clean samples be denoted by $\mathbf{x}$ and its labels as $y$. We then optimize the following loss \begin{equation*} \argmin_{\boldsymbol{\theta}}\frac{1}{n}\sum_{i=1}^n \mathcal{L}_{CE}(f_{\boldsymbol{\theta}}(\mathbf{x}_i), \mathbf{y}_i) \end{equation*} where $\mathcal{L}_{CE}$ is the cross-entropy loss. We would like to emphasize that we do not perform adversarial training. Instead we use an adversarially pretrained model. Thus, $f_{\boldsymbol{\theta}}$ is an adversarial robust model and our training further enhances the robustness. We also note that this optimization falls under DRO as the samples used are barycenters which belong to the distribution $\mathcal{Q}$. \iffalse \begin{algorithm}[tb] \caption{Training of our SNN} \label{alg:algorithm1} \textbf{Input}: Training data $\mathcal{D}$, learning rates $\alpha, \beta$ \\ \textbf{Output}: Parameters $\theta$, $\phi$ and $\phi_{a}$ \begin{algorithmic}[1] \WHILE{not done} \STATE \textbf{Isotropic parameters training:} \STATE $M_i \leftarrow \alpha \nabla_{\phi}L_{Tot}( \theta,\phi,\phi_{a})$ \STATE \textbf{Normal and Anisotropic parameters training:} \STATE $(\theta,\phi_{a})$ are updated based on Eq.~\ref{eqn:equation13} while $\phi$ remains fixed: $(\theta,\phi_{a}) \leftarrow \beta \nabla_{(\theta,\phi_{a})}L_{Tot}( \theta,\phi,\phi_{a})$ \ENDWHILE \end{algorithmic} \end{algorithm} \fi \subsection{Theoretical analysis} We first present a convergence analysis of Eq \ref{eq:EMD-barycenter3}. \textbf{Theorem 1.} Let $\tau_1 \tau_2(\lambda_{\max}(\boldsymbol{\nabla}^2)+3) < 1$, where $\lambda_{max}(\boldsymbol{\nabla}^2)$ denotes the largest eigenvalue of discrete Laplacian operator $\boldsymbol{\nabla}^2 = \mathbf{D}\mathbf{D}^{\top}$, where $\mathbf{D}$ is the matrix representing div operator. Then, the iterations $\mathbf{M}^t_i, {\boldsymbol{\mu}^{\prime}}^t_i, \boldsymbol{\mu}^t, \mathbf{r}^t_i, \boldsymbol{\lambda}^t_i$ converge to the saddle point solution of the Lagrangian $\mathbf{M}^*_i, \boldsymbol{\mu}^*_i, \boldsymbol{\mu}^*,\mathbf{r}^*_i, \boldsymbol{\lambda}^*_i$. Proof: Let $\mathbf{u}=\{\mathbf{M}_1,\mathbf{M}_2, \boldsymbol{\mu}_2, \boldsymbol{\mu}_2, \boldsymbol{\mu}, \mathbf{r}\}$. Then, we write Eq \ref{eq:EMD-barycenter3} as \begin{equation*} \mathcal{L}(\mathbf{u}, \boldsymbol{\lambda}) = \mathcal{G}(\mathbf{u}) + \langle \boldsymbol{\lambda}, \tilde{\mathbf{K}}\mathbf{b} \rangle \end{equation*} where $\boldsymbol{\lambda} = [\boldsymbol{\lambda}_1;\boldsymbol{\lambda}_2]$, $\mathbf{K} = [\mathbf{D}, \mathbf{I}, \mathbf{-I}, \mathbf{-I}]$, $\tilde{\mathbf{K}} = [\mathbf{K}, \mathbf{0}; \mathbf{0}, \mathbf{K}]$, $\mathbf{b} = [\mathbf{b}_1;\mathbf{b}_2], \mathbf{b}_1= [\text{vec}(\mathbf{M}_1);\boldsymbol{\mu}'_1;\boldsymbol{\mu};\boldsymbol{r}_1]; \mathbf{b}_2 = [\text{vec}(\mathbf{M}_2);\boldsymbol{\mu}'_2;\boldsymbol{\mu};\boldsymbol{r}_2]$. The function $\mathcal{G}= \lVert \mathbf{M}_1 \rVert_{2,1} + \lVert \mathbf{M}_2 \rVert_{2,1} + \alpha(\lVert \boldsymbol{r}_1 \rVert_1 + \lVert \boldsymbol{r}_2 \rVert_1) + \frac{1}{2\rho}(\lVert \boldsymbol{\mu}_1' - \boldsymbol{\mu}_1 \rVert_2 + \lVert \boldsymbol{\mu}_2' - \boldsymbol{\mu}_2 \rVert_2)+\beta\lVert \boldsymbol{\mu} \rVert_1$ is convex and $\tilde{\mathbf{K}}$ is a linear operator. These conditions satisfy Theorem 1 of \cite{chambolle2011first}. If $\lambda_{max}(\boldsymbol{\nabla}^2)$ is the max eigenvalue of $\mathbf{D}\mathbf{D}^{\top}$, then the max eigenvalue of $[\mathbf{D}, \pm \mathbf{I}][\mathbf{D}, \pm \mathbf{I}]^{\top}$ is $\lambda_{\max}(\boldsymbol{\nabla}^2) + 1$. Similarly, for $\mathbf{K}\mathbf{K}^{\top}$, it is $\lambda_{\max}(\boldsymbol{\nabla}^2) + 3$. Since $\tilde{\mathbf{K}}$ is obtained from $\mathbf{K}$ by padding zeros only, $\tilde{\mathbf{K}}$ has the same max eigenvalue as that of $\mathbf{K}$. Further, since $\lVert \tilde{\mathbf{K}}\tilde{\mathbf{K}}^{\top} \rVert^2_2 \geq \lambda_{\max}(\tilde{\mathbf{K}}\tilde{\mathbf{K}}^{\top}) = \lambda_{\max}(\boldsymbol{\nabla}^2) + 3$, we can also write the convergence criteria as $\tau_1 \tau_2 \lVert \tilde{\mathbf{K}}\tilde{\mathbf{K}}^{\top} \rVert^2_2 < 1$. Since we solve for the Lagrangian dual function, we analyse the primal dual gap which is given as \cite{jacobs2019solving} \begin{equation} \mathbb{G}(\mathbf{u}, \boldsymbol{\lambda}) = {\sup_{\lVert \boldsymbol{\lambda}' - \boldsymbol{\lambda}_0 \rVert \leq R_1}} \mathcal{L}(\mathbf{u},\boldsymbol{\lambda}') - {\inf_{\lVert \mathbf{u}' - \mathbf{u}_0 \rVert \leq R_2}} \mathcal{L}(\mathbf{u}',\boldsymbol{\lambda}) \nonumber \end{equation} \noindent\textbf{Theorem 2.} Suppose the step sizes $\tau_1$ and $\tau_2$ satisfy $\tau_1 \tau_2\lVert \tilde{\mathbf{K}}\tilde{\mathbf{K}}^{\top} \rVert^2_2 < 1$. Let $\mathbf{u}^N = \frac{1}{N}\sum^N_{n=1}\mathbf{u}_n$ and $\boldsymbol{\lambda}^N = \frac{1}{N}\sum^N_{n=1}\boldsymbol{\lambda}_n$, where $\mathbf{u}_n$ and $\boldsymbol{\lambda}_n$ are sequences generated from Eqns \ref{eq:solveforM} - \ref{eq:solveforlambda}. Then after $N$ iterations, we have, \begin{equation} \mathbb{G}(\mathbf{u}, \mathbf{\boldsymbol{\lambda}}) \leq {\sup_{\mathbf{u}, \mathbf{\boldsymbol{\lambda}}}} \frac{1}{2N} \Bigg(\frac{\lVert \mathbf{u} - \mathbf{u}_0 \rVert_2}{\tau_1} + \frac{\lVert \mathbf{\boldsymbol{\lambda}} - \mathbf{\boldsymbol{\lambda}}_0 \rVert_2}{\tau_2}\Bigg) \nonumber \end{equation} This rate is similar to convergence rates in gradient descent and shows that the gap converges with rate $\mathcal{O}(1/N)$. For brevity, we omit the proof and it can be derived as an extension of Theorem 1 \cite{chambolle2011first}. \iffalse \noindent\textbf{Lemma} Given a clean sample $\mathbf{X}$, its label $y$, adversarial sample $\mathbf{X}_a$ and barycenter $\mathbf{X}_b$, the mutual information $\mathcal{I}(\mathbf{X}_a;y|\mathbf{X}_b)$ is upper bounded by the entropy $\mathcal{I}(y;\mathbf{X})$. Proof: Using chain rule of mutual information, \begin{align} \mathcal{I}(\mathbf{X}_a;y|\mathbf{X}_b) &= \mathcal{I}(\mathbf{X}_a;y|X,\mathbf{X}_b) + \mathcal{I}(\mathbf{X}_a;y;\mathbf{X}|\mathbf{X}_b) \nonumber \\ \nonumber &= \mathcal{I}(y;\mathbf{X}|\mathbf{X}_b) - \mathcal{I}(y;\mathbf{X}|\mathbf{X}_a\mathbf{X}_b) \\ \nonumber &\leq \mathcal{I}(y;\mathbf{X}|\mathbf{X}_b) \\ \nonumber &= \mathcal{I}(y;\mathbf{X}) - \mathcal{I}(y;\mathbf{X};\mathbf{X}_b)\\ \nonumber &\leq \mathcal{I}(y;\mathbf{X}) \nonumber \end{align} where first line is obtained by chain rule, and line 2 comes from the fact that $\mathbf{X}_a$ and $y$ are independent. Line 4 is again obtained from chain rule. Thus, the loose upper bound is case of mutual information between clean samples $\mathbf{X}$ and labels $y$ which is the best upper bound as mutual information cannot exceed this bound between $\mathbf{X}$ and $y$. On the other hand when there is no conditioning, $\mathcal{I}(\mathbf{X}_a;y) = 0$ due to the independence of $\mathbf{X}_a$ and $y$. \fi \subsection{Mutual Information} In order to understand the underlying reason behind the performance of our method, we provide more insights using mutual information (MI). We first note that the MI between two random variables is given by $\mathcal{I}(X,y) = \mathcal{H}(\mathcal{P}(y)) - \underset{\mathcal{P}(x)}{\mathbb{E}}[\mathcal{H}(\mathcal{P}(y|X))]$. In our case, we take the random variables as model parameters $\boldsymbol{\theta}$ and softmax output $\mathbf{y}$. Then, given a sample $\mathbf{x}$ and dataset $\mathcal{D}$, \begin{equation} \mathcal{I}(\boldsymbol{\theta},\mathbf{y} | \mathcal{D},\mathbf{x}) = \mathcal{H}(p(\mathbf{y}|\mathbf{x},\mathcal{D})) - \underset{p(\boldsymbol{\theta}|\mathcal{D})}{\mathbb{E}} \mathcal{H}(p(\mathbf{y}|\mathbf{x},\boldsymbol{\theta})) \label{eq:mi} \end{equation} Eq \ref{eq:mi} measures the information shared between $\boldsymbol{\theta}$ and $\mathbf{y}$. A tractable way of computing $\mathcal{I}(\boldsymbol{\theta},\mathbf{y} | \mathcal{D},\mathbf{x})$ is given in \cite{smith2018understanding}, \cite{houlsby2011bayesian}. \begin{equation} {I}(\boldsymbol{\theta},\mathbf{y} | D,\mathbf{x}) = \frac{1}{C}\sum^C_{j=1}\frac{1}{n}\sum^n_{i=1}(p_{ij} - \hat{\mathbf{p}})^2 \end{equation} where, $\hat{\mathbf{p}} \in [0,1]^C$ is computed as the mean of all softmax probabilities, $C$ is the number of classes, $\mathbf{p}_{i} \in [0,1]^C$, $p_{ij} \in [0,1]$ denotes the softmax probability for a particular class $j$. A higher ${\mathcal{I}}$ indicates that knowing $\boldsymbol{\theta}$ (or $\mathbf{y}$) gives a higher information about $\mathbf{y}$ (or $\boldsymbol{\theta}$). In other words, the model will perform better if the mutual information is high. In addition, we also compute MI between the predictions for the following two cases - (i) clean test set and adversarial test set, and (ii) barycenter of clean test set and barycenter of adversarial test set using \cite{ji2019invariant}. Given a model $f$ parameterised by $\boldsymbol{\theta}$, clean sample $\mathbf{x}_i$ and its adversarial counterpart $\mathbf{x}^{\prime}_i$, the joint probability distribution between natural and adversarial samples is given by the following $C \times C$ matrix, \begin{equation} \mathcal{I}(f(\mathbf{x}_i,\boldsymbol{\theta}),f(\mathbf{x}^{\prime},\boldsymbol{\theta})) = \sum^C_{y=1}\sum^C_{y'=1}\mathcal{P}_{yy'} \ln \frac{\mathcal{P}_{yy'}}{\mathcal{P}_{y}\mathcal{P}_{y'}} \label{eq:mutualinfo} \end{equation} where, $\mathcal{P}_{yy'}$ is given as, \begin{equation} \mathcal{P}_{yy'} = \frac{1}{n}\sum^n_{i=1}f(\mathbf{x}_i,\boldsymbol{\theta})f(\mathbf{x}^{\prime}_i,\boldsymbol{\theta})^{\top} \end{equation} and the marginals $\mathcal{P}_{y},\mathcal{P}_{y'}$ are obtained by row and column sum of $\mathcal{P}_{yy'}$. A higher value of $\mathcal{I}(.,.)$ indicates that knowing about clean samples gives a higher amount of information about the adversarial samples. \section{Experiments} We present elaborate experimental results on CIFAR-10, CIFAR-100 and Tiny ImageNet. We use strong baselines of LAS \cite{jia2022adversarial}, LBGAT \cite{cui2021learnable}, PGD-AT \cite{madry2017towards}, TRADES \cite{zhang2019theoretically}, RST \cite{carmon2019unlabeled}. We compare against several popular adversarial training models, MART \cite{wang2019improving}, AWP-A2 \cite{xu2022a2}, RST-RWT \cite{yu2022robust}, TRADES$_{\text{AWP}}$ \cite{wu2020adversarial}, AWP \cite{wu2020adversarial}, LAS$_{\text{AT}}$, LAS$_{\text{TRADES}}$, LAS$_{\text{AWP}}$ \cite{jia2022adversarial}. We also compare with adaptive test time defenses Hedge$_{\text{RST}}$ \cite{wu2021attacking} and TRADES$_{\text{SSL}}$ \cite{mao2021adversarial}. In the Tables, we use \enquote{$+$B} to indicate the results obtained using our approach. \subsection{Implementation details} In case of CIFAR10 and CIFAR100, WideResNet34-10 is used and for Tiny ImageNet PreActResnet18 is used. Additionally, we evaluate on CIFAR-10 with WideResNet28-10, WideResNet32-10, WideResNet70-16 and on CIFAR-100 with WideResNet34-20. We use these models for a fair comparison with existing works as these models are widely used for adversarial defense evaluation. We evaluate against different attacks namely FGSM, PGD-10, PGD-20, CW, and AA using $l_{\infty}$ attack with $\epsilon = 8/255$. Our evaluation protocols are similar to the protocols given in \cite{zhang2019theoretically}, \cite{jia2022adversarial}. We would like to emphasize that we use the checkpoints from the baseline models and perform a single epoch training using clean barycenters. Upon increasing the number of epochs, the clean accuracy improves, however, the adversarial accuracy becomes comparable to that of baseline and further increasing epochs leads to subsequent drop in accuracy against adversarial samples. We use SGD optimizer with a learning rate of 1e-4, momentum = 0.9 without any weight decay. In order to compute the barycenter, we set $\rho = 5e-1, \tau_1 = 1e-1, \tau_2 = \alpha = \beta = 1$ and iterations is set to 200. While one can also attack the barycenter, we give experiments for the case where the clean image is attacked. This is because the barycenter itself lies at an $\epsilon$ which is greater than attacker' budget. Thus attacking barycenter has little incentive as in that case the attacked image will lie at an $\epsilon$ outside the given $\epsilon = 8/255$ for the $l_{\infty}$ attack. \subsection{Comparison on CIFAR-10} In Table \ref{tab:cifar-10}, we observe that clean performance is better for the models trained with barycenters - TRADES$_{\text{AWP}}+$B, LBGAT$+$B, LAS$_{\text{TRADES}}+$B and RST$+$B. Amongst WRN-28-10 models, RST has the best clean performance and our method enhances it by 1\%. In PGD-10, there is a rise of 2.57\%. In case of AA, there is a boost of 6.49\%. In case of WRN-34-10, LAS$_{\text{AT}}+$B shows a huge boost of 10\% under AA. Further, LAS$_{\text{AWP}}+$B shows the best performance under PGD-10, PGD-20 and CW attack amongst WRN-34-10 models. Under AA it shows an improvement of 7.71\%. \noindent \textbf{Comparison with Adversarial Purification models} Our RST$+$B model outperforms Hedge$^*_{\text{RST}}$ under all the cases. Against AA, our approach gives 3.1\% higher accuracy compared to Hedge$^*_{\text{RST}}$. We also see that compared to TRADES$_{\text{SSL}}$, TRADES$_{\text{AWP}}$ has a better performance. \begin{table}[ht] \centering \renewcommand{\tabcolsep}{4.5pt} \caption{CIFAR-10. $^*$ indicates that the model uses WRN-28-10. \textbf{Bold} font is used to indicate the best performance amongst WRN-34-10 and \textcolor{red}{Red} color font is used to indicate the best performance amongst WRN-28-10.} \begin{tabular}{l|l|l|l|l|l} \hline Method & Clean & PGD10 & PGD20 & CW & AA\\ \hline \rowcolor{LightCyan} \multicolumn{6}{l}{Adversarial Training} \\ PGD-AT & 85.17 & 56.07 & 55.08& 53.91 &51.69\\ TRADES &85.72 &56.75& 56.10& 53.87 &53.40 \\ MART &84.17& 58.98 &58.56 &54.58& 51.10\\ AWP-A2& 87.54 & -&59.50 &57.42 & 54.86\\ RST-RWT$^*$ & 88.87 & - &64.11 & 62.03 &60.36\\ \hline \rowcolor{LightCyan} \multicolumn{6}{l}{Adversarial Purification} \\ TRADES$_{\text{SSL}}$ & 82.12 & - & - & -& 60.67 \\ Hedge$^*_{\text{RST}}$ & 88.64& - & - & 73.89 & 63.10\\ \hline \rowcolor{LightCyan} \multicolumn{6}{l}{Adversarial and Barycentric Training} \\ TRADES$_{\text{AWP}}$ &85.36 & 59.58& 59.25 &57.07 &56.17\\ $+$B & 87.32 & 62.60 &62.32 & 75.85 &65.32\\ \hline LBGAT & 88.22 & 56.25 & 54.60& 54.29 &52.23\\ \multicolumn{1}{l|}{$+$B} & 88.38 & 59.28 & 58.43 &74.61&61.22\\ \hline LAS$_{\text{AT}}$ & 86.23 & 57.11 &56.41 & 55.54&53.58\\ \multicolumn{1}{l|}{$+$B} &86.21 &61.08 & 60.64& 74.09& \textbf{63.59} \\ \hline LAS$_{\text{TRADES}}$ & 85.24 & 57.66 &57.07 &55.45&54.15\\ \multicolumn{1}{l|}{$+$B} &86.15 & 60.32& 60.03 & 73.75&63.43\\ \hline LAS$_{\text{AWP}}$ & \textbf{87.74} & 61.09 & 60.16 & 58.22&55.52\\ $+$B & 87.45 & \textbf{63.66} & \textbf{61.16} & \textbf{74.81}& 63.23\\ \hline RST$^*$ & 89.69 & 63.48 & 62.51 & 61.06& 59.71\\ $+$B$^*$ & \textbf{\textcolor{red}{90.68}}& 65.12 & 64.38& \textbf{\textcolor{red}{77.08}} & \textbf{\textcolor{red}{66.20}}\\ \hline \end{tabular} \label{tab:cifar-10} \end{table} \subsection{Comparison on CIFAR-100} In Table \ref{tab:cifar-100}, we observe that our method gives a significant boost under all the cases. In case of strong baseline LAS$_{\text{AWP}}$, our method increases the performance by 0.85\% under clean accuracy. For PGD-20, there is a rise of 0.91\%. In case of CW, there is an increase of 18.35\%. In other models such as LBGAT, we see a rise of 5.4\% in clean accuracy. \begin{table}[ht] \centering \caption{CIFAR-100 WRN-34-10.} \begin{tabular}{l|l|l|l|l} \hline Method & Clean & PGD-10 & PGD-20 & CW \\ \hline \hline PGD-AT & 60.89 &32.19& 31.69&30.10\\ TRADES & 58.61& 29.20 &28.66&27.05\\ \hline TRADES$_{\text{AWP}}$ & 60.17 & 33.81 & 33.6& 57.07\\ $+$B & 63.67 & 36.34 & 36.15 &51.92 \\ \hline LBGAT & 60.64 & 35.13 & 34.53& 30.65\\ $+$B& 66.04 & 36.29 & 36.01 & 52.92\\ \hline LAS$_{\text{AT}}$& 61.8 & 33.27 & 32.83&31.12 \\ $+$B & 62.45 & 36.60 & 36.17 & 49.60\\ \hline LAS$_{\text{TRADES}}$ & 60.62 & 32.82 & 32.51 &29.51\\ $+$B &62.58 & 35.22 & 34.96 &50.99\\ \hline LAS$_{\text{AWP}}$ & 64.89 & 37.11 &36.36 & 33.92 \\ $+$B & \textbf{65.50} & \textbf{37.55} & \textbf{37.27} & \textbf{52.27} \\ \hline \end{tabular} \label{tab:cifar-100} \end{table} \subsection{Comparison on Tiny ImageNet} We present the results in Table \ref{tab:preactresnet}. In comparison to baselines, our method shows significant improvement in all cases. For LAS$_{\text{AWP}}$, our method improves the performance under clean samples by 1.65\%. In case of PGD-50, our method shows a rise of 1.28\%, and in case of CW attack, our method almost doubles the accuracy. Under AA, LAS$_{\text{TRADES}}$ observes a maximum performance rise by 11.51\%. \begin{table}[ht] \centering \caption{Tiny ImageNet PreActResNet18.} \begin{tabular}{l|l|l|l|l} \hline Method & Clean & PGD-50 & CW & AA \\ \hline LAS$_{\text{AT}}$ & 44.86 & 22.16 & 18.54 & 16.74\\ $+$B & 45.12 & 24.54& 37.14 & 27.78\\ \hline LAS$_{\text{TRADES}}$ & 41.38 & 18.36& 14.50 & 14.08 \\ $+$B& 43.07 & 19.25 & 35.13 & 25.59\\ \hline LAS$_{\text{AWP}}$ & 45.26 & 23.42 & 19.88 & 18.42 \\ $+$B& \textbf{46.91} & \textbf{24.70} & \textbf{37.93} & \textbf{27.00}\\ \hline \end{tabular} \label{tab:preactresnet} \end{table} \subsection{Comparison with Curriculum based AT} In Table \ref{tab:cifar-10-WRN32}, we compare against curriculum based AT methods like CAT \cite{cai2018curriculum}, FAT \cite{zhang2020attacks} and DART \cite{wang2019dynamic}. Under FGSM, PGD-20 and CW, our model shows a huge improvement. In FGSM, our model gives a boost of 4.46\% over FAT. In PGD-20 the boost is 10.89\% and in CW there is a rise of 24.54\%. In case of clean samples, we see that the accuracy of FAT$+$B compared to FAT is less. This may be due to the fact that FAT employs curriculum learning in the training whereas our method does not use curriculum learning. \begin{table}[h] \centering \caption{CIFAR-10 WRN-32-10.} \begin{tabular}{l|l|l|l|l} \hline Method & Clean& FGSM & PGD-20 & CW \\ \hline CAT & 77.43 & 57.17& 46.06 & 42.48 \\ DART & 85.03 & 63.53 & 48.70 & 47.27 \\ \hline FAT & \textbf{89.34}& 65.52 & 46.13& 46.82\\ $+$B & 84.59 & \textbf{69.98} & \textbf{57.02} & \textbf{71.36}\\ \hline \end{tabular} \label{tab:cifar-10-WRN32} \end{table} \subsection{Analysis using Deeper and Wider Models} We use WRN-70-16 and WRN-34-20 to analyse the effect when the models get deeper and wider. In particular, for clean samples, we can observe that the deeper and wider models give a better boost. In CIFAR-10, WRN-70-16 gives 88.87\% for clean samples which is 3.21\% better than LAS$_{\text{AWP}}$ model' 85.66\%. In contrast, for WRN-34-10, our method gives accuracy similar to that of LAS$_{\text{AWP}}$. In CIFAR-100, our method boosts the performance by 8.34\% under AA. In other cases also we see that the barycenters improve the performance by a significant margin. \begin{table}[ht] \centering \renewcommand{\tabcolsep}{5pt} \caption{CIFAR-10 (C-10) WRN-70-16 and CIFAR-100 (C-100) WRN-34-20.} \begin{tabular}{l|l|l|l|l|l} \hline Dataset & Method & Clean& FGSM & CW & AA\\ \hline C-10 & LAS$_{\text{AWP}}$ & 85.66 & 70.25 & 58.44 & 57.61\\ &+B& \textbf{88.87} & \textbf{74.04} & \textbf{75.40} & \textbf{62.54}\\ \hline C-100 & LBGAT & 62.55 & 43.16 & 31.72 &31.92 \\ & +B& \textbf{66.86} &\textbf{50.92}& \textbf{54.19}& \textbf{40.26}\\ \hline \end{tabular} \label{tab:cifar-10-WRN70} \end{table} \subsection{TSNE} In Figure \ref{fig:tsne}, we show the tsne plots for MNIST testset with classes 0 and 1. Here, we use a weak MNIST model which has only two dimensions before the classification layer. We deliberately chose a weak model so that we can easily show the effect in low dimensions. Though higher dimensions could be taken, the effect cannot be easily seen due to a highly non-linear transformation from high to low dimension of tsne. We can see that the two clusters yellow and purple are well separated for clean and barycenters of clean images. In case of adversarial samples, the points overlap on each other. However, when we take barycenter of adversarial samples, we again see that the clusters are well separated, similar to the case of clean images. Thus, it is evident that the barycenter nullifies the effect of adversarial noise. \begin{figure}[ht] \centering \begin{subfigure}[t]{.11\textwidth} \includegraphics[width=\textwidth]{images/tsne/download_clean.png} \caption{Clean} \end{subfigure} \begin{subfigure}[t]{.11\textwidth} \includegraphics[width=\textwidth]{images/tsne/download_bary.png} \caption{Barycenter} \end{subfigure} \begin{subfigure}[t]{.11\textwidth} \includegraphics[width=\textwidth]{images/tsne/download_attack.png} \caption{Attacked} \end{subfigure} \begin{subfigure}[t]{.11\textwidth} \includegraphics[width=\textwidth]{images/tsne/download_attack_bary.png} \caption{Adv.+Bary.} \end{subfigure} \caption{Left to right: Plot of 2D features of Clean image, Barycenter of clean image, Attacked image, Barycenter of adversarial image. MNIST model obtains 51\% accuracy and has only 2D feature vector before the classification layer.} \label{fig:tsne} \end{figure} \subsection{Mutual Information} In Table \ref{tab:mutualinfo}, we present the study of mutual information. We use LAS$_{\text{AT}}$ and LAS$_{\text{TRADES}}$ on CIFAR-10. The MI is computed using Eq \ref{eq:mi} and Eq \ref{eq:mutualinfo}. Here we note that the MI for LAS$_{\text{AT}}+$B is more for training set compared to that of LAS$_{\text{AT}}$. This indicates that the information available about the labels given the model parameters is high and in turn gives a better clean accuracy. In case of adversarial samples too, we see that the MI is higher for our case. This indicates that the model has better prediction for these samples. Further, the MI for test set is smaller compared to training set which is expected as the model carries more information about train set compared to test set. \begin{table}[ht] \centering \caption{CIFAR-10 WRN-34-10.} \begin{tabular}{l|l|l|l|l} \hline Method & Train &Test & FGSM & CW \\ \hline LAS$_{\text{AT}}$ & 0.029& 0.026&0.020 & 0.019\\ +B & \textbf{0.034}& \textbf{0.029} & \textbf{0.023} & \textbf{0.022}\\ \hline LAS$_{\text{TRADES}}$&0.048 & 0.040& 0.033& 0.032\\ +B&\textbf{0.054} & \textbf{0.045} & \textbf{0.037} & \textbf{0.036}\\ \hline \end{tabular} \label{tab:mutualinfo} \end{table} In Table \ref{tab:mutualinfo2}, we present the results obtained using Eq \ref{eq:mutualinfo}. We observe that for the model trained with barycenter, the MI is higher between the barycenter of clean and adversarial samples. Thus, the model does better on barycenter of adversarial samples compared to baseline LAS$_{\text{AT}}$ and TRADES$_{\text{AWP}}$. This is consistent across FGSM, PGD-10 and CW attacks. \begin{table}[ht] \centering \caption{Mutual Information for CIFAR-10 WRN-34-10.} \begin{tabular}{l|l|l|l} \hline Method & FGSM & PGD-10& CW \\ \hline LAS$_{\text{AT}}$ & 0.218 & 0.198&0.203\\ +B & \textbf{0.275} & \textbf{0.241} & \textbf{0.264} \\ \hline LAS$_{\text{TRADES}}$&0.576& 0.554& 0.563\\ +B& \textbf{0.629}& \textbf{0.572}& \textbf{0.618}\\ \hline \end{tabular} \label{tab:mutualinfo2} \end{table} \subsection{Sensitivity to Barycenter Parameters} In Figure \ref{fig:barycenter-sensitivty}, we demonstrate the sensitivity to different parameters involved in the computation of barycenter. In the top row, we fix the number of iterations to 200 and $\tau_1 = 1e-1$. Here we observe that increasing $\tau_2$ makes the barycenter brighter. In the second row, increasing $\tau_1$ makes the barycenter darker. Decreasing iterations has a similar effect in the last row. We see that unless there is a change of order of magnitude, the appearance does not substantially change. Thus, our proposed Beckman barycenter is robust with respect to the parameter settings. \begin{figure}[ht] \centering \includegraphics[width=1.2cm, height=1.2cm, cfbox=blue 1pt 1pt]{images/sensitivity/orig.png} \includegraphics[width=1.2cm, height=1.2cm, cfbox=red 1pt 1pt]{images/sensitivity/bary_tau1_0.1_tau2_1.png} \includegraphics[width=.07\textwidth]{images/sensitivity/bary_tau1_0.1_tau2_0.1.png} \includegraphics[width=.07\textwidth]{images/sensitivity/bary_tau1_0.1_tau2_0.01.png} \includegraphics[width=.07\textwidth]{images/sensitivity/bary_tau1_0.1_tau2_0.001.png}\\ \includegraphics[width=.09\textwidth]{images/sensitivity/tau1/bary_tau1_0.3_tau2_1.png} \includegraphics[width=1.5cm, height=1.5cm, cfbox=red 1pt 1pt]{images/sensitivity/tau1/bary_tau1_0.1_tau2_1.png} \includegraphics[width=.09\textwidth]{images/sensitivity/tau1/bary_tau1_0.01_tau2_1.png} \includegraphics[width=.09\textwidth]{images/sensitivity/tau1/bary_tau1_0.001_tau2_1.png}\\ \includegraphics[width=1.5cm, height=1.5cm, cfbox=red 1pt 1pt]{images/sensitivity/maxiter/bary_iter_200.png} \includegraphics[width=.09\textwidth]{images/sensitivity/maxiter/bary_iter_100.png} \includegraphics[width=.09\textwidth]{images/sensitivity/maxiter/bary_iter_50.png} \includegraphics[width=.09\textwidth]{images/sensitivity/maxiter/bary_iter_10.png}\\ \caption{Top row: Blue boundary represent the given image. Barycenter for iterations = 200, $\tau_1=1e-1$, $\tau_2$ = {1, 1e-1, 1e-2, 1e-3}. Second: barycenter for iterations = 200, $\tau_1$={1, 1e-1, 1e-2, 1e-3}, $\tau_2 =1$. Third: iterations = {200, 100, 50, 10}, $\tau_1$=1e-1, $\tau_2$=1. The red boundary indicates the images obtained from default settings of the parameter which are used for all experiments.} \label{fig:barycenter-sensitivty} \end{figure} The Figure \ref{fig:barycenter-samples} demonstrates a visualization of clean image, its barycenter, attacked image and its barycenter. The difference between them is imperceptible except for the black portion in the border for barycenters. This arises due to interpolation of the images from rotation. \begin{figure}[hb] \centering \begin{subfigure}[h]{.12\textwidth} \includegraphics[width=\textwidth]{images/barycenter/outoorig0.png} \caption{Clean} \end{subfigure} \begin{subfigure}[h]{.12\textwidth} \includegraphics[width=\textwidth]{images/barycenter/outorigbary0.png} \caption{Barycenter} \end{subfigure} \begin{subfigure}[h]{.12\textwidth} \includegraphics[width=\textwidth]{images/barycenter/outadv0.png} \caption{Adversarial} \end{subfigure} \begin{subfigure}[h]{.12\textwidth} \includegraphics[width=\textwidth]{images/barycenter/outadvbary0.png} \caption{Adv.+Bary.} \end{subfigure} \caption{Illustration of barycenters from Tiny ImageNet.} \label{fig:barycenter-samples} \end{figure} \iffalse \subsection{Obfuscated Gradients} In \cite{athalye2018obfuscated}, authors claim that some defense techniques give a sense of false security by breaking gradient descent and cause obfuscated gradients. We evaluate against the points proposed in \cite{athalye2018obfuscated} and show that our method does not obfuscate gradients. First, defense against one step FGSM is better than multi-step PGD-20 as given in Table \ref{tab:cifar-10-WRN32}. Tables \ref{tab:cifar-10} and \ref{tab:cifar-100} also show that defense against PGD-10 is better than PGD-20. Second, in case of B-TRADES$_{\text{AWP}}$, increasing $\epsilon$ to 128/255 leads the accuracy drop to 15.31\%. We further note that this accuracy goes to zero when we use PGD-10 with an $\epsilon = 1$. Though accuracy against a stronger attack such as AA is better compared to PGD-10 or PGD-20, we observe that this phenomenon has also been observed in \cite{mao2021adversarial} which reverses the adversarial noise. \fi \section{Conclusion} In this work we introduce Beckman barycenter analogous to Wasserstein barycenter. We use the Beckman OT formulation and analytically solve for the barycenter. Defining the baycenter using Beckman OT also has the advantage that the computational tools to obtain barycenter are well known and efficient. This overcomes the complexity in solving Wasserstein barycenters. Further, we show that barycenter can be used for enhancing the performance of adversarially trained models. Our training is very efficient as we only need a single epoch. Experimental analysis demonstrates state-of-art results against different attacks. \clearpage \bibliographystyle{named}
\section{Introduction} The goal of Single Object Tracking (SOT) is to find the position and scale of the target in each frame by using a Template.The single object tracker is designed to track all kinds, but only one target box is output. In recent years, the performance of trackers has been greatly improved with the powerful feature expression ability of deep learning. Though single object trackers support all kinds of target tracking, the existing large object tracking dataset benchmarks such as LaSOT\cite{lasot}, GOT10k\cite{got10k}, TrackingNet\cite{trackingnet} mainly focus on target tracking in open-air scenarios. As a branch of SOT, Underwater Object Tracking (UOT) has to deal with the unique challenges of underwater environment. On the one hand, underwater images usually have problems such as color cast, low contrast, and low visibility, which affect the performance of the open-air tracker in underwater tracking tasks. On the other hand, in the tasks of marine biological observation and behavior analysis, organisms such as fish and dolphins often appear in groups, and it is difficult to distinguish similar marine organisms from each other in terms of appearance characteristics. Therefore, it is challenging for open-air trackers to identify similar underwater targets of the same kind based on their appearance characteristics. Before the presentation of the UOT100 dataset\cite{uot100}, due to the lack of unified underwater object tracking dataset benchmark, people mainly verified the effectiveness of their trackers by selecting some video or image sequences that reflect the challenges of underwater tracking tasks on Fish4knowledge (F4K)\cite{f4k} or Underwater Change Detection (UWCD)\cite{uwcd} or other self -built datasets. After UOT100 and UTB180\cite{utb180} were proposed, the researchers pay more attention to the development of high performance underwater trackers. The advanced open-air tracker with powerful feature representation capability can still maintain competitive performance when dealing with underwater image distortion, but are prone to tracking drift when dealing with multiple similar marine organisms. At present, the main paradigm of the tracker is to extract features and fuse features (or jointly extract and fuse features) from the template image and the search area through neural network, and then use the prediction head to decode the fused features to obtain the bounding box of the target. The prediction head is mainly divided into two categories. One type is the end-to-end direct output of bounding boxes (such as CornerHead), the other type locates the target through the response map and provides candidate boxes (such as CenterHead) or directly outputs candidate boxes and their scores. Then the maximum response value is used to locate the target, which can also be called the detection-based post-processing paradigm. The response map contains the target prediction boxes in the search area and their confidence. However, the difference between the response values of two objects with similar appearance is very small, and the response value of the real target may be lower than the response value of similar objects with illumination changes, motion blur or occlusion. Therefore, it is difficult to accurately locate the real target only using detection-based post-processing. The tracker is composed of neural network and post-processing. When the neural network and its detection-based post processing cannot effectively distinguish the nuances of similar objects, we rethink how the visual tracking task itself should distinguish different similar objects. We find that similar objects can be directly distinguished by their positions in images. In the image sequence, similar objects can be located by their own motion information. Therefore, a natural idea is to record the motion information of the target itself so as to exclude similar targets around through the movement and positioning of the target. We have noticed that the Tracking by Detection (TBD) paradigm in Multi Object Tracking (MOT) has provided a mature method, that is, maintaining the state and motion information of the target through Kalman filter, and constantly providing position constraints based on motion information in tracking. Therefore, we propose a simple and efficient motion-based post-processing paradigm to deal with similar problems in underwater object tracking. We maintain a Kalman filter during the tracking process of the single target tracker. When similar targets of the same kind appear in the search area, the prediction box of the Kalman filter is used as the target state constraint to match all candidate boxes of the tracker and remove the bounding boxes of potential similar targets. Our main work includes: 1. We rethink how the underwater visual tracking itself should distinguish similar targets, and design a simple, effective, easy to expand, and easy to migrate motion based post-processing strategy with reference to the method of motion state maintenance in MOT. This strategy uses Kalman filter to maintain, update, and predict target motion information, and reuse candidate tracking boxes to eliminate interference from similar targets of the same kind. 2. We verified the effectiveness of our method on different trackers and comprehensively compared the performance of top-level Open-air trackers on UOT100 and UTB180. Our strategy was compared with other tracker enhancement strategies, which proves that our method is suitable for dealing with underwater similar object tracking and our method has good compatibility to work together with other enhancement methods. 3. We analyzed which aspect of our method has improved the performance of the tracker, and explained the shortcomings of our strategy and the existing trackers when dealing with similar target problems of the same kind. \section{Related Work} \subsection{Single Object Tracking} Single object trackers contain traditional methods, correlation filtering methods, Siamese-based methods, Transformer-based methods and Online-discrimination methods. Traditional tracking methods include mean shift, particle filter, etc. Classical correlation filtering methods mainly include MOSSE\cite{mosse}, KCF\cite{kcf}, DSST\cite{dsst}, ECO\cite{eco}. Although their tracking accuracy and success rate are far less than the current trackers, these methods are still active in some specific tracking tasks. Siamese-based trackers use the powerful representation ability of depth features to improve the tracking performance significantly. As the first Siamese-based tracker, SiamFC\cite{siamfc} extracts features from Template and Search area using AlexNet and computes their similarity to locate target. Inspired by the Anchor-based thought, SiamRPN\cite{siamrpn} replaces the prediction head with an RPN network to fuse features to make the tracker perform faster and more accurately. Then, deeper networks such as Resnet50\cite{siamrpn++}, Mask branch\cite{siammask} and so on are added to improve SiamRPN. Later, inspired by the idea of Anchor-Free, trackers such as SiamBAN\cite{siamban}, Ocean\cite{ocean} have been proposed. In addition, adding online branches\cite{ocean} and attention mechanisms\cite{DeSiamAttn} are also used to improve the Siamese based trackers, which has produced great results. Transformer-based trackers have powerful global receiving field and global information integration capability, which is the weakness of Siamese-based trackers, further improving the performance of tracker. Stark\cite{stark}uses Transformer to fuse features and CornerHead to predict the bounding box end-to-end. TransT\cite{transt} uses self-attention module and cross-attention module to construct Transformer-like network to fuse features. MixFormer\cite{mixformer} uses the hybrid module of convolution and self-attention to extract and fuse features efficiently. AiAtrack\cite{aiatrack} improves feature expression ability by introducing self-attention into the self-attention module. OSTrack\cite{ostrack} uses VIT to jointly extract and fuse template features and search area features, greatly improving the performance of the tracker. Online discriminant-based trackers not only improve the expression ability of object appearance features through neural networks, but also improve the adaptability to appearance changes through self-updating of the object model. ATOM\cite{atom} uses the classification and estimation module to classify the foreground and background and estimate the bounding box of the target. Dimp\cite{dimp} introduces the discrimination of template background information and improves the identification ability of the tracker through online update. KeepTrack\cite{keeptrack} keeps track of all potential targets by building the Target Candidate Extraction Network and Association Network to distinguish between targets and distractors. TOMP\cite{tomp} improves the feature expression ability in DCF paradigm and the performance of the online tracker through the Transformer network. \subsection{Underwater Object Tracking} The single object tracker does not distinguish between categories. It is a natural idea to introduce the open-air tracker into underwater tracking tasks and improve it based on the characteristics of underwater tracking tasks. Considering that the underwater tracker usually needs to be carried in the Autonomous Unmanned Vehicle (AUV) or Remote Operated Vehicle (ROV) to perform the actual ocean observation task. However, AUV usually has limited energy and computing power, so, fast, efficient and low-power correlation filtering methods play an important role. The KCF algorithm through the adaptive appearance model and its tracking strategy\cite{2_2Li_te_al}, feature fusion and scale correction mechanism\cite{2_2Sun_et_al} to deal with the challenges of underwater tracking. BACF is used to obtain more adaptive features, and combine scale estimation with the confidence -based update strategy to improve the performance of the tracker\cite{2_2_lu_et_al}. In addition, TLD-based\cite{2_2_wang_et_al}trackers and Particle-Based\cite{2_2_Rout_et_al}\cite{2_2_Bhat_et_al} trackers are still used to track underwater targets. ROV can usually provide more energy and more powerful computing power, so it is feasible to use deep learning trackers on ROV to obtain more robust tracking performance. The reverse residual bottleneck block is added to SiamRPN++ to enhance the feature expression ability of the tracker to meet the challenge of underwater image degradation\cite{2_2_wang_et_al_siamrpn++}. UStark\cite{ustark} uses an image adaptive enhancement head to predict a set of enhancement parameters, and uses an enhancement module to process input images to improve the performance of the Stark tracker under different underwater image distortions. \section{Methods} \label{sec:others} Our approach is based on three assumptions: 1. We think that the advanced features extracted by the neural network of the tracker are the combination of responses. Similar targets usually have similar response values, which means similar targets have similar values in the score graph generated by the tracker. 2. We believe that after training, the neural network has a strong ability to distinguish target features, which means that the neural network has enough assurance to confirm that the location and scale estimation of each generated high-confidence target are accurate. 3. We believe that tracking is a continuous process. The location and scale of the target in the past frame will affect the state of the target in the current frame. \begin{figure} \centering \includegraphics[width=16cm]{fig1.jpg} \caption{Visualization of our method in tracking process. The Network input the Template and Search area and output the Response map. In the Post processing, we first follow the detection-based post processing method. When encountering similar target interference and tracking drift, we design a new motion-based post processing method to correct tracking drift.} \label{fig:fig1} \end{figure} We did not make any changes to the tracker's network itself, nor did we perform additional training on the network.This means that our work can be quickly applied to other tracking fields with similar target problems We only reuse the state information of the target in the past frame and the candidate target box information of the tracker, which means that we can find the real target among the candidate boxes using the motion constraint brought by Kalman filter when tracking drift occurs. \subsection{Motion information estimation by using Kalman Filter} Following the estimation model of the SORT(Bewley et al., 2016) tracker, we set the target status as: \begin{equation} x = [u,v,s,r,u',v',s'] \end{equation} where $u$ and $v$ represent the horizontal and vertical positions of the target center respectively. $s$ represents the area of the target. In the tracking process, we use Kalman filter to maintain the target state. The output bounding box in each frame is used to update the Kalman filter. In the next frame, the Kalman filter is used to predict the state of the target and generate a prediction box. \subsection{Location score calculation} We calculate the motion-based location score of candidate boxes and select the bounding box with the maximum value as the most appropriate candidate box. The location score is shown as: \begin{equation} location\_score = conf \times IOU(pred\_box, candidate\_boxes) \end{equation} where $conf$ represents the response value of each candidate box. $pred\_box$ represents the prediction box of Kalman filter in the current frame. $candidate\_boxes$ represents the response boxes whose response scores rank above a certain threshold. \subsection{Motion-based location paradigm} Inspired by the target matching strategy in MOT, We designed a motion-based candidate boxes location strategy for the single target tracker. Specifically, the tracker initializes an additional Kalman filter in the initialization process to record, update and predict the motion information of the target. In the tracking process, the tracker predicts a tracking box based on the maximum response value of the response map. Then the Kalman filter is used to predict the target position in this frame. If the IOU of the Kalman filter prediction box and the maximum-response box is greater than a threshold value, we consider this to be a correct tracking and process the next frame. On the contrary, we think that the target has drifted. We extract other high response value points in the response map and obtain candidate boxes with high confidence. After NMS, we calculate the similarity scores of candidate boxes, select the bounding box corresponding to the maximum value, and output it. Our pseudo code is shown in Table \ref{tab:table1}. \begin{table} \caption{PyTorch pseudo code for our method} \centering \begin{tabular}{l} \toprule \multicolumn{1}{c}{PyTorch Pseudo Code } \\ \midrule \# self.kf\_num = 40; self.nms\_thre = 0.8; self.conf=0.6 \\ \\ If self.use\_kf: \\ \ \ \ \ kf\_pre\_box = self.kalmanfilter.predict() \\ \ \ \ \ if box\_iou(kf\_pre\_box,\ max\_response\_box) > self.conf: \\ \ \ \ \ \ \ \ \ output\_box = max\_response\_box \\ \ \ \ \ else: \\ \ \ \ \ \ \ \ \ pred\_boxes, conf = decode\_muti\_boxes(output, self.kf\_num) \\ \ \ \ \ \ \ \ \ pred\_boxes, conf = NMS(pred\_boxes, response, self.nms\_thre) \\ \ \ \ \ \ \ \ \ location\_score = box\_iou(kf\_pre\_box, pred\_boxes) \\ \ \ \ \ \ \ \ \ location\_score = torch.mul(location\_score, conf) \\ \ \ \ \ \ \ \ \ index = torch.argmax(location\_score) \\ \ \ \ \ \ \ \ \ output\_box = pred\_boxes[index] \\ \\ \# update kalmanfilter \\ If self.use\_kf: \\ \ \ \ \ self.kalmanfilter.update(output\_box) \\ \bottomrule \end{tabular} \label{tab:table1} \end{table} Please note that we do not directly use the box predicted by the Kalman filter as the output box. The reason is that the box predicted by the Kalman filter has certain inaccuracies. We only use the prediction box as a constraint to select one of the candidate boxes generated by the tracker that best matches the position where the current target should be. Kalman filter can be used to establish the correlation between frames of the target to realize the interaction of position information between frames and make the tracker know where its target is likely to be. \subsection{Comparison with detection-based paradigm} The detection-based post-processing paradigm selects the bounding box of the maximum response value in the search area of each frame to locate the target through the powerful discriminant ability of the neural network. The detection of each frame is independent of each other, and it does not pay attention to the information of non- maximum response value points in the response value. Our motion-based post-processing paradigm not only uses the maximum response value to locate the target, but also uses the motion information of the target in the sequence to constrain the position of the bounding box. When the bounding box drifts, the candidate frame information is reused to retrieve the tracked target. The degree of information utilization is shown in Table \ref{tab:table2}. The illustration of utilization of target past status information is in Figure \ref{fig:fig1}. The illustration of utilization of candidate box information is in Figure \ref{fig:fig2}. \begin{figure} \centering \includegraphics[width=14cm]{fig2.jpg} \caption{The original tracker only uses the maximum response value of each frame to locate the target, so its track is discrete in the tracking. Although significant errors occur in the trajectory, the detection-based paradigm does not have the function of trajectory self-correction. Our method uses the target state information in past frames to effectively constrain the tracker's tracking position in each frame. Even if there is a slight tracking drift, it can still be effectively corrected.} \label{fig:fig2} \end{figure} \begin{table} \caption{The use of information by different post-processing paradigms} \centering \begin{tabular}{ccccc} \cmidrule(r){1-5} \multicolumn{1}{c}{\ } & \multicolumn{2}{c}{Single Frame Information} &\multicolumn{2}{c}{Image Sequence Information} \\ \cmidrule(r){1-5} paradigm & Max response value & Candidate information & Target motion information & Other information \\ \cmidrule(r){1-5} Detection-based & \checkmark & \ & \ & \ \\ Motion-based (ours) & \checkmark & \checkmark & \checkmark & \ \\ \cmidrule(r){1-5} \end{tabular} \label{tab:table2} \end{table} \section{Experiment} \subsection{Implementation Details} We replaced Stark’s CornerHead with CenterHead and transferred the remaining parameters, and then trained 50 epochs according to the paradigm of OSTrack. Then we set kf\_num to 40 on the OSTrack, Starks, Starkst on the UOT100. Set kf\_num to 30 on the OSTrack on the UTB180. Set kf\_num to 40 on the Starks and Starkst on the UTB180. Set nms\_thre to 0.8 and conf to 0.6 on each tracker and both datasets. Starkst update interval is 100. The selected response map is the original response map without hanning window. On the TransT, we set kf\_num to 20, nms\_thre to 0.8, conf to 0.6 and the selected response map has been multiplied by the Hanning window on both datasets. Other trackers evaluated on UOT100 and UTB180 were set according to their original parameters. The device we used is CPU: i9-12900KF. GPU: GTX-3090Ti. The version of Pytorch we used is 1.7.1. \subsection{Dataset and Evaluation indicators} UOT100 dataset benchmark is the first typical Underwater Object Tracking dataset, which is mainly used to reflect the challenges faced by underwater object tracking, such as image degradation, similar targets, large deformation and other issues. In order to verify the effectiveness of our method in dealing with similar target challenges, we extract 28 subsets of UOT 100 with similar target interference challenges as similar subsets of UOT. [See appendix for details of division]. At the same time, we use the remaining 78 sequences as the complement of similar subsets to verify whether our strategy will reduce the performance of the tracker on non-similar problem sequences. UTB180 dataset benchmark is a high-quality Underwater Object Tracking dataset. It reflects challenges in underwater object tracking such as Unclear Water, Occlusion, Similar Objects. We also use its 116 similar object subsets to prove that our method is effective. The other 64 non-similar object subsets are used to explore the performance of our method on non-similar problem sequences. We follow the One Pass Evaluation (OPE) protocol most commonly used in single object tracking to evaluate the tracker, and the AUC, precision, and norm-precision are used to evaluate the tracker. We follow the One Pass Evaluation (OPE) protocol most commonly used in single object tracking to evaluate the tracker, and the AUC, precision, and norm-precision are used to evaluate the tracker. \subsection{Effectiveness of our method} We select SOTA performance trackers such as OSTrack\cite{ostrack}, Stark\cite{stark} and TransT\cite{transt} to verify the effectiveness of our strategy. Since the Corner-Head of the original Stark only outputs a box end-to-end, we replace CornerHead with CenterHead to obtain multiple candidate boxes. The results are shown in the Table \ref{tab:table3} and Table \ref{tab:table4}. On UOT100 and UTB180, our method can effectively improve the performance of the tracker. Besides, Our method only needs 0.008s to filter candidate boxes once. Considering that our method is only used when the IOU of the Kalman filter prediction box and the maximum response box is less than the threshold, the average consumption time will be less. \begin{table}\footnotesize \caption{Boost of our method on different trackers in UOT100} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 68.40 & 63.93 & 86.48 & 65.19 & 58.51 & 83.62 & 67.00 & 59.05 & 82.49 & 64.39 & 57.00 &80.70 \\ Original & 66.88 & 62.11 & 84.55 & 62.65 & 54.10 & 78.69 & 66.39 & 57.46 & 80.65 & 63.75 & 56.27 &79.85 \\ \cmidrule(r){1-13} Boost & 1.52 & 1.82 & 1.93 & 2.54 & 4.41 & 4.93 & 0.61 & 1.59 & 1.84 & 0.64 & 0.73 & 0.85 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table3} \end{table} \begin{table}\footnotesize \caption{Boost of our method on different trackers in UTB180} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 64.13 & 56.99 & 73.82 & 58.92 & 49.99 & 69.92 & 60.61 & 53.57 & 71.64 & 58.89 & 51.82 &67.67 \\ Original & 63.03 & 56.52 & 72.61 & 52.72 & 44.07 & 62.09 & 54.90 & 47.79 & 64.47 & 57.52 & 50.30 &66.13 \\ \cmidrule(r){1-13} Boost & 1.10 & 0.47 & 1.21 & 6.20 & 5.92 & 7.83 & 5.71 & 5.78 & 7.17 &1.37 & 1.52 & 1.54 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table4} \end{table} To further prove whether our method can effectively improve the discriminability of the tracker for similar objects around the target, we verified the effectiveness of the method in the similar object subsets of UOT100 and UTB180. As shown in Table \ref{tab:table5} and Table \ref{tab:table6}, our strategy can effectively improve the performance of the tracker when dealing with similar target interference. We noticed that Starks has shown significant improvement. The AUC has improved by more than 6\% on average and the accuracy has improved by more than 9\% on average. This is because Stark extracts the semantic features of the target through backbones and sends them to the Transformer for fusion. However, similar semantic features alone cannot distinguish between targets and similar objects. For example, a ball can represent a basketball or a tennis ball, so Starks is more likely to be disturbed by similar semantics and tracking drift, which is why our method has the highest performance improvement for Starks. Starkst introduces a second variable template to bring online updating adaptability to the tracker, which can enhance the appearance discrimination of the tracker for similar targets. But our method still has gains. In OStrack, our method brings 3\% performance improvement on average. In TransT, our method also improves the performance on MLP-based prediction head. In order to verify whether our method will affect the general underwater tracking, we also tested the performance of four trackers on the complements of similar sequences in UOT100 and UTB180. As shown in Table \ref{tab:table7} and Table \ref{tab:table8}, Starks, Starkst and TransT have shown good adaptability in tracking performance of non-similar problem sequences. In contrast, in the UTB100 non-similar problem sequences, the performance of OSTrack decreases by more than 2\%. Since the performance is still good after the degradation, we did not further explore the cause of the performance degradation. However, the performance degradation on non-similar sequences will limit the promotion of our method on the Open-air tracking dataset (which is also what we hope to solve in the next stage). \begin{table}\footnotesize \caption{Boost of our method on different trackers in UOT100’s similarity subset} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 63.27 & 59.57 &77.65 & 60.70 & 54.31 & 74.63 & 64.18 & 56.32 & 76.19 & 58.05 & 50.33 & 68.55 \\ Original & 58.81 & 54.33 & 72.08 & 54.72 & 45.14 & 65.08 & 59.95 & 51.48 & 70.15 & 57.12 & 50.02 &67.74 \\ \cmidrule(r){1-13} Boost & 4.46 & 5.24 & 5.54 & 5.98 & 9.17 & 9.55 & 4.23 & 4.84 & 6.04 &0.93 & 0.31 & 0.81 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table5} \end{table} \begin{table}\footnotesize \caption{Boost of our method on different trackers in UTB180's similarity subset} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 57.70 & 52.31 & 65.80 & 51.99 & 45.47 & 61.14 & 55.34 & 51.07 & 65.24 & 51.89 & 47.68 & 59.28 \\ Original & 54.78 & 50.29 & 62.50 & 42.68 & 36.87 & 49.63 & 47.16 & 42.64 & 54.91 & 49.88 & 45.39 & 56.94 \\ \cmidrule(r){1-13} Boost & 2.92 & 2.02 & 3.30 & 9.31 & 8.60 & 11.51 & 8.18 & 8.43 & 10.33 & 2.01 & 2.29 & 2.34 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table6} \end{table} \begin{table}\footnotesize \caption{Boost of our method on different trackers in complements of similar sequences in UOT100} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 70.38 & 66.11 & 89.92 & 67.07 & 60.73 & 87.26 & 68.15 & 60.60 & 84.86 & 67.01 & 59.93 & 85.26 \\ Original & 69.88 & 65.49 & 89.23 & 65.75 & 58.01 & 83.92 & 68.91 & 60.19 & 84.67 & 66.23 & 59.03 &84.28 \\ \cmidrule(r){1-13} Boost & 0.50 & 0.62 & 0.69 & 1.32 & 2.72 & 3.34 & -0.76 & 0.41 & 0.19 & 0.78 & 0.90 & 0.98 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table7} \end{table} \begin{table}\footnotesize \caption{Boost of our method on different trackers in complements of similar sequences in UTB180} \centering \begin{tabular}{ccccccccccccc} \cmidrule(r){1-13} \multicolumn{1}{c}{Tracker} & \multicolumn{3}{c}{OSTrack256} &\multicolumn{3}{c}{Starks+CenterHead+ep50}&\multicolumn{3}{c}{Starkst+CenterHead+ep50} &\multicolumn{3}{c}{TransT}\\ \cmidrule(r){1-13} method& AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm\\ \cmidrule(r){1-13} Ours & 75.79 & 65.46 & 88.35 & 71.47 & 58.19 & 85.84 & 70.17 & 58.10 & 83.22 & 71.57 & 59.32 & 82.89 \\ Original & 77.97 & 67.83 & 90.92 & 70.94 & 57.11 & 84.68 & 68.91 & 57.12 & 81.81 & 71.37 & 59.20 & 82.79 \\ \cmidrule(r){1-13} Boost & -2.18 & -2.37 & -2.57 & 0.53 & 1.08 & 1.16 & 1.26 & 0.98 & 1.41 & 0.20 & 0.12 & 0.10 \\ \cmidrule(r){1-13} \end{tabular} \label{tab:table8} \end{table} \subsection{Comparison of our method with SOTA trackers} We evaluated 14 SOTA trackers (NeighborTrack (represented by OSTrack-N)\cite{ostrackN}, OSTrack\cite{ostrack}, MixFormer\cite{mixformer}, AiATrack\cite{aiatrack}, ToMP\cite{tomp}, KeepTrack\cite{keeptrack}, Stark\cite{stark}, TransT\cite{transt}, TrDimp\cite{trdimp}, SiamBAN-ACM\cite{siambanacm}, Dimp\cite{dimp}, SiamBAN\cite{siamban}, ATOM\cite{atom}, SiamCAR\cite{siamcar}) on UOT100 and UTB180 dataset. We compared the results with our method results. The results of comparison of our method (applied to OSTrack256) and SOTA performance trackers on the UOT100 and UTB180 are shown in Table \ref{tab:table9} and Table \ref{tab:table10}. Our method (applied to OSTrack256) achieved SOTA performance on the UOT100. In addition, we found that the Open-air SOTA performance tracker still has a very good performance in terms of precision and regularization precision on the sequence of non-similar problems of UOT100 and UTB180. This means that in underwater target tracking, the improvement of strong feature representation ability is not the most urgent task to improve the performance of the underwater tracker. We need to further consider the performance improvement in edge cases (such as similar targets, occulsion, unclear water, out of view and so on) during tracking. \begin{table}[h]\scriptsize \caption{Comparisons of our method (applied to OSTrack256) with SOTA performance trackers on the UOT100. The best two results are shown in \textcolor{red}{red} and \textcolor{blue}{blue} fonts.} \centering \begin{tabular}{ccccccccccc} \cmidrule(r){1-11} \multicolumn{2}{c}{\ } & \multicolumn{3}{c}{UOT100(106)} &\multicolumn{3}{c}{UOT100’s Similary Subset (28)}&\multicolumn{3}{c}{Complements of Similar Subsets (78) }\\ \cmidrule(r){1-11} \cmidrule(r){1-11} Tracker & Source & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm \\ \cmidrule(r){1-11} ATOM & CVPR2019 & 54.79 & 44.24 & 68.76 & 48.63 & 41.42 & 59.84 & 57.48 & 46.03 & 73.53 \\ Dimp50 & ICCV2019 & 59.82 & 48.90 & 75.39 & 56.59 & 45.62 & 68.80 & 61.42 & 50.91 & 78.38 \\ SiamCAR & CVPR2020 & 53.55 & 45.96 & 69.40 & 44.14 & 40.88 & 54.78 & 57.32 & 48.44 & 75.06 \\ SiamBAN & CVPR2020 & 56.72 & 50.71 & 73.41 & 53.76 & 49.56 & 67.64 & 57.92 & 51.89 & 76.11 \\ SiamBAN-ACM & CVPR2021 & 61.43 & 51.89 & 75.01 & 55.84 & 48.07 & 65.70 & 63.73 & 54.05 & 78.82 \\ TrDimp & CVPR2021 & 61.19 & 51.04 & 77.47 & 54.90 & 44.42 & 66.32 & 63.66 & 54.17 & 81.92 \\ TransT & CVPR2021 & 63.75 & 56.27 & 79.85 & 57.12 & 50.02 & 67.74 & 66.23 & 59.03 & 84.28 \\ Stark-ST101 & ICCV2021 & 66.33 & 58.12 & 82.66 & 57.50 & 49.82 & 68.03 & 69.63 & 61.68 & 88.04 \\ Stark-S50 & ICCV2021 & 63.40 & 55.29 & 77.38 & 52.86 & 41.72 & 58.75 & 67.35 & 60.66 & 84.27 \\ KeepTrack & ICCV2021 & 60.04 & 51.20 & 78.05 & 54.48 & 46.29 & 66.84 & 63.02 & 53.66 & 82.37 \\ ToMP50 & CVPR2022 & 66.84 & 58.55 & 82.82 & 61.94 & 53.69 & 73.80 & 68.87 & 60.92 & 86.47 \\ AiaTrack & ECCV2022 & 65.31 & 57.57 & 83.06 & 59.67 & 52.24 & 72.43 & 67.48 & 60.04 & 87.02 \\ MixFormer & CVPR2022 & 66.20 & 59.81 & 83.50 & 58.97 & 50.89 & 69.78 & 68.94 & 63.55 & 88.63 \\ OSTrack384 & ECCV2022 & 66.96 & 62.322 & 84.69 & 60.19 & 54.82 & 73.18 & 69.45 & 65.60 & 88.90 \\ OSTrack256 & ECCV2022 & 66.88 & 62.11 & 84.55 & 58.81 & 54.33 & 72.08 & 69.88 & 65.49 & 89.23 \\ OSTrack-N & ArXiv2022 & 67.32 & 62.56 & 85.23 & 59.82 & 55.25 & 73.63 & 70.15 & 65.79 & 89.66 \\ \cmidrule(r){1-11} OSTrack256+ours & \ & \color{blue}68.40 & \color{blue}63.93 & \color{blue}86.48 & \color{blue}63.27 & \color{blue}59.57 & \color{blue}77.65 & \color{blue}70.38 & \color{blue}66.11 & \color{blue}89.92 \\ OSTrack256+ours+N & \ & \color{red}68.52 & \color{red}64.00 & \color{red}86.75 & \color{red}63.65 & \color{red}59.86 & \color{red}78.85 & \color{red}70.40 & \color{red}66.09 & \color{red}89.88\\ \cmidrule(r){1-11} \end{tabular} \label{tab:table9} \end{table} \begin{table}[h]\scriptsize \caption{Comparisons of our method (applied to OSTrack256) with SOTA performance trackers on the UTB180. The best two results are shown in \textcolor{red}{red} and \textcolor{blue}{blue} fonts.} \centering \begin{tabular}{ccccccccccc} \cmidrule(r){1-11} \multicolumn{2}{c}{\ } & \multicolumn{3}{c}{UTB180 (180)} &\multicolumn{3}{c}{UTB Similary Subset (116)}&\multicolumn{3}{c}{Complements of Similar Subsets (64) }\\ \cmidrule(r){1-11} \cmidrule(r){1-11} Tracker & Source & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm \\ \cmidrule(r){1-11} ATOM & CVPR2019 & 47.49 & 35.23 & 55.16 & 42.02 & 33.66 & 48.25 & 57.40 & 38.09 & 67.32 \\ Dimp50 & ICCV2019 & 50.52 & 37.51 & 58.49 & 43.41 & 34.48 & 49.33 & 63.39 & 43.01 & 75.08 \\ SiamCAR & CVPR2020 & 49.80 & 40.84 & 60.07 & 46.62 & 41.71 & 56.27 & 55.57 & 39.25 & 66.94 \\ SiamBAN & CVPR2020 & 56.95 & 46.95 & 68.22 & 54.29 & 47.11 & 64.53 & 61.77 & 46.64 & 74.90 \\ SiamBAN-ACM & CVPR2021 & 56.97 & 46.97 & 66.74 & 52.61 & 45.50 & 60.69 & 54.88 & 49.63 & 77.61 \\ TrDimp & CVPR2021 & 59.00 & 47.52 & 68.65 & 52.03 & 43.49 & 59.66 & 71.62 & 54.82 & 84.93 \\ TransT & CVPR2021 & 57.52 & 50.30 & 66.13 & 49.88 & 45.39 & 56.94 & 71.37 & 59.20 & 82.79 \\ Stark-ST50 & ICCV2021 & 55.86 & 4845 & 64.63 & 45.75 & 40.85 & 52.13 & 74.18 & 62.21 & 87.27\\ Stark-S50 & ICCV2021 & 53.89 & 45.62 & 61.33 & 43.08 & 37.68 & 47.84 & 73.47 & 60.02 & 85.78 \\ KeepTrack & ICCV2021 & 54.90 & 43.49 & 64.06 & 45.71 & 37.78 & 52.52 & 71.55 & 53.82 & 84.99 \\ ToMP50 & CVPR2022 & 61.14 & 53.40 & 70.82 & 54.39 & 48.72 & 62.45 & 73.36 & 61.87 & 85.99 \\ AiaTrack & ECCV2022 & 62.01 & 52.94 & 72.11 & 55.14 & 48.13 & 63.39 & 74.47 & 61.67 & 87.91\\ MixFormer & CVPR2022 & 57.44 & 50.60 & 65.69 & 46.37 & 41.01 & 51.96 & 77.49 & 68.00 & 90.58 \\ OSTrack384 & ECCV2022 & 62.04 & 57.18 & 70.99 & 52.14 & 48.79 & 59.10 & 79.98 & 72.40 & 92.55 \\ OSTrack256 & ECCV2022 & 63.03 & 56.52 & 72.61 & 54.78 & 50.29 & 62.50 & 77.97 & 67.83 & 90.92\\ OSTrack-N & ArXiv2022 & \color{blue}64.53 & \color{blue}58.10 & \color{blue}74.16 & \color{blue}58.21 & \color{blue}53.85 & \color{blue}66.29 & \color{red}75.99 & \color{red}65.79 & \color{red}88.42 \\ \cmidrule(r){1-11} OSTrack256+ours & \ & 64.13 & 56.99 & 73.82 & 57.70 & 52.31 & 65.80 & 75.79 & 65.46 & 88.35 \\ OSTrack256+ours+N & \ & \color{red}65.33 & \color{red}58.29 & \color{red}74.89 & \color{red}59.61 & \color{red}54.33 & \color{red}67.66 & \color{blue}75.70 & \color{blue}65.45 & \color{blue}88.00 \\ \cmidrule(r){1-11} \end{tabular} \label{tab:table10} \end{table} \subsection{Comparison of our method with other improvement strategies} We compared our method with two other classical tracker enhancement methods (NeighborTrack (Represented by OSTrack-N)\cite{ostrackN}, Alpha-Refine\cite{ar}). Specifically, we applied these enhancement methods to OSTrack and evaluate the performance of the tracker on the UOT100 and UTB180. The NeighborTrack is designed to deal with occlusion problem. The UOT100 dataset does not focus on requiring the tracker to deal with occlusion challenge, so the NeighborTrack does not perform very well. In the UTB180, there are 92 sequences reflecting occlusion problem, which improves the performance of NeighborTrack. In addition, we found that our method is not in conflict with the NeighborTrack method, and they can jointly enhance the performance of the tracker. Besides, our method can also be combined with the Alpha-Refine module to jointly improve the performance of the tracker. In conclusion, our method has good compatibility, and can be inserted into the tracker to improve the tracker performance together with other methods. \begin{table}[h]\footnotesize \caption{Comparisons of our method with other improvement strategies on the UOT100} \centering \begin{tabular}{cccccccccc} \cmidrule(r){1-10} \multicolumn{1}{c}{\ } & \multicolumn{3}{c}{UOT100 (106)} &\multicolumn{3}{c}{UOT100’s Similary Subset (28)}&\multicolumn{3}{c}{Complements of Similar Subsets (78) }\\ \cmidrule(r){1-10} Tracker & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm \\ \cmidrule(r){1-10} OSTrack & 66.88 & 62.11 & 84.55 & 58.81 & 54.33 & 72.08 & 69.88 & 65.49 & 89.23\\ \cmidrule(r){1-10} OSTrack+ours & 68.40 & 63.93 & 86.48 & 63.27 & 59.57 & 77.65 & 70.38 & 66.11 & 89.92\\ OSTrack+N & 67.32 & 62.56 & 85.23 & 59.82 & 55.25 & 73.63 & 70.15 & 65.79 & 89.66 \\ \cmidrule(r){1-10} OSTrack+ours+N & 68.52 & 64.00 & 86.75 & 63.65 & 59.86 & 78.85 & 70.40 & 66.09 & 89.88 \\ \cmidrule(r){1-10} OSTrack+AR & 67.32 & 60.87 & 83.90 & 58.53 & 53.49 & 70.29 & 70.62 & 64.09 & 88.97 \\ OSTrack+ours+AR & 68.36 & 61.93 & 85.08 & 62.05 & 57.18 & 74.59 & 70.82 & 64.23 & 89.11 \\ \cmidrule(r){1-10} \end{tabular} \label{tab:table11} \end{table} \begin{table}[h]\footnotesize \caption{Comparisons of our method with other improvement strategies on the UTB180} \centering \begin{tabular}{cccccccccc} \cmidrule(r){1-10} \multicolumn{1}{c}{\ } & \multicolumn{3}{c}{UTB180 (180)} &\multicolumn{3}{c}{UTB Similary Subset (116)}&\multicolumn{3}{c}{Complements of Similar Subsets (64) }\\ \cmidrule(r){1-10} \cmidrule(r){1-10} Tracker & AUC & P & P-Norm & AUC & P & P-Norm & AUC & P & P-Norm \\ \cmidrule(r){1-10} OSTrack+ours & 64.13 & 56.99 & 73.82 & 57.70 & 52.31 & 65.80 & 75.79 & 65.46 & 88.35 \\ OSTrack+N & 64.53 & 58.10 & 74.16 & 58.21 & 53.85 & 66.29 & 75.99 & 65.79 & 88.42 \\ \cmidrule(r){1-10} OSTrack+ours+N & 65.33 & 58.29 & 74.89 & 59.61 & 54.33 & 67.66 & 75.70 & 65.45 & 88.00\\ \cmidrule(r){1-10} OSTrack+AR & 64.88 & 59.60 & 74.73 & 58.74 & 55.05 & 66.83 & 75.99 & 67.83 & 89.05 \\ OSTrack+ours+AR & 65.55 & 59.42 & 75.32 & 59.96 & 55.07 & 68.07 & 75.67 & 67.31 & 88.46 \\ \cmidrule(r){1-10} \end{tabular} \label{tab:table12} \end{table} \section{Discussion} \subsection{What does our method actually do?} We visualized some of the tracking results for OSTrack and Stark+CenterHead, as shown in the figure. Our method mainly helps the tracker to suppress tracking drift under similar interference of the same kind, thus improving the performance of the tracker. \begin{figure} \centering \includegraphics[width=15cm]{fig3.jpg} \caption{Visualization comparison examples of our method results on different trackers.} \label{fig:fig3} \end{figure} To further demonstrate our method can suppress tracking frame drift, we show some pictures with the maximum response frame different from the final output frame and the candidate frame information of the current frame. As shown in Figure \ref{fig:fig4}, in the tracking process, although the tracker will generate a large number of meaningless candidate boxes, each target like a template in the search area can still be accurately located. Our method focuses on how to find the accurate target location among the candidate frames when the maximum response frame drifts. In typical cases, the Kalman filter prediction frame is usually close to the target truth box, so the most appropriate candidate frame can be selected by calculating the IOU and response score of the prediction frame and candidate frame. At the same time, the screened candidate box can also maximize the use of the powerful discriminant ability of neural network to obtain an accurate target location and scale estimation. \begin{figure} \centering \includegraphics[width=15cm]{fig4.jpg} \caption{Example of our method self-correcting process.} \label{fig:fig4} \end{figure} \subsection{Lack of instance-level discrimination for close similar targets} In the experiment, we found that most target trackers lack the instance-level discrimination ability for similar targets of the same kind that are close to them. \begin{figure} \centering \includegraphics[width=15cm]{fig5.jpg} \caption{Examples of trackers lacking instance-level discrimination ability.} \label{fig:fig5} \end{figure} As shown in Figure \ref{fig:fig5}, when two similar targets approach, the tracker will regard them as a larger target and predict a large box that covers both targets. This is because the tracker mainly obtains the final bounding box by matching the features in the template with the features in the search area. Each feature matched successfully is considered to be part of the unique output box. They are combined to form a large bounding box containing multiple similar objects. On the one hand, this bounding box will reduce the performance of the tracker and may lead to tracking drift. On the other hand, it will contaminate the Kalman filter in our method and affect the effectiveness of our method. We find that in Object Detection, the training data of the detector contains a large number of similar targets and their labels, which can naturally distinguish target instances after training. At present, the paradigm of tracker post-processing is close to that of detector post-processing. Therefore, can we construct a training set by using a Mosaic-like method or using an unsupervised training paradigm to make the tracker also have the instance-level discrimination ability for similar targets? \subsection{Disadvantages of our method} Because our method only considers the normal form of using Kalman filter to eliminate potential interference targets in the tracking process, and lacks the processing of edge conditions, our method is actually vulnerable to interference. For example, when the Kalman filter uses an inaccurate tracking bounding box to update the state, it will continuously accumulate errors. Finally, the contaminated Kalman filter will screen out the wrong candidate box, reducing the performance of the tracker. In fact, we believe that when using the underwater tracker on an underwater vehicle, various edge conditions need to be considered to obtain the performance improvement of the tracker, such as considering the low response value of the target due to occlusion or out-of-view, the high confidence update scheme for template update (if available ) and target state update (such as our method) and their correction mechanism. Moreover, tracking is usually continuous. In a general tracking process, the IOU between the two frames is usually greater than a certain threshold. In addition, the tracker does not only perform tasks on the underwater robot. Generally, the vehicle may carry Object Detection algorithms as detectors, matching algorithms in MOT, etc. The effective use of external information to improve the performance of the tracker is also a meaningful issue. In general, we believe that the design of an underwater tracker with multiple strategies is helpful to improve the operational efficiency of underwater vehicles. And we hope our method can provide a reference for the design of underwater trackers to address similar object challenges of the same kind. \section{Conclusion} In this paper, considering the problem of marine organism swarming in underwater target tracking, a simple motion-based post-processing strategy using Kalman filter to eliminate similar interference near the target is proposed. Our strategy reuses the information of the candidate target boxes and their response values in the tracker response graph, without additional training for the tracker. We have proved the effectiveness of our method in dealing with similar target challenges on multiple trackers, and explained why our method is effective. In addition, we also evaluate the performance of the open-air tracker in underwater target tracking in the past three years. Our strategy combined with the OSTrack tracker has SOTA performance in underwater object tracking. Our strategy is also compared with other tracker strategies, and it is proved that our method and other methods such as NeighborTrack can jointly improve the tracker performance. Finally, we analyze the shortcomings of existing trackers in dealing with similar problems of underwater targets and the inadequacy of our method. \section{Appendix} \begin{table} \caption{Sequence names of UOT100's similar subsets} \centering \begin{tabular}{l} \toprule \multicolumn{1}{c}{UOT100's similarity subsets } \\ \midrule ArmyDiver1, ArmyDiver2, ArmyDiver3, ClickerAndTarget, ColourChangingSquid, CrabTrap,\\ CressiGuillaumeNeri1, CressiGuillaumeNeri2, Diving360Degree2, FightingEels2, GarryFish,\\ GiantCuttlefish2, GreenMoreyEel1, GreenMoreyEel3, JerkbaitBites, MantaRescue1, MantaRescue2,\\ MantaRescue3, MantaRescue4, MississippiFish, MonsterCreature2, MythBusters, PinkFish, \\ Rocketman, ScubaDiving1, ScubaDiving2, SharkSuckers2, WhiteShark\\ \bottomrule \end{tabular} \label{tab:table13} \end{table} More details can be found in Table \ref{tab:table13}. \bibliographystyle{unsrt}
\section{Introduction} \label{sec:introduction} Technological developments could inadvertently lead to individual and societal harm. With the growing applications of systems powered by artificial intelligence (AI) technology, reliance on the algorithmic decision could amplify discrimination and stereotype \cite{compass2016,dodge2019explaining}. For instance, some of the past instances of bias and discrimination regarding the use of AI include applications in domains such as in court decision \cite{compass2016}, job hiring\footnote{\url{https://reut.rs/2UghQQS}}, online ads\footnote{\url{https://wapo.st/3FkU3IN}}, and credit worthiness rating. Algorithmic decisions carry both economical and personal implications for the individual, which have brought about the issues of fairness, accountability, transparency and ethics (FATE) in AI \cite{shin2020beyond,ferrario2020ai}, especially in high-stake domains \cite{compass2016,adadi2018peeking,aibias2020news,makingprofiling,carton2016identifying,eubanks2018automating,grgic2019human}. Ethics is about making choices based on concepts of right and wrong, duty and obligation, and FATE in AI is geared towards addressing societal challenges brought about by digital systems. However, the present discourse on FATE-related issues is being shaped by the more economically developed countries (MEDC), which raises concerns regarding neglecting local knowledge, cultural pluralism and global fairness \cite{jobin2019global}. As AI systems continue to be weaved into multiple types of products \cite{makingprofiling,carton2016identifying,gebru2019oxford,grgic2019human,sturm2016interpretable,Rago:2020}, AI technology is a major driver for the Fourth Industrial Revolution and transformation. With AI taking the center stage, it is crucial to have an understanding of the FATE-related concerns and needs of various types of communities. Because of the diverse audience affected by AI technology, ensuring effective transparency cannot be monolithic \cite{doshi2017towards} or dominated by certain viewpoints \cite{jobin2019global}; such viewpoint can disproportionately affect different communities \cite{sambasivan2021re}. Therefore, there is a need for more contextualised and interdisciplinary research to underscore best practices that can inform algorithmic fairness and transparency \cite{friedler2019comparative,boykin2021opportunities,ribera2019can}. Thus high regard for diversity and sociodemographics should be taken into account in the design and governance of algorithms that affect the public \cite{fazelpour2022diversity}. One of the most effective approaches is to involve the affected public, and the AI developers to incorporate community-specific FATE needs. Relevant stakeholders within the community will ensure better policing of AI's operations. Adhering to social values is a core requirement for AI practitioners to ensure algorithmic fairness for public good \cite{selbst2019fairness}. Through cooperative, inclusive, and community-led design of AI applications, algorithmic disparities could be addressed effectively. As the most populous country in Africa, we take a community of online users in Nigeria from the Global South as a case study to examine aspects of FATE in AI as viewed by the public. Nigeria is chosen due to its population and the deployment of AI-powered products and services is on the rise. Moreover, the country is ranked $8^{th}$ for the global Internet users \cite{factbook2022}, thus, setting the pace for a vibrant AI workforce in Africa. Focusing on areas considered to be under-served vis-a-vis AI, this study builds upon existing research on responsible AI (1) to assess FATE-related issues and the effectiveness of transparency methods and (2) to offer some insights that will stimulate action towards bridging the accessibility and inclusivity gap in AI. Using ads data from online social networks, we designed a user study ($n=43$) to achieve the above goals. To bridge the accessibility and inclusivity gap, the study\footnote{part of the result in this study was presented as a poster \cite{inuwaai}} contributes the following: \begin{itemize} \item[-] the study examines the prevailing issues in AI applications and how FATE in AI might better serve in places not traditionally served by AI systems. \item[-] we offer some recommendations on how to promote inclusivity and wider public access towards addressing FATE-related challenges. \end{itemize} Leveraging the aforementioned contributions will bring within the purview of mainstream AI discourse and research (in both academia and industry) to ensure an accessible and inclusive AI ecosystem that is fairer to all and sundry. The endeavour will help in improving awareness, privacy, democtratisation of AI systems and better distribution of the economic benefits from the AI technology leading to positive pro-societal changes \cite{abebe2020roles}. \section{Background} \label{sec:background} Our approach in this study borrows from socio-technical disciplines to help in examining FATE in AI issues. Thus, we review relevant literature in responsible AI, FATE in AI, and human-computer interaction (HCI) disciplines. The novelty of our approach is involving the affected communities towards the development of responsible and inclusive AI systems. \subsection{Algorithmic Fairness Algorithms could also promote a form of discrimination and stereotype as seen in the past, such as the compas system\footnote{\url{https://bit.ly/3VJxEu3}} for assessing the likelihood of becoming a recidivist, Amazon's hiring process favouring male applicants over female\footnote{\url{https://reut.rs/2UghQQS}}, and the Google’s jobs ad algorithm showing high-paying jobs to men compared to women\footnote{\url{https://wapo.st/3FkU3IN}}. Algorithmic decisions are capable of reproducing or amplifying disparities for many reasons. For instance, discrimination is often inherent because the data used to train the AI model relied on past decisions which may have themselves been biased and discriminatory \cite{dodge2019explaining}. As such, fairness, accountability, transparency and ethics in AI are geared towards developing and ensuring responsible AI that will incorporate moral behaviour and avoid encoding bias to AI's decisions \cite{kulynych2020pots}. Ethics is about making choices based on concepts of right and wrong, duty and obligation. Thus, it is possible to formulate a hierarchy of goals that embody ethical concepts in digital systems \cite{waldrop1987question}. Among the measures to tackle algorithmic disparities include legislation, relevant policies and positive action play a crucial role in improving access to opportunity \cite{bynum2021disaggregated}. In the Equality Act 2010 UK\footnote{\url{shorturl.at/cqr19}}, positive action is rooted in the anti-discrimination legislative process to curtail the imbalance of opportunity affecting individuals from under-represented communities. In the same vein, algorithmic fairness is viewed through the lens of positive action to improve equal representation \cite{thomas2021algorithmic}. Ethical frameworks such as the UNESCO's recommendation on the Ethics of AI\footnote{\url{https://bit.ly/3XJoj7o}}, World Economic Forum (WEF) and Global Future Council on Human Rights\footnote{\url{https://bit.ly/3gQEwHx}} have been developed to address rising concerns over human rights resulting from the use of AI systems. Also, oversight and regulatory bodies such as the steering group of the European AI Alliance \cite{europeancomm2022} are in place to police AI's operation and address concerns over human rights in the digital age \cite{OHCHR2021}. Ensuring fairness requires a critical look at how inclusive is the approach in factoring demographics and local context in the development process. Through data generated leverage \cite{arrieta2018should}, the public can exert a certain degree of power to tackle algorithmic unfairness by demanding changes or neutralising societal power imbalances \cite{eubanks2018automating,gebru2019oxford,kulynych2020pots,abebe2020roles,vincent2021data}. \subsection{Improving Algorithmic Experience} Earlier studies have pointed to the need for contextualised and interdisciplinary research to underscore best practices that can inform algorithmic fairness and transparency \cite{friedler2019comparative,boykin2021opportunities,ribera2019can}. The principle of transparency is at the centre of ensuring ethical AI, and constitutes about 90\% of the discourse. However, there exist significant variations in terms of interpretation, justification, the domain of application, and mode of achievement \cite{jobin2019global}. In explainable AI (XAI), explanations are crucial for humans to better understand AI systems \cite{adadi2018peeking,bhatt2020explainable}, and they offer an effective interface for human-in-the-loop to identify and address algorithmic fairness issues \cite{dodge2019explaining,bansal2021does,buccinca2021trust}. Explanations should be able to satisfy specific goals, expectations, needs, and demands regarding AI systems. It is not always the case that the end-user must understand the decision process, and explanations should be offered based on the person requesting it \cite{andras2018trusting}. A user-centric approach to providing explanations will facilitate the shift from the majorly developer-driven explanations \cite{ferreira2020people}. Moreover, an appropriate explanation about why an algorithm arrived at a given recommendation should be able to satisfy the user's curiosity and improve knowledge about the technology \cite{hoffman2018metrics}. Because of the diverse audience affected by AI technology, an explanation cannot be monolithic and many factors need to be taken into consideration \cite{doshi2017towards}. Discourse on AI issues is heavily influenced by Western viewpoint due to the prevalence of data, measurement scales, and legal and philosophical dimensions \cite{sambasivan2021re}. This led to most of the AI’s path being shaped by its originating contexts in Western nations \cite{sambasivan2018toward}. Creating transparent, trustworthy and human-centric AI that is in line with ethical needs requires input from diverse stakeholders. Thus high regard for diversity and sociodemographics should be taken into account in the design and governance of algorithms that affect the public \cite{fazelpour2022diversity}. Failure to incorporate local context or sociodemographic factors could lead to (in)advertent or (un)intended discrimination. It is crucial to incorporate interdisciplinary approaches that will be beneficial to various stakeholders’ desiderata and for evaluation, \cite{langer2021we,mohseni2021multidisciplinary,ribera2019can}. Relevant approaches have been put forward within the human-computer interaction (HCI) research to find better ways of improving the transparency of digital systems \cite{cheng2019explaining,ribera2019can,shin2021effects,kroeger2022social}. For algorithmic intuitiveness and improved transparency, the work of \cite{cheng2019explaining} focuses on design principles for explanation interfaces that inform users about algorithmic decisions. Information about the inner workings of the algorithm and interactivity are effective \cite{cheng2019explaining}. To better improve inclusivity and leverage AI's capability, the approach in \cite{hsu2022empowering} involves various stakeholders to sketch out plans for AI applications that recognise local context or needs. \subsection{AI and Policy Response in Africa \label{sec:ai-and-policy-response} AI technologies are increasingly intersecting with new user groups, applications, datasets, and regulations \cite{sambasivan2018toward}. AI in Africa is making inroads into the areas of governance, commercial activities, education, public and private engagements and other societal activities. With the increasing population size, many countries in the Global South are creating a huge amount of data that is generating value and competitive advantage for numerous technology companies. With the increasing application of AI techniques, there are growing calls for relevant laws, policies and guidelines to regulate the use and application of AI \cite{brandusescu2017artificial,smith2018artificial,owoyemi2020artificial,gwagwa2020artificial,OHCHR2021,policybrief2021,wakunuma2022responsible}. Access to representative and quality data is critical for ensuring responsible and ethical AI requirements. The term data colonialism is associated with the commercialisation and weaponisation of data facilitated by local and foreign AI models \cite{coleman2018digital,pilling2019tech,couldry2019data,couldry2019data}. Relying on foreign data generation and processing tools has been criticised over privacy and data protection concerns \footnote{see \url{shorturl.at/dpNO1}}. Many countries in Africa, such as Tunisia \cite{tunisia2018}, Mauritius \cite{mauritius2021}, and Botswana \cite{botswana2021}, strive to incorporate strategies that meet national interest and facilitate AI development. Moreover, many countries in the continent have enacted comprehensive data protection and privacy legislation \cite{onuoha2019ai}. Organisations such as the African Development Bank offer AI-supported services across some countries in Africa \cite{africaaigrant2021}. For a successful national AI strategy, there is a need to ensure algorithmic accountability, data protection, and explainability of decision-making by AI models. \section{Study Design \label{sec:study-design} To gather diverse perceptions and insights, our approach involves both qualitative and quantitative methods. \begin{itemize} \item[-] \textbf{Online User Survey ($n=43$)} is conducted to collect relevant data and assess FATE-related issues. Because online social networks are widely used and diverse users encounter various ads controlled by algorithmic decision (AI), our case study involves online ad-serving data and associated explanations from relevant sources. \item[-] \textbf{Post-survey Session} follows the online user survey to gather feedback from some of the participants. Some participants\footnote{a rule of thumb suggests that stable psychometric estimate requires 5-10 respondents \cite{hoffman2018metrics}} volunteered to take part in the further discussion. \end{itemize} \begin{figure \centering \includegraphics{figures/Approach-Activity-Diagram.png} \caption{An overview of the user study ($n=43$) to understand the degree of AI awareness and effectiveness of explanation. The approach requires the participants to examine some recommendations and corresponding explanations about the decision. This is followed by some broader questions about FATE in AI.} \label{fig:overview} \end{figure} Figure~\ref{fig:overview} shows an overview of the research process. Stemming from the aforementioned methods, our focus will be on the following: \begin{itemize} \item[-] \textit{exposure to AI:} to examine the level of AI awareness and how the public view and interact with AI-powered systems. \item[-] \textit{explanation basis:} central to explainable AI is for models to be able to explain how a decision is reached \cite{gunning2017explainable}. For instance, the EU General Data Protection Regulation (GDPR) requires organisations deploying AI systems to offer meaningful information to the affected individuals about the systems' output \cite{europeancomm2022}. In the context of this work, we will be examining the suitability of the explanations being offered to the users. \item[-] \textit{concerns and needs:} to understand public concerns over AI and their needs or expectation of AI. \end{itemize} \subsection{Online User Study} \label{sec:online-study-design} With the help of AI models, online platforms enable ad customisation making it possible for two online users to be presented with different ads based on certain information about them. Because the research participants come from diverse backgrounds and varying digital literacy, we chose a common use case that will be easier to engage with. Noting how the online platforms enable targeted marketing with the aid of AI, we utilise ads data and corresponding explanations collected from \textit{Facebook}\footnote{\url{https://facebook.com/}},\textit{Twitter}\footnote{\url{https://twitter.com/}} and \textit{Instagram}\footnote{\url{https://www.instagram.com/}} online social networks. For transparency and privacy requirements, online social networks are required to present an explanation about each recommendation or ad shown to their online users. Figure~\ref{fig:explanation-types} shows some of the explanations provided by the three online social platforms. The explanations used in the survey were left unaltered in order to assess how relevant the explanations are and to understand the participants' perceptions about the transparency of the recommendation system. \subsubsection{Survey Data Collection} The survey was designed in \textit{Qualtrics}\footnote{\url{https://www.qualtrics.com/uk/}} questionnaire and participants recruitment using \textit{Jinga}, a local platform that enables recruitment of the research participants. A total of $n=43$ participants have been recruited for the study. The ethical data collection process has been followed, and the respondents were compensated for their time. The scenario involves an AI-generated ad recommendation and a corresponding explanation to describe the rationale behind the recommendation. The participants were presented with a brief introduction about the task and some examples to get started. The activity took about 10-15 minutes to complete. Table~\ref{tab:demographics} shows relevant demographic information about the research participants. \begin{table} \centering \caption{Demographics of the research participants. Sec. Edu means the highest qualification is a secondary school leaving certificate and Higher Inst. refers to other institutions of higher education. \label{tab:demographics} \renewcommand{\arraystretch}{1.2} \resizebox{0.85\textwidth}{!}{% \begin{tabular}{lllllllllll} \toprule & \textbf{Gender} && \textbf{Age} && \textbf{Digital Skill} && \textbf{Education} && \textbf{Employment} & \\ \midrule & Female \textbf{27.9\%} && min. \textbf{18yrs} && Satisfactory \textbf{12\%} &&Sec. Edu \textbf{11.6\%} & & Student \textbf{44.2\%} &\\ & Male \textbf{72.1\%} && max. \textbf{48yrs} && Good \textbf{42\%} && Higher Inst. \textbf{11.6\%} & & Self-employed \textbf{20.9\%} &\\ & --- && -- && Excellent \textbf{46\%} && BSc \textbf{62.8\%} & & Full-time \textbf{25.6\%} &\\ & --- && -- && -- && MSc \textbf{14\%} & & Unspecified \textbf{9.3\%} &\\ \bottomrule \end{tabular} } \end{table} \paragraph{Post-survey Session} On completion of the online study, we engage some volunteers out of the participants for further discussion around the following issues: \begin{itemize} \item[-] \textit{awareness of algorithmic deployments and FATE-related issues:} will enable us to access how inclusive and accessible AI models are to the public. The inclusivity aspect addresses or describes whether the explanations take into account the local context (demographics, language, educational qualification, norm, etc). Accessibility deals with whether (it's clear users know the role of AI in the decision process). \item[-] \textit{context and sociodemographics:} how best to harness perceptions from specific communities, often under-served by AI systems, to shape the field for positive societal impact? \item[-] \textit{hindrance:} what are the barriers to algorithmic awareness and what they considered to be required or missing? \end{itemize} \section{Participants' Responses \label{sec:participants-response} After each recommended ad, the participants respond to some questions which are based on the metrics provided in \cite{hoffman2018metrics} to assess FATE-related issues. Table~\ref{tab:measures-and-reliability-analysis} shows the constructs and sample questions answered by the participants. Using a Likert scale (5-1, with 5 denoting strong agreement and 1 strong disagreement), the research participants report their agreements with each of the statements in Table~\ref{tab:measures-and-reliability-analysis}. \begin{figure*}[!tbh \includegraphics[scale=0.65]{figures/ps-bx-knowledge-relevance-satisfaction-trust.png} \caption{The aggregated ratings of the participants in response to knowledge about the AI, relevance of the AI's recommendation, satisfaction with the explanation and trust in the AI system based on educational qualification and self-reported digital skill.} \label{fig:knowledge-relevancy-conviction-satisfaction-trust} \end{figure*} In Figure~\ref{fig:knowledge-relevancy-conviction-satisfaction-trust}, the participants proclaiming 'excellent' and 'good' digital skills rated knowledge about AI very high across all levels of educational qualification. Trust in the AI and satisfaction with the explanation are relatively high. Essentially, satisfaction with the explanation is less under the 'MSc' category compared to the remaining educational qualification. Similarly, Figure~\ref{fig:robustness-data-share-transparency-privacy} shows that participants under the 'satisfactory' digital skill are more willing to share data for an improved and personalised recommendation. The need for transparency and privacy concerns are higher across all groups. \begin{figure*}[t!] \includegraphics[scale=0.65]{figures/ps-bx-robustness-data-sharing-transparency-privacy.png} \caption{The aggregated ratings of the participants in response to perception of the AI's robustness, willingness to share data for personalised service, need for transparency and privacy concerns based on educational qualification and self-reported digital skill.} \label{fig:robustness-data-share-transparency-privacy} \end{figure*} \subsection{Reliability Analysis} We use the following constructs based on participants' responses to answer the following research questions: \begin{itemize} \item[-] \textit{awareness of AI's role} construct includes questions about general knowledge about AI and its role recommendation services \item[-] \textit{relevance of the recommendation} construct relates to the relevance of the recommendation to the user \item[-] \textit{transparency of the explanation} construct includes the transparency or how relatable the explanation is to the user \item[-] \textit{privacy concern} construct includes privacy and willingness to share data for better recommendation services \end{itemize} For reliability analysis, the response from the participants regarding the set of questions under each construct should be correlated in some ways. The degree of such correlation is captured using Cronbach's alpha to measure the internal consistencies among the responses under each construct \cite{cronbach1951coefficient}. Cronbach's alpha is a measure of the internal consistency of a scale given by: $$\alpha = \frac{N\bar{c}}{\bar{v}+(N-1)\bar{c}}$$ where $N$ is the number of items, $\bar{v}$ is the average variance and $\bar{c}$ is the average inter-item covariance between items. A value of $\alpha >0.7$ suggests that each experimental construct is reliable and consistent. Table~\ref{tab:measures-and-reliability-analysis} reports the reliability analysis for each of the applicable constructs. With the exception of the \textit{privacy concern} construct, all the constructs are reliable. The questions for the \textit{privacy concern} constructs seem not reliable or consistent, which could be due to the using two seemingly different questions (\textit{willingness to share data} and \textit{trusting online social networks with data}). \begin{table*}[!tbh] \small \caption{Survey questions and reliability analysis for all constructs in the study using Cronbach's alpha ($\alpha$). The alpha value for all the constructs is $0.87$} \label{tab:measures-and-reliability-analysis} \begin{tabular}{p{1.65cm} p{11cm} p{1.6cm}} \hline \midrule \textbf{Construct: } & \textit{Recommendation Relevance} & \\ \textbf{Measure:} & \begin{enumerate} \item The above ad is relevant to me \item The explanation is convincing \item I want to know that I understand this AI system correctly \end{enumerate} & $\alpha = 0.70$ \\ \hline \textbf{Construct: } & \textit{Awareness of AI's role} & \\ \textbf{Measure:} & \begin{enumerate} \item I want to know what AI is \item I want to know what the AI would have done if something had been different \item I now have better understanding of AI \end{enumerate} & $\alpha = 0.66$ \\ \hline \textbf{Construct: } & \textit{Need for Transparency} & \\ \textbf{Measure:} & \begin{enumerate} \item I want to understand how the AI works \item I want to know why the AI did not make some other decision \end{enumerate} & $\alpha = 0.78$\\ \hline \textbf{Construct: } & \textit{Privacy Concern} & \\ \textbf{Measure:} & \begin{enumerate} \item I want to know that my information is safe with the social media platforms \item I want to share more information in order to get personalised recommendations \end{enumerate} & $\alpha = 0.17$ \\ \hline \midrule \end{tabular} \end{table*} In addition to the questions in Table~\ref{tab:measures-and-reliability-analysis}, the participants chose from the following three options: \textit{satisfactory, good} and \textit{excellent} to report their perceived digital skill or literacy. \subsection{Variation in Responses We are interested in determining whether there is any difference in the perception or rating of algorithmic transparency and other FATE-related needs among the research participants based on the following: \begin{itemize} \item[-] using the self-reported \textit{digital skill} to determine if there is any difference in the ratings provided by the participants \item[-]using the \textit{educational qualification} to determine whether there is any difference in the ratings of FATE-related issues \item[-] using the \textit{source of the recommendation}, i.e. the online social networks, to determine if there is any difference in the ratings provided by the participants. \end{itemize} To explore any variation according to the above categorisations, we leverage the Mann-Whitney-U test to determine how the participants' responses vary across self-reported digital skills, educational qualification, and the online social media platforms offering the ads and corresponding explanations. Essentially, we put forward the following hypotheses for investigation: \begin{itemize} \item[-] \textbf{H0:} there is no difference in the ranking of the variables by the participants across digital skill, education and the source of the recommendations and corresponding explanations. \item[-] \textbf{H1:} there is a difference in the ranking of the variables by the participants across digital skill, education and the source of the recommendations and corresponding explanations. \end{itemize} Before proceeding with determining any difference between the relevant groups, we check for normality in the data using the Shapiro-Wilk normality test. In Table~\ref{tab:reliability-analysis-per-item-and-normality-test}, the $p-value<0.001$ for the individual variable indicates that the Mann-Whitney-U test can be applied since the data is not normally distributed. For the self-reported digital skill, we focus on the differences between 'excellent' and 'good' skills because the number of samples under the \textit{satisfactory} self-reported digital skill is quite low (9 out of 77 instances). \begin{table}[!tbh \centering \caption{Reliability analysis for an individual item ($n=77$ per variable) using Cronbach's ($\alpha$) without and with item dropping. \label{tab:reliability-analysis-per-item-and-normality-test \renewcommand{\arraystretch}{1.2} \resizebox{0.9\textwidth}{!}{% \begin{tabular}{lllclclclcl} \toprule & Variable && Mean Value && $\alpha$ Without Item Dropping && $\alpha$ With Item Dropping && Normality Test & \\ \midrule & Relevance && 3.3 && 0.61 && 0.87 && $W = 0.84, p-value =0.001$ &\\ & Satisfaction && 3.8 && 0.72 && 0.85 && $W = 0.83, p-value =0.001$ &\\ & AI Knowledge && 3.9 && 0.77 && 0.84 && $W = 0.82, p-value = 0.001$ &\\ & Transparency Need && 4.0 && 0.80 && 0.84 && $W = 0.78, p-value =0.001$ &\\ & Alternate Decision Need && 3.8 && 0.70 && 0.85 && $W = 0.83, p-value =0.001$ &\\ & Recommendation Correctness && 4.0 && 0.75 && 0.85 && $W = 0.82, p-value =0.001$ &\\ & Privacy Concern && 4.3 && 0.65 && 0.85 && $W = 0.70, p-value =0.001$ &\\ & To Share Data && 3.5 && 0.49 && 0.86 && $W = 0.85, p-value =0.001$ &\\ & AI Knowledge - Post && 3.5 && 0.60 && 0.86 && $W = 0.90, p-value =0.001$ &\\ & AI Robustness && 3.7 && 0.67 && 0.85 && $W = 0.86, p-value =0.001$ &\\ & Trust in AI && 3.8 && 0.54 && 0.87 && $W = 0.80, p-value =0.001$ &\\ \bottomrule \end{tabular} } \end{table} \begin{table}[!ht] \centering \caption{Mann-Whitney-U Test for samples with some differences according to self-reported digital skill, educational qualification and online social network platforms.} \label{tab:mann-whitney-test-combined-samples-with-significance} \renewcommand{\arraystretch}{1.2} \resizebox{0.85\textwidth}{!}{% \begin{tabular}{lllllllllll} \toprule & \textbf{Pair} && \textbf{Measure} && \textbf{Statistic} && $\mathbf{p-value}$ && \textbf{Remark} & \\ \midrule & good/excellent && need for transparency && 269.5 && 0.001 && digital skill &\\ & good/excellent && need for alternate explanation && 291 && 0.003 && digital skill &\\ & MSc/BSc && satisfaction about the recommendation && 130 && 0.052 && education &\\ & MSc/Higher Inst. && satisfaction about the recommendation && 0 && 0.013 && education &\\ & BSc/Higher Inst. && need for alternate explanation && 24 && 0.048 && education &\\ & Fabcebook/Instagram && recommendation relevance && 176 && 0.017 && online platform &\\ & Twitter/Instagram && recommendation relevance && 194 && 0.045 && online platform &\\ \bottomrule \end{tabular} } \end{table} See Tables~\ref{tab:mann-whitney-test-dskill}, ~\ref{tab:mann-whitney-test-edu} and ~\ref{tab:mann-whitney-test-osn} for details about the respective statistical results. Table~\ref{tab:mann-whitney-test-combined-samples-with-significance} shows the samples with significant differences according to the participants' ratings. Digital skill plays a role towards the participants' rating of FATE in AI questions. High digital literacy means the participants are accustomed to engaging with various AI-powered recommendations and decisions compared to those with less exposure to digital systems. The difference is more pronounced in the need for further transparency. Thus, we can conclude that there is a difference in the ranking of the transparency variables by the participants based on digital skills. However, there is no significant difference based on educational qualification and source of the ads and corresponding explanations. There exists a significant difference in the ratings of satisfaction about the recommendation and the need for alternate decisions based on educational qualification. Similarly, there is a difference in the rating of the recommendation relevance with respect to the source of the recommendations and corresponding explanations. The recommendation offered by Facebook and Twitter tends to be more relevant if compared with Instagram. \section{Towards Accessible and Inclusive AI \label{sec:discussion} We offer our discussion according to the participants' perceptions about FATE-related issues and how to overcome or improve community-specific AI challenges. \subsection{Explanation Style} It is widely acknowledged that algorithms are meant to offer personalised content and services that are relevant. Explanations are then provided to convince the affected people about the recommendation process. In the same spirit, the explanation should be personalised to serve the respective needs of the affected individuals or communities. The style of explanation varies across online social networks (Figure~\ref{fig:explanation-types}). While the explanations associated with ads from Facebook and Twitter offer similar explanation styles, Instagram offers a lengthy and generic explanation. For instance, one of the participants (\#P3) commented that the explanation tends to contain \textit{too much information, it could have been simplified[sic].} Focusing on contextualised and value-driven explanations will be useful in facilitating wider awareness creation and engagement with AI technologies. Moreover, explainable AI should factor in the local context and take into account the various social strata the AI deployment is reaching. As noted earlier, if most users rely on local language for online engagements, then good explanations should incorporate contextualised needs (demographics) that will promote awareness and enable users better understand the technology they interact with. Regarding the self-reported \textit{digital skill}, participants with 'excellent' digital skills show no significant changes in their assessment across the evaluation metrics. From the other extreme, participants with 'satisfactory' digital skills tend to incline towards a strong agreement with the statements (see Figures~\ref{fig:knowledge-relevancy-conviction-satisfaction-trust} and ~\ref{fig:robustness-data-share-transparency-privacy}). \subsection{Improving Awareness and AI Engagement} Because most of the discourse on ethical AI and FATE-related issues are being shaped by the more economically advanced countries (MEDC) \cite{jobin2019global,sambasivan2021re}, this kind of monolithic approach could ignore local knowledge, cultural pluralism and global fairness \cite{jobin2019global}. Ensuring accessible and inclusive AI technology will require (1) sound and inclusive policies from governments to foster useful AI development and (2) technology companies to implement AI systems that will operate within the remit of regulation, sociodemographics and other contextual knowledge. This will require inputs from various stakeholders, which is in line with the need of involving public actors to shape the technologies that affect them \cite{deeks2019judicial,hsu2022empowering}. Adhering to social values is a core requirement for AI practitioners to ensure algorithmic fairness for public good \cite{selbst2019fairness}. Through cooperative, inclusive, and community-led design of AI applications, algorithmic disparities could be addressed effectively. \subsubsection{Community Involvement} Using biased and discriminatory training data to develop AI systems would reproduce or amplify disparities \cite{compass2016,dodge2019explaining}. There are regulations, legislation and policies at various levels geared towards fostering useful and responsible AI development. A case in point include the UNESCO's recommendation on the Ethics of AI\footnote{\url{https://bit.ly/3XJoj7o}}, World Economic Forum (WEF) and Global Future Council on Human Rights\footnote{\url{https://bit.ly/3gQEwHx}}, which have been developed to address rising concerns over human rights resulting from the use of AI systems. One of the most effective approaches is to involve the community, and the AI developers to incorporate community-specific FATE needs. Communities can be empowered to shape the development of accessible and transparent AI systems \cite{sassaman2020creating}. Relevant stakeholders within the community will ensure better policing of AI's operations, and dictate norms, values and other ethical requirements to be reflected in AI and its operation. Through positive action, equal representation can be improved \cite{bynum2021disaggregated,thomas2021algorithmic}. In line with the theme of positive action and data leverage, the public or community can dictate or help integrate local context and norms in the development of AI systems. This is crucial since ethical AI deals with incorporating moral behaviour to avoid encoding bias in AI's decisions. At this critical juncture, it is essential to explore ways by which community voice and power can inform how AI systems that affect them should be developed. Accordingly, the following community-led initiative was proposed as a way of engaging the public to help improve responsible AI and mitigate FATE-related concerns: \begin{itemize} \item[-] \textit{document of concerns:} is a publicly available document to share concerns or unethical issues \item[-] \textit{document of values:} is a publicly available document to share norms and values that will inform and shape FATE in AI. \end{itemize} Based on the alignment or discrepancies between the perceived AI's operations and community values, the public or community can demand change through various means. Within the more economically developed countries, for instance, wider awareness about the value placed on data often results in data strikes or limited engagement with online platforms resulting in disruption of access to relevant online services \cite{vincent2021data}. This sort of online activism is due to wider awareness about how such platforms value public data for their success \cite{jackson2020hashtagactivism}. Although unequal access to data leverage is putting a certain section of society at a disadvantaged point \cite{abebe2020roles}, empowering the community to exercise data leverage will be useful. The public can exert a certain degree of influence via data leverage to demand better service \cite{arrieta2018should}. The data can be leveraged to neutralise societal power imbalances \cite{eubanks2018automating,gebru2019oxford,kulynych2020pots,abebe2020roles,vincent2021data}. \section{Conclusion} \label{sec:conclusion} As AI systems continue to be deployed across various domains \cite{makingprofiling,carton2016identifying,grgic2019human,sturm2016interpretable,Rago:2020}, algorithmic decisions carry both economic and personal implications for the affected individuals or communities. Failure to incorporate sociodemographic factors and neglecting viewpoints from the affected communities will result in promoting what is being set to be avoided -- bias and unfair algorithmic decisions. Noting that one of the tenets of explainable AI is that models should be able to explain how a decision is reached, this study presented a useful approach to examine FATE in AI issues with emphasis on areas not traditionally served by AI systems. A central motivation for this was the need to offer complementary/different perspectives from the West-centric viewpoints on AI. Among the findings from the study include: explanations about decisions reached by the AI systems tend to be vague and less informative. Creating awareness and understanding of the best way to communicate with specific communities will improve algorithmic accessibility and inclusivity. This will help in empowering the affected community or individual to effectively probe and police the growing application of AI-powered systems. Among the contributions from the study include ways of incorporating insights from under-served communities and to open doors for further exploration of FATE-related issues. Future work will involve engagement with stakeholders across various disciplines involving rights activists, data economists, technologies/developers, researchers and policymakers to improve diversity and equity in AI utilisation. \section*{Further Information} \label{sec:further-information} Figure~\ref{fig:explanation-types} shows some explanation types from three online social networks. \begin{figure*}[!tbh] \includegraphics[scale=0.56]{figures/explanations-from-social-networks.png} \caption{Explanation types from (A) Twitter (B) Facebook and (C) Instagram social networks. These examples are used to describe the ads and corresponding explanations.} \label{fig:explanation-types} \end{figure*} \begin{table}[!tbh!] \centering \caption{Mann-Whitney-U Test to compare samples based on the participants' self-reported digital skills.} \label{tab:mann-whitney-test-dskill} \renewcommand{\arraystretch}{1.2} \resizebox{0.85\textwidth}{!}{% \begin{tabular}{lllllllllll} \toprule & \textbf{Pair} && \textbf{Measure} && \textbf{Statistic} && $\mathbf{p-value}$ && \textbf{Remark} & \\ \midrule & good/excellent && need for transparency && 269.5 && \textbf{0.001} && Some difference &\\ & good/excellent && need for alternate explanation && 291 && \textbf{0.003} && Some difference &\\ & good/excellent && satisfaction about the recommendation && 458.5 && 0.603 && No difference &\\ \bottomrule \end{tabular} } \end{table} \begin{table}[!tbh!] \centering \caption{Mann-Whitney-U Test to compare samples based on the participants' educational qualifications} \label{tab:mann-whitney-test-edu} \renewcommand{\arraystretch}{1.2} \resizebox{0.85\textwidth}{!}{% \begin{tabular}{lllllllllll} \toprule & \textbf{Pair} && \textbf{Variable} && \textbf{Statistic} && $\mathbf{p-value}$ && \textbf{Remark} & \\ \midrule & MSc/BSc && satisfaction about the recommendation && 130 && \textbf{0.052} && Some difference &\\ & MSc/Higher Inst. && satisfaction about the recommendation && 0 && \textbf{0.013} && Some difference &\\ & BSc/Higher Inst. && satisfaction about the recommendation && 31.5 && 0.089 && Some difference &\\ & BSc/Sec. Edu. && satisfaction about the recommendation && 281 && 0.910 && Some difference &\\ & Higher Inst./Sec. Edu. && satisfaction about the recommendation && 30 && \textit{0.069} && Some difference &\\ & MSc/BSc && need for transparency && 196.5 && 0.657 && Some difference &\\ & MSc/Higher Inst. && need for transparency && 4.5 && 0.088 && Some difference &\\ & MSc/Sec. Edu. && need for transparency && 46.5 && 0.597 && Some difference &\\ & BSc/Higher Inst. && need for transparency && 36 && 0.121 && Some difference &\\ & BSc/Sec. Edu. && need for transparency && 285 && 0.961 && Some difference &\\ & Higher Inst./Sec. Edu. && need for transparency && 28.5 && 0.110 && Some difference &\\ & MSc/BSc && need for alternate explanation && 252 && 0.420 && Some difference &\\ & MSc/Higher Inst. && need for alternate explanation && 4.5 && 0.086 && Some difference &\\ & MSc/Sec. Edu. && need for alternate explanation && 49.5 && 0.760 && Some difference &\\ & BSc/Higher Inst. && need for alternate explanation && 24 && \textbf{0.048} && Some difference &\\ & BSc/Sec. Edu. && need for alternate explanation && 225 && 0.230 && Some difference &\\ & Higher Inst./Sec. Edu. && need for alternate explanation && 28.5 && 0.110 && Some difference &\\ \bottomrule \end{tabular} } \end{table} \begin{table}[!tbh!] \centering \caption{Mann-Whitney test to compare samples based on the recommendation source and corresponding explanations} \label{tab:mann-whitney-test-osn} \renewcommand{\arraystretch}{1.2} \resizebox{0.85\textwidth}{!}{% \begin{tabular}{lllllllllll} \toprule & \textbf{Pair} && \textbf{Measure} && \textbf{Statistic} && $\mathbf{p-value}$ && \textbf{Remark} & \\ \midrule & Facebook/Twitter && satisfaction about the recommendation && 313 && 0.609 && -- &\\ & Facebook/Instagram && satisfaction about the recommendation && 269.5 && 0.706 && -- &\\ & Twitter/Instagram && satisfaction about the recommendation && 335.5 && 0.312 && -- &\\ & Facebook/Twitter && need for transparency && 319 && 0.503 && -- &\\ & Facebook/Instagram && need for transparency && 272 && 0.727 && -- &\\ & Twitter/Instagram && need for transparency && 239 && 0.284 && -- &\\ & Facebook/Twitter && need for alternate explanation && 278.5 && 0.847 && -- &\\ & Facebook/Instagram && need for alternate explanation && 267 && 0.658 && -- &\\ & Twitter/Instagram && need for alternate explanation && 273.5 && 0.762 && -- &\\ & Facebook/Twitter && recommendation relevance && 288 && 1.000 && -- &\\ & Facebook/Instagram && recommendation relevance && 176 && \textbf{0.017} && some difference &\\ & Twitter/Instagram && recommendation relevance && 194 && \textbf{0.045} && some difference &\\ \bottomrule \end{tabular} } \end{table} \bibliographystyle{elsarticle-num-names}
\section{Introduction} Various theoretical and experimental researches have been performed in order to assess train/track induced loads on the substructure. Mohammed Touati and al. \cite{Key1} determined the loads induced by a non-linear 3D multi-body modelled train on the track with taking into account wheel/rail contact properties and track irregularities. Yang Xinwen and al. \cite{Key2} concluded, through a vehicle-track-subgrade coupling dynamic theory and finite element method, about the train/track induced loads on each layer of the substructure. As an experimental study, Al Shaer and al. \cite{Key3} presented the dynamic behavior of a portion of ballasted railway track subjected to cyclic loads in substitution of a moving wheelset. In conclusion, the dynamics behavior of the substructure is widely studied in the literature (\cite{Key4}, \cite{Key5}, \cite{Key6}, \cite{Key7}, \cite{Key8}) based on the train/track coupling model.\\ Actually, even if modelling a wheel load as a rectangular pulse is a common assumption, real measurements don't show the same shape. In fact, ONCF (Moroccan railway network manager) has many tools that record wheel pulse like GOTCHA. This system shows that the shape of the load has never been rectangular, but it's more likely compared to a sinusoidal pulse. Then, this paper deals with evaluating train/track induced loads on the substructure by proposing a new approach when it comes to modelling the shape of the wheel impact. Indeed, it's common to consider a moving load as a rectangular impulse applied on the nodes of a mesh structure in each period of time depending on signal sampling. This paper shows that assuming the wheel load as a sinusoidal pulse may reduce the impact of the period of time of its application and, consequently, minimize the loads induced on the substructure oversized by the common assumption. In that matter, a finite element model of the track will be presented and the numerical results will be compared. \section{Track elementary section modeling} \subsection{Determination of mass, stiffness et dumping matrices} Let’s assume a portion of ballasted track composed of two elements of rail considered as a continuous Euler-Bernoulli beam, fixed to two sleepers by a couples of springs/dampers representing the railpads. The ballast is modelled as a couples of springs/dampers under each sleeper (Figure 1). \begin{figure} \begin{center} \includegraphics[width=6.8cm,height=6.cm]{fig1.jpg} \end{center} \caption{Elementary track modelling} \end{figure} The displacement vector is written as: \[ U=\left[u_{1}, \theta_{1}, u_{2}, \theta_{2}, u_{3}, \theta_{3}, u_{T 1}, u_{T 2}\right] \] The effective mass and the stiffness matrices of an element of rail \cite{Key9}, are given by: \[M_{r}=\left(\rho_{r} A_{r} L / 420\right)\left[\begin{array}{cccccc} 156 & 22 L & 54 & -13 L & 0 & 0 \\ 22 L & 4 L^{2} & 13 L & -3 L^{2} & 0 & 0 \\ 54 & 13 L & 312 & 0 & 54 & -13 L \\ -13 L & -3 L^{2} & 0 & 8 L^{2} & 13 L & -3 L^{2} \\ 0 & 0 & 54 & 13 L & 156 & -22 L \\ 0 & 0 & -13 L & -3 L^{2} & -22 L & 4 L^{2} \end{array}\right] \] \[K_{r}=\left(E_{r} I_{r} / L^{3}\right)\left[\begin{array}{cccccc} 12 & 6 L & -12 & 6 L & 0 & 0 \\ 6 L & 4 L^{2} & -6 L & 2 L^{2} & 0 & 0 \\ -12 & -6 L & 24 & 0 & -12 & 6 L \\ 6 L & 2 L^{2} & 0 & 8 L^{2} & -6 L & 2 L^{2} \\ 0 & 0 & -12 & -6 L & 12 & -6 L \\ 0 & 0 & 6 L & 2 L^{2} & -6 L & 4 L^{2} \end{array}\right]\] where $\rho_{r}$ is the density of the rail, $A_{r}$ is the surface of the rail section, $E_{r}$ is Young modulus, and $I_{r}$ is the rail moment of inertia. The dumping matrix of the rail is obtained as a linear combination of mass and stiffness matrices by assuming that the displacements $u_{1}$ and $u_{3}$ are completely dumped by the effect of railpads. \\ Therefore, the dumping matrix is written as: $$ C_{r}^{*}=a_{0} \cdot M_{r}^{*}+a_{1} \cdot K_{r}^{*} $$ where, \[ M_{r}^{*}=\left(\rho_{r} A_{r} L / 420\right)\left[\begin{array}{cccc} 4 L^{2} & 13 L & -3 L^{2} & 0 \\ 13 L & 312 & 0 & -13 L \\ -3 L^{2} & 0 & 8 L^{2} & -3 L^{2} \\ 0 & 13 L & -3 L^{2} & 4 L^{2} \end{array}\right] \] \[K_{r}^{*}=\left(E_{r} I_{r} / L^{3}\right)\left[\begin{array}{cccc}4 L^{2} & -6 L & 2 L^{2} & 0 \\ -6 L & 24 & 0 & 6 L \\ 2 L^{2} & 0 & 8 L^{2} & 2 L^{2} \\ 0 & 6 L & 2 L^{2} & 4 L^{2}\end{array}\right]\] $a_0$ and $a_{1}$ are concluded from the equation: $$\left[\begin{array}{l}a_{0} \\ a_{1}\end{array}\right]=\left(2 \omega_{1} \omega_{2} /\left(\omega_{2}^{2}-\omega_{1}^{2}\right)\right)\left[\begin{array}{cc}\omega_{2} & -\omega_{1} \\ -1 / \omega_{2} & 1 / \omega_{1}\end{array}\right]\left[\begin{array}{l}\zeta_{1} \\ \zeta_{2}\end{array}\right]$$ where $\omega_{i}{ }^{2}$, $(i=1,2)$ are the eigenvalues associated to the vibration of the rail described by the matrices $M_{r}{ }^{*}$ and $K_{r}{ }^{*},$ and $\zeta_{i}$, $(i=1,2)$ are the dumping ratios according to the first and second modes. In one hand, the equation of motion of the rail is written as: \begin{equation} M_{r} \ddot{U}^{*}+C_{r} \dot{U}^{*}+K_{r} U^{*}=F \end{equation} where $C_{r}$ is the transformation of the matrix $C_{r}^{*}$ in the base $U^{*}$, and $U^{*}$ is defined by: $$ U^{*}=\left[u_{1}, \theta_{1}, u_{2}, \theta_{2}, u_{3}, \theta_{3}\right] $$ $F$ is given by: $$ F=\left[\begin{array}{c} -k_{s}\left(u_{1}-u_{T 1}\right)-c_{s}\left(\dot{u}_{1}-\dot{u}_{T 1}\right) \\ 0 \\ 0 \\ 0 \\ -k_{s}\left(u_{3}-u_{T 3}\right)-c_{s}\left(\dot{u}_{3}-\dot{u}_{T 3}\right) \\ 0 \end{array}\right] $$ In the other hand, the equations of motion of the sleepers are written as: \begin{equation} \left\{\begin{array}{c} m_{T} \ddot{u}_{T 1}=k_{s}\left(u_{1}-u_{T 1}\right)+c_{s}\left(\dot{u}_{1}-\dot{u}_{T 1}\right)-k_{b} u_{T 1}-c_{b} \dot{u}_{T 1} \\ m_{T} \ddot{u}_{T 2}=k_{s}\left(u_{3}-u_{T 2}\right)+c_{s}\left(\dot{u}_{3}-\dot{u}_{T 2}\right)-k_{b} u_{T 2}-c_{b} \dot{u}_{T 2} \end{array}\right. \end{equation} From (1) and (2), we may conclude about the equation of motion of the track elementary section as it's modelled. It's written as: $$ M \ddot{U}+C \dot{U}+K U=0 $$ where $M$, $C$ and $K$ are the mass, dumping, and the stiffness of the track elementary section respectively. \subsection{Numerical application} Let's assume a track elementary section characterized by the data given in table 1 (we can refer to (\cite{Key10}, \cite{Key11}, \cite{Key12}). \begin{table} \begin{center} \begin{tabular}{|p{1.0in}|p{2.4in}|p{1.in}|} \hline Symbol & Quantity & Value \\ \hline $\rho$${}_{r}$ & Rail density (kg/m${}^{3}$) & 7850 \\ \hline \textit{A${}_{r}$} & Rail section surface (cm²) & 76.70 \\ \hline \textit{E${}_{r}$} & Young modulus of the rail (GPa) & 210 \\ \hline \textit{I${}_{r}$} & Rail moment of inertia (cm${}^{4}$) & 3038.6 \\ \hline \textit{m${}_{T}$} & Sleeper mass (kg) & 90.84 \\ \hline k${}_{s}$\textit{} & Railpad stiffness (MN/m) & 90 \\ \hline $c{}_{s}$ & Railpad damping (kN.s/m) & 30 \\ \hline \textit{k${}_{b}$} & Ballast stiffness (MN/m) & 25.5 \\ \hline \textit{c${}_{b}$} & Ballast damping (kN.s/m) & 40 \\ \hline $\zeta$\textit{} & Rail dumping ratio & 5\% \\ \hline \end{tabular} \caption{Track properties} \end{center} \end{table} The figure 2 illustrates the evolution of natural frequencies according to vibration modes. It shows that: \begin{itemize} \item The frequencies of the $1^{st}$ and $2^{nd}$ modes correspond to a movement in phase between rail and sleepers. It's equal to 81.62 Hz; \item The frequency of the $3^{rd}$ mode corresponds to a movement in opposition of phase between rail and sleepers. It's equal to 381.1 Hz. \end{itemize} \begin{figure} \begin{center} \includegraphics[scale=0.85]{fig2.jpg} \end{center} \caption{Natural frequencies of an elementary track section} \end{figure} \section{Track response to a rectangular and a sinusoidal pulses} \subsection{Description of the studied track} Let's assume a section of track composed of $N$ track elementary sections subjected to an external load $F$ as it's shown in figure 3. \begin{figure} \begin{center} \includegraphics[scale=0.75]{fig3.jpg} \end{center} \caption{ Track section modelling } \end{figure} The number of degrees of freedom is given by: $$N_{dof}=8N-3(N-1)$$ The displacement vector is written as: \[U=\left[\begin{array}{c} {\vdots } \\ {u_{j,k} } \\ {\vdots } \end{array}\right]\] where, \[\left\{\begin{array}{llll} u_{j,k} =u_{j,k}^{*} & where\quad k\in \left[1,8\right] & if & j=1 \\ u_{j,k} =u_{j,k}^{*} & where\quad k\in \left[3,4,5,6,8\right] & if & j\ne 1 \end{array}\right. \] and, \[U_{j}^{*} =\left[u_{j,1} ,\theta _{j,1} ,u_{j,2} ,\theta _{j,2} ,u_{j,3} ,\theta _{j,3} ,u_{j,T1} ,u_{j,T2} \right]\] $j$ refers to the element's number. The mass, stiffness and dumping matrices in the base $U$ are obtained by assembling those of a track elementary section determined earlier. The vector of loads is defined by: \[F=\left[\begin{array}{c} {\vdots } \\ {f_{j} } \\ {\vdots } \end{array}\right]\] where, \[\left\{\begin{array}{l} N \text { is even } \left\{\begin{array}{l} N=2 \left\{ \begin{array}{ll} f_{j}=P & \text { if } \quad j=5 \\ f_{j}=0 & \text { else } \end{array}\right. \\\\ N \neq 2\left\{ \begin{array}{ll} f_{j}=P & \text { if } \quad j=(5 N / 2)+1 \\ f_{j}=0 & \text { else } \end{array}\right. \\ \end{array}\right. \\\\ N \text { is uneven }\left\{\begin{array}{ll} f_{j}=P & \text { if } j=(5(N+1) / 2)-1 \\ f_{j}=0 & \text { else } \end{array}\right. \end{array}\right.\] $P$ is a rectangular or a sinusoidal load given as: \begin{itemize} \item Sinusoidal pulse: \[\left\{\begin{array}{ll} P=P_{0} \sin \omega t & if \quad t\le t_{d} \\ P=0 & else \end{array}\right. \] \item Rectangular pulse: \[\left\{\begin{array}{ll} P=P_{0} & if\quad t\le t_{d} \\ P=0 & else \end{array}\right. \] \end{itemize} Its shape is shown in the figure 4. \begin{figure} \begin{center} \includegraphics[scale=0.5]{fig4.jpg} \\ \end{center} \caption{ Sinusoidal and rectangular pulses over a period of $t_d$ } \end{figure} \subsection{ Description of the methods of resolution} The dynamic behavior of the section of track may be analyzed by modal superposition if the dumping matrix verifies orthogonality properties. That method is used in particular for an undumped system. In that case, the equation of motion is reduced to: \[M\ddot{U}+KU=F.\] Let's assume that ${\omega_{i}^{2}}$ are the eigenvalues associated to the track vibration. We note $\mathrm{\{}$$\mathrm{\phi}$${}_{i}$$\mathrm{\}}$ the normalized eigenvectors related to ${\omega_{i}^{2}}$. Therefore, the equation of motion is written as: \begin{equation} \ddot{Z}+diag(\omega _{i}^{2} )Z=\phi ^{T} F \end{equation} where diag(${\omega_{i}^{2}}$) is a diagonal matrix of the eigenvalues and: \[U=\Phi .Z\] The system of equations (3) is uncoupled where each equation is written as: \[\ddot{z}_{i} +\omega _{i}^{2} z_{i} =\Phi _{j,i} P(t)\] The resolution of that equation is given by DUHAMEL integral: \[z_{i} (t)=(1/\omega _{i} )\int _{0}^{t}\Phi _{j,i} P(\tau )\sin \omega _{i} (t-\tau )d\tau \] Therefore, the solution for a sinusoidal pulse load is given as: \[z_{i}(t)=\left\{\begin{array}{lll} (\Phi_{j,i} P_{0} /\omega _{i}^{2} ).(1/(1-\beta ^{2} ))(\sin \omega t-\beta \sin \omega_{i} t) & if & t\le t_{d} \\ (\dot{z}_{i} (t_{d} )/\omega _{i} )\sin \omega _{i} (t-t_{d} )+z_{i} (t_{d} )\cos \omega _{i} (t-t_{d} ) & if & t\ge t_{d} \end{array}\right. \] where, \[\beta =\omega /\omega _{i} \] and the solution for a rectangular pulse load is given as: \[z_{i} (t)=\left\{\begin{array}{lll} (\Phi _{j,i} P_{0} /\omega _{i}^{2} )(1-\cos \omega _{i} t) & if\ & t\le t_{d} \\ (\Phi _{j,i} P_{0} /\omega _{i}^{2} )(\cos \omega _{i} (t-t_{d} )-\cos \omega _{i} t & if & t\ge t_{d} \end{array}\right. \] The figure 5 shows the response $z(t)$ to a sinusoidal and a rectangular pulse. It's obvious that in the forced phase, the maximum rectangular response is higher than the maximum sinusoidal response. \begin{figure} \begin{center} \includegraphics[width=7.2cm,height=6.cm]{fig5.jpg} \end{center} \caption{$z(t)$ response to a rectangular and sinusoidal pulse $t_{d}/T = 0.75$} \end{figure} In general, the dumping matrix doesn't verify the orthogonality characteristics. Therefore, the modal superposition method is substituted by the following method. The equation of motion can be written as: \begin{equation} \ddot{Z}+\phi ^{T} C\phi .\dot{Z}+diag(\omega_{i}^{2} ).Z=\phi ^{T} F \end{equation} where diag($\omega$${}_{i}$${}^{2}$) and $\mathrm{\phi}$ are defined earlier. Knowing that: \begin{equation} \dot{Z}-\dot{Z}=0 \end{equation} (4) and (5) could be written as: \begin{equation} \dot{Y}=D.Y+F^{*} \end{equation} where, \[Y=\left[\begin{array}{c} {Z} \\ {\dot{Z}} \end{array}\right],\quad D=A^{-1} B{\kern 1pt} ,\quad F^{*} =A^{-1} \left[\begin{array}{c} {\phi ^{T} F} \\ {0} \end{array}\right]\] and, \[A=\left[\begin{array}{cc} {\phi ^{T} C\phi } & {I} \\ {I} & {0} \end{array}\right],\quad B=\left[\begin{array}{cc} {diag(\omega _{i}^{2} )} & {0} \\ {0} & {-I} \end{array}\right]\] Let's assume that $\mathrm{\{}$$\lambda$${}_{i}$$\mathrm{\}}$ are the eigenvalues associated to the matrix $D$. We note $\mathrm{\{}$$\psi$${}_{i}$$\mathrm{\}}$ the normalized eigenvectors related to $\mathrm{\{}$$\omega$${}_{i}$${}^{2}$$\mathrm{\}}$. We define $X(t)$ as: \[Z=\psi .X\] The equation (6) is written as: \begin{equation} \dot{X}=diag(\lambda_{i} ).X+\psi ^{-1} F^{*} \end{equation} The system of equations (7) is uncoupled where each equation is written as: \begin{equation} \dot{x}_{i} (t)=a_{i} .x_{i} (t)+b_{i} .P \end{equation} where, \[a_{i} =\lambda _{i} \quad and\quad b_{i} =\chi _{i} \] and, \[\chi =\psi ^{-1} \left[\begin{array}{cc} {\phi ^{T} } & {0} \\ {0} & {0} \end{array}\right]\] The resolution of the equation (8) gives: \begin{itemize} \item Sinusoidal pulse: \[x_{i} (t)=\left\{\begin{array}{lll} \frac{b_{i} P\omega }{a_{i}^{2} +\omega ^{2} } e^{a_{i} t} -\frac{a_{i} b_{i} P}{a_{i}^{2} +\omega ^{2} } \sin \omega t-\frac{b_{i} P\omega }{a_{i}^{2} +\omega ^{2} } \cos \omega t & if & t\le t_{d} \\ x_{i} (t_{d} )e^{a_{i} (t-t_{d} )} & if & t\ge t_{d} \end{array}\right. \] \item Rectangular pulse: \[x_{i} (t)=\left\{\begin{array}{lll} (bP/a)(e^{a_{i} t} -1) & if & t\le t_{d} \\ x_{i} (t_{d} )e^{a_{i} (t-t_{d} )} & if & t\ge t_{d} \end{array}\right. \] \end{itemize} \subsection{ Results and discussion} The figures presented in this section show the numerical resolution of the system of equations of a dumped track section subjected to a rectangular and sinusoidal loads. The properties of the track are defined in table 1. In figure 6 and figure 7, the sinusoidal pulse is presented in red; however, the rectangular pulse is presented in black. \begin{enumerate} \item Displacements and rotations of the rail \begin{figure} \begin{center} \includegraphics[width=6.3in]{fig6.jpg} \end{center} \caption{Rail response under sinusoidal, rectangular pulses ($N = 4$, $t_{d} = 0.01$s, $P = 10$T)} \end{figure} \item Displacements of the sleepers \begin{figure} \begin{center} \includegraphics[width=3.8in]{fig7.jpg} \end{center} \caption{Sleeper response under sinusoidal and rectangular pulses ($N = 4$, $t_{d} = 0.01$s, $P = 10$T)} \end{figure} \end{enumerate} \begin{figure} \begin{center} \includegraphics[scale=0.5]{fig8.jpg} \end{center} \caption{Loads induced in the substructure ($N = 30$, $t_d = 0.01$s, $P = 10$T)} \end{figure} \begin{table} \begin{center} \begin{tabular}{|p{0.9in}|p{1.1in}|p{1.1in}|p{1.1in}|p{1.1in}|} \hline Sleeper number & \% of load (undumped - sinusoidal load) & \% of load (dumped - sinusoidal load) & \% of load (undumped - rectangular load) & \% of load (dumped - rectangular load) \\ \hline 13 & 4.49\% & 1.73\% & 5.50\% & - \\ \hline \textit{14} & 11.52\% & 6.12\% & 13.66\% & 6.63\% \\ \hline \textit{15} & 23.24\% & 15.29\% & 26.00\% & 16.41\% \\ \hline \textit{16} & 30.78\% & 22.43\% & 34.35\% & 23.55\% \\ \hline \textit{17} & 23.24\% & 15.29\% & 26.00\% & 16.41\% \\ \hline \textit{18} & 11.52\% & 6.12\% & 13.66\% & 6.63\% \\ \hline \textit{19} & 4.49\% & 1.73\% & 5.50\% & - \\ \hline \end{tabular} \caption{Repartition of the loads under the sleepers ($N = 30$, $t_d = 0.01$s, $P = 10$T)} \end{center} \end{table} It's clear that the maximum values of rail and sleepers movement under rectangular pulse are higher than those reached under a sinusoidal pulse. The figure 8 shows the maximum loads induced in the substructure. The table 2 shows the repartition of the loads under the sleepers. These results have many consequences in the railway field. Actually, we may optimize railway infrastructure components for example (like ballast height). Moreover, the study is made by considering a static load (10 T). This load is mainly amplified by rail/wheel interaction and train speed \cite{Key1}. \section{Conclusion} Based on the results of the model analysis studied in order to determine the loads induced on the substructure, the following conclusions can be drawn: \begin{itemize} \item The common modelling of the load applied on the track due to a moving wheel as a rectangular pulse acting in the time sample of a force signal generates a higher rate of movement in the track and over sizes the loads induced in the substructure than a sinusoidal pulse model; \item Dumping matrix has a major influence on reducing the loads induced in the substructure. Therefore, it’s necessary to preserve the quality of the track components while maintaining it. \end{itemize} As an application, we may evaluate the track behavior according to different characteristics of the track elements that degrade because of maintenance operations. Indeed, the ballast is considered as the most affected element because of operations of damping required for track geometry corrections.
\section{I. Derivation of variational basis state encoder} \subsection{Time-independent equation} We start with the Lagrangian defined in the main text, i.e. Eq.~\ref{eq:static-lag}. Taking the derivative with respect to $C[l]_{mn}$ and setting it to 0 yields \begin{equation} \label{eq:static-lag-derivative} \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} + \sum_{n'} \lambda_{lnn'} C[l]_{mn'} = 0 \ . \end{equation} Multiply with $C[l]_{mn''}$ \begin{equation} \sum_{m}C[l]_{mn''} \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} + \sum_{n'} \lambda_{lnn'} \sum_m C[l]_{mn'}C[l]_{mn''} = 0 \ , \end{equation} and use the $C[l]$ orthonormal condition $\sum_m C[l]_{mn}C[l]_{mn'}=\delta_{nn'}$ to get $\lambda$ \begin{equation} \lambda_{lnn'} = -\sum_m C[l]_{mn'}\braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} \ . \end{equation} Substitute $\lambda$ into Eq.~\ref{eq:static-lag-derivative} yields \begin{equation} \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} - \sum_{n'm} C[l]_{mn'} \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} C[l]_{m'n'} = 0 \ . \end{equation} Using \begin{equation} \hat P = \hat B[l]^\dagger B[l] = \sum_{mm'}\sum_{n} \ket{m}_l C[l]_{mn} C[l]_{m'n} \brasub{m'}{l} \ , \end{equation} to simplify the notation of the second term \begin{equation} \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} - \braket{\phi|n}_l \brasub{m}{l} \hat P \hat{\tilde{H}}'[l] \ket{\phi} = 0 \ . \end{equation} Rearranging and rewriting in matrix form, we get the equation for $C[l]$ \begin{equation} (1 - \hat P[l]) \braket{\phi | \hat{\tilde{H}}'[l] | \phi} = 0 \ . \end{equation} \subsection{Quantum circuit measurement} In this section, we discuss the quantum circuit measurement required to solve $C[l]$ from Eq.~\ref{eq:static-c}. The key quantity to be computed is matrix $G[l]_{mn}$, defined as \begin{equation} G[l]_{mn} = \braket{\phi|n}_l \brasub{m}{l} \hat{\tilde{H}}'[l] \ket{\phi} \ . \end{equation} Express $\hat H$ in sum-of-product form $\hat H = \sum_x^M \prod_k \hat{h}[k]_x$, using notations in the main text, and we get \begin{equation} \begin{aligned} G[l]_{mn} & = \sum_x^M \braket{\phi|n}_l \brasub{m}{l} \prod_{k \neq l} \hat B[k] \prod_k \hat{h}[k]_x \prod_k \hat B[k]^\dagger \ket{\phi} \\ & = \sum_x^M \braket{\phi|n}_l \brasub{m}{l} \hat{h}[l]_x \hat B[l]^\dagger \prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} \ . \end{aligned} \end{equation} Here we assume $\prod_{k \neq l}\hat{\tilde{h}}[k]_x$ can be expressed by a constant amount of Pauli strings. Represent $\hat h[l]_x$ in operator form \begin{equation} \hat h[l]_x = \sum_{mm'} h[l]_{xm'm} \ket{m'}_l \brasub{m}{l} \ . \end{equation} $G[l]_{mn}$ then becomes \begin{equation} G[l]_{mn} = \sum_x^M \sum_{m'n'} h[l]_{xmm'} C[l]_{m'n'} \braket{\phi|n}_l \brasub{n'}{l}\prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} \ . \end{equation} Thus to evaluate $G[l]_{mn}$ it is sufficient to measure $\braket{\phi|n}_l \brasub{n'}{l}\prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi}$. $\ket{n}_l \brasub{n'}{l}$ in general is not Hermitian, and the real and imaginary parts can be measured by \begin{equation} \begin{aligned} \Re{\braket{\phi| n}_l \brasub{n'}{l} \prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} } & = \frac{1}{2}\bra{\phi} (\ket{n}_l \brasub{n'}{l} + \ket{n'}_l \brasub{n}{l}) \prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} \ , \\ \Im{\braket{\phi| n}_l \brasub{n'}{l} \prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} } & = \frac{1}{2}\bra{\phi} i(\ket{n'}_l \brasub{n}{l} - \ket{n}_l \brasub{n'}{l}) \prod_{k \neq l} \hat{\tilde{h}}[k]_x \ket{\phi} \ . \end{aligned} \end{equation} To evaluate all matrix elements in $G[l]$, the total number of measurements required scales as $\order{2^{N_l}M}$. \subsection{Time-dependent equation} In this section, we derive the time-dependent equation for $C[l]$. For time-dependent problems, $C[l]$ in general is complex \begin{equation} C[l] = D[l] - iE[l] \ , \end{equation} where both $D[l]$ and $E[l]$ are real. The minus sign is for convenience expressing $\hat B^\dagger \ket{\phi}$. From the definition we have \begin{equation} \label{eq:de-relation} \pdv{\ket{\psi}}{E[l]_{mn}} = i\pdv{\ket{\psi}}{D[l]_{mn}} \ . \end{equation} The starting point is the Lagrangian Eq.~\ref{eq:dynamic-lag} defined in the main text. Taking the derivative with respect to $\dot \Theta_K$ yields \begin{equation} \begin{aligned} \pdv{\mathcal{L}}{\dot \Theta_K} & = \sum_J \pdv{\bra{\psi}}{\Theta_J}\pdv{\ket{\psi}}{\Theta_K} \dot \Theta_J + \sum_J \pdv{\bra{\psi}}{\Theta_K}\pdv{\ket{\psi}}{\Theta_J} \dot \Theta_J \\ & \quad + i\pdv{\bra{\psi}}{\Theta_K} \hat H \ket{\psi} - i\bra{\psi}\hat H \pdv{\ket{\psi}}{\Theta_K} \\ & \quad + \sum_{lnn'} \lambda_{lnn'} \Re{ \sum_m C[l]^*_{mn} \pdv{\dot C[l]_{mn'}}{\dot \Theta_K} } \\ & \quad + \sum_{lnn'} \gamma_{lnn'} \Im{ \sum_m C[l]^*_{mn} \pdv{\dot C[l]_{mn'}}{\dot \Theta_K} } \ . \end{aligned} \end{equation} We first consider the case of $\Theta_K = \theta_k$, and then \begin{equation} \begin{aligned} \pdv{\mathcal{L}}{\dot \theta_k} & = \sum_J \pdv{\bra{\psi}}{\Theta_J}\pdv{\ket{\psi}}{\theta_k} \dot \Theta_J + \sum_J \pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\Theta_J} \dot \Theta_J \\ & \quad + i\pdv{\bra{\psi}}{\theta_k} \hat H \ket{\psi} - i\bra{\psi}\hat H \pdv{\ket{\psi}}{\theta_k} \\ & = 2 \sum_J \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\Theta_J}} \dot \Theta_J - 2 \Im{\pdv{\bra{\psi}}{\theta_k} \hat H \ket{\psi}} \ , \end{aligned} \end{equation} which means at the $ \pdv{\mathcal{L}}{\dot \theta_k}=0$ minimum, we have \begin{equation} \sum_J \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\Theta_J}} \dot \Theta_J = \Im{\pdv{\bra{\psi}}{\theta_k} \hat H \ket{\psi}} \ . \end{equation} Substitute $\Theta_J$ with $\theta_k$, $D[l]_{mn}$ and $E[l]_{mn}$ \begin{equation} \begin{aligned} \sum_J \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\Theta_J}} \dot \Theta_J & = \sum_j \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\theta_j}} \dot \theta_j \\ & \quad + \sum_{lmn} \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{D[l]_{mn}}} \dot D[l]_{mn} \\ & \quad + \sum_{lmn} \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{E[l]_{mn}}} \dot E[l]_{mn} \ . \end{aligned} \end{equation} Using Eq.~\ref{eq:de-relation} the last two terms become \begin{equation} \sum_{lmn} \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{D[l]_{mn}}} \dot D[l]_{mn} + \sum_{lmn} \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{E[l]_{mn}}} \dot E[l]_{mn} = \sum_{lmn} \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{D[l]_{mn}} \dot C[l]_{mn}^* } \ , \end{equation} which is zero because \begin{equation} \sum_{mn} \pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{D[l]_{mn}} \dot C[l]_{mn}^* = \sum_{mn} \pdv{\bra{\phi}}{\theta_k} \hat B[l] \ket{m}_l \brasub{n}{l} \dot C[l]_{mn}^* \ket{\phi} = 0 \ , \end{equation} where the constraint $\sum_m C[l]_{mn} \dot C[l]_{mn'}^* = 0$ is used. Thus the simplified equation of motion reads \begin{equation} \sum_j \Re{\pdv{\bra{\psi}}{\theta_k}\pdv{\ket{\psi}}{\theta_j}} \dot \theta_j = \Im{\pdv{\bra{\psi}}{\theta_k} \hat H \ket{\psi}} \ , \end{equation} or equivalently \begin{equation} \sum_j \Re{ \pdv{\bra{\phi}}{\theta_k} \pdv{\ket{\phi}}{\theta_j} } \dot \theta_j = \Im{ \pdv{\bra{\phi}}{\theta_k} \hat{\tilde{H}} \ket{\phi} } \ . \end{equation} In short, the equation of motion for $\theta_k$ is the same as vanilla VQD with encoded Hamiltonian $\hat{\tilde{H}}$ . Next we consider the case of $\Theta_K = D[l]$ and $\Theta_K = E[l]$. After some complex algebra, we have \begin{equation} \label{eq:deriv-d} i \sum_{J} \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\Theta_J} \dot \Theta_J + i \frac{1}{2} \sum_{n'} \lambda_{ln'n} C[l]_{mn'}^* - \frac{1}{2} \sum_{n'} \gamma_{ln'n} C[l]_{mn'}^* = \pdv{\bra{\psi}}{D[l]_{mn}} \hat H \ket{\psi} \ . \end{equation} Similar to the case of $\Theta_K = \theta_k$, substitute $\Theta_J$ with $\theta_k$, $D[l]_{mn}$ and $E[l]_{mn}$ \begin{equation} \begin{aligned} \sum_J \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\Theta_J} \dot \Theta_J & = \sum_k \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\theta_k} \dot \theta_k + \sum_{km'n'} \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{D[k]_{m'n'}} \dot C[k]_{m'n'}^* \\ & = \sum_k \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\theta_k} \dot \theta_k + \sum_{n'} \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{D[l]_{mn'}} \dot C[l]_{mn'}^* \ . \end{aligned} \end{equation} Here the orthonormal condition is again used. Substitute the equation back into Eq.~\ref{eq:deriv-d}. \begin{equation} \label{eq:tmp} i\sum_k \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\theta_k} \dot \theta_k + i\sum_{n'} \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{D[l]_{mn'}} \dot C[l]_{mn'}^* + \frac{1}{2}\sum_{n'}(i\lambda_{ln'n} - \gamma_{ln'n})C[l]_{mn'}^* = \pdv{\bra{\psi}}{D[l]_{mn}} \hat H \ket{\psi} \ , \end{equation} Following the same strategy with the derivation of the time-independent equation, multiply Eq.~\ref{eq:tmp} with $C[l]_{mn}$ \begin{equation} i\sum_k \braket{\phi | n}_l \brasub{n'}{l} \pdv{\ket{\phi}}{\theta_k} \dot \theta_k + \frac{1}{2}(i\lambda_{ln'n} - \gamma_{ln'n})= \sum_m C[l]_{mn'} \pdv{\bra{\psi}}{D[l]_{mn}} \hat H \ket{\psi} \ , \end{equation} where $\sum_{m} C[l]^*_{mn'} C[l]_{mn} = \delta_{n'n}$ and $\sum_{m} \dot C[l]^*_{mn'} C[l]_{mn} = 0$ are used. Then, multiply again with $C[l]_{mn}^*$ \begin{equation} i\sum_k \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{\theta_k} \dot \theta_k + \frac{1}{2}\sum_{n'}(i\lambda_{ln'n} - \gamma_{ln'n})C[l]_{mn'}^* = \hat P[l] \pdv{\bra{\psi}}{D[l]_{mn}} \hat H \ket{\psi} \ . \end{equation} Use this equation to eliminate $\lambda$ and $\gamma$ in Eq.~\ref{eq:tmp}, we get the equation of motion for $C[l]$ \begin{equation} i\sum_{n'} \pdv{\bra{\psi}}{D[l]_{mn}}\pdv{\ket{\psi}}{D[l]_{mn'}} \dot C[l]_{mn'}^* = (1 - \hat P[l])\pdv{\bra{\psi}}{D[l]_{mn}} \hat H \ket{\psi} \ , \end{equation} which can be simplified to Eq.~\ref{eq:eom-c}. The measurement required for time evolution is in the same order as the static VQE algorithm. In the end, we note that imaginary time evolution might be another approach to finding the ground state, in addition to the iterative method described in the main text. Imaginary time evolution might also be a feasible approach to determine $C[l]$ as an alternative to solving Eq.~\ref{eq:static-c}. \section{II. Numerical noiseless simulations} All numerical quantum circuit simulation is performed using the \textsc{TensorCircuit}~\cite{zhang2022tensorcircuit} package without considering noise. Classical DMRG simulation is performed using the \textsc{Renormalizer} package~\cite{renormalizer}. We use harmonic oscillator eigenstates for phonon basis states. Using positional states might affect the performance of traditional encodings because of the truncation, however, we expect variational encoding to be insensitive to the choice of phonon basis states at the $N\rightarrow \infty$ limit. We use Gray code for binary encoding as an improvement to the standard approach~\cite{sawaya2020resource}. For both ground state simulation and dynamics simulation, $C[l]$ is initialized as $C[l]_{mn} = \delta_{mn}$. For the VQE simulation of the Holstein model, the following ansatz is used \begin{equation} \label{eq:ansatz} \ket{\phi} = \prod_l^L \left \{ \prod_{\langle j, k\rangle} e^{\theta_{ljk} (\hat a^\dagger_j \hat a_k - \hat a^\dagger_k \hat a_j)} \prod_j e^{\theta_{lj}\hat a^\dagger_j \hat a_j (\hat b^\dagger_j - \hat b_j)} \right \}\ket{\phi_0} \ . \end{equation} where $L$ is the number of layers and $L=3$ is adopted. The advantage of Eq.~\ref{eq:ansatz} is enforcing real-valued wavefunction. The circuit parameters $\vec \theta$ are optimized by the L-BFGS-G method implemented in \textsc{SciPy} package~\cite{2020SciPy-NMeth}. The parameter gradient is calculated by auto-differentiation. The initial values for the parameters are set to zero at the first round of the macro-iteration. In subsequent macro-iterations, the previously optimized parameters are used as the initial value for faster convergence. Eq.~\ref{eq:static-c} is solved by the DF-SANE method implemented in \textsc{SciPy}~\cite{2020SciPy-NMeth}. Since this is a non-linear equation, we provide 3 initial guesses and adopt the one with the lowest energy. The solved $C[l]$ sometimes does not satisfy the orthonormal condition due to numerical imprecision and the orthonormal condition is enforced by QR decomposition in each macro-iteration. For the VQD simulation of the spin-boson model, the variational Hamiltonian ansatz used is more complex than the VQE simulation. Because $C[l]$ is complex, $\hat B[l] \hat h[l]_x \hat B[l]^\dagger$ spans the whole Hermitian matrix space. Thus for $\hat h[l]_x$ the whole Pauli matrix set $\{X, Y, Z, I\}^{\otimes N_l}$ is added to the ansatz. To obtain the quantities required to calculate $\theta_k$, the Jacobian of the wavefunction $\phi(\vec \theta)$ is firstly calculated by auto-differentiation, and then the r.h.s and l.h.s of Eq.~\ref{eq:eom-theta} is calculated by matrix multiplication. How to measure the quantities in realistic quantum circuits is well described in the literature~\cite{lee2022variational}. To calculate $\dot C[l]$ it is necessary to take the inverse of $\rho[l]$ which is sometimes ill-conditioned. We add $1\times 10^{-5}$ to the diagonal elements of $\rho[l]$ for regularization. The time evolution of $\theta_k$ and $C[l]$ is carried out using the RK45 method implemented in \textsc{SciPy}~\cite{2020SciPy-NMeth}. We observe that the gradient of $\theta_k$ is usually much larger than $C[l]$. Thus it is possible to evolve the two sets of parameters separately, which deserves further investigation. For Trotterized time evolution, $N=16$ and a time step of 0.01 are used. \section{III. Experiments on a superconducting quantum processor} \subsection{Device parameters} The superconducting quantum processor, as shown in Fig.~\ref{fig:hw}(a), is composed of nine computational transmon qubits with each pair of neighboring qubits mediated via a tunable coupler, forming a cross-shaped architecture. Each computational qubit has an independent readout cavity for state measurement and $XY$/$Z$ control lines for state operation. High-fidelity simultaneous single-shot readout for all qubits are achieved with the help of the multistage amplification with the Josephson parametric amplifier (JPA) functioning as the first stage of the amplification. The fundamental device parameters including qubit parameters and gate parameters are outlined in Table.~\ref{tab:SQqubitparameter} and Table.~\ref{tab:TQqubitparameter}, where the parasitic $ZZ$ interaction between qubits is suppressed by the coupler. \begin{table*}[ht] \caption{Single qubit gate parameters. $\omega_r$ is the resonant frequency of the readout cavity for each qubit. $\omega_{j,max}\, (j=1 \sim 9)$ are the maximum resonant frequencies when qubits are biased at the sweet spot. $\omega_{j,idle}\, (j=1 \sim 9)$ are the idle frequencies for implementing the single-qubit operations. $\alpha_j \, (j=1 \sim 9)$ are the qubits' anharmonicities. $T_1$, $T_{2,idle}$ and $T_{2E,idle}$ are the corresponding energy relaxation time, Ramsey dephasing time and echoed dephasing time for the qubits measured at the idle frequency. The readout fidelities are typically characterized by detecting each qubit in $\ket{g}$ ($\ket{e}$) when it is prepared in $\ket{g}$ ($\ket{e}$), labeled by $F_{0,j}$ and $F_{1,j}$. To mitigate the error coming from the readout infidelity, the outcomes are reconstructed with the calibration matrix through the Bayes' rule. Single-qubit errors $e_{sq}$ are measured with randomized benchmarking (RB).} \begin{threeparttable} \begin{tabular}{cp{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}p{1.6cm}<{\centering}} \hline \hline &{$Q_0$} &{$Q_1$} &{$Q_2$} &{$Q_3$} &{$Q_4$} &{$Q_5$} &{$Q_6$} &{$Q_7$} &{$Q_8$} \tabularnewline \hline $\omega_r$ (GHz) &{$6.874$} &{$6.825$} &{$6.931$} &{$6.901$} &{$6.845$} &{$6.786$} &{$6.991$} &{$6.961$} &{$6.806$} \tabularnewline $\omega_{j,max}$ (GHz) &{$4.003$} &{$4.215$} &{$4.479$} &{$4.689$} &{$4.470$} &{$4.479$} &{$4.657$} &{$4.512$} &{$4.362$} \tabularnewline $\omega_{j,idle}$ (GHz) &{$3.988$} &{$4.187$} &{$4.464$} &{$4.668$} &{$4.404$} &{$4.359$} &{$4.641$} &{$4.498$} &{$4.223$} \tabularnewline $\alpha_j/2\pi$ (MHz) &{$-260$} &{$-258$} &{$-255$} &{$-250$} &{$-254$} &{$-258$} &{$-253$} &{$-257$} &{$-264$} \tabularnewline $T_1$ ($\mu$s) &{$35.3$} &{$31.6$} &{$29.5$} &{$27.7$} &{$33.9$} &{$34.3$} &{$33.3$} &{$22.1$} &{$31.8$} \tabularnewline $T_{2,idle}$ ($\mu$s) &{$11.0$} &{$10.2$} &{$32.6$} &{$38.2$} &{$9.1$} &{$5.6$} &{$43.1$} &{$24.1$} &{$4.3$} \tabularnewline $T_{2E,idle}$ ($\mu$s) &{$48.2$} &{$38.4$} &{$47.8$} &{$44.2$} &{$31.6$} &{$21.8$} &{$56.8$} &{$32.9$} &{$18.6$} \tabularnewline $F_{0,j}$ (\%) &{$96.9$} &{$97.4$} &{$98.6$} &{$98.9$} &{$98.7$} &{$98.4$} &{$96.3$} &{$97.2$} &{$94.1$} \tabularnewline $F_{1,j}$ (\%) &{$93.7$} &{$94.3$} &{$92.5$} &{$94.3$} &{$94.5$} &{$94.6$} &{$92.7$} &{$92.4$} &{$90.9$} \tabularnewline $e_{sq}$ (\%) &{$0.07$} &{$0.32$} &{$0.06$} &{$0.07$} &{$0.08$} &{$0.05$} &{$0.06$} &{$0.15$} &{$0.08$} \tabularnewline \hline \end{tabular} \vspace{0pt} \label{tab:SQqubitparameter} \end{threeparttable} \end{table*} \begin{table*}[ht] \caption{Two qubits gate parameters. $\omega_{c,idle}$ are the idle frequencies for each coupler where the $ZZ$ interaction between neighboring computational qubits are maximally suppressed. $\xi_{ZZ}$ is the residual $ZZ$ interaction between each qubit pairs. Two-qubit gates are implemented with the controlled-Z (CZ) and the corresponding gate errors $e_{tq,CZ}$ are characterized with RB.} \begin{threeparttable} \begin{tabular}{cp{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}p{1.83cm}<{\centering}} \hline \hline &{$Q_0-Q_1$} &{$Q_0-Q_2$} &{$Q_0-Q_3$} &{$Q_0-Q_4$} &{$Q_1-Q_5$} &{$Q_2-Q_6$} &{$Q_3-Q_7$} &{$Q_4-Q_8$}\tabularnewline \hline $\omega_{c,idle}$ (GHz) &{$5.020$} &{$5.445$} &{$5.570$} &{$5.335$} &{$5.325$} &{$5.595$} &{$5.695$} &{$5.355$} \tabularnewline $|\xi_{ZZ}|$ (kHz) &{$18.0$} &{$10.0$} &{$5.0$} &{$8.0$} &{$2.0$} &{$3.0$} &{$5.0$} &{$2.0$} \tabularnewline $e_{tq,CZ}$ (\%) &{$1.57$} &{$2.22$} &{$1.99$} &{$2.47$} &{$0.91$} &{$1.04$} &{$1.2$} &{$0.96$} \tabularnewline \hline \end{tabular} \vspace{0pt} \label{tab:TQqubitparameter} \end{threeparttable} \end{table*} \subsection{Experimental details} We use 3 qubits out of the 9-qubit computer for the 2-site Holstein model \begin{equation} \hat H = -V (a^\dagger_1 a_2 + a^\dagger_2 a_1) + \omega b^\dagger_1 b_1 + \omega b^\dagger_2 b_2 + g\omega a^\dagger_1 a_1 (b^\dagger_1 + b_1) + g\omega a^\dagger_2 a_2 (b^\dagger_2 + b_2) \ . \end{equation} The electronic degree of freedom is mapped to the second qubit. Thus, $a^\dagger_1 a_1$ is mapped to $\frac{1}{2}(1 + Z_1)$ and $a^\dagger_2 a_2$ is mapped to $\frac{1}{2}(1 - Z_1)$. The phonon modes are mapped to the first and the third qubit. With binary encoding and $N_l=1$, the Hamiltonian in the Pauli string form reads \begin{equation} \hat H = -V X_1 + \frac{1}{2}\omega (1 - Z_0)+ \frac{1}{2}\omega (1 - Z_2) + \frac{1}{2}g\omega (1+Z_1) X_0 + \frac{1}{2}g\omega (1-Z_1) X_2 \ . \end{equation} For variational encoding, we assume $C[l] = C$. That is, the two modes share the same variational encoder. This is a reasonable assumption for translational invariant systems. Supposing $\hat b^\dagger \hat b$ and $\hat b^\dagger + \hat b$ are mapped to the following form \begin{equation} \begin{aligned} \hat B (\hat b^\dagger \hat b) \hat B^\dagger & = c_{1i} I + c_{1x} X + c_{1z} Z \\ \hat B (\hat b^\dagger + \hat b) \hat B^\dagger & = c_{2i} I + c_{2x} X + c_{2z} Z \ , \end{aligned} \end{equation} the encoded Hamiltonian is then \begin{equation} \begin{aligned} \hat H & = -V X_1 + \omega (c_{1i} I_0 + c_{1x} X_0 + c_{1z} Z_0)+ \omega (c_{1i} I_2 + c_{1x} X_2 + c_{1z} Z_2) \\ & \quad + \frac{1}{2}g\omega (1+Z_1) (c_{2i} I_0 + c_{2x} X_0 + c_{2z} Z_0) + \frac{1}{2}g\omega (1-Z_1) (c_{2i} I_2 + c_{2x} X_2 + c_{2z} Z_2) \ . \end{aligned} \end{equation} We use the following ansatz for the parameterized quantum circuit \begin{equation} \label{eq:hw-ansatz} \ket{\phi} = \prod_{j=1}^2e^{\theta_{j}a^\dagger_j a_j (b^\dagger_j - b_j)} \frac{1}{\sqrt{2}} \left (\ket{000} + \ket{100} \right) \ , \end{equation} Because $C[1] = C[2]$, the parameter space can be further simplified by setting $\theta_1 = \theta_2$. With binary encoding, the ansatz transforms to \begin{equation} \ket{\phi} = e^{i\theta Y_2} e^{-i\theta Z_1 Y_2} e^{i\theta Y_0} e^{i\theta Z_1 Y_0} H_1 \ket{0} \ . \end{equation} The ansatz is compiled into the following quantum circuit with 4 CNOT gates. \scalebox{1}{ \Qcircuit @C=1.0em @R=0.2em @!R { \\ \nghost{{q}_{0} : } & \lstick{{q}_{0} : } & \gate{R_Z(\frac{-\pi}{2})} & \gate{H} & \targ & \gate{R_Z(-\theta)} & \targ & \gate{R_Z(-\theta)} & \qw & \qw & \qw & \qw & \gate{H} & \gate{R_Z(\frac{\pi}{2})} & \qw & \qw\\ \nghost{{q}_{1} : } & \lstick{{q}_{1} : } & \gate{H} & \qw & \ctrl{-1} & \qw & \ctrl{-1} & \qw & \ctrl{1} & \qw & \ctrl{1} & \qw & \qw & \qw & \qw & \qw\\ \nghost{{q}_{2} : } & \lstick{{q}_{2} : } & \gate{R_Z(\frac{-\pi}{2})} & \gate{H} & \qw & \qw & \qw & \qw & \targ & \gate{R_Z(\theta)} & \targ &\gate{R_Z(-\theta)} & \gate{H} & \gate{R_Z(\frac{\pi}{2})} & \qw & \qw \\ \\ }} Each energy term is measured by 8192 shots, and the uncertainty is obtained by repeating the measurement 5 times and taking the standard deviation. For the update of $C[l]$, 4096 shots are performed for each term. Local readout error mitigation is applied for all results presented unless otherwise stated. In Fig.~\ref{fig:vqe} we plot the energy landscape $E(\theta)/V$ in VQE with binary encoding. Both raw data and data with local readout error mitigation (EM) are presented for the energy expectation from quantum hardware. The mitigated landscape is in decent agreement with the perfect simulator. A minimum at around $\theta = 0.6$ is clearly visible. We note that the perfect simulator is also based on the $N_l=1$ ansatz and $N$ is far smaller than what is physically demanded. Thus the minimum presented by the perfect simulator can not be recognized as the ground truth. \begin{figure}[h] \includegraphics[width=.35\linewidth]{vqe.pdf} \caption{\label{fig:vqe} VQE energy landscape for the 2-site Holstein model with binary encoding. For the data from quantum hardware, both raw data and data with readout error mitigation are presented. The error bar indicates the measurement uncertainty. } \end{figure} \end{document}
\section{Introduction and Motivation}\label{introduction} The low-frequency Alfv\'en wave spectrum in the kinetic thermal-ion (KTI) gap frequency range \cite{Chen2007} has been of research interest since the first observations of beta-induced Alfv\'en eigenmodes (BAEs) \cite{Heidbrink1993,Turnbull1993}. These modes are characterized with frequencies comparable to thermal ion transit and/or bounce frequencies, and can interact with both thermal and fast particles \cite{Zonca1996,Zonca1999,Zonca2010,Chavdarovski2009,Lauber2009,Chen2016}, with possible (positive/negative) impact on the corresponding transport processes resulting from finite fluctuation and zonal field structures levels \cite{Chen2007,Chen2016,Zonca2021a}. The effects of energetic particles (EPs) on low-frequency shear Alfv\'en waves (SAWs) ranging from kinetic ballooning mode (KBM) \cite{Cheng1982,Tang1980,Biglari1991} to BAE are one of areas widely studied in the magnetic fusion literature. Recent papers on this topic cover the interpretation and modeling of experimental measurements by currently developed innovative diagnostics \cite{Sharapov2013,Gorelenkov2014,Heidbrink2021,Heidbrink2021a,Heidbrink2021b}, as well as latest progress in comparing numerical investigation and/or simulation results with observed phenomena \cite{Curran2012,Lauber2013a,Chavdarovski2014,Fasoli2016,Bierwage2017,Choi2021a}. A series of dedicated experiments have been recently conducted on DIII-D to investigate the stability of the low-frequency SAWs \cite{Heidbrink2021,Heidbrink2021a,Heidbrink2021b}. The experiments show that the observed low-frequency mode\footnote{We will refer from now on only to the low frequency Alfv\'en mode (LFAM) which belongs to low-frequency SAWs predominantly Alfv\'enic polarization, keeping in mind that this terminology is the same as the low-frequency mode observed in recent DIII-D experiments \cite{Heidbrink2021}.}, which was previously misidentified as `beta-induced Alfv\'en acoustic eigenmode (BAAE)' \cite{Gorelenkov2007,Gorelenkov2009}, is actually a lower-frequency reactive unstable KBM which favors high thermal electron temperature but almost has no coupling with energetic ions \cite{Heidbrink2021}; while the BAE is resonantly excited by energetic ions with its stability depending sensitively on the beam power and injection geometry \cite{Heidbrink2021a}, consistent with earlier theoretical predictions \cite{Chen2017} based on the GFLDR theoretical framework \cite{Zonca2014,Zonca2014a}. These instabilities are also found to occur when the minimum of the safety factor ($q_{min}$) approaches rational values and the modes in ascending pattern of higher frequency BAEs and LFAMs are separated by approximately the toroidal rotation frequency ($f_{rot}$). However, the subtle differences between them are that, for LFAMs, the maximum frequency appears at rational values of $q_{min}$ and the detected modes are radially localized near $q_{min}$, while BAEs occur at times near rational $q_{min}$ values but the timing of unstable modes is less precise than that for LFAMs. In addition, compared with the LFAMs, the BAE eigenfunction shows more deviation from the radial position of $q_{min}$ spatially. Although dedicated numerical simulations of the linear properties of the BAEs and LFAMs \cite{Varela2018,Choi2021a} have been carried out, the above experimental phenomena have not been fully explained. Motivated by this, the present work aims to provide an in-depth theoretical understanding of the linear properties of low-frequency SAWs, with particular attention to the effects of energetic ions on their stability. The analysis is carried out based on the theoretical framework of the generalized fishbone-like dispersion relation (GFLDR) \cite{Chen1984,Chen1994,Tsai1993,Zonca2006,Zonca2007,Zonca2014,Zonca2014a}, and provides qualitative and quantitative interpretation of the main instability mechanisms underlying the numerical simulation results and experimental observations. As a result, our analysis provides yet another evidence of the predictive strength of the GFLDR theoretical framework and of its enhanced ``interpretative capability for both experimental and numerical simulation results" \cite{Zonca2014,Zonca2014a}. In this work, unlike the previous paper not considering effects due to energetic particles (EPs) \cite{Ma2022}, we focus on the BAE excitation via transit resonance with passing fast ions created by NBI heating \cite{Heidbrink2021a}. In this case, the dynamics of various species enter the dispersion relation of low-frequency SAW, and affect its behavior linearly at different pressure gradient scale lengths. For DIII-D discharge \#178631, Fig. \ref{LP_scales} shows the radial dependence of different scale lengths of thermal and energetic particle pressure ($L_{P_{th}}$ and $L_{P_{E}}$), as well as the estimated radial mode width ($\Delta_m$) for weak and/or vanishing magnetic shear range, i.e., $|s|=|(r/q)(dq/dr)|\lesssim0.05$. More specifically, the EP pressure profiles are given by the following two limits. One is the relaxed EP profile provided with EFIT reconstruction \cite{Lao1985}, where the fast-ion pressure is the difference between the equilibrium pressure and the thermal pressure. The other is the ``classical'' EP profile obtained by TRANSP/NUBEAM \cite{Pankin2004} in the absence of fast-ion transport by instabilities. The pressure scale lengths of EPs are denoted by $L_{P_{E;rel}}$ and $L_{P_{E;cl}}$ for these two cases (respectively). The true EP profile when the modes are destabilized likely lies between these two limits. The actual pressure is closest to the EFIT-based one but this is measured after the unstable modes have (presumably) caused the gradients to flatten. Meanwhile, for the weak and/or vanishing magnetic shear region and given toroidal and poloidal mode numbers $(n,m)$, the normalized parallel wave vector is $\Omega_{A,m}=k_{\parallel n0}q_{min}R_0=nq_{min}-m$, and the radial width of the mode can then be estimated by $\Delta_m\simeq 1/|nq''|^{1/2}$ \cite{Zonca2000,Zonca2002}. Here, $k_{\parallel n0}$ represents the parallel wave-vector at $r_0$, where $q$ has a minimum given by $q_{min}$, $q''$ denotes the second derivative of $q$ in the radial direction, and $R_0$ is the torus major radius. It can be found that in this region, $L_{P_{th}}\gg \Delta_m$, which yields the usual local limit of the mode dispersion relation. This is the case for the reactive unstable LFAM in the absence of EPs already studied in Ref. \cite{Ma2022}. However, for the energetic ion-driven BAEs, there are two distinct cases: the moderate EP pressure gradient case with $L_{P_{E;rel}}>\Delta_m$, which also approximately yields the usual local GFLDR \cite{Tsai1993,Chen1994,Zonca1996,Zonca2000,Zonca2002,Zonca2007,Zonca2014,Zonca2014a}; and the strong EP pressure gradient case with $L_{P_{E;rel}}\simeq\Delta_m$, for which the global dispersion relation of low-frequency SAWs is needed and will be discussed in Sec. \ref{Theoretical Model}. \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{Lpth_Lpf_Delta_s_scales.png} \caption{The radial dependences of the typical scale lengths of thermal and energetic particle pressure ($L_{P_{th}}$ and $L_{P_{E}}$), as well as the estimated radial mode width ($\Delta_m$). } \label{LP_scales} \end{figure} Performing detailed numerical investigations of the two cases, it is found that the LFAMs and BAEs can both be driven unstable, however, due to different instability mechanisms, these modes yield different experimental observations. All these features can be, quantitatively and qualitatively, interpreted theoretically based on the GFLDR. Moreover, it is also confirmed that the stability of BAAE is not affected by EPs, even though it becomes weakly damped after coupling with KBM, consistent with theoretical predictions by Chen and Zonca \cite{Chen2017} as well as numerical simulation results reported in Refs. \cite{Choi2021a,Lauber2013a,Bierwage2017}. The paper is structured as follows. Local and global dispersion relations for the low-frequency SAWs near weak and/or vanishing magnetic shear are introduced and discussed in Sec. \ref{Theoretical Model} in different parameter regimes, depending on the relative magnitude of $L_{P_E}$ and $\Delta_m$. Detailed numerical investigations and theoretical analysis of the low-frequency SAWs in the presence of EPs are discussed in Sec. \ref{results}, where comparisons between theory and experiments are also made. Finally, conclusions and further discussions are given in Sec. \ref{conclusion}. \section{The General Fishbone-Like Dispersion Relation for low-frequency SAWs}\label{Theoretical Model} In this Section, we will present analytical dispersion relations for low-frequency SAW excitation in weakly reversed-shear DIII-D discharges. As stated in the previous Section, two cases determined by the relative magnitude of $L_{P_E}$ and $\Delta_m$ will be used to investigate the low-frequency SAW stability: case I, the local GFLDR model corresponding to $L_{P_E}>\Delta_m $; and case II, the global GFLDR corresponding to $L_{P_E}\simeq\Delta_m $. Consider case I first. For $L_{P_{E;rel}}>\Delta_m$, the scales of $L_{P_E}$ and $\Delta_m$ can be separated, and the vorticity equation \cite{Chen1994,Tsai1993,Zonca1996,Zonca2014,Zonca2014a,Chen2016} which governs shear Alfv\'en waves (SAWs) can yield the low-frequency electromagnetic fluctuation dispersion relation in the usual local limit, as derived and discussed in great details in Refs. \cite{Tsai1993,Chen1994,Zonca2007,Zonca2014,Zonca2014a,Chen2016}. We just note that, for DIII-D case of interest, the reversed magnetic shear configuration and thermal plasma compression effects should be accounted for properly \cite{Ma2022}. Thus, for $s=0$ at $r_0$ but with finite $S\equiv (r/q)[q^{''}]^{1/2}$, the local GFLDR for low-frequency SAWs can be written as \cite{Zonca2002,Zonca2007,Zonca2014,Zonca2014a,Chen2017} \begin{equation}\label{zeroshear_GFLDR} \begin{aligned} iS(\Lambda_{n}^2-k_{\parallel n0}^2q_{min}^2R_0^2)^{1/2}(1/n)^{1/2}\big[k_{\parallel n 0}q_{min}R_0-i(\Lambda_n^2-k_{\parallel n0}^2q_{min}^2R_0^2)^{1/2}\big]^{1/2}=\delta {\hat W}_{nf}+\delta{\hat W}_{nk}(\omega), \end{aligned} \end{equation} where the generalized inertia term $\Lambda_n(\omega)$ here, including both diamagnetic effects as well as kinetic effects of circulating and trapped particle dynamics, has been derived explicitly in Ref. \cite{Chavdarovski2009} and the main results are summarized in Appendix \ref{A}. The right hand side of Eq. \ref{zeroshear_GFLDR} contains both ``fluid" ($\delta {\hat W}_{nf}$) and ``kinetic" ($\delta {\hat W}_{nk}$) contributions to the potential energy in the ``regular" ideal region. In the low-frequency limits ($|\Lambda_n^2|\ll 1$), $\delta {\hat W}_{nf}$ is independent of the frequency and the explicit expression, specialized to the ($s$, $\alpha$) model equilibrium \cite{Connor1978} with circular flux surfaces, reads, \begin{equation}\label{dwf} \delta {\hat W}_{nf}\simeq \frac{\pi}{4}\bigg(\frac{S^2k_{\parallel 0}q_{min}R_0}{n}-\frac{3}{2}\alpha^2 S\big|\frac{k_{\parallel 0}q_{min}R_0}{n}\big|^{1/2}+\frac{9}{32}\alpha^4\bigg) \end{equation} where $\alpha=\alpha_c+\alpha_E$, $\alpha_c=-R_0q_{min}^2d\beta/dr$ and $\alpha_E=-\frac{1}{2}R_0q_{min}^2d(\beta_{E \parallel}+\beta_{E\perp})/dr$. Note that Eq. \ref{dwf} includes the contribution of the energetic particle adiabatic and convective responses as well \cite{Chen1984}. The term $\delta {\hat W}_{nk}$ is always a function of the mode frequency $\omega$, as it reflects resonant as well as non-resonant wave-particle interactions. For simplicity but still relevant to the DIII-D case, we take $F_{0E}$ to be a single pitch angle ($\lambda=\mu/\varepsilon$) slowing-down beam ion equilibrium distribution function; i.e., $F_{0E}=\frac{B_0\beta_{E}(r)}{2^5\sqrt{2}\pi^2m_E\varepsilon_b}\sqrt{(1-\lambda_0B_0)}\varepsilon^{-3/2}\delta (\lambda-\lambda_0)$. Here, $\beta_{E}(r)\equiv 8\pi P_E(r)/B_0^2$ is the ratio of EP kinetic and magnetic pressures and $B_0$ the on-axis equilibrium magnetic field, $\delta(x)$ is the Dirac function, $\mu$ is the magnetic moment and $\varepsilon=\upsilon^2/2 \leq \varepsilon_b$ with $\varepsilon_b$ being the EP birth energy per unit mass. Then the explicit expression of non-adiabatic contribution $\delta {\hat W}_{nku}$ for the passing energetic ions is given by \cite{Tsai1993,Chen1994} \begin{equation}\label{dwk_u} \delta {\hat W}_{nku}\simeq \frac{\pi\alpha_{E}}{2^{5/2}}(1-\lambda_0B_0/2){\bar \omega}\left[2-{\bar \omega}\ln \left( \frac{{\bar \omega}+1}{{\bar \omega}-1}\right)\right], \end{equation} where ${\bar \omega}=\omega/\omega_{tEm}$ and $\omega_{tEm}\equiv \sqrt{2\varepsilon_b}/qR_0$ is the EP transit frequency at the maximum particle energy. It is worthwhile emphasizing that the finite $k_{\parallel n0}q_{min}R_0$ in Eq. \ref{zeroshear_GFLDR} plays an important stabilizing role since it represents the finite line bending effect at $r=r_0$ \cite{Zonca2007,Zonca2014,Zonca2014a}. Furthermore, the expression of $\Lambda_n$ depends on the mode polarization via $S_f\equiv (i\delta E_{\parallel}/k_{\parallel})_{a.c.}\big/\delta \phi_{d.c.}$, where $a.c.$ and $d.c.$ refer to the sinusoidal and nearly constant (flute-like) components of the parallel electric field, wave vector, and scalar potential fluctuation \cite{Chavdarovski2014,Chen2017}. The detailed expression of $S_f$, again, is given in the Appendix \ref{A}. Here, we just note that $|S_f|$ is much smaller than unity for shear Alfv\'en wave and order of unity for ion acoustic wave \cite{Chavdarovski2009,Chavdarovski2014,Chen2017}. We remark here that, in the moderate pressure gradient case, the local GFLDR for the low-frequency SAWs is enough to delineate the underlying physics of the experimental and simulation results. However, the local GFLDR for the low-frequency SAWs, given by Eq. \ref{zeroshear_GFLDR}, will fail in the presence of strong EP pressure gradient, i.e., case II. In this case, two typical scale lengths $L_{P_{E,cl}}$ and $\Delta_m$ can not be separated anymore and, thus, a global dispersion relation is needed which can be derived from the vorticity equation, i.e., Eq. (1) of Ref. \cite{Zonca2002}. Noting that the mode structure is dominated by single toroidal and poloidal mode numbers, $(n,m)$, the governing equation reads \begin{equation}\label{global_dr} \begin{aligned} ({\bf e}_\theta-{\bf e}_{r}\xi)\cdot \left[\Lambda^2-\Omega^2_{A,m}\left(1+\frac{x^2}{\Omega_{A,m}}+\frac{x^4}{4\Omega^2_{A,m}}\right)\right]({\bf e}_\theta-{\bf e}_{r}\xi)\delta \phi_m-(F+K)\delta\phi_m=0, \end{aligned} \end{equation} where ${\bf k}_\perp/k_\theta=-({\bf e_\theta}-{\bf e}_r\xi)$ with ${\bf e}_r$ and ${\bf e}_\theta$ being, respectively, the radial and poloidal unit vectors, $x^2=nq_{min}''(r-r_0)^2$, $\xi\equiv(i/n^{1/2})S(\partial/\partial x)$, and $\delta \phi_m$ is the $m$th poloidal harmonic of the scalar field perturbation. It is worth noting that, toroidal coupling among different poloidal harmonics is typically not important for modes in the reversed magnetic shear region, consistent with the mode being dominated by single $m$ and $n$. The terms $F$ and $K$ in Eq. \ref{global_dr} represent, respectively, the fluid-like particle and energetic ion contributions with their explicit form reading \begin{equation} \begin{aligned} &F\simeq D_S^2-4\alpha^2D_S+2\alpha D_S^2-(\alpha+1)\alpha+2\alpha^3,\\ &K\simeq\frac{2\pi q_E^2 q^2 R_0^2 \omega}{m_Ec^2}\left\langle\frac{\Omega_{dE}^2QF_{0E}}{\omega_{tE}^2-\omega^2}\right\rangle_\upsilon=\frac{2}{\pi}\delta {\hat W}_{nku}, \end{aligned} \end{equation} where $D_S=S\sqrt{\Omega_{A,m}/n}$, $q_E$ and $m_E$ are the electric charge and mass of energetic ions, $\Omega_{dE}=(\upsilon_{E\perp}^2/2+\upsilon_{E\parallel}^2)/\omega_{cE}R_0$, $\omega_{tE}=\upsilon_{E\parallel}/qR_0$, $QF_{0E}=(\omega\partial_\varepsilon+{\hat \omega}_{\ast E})F_{0E}$, ${\hat \omega}_{\ast E}F_{0E}=\omega^{-1}_{cE}({\bf k} \times {\bf b})\cdot \nabla F_{0E}$, $\omega_{cE}=q_EB/m_Ec$, $\langle(...)\rangle_\upsilon=\int d^3\upsilon (...)$, and the subscripts $\parallel$ and $\perp$ represent the parallel and perpendicular components with respect to the equilibrium magnetic field ${\bf b}$. Equation \ref{global_dr} is an ordinary differential equation and, generally, requires a numerical approach to be solved. However, for DIII-D case, the radial dependence of the normalized pressure gradient of energetic ions with the classical profile, as is shown by black curve in Fig. \ref{aE_classical}, can be well fitted by the analytic formula $\alpha_E(\rho)=c_1\left(1-(\rho-c_2)^2/c_3^2\right)$, with $c_1=0.7099$, $c_2=0.3018$ and $c_3=0.2944$. This allows us to obtain simple analytical dispersion relations for low-frequency SAWs excitation. We just note that the maximum drive of energetic ions is located around $\rho=c_2=0.3018$, which deviates from the radial position of $q_{min}$. Then $\alpha_E(r)$ in Eq. \ref{dwk_u} can be rewritten as \begin{equation}\label{a_Er} \alpha_E(r)=\delta_a\alpha_{E0}\left(1-\frac{(r-r_0+\delta_b)^2}{\delta_c^2L_{PE;cl}^2}\right), \end{equation} where $\delta_a=c_1/\alpha_{E0}$, $\delta_b=r_0-c_2a$ and $\delta_c=c_3a/L_{PE;cl}$, $a$ is the minor radius, $\alpha_{E0}$ and $L_{PE;cl}$ are evaluated at $r=r_0$. \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{classical_aE.png} \caption{The radial dependence of the normalized pressure gradient of EPs with the classical profile. Here, the normalized radial position of $q_{min}$ is $\rho_0\equiv r_0/a=0.28$.} \label{aE_classical} \end{figure} Introducing the notation $x=r-r_0=\sigma z-\delta_b$, Eq. \ref{global_dr} is readily cast into the form \begin{equation}\label{Weibel_eq} \begin{aligned} &\frac{\partial^2}{\partial z^2}\delta \phi_m -\frac{n\sigma^2}{S^2}\left(1-\frac{F+\frac{2\delta_a}{\pi}\delta {\hat W}_{nku0}}{\epsilon_{A0}}\right)\delta \phi_m - \frac{1}{4}z^2\delta \phi_m=0,\\ & \frac{2n\sigma^4\delta_a \delta {\hat W}_{nku0}}{\epsilon_{A0}\pi S^2\delta_c^2L^2_{PE;cl}}=\frac{1}{4}, \end{aligned} \end{equation} where $\epsilon_{A0}=\Lambda^2-\Omega^2_{A,m}$, $\delta {\hat W}_{nku0}=\frac{\pi\alpha_{E0}}{4\sqrt{2}}\left[2-{\bar \omega}\ln \left( \frac{{\bar \omega}+1}{{\bar \omega}-1}\right)\right]$. Then, Eq. \ref{Weibel_eq} yields the following global dispersion relation for low-frequency SAWs, \begin{equation}\label{global_L_eq} \frac{-n^{1/2}\pi^{1/2}\delta_cL_{PE;cl}\epsilon_{A0}^{1/2}}{2\sqrt{2}S\delta_a^{1/2}\delta{\hat W}_{nku0}^{1/2}}\left(1-\frac{F+\frac{2\delta_a}{\pi}\delta{\hat W}_{nku0}}{\epsilon_{A0}}\right)=2L+1, {\quad\text{$L=0,1,2,3$ ...}} \end{equation} Here, the integer $L$ is the radial eigenmode number. The corresponding eigenfunction reads \begin{equation}\label{dphi_mr} \delta\phi_m(r)= H_L(z)e^{-z^2}\propto \exp\left(-\frac{(r-r_0+\delta_b)^2}{4\sigma^2}\right), \end{equation} where $H_L(z)$ represents $L$th order Hermite polynomials and the causality constraints upon the discrete bound modes requiring ${\cal R}e(\sigma^2)>0$, where $\sigma^2$ is solved for from the second of Eqs. \ref{Weibel_eq} consistently with the dispersion relation, Eq. \ref{global_L_eq}. The typical radial width, $w$, of $\delta \phi_m(r)$ is determined by $w^2=4\sigma^2$. Equations \ref{zeroshear_GFLDR} and \ref{global_L_eq} constitute the results of the present section, i.e., the local and global GFLDR for the low-frequency SAWs excited by energetic ions. With their explicit form, we can compute the individual terms involved in equations and investigate the linear properties of the experimentally observed low-frequency SAWs. \section{The low-frequency SAW Instabilities Numerical Results and Analysis}\label{results} In this Section, we separately present numerical results for the local and global low-frequency SAW stability properties in the presence of energetic ions, for which the dispersion relation is given by Eqs. \ref{zeroshear_GFLDR} and \ref{global_L_eq}. \begin{figure}[htbp] \centering \includegraphics[width=0.47\textwidth]{T_th_E_q.png} \includegraphics[width=0.47\textwidth]{n_th_E_frot.png} \caption{Radial profiles of (a) temperature and $q$ and (b) density and toroidal rotation frequency $f_{rot}$ of DIII-D shot \#178631 used for numerical studies.} \label{equili_profiles} \end{figure} The numerical investigations use experimental equilibrium and profiles as shown in Fig. \ref{equili_profiles} for the DIII-D shot \#178631 at the time $t=1200$ ms \cite{Heidbrink2021}, where the $q$-profile has a reversed shear configuration with $q_{min}=1.37$ at $r_0/a=0.28$ and $q_{min}$ decreases from 1.49 to 1.18 in the time window $1050$ ms $<t<1350$ ms, as shown in Fig. 6 (b) in Ref. \onlinecite{Heidbrink2021}. \subsection{The local low-frequency SAW stability properties} We first consider the linear properties of the low-frequency SAW with relaxed energetic ion profile, i.e., case I. The local equilibrium parameters used in the numerical studies evaluated at $r_0/a=0.28$ are $S=0.5895$, $\tau=T_e/T_i=$3.86 keV/2.37 keV=1.62, $n_{e}=3.80\times10^{19}$ $m^{-3}$, $n_{i}=3.19\times10^{19}$ $m^{-3}$, $\epsilon_r=r_0/R=0.10$, $\beta_i\simeq0.01$, $\epsilon_{ni}=L_{ni}/R_0=0.414$, $\eta_i=L_{ni}/L_{Ti}=0.8324$, $\omega_{\ast ni}/\omega_{ti}=0.1919$, $(m,n)=(8,6)$, $k_\theta \rho_{Li}=0.2555$ and $k_\theta \rho_{Le}=0.0054$. Other fixed equilibrium parameters are $a=0.64$ m, $R_0=1.74$ m, $B_0=1.8$ T. Here, $k_\theta$ is the poloidal wavenumber, $\rho_{Li}$ and $\rho_{Le}$ are the Larmor radii of thermal ions and thermal electrons, respectively. \begin{figure}[htbp] \centering \includegraphics[width=0.47\textwidth]{real_change_wni_EP.png} \includegraphics[width=0.47\textwidth]{imag_change_wni_EP_mark.png} \includegraphics[width=0.47\textwidth]{S_factor_change_wni_EP.png} \caption{Dependence of the (a) real frequencies, (b) growth rates and (c) polarization of the low-frequency SAWs on $\Omega_{\ast pi}\equiv \omega_{\ast pi}/\omega_{ti}$ for the cases without (w/o) and with (w/) EP effects. Here, a dashed vertical line represents the experimental value of $\Omega_{\ast pi;exp}$ of about 0.35.} \label{changewpi} \end{figure} Dependencies of the (a) mode frequencies, (b) growth rates and (c) mode polarization predicted by Eq. \ref{zeroshear_GFLDR} are shown in Fig. \ref{changewpi} as a function of the normalized thermal ion diamagnetic frequency $\Omega_{\ast pi}\equiv \omega_{\ast pi}/\omega_{ti}$ for the cases without and with the consideration of EP effects. According to the scaling of mode frequencies with physical parameters and the value of the $|S_f|$ \cite{Chavdarovski2014}, three branches in Fig. \ref{changewpi} can be classified as: (i) the KBM (red curves marked with circles), with a frequency scaling with $\omega\sim \omega_{\ast pi}$; (ii) the BAE (blue curves), with the frequency being close to the well-known estimate $\omega/\omega_{ti}=q_{min}\sqrt{7/4+\tau}\simeq 2.51$; and (iii) the BAAE (green curves marked with diamonds), with a frequency of about half of the BAE and experiencing strong damping. The EP effects on the low-frequency SAW stabilities are apparent in the region highlighted by the purple curve of Fig. \ref{changewpi} (b), where the KBM is the only unstable mode in the absence of EPs, while both the KBM and BAE are unstable in the low-frequency region in the presence of EPs. In particular, the diamagnetic ion frequency calculated on the basis of experimental parameters is $\Omega_{\ast pi;exp}=0.3517$, as shown by the dashed vertical line. In this case, both KBM and BAE are unstable with the frequencies in the plasma frame being 5.6 kHz and 63.7 kHz, respectively, which are in good agreement with the experimental observations. Meanwhile, the polarization plot of Fig. \ref{changewpi} (c) shows that KBM and BAE have small values for $|S_f|\lesssim 0.1$, which indicates that the KBM and BAE are essentially of Alfv\'enic polarization. Moreover, in order to exclude the spurious nonzero solutions produced by singularities of the transcendental function of the local GFLDR (${\rm D}$), the Nyquist diagram in the complex D plane presented in Fig. \ref{nyquist} shows that in the presence of EPs, the path encircles the origin twice (see Fig. \ref{nyquist} (b)) but only once without EPs (see Fig. \ref{nyquist} (a)), thus confirming there are two unstable modes with EPs. \begin{figure}[htbp] \includegraphics[width=0.46\textwidth]{Nyquist_without_ep.png} \includegraphics[width=0.46\textwidth]{Nyquist_with_ep.png} \caption{{{The Nyquist diagram in the complex ${\rm D}(\omega)$ plane for the cases (a) without and (b) with EP effects.}}} \label{nyquist} \end{figure} It should be noted that, compared with the frequency insensitive to the EP effects, the growth rate of the KBMs changes significantly in the cases with and without EP effects. This occurs because in our theoretical model the adiabatic and convective contribution of EPs modifies the value of $\delta {\hat W}_f$ via $\alpha$, as is shown in Eq. \ref{dwf}. At this point, in order to obtain more convincing comparison of theoretical prediction and experimental observation, it is necessary to provide a more precise theoretical model and also a more comprehensive experimental analysis. We also note here that, in this case, the stability/property of the BAAE is not affected by energetic ions --- as is shown by the green dashed lines with symbols (without EP effects) and solid lines with symbols (with EP effects) which are apparently overlaying in all three graphs --- even though it becomes weakly damped by coupling with the KBM due to diamagnetic and trapped particle effects for sufficiently strong $\Omega_{\ast pi}$. The numerical results are consistent with the numerical simulation results reported in Refs. \cite{Lauber2013a,Bierwage2017,Choi2021a} and the theoretical prediction in Ref. \cite{Chen2017}, that is, ``{\it EPs preferentially excite the BAE over the BAAE branch due to the stronger wave-EP interaction}". We now investigate the underlying instability mechanisms of the ascending spectrum of the higher frequency BAEs and LFAMs observed in DIII-D (see Fig. 8 of Ref. \cite{Heidbrink2021a}) by using $q_{min}$ as the scanning parameter. Figure \ref{change_qmin} shows the dependence of the mode frequencies (solid curves with markers) and growth rates (dashed curves with markers) on $q_{min}$ of the KBMs (red curves) and the BAEs (blue, green, purple and orange curves) for different poloidal and toroidal mode numbers ($m$, $n$). \begin{figure}[htbp] \centering \includegraphics[width=1.0\textwidth]{change_qmin.png} \caption{Dependence of mode frequencies (solid curves with markers) and growth rates (dashed curves with markers) on $q_{min}$ of the KBMs (red curves) and the BAEs (blue, green, purple and orange curves) for different ($m$, $n$). The experimentally observed frequencies are also shown. For the BAE, since the modes span a range of frequencies, the lines indicate the upper and lower limits of the unstable bands; for the LFAM, the experimental frequency variation is $<0.5$~kHz. In the abscissa, the experimentally measured $q_{min}(t)$ fit shown in Fig.~8 of \cite{Heidbrink2021a} is used to convert time to $q_{min}$, with an associated uncertainty of $\Delta q_{min}\simeq0.01$. In the ordinate, the theoretical lab-frame frequency incorporates a Doppler shift to the calculated plasma-frame frequency of $nf_{rot}$, with an associated uncertainty of $\sim0.5\times n$~kHz.} \label{change_qmin} \end{figure} It is shown that the modes in ascending pattern of higher frequency BAEs and lower frequency KBMs are both separated by approximately $f_{rot}$ of about 7.5 kHz. More specifically, for KBMs, the instabilities peak exactly at the rational values of $q_{min}$; while the BAEs occur at times near rational values of $q_{min}$ but the timing of unstable modes is less precise than for KBMs. In addition, the low-$n$ BAEs deviate more from rational $q_{min}$ crossings than higher $n$ modes. The comparison of the theoretically predicted frequencies with the experimentally measured values can also be seen clearly from Fig. \ref{change_qmin}. As discussed in more detail in the next section, these numerical results are in good agreement with the experimental observations. In order to gain insight into the different excitation mechanisms of the instabilities presented in Fig. \ref{change_qmin}, let us further analyze the GFLDR in the high-frequency ($|\omega| \gg \omega_{ti}$) and low-frequency $|\omega| \ll \omega_{bi}$ limits. For $|\omega|\gg |\omega_{ti}|$, the corresponding inertia term of the BAE can be reduced to the simplified expression with $\Lambda^2\simeq\frac{\omega^2-\omega^2_{BAE}}{\omega^2_A}$ \cite{Zonca1996,Zonca2007,Zonca2009}. Here, $\omega^2_{BAE}=(7/4+\tau)\upsilon_i^2/R_0^2$ is the fluid limit expression of the BAE frequency. Taking $\omega=\omega_r+i\gamma$ and $\delta {\hat W}_{ku}={\rm Re}\delta{\hat W}_{ku}+i{\rm Im}\delta{\hat W}_{ku}$, and assuming $|\gamma/\omega_r|$, we have $|{\rm Im}\delta{\hat W}_{ku}/{\rm Re}\delta{\hat W}_{ku}|\ll 1$. Then, for the gap mode, the existence condition is $\delta {\hat W}_{nf}+{\rm Re}(\delta {\hat W}_{nk}(\omega_r))<0$ and the real mode frequency is given by \begin{equation}\label{BAE_freq} \omega_r^2=\omega_{BAE}^2\left[1+\frac{\omega_A^2}{\omega_{BAE}^2}\left(k_{\parallel n0}^2q_{min}^2R_0^2-\frac{n}{\left|k_{\parallel n0}q_{min}R_0\right|}\frac{\left(\delta {\hat W}_{nf}+{\rm Re}(\delta {\hat W}_{nk}(\omega_r))\right)^2}{S^2}\right)\right], \end{equation} while the growth rate is obtained from \begin{equation}\label{BAE_growth} \gamma=-{\rm Im}(\delta {\hat W}_{nk}(\omega_r))\frac{\omega_A^2}{\omega_r}\frac{n\left(\delta {\hat W}_{nf}+{\rm Re}({\delta {\hat W}_{nk}(\omega_r))}\right)}{\left|k_{\parallel n0}q_{min}R_0\right|S^2}, \end{equation} It can be readily obtained from Eq. \ref{BAE_freq} that the BAE frequency is positively correlated with $\left|k_{\parallel n0}q_{min}R_0\right|$. Therefore, the more deviation from the rational $q_{min}$ surface is, the larger the BAE frequency is, as is shown in Fig. \ref{change_qmin}. Note also that the BAE has a positive frequency. Equation \ref{BAE_growth} imposes ${\rm Im}(\delta {\hat W}_{nk}(\omega_r))>0$ for BAE excitation by EPs via resonant wave-particle interaction. It can be concluded that the duration of BAEs is influenced by the associated resonances with the EPs, as well as by the value of $q_{min}$ \cite{Heidbrink2021a}. Similarly, for KBM with $|\omega|\ll |\omega_{bi}|$, we have $\Lambda^2\simeq c_0\frac{q_{min}^2}{\sqrt{\epsilon}}\frac{(\omega-\bar{\omega}_{di})(\omega-\omega_{\ast pi})}{\omega^2_A}$ \cite{Zonca2007,Chavdarovski2009,Chavdarovski2014,Chen2020,Heidbrink2021}. Here, $\bar{\omega}_{di}$ is the average thermal-ion precession frequency, $c_0\simeq 1.6$ due to trapped and barely circulating particles \cite{Rosenbluth1998,Graves2000}. Thus, the real mode frequency is given by \begin{equation} \omega= \frac{1}{2}({\bar \omega}_{di}+\omega_{\ast pi})\pm \frac{1}{2}\left[(\omega_{\ast pi}-{\bar \omega}_{di})^2-\frac{4\omega_A^2\sqrt{\epsilon}}{q_{min}^2c_0}\left(\frac{n\left(\delta {\hat W}_{nf}+{\rm Re}({\delta {\hat W}_{nk}(\omega_r))}\right)^2}{\left|k_{\parallel n0}q_{min}R_0\right|S^2}-k_{\parallel n0}^2q_{min}^2R_0^2\right)\right]^{1/2}, \end{equation} and the system is reactively unstable if \begin{equation}\label{reactive_condition} \frac{|\omega_{\ast pi}-{\bar \omega}_{di}|^2}{\omega_A^2}<\frac{4\sqrt{\epsilon}}{q_{min}^2c_0}\left(\frac{n\left(\delta {\hat W}_{nf}+{\rm Re}({\delta {\hat W}_{nk}(\omega_r))}\right)^2}{\left|k_{\parallel n0}q_{min}R_0\right|S^2}-k_{\parallel n0}^2q_{min}^2R_0^2\right). \end{equation} Note that $\delta {\hat W}_{f}+{\rm Re}\delta {\hat W}_{ku}<0$, due to, again, the causality constraint. Therefore, for the reactive-type instability, the maximum drive sets in when $k_{\parallel n0}q_{min}R_0\rightarrow 0$, which corresponds to the unstable KBM exactly peaking at the rational values of $q_{min}$. The above numerical results and theoretical analyses have explained the experimental observations that the BAEs deviate more from the rational $q_{min}$ values temporally, compared with the KBM. To further delineate this deviation and its impact on the radial mode structure, numerical investigation of the global model for low-frequency SAWs is needed. \subsection{The global low-frequency SAW stability properties} In this part, we consider the case II and apply Eq. \ref{global_L_eq} to investigate the global low-frequency SAW stability properties with the classical energetic ion profile. \begin{figure}[htbp] \centering \includegraphics[width=0.47\textwidth]{classical_only_BAE_KBM_real_imag_change_L_withEP4.png} \includegraphics[width=0.47\textwidth]{dphim_BAE_classical_exp.png} \caption{(a) Dependence of the real frequencies (blue markers) and growth rates (red markers) of the KBM (triangle markers) and BAE (line with markers) on the radial mode number $L$; (b) the radial mode structure $\delta \phi_{m}$(r) for the $L=0$ BAE. The approximate experimental measurement of the mode structure of BAE is also shown.} \label{change-L} \end{figure} Figure \ref{change-L} shows (a) the dependence of the real frequencies (blue markers) and growth rates (red markers) of the KBM (triangle markers) and BAE (line with markers) on the radial mode number $L$; and (b) the radial mode structure $\delta \phi_{m}$(r) for the $L=0$ BAE. It can be found that (i) the ground eigenstate with $L=0$ is most unstable for the BAE and KBM; (ii) for BAE, the frequency and growth rate in the plasma frame is $(80.7+15.2i)$ kHz with the ratio of the growth rate to real frequency $\gamma/\omega\simeq 0.19$, which is the typical feature of the marginally unstable gap mode excited by EPs; and (iii) for KBM, the frequency and growth rate in the plasma frame is $(-3.2+5.7i)$ kHz with $\gamma/\omega\simeq 1.8$, which is the typical feature of the reactive-type instability, consistent with the results reported in Ref. \cite{Choi2021a}. Correspondingly, the radial eigenfunction plot of the BAE for $L=0$, as shown in Fig. \ref{change-L} (b), presents that $\delta \phi_m$ has a Gaussian form with a shape similar to the experimentally measured radial mode structure. In this case, the radial width of $\delta \phi_m$ by theory is $w= 0.2107$, is comparable to the scale length of energetic-ion pressure, i.e., $L_{P_{E;cl}}=0.1773$; consistent with the analysis of Fig. \ref{LP_scales}. Note that determined by the EP distribution, the BAE eigenfunction peaks at the radial position of the maximum energetic particle pressure gradient, resulting in a large deviation from the $q_{min}$ surface. It can also be expected that the KBM eigenfunction should peak at the rational values of $q_{min}$ where the instability drive is maximum. Finally, the continuous spectra plots for low-frequency shear Alfv\'en and acoustic waves given by $\Lambda_n^2(\omega)=k_{\parallel n}^2 q^2R_0^2=(nq-m)^2$ \cite{Zonca1996,Zonca2009,Zonca2010,Zonca2014,Zonca2014a,Falessi2019a,Falessi2020} are shown in Fig. \ref{n6_continuum_spectra}. Here, the inertia term includes the diamagnetic effects and thermal ion compressibility as well as drift Alfv\'en wave and drift wave sideband coupling via the wave-thermal-passing-ion interaction and diamagnetic effect \cite{Zonca2010}. The figure shows that based on the GFLDR, the nature of various branches can be clearly classified via their frequencies (a), growth rates (b) and polarizations (c). Here, the short notation ``e-KBM" represents the branch of the KBM propagating in the thermal-electron diamagnetic drift direction. The unstable continuum spectrum of the e-KBM is due to the inclusion of the kinetic dynamics of thermal particles in inertia term. In addition, the frequencies of the $(m,n)=(8,6)$ BAE and the $(m,n)=(8,6)$ KBM calculated by the local and global cases are, respectively, in the gaps of the BAE and KBM continua, which is consistent with the numerical simulation results reported in Refs. \cite{Heidbrink2021,Choi2021a}. \begin{figure}[htbp] \centering \includegraphics[width=0.495\textwidth]{real_n6_jpcs2010_6_branches_kHz-new2.png} \includegraphics[width=0.495\textwidth]{imag_n6_jpcs2010_6_branches_kHz-new.png} \includegraphics[width=0.495\textwidth]{S_factor_n6_jpcs2010_6_branches_new.png} \caption{The continuous spectra of low-frequency shear Alfv\'en and acoustic branches for n=6, m=8-15. The equilibrium profiles of DIII-D \#178631 at 1200 ms are adopted.} \label{n6_continuum_spectra} \end{figure} \section{Summary and Discussions}\label{conclusion} The present work has addressed linear properties of the low-frequency shear Alfv\'en waves (SAWs) with the consideration of energetic ions in DIII-D reversed magnetic shear tokamak experiments. By analyzing the experimental equilibrium profiles, the local and global models for low-frequency SAWs for weak and/or vanishing magnetic shear are discussed based on the unified theoretical framework of the generalize fishbone-like dispersion relation (GFLDR). Resorting to numerical and theoretical analyses, the dependences of mode frequency, growth rate and polarization on the minimum of the safety factor ($q_{min}$), as well as the instability mechanisms are delineated. The main results of this work are that the LFAMs and BAEs observed in DIII-D experiments are, respectively, the reactive-type and dissipative-type unstable modes with predominantly Alfv\'enic polarization. Due to the different instability mechanisms, BAE peak occurs further away from the rational $q_{min}$ than LFAM peak does. The BAE eigenfunction is localized at the radial position with the strongest energetic-ion-drive spatially, which leads to deviation from the radial position of $q_{min}$. The theoretical analysis explains many experimental observations. \begin{enumerate} \item The theory successfully explains the temporal pattern of two bands of instability, the BAE band and the LFAM band, that both appear near rational values of $q_{min}$ but with distinctly different stability properties. \item The predicted values of KBM frequency are in excellent agreement with the experimental LFAM frequencies. The KBM can be unstable even in the absence of energetic particles (EPs). \item The predicted values of BAE frequency span the same range as the experimentally observed values. \item The theory also successfully explains the absence of a third branch of instability at BAAE frequencies, as that branch is predicted to be stable. \item Experimentally, an individual unstable BAE spans a much larger range of frequencies than an unstable LFAM, another feature successfully reproduced by theory. \item Experimentally, unstable LFAMs only persist for a few milliseconds. The short duration of the LFAM is consistent with the very strong $q_{min}$ dependence of the KBM growth rate. \item In experiment, unstable BAEs persist longer than LFAMs, which is consistent with the weaker dependence of the BAE growth rate on $q_{min}$ in theory. \item Temporally, in experiment, LFAMs occur at rational values of $q_{min}$; BAEs also occur near rational values but less precisely. This feature is also reproduced by the theoretical stability predictions: the KBM growth rate peaks sharply at rational $q_{min}$ values but the peak of the BAE growth rate deviates slightly. \item In experiment, for both the LFAM and the BAE, unstable modes with higher values of toroidal mode number $n$ are of shorter duration than lower values of $n$. The narrower growth rate curves as $n$ increases successfully explains this feature. \item Experimentally, the BAE radial eigenfunction has an approximately gaussian shape, consistent with the theoretical prediction that the $L=0$ radial harmonic is most unstable. \item Experimentally, the LFAM is more unstable in plasmas with hydrogen than in pure deuterium plasmas \cite{Heidbrink2021b}, a feature explained by the higher value of $\omega_A$ in hydrogen plasmas. As Eq. \ref{reactive_condition} shows, a larger value of $\omega_A$ lowers the instability threshold. \end{enumerate} On the other hand, there are three discrepancies between theory and experiment. \begin{enumerate} \item Although the predicted KBM growth rate correctly peaks sharply for rational values of $q_{min}$, it remains positive for a much longer duration than the LFAMs are observed experimentally. Evidently, an additional damping mechanism is missing in the theory. \item Although the predicted KBM growth rate has changed significantly for the cases with and without EPs, there is no apparent dependence of LFAM stability on EPs experimentally. Therefore, a more precise theoretical model and more comprehensive experimental analysis are needed for meaningful comparison. \item Although the predicted BAE frequency spans the observed values, the predicted frequency has a parabolic shape with time, while the experimental frequency has a less regular shape. A likely explanation for this discrepancy is imprecise modeling of the fast-ion distribution function. \end{enumerate} Finally, there is one theoretical prediction that is inconclusive experimentally: the mode polarization. Theory predicts predominately Alfv\'enic polarization for both the KBM and the BAE. In experiment, low toroidal mode number ($n\leq 3$) BAEs are usually observed on external magnetic coils; LFAMs are never detected, but the inferred toroidal mode numbers typically span a larger range than those normally detected for RSAEs or BAEs. DIII-D is equipped with one diagnostic that can detect internal magnetic fields, a radial interferometer-polarimeter (RIP) \cite{Chen2016b} that measures the line integral of the density and radial magnetic field, $\int n_e B_r dl$. This diagnostic clearly detects RSAEs and BAEs, which is consistent with their expected shear-wave polarization. Fluctuations are observed by RIP for some LFAMs, indicating that there is at least some magnetic component, but the signal is weaker than for RSAEs and BAEs. It is not presently known if this difference is due to a line-integral effect associated with the mode structure or if the LFAM polarization is less Alfv\'enic than the other modes. \section*{Acknowledgments} One of authors (R.R. Ma) would like to acknowledge Dr. Lei Yang and Dr. Yunpeng Zou for their useful discussions and the DIII-D team for providing the experimental data. The authors thank Dr. Xiaodi Du for helpful comments concerning the mode polarization. R.R Ma is also grateful to the \href{https://www.afs.enea.it/zonca/CNPS/}{{\color{black}\it{Center for Nonlinear Plasma Science }}} (CNPS) for its enlightening academic discussion, which provides a valuable sources of scientific stimuli. This work has been supported in part by the National key R\&D Program of China under Grant Nos. 2022YFE03040002 and 2018YFE0304103, by the National Science Foundation of China under Grant Nos. 12261131622 and 12175053 and Natural Science Foundation of Sichuan under Grant No. 2022NSFSC1814 and Sichuan Science and Technology Program under Grant No. 2022ZYD0019. This work has also been carried out within the framework of the EUROfusion Consortium, funded by the European Union via the Euratom Research and Training Programme (Grant Agreement No. 101052200 -- EUROfusion). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them. This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Fusion Energy Sciences, using the DIII-D National Fusion Facility, a DOE Office of Science user facility, under Awards DE-FC02-04ER54698 and DE-SC0020337. {\small This report was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.}
\section*{Overview} Pointwise ergodic theory, the motivation for discrete harmonic analysis, has at its roots the classical theorem of Birkhoff \cite{[2]}, which can be described as follows: \begin{displayquote} For every ergodic ---that is, \enquote{sufficiently randomizing}--- measure-preserving transformation, $\tau$, of a probability space, $(X,\mu)$, and any integrable function $f \in L^1(X,\mu)$, $\mu$-almost surely, one can recover the mean of $f$ by considering the Ces\'{a}ro sums \[ \frac{1}{N} \sum_{n \leq N} f(\tau^nx) \to \int_X f \ d\mu \ \mu-\text{a.e.}\] \end{displayquote} Informally, this theorem says that one can recover the \emph{spatial mean} of $f$, \[ \int_X f \ d\mu,\] by considering the \emph{temporal means} \[ \big\{ \frac{1}{N} \sum_{n\leq N} f(\tau^nx) \big\},\] formed by \enquote{sampling} the function $f$ at the \enquote{times} $\{\tau^nx\}$ and taking the appropriate average.\footnote{Even in the case when $\tau$ is not ergodic, the temporal means $\big\{ \frac{1}{N} \sum_{n\leq N} \tau^n f(x) \big\}$ still converge $\mu$-almost everywhere.} A classical question in pointwise ergodic theory concerned the almost-everywhere existence of limiting behavior of averages \begin{align}\label{H-e:means} \frac{1}{N} \sum_{n=1}^N \tau^{a_n} f \end{align} where $\{a_n\}$ is \enquote{sparse}; as is custom, here and throughout we use $\tau^k f$ to denote the function \begin{align*} x \mapsto f(\tau^k x). \end{align*} When the lower density of the sequence $\{ a_n\}$ is bounded away from zero \begin{align*} \liminf \frac{|\{ n : a_n \leq N\}|}{N} > 0, \end{align*} convergence is readily exhibited, and the classical question concerned the existence of sequences $\{ a_n \}$ with zero density, \begin{align*} \lim \frac{|\{ n : a_n \leq N\}|}{N} = 0, \end{align*} for which the averages \eqref{H-e:means} converged almost everywhere. In \cite{[2]}, such a sequence was constructed; it consisted of taking long blocks of natural numbers, followed by much longer gaps, followed by slightly longer blocks, followed by even longer gaps, etc. In particular, this sequence had an upper Banach density of $1$ \begin{align*} d^*(\{ a_n \}) \coloneqq \limsup_{|I| \to \infty \text{ an interval}} \frac{|\{ a_n \} \cap I|}{|I|} = 1. \end{align*} The question remained, however, whether or not there existed upper Banach density-zero sequences, $\{ a_n \}$ with $d^*(\{a_n \}) = 0$, for which the almost-everywhere convergence of the averages \eqref{H-e:means} could be proved. In particular, the classical question, explicitly posed first by Furstenberg \cite{[16]}, see also \cite{[1]}, was whether or not the averages along the squares \begin{align*} \frac{1}{N} \sum_{n=1}^N \tau^{n^2} f \end{align*} converged pointwise almost everywhere, initially for $f \in L^2(X)$. In breakthrough work, \cite{[5], [6], [9]}, Bourgain answered this question affirmatively, and proved the almost everywhere convergence of \eqref{H-e:means} for any polynomial sequence, \[ \{ a_n = P(n) \}, \; \; \; P \in \mathbb{Z}[ \cdot ], \] and any $f \in L^p(X), \ p >1$, for any $\sigma$-finite measure space $X$; this result was later proven to be sharp \cite{[11], [25]}. \begin{theo}\label{t:BPoly} Suppose that $(X,\mu)$ is a $\sigma$-finite measure space, $\tau: X \to X$ is a measure-preserving transformation, and $P \in \mathbb{Z}[\cdot]$ is a polynomial with integer coefficients. Then for each $1 < p < \infty$ \[ \frac{1}{N} \sum_{n=1}^N \tau^{P(n)} f \] converges $\mu$-a.e. \end{theo} Although the issue of pointwise convergence is {qualitative}, Bourgain's insight was to {quantify} the rate at which convergence occurred -- and then to use an abstract {transference} argument first due to Calder\'{o}n \cite{[12]} to deduce these quantitative estimates from a single \enquote{universal} measure preserving system. By considering sequences of the form \[ \mathbb{Z} \ni n \mapsto \tau^n f(x), \; \; \; x \in X \text{ fixed} \] and using the measure-preserving nature of $\tau$, Bourgain was able to reduce matters to proving estimates in the case of the integers with counting measure and the shift $(\mathbb{Z}, |\cdot|, \tau: x \mapsto x-1)$. In particular, Bourgain was after quantitative estimates on the oscillation of the averaging operators \begin{align}\label{e:foreword-squares1} \frac{1}{N} \sum_{n =1}^{N} f(x - P(n)), \end{align} applied first to $\ell^2(\mathbb{Z})$-functions. A natural perspective on \eqref{e:foreword-squares1} is as a convolution of $f$ and \[ K_N(x) \coloneqq \frac{1}{N} \sum_{n=1}^N \delta_{P(n)}(x) \] where $\delta_m$ denotes the point-mass at $m \in \mathbb{Z}$; as this problem is $\ell^2(\mathbb{Z})$-based, the Fourier transform method is naturally employed, and the key to the analysis is an understanding of the exponential sums \[ \frac{1}{N} \sum_{n \leq N} e^{- 2\pi i \beta \cdot P(n)},\] which is accomplished via the \emph{circle method} from analytic number theory; the interplay between the \enquote{soft} analytic issue of pointwise convergence and \enquote{hard} analytic estimates on the integers/Euclidean space via analytic-number-theoretic means is characteristic of the fields of pointwise ergodic theory and discrete harmonic analysis. I first came to understand Bourgain's work by reading \cite{[36]}, which I think explains Theorem \ref{t:BPoly} beautifully; the goal of these notes is to complement \cite{[36]} by trying to explain the motivation behind Bourgain's argument. Accordingly, for the sake of clarity, we will shift our focus slightly from proving Theorem \ref{t:BPoly}, and will instead focus on the related maximal estimate, in the representative case of $L^2(X)$. \begin{theo}\label{t:BMax} Suppose that $(X,\mu)$ is a $\sigma$-finite measure space, $\tau: X \to X$ is a measure-preserving transformation, and $P \in \mathbb{Z}[\cdot]$ is a polynomial with integer coefficients. Then there exists an absolute constant $\mathbf{C}$, independent of $(X,\mu,\tau)$, so that \[ \| \sup_N \Big|\frac{1}{N} \sum_{n=1}^N \tau^{P(n)} f \Big| \|_{L^2(X)} \leq \mathbf{C} \cdot \| f\|_{L^2(X)}.\] \end{theo} By Calder\'{o}n's transference principle, Theorem \ref{t:BMax} follows from the analoguous estimate of the integers: if we define \begin{align}\label{e-MAX-1} \mathscr{M} f(x) \coloneqq \sup_N \Big| \frac{1}{N} \sum_{n=1}^N f(x- P(n)) \Big|, \end{align} then our focus turns to establishing the following estimate \begin{theo}\label{2-MAINGOAL} For any $P \in \mathbb{Z}[\cdot]$, the following norm inequality holds: there exists an absolute constant $\mathbf{C}$ so that \begin{align*} \| \mathscr{M}f \|_{\ell^2(\mathbb{Z})} \leq \mathbf{C} \cdot \|f\|_{\ell^2(\mathbb{Z})}. \end{align*} \end{theo} Below, following the lead of \cite{[36]}, we will restrict to the case where \[ P(n) = n^d, \] as this eliminates some number-theoretic technicality while still capturing the essence of the problem. \subsubsection{Notation} Here and throughout we abbreviate the complex exponential $e(t) \coloneqq e^{2 \pi i t}$, so that we may express the Fourier transform in Euclidean space, and on the integers, respectively as \begin{align*} \hat{f}(\xi) &= \int_{\mathbb{R}} f(x) \cdot e(-\xi x) \ dx, \; \; \; g^{\vee}(x) = \int_{\mathbb{R}} g(\xi) \cdot e(\xi x) \ d\xi \\ \hat{f}(\beta) &= \sum_n f(n) \cdot e(-\beta n), \; \; \; g^{\vee}(n) = \int_{\mathbb{T}} g(\beta) \cdot e(\beta n) \ d\beta. \end{align*} We will let \begin{align*} \phi_k(t) \coloneqq 2^{-k} \cdot \phi(2^{-k} \cdot t) \end{align*} denote the usual $L^1$-normalized dyadic dilations, and for frequencies $\theta$, we let \begin{align}\label{e-mod} \text{Mod}_\theta g(x) \coloneqq e(\theta x) \cdot g(x) \end{align} so that \[ \widehat{\text{Mod}_\theta g}(\beta) = \hat{g}(\beta - \theta),\] and recall the Hardy--Littlewood Maximal operator \begin{align*} M_{\text{HL}} f(x) \coloneqq \sup_{r > 0} \, \frac{1}{2r} \int_{-r}^{r} |f(x-t)| \ dt \; \; \; \text{ or } \; \; \; \coloneqq \sup_{N \geq 0} \, \frac{1}{2N+1} \sum_{n= -N}^{N} |f(x-n)|; \end{align*} although we use the same notation to refer to both continuous and discrete maximal operator, it will be clear from context which formulation we use. We will let $[N] \coloneqq \{1,\dots,N\}$, and abbreviate $\sum_{n \leq N} \coloneqq \sum_{n=1}^N$. We will use the symbol $\mathbf{c}$ to denote suitably small constants, which remain bounded away from zero, and $\mathbf{C}$ to denote suitably large constants, which remain bounded above. If we need these constants to depend on parameters, we use subscripts, thus $\mathbf{c}_d$ is a constant that is small depending on $d$. We use $X = O(Y)$ to denote the statement that $|X| \leq \mathbf{C} \cdot Y$, and analogously define $X = O_d(Y).$ Finally, we will use the heuristic notation \[ f \; \; \; \textrm{``}=\textrm{''} \; \; \; g \] to denote moral equivalence: up to tolerable errors, $f$ and $g$ exhibit the same type of behavior. \section{Discrete Complications} Before beginning our discussion of Theorem \ref{2-MAINGOAL}, let us explain why we might expect this to be a challenging problem. For problems with a \enquote{linear} flavor, the discrete theory essentially mirrors the continuous theory \[ \sup_r \frac{1}{r} \int_0^r |f(x-t)| \ dt \; \; \; \textrm{``}=\textrm{''} \; \; \; \sup_N \frac{1}{N} \sum_{n=1}^N |f(x-n)| \] as can be seen by experimenting with functions of the form $F(\lfloor x \rfloor)$ and using dilation invariance of the real-variable maximal function to reduce attention to real variable functions that are constant on unit scales. The problems become dramatically more complicated once linearity is destroyed. In this case, we consider the simple example of the Hardy--Littlewood maximal function along the curve $t \mapsto t^d$. The continuous maximal function \begin{align}\label{e-M2} M f \coloneqq M_df &\coloneqq \sup_r \big| \frac{1}{r} \int_0^r f(x - t^d) \ dt \big| = \sup_r \big| \frac{1}{r} \int_0^{r^d} f(x-t) \ \frac{1}{d t^{1-1/d}} \ dt\big|, \end{align} is just a weighted version of $M_{\text{HL}}$ via the pointwise majorization \begin{multline}\label{e-convmhl} \frac{1}{r} \int_0^{r^d} |f(x-t)| \frac{1}{d t^{1-1/d}} \ dt \leq \sum_{j = 1}^{\infty} 2^{-j/d} \cdot \big( \frac{2^{j/d}}{r} \int_{2^{-j} \cdot r^d }^{2^{1-j} \cdot r^d} |f(x-t)| \frac{1}{d t^{1-1/d}} \ dt \big) \\ \leq \mathbf{C}/d \cdot \sum_{j = 1}^{\infty} 2^{-j/d} \cdot \big( \frac{2^j}{r^d} \int_{2^{-j} \cdot r^d}^{2^{1-j} \cdot r^d} |f(x-t)| \ dt \big) \leq \mathbf{C}/d \cdot \sum_{j=1}^{\infty} 2^{-j/d} \cdot M_{\text{HL}} f(x)\\ \leq \mathbf{C} \cdot M_{\text{HL}} f(x). \end{multline} On the other hand, no such trick is available in the study of \[ \mathscr{M} f(x) \coloneqq \mathscr{M}_d f(x) \coloneqq \sup_N \Big| \frac{1}{N} \sum_{n \leq N} f(x-n^d) \Big|,\] due to the presence of a smallest scale -- there is no real analogue for an infinitesimal change of variables in the discrete setting. Passing to the Fourier side actually highlights this difference. We can express both~$M$ and~$\mathscr{M}$ as a maximal operator taken over a lacunary sequence of Fourier multipliers, after exploiting non-negativity. Let us begin with $M$: \[ Mf(x) \coloneqq \sup_k \left| \big( V_k(\xi) \hat{f}(\xi) \big)^{\vee}(x) \right|,\] where \begin{align}\label{2-V} V_k(\xi) &\coloneqq \int_{0}^1 e(-\xi 2^{dk} t^d) \ dt, \end{align} so that \begin{align}\label{2-V0} V_k(\xi) = \int_{0}^1 e( - \xi 2^{dk} t) \frac{1}{d t^{1-1/d}} \ dt \eqqcolon \widehat{\mu}( 2^{dk} \xi) = \begin{cases} 1 + O \big(2^{dk} |\xi| \big) \\ O \big( (2^{dk} |\xi|)^{-1/d} \big), \end{cases} \end{align} as can be seen by Taylor expanding the exponential around the origin and using the principle of stationary phase (cleverly integrating by parts) for the second estimate. Above, we set \begin{align}\label{e:mu} \mu(t) \coloneqq \mu_d(t) \coloneqq \frac{1}{d t^{1-1/d}} \cdot \mathbf{1}_{(0,1]}. \end{align} What this analysis says is that the multipliers $V_k$ try very hard to look like $\widehat{\varphi_{dk}}$ for, say, a Schwartz function $\varphi \geq 0$ with $\widehat{\varphi}(0)=1$, as in this case, one has similar estimates: \begin{align} \widehat{\varphi_{dk}}(\xi) = \begin{cases} 1 + O \big(2^{dk} |\xi| \big) \\ O \big( (2^{dk} |\xi|)^{-100} \big) \end{cases} \end{align} (say); compare to \eqref{2-V}. Now, by replacing the weaker $\ell^\infty_k$-norm of $\{ (\mu_{dk} - \varphi_{dk})*f) \}$ with the stronger $\ell^2_k$-norm, we arrive at \begin{align}\label{2-e:SFNARG} Mf &\leq \sup_k |\varphi_{dk}*f| + \sup_k |(\mu_{dk} - \varphi_{dk} ) * f| \nonumber \\ & \qquad \leq \mathbf{C} \cdot M_{\text{HL}} f + \big( \sum_k | (\mu_{dk} - \varphi_{dk}) * f |^2 \big)^{1/2} \nonumber \\ & \qquad \qquad \eqqcolon \mathbf{C} \cdot M_{\text{HL}} f + S f, \end{align} where $Sf$ is a so-called \emph{square function}, which is highly-tailored to study $L^2$-based problems. Indeed, we use Plancherel to bound \begin{align}\label{e-sfxnarg} \| Sf \|_{L^2(\mathbb{R})}^2 &= \| \big( \sum_k | (\mu_{dk} - \varphi_{dk})*f |^2 \big)^{1/2} \|_{L^2(\mathbb{R})}^2 = \sum_k \| (\mu_{dk} - \varphi_{dk})*f \|_{L^2(\mathbb{R})}^2 \nonumber \\ & \qquad = \sum_k \| (V_k - \widehat{ \varphi_{dk}}) \cdot \hat{f} \|_{L^2(\mathbb{R})}^2 = \int \sum_k |V_k(\xi) - \widehat{\varphi_{dk}}(\xi)|^2 \cdot |\hat{f}(\xi)|^2 \ d\xi \nonumber \\ & \qquad \qquad \leq \sup_\xi \ \sum_k |V_k(\xi) - \widehat{\varphi_{dk}}(\xi)|^2 \cdot \| \hat{f} \|_{L^2(\mathbb{R})}^2 \\ & \qquad \qquad \qquad \leq \mathbf{C} \cdot \sup_\xi \ \sum_k \min \{ 2^{kd} |\xi|,(2^{kd} |\xi|)^{-1/d} \}^2 \cdot \| f \|_{L^2(\mathbb{R})}^2 \nonumber \\ & \qquad \qquad \qquad \qquad \leq \mathbf{C}_d \cdot \| f \|_{L^2(\mathbb{R})}^2, \nonumber \end{align} using the fact that $\widehat{\varphi_{dk}}(\xi)$ satisfies the same estimates as $V_k$, namely \eqref{2-V}, so that for $|\xi| \leq \mathbf{C} \cdot 2^{-dk} $ \[ V_k(\xi) - \widehat{\varphi_{dk}}(\xi) = \big( 1 + O(2^{dk}|\xi|) \big) - \big( 1 + O(2^{dk}|\xi|) \big) = O(2^{dk}|\xi|)\] and when $|\xi| > \mathbf{C} \cdot 2^{-dk}$ \[ V_k(\xi), \ \widehat{\varphi_{dk}}(\xi) = O( (2^{dk} |\xi|)^{-1/d} ).\] If we try the same trick with the discrete operator $\mathscr{M}$, \[ \mathscr{M} f(x) = \sup_k |K_k*f(x)|\] where \begin{align}\label{2-e:Kk} K_k(x) \coloneqq \frac{1}{2^k} \sum_{n \leq 2^k} \delta_{n^d}(x), \end{align} we can similarly express $\mathscr{M}$ as a maximal multiplier operator \[ \mathscr{M}f(x) = \sup_{k \geq 0} | \big( \widehat{K_k}(\beta) \hat{f}(\beta) \big)^{\vee}(x) |,\] where the multipliers $\widehat{K_k}$ are of a different form than the $\{V_k\}$: \[ \big\{ \widehat{K_k}(\beta) \coloneqq \frac{1}{2^k} \sum_{m\leq 2^k} e( - \beta m^d) \big\}_{k\geq 0}.\] Each multiplier is a \emph{Weyl sum}, and requires the so-called circle method of Hardy and Littlewood to analyze. As we will see below, each multiplier \[ \widehat{K_k}(\beta) \] is large and interesting whenever $\beta$ is \enquote{$k$-close} to a rational number with a \enquote{$k$-small} denominator, i.e.\ $\beta$ lives in a so-called \enquote{$k$-major arc}, and is \enquote{$k$-negligible} otherwise, when $\beta$ lives in the complementary \enquote{$k$-minor arc.} In particular, we see subtle \emph{arithmetic} issues that arise as we seek to analyze the relevant multipliers; contrast this to the Euclidean situation, where we were able to understand the multipliers purely according to the \emph{magnitude} of the frequency variable. In other words, whereas the analysis in the Euclidean setting is entirely dictated by the distance from the frequency variable to the distinguished zero-frequency -- multi-frequency issues arise as we seek to understand the multipliers $\widehat{K_k}(\beta)$. Essentially, the main work in bounding \[ \| \mathscr{M} f\|_{\ell^2(\mathbb{Z})} \leq \mathbf{C} \cdot \|f \|_{\ell^2(\mathbb{Z})},\] boils down to overcoming these multi-frequency complications. \section{Examples} In what follows, we can and will assume that $k$ is sufficiently large depending on $d$. To come to grips with \[ \mathscr{M} f \coloneqq \sup_k |K_k*f|, \] we first build some intuition by studying some examples: Whereas the dilation invariance of the real line allows one to study \eqref{e-M2} or $M_{\text{HL}}$ using examples that live at unit scales, there is no such dilation invariance on $\mathbb{Z}$. Rather, a rough analogue of \enquote{zooming in} is passing to an arithmetic progression. Of course, this analogy is not precise, as arithmetic progressions are characterized by both gap size and diameter. Accordingly, we begin by analyzing the behavior of \eqref{2-e:Kk} when applied to functions \begin{align}\label{2-ex:APtest} \varphi_{Q,N} \coloneqq \mathbf{1}_{Q \mathbb{Z}} \cdot \varphi(\cdot/N) \end{align} where $\varphi$ is a smooth bump function, and we think of $Q \leq N^{1/2}$; note the approximation \begin{align}\label{e:size} \| \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} \approx (N/Q)^{1/2}. \end{align} A common simplifying assumption when passing to arithmetic progressions is that the gap size be prime, as this eliminates various arithmetic technicalities, so we will do so below. With these reductions in mind, we begin to compute. \subsection{Example} For technical reasons, we will replace the full convolution operator $K_k$, with its smooth \enquote{top half,} in that for a smooth $\mathbf{1}_{[1,2]} \leq \phi \leq \mathbf{1}_{[1/2,4]}$, we consider \begin{align}\label{2-e:new} K_k' \coloneqq \sum_n \phi_k(n) \cdot \delta_{n^d}. \end{align} Using convexity, arguing as in \eqref{e-convmhl}, we can bound \[ \sup_k |K_k*f| \leq \mathbf{C} \cdot \sup_k |K_k'*f|, \] so there is no harm in this replacement. So, we will be interested in understanding \begin{align}\label{2-e:test} K_k'*\varphi_{Q,N}. \end{align} There are some scaling considerations that we quickly note: Since \begin{align*} | n^d - (n-1)^d | \geq 2^{k(d-1)} \end{align*} for $2^{k-1} < n \leq 2^{k+2}$, \eqref{2-e:test} becomes trivial if $N \leq 2^{k(d-1)}$, as in this case each element of the sum set \begin{align*} \{ n^d : 2^{k-1} < n \leq 2^{k+2} \} + \{ Qj : j \leq N/Q \} \end{align*} has $O(1)$ representations of the form $n^d + Qj$. On the other hand since $K_k'$ is supported on $[2^{dk+2}]$, we can assume that $N \leq 2^{dk+2}$, as convolution with $K_k'$ acts independently on intervals separated by $> 2^{dk+2}$. In particular, by translation invariance we can and will restrict to $|x| \leq \mathbf{C} \cdot 2^{dk}$, and assume that \begin{align}\label{2-e:ncomp} N \approx 2^{k(d-1 + \delta)} \end{align} for some $0 < \delta \leq 1$. If we use Fourier inversion, we may express \begin{align}\label{2-e:invconv} \eqref{2-e:test} = \int \widehat{K_k'}(\beta) \cdot \widehat{\varphi_{Q,N}}(\beta) \cdot e(\beta x) \ d\beta. \end{align} To determine the Fourier transform of $\varphi_{Q,N}$, we express the indicator function of $Q\mathbb{Z}$ as an exponential sum, \[ \mathbf{1}_{Q\mathbb{Z}}(n) = \frac{1}{Q} \sum_{A=1}^Q e(A/Q \cdot n),\] and compute \begin{align}\label{e-psum} \sum_n \frac{1}{Q} \sum_{A=1}^Q e(A/Q \cdot n) \cdot \varphi(n/N) \cdot e(-n \beta) = \frac{1}{Q} \sum_{A=1}^Q N \widehat{\varphi}(N(\beta - A/Q)) \end{align} by applying Poisson summation to the Schwartz function \[ t \mapsto \frac{1}{Q} \sum_{A=1}^Q e(A/Q \cdot t) \cdot \varphi(t/N) \cdot e(-t \beta) \] In particular, up to Schwartz-tail considerations, we are only interested in \[ \beta \in \mathbb{Z}/Q\mathbb{Z} + O(N^{\mathbf{c}_{d,\delta} -1}),\] as in the opposite case \[ \big| \sum_n \frac{1}{Q} \sum_{A=1}^Q e(A/Q \cdot n) \cdot \varphi(n/N) \cdot e(-n \beta) \big| \leq \mathbf{C}_{d,\delta} \cdot N^{-100} \] using the Schwartz decay of $\hat{\varphi}$, see \eqref{e-psum}. So, for such $\beta$, decomposing \[ \beta = A/Q + \eta, \; \; \; |\eta| \leq \mathbf{C} \cdot N^{\mathbf{c}_{d,\delta}-1},\] and $n = pQ + r$, we find that \begin{align*} \beta n^d &= (A/Q + \eta) \cdot (pQ +r)^d \\ & \qquad \equiv A/Q \cdot r^d + \eta \cdot (pQ)^d + O(|\eta| \cdot 2^{(d-1)k} \cdot Q) \mod 1, \end{align*} so that for such $\beta$ \begin{align} \widehat{K_k'}(\beta) &= \sum_n \phi_k(n) \cdot e(-\beta n^d) \nonumber \\ & \qquad = \sum_{pQ +r} \phi_k( pQ + r) \cdot e(-A/Q \cdot r^d) \cdot e(-\eta \cdot (pQ)^d) + O\big( \frac{2^{k(d-1)} \cdot Q}{N^{1-\mathbf{c}_{d,\delta}}}\big) \nonumber \\ & \qquad \qquad = \frac{1}{Q} \sum_{r=1}^Q e(-A/Q \cdot r^d) \cdot \sum_{pQ} Q\cdot \phi_k( pQ) \cdot e(-\eta \cdot (pQ)^d) + O\big( \frac{2^{k(d-1)} \cdot Q}{N^{1-\mathbf{c}_{d,\delta}}}\big), \end{align} using the smoothness of $\phi$. To drop this error terms, we stipulate that $Q \leq 2^{k \delta/2}$, see \eqref{2-e:ncomp}, so that for $|\beta-A/Q| \leq \mathbf{C} \cdot N^{\mathbf{c}_{d,\delta} - 1}$ we may express \begin{align} {K_k'}(\beta) = S(A/Q) \cdot \sum_{pQ} Q\cdot \phi_k( pQ ) \cdot e(-(\beta - A/Q) \cdot (pQ)^d) +\widehat{ \mathcal{E}_k}(\beta), \nonumber \end{align} where $S(A/Q)$ are \emph{complete Weyl sums}, and $\mathcal{E}_k$ is an error term with small Fourier coefficients. Explicitly: \begin{align*} S(A/Q) &\coloneqq \frac{1}{Q} \sum_{n \leq Q} e( - A/Q \cdot n^d ) = \frac{1}{Q} \sum_{m \leq Q} e( - A/Q \cdot m) \cdot |\{ n \leq Q : n^d \equiv m \mod Q \}| \end{align*} precisely captures the equidistribution properties of $n^d \mod Q$, quantified via the upper bound, \begin{align}\label{2-WEYL} |S(A/Q)| \leq \mathbf{C}_\epsilon \cdot Q^{\epsilon-\frac{1}{d}}, \; \; \; (A,Q) = 1, \;\;\; \epsilon > 0; \end{align} see \cite{[18]}. And, $\mathcal{E}_k$ is a negligible error term, in that \[ \| \widehat{\mathcal{E}_k} \|_{L^\infty(\mathbb{T})} \leq \mathbf{C} \cdot 2^{-k\delta/4} \] (provided $\mathbf{c}_{d,\delta}$ has been chosen appropriately), so that \begin{align*} \| \mathcal{E}_k* \varphi_{Q,N} \|_{\ell^2} = \| \widehat{\mathcal{E}_k} \cdot \widehat{\varphi_{Q,N}} \|_{L^2(\mathbb{T})} \leq \mathbf{C} \cdot 2^{-k \delta/4} \cdot \| \widehat{ \varphi_{Q,N} } \|_{L^2(\mathbb{T})} = \mathbf{C} \cdot 2^{-k \delta/4} \cdot \| { \varphi_{Q,N} } \|_{\ell^2(\mathbb{Z})}; \end{align*} in what follows, we will discard $\mathcal{E}_k$ from consideration. By a Riemann summation argument, comparing \begin{align*} Q \cdot \phi_k(Qp) \cdot e(-(pQ)^d (\beta - A/Q) ) &= \int_p^{p+1} Q \cdot \phi(Qt) \cdot e( - (\beta- A/Q) \cdot (tQ)^d ) \ dt \\ & \qquad + O\big(2^{- \mathbf{c}_{d,\delta} k} \cdot 2^{-k} \cdot Q \cdot (1 + 2^{-k} \cdot|Qp|)^{-100} \big) \end{align*} we approximate, up to pointwise errors of the order $2^{-\mathbf{c}_{d,\delta} k}$ \begin{align*} &\widehat{K_k'}(\beta) = S(A/Q) \cdot \int \phi(t) \cdot e(-2^{dk} (\beta - A/Q) \cdot t^d ) \ dt + O(2^{-\mathbf{c}_{d,\delta} k}) \\ & \qquad = S(A/Q) \cdot \int \phi'(s) \cdot e(-2^{dk} (\beta - A/Q) \cdot s) \ ds + O(2^{-\mathbf{c}_{d,\delta} k}) , \; \; \; \; \; \; \phi'(s) \coloneqq \frac{\phi(s^{1/d})}{ds^{1-1/d}} \\ & \qquad \qquad = S(A/Q) \cdot \widehat{\phi'}(2^{dk}(\beta - A/Q)) + O(2^{-\mathbf{c}_{d,\delta} k}) \end{align*} where $\phi'$ is Schwartz as well, see \eqref{2-e:new}. Consequently \begin{align} \eqref{2-e:invconv} \; \; \; \textrm{``}&=\textrm{''} \; \; \; \frac{1}{Q} \sum_{A \leq Q} S(A/Q) \int N \widehat{\varphi}(N(\beta - A/Q)) \cdot \widehat{\phi'}(2^{dk}(\beta - A/Q)) \cdot e(\beta x) \ d\beta, \nonumber \\ & \qquad = \frac{1}{Q} \sum_{A \leq Q} e(A/Q x) \cdot S(A/Q) \cdot \Phi(x), \nonumber \end{align} where we consolidate \[ \Phi(x) \coloneqq \int \varphi((x-2^{dk} s)/N) \cdot \phi'(s) \ ds\] so that \[ \hat{\Phi}(\beta) = N \hat{\varphi}(N \beta) \cdot \widehat{\phi'}(2^{dk} \beta),\] and thus $\| \Phi \|_{\ell^2(\mathbb{Z})} \approx \frac{N}{2^{dk/2}}$. Summing, we find that \begin{align}\label{e-comp2} \| K_k'* \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})}^2 \textrm{``}&=\textrm{''} \sum_x \big| \frac{1}{Q} \sum_{A \leq Q} e(A/Q x) \cdot S(A/Q) \big|^2 \cdot |\Phi(x)|^2 \nonumber \\ & \qquad = \frac{1}{Q^2} \sum_{A,B \leq Q} S(A/Q) \cdot \overline{S(B/Q)} \cdot \sum_x e(( A/Q - B/Q) x) \cdot |\Phi(x)|^2 \nonumber \\ & \qquad \qquad = \frac{1}{Q^2} \sum_{A,B \leq Q} S(A/Q) \cdot \overline{S(B/Q)} \cdot \widehat{ |\Phi|^2}(A/Q - B/Q). \end{align} Since \[ \widehat{|\Phi|^2} = \hat{\Phi}*\hat{\Phi}^*, \; \; \; \text{ where } \;\; \; g^*(x) \coloneqq \overline{g(-x)} \] is essentially supported inside $\{ |\xi| \leq \mathbf{C} \cdot N^{-1} \}$, we have \begin{align}\label{e-comp} \widehat{ |\Phi|^2}(A/Q - B/Q) = \delta_{A=B} \cdot \| \Phi \|_{\ell^2(\mathbb{Z})}^2 + O( (N/Q)^{-100} ) \end{align} as whenever $A \neq B$, $|A/Q - B/Q| \geq Q^{-1} \gg N^{-1}$. Substituting \eqref{e-comp} into \eqref{e-comp2}, we find that \begin{align*} \| K_k'*\varphi_{Q,N} \|_{\ell^2(\mathbb{Z})}^2 \textrm{``}&=\textrm{''} \frac{1}{Q^2} \sum_{A,B \leq Q} S(A/Q) \cdot \overline{S(B/Q)} \cdot \delta_{A=B} \cdot \| \Phi \|_{\ell^2(\mathbb{Z})}^2 \\ & \qquad = \frac{1}{Q^2} \sum_{A \leq Q} |S(A/Q)|^2 \cdot \| \Phi \|_{\ell^2(\mathbb{Z})}^2. \end{align*} By Hua's estimate \eqref{2-WEYL}, using the fact that $Q$ is prime, we bound \[ \frac{1}{Q} \sum_{A \leq Q} |S(A/Q)|^2 = \frac{1}{Q} + \frac{1}{Q} \sum_{A \leq Q-1} |S(A/Q)|^2 \leq \mathbf{C}_\epsilon \cdot ( 1/Q + Q^{\epsilon - 2/d})\] so that we find \begin{align*} \| K_k'*\varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} &\leq \mathbf{C}_\epsilon \cdot Q^{\epsilon - 1/d} \cdot Q^{-1/2} \cdot \frac{N}{2^{dk/2}} \\ & \qquad = \mathbf{C}_\epsilon \cdot Q^{\epsilon - 1/d} \cdot (N/2^{dk})^{1/2} \cdot (N/Q)^{1/2} \\ & \qquad \qquad \leq \mathbf{C}_\epsilon \cdot Q^{\epsilon - 1/d} \cdot (N/2^{dk})^{1/2} \cdot \| \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} \end{align*} The prefactor $(N/2^{dk})^{1/2}$ comes from scaling considerations; if we are interested in an estimate that is independent of scale, we arrive at the bound \[ \| K_k'* \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} \leq \mathbf{C}_\epsilon \cdot Q^{\epsilon - 1/d} \cdot \| \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})}.\] In particular, quantitatively, the lower bound \[ \| K_k'* \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} \geq \delta \cdot \| \varphi_{Q,N} \|_{\ell^2(\mathbb{Z})} \] automatically forces a bound on the \enquote{arithmetic complexity} of $\varphi_{Q,N}$ via the estimate \[ Q \leq \mathbf{C}_\epsilon \cdot \delta^{-d - \epsilon}.\] In particular, we arrive at the following heuristic: \begin{heuristic}\label{h-bour} The only obstruction to \[ \| K_k'*f \|_{\ell^2(\mathbb{Z})} \ll \| f \|_{\ell^2(\mathbb{Z})} \] are \enquote{low arithmetic complexity} considerations. \end{heuristic} \subsection{The Take-Away} By an application of Weyl's Lemma, a special case of which is stated below, Bourgain was able to make the previous Heuristic \ref{h-bour} rigorous, concluding that the above range of examples were typical: if we set \[ \Pi_k(\beta) \coloneqq \sum_{(A,Q) = 1, Q \leq 2^{\mathbf{c} k}} \widehat{\chi}(2^{(d- \mathbf{c})k}(\beta - A/Q)) \] for a Schwartz function $\chi$ with \[ \mathbf{1}_{[-1/4,1/4]} \leq \widehat{\chi} \leq \mathbf{1}_{[-1/2,1/2]}\] then \begin{align}\label{e-app} \widehat{K_k}(\beta) = \widehat{K_k}(\beta) \cdot \Pi_k(\beta) + O(2^{-\mathbf{c}' k}), \end{align} and similarly for $K_k'$. In particular, whenever $\Pi_k(\beta) \neq 1$, then necessarily the conclusion of Weyl's Lemma holds. \begin{lemm}[Weyl's Lemma, Special Case]\label{2-WEYLL} Suppose $|\beta - a/q| \leq \frac{1}{q\cdot N^{d - \mathbf{c}}}$ with \[ N^{\mathbf{c}} \leq q \leq N^{d - \mathbf{c}}.\] Then there exists some $\mathbf{c}_d > 0$ so that \[ |\frac{1}{N} \sum_{n \leq N} e( -\beta n^d ) | \leq \mathbf{C}_d \cdot N^{-\mathbf{c}_d}.\] \end{lemm} At this point, by recycling the reasoning from the previous example, one arrives at the physcial-space approximation \[ K_k' \; \; \; \textrm{``}=\textrm{''} \; \; \; L_k' \coloneqq \sum_{(A,Q) = 1, \ Q \leq 2^{\mathbf{c} k}} S(A/Q) \cdot \text{Mod}_{A/Q} (\chi_{(d-\mathbf{c})k}*\phi'_{dk}) \] in that \begin{align}\label{e-multclose} \| \widehat{K_k' - L_k'} \|_{L^{\infty}(\mathbb{T})} \leq \mathbf{C}_d \cdot 2^{- \mathbf{c}_d k} \end{align} and so the maximal function is bounded on $\ell^2(\mathbb{Z})$ \begin{align}\label{e-sfxn} \| \sup_k |(K_k' - L_k')*f| \|_{\ell^2(\mathbb{Z})}^2 \leq \sup_\beta \ \sum_k |\widehat{K_k'}(\beta) - \widehat{L_k'}(\beta)|^2 \cdot \| f \|_{\ell^2(\mathbb{Z})}^2 \leq \mathbf{C}_d \cdot \| f\|_{\ell^2(\mathbb{Z})}^2, \end{align} by arguing as in \eqref{e-sfxnarg}, inserting the quantitative bound \eqref{e-multclose} for the final inequality. Following Heuristic \ref{h-bour}, it makes sense to decompose $L_k'$ according to the approximate level-sets of the Gauss sums, and seek sufficient decay in $s$ on the $\ell^2(\mathbb{Z})$-norms of maximal functions \[ \sup_{k \geq \mathbf{C} s} |L_{k,s}'* f|, \] where \[ L_{k,s}'\coloneqq \sum_{A/Q \in \mathcal{R}_s} S(A/Q) \cdot \text{Mod}_{A/Q} (\chi_{(d-\mathbf{c})k}*\phi'_{dk}) \] for \begin{align}\label{e:Rs} \mathcal{R}_s \coloneqq \{ (A,Q) = 1, \ 2^{s-1} \leq Q < 2^s \}: \end{align} one bounds \[ \sup_{k} |L_k'*f| = \sup_k |\sum_{s \leq \mathbf{c} k} L_{k,s}'*f| \leq \sum_{s = 1}^{\infty} \sup_{k \geq \mathbf{C} s} |L_{k,s}'*f|.\] After a little slight of hand, using Plancherel's theorem to morally extract a geometrically decacying prefactor, \[ L_{k,s}'(x) \; \; \; \textrm{``}=\textrm{''} \; \; \; 2^{- \mathbf{c}_d s} \cdot \sum_{A/Q \in \mathcal{R}_s} \text{Mod}_{A/Q} (\chi_{(d-\mathbf{c})k}*\phi'_{dk})(x) \] it suffices to prove the following maximal inequality (possibly for a slightly different choice of $\chi$): \[ \| \sup_{k \geq \mathbf{C} s} | \big( \sum_{A/Q \in \mathcal{R}_s} \text{Mod}_{A/Q} \chi_k \big) * f| \|_{\ell^2(\mathbb{Z})} \leq \mathbf{C}_\epsilon \cdot 2^{\epsilon s} \cdot \| f\|_{\ell^2(\mathbb{Z})}, \; \; \; \epsilon > 0;\] by averaging over translations, exploiting the smoothness of $\{ \chi_k : k \geq \mathbf{C} s\}$ at physical scales $2^{\mathbf{C} s}$, it suffices to prove the analogous real-variable inequality: \[ \| \sup_{k \geq \mathbf{C} s} | \big( \sum_{A/Q \in \mathcal{R}_s} \text{Mod}_{A/Q} \chi_k \big) * f| \|_{L^2(\mathbb{R})} \leq \mathbf{C}_\epsilon \cdot 2^{\epsilon s} \cdot \| f\|_{L^2(\mathbb{R})}, \; \; \; \epsilon > 0;\] finally, by exploiting the dilation invariance of $\mathbb{R}$, matters at last reduce to establishing the following multi-frequency maximal estimate, see \cite{[9]}: \begin{prop}\label{2-MAINPROP} Suppose that $\Theta \coloneqq \{ \theta_1,\dots,\theta_N \}$ are $1$-separated, \[ \text{i.e. } \; \; \; |\theta_i - \theta_j| > 1, \; \; \; i \neq j.\] Then \begin{align}\label{e-mm} \| \mathcal{M}_{\Theta} f \|_{L^2(\mathbb{R})} \coloneqq \| \sup_{k \geq \mathbf{C}} | \sum_{n \leq N} ( \text{\emph{Mod}}_{\theta_n} \chi_k ) * f| \|_{L^2(\mathbb{R})} \leq \mathbf{C}_\epsilon \cdot N^{\epsilon} \cdot \| f\|_{L^2(\mathbb{R})}, \; \; \; \epsilon > 0. \end{align} \end{prop} The proof of Proposition \ref{2-MAINPROP}, which we will presently establish with a bound on the right side \eqref{e-mm} of the form $\log^2 N$, combines ideas from harmonic analysis, probability theory, and Banach space geometry, and was a creative novelty, having further applications to problems in pointwise ergodic theory \cite{[10],[13],[14]} and to problems in \emph{time frequency analysis}, for instance \cite{[15],[24]}. On the other hand, in some ways, the proof technique was highly constrained: there are only so many ways to control a maximal function on $L^2$, as we will explore below. \section{The Multi-Frequency Problem} \subsection{Preliminary Observations}\label{ss-pre} For what is to follow, we introduce that notation \begin{align}\label{e-Xi} \Xi_k f \coloneqq \sum_{n \leq N} (\text{{Mod}}_{\theta_n} \chi_k )*f, \end{align} so that we can express \[ \M_{\Theta} f = \sup_k |\Xi_k f|; \] here, as above, $\chi$ is a Schwartz function with \[ \mathbf{1}_{[-1/4,1/4]} \leq \hat{\chi} \leq \mathbf{1}_{[-1/2,1/2]}\] While the $\Xi_k$ have oscillatory kernels, they admit a natural projection structure, in that \[ \Xi_k \Xi_l = \Xi_l, \; \; \; k \geq l + 2, \] as can be seen by passing to Fourier space, see \eqref{e-fexp0} below; to avoid needless technicality, we will henceforth sparsify our set of scales into parity classes, and restrict our attention to a single class, so that whenever $k > k'$, we necessarily have $k \geq k' + 2$. As establishing Proposition \ref{2-MAINPROP} is an $L^2$-based problem, to better understand these convolution operators, we pass to Fourier space, and compute \begin{align}\label{e-fexp0} \widehat{\Xi_kf}(\xi) = \sum_{n \leq N} \widehat{\chi_k}(\xi - \theta_n) \cdot \hat{f}(\xi) \end{align} so that \[\widehat{\Xi_k}(\xi) = \sum_{n \leq N} \widehat{\chi_k}(\xi - \theta_n),\] after conflating the operator with its kernel, so that we can alternatively represent \begin{align}\label{e-fexp} \Xi_k f(x) &= \sum_{n \leq N} e(\theta_n x) \int \widehat{\chi_{k}}(\xi) \hat{f}(\xi + \theta_n) e( \xi x) \ d\xi \nonumber \\ & \qquad = \sum_{n \leq N} e(\theta_n x) \cdot \big( \chi_k*(\text{Mod}_{-\theta_n} f) \big)(x) \nonumber \\ & \qquad \qquad = \sum_{n \leq N} e(\theta_n x) \cdot \big( \chi_k*( \chi* \text{Mod}_{-\theta_n} f) \big)(x) \nonumber \\ & \qquad \qquad \qquad \eqqcolon \sum_{n \leq N} e(\theta_n x) \cdot (\chi_k*f_{\theta_n})(x), \end{align} using the fact that $k \geq \mathbf{C}$ and a brief argument with the Fourier transform to arrive at the reproducing identity \[ \chi_k* \chi = \chi.\] The advantage to passing to the formulation involving $\{ f_{\theta_n} \}$ is that the smoothing effect of convolution with $\chi_k$ has been \enquote{factored} out from the oscillatory exponentials $\{ e(\theta_n x) : n \}$. In particular, heuristically, on intervals of bounded size $\mathbf{C}$, as $k$ gets large only the exponentials should vary: if $|I| = \mathbf{C}$ is an interval of appropriate length, then whenever $x \in I$ and $2^k \gg \mathbf{C}$ \begin{align}\label{2-e:TAYLOR} I \ni x \mapsto \sum_{ n \leq N} e(\theta_nx) \cdot \phi_k*f_{\theta_n}(x) \; \; \; \textrm{``}=\textrm{''} \; \; \; \sum_{ n \leq N} e(\theta_nx) \cdot \phi_k*f_{\theta_n}(x_I) \end{align} for any $x_I$. In particular, if we subdivide $\mathbb{R}$ into (dyadic) intervals $\{ I : |I| = \mathbf{C} \}$ then on each interval we can estimate \begin{multline}\label{e-vv} \int_I |\Xi_k f(x)|^2 \ dx \; \; \; \textrm{``}=\textrm{''} \; \; \; \min_{x_I \in I} \, \int_I |\sum_{n} e(\theta_nx) \cdot \chi_k*f_{\theta_n}(x_I)|^2 \ dx \\ \leq \mathbf{C} \cdot \min_{x_I \in I} \, \sum_{n \leq N} |\chi_k*f_{\theta_n}(x_I)|^2 \cdot |I| \end{multline} as can be seen by bounding \begin{align*} \| \sum_{n \leq N} e(\theta_n x) \cdot a_n \|_{L^2(I)}^2 &\leq \| \sum_{n \leq N} e(\theta_n x) \cdot a_n \cdot \psi_I(x) \|_{L^2(\mathbb{R})}^2 = \| \sum_{n \leq N} a_n \cdot \widehat{\psi_I}(\xi - \theta_n) \|_{L^2(\mathbb{R})}^2 \\ & \qquad = \sum_{n \leq N} a_n \overline{a_m} \cdot \langle \widehat{\psi_I}(\cdot - \theta_n), \widehat{\psi_I}(\cdot - \theta_m) \rangle = \sum_{n \leq N} |a_n|^2 \cdot \| \widehat{ \psi_I} \|_{L^2(\mathbb{R})}^2 \\ & \qquad \qquad \leq \mathbf{C} \cdot \sum_{n \leq N} |a_n|^2 \cdot |I|, \end{align*} for $\mathbf{1}_I \leq |\psi_I| \leq \mathbf{C} \cdot (1 + \text{dist}(\cdot,I)/|I|)^{-100}$ with a Fourier transform compactly supported inside $[-1/2,1/2]$; this support constrain ensures that \[ \psi_I(\xi - \theta_n) \cdot \psi_I(\xi - \theta_m) \equiv 0, \; \; \; n \neq m,\] and since $|I| \geq \mathbf{C}$, the uncertainty principle is satisfied and such a $\psi_I$ can be chosen. Seeking uniformity, if we set \begin{align}\label{e-MAX} \F_{\Theta}(x)^2 \coloneqq \F_{\Theta,\mathbf{C}}(x)^2 \coloneqq \sum_{n \leq N} \sup_{k \geq \mathbf{C}} |\chi_k*f_{\theta_n}(x)|^2,\end{align} then we have a uniform \emph{norm} bound \begin{align}\label{e-unifnorm} \sup_{k \geq \mathbf{C}} \, \| \Xi_k f \|_{L^2(I)} \leq \mathbf{C} \cdot \min_{x_I \in I} \, \F_{\Theta}(x_I) \cdot |I|^{1/2} \leq \| \F_{\Theta} \|_{L^2(I)}, \end{align} and our task is to control \begin{align}\label{e-local} \| \M_{\Theta} f \|_{L^2(\mathbb{R})} = \big( \sum_{|I| = \mathbf{C}} \| \sup_{k \geq \mathbf{C}} \, |\Xi_k f |\|_{L^2(I)}^2 \big)^{1/2}, \end{align} where the previous calculation motivates us to split up the real line into intervals of \enquote{small} length and treat the contribution of $\M_{\Theta} f$ on each interval individually. The problem, therefore, boils down to controlling a supremum on $L^2$: we can localize and handle the contribution of each individual $\Xi_k$ via the bound \begin{align}\label{e-ortmax} \| \F_{\Theta} \|_{L^2(\mathbb{R})}^2 &= \sum_{n \leq N} \int \sup_{k \geq \mathbf{C}} |\chi_k*f_{\theta_n}(x)|^2 \leq \mathbf{C} \cdot \sum_{n \leq N} \int |f_{\theta_n}(x)|^2 \ dx = \mathbf{C} \cdot \sum_{n \leq N} \int |\widehat{f_{\theta_n}}(\xi)|^2 \ d\xi \nonumber \\ & \qquad = \mathbf{C} \cdot \sum_{n \leq N} \int |\hat{\chi}(\xi)|^2 \cdot |\widehat{f}(\xi + \theta_n)|^2 \ d\xi = \mathbf{C} \cdot \int \sum_{n \leq N} |\hat{\chi}(\xi - \theta_n)|^2 \cdot |\hat{f}(\xi)|^2 \ d\xi \nonumber \\ & \qquad \qquad \leq \mathbf{C} \cdot \sup_{\xi}\ \sum_{n \leq N} |\hat{\chi}(\xi - \theta_n)|^2 \cdot \|\hat{f} \|_{L^2(\mathbb{R})}^2 \leq \mathbf{C} \cdot \|{f} \|_{L^2(\mathbb{R})}^2, \end{align} using the separation of the frequencies $|\theta_n - \theta_m| > 1, \ n \neq m$, and the Hardy--Littlewood Maximal function in the first inequality. Our task is to pass from \emph{uniform} control of the $\{ \Xi_k : k \}$ to \emph{simultaneous} control, via $\mathcal{M}_{\Theta}$. This is a task that arises frequently -- but is often constrained, as we pause to explore. \subsection{Bounding a Supremum on $L^2$} Suppose that $\{ F_k \} \in L^2(X)$ is a collection of functions on a measure space, and we are interested in controling \begin{align}\label{2-e:L2MAX} \| F_* \|_{L^2(X)} \coloneqq \| \sup_k |F_k | \|_{L^2(X)}. \end{align} To the best of my knowledge, there are essentially four ways to control $F_*$ on $L^2$: \begin{itemize} \item Martingale/stopping time methods, like those used to prove Doob's Maximal Inequality from martingale theory, or the closely linked Hardy--Littlewood Maximal Inequality; \item Semigroup methods, like those used in the Hopf--Dunford--Schwartz Maximal Theorem, a special case of which implies dimension independent bounds on the maximal function $\sup_t |e^{t \triangle} f|$; \item $TT^*$ orthogonality methods, in which the supremum $F_*$ is realized as a particular linear operator, \begin{align*} T\{ F_k\} \coloneqq \sum_t \mathbf{1}_{E_k} F_k \end{align*} for $\{ E_k \}$ a disjoint partition of $X$, and then $T$ is composed with its adjoint, to efficiently compute \begin{align*} \| T\|_{L^2(X) \to L^2(X)} = \| T T^* \|_{L^2(X) \to L^2(X)}^{1/2}; \end{align*} this technique is common in oscillatory integral situations; and \item Entropy arguments, which leverage vestigial smoothness in the map $k \mapsto F_k(x)$ to control $F_*$. \end{itemize} Of the four methods, the oscillatory nature of the averages $\{ \Xi_k : k \}$ precludes a direct argument involving the first method, which gives a privileged role to the zero frequency (expectation); the serious failure of the identity \[ \Xi_k \Xi_l \neq \Xi_{k+l} \] precludes the second method. As for the $TT^*$ approach, if we linearize our supremum and consider the operator \begin{align*} T f(x) = \sum_k \mathbf{1}_{E_k}(x) \cdot \int \sum_{n \leq N} e(\theta_n x) \int \chi_k(x-y) e(-\theta_n y) f(y) \ dy, \end{align*} then the dual operator, $T^*$, is given by \begin{align*} T^*g(x) = \sum_r \sum_{n \leq N} e(\theta_n y) \cdot \int e(- \theta_n x) \cdot (g \cdot \mathbf{1}_{E_r})(x) \overline{\chi_k}(x-y) \ dx, \end{align*} and nothing is really gained by composition. Accordingly, we turn our attention to the entropic approach to bounding a supremum on $L^2$. \section{From Bourgain's Toolkit: The Entropic Method} This section reviews material over which Bourgain had total command at the time of \cite{[9]}; see \cite{[4],[5],[7],[8]} or even $\S 3$ of \cite[\S 3]{[9]} for representative examples, and $\S 6$ of \cite[\S 6]{[35]} for an excellent summary. In particular, I imagine that the information Bourgain gleaned from the above Subsection~\S \ref{ss-pre} was enough to guide him directly to the below Section~\S \ref{s-shape}. While the implementation of this approach in studying $\M_{\Theta}$ seems magical upon first reading \cite{[2]}, or in my case the exposition of \cite{[36]}, my hope is that after fully digesting the following material, the reader is able to understand the intution behind the way Bourgain came to his argument. The basic mechanism behind the entropic approach is to leverage \enquote{size} and \enquote{smoothness,} or rather \enquote{stickiness,} in the parameter space to control a supremum. In terms of our problem at hand, we have uniform control over each average $\Xi_k$ via \eqref{e-unifnorm}, and we search for some notion of smoothness/stickiness to complement this uniformity. To show off this interplay, we review the following example. \begin{lemm}[Sobolev Embedding Lemma]\label{2-l:SOBEMB} Suppose that $I$ is an interval, and that $F(x,\cdot)$ is absolutely continuous for almost every $x$ with an $L^2$ density. Then the following pointwise estimate holds: \begin{align} F_I(x) \coloneqq \sup_{t \in I} |F(x,t)| \leq \mathbf{C} \cdot |F(x,t_I)| + \mathbf{C} \cdot \left( \int_I |F(x,t)|^2 \ dt \right)^{1/4} \cdot \left( \int_I |\partial_t F(x,t)|^2 \ dt \right)^{1/4} \nonumber \end{align} for any $t_I \in I$. In particular, if \begin{align}\label{e-multbound} \sup_{t\in I} \| F(x,t) \|_{L^2_x} \leq A \; \; \; \text{ and } \; \; \; \sup_{t \in I} \| \partial_t F(x,t) \|_{L^2_x} \leq a \end{align} then \begin{align} \| \sup_{t \in I} |F(x,t)| \|_{L^2_x} \leq \mathbf{C} \cdot \big( A + (A a |I|)^{1/2} \big) \nonumber \end{align} \end{lemm} \begin{proof} For any $t \in I$, we may bound \begin{align} F(x,t)^2 = F(x,t_I)^2 + \int_{[t_I,t]} \partial_s \big( F(x,s)^2 \big) \ ds, \nonumber \end{align} so \begin{align}\label{e-sq} |F(x,t)|^2 &\leq |F(x,t_I)|^2 + 2 \int_{I} |F(x,t)| \cdot |\partial_t F(x,t)| \ dt \nonumber \\ & \qquad \leq |F(x,t_I)|^2 + 2 \left( \int_I |F(x,t)|^2 \ dt\right)^{1/2} \cdot \left( \int_I |\partial_t F(x,t)|^2 \ dt\right)^{1/2} \end{align} The right-hand side of \eqref{e-sq} is independent of $t$, so we can take the supremum in $t$ over the left-hand side of \eqref{e-sq} and then integrate in $x$, applying Cauchy--Schwarz to handle the $L^2$-based $t$-averages. \end{proof} While Lemma \ref{2-l:SOBEMB} is very cheap, it is surprisingly robust, and is very useful in studying maximal multiplier operators of the form \[ \sup_t |( \hat{f} \cdot \mathbf{m}(t \cdot) )^{\vee}|\] for bounded $m \in \mathcal{C}^1(\mathbb{R} \smallsetminus \{0\})$, see Lemma $3$ of \textcite[Lemma 3]{[4]}. It is helpful to discretize this argument: for each $v \geq 1$, define \begin{align*} \Lambda_v \coloneqq \big( 2^{-v} \cdot \mathbb{Z} \big) \cap I \end{align*} and define the parent of $t \in \Lambda_v$, $\rho(t)\in \Lambda_{v-1}$ to be the minimal element so that \begin{align*} B(t,2^{-v}) \cap B(\rho(t),2^{1-v}) \neq \emptyset, \; \; \; \; \; \; B(x,s) \coloneqq \{ y : |x-y| < s\}. \end{align*} Given $x$-a.e. continuity in $t \mapsto F(x,t)$, to study $F_I$, it suffices to bound \begin{align*} \sup_{t \ \in \ \bigcup_{v \geq 1} \Lambda_v} |F(x,t)|; \end{align*} by monotone convergence, it suffices to estimate, uniformly in finite subsets $T \subset \bigcup_{v \geq 1} \Lambda_v$, \begin{align*} F_T(x) \coloneqq \sup_{t \in T } |F(x,t)|. \end{align*} To do so, for each $t \in T$, we may telescope \begin{align*} t = (t - \rho(t)) + (\rho(t) - \rho^2(t)) + \dots + \rho_0(t) \end{align*} where $\rho^j$ is the $j$th composition of $\rho$, and $\rho_0(t)$ is the appropriate composition so that $\rho_0(t) \in \Lambda_{v_0}$ for some $v_0$ to be determined below. Note that the number of increments required to arrive at a representative $\rho_0 \in \Lambda_{v_0}$ is uniformly bounded, since $T$ is finite. We bound \begin{align*} F_T(x) &\leq \sup_{t \in \Lambda_{v_0}} |F(x,t)| + \sum_{v > v_0} \sup_{t \in \Lambda_{v}} | F(x,t) - F(x,\rho(t))| \\ & \qquad \leq \Big( \sum_{t \in \Lambda_{v_0}} |F(x,t)|^2 \Big)^{1/2} + \sum_{v > v_0} \Big( \sum_{t \in \Lambda_{v} } | F(x,t) - F(x,\varrho(t))|^2 \Big)^{1/2}, \end{align*} noting that all sums are in fact finite, and take $L^2_x$-norms, before optimizing over $v_0 \geq 0$ to derive the desired upper bound: \[ A \cdot |\Lambda_{v_0}|^{1/2} + a \cdot \sum_{v > v_0} |\Lambda_v|^{1/2} \cdot 2^{-v} \leq \mathbf{C} \cdot \big( A + (A a |I| )^{1/2} \big);\] see \eqref{e-multbound}. In both of these arguments, we relied upon smoothness in the map $t \mapsto F(x,t)$. Really, though, we were relying on decaying contributions from \begin{align}\label{e-sm0} \Lambda_v \ni t \mapsto |F(x,t) - F(x,\rho(t))| \end{align} as $v$ grows, and the controlled \emph{entropy estimate} \[ |\Lambda_v| \leq \mathbf{C} \cdot 2^v \cdot |I|; \] from the metric perspective, this estimate is measuring the extent to which elements in $I$ adhere to each other ---\enquote{stick together}--- at scales $2^{-v}$. Estimates like \[ \sup_{t \in I} \| \partial_t F(x,t) \|_{L^2_x} \leq a \] allow us to capture the smallness in \eqref{e-sm0} in an $L^2$-average sense. But, we may also pointwise approximate $\{ F(x,t) : t \in I \}$ more directly using a similar telescoping mechanism. For $T$ as above, consider the set \begin{align} X(x) \coloneqq X_T(x) \coloneqq \big\{ F(x,t) : t \in T \big\}, \end{align} and for each $v$ so that $2^{-v} \leq 2 \cdot \text{diam}(X(x)) $, define $\Lambda_v(x) \subset T$ to be a collection of times $t$ so that \begin{align} X(x) \subset \bigcup_{t \in \Lambda_v(x)} B\big( F(x,t), 2^{-v} \big) \end{align} subject to the constraint that $|\Lambda_v(x)|$ is minimal; the cardinality is essentially the $2^{-v}$-\emph{entropy} of the set. Now, let $V$ be so large that each element of $T$ is separated by $> 2^{1-V}$, so that $T = \Lambda_V(x)$. And define the parent of $t \in \Lambda_v(x)$, $\varrho(t)\in \Lambda_{v-1}(x)$ to be the minimal element so that \begin{align}\label{e-int} B\big( F(x,t), 2^{-v} \big) \cap B \big( F(x,\varrho(t)),2^{1-v} \big) \neq \emptyset. \end{align} For any $s \in T$, we may similarly bound \begin{align}\label{2-e:entexp} F_T(x) &\leq |F(x,s)| + \sum_{v} \sup_{t \in \Lambda_v(x)} |F(x,t) - F(x,\varrho(t))| \nonumber \\ & \qquad \leq |F(x,s)| + \sum_{v} \Big( \sum_{t \in \Lambda_v(x)} |F(x,t) - F(x,\varrho(t))|^2 \Big)^{1/2} \\ & \qquad \qquad \leq |F(x,s)| + \mathbf{C} \cdot \sum_v 2^{-v} \cdot |\Lambda_v(x)|^{1/2}, \nonumber \end{align} as we may bound \[ |F(x,t) - F(x,\rho'(t))| < 2^{-v} + 2^{1-v} < 2^{2-v} \] for each $t \in \Lambda_v(x)$ by \eqref{e-int}. It is convenient to change perspectives and bound \begin{align} \label{e-ent} |\Lambda_v(x)| \leq N_{2^{-v}}(x) \end{align} where \begin{multline* N_\lambda(x) \coloneqq \sup \Bigl\{ K : \text{ there exists a sequence of times }\Bigr. \\ \Bigl. t_0 < t_1 < \dots < t_K : |F(x,t_i) - F(x,t_{i-1})| > \lambda \Bigr\} \end{multline*} is a so-called (greedy) \emph{jump-counting function} at altitude $\lambda > 0$, which measures the extent to which $\{ F(x,t) : t \}$ \enquote{stick together} at the scale $\lambda$: \begin{align*} N_\lambda(x) < \infty \text{ for all $\lambda > 0$} &\iff \{ F(x,t) : t \} \text{ converges} \\ & \qquad \iff \{ F(x,t) : t \} \text{ \enquote{stick together} at all scales}. \end{align*} To establish \eqref{e-ent}, one majorizes the left hand side and minorizes the right hand by the $2^{1-v}$-\emph{entropy} of the set: the size of the largest set of $2^{1-v}$-separated points inside of $\{ F(x,t) : t \in I \}$. The reverse bound \[ N_{2^{-v}}(x) \leq |\Lambda_{v+1}(x)| \] is simpler, so there is nothing lost quantitatively from this change, as indeed \[ \sum_v 2^{-v} \cdot |\Lambda_v(x)|^{1/2} \leq \sum_v 2^{-v} \cdot N_{2^{-v}}(x)^{1/2} \leq \mathbf{C} \cdot \sum_v 2^{-v} \cdot |\Lambda_v(x)|^{1/2}. \] In many special examples, one is able to prove a uniform bound \begin{align}\label{e-unif} \sup_v \| 2^{-v} \cdot N_{2^{-v}}^{1/2} \|_{L^2} \leq \mathbf{C} \cdot A, \end{align} which says that in an $L^2$-averaged sense \begin{align*} N_{2^{-v}} \; \; \; \textrm{``}\leq \textrm{''} \; \; \; \mathbf{C} \cdot A^2 \cdot 2^{2v} \end{align*} i.e.\ that it costs a quadratically growing price to cover the collection of data $\{ F(x,t) : t \}$ by balls of a given radius. The following examples are representative. \subsubsection*{Entropic Example One} Consider the (discrete-time) averaging operators, \begin{align}\label{e:cond} F(x,t) = \mathbb{E}_k f(x) \cdot \mathbf{1}_{[2^k,2^{k+1})}(t) \end{align} where \begin{align} \mathbb{E}_k f (x) \coloneqq \sum_{|I| = 2^k \text{ dyadic}} \big( \frac{1}{|I|} \int_I f(t) \ dt \big) \cdot \mathbf{1}_I(x) \end{align} is the conditional expectation operator, projecting onto the $\sigma$-algebra generated by the dyadic intervals $\{ 2^k \cdot [n,n+1) : n \in \mathbb{Z} \}$. The \enquote{stopping-time} structure embedded in the definition of $N_{2^{-v}}$ allows one to neatly employ methods from dyadic harmonic analysis -- secretly, martingale techniques -- to establish \eqref{e-unif}. \subsubsection*{Entropic Example Two} To the extent that \[ \mathbb{E}_k f \; \; \; \textrm{``}=\textrm{''} \; \; \; \chi_k*f, \] in that both operators \enquote{blur} at spatial scales $2^{k}$, discarding \enquote{fine scale} information below this threshold, and preserving \enquote{coarse scale} properties that can be detected above this spatial threshold, one can combine a {square function argument} with further orthogonality arguments, in particular the quantitative bound \begin{align}\label{e-orth} \| \mathbb{E}_k \psi_l - \chi_k*\psi_l \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot 2^{- |k-l|/2} \cdot \| \psi_l \|_{L^2(\mathbb{R})}, \; \;\; \psi_l \coloneqq \chi_l - \chi_{l-1},\end{align} to extend \eqref{e-unif} to the case where \begin{align}\label{e-condavg} F(x,t) = f*\chi_k(x) \cdot \mathbf{1}_{[2^k,2^{k+1})}(t), \end{align} and similarly with $\chi$ replaced with any other Schwartz function with $\hat{\chi}(0) =1$. These ideas first appeared in \cite{[20]}. \subsection{The Jump-Counting Approach to Entropy} While the uniform estimate \eqref{e-unif} is a priori insufficient to control the full supremum over $t \in T$, this entropic argument yields a remarkable strengthening over the trivial estimate \[ \| F_T \|_{L^2_x} \leq \| S_T \|_{L^2_x} \leq |T|^{1/2} \cdot A,\] where we set \[ S_T(x)^2 \coloneqq \sum_{t \in T} |F(x,t)|^2. \] In particular, for any $t \in T$, \begin{align}\label{2-e:jumps} F_T(x) &\leq |F(x,t)| + \mathbf{C} \cdot \sum_v 2^{-v} \cdot N_{2^{-v}}(x)^{1/2} \nonumber \\ & \qquad \leq |F(x,t)| + \frac{S_T(x)}{|T|^{1/2}} + \sum_{v: \frac{S(x)}{|T|^{1/2}} \leq 2^{-v} \leq 2 \cdot S(x) } 2^{-v} \cdot N_{2^{-v}}(x)^{1/2} \end{align} so that, essentialy, the uniform bound \eqref{e-unif} implies\footnote{There is a natural comparison between this estimate and the abstract Hilbert space \emph{Rademacher--Menshov} inequality, which also states that \begin{align}\label{e-logloss} \| \sup_{n \leq N} |F(x,n)| \|_{L^2} \leq \mathbf{C} \cdot \log N \cdot A \end{align} under orthogonality constrains on the functions $\{ F(\cdot,n) : n \}$. The analogy is at the level of proof and is that of Lebesgue integration to Riemann integration: the entropy bound organizes the data $ \{ F(x,n) : n \} $ according to its image, while the Rademacher--Menshov inequality is proven by analogously organizing the data according to the domain of the time parameter $n \in [N]$.} \begin{align}\label{e-genRM} \| F_T \|_{L^2_x} \; \; \; \textrm{``}\leq\textrm{''} \; \; \; \mathbf{C} \cdot \log |T| \cdot A. \end{align} In point of fact, as we will see below, \eqref{e-genRM} often holds with a $\log^2 |T|$ prefactor. \subsection{Introduction to Variation} As the difficulty with the heuristic justification for \eqref{e-logloss} shows, see \eqref{2-e:jumps}, a major problem is that, in general, we cannot expect a uniform bound on \[ x \mapsto \sup_v \ 2^{-v} \cdot N_{2^{-v}}(x)^{1/2},\] see \cite{[22]} or \cite{[33]}. To get around this issue, one instead sacrifices the power $1/2 \to 1/r, \ r > 2$ and introduces the so-called \emph{$r$-variation} of $\{ F(x,t) : t \in I\}$ \begin{align} \mathcal{V}^r(x) \coloneqq \mathcal{V}^r_F(x) \coloneqq \sup \big( \sum_i |F(x,t_i) - F(x,t_{i-1})|^r \big)^{1/r}, \end{align} where the supremum runs over all finite increasing subsequences inside of $I$. Unlike the jump counting function, the $r$-variation operators crucially satisfies a triangle inequality, \[ \mathcal{V}^r_{F+G} \leq \mathcal{V}^r_F + \mathcal{V}^r_G, \] and one may bound \[ \sup_v \ 2^{-v} \cdot N_{2^{-v}}(x)^{1/r} \leq \mathcal{V}^r(x), \] which is important, as the $\mathcal{V}^r$ operators often admit a strong $L^2$-theory. In particular, if $|T| = N$, so that $N_\lambda \leq N$ for all $\lambda$, we may bound \begin{equation}\label{e-interptrick} 2^{-v} \cdot N_{2^{-v}}^{1/2} \leq 2^{-v} \cdot N_{2^{-v}}^{1/r} \cdot N_{2^{-v}}^{1/2 - 1/r} \leq N^{1/2 - 1/r} \cdot \mathcal{V}^r \end{equation} and if we set $r = 2 + \frac{\mathbf{c}}{\log N}$, then we eliminate the pre-factor of $N^{1/2-1/r}$ and end up with the bound \begin{align*} 2^{-v} \cdot N_{2^{-v}}^{1/2} \leq \mathbf{C} \cdot \mathcal{V}^r, \; \; \; \; \; \; r = 2 + \frac{\mathbf{c}}{\log N}. \end{align*} Substituting into \eqref{2-e:jumps}, we bound, for any $t \in T$ \[ F_T(x) \leq |F(x,t)| + \frac{S_T(x)}{N^{1/2}} + \sum_{v : \frac{S_T(x)}{N^{1/2}} \leq 2^{-v} \leq S_T(x)} \mathcal{V}^r(x) \leq |F(x,t)| + \frac{S_T(x)}{N^{1/2}} + \log N \cdot \mathcal{V}^r(x),\] which says that \[ \| F_T \|_{L^2} \leq \mathbf{C} \cdot \big( A + \log N \cdot \| \mathcal{V}^r \|_{L^2} \big), \; \; \; \; \; \; r = 2 + \frac{\mathbf{c}}{\log N}, \] so control over the $r$-variation operators leads, essentially, to \eqref{e-genRM}. The relevant estimates for $\mathcal{V}^r$ derive, in many cases, from the following inequality, classically used as a convergence result in martingale theory \cite{[26]}; see \cite{[21]} for a discussion, and \cite{[17]} or \cite{[32]} for more exotic examples. \begin{prop} [L\'{e}pingle's Inequality, Special Case] \label{p-LEP} The following estimate holds in the conditional expectation case \eqref{e:cond}: \[ \| \mathcal{V}^r \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot \frac{r}{r-2} \cdot A. \] \end{prop} Proposition \ref{p-LEP} extends similarly to the case of convolution operators \eqref{e-condavg}: by combining a square function argument \begin{align}\label{e-trivar} \mathcal{V}^r( \chi_k*f: k) &\leq \mathcal{V}^r( \mathbb{E}_k f : k) + \mathcal{V}^r( \chi_k*f - \mathbb{E}_k f:k) \nonumber \\ & \qquad \leq \mathcal{V}^r( \mathbb{E}_k f:k) + 2 \cdot \big( \sum_k |\chi_k*f - \mathbb{E}_k f|^2 \big)^{1/2} \end{align} with the estimates \eqref{e-orth} introduced above, one can use orthogonality techniques and Proposition \ref{p-LEP} to bound both terms in \eqref{e-trivar}. Above, we define the discrete-time variation \[ \mathcal{V}^r(f_k : k)(x) \coloneqq \sup \big( \sum_i |f_{k_i}(x) - f_{k_{i-1}}(x)|^r \big)^{1/r} \] where the supremum runs over all finite subsequences $\{ k_i \}$. While the $\mathcal{V}^r$ operators are more delicate than the pertaining maximal functions, \[ F_T(x) \leq |F(x,t)| + \mathcal{V}^r(x) \] for any $t \in T$, they are essentially of even strength, in that we have the following heuristic: \begin{heuristic}\label{heur} In either case \eqref{e:cond} or \eqref{e-condavg}, it is very hard for $\mathcal{V}^r$ to be large when both $F_I$ and the square function \[ S_I(x) \coloneqq \big( \sum_{k: 2^k \in I} |F(x,2^k) - F(x,2^{k+1})|^2 \big)^{1/2} \] are small: $ \mathcal{V}^r \; \; \; \textrm{``}\approx\textrm{''} \; \; \; \frac{r}{r-2} \cdot (F_I + S_I) \; \; \; \textrm{``}\approx\textrm{''} \; \; \; \frac{r}{r-2} \cdot F_I, \ \frac{r}{r-2} \cdot S_I$.\footnote{The close link between maximal function and square function in either context \eqref{e:cond} or \eqref{e-condavg} is classical; see e.g.\ \textcite[\S 1]{[34]}. The relationship between $\mathcal{V}^r, F_I, S_I$ in the case \eqref{e:cond} is via the following good-$\lambda$ inequality: \[ |\{ \mathcal{V}^r > \mathbf{C} \lambda, F_I,S_I \leq \gamma \lambda \}| \leq \mathbf{C} \cdot \big( \frac{r}{r-2} \big)^2 \cdot \gamma^2 \cdot |\{ \mathcal{V}^r > \lambda \} |, \; \;\; r > 2;\] see \textcite[\S 3]{[23]}. } \end{heuristic} Finally, and significantly, given our vector-valued perspective on studying \[ \{ f_{\theta_1},\dots,f_{\theta_N} \}, \] see \eqref{e-vv}, we observe that just as do the maximal function and square function, the $\mathcal{V}^r$ operators interact well in the vector-valued setting: for sequence-space valued functions $\vec{F} = (F_1,F_2,\dots)$ \begin{align}\label{e-vrvec} \mathcal{V}^r_{\vec{F}}(x) \coloneqq \sup \big( \sum_i \| F_n(x,t_i) - F_n(x,t_{i-1}) \|_{\ell^2_n}^r \big)^{1/r} \leq \| \mathcal{V}^r_{F_n}(x) \|_{\ell^2_n}, \end{align} by Minkowski's inequality for sequence spaces (as $r > 2$), where the supremum runs over finite increasing subsequences of $\{t_i\}$.\\ With this section in mind, we begin to see how Bourgain developed his argument. \section{The Argument Takes Shape}\label{s-shape} Bourgain's task was to establish \eqref{e-local}, where we are only thinking about the case where $2^k$ is very large relative to $|I| = \mathbf{C}$. By monotone convergence, we can restrict to finitely many scales $k \in T \subset \mathbb{N} \cap [\mathbf{C},\infty)$. We focus on the case of a single interval. Guided by our heuristic analysis, we let $x_I \in I$ be a point to be determined later, and seek to bound \[ \| \sup_k | \sum_{n\leq N} e(\theta_n x) \cdot \chi_k*f_{\theta_n}(x_I)| \|_{L^2_x(I)}. \] As discussed above -- we are essentially forced to use the entropic approach. Specifically, we set \begin{align}\label{e-ftheta} X(x_I) \coloneqq \{ \chi_k*\vec{f_{\Theta}}(x_I) \coloneqq \big( \chi_k*f_{\theta_1}(x_I),\dots,\chi_k*f_{\theta_N}(x_I) \big) : k \} \end{align} and let $\vec{N}_{\lambda}$ denote the appropriate jump-counting function at altitude $\lambda$ with respect to the sequence space norm, $\ell^2([N])$, \begin{align* \vec{N}_\lambda(x) \coloneqq \sup \Big\{ K &: \text{ there exists a sequence of times } \mathbf{C} \leq k_0 < k_1 < \dots < k_K :\\ & \qquad \| \chi_{k_i}*f_{\theta_n}(x) - \chi_{k_{i-1}}*f_{\theta_n}(x) \|_{\ell^2_{n \in [N]}} > \lambda \Big \}. \end{align*} By arguing as above we can bound \begin{multline}\label{e-L2close} \| \sup_k | \sum_{n\leq N} e(\theta_n x) \cdot \chi_k*f_{\theta_n}(x_I)| \|_{L^2_x(I)} \\ \leq | \Xi_{k_0} *f(x_I)| \cdot |I|^{1/2} + \sum_v \| \max_{k \in \Lambda_v(x_I)} |\sum_{n \leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)| \|_{L^2_x(I)} \end{multline} for any $k_0 \geq \mathbf{C}$, see \eqref{e-Xi}. The first term is of a simpler nature, so we will temporarily suppress it; and for each individual $v$ we may bound \begin{align}\label{e-L2bound} &\| \max_{k \in \Lambda_v(x_I)} |\sum_{n \leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)| \|_{L^2_x(I)} \nonumber \\ & \qquad \leq \| \big( \sum_{k \in \Lambda_v(x_I)} |\sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)|^2 \big)^{1/2} \|_{L^2_x(I)} \nonumber \\ & \qquad \qquad \leq \big( \sum_{k \in \Lambda_v(x_I)} \| \sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I) \|_{L^2_x(I)}^2 \big)^{1/2} \nonumber \\ & \qquad \qquad \qquad \leq \mathbf{C} \cdot 2^{-v} \cdot \vec{N}_{2^{-v}}(x)^{1/2} \cdot |I|^{1/2} \end{align} by arguing as in \eqref{2-e:entexp}, applying \eqref{e-vv} to bound \[ \| \sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I) \|_{L^2_x(I)} \leq \mathbf{C} \cdot 2^{-v} \cdot |I|^{1/2} \] uniformly for $k \in \Lambda_v(x_I)$. Above, $\{ \Lambda_v(x_I) : v \}$ are sets of times that are minimal with respect to the property that \[ X(x_I) \subset \bigcup_{k \in \Lambda_v(x_I)} B_{\ell^2([N])}\big( \chi_k*\vec{f_{\Theta}}(x_I) , 2^{-v} \big), \] where $B_{\ell^2([N])}(\vec{v},r)$ is the ball of radius $r$ centered at $\vec{v} \in \ell^2([N])$ with respect to the sequence-space norm $\ell^2([N])$, and the parent function, $\varrho$, is as above. The issue is the potential explosion \[ \vec{N}_{2^{-v}}(x_I) \to \infty \text{ as } v \to \infty, \] and there is no a priori way to rule out this enemy; if there were, there would be no logarithmic loss in \eqref{e-genRM}. The clever insight that Bourgain had that allowed him to push past this abstract issue was just Cauchy--Schwarz: we bound \[ |\sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)|\leq N^{1/2} \cdot \big( \sum_{n \leq N} |\big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)|^2 \big)^{1/2} \leq \mathbf{C} \cdot N^{1/2} \cdot 2^{-v} \] uniformly for $k \in \Lambda_v(x_I)$, which yields the cheap bound \begin{align*} \| \max_{k \in \Lambda_v(x_I)} |\sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)| \|_{L^2_x(I)} \leq \mathbf{C} \cdot 2^{-v} \cdot N^{1/2} \cdot |I|^{1/2}. \end{align*} Altogether, Bourgain had obtained the bounds \begin{multline*} \| \max_{k \in \Lambda_v(x_I)} |\sum_{n\leq N} e(\theta_n x) \cdot \big( \chi_k - \chi_{\varrho(k)} \big) *f_{\theta_n}(x_I)| \|_{L^2_x(I)} \\ \leq \mathbf{C} \cdot 2^{-v} \cdot \min\{ \vec{N}_{2^{-v}}(x_I)^{1/2}, N^{1/2} \} \cdot |I|^{1/2}, \end{multline*} see \eqref{e-L2bound}, which he cleverly interpolated, as per \eqref{e-interptrick}, \begin{align*} 2^{-v} \cdot \min\{ \vec{N}_{2^{-v}}(x_I)^{1/2}, N^{1/2} \} &\leq 2^{-v} \cdot \vec{N}_{2^{-v}}(x_I)^{1/r} \cdot N^{1/2-1/r} \\ & \qquad \leq N^{1/2 - 1/r} \cdot \mathcal{V}^r_{\vec{f_{\Theta}}}(x_I) \leq \mathbf{C} \cdot \mathcal{V}^r_{\vec{f_{\Theta}}}(x_I) \; \; \; \; \; \; r = 2 + \frac{\mathbf{c}}{\log N} \end{align*} see \eqref{e-vrvec} and \eqref{e-ftheta}, obtaining a $v$-independent term on the right. Inserting this bound and arguing as in the heuristic analysis \eqref{2-e:jumps}, \begin{align}\label{e-atlast} \eqref{e-L2close} &\leq \mathbf{C} \cdot \sum_{ v : 2^{-v} \leq \F_{\Theta}(x_I)} 2^{-v} \cdot \min\{ \vec{N}_{2^{-v}}(x_I)^{1/2}, N^{1/2} \} \cdot |I|^{1/2} \nonumber \\ & \leq \mathbf{C} \sum_{v : 2^{-v} \leq \F_{\Theta}(x_I)/N^{1/2}} 2^{-v} \cdot N^{1/2} \cdot |I|^{1/2} + \mathbf{C} \sum_{v : \F_{\Theta}(x_I)/N^{1/2} \leq 2^{-v} \leq 2 \cdot \F_{\Theta}(x_I)} \mathcal{V}^{r}_{\vec{f_{\Theta}}}(x_I) \cdot |I|^{1/2} \nonumber \\ & \qquad \qquad \leq \mathbf{C} \cdot \F_{\Theta}(x_I) \cdot |I|^{1/2} + \mathbf{C} \cdot \log N \cdot \mathcal{V}^{r}_{\vec{f_{\Theta}}}(x_I) \cdot |I|^{1/2}, \; \; \; \; \; \; r = 2 + \frac{\mathbf{c}}{\log N}. \end{align} And, at last, after choosing $x_I$ carefully, we bound \[ \| \M_{\Theta} f \|_{L^2(I)} \leq \mathbf{C} \cdot \| \F_\Theta \|_{L^2(I)} + \mathbf{C} \cdot \log N \cdot \| \mathcal{V}^r_{\vec{f_\Theta}} \|_{L^2(I)}, \] which says that in a scale-$\mathbf{C}$, $L^2$-averaged sense, at all locations one has the following inequality \[ \M_{\Theta} f \; \; \; \textrm{``}\leq\textrm{''} \; \; \; \F_\Theta + \log N \cdot \mathcal{V}^r_{\vec{f_\Theta}}, \; \; \; \; \; \; r= 2 + \frac{\mathbf{c}}{\log N}.\] In other words, up to logarithmic error, the vector valued maximal function and the vector-valued variation control $\M_{\Theta}$. And, square-summing over $\{ |I| = \mathbf{C} \}$, taking into account the related, convolution-based version of L\'{e}pingle's Inequality, Proposition \ref{p-LEP}, leads to the bound \begin{align*} \| \M_{\Theta} f \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot( 1+ \log N \cdot \frac{r}{r - 2} ) \cdot \| f \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot( 1+ \log^2 N) \cdot \| f\|_{L^2(\mathbb{R})}, \end{align*} which satisfies \eqref{e-fexp}. Guided by this intuition, we turn to the rigorous proof. \section{The Proof of Proposition \ref{2-MAINPROP}, The Multi-Frequeny Maximal Inequality} Motivated by our previous outline, we will seek to prove the following estimate: \begin{align*} \| \M_{\Theta} f \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot \log^2 N \cdot \| f \|_{L^2(\mathbb{R})}. \end{align*} Accordingly we will restrict our attention only to scales $k \geq \mathbf{C} \log^2 N$, and just handle the complementary cases using a square function argument \begin{multline*} \| \sup_{\mathbf{C} \leq k \leq \mathbf{C} \cdot \log^2 N} |\Xi_k f| \|_{L^2(\mathbb{R})} \leq \| \big( \sum_{\mathbf{C} \leq k \leq \mathbf{C} \cdot \log^2 N} |\Xi_k f|^2 \big)^{1/2} \|_{L^2(\mathbb{R})} \\ \leq \mathbf{C} \cdot \log N \cdot \sup_k \, \| \Xi_k f \|_{L^2(\mathbb{R})} = \mathbf{C} \cdot \log N \cdot \sup_k \, \| \widehat{\Xi_k f} \|_{L^2(\mathbb{R})} \\ \leq \mathbf{C} \cdot \log N \cdot \sup_k \, \|\widehat{ \Xi_k } \|_{L^{\infty}(\mathbb{R})} \cdot \| \hat{f} \|_{L^2(\mathbb{R})} \leq \mathbf{C} \cdot \log N \cdot \| f\|_{L^2(\mathbb{R})}, \end{multline*} as \[ \sup_k \sup_\xi |\widehat{\Xi_k}(\xi)| \leq 1, \] see \eqref{e-fexp0}. We accordingly re-define $\F_{\Theta} = \F_{\Theta,\log^2 N}$, see \eqref{e-MAX}, and observe the inherited smoothness \begin{multline}\label{e-lip} |\F_{\Theta}(x) - \F_{\Theta}(y)| \leq \mathbf{C} \cdot \sum_{|I| = 2^k \geq \log^2 N} \sum_{n \leq N} |\chi_k*f_{\theta_n}(x) - \chi_k*f_{\theta_n}(y) | \\ \leq \mathbf{C} \cdot N \cdot \sum_{k \geq \log^2 N} ( |x-y| \cdot 2^{-k} ) \cdot M_{\text{HL}} f(x) \leq \mathbf{C} \cdot |x-y| \cdot N^{-100} \cdot M_{\text{HL}} f(x), \end{multline} (say), which says that $\F_{\Theta}$ is very smooth at scales $|I| = \mathbf{C}$. Above, we used the bound \[ | \partial \chi_k(x)| \leq \mathbf{C} \cdot 2^{-k} \cdot 2^{-k} \cdot (1 + 2^{-k}\cdot |x|)^{-100}. \] This excision of scales allows us to be a little less delicate than Bourgain in making rigorous the heuristic \eqref{2-e:TAYLOR}: whereas Bourgain used a so-called \emph{best constant argument}, we will just use the following estimate, which is effective for small intervals relative to the scales $k \geq \mathbf{C} \cdot \log^2 N$: \begin{align*} \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_{\theta_n} (x) &= \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_{\theta_n}(x_I) + O\big( \frac{{N} \cdot |I|}{2^k} \cdot M_{\text{HL}} f (x) \big) \\ & \qquad = \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_{\theta_n}(x_I) + O\big(2^{-k/2} \cdot M_{\text{HL}} f(x) \big) \end{align*} for any $x_I \in I$, certainly provided that $|I| \leq N^{\mathbf{C}}$. In particular, for any $x \in I$, with $|I| = \mathbf{C}$, we may bound \begin{align*} \sup_{k \geq \mathbf{C} \cdot \log^2 N} |\Xi_k f(x)| \leq \sup_{k \geq \mathbf{C} \cdot \log^2 N} \big| \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_n(x_I) \big| + O\big( \sum_{k \geq \mathbf{C} \cdot \log^2 N} 2^{-k/2} \cdot M_{\text{HL}} f(x) \big), \end{align*} so that for each $I$ we may bound \begin{align*} \| \sup_{k \geq \mathbf{C} \cdot \log^2 N} |\Xi_k f(x)| \|_{L^2(I)} &\leq \mathbf{C} \cdot \min_{x_I \in I} \| \sup_{k \geq \mathbf{C} \cdot \log^2 N} \big| \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_n(x_I) \big| \|_{L^2(I)} \\ & \qquad + \mathbf{C} \cdot N^{-100} \cdot \| M_{\text{HL}} f \|_{L^2(I)} \end{align*} (say). Temporarily dropping the term involving $M_{\text{HL}}$ as inessential, we consider the first term \begin{align*} \| \sup_{k \geq \mathbf{C} \cdot \log^2 N} \big| \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_n(x_I) \big| \|_{L^2(I)}, \end{align*} which we bound using the entropic approach, see \eqref{e-atlast}, \begin{align*} &\| \sup_{k \geq \mathbf{C} \cdot \log^2 N} \big| \sum_{n \leq N} e(\theta_nx) \cdot \chi_k*f_n(x_I) \big| \|_{L^2(I)} \\& \qquad \leq \mathbf{C} \cdot \big( \F_\Theta(x_I) \cdot |I|^{1/2} + \log N \cdot \mathcal{V}^r_{\vec{f_{\Theta}}}(x_I) \cdot |I|^{1/2} \big), \\ & \qquad \qquad \leq \mathbf{C} \cdot \big( \| \F_\Theta \|_{L^2(I)} + \log N \cdot \| \mathcal{V}^r_{\vec{f_{\Theta}}} \|_{L^2(I)} + N^{-100} \cdot \| M_{\text{HL}} f \|_{L^2(I)} \big), \end{align*} after choosing $x_I$ to minimize $\mathcal{V}^r_{\vec{f_{\Theta}}}$ on $I$, and using the smoothness \[ \F_{\Theta}(x_I) = \F_{\Theta}(x) + O(N^{-100} \cdot M_{\text{HL}}f(x) )\] to bound \[ \F_{\Theta}(x_I) \cdot |I|^{1/2} = \| \F_{\Theta} \|_{L^2(I)} + O\big( N^{-100} \cdot \| M_{\text{HL}} f \|_{L^2(I)} \big).\] In particular, we have bounded \begin{align*} \| \sup_{k \geq \mathbf{C} \cdot \log^2 N} | \Xi_k f | \|_{L^2(I)} \leq \mathbf{C} \cdot \big( \| \F_\Theta \|_{L^2(I)} + \log N \cdot \| \mathcal{V}^r_{\vec{f_{\Theta}}} \|_{L^2(I)} + N^{-100} \cdot \| M_{\text{HL}} f \|_{L^2(I)} \big) \end{align*} where $r = 2 + \frac{\mathbf{c}}{\log N}$, so square-summing over $|I| = \mathbf{C}$ yields, at last, the bound \begin{align*} &\| \M_{\Theta} f \|_{L^2(\mathbb{R})} \leq \big( \sum_{|I| = \mathbf{C}} \| \sup_{ k \geq \mathbf{C} \cdot \log^2 N} |\Xi_k f| \|_{L^2(I)}^2 \big)^{1/2} + \mathbf{C} \cdot \log N \cdot \| f\|_{L^2(\mathbb{R})} \\ & \leq \mathbf{C} \cdot \big( \sum_{|I| = \mathbf{C}} \| \F_\Theta \|_{L^2(I)}^2 \big)^{1/2} + \mathbf{C} \cdot \log N \cdot \big( \sum_{|I|= \mathbf{C}} \| \mathcal{V}^r_{\vec{f_{\Theta}}} \|_{L^2(I)}^2 \big)^{1/2} \\ & \qquad \qquad + \mathbf{C} \cdot N^{-100} \cdot \big( \sum_{|I| = \mathbf{C}} \| M_{\text{HL}} f \|_{L^2(I)}^2 \big)^{1/2} + \mathbf{C} \cdot \log N \cdot \| f\|_{L^2(\mathbb{R})} \\ & \qquad \leq \mathbf{C} \cdot \big( \| \F_{\Theta} \|_{L^2(\mathbb{R})} + \log N \cdot \| \mathcal{V}^r_{\vec{f_{\Theta}}} \|_{L^2(\mathbb{R})} + N^{-100} \cdot \| M_{\text{HL}} f \|_{L^2(\mathbb{R})} + \log N \cdot \| f\|_{L^2(\mathbb{R})} \big) \\ & \qquad \qquad \leq \mathbf{C} \cdot \log^2 N \cdot \| f \|_{L^2(\mathbb{R})}, \end{align*} completing the proof. \section{Contemporary Work} Since Bourgain's work, the topic of pointwise convergence of ergodic averages along polynomial orbits was taken up and greatly advanced by Mariusz Mirek, Eli Stein, and their collaborators \parencite{[27],[28],[29],[30],[31]}, building on breakthrough work of \cite{[19]}. The current state of affairs was established in \cite{[30]}: \begin{theo}\label{t:M} Suppose that $(X,\mu)$ is a $\sigma$-finite measure space, $\tau: X \to X$ is a measure-preserving transformation, and $P \in \mathbb{Z}[\cdot]$ is a polynomial with integer coefficients. Then for each $1 < p < \infty, \ r > 2$ \begin{align*} &\| \mathcal{V}^r \big( \frac{1}{N} \sum_{n=1}^N \tau^{P(n)} f :N \big) \|_{L^p(X)} + \sup_{ \lambda > 0} \, \| \lambda \cdot N_{\lambda} \big( \frac{1}{N} \sum_{n=1}^N \tau^{P(n)} f :N \big)^{1/2} \|_{L^p(X)} \\ & \qquad \leq \mathbf{C}_p \cdot ( 1+ \frac{r}{r-2}) \cdot \| f\|_{L^p(X)}.\end{align*} \end{theo} In other words, from a quantitative perspective, the rate of convergence of the abstract averages \[ \frac{1}{N} \sum_{n=1}^N \tau^{P(n)} f \] is precisely that of our entropic examples! The key to this argument was a combinatorial partitioning of $\mathbb{Q} \cap [0,1]$ into the so-called Ionescu--Wainger exhaustion of the rationals: one replaces \[ \mathcal{R}_s \longrightarrow \mathcal{U}_s, \] see \eqref{e:Rs}, where $\{ \mathcal{U}_s : s \}$ form a disjoint partition of $\mathbb{Q} \cap [0,1]$ which captures many of the analytical properties of $\mathcal{R}_s$, namely \begin{align}\label{e:ud} \sup_{A/Q \in \mathcal{U}_s} |S(A/Q)| \leq \mathbf{C}_\epsilon \cdot 2^{(\epsilon - 1/d)s}, \end{align} but admit much more favorable arithmetic statistics, which allows for the approximation \begin{align*} K_k' \; \; \; \textrm{``}&=\textrm{''} \; \; \; \sum_{s \leq \mathbf{c} \cdot k} \sum_{A/Q \in \mathcal{U}_s} S(A/Q) \cdot \text{Mod}_{A/Q} ( \chi_{(d - \mathbf{c})k}*\phi'_{dk}) = : \sum_{s \leq \mathbf{c} \cdot k} L_{k,s} \end{align*} to hold in $\ell^p(\mathbb{Z})$ as well. Although Bourgain's entropic argument is less effective in general on $\ell^p, p \neq 2$, by applying the Rademacher--Menshov inequality and arguing as in \cite{[5]}, one is able to establish e.g.\ the estimate \begin{align*} \| \sup_k |L_{k,s}*f| \|_{\ell^p(\mathbb{Z})} \leq \mathbf{C}_\epsilon \cdot 2^{ \epsilon s} \cdot 2^{ -\mathbf{c}_{p,d} s} \cdot \| f\|_{\ell^p(\mathbb{Z})}, \; \; \; \; \; \; 1 < p < \infty, \ \mathbf{c}_{p,d} < 1/d, \end{align*} and similarly for the jump-counting formulation. The loss in the number of frequencies is sub-exponential in $s$, as in the case of Bourgain's maximal function on $\ell^2$; the gain of \[ 2^{ -\mathbf{c}_{p,d} s} \] follows from appropriately interpolating \eqref{e:ud}. This quantitative improvement over the sharpest estimates for $\sup_k |L_{k,s}'*f|$, \[ \| \sup_k |L'_{k,s}*f| \|_{\ell^p(\mathbb{Z})}\leq \mathbf{C}_{\epsilon,p} \cdot 2^{(\epsilon + 1) s} \cdot 2^{ -\mathbf{c}_{p,d} s} \cdot \| f\|_{\ell^p(\mathbb{Z})}, \; \; \; 1 < p < \infty, \ \mathbf{c}_{p,d} < 1/d, \] speaks to the flexibility of these arguments, which indeed extend to handle the case of the $r$-variation and jump-counting operators.
\section{Introduction} \noindent Let us write the one-dimensional (1D) Klein-Fock-Gordon (KFG) wave equation in Hamiltonian form, \begin{equation} \mathrm{i}\hbar\frac{\partial}{\partial t}\Psi=\hat{\mathrm{h}}\Psi, \end{equation} where \begin{equation} \hat{\mathrm{h}}=-\frac{\hbar^{2}}{2\mathrm{m}}\left(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}\right)\frac{\partial^{2}}{\partial x^{2}}+\mathrm{m}c^{2}\hat{\tau}_{3}+V(x)\hat{1}_{2}, \end{equation} is, let us say, the KFG Hamiltonian differential operator. Here, $\hat{\tau}_{3}=\hat{\sigma}_{z}$ and $\hat{\tau}_{2}=\hat{\sigma}_{y}$ are Pauli matrices and $V(x)\in\mathbb{R}$ is the external electric potential ($\hat{1}_{2}$ is the $2\times2$ identity matrix). The operator $\hat{\mathrm{h}}$ acts on two-component column state vectors of the form $\Psi=\Psi(x,t)=\left[\,\psi_{1}(x,t)\;\,\psi_{2}(x,t)\,\right]^{\mathrm{T}}$ (the symbol $^{\mathrm{T}}$ represents the transpose of a matrix). Equation (1) with $\hat{\mathrm{h}}$ given in Eq. (2) is also called the 1D Feshbach-Villars (FV) wave equation \cite{RefA,RefB,RefC,RefD}. The 1D KFG wave equation in its standard form, or the second order in time KFG equation in one spatial dimension \cite{RefE,RefF} is given by \begin{equation} \left[\,\mathrm{i}\hbar\frac{\partial}{\partial t}-V(x)\right]^{2}\psi=\left[-\hbar^{2}c^{2}\frac{\partial^{2}}{\partial x^{2}}+(\mathrm{m}c^{2})^{2}\right]\psi, \end{equation} where $\psi=\psi(x,t)$ is a one-component state vector or one-component wavefunction. The relation between $\psi$ and $\Psi$ can be defined as follows: \begin{equation} \Psi=\left[\begin{array}{c} \psi_{1}\\ \psi_{2} \end{array}\right]=\frac{1}{2}\left[\begin{array}{c} \psi+\mathrm{i}\tau\left(\frac{\partial}{\partial t}-\frac{V}{\mathrm{i}\hbar}\right)\psi\\ \psi-\mathrm{i}\tau\left(\frac{\partial}{\partial t}-\frac{V}{\mathrm{i}\hbar}\right)\psi \end{array}\right], \end{equation} where $\tau\equiv\hbar/\mathrm{m}c^{2}$. The Compton wavelength is precisely $\lambda_{\mathrm{C}}\equiv c\tau$; thus, $\tau$ is the time taken for a ray of light to travel the distance $\lambda_{\mathrm{C}}$. The expression given in Eq. (3) is fully equivalent to Eq. (1) (with $\hat{\mathrm{h}}$ given in Eq. (2)) \cite{RefC,RefD}. Note that, from Eq. (4), the solution $\psi$ of Eq. (3) depends only on the components of the column vector $\Psi$, namely, \begin{equation} \psi=\psi_{1}+\psi_{2}. \end{equation} Additionally, \begin{equation} \left(\mathrm{i}\hbar\frac{\partial}{\partial t}\psi-V\psi\right)\frac{1}{\mathrm{m}c^{2}}=\psi_{1}-\psi_{2}. \end{equation} All the results we have presented thus far are well known; however, to the best of our knowledge, there is one issue within the 1D KFG theory that has received little attention and that we can raise with the following questions: What are the boundary conditions that the 1D FV equation can support? In particular, what are the appropriate boundary conditions for this equation in the problem of the 1D KFG particle inside an interval? For example, some unexpected boundary conditions for the solutions of the 1D FV wave equation in simple physical situations were presented in Refs. \cite{RefG,RefH,RefI}. In general, the boundary conditions for solutions of the second order in time KFG wave equation appear to be similar to those supported by the Schr\"{o}dinger wavefunction (see, for example, Refs. \cite{RefG,RefI,RefJ,RefK}), but we do not have at our disposal a wave equation that could have boundary conditions similar to those of the 1D FV equation (the presence of the singular matrix $\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}$ in the Hamiltonian has much to do with this). In general, the physically acceptable boundary conditions for a wave equation must ensure that the corresponding Hamiltonian maintains its essential property, for example, that of being self-adjoint (if that is the case). In the case of the 1D FV equation, it is known that the Hamiltonian is a formally pseudo-Hermitian operator (or a formally pseudo self-adjoint operator) \cite{RefA,RefC}, and we could find families of general boundary conditions that agree with the property of being a pseudo self-adjoint operator, namely, not just formally, i.e., not only without specifying the domain of the Hamiltonian (as is done in the case of Hamiltonians that are self-adjoint). The article is organized as follows. In Section II, we introduce the pseudo inner product for the two-component solutions of the 1D FV equation and briefly discuss its relation to other distinctive inner products of quantum mechanics. This pseudo inner product could also be considered the scalar product for the one-component solutions of the KFG equation in its standard form. Certainly, the pseudo inner product does not possess the property of positive definiteness, but can be independent of time. Thus, the corresponding pseudo norm can be a constant, and because this implies that the probability current density takes the same value at each end of the box, the Hamiltonian for this problem can be a pseudo-Hermitian operator. In fact, $\hat{\mathrm{h}}$ is formally pseudo-Hermitian, and we find in this section a general four-parameter set of boundary conditions that ensures that $\hat{\mathrm{h}}$ is indeed a pseudo-Hermitian operator. We write this set in terms of $\psi$ and $\partial\psi/\partial x$ evaluated at the ends of the box. Here, we also consider the nonrelativistic approximation of the general set of boundary conditions and the results support the idea that this set is indeed the most general. In Section III, we write the general set of boundary conditions in terms of the values that $\Psi$ and $\partial\Psi/\partial x$ take at the ends of the box. To be precise, the set must be written in terms of the values that $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\partial\Psi/\partial x)$ take at the endpoints of the box, but $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})$ is a singular matrix, i.e., it does not have an inverse. In Section IV (Appendix I), we check that the time derivative of the pseudo inner product of two solutions of the 1D FV equation with a potential other than zero, but expressed in terms of the respective solutions of the usual KFG equation with $V\neq0$, is proportional to a term evaluated at the ends of the box that also does not depend on the potential, i.e., it is a boundary term. In Section V (Appendix II), we show that the Hamiltonian operator $\hat{\mathrm{h}}$ for a 1D KFG particle in a box is in fact a pseudo self-adjoint operator; that is, the general matrix boundary condition ensures that the domains of $\hat{\mathrm{h}}$ and its generalized adjoint are equal. From the results shown in this section it follows that the boundary term that arose in Section IV (Appendix I) always vanishes, certainly for any boundary condition included in the general family of boundary conditions. Consequently, the value of the pseudo inner product in this problem is conserved. Finally, some concluding remarks are presented in Section VI. \section{Boundary conditions for the 1D KFG particle in a box I} \noindent Let us consider a 1D KFG particle moving in the interval $x\in\Omega=[a,b]$, i.e., in a box. The corresponding Hamiltonian operator given in Eq. (2) acts on two-component column state vectors of the form $\Psi=\left[\,\psi_{1}\;\,\psi_{2}\,\right]^{\mathrm{T}}$ and $\Phi=\left[\,\phi_{1}\;\,\phi_{2}\,\right]^{\mathrm{T}}$, and the scalar product for these two state vectors must be defined as \begin{equation} \langle\langle\Psi,\Phi\rangle\rangle\equiv\int_{\Omega}\mathrm{d}x\,\Psi^{\dagger}\hat{\tau}_{3}\Phi \end{equation} (the symbol $^{\dagger}$ denotes the usual Hermitian conjugate, or the usual formal adjoint, of a matrix and an operator) \cite{RefA,RefB,RefC,RefD}. Additionally, the square of the corresponding norm (or rather, pseudo norm) is $\left\Vert \left\Vert \Psi\right\Vert \right\Vert ^{2}\equiv\langle\langle\Psi,\Psi\rangle\rangle=\int_{\Omega}\mathrm{d}x\,\varrho$, where $\varrho=\varrho(x,t)=\Psi^{\dagger}\hat{\tau}_{3}\Psi=|\psi_{1}|^{2}-|\psi_{2}|^{2}$ is the KFG probability density. Certainly, $\varrho$ is not positive definite and calling it probability density is not absolutely correct (although it can be interpreted as a charge density) \cite{RefA,RefB,RefC,RefD}. Note that the integral in (7) can also be identified with the usual scalar product in Dirac theory in (1+1) dimensions, namely, $\langle\Psi,\Phi\rangle_{\mathrm{D}}\equiv\int_{\Omega}\mathrm{d}x\,\Psi^{\dagger}\Phi$, which is an inner product on the Hilbert space of two-component square-integrable wavefunctions, $\mathcal{L}^{2}(\Omega)\oplus\mathcal{L}^{2}(\Omega)$; therefore, \begin{equation} \langle\langle\Psi,\Phi\rangle\rangle\equiv\langle\Psi,\hat{\tau}_{3}\Phi\rangle_{\mathrm{D}}, \end{equation} and $\langle\Psi,\Phi\rangle_{\mathrm{D}}=\langle\langle\Psi,\hat{\tau}_{3}\Phi\rangle\rangle$. Because $\langle\langle\Psi,\Psi\rangle\rangle$ can be a negative quantity, the scalar product in Eq. (7) is an indefinite (or improper) inner product, or a pseudo inner product, on an infinite-dimensional complex vector space. In general, such a vector space itself is not necessarily a Hilbert space. Similarly, writing $\Psi$ and $\Phi$ in the integrand in (7) in terms of their respective components, that is, using the relations that arise from Eq. (4) and other analogous relations for $\Phi$ (which are obtained from Eq. (4) by making the replacements $\Psi\rightarrow\Phi$, $\psi_{1}\rightarrow\phi_{1}$, $\psi_{2}\rightarrow\phi_{2}$ and $\psi\rightarrow\phi$), we obtain \begin{equation} \langle\langle\Psi,\Phi\rangle\rangle=\frac{\mathrm{i}\hbar}{2\mathrm{m}c^{2}}\int_{\Omega}\mathrm{d}x\,\left(\psi^{*}\phi_{t}-\psi_{t}^{*}\phi-\frac{2V}{\mathrm{i}\hbar}\psi^{*}\phi\right) \end{equation} \noindent (where the asterisk $^{*}$ denotes the complex conjugate, and $\psi_{t}\equiv\partial\psi/\partial t$, etc), or also, \begin{equation} \langle\langle\Psi,\Phi\rangle\rangle=\frac{\mathrm{i}\hbar}{2\mathrm{m}c^{2}}\left(\langle\psi,\phi_{t}\rangle_{\mathrm{S}}-\langle\psi_{t},\phi\rangle_{\mathrm{S}}-\frac{2V}{\mathrm{i}\hbar}\langle\psi,\phi\rangle_{\mathrm{S}}\right)\equiv\langle\psi,\phi\rangle_{\mathrm{KFG}}, \end{equation} where $\langle\psi,\phi\rangle_{\mathrm{KFG}}$ can be considered the scalar product for the one-component solutions of the KFG equation in Eq. (3) (see Appendix I). Note that $\langle\;,\;\rangle_{\mathrm{S}}$ denotes the usual scalar product in the Schr\"{o}dinger theory in one spatial dimension, namely, $\langle\psi,\phi\rangle_{\mathrm{S}}\equiv\int_{\Omega}\mathrm{d}x\,\psi^{*}\phi$, which is an inner product on the Hilbert space of one-component square-integrable wavefunctions, $\mathcal{L}^{2}(\Omega)$. Certainly, $\psi$ and $\psi_{t}$, and $\phi$ and $\phi_{t}$, must belong to $\mathcal{L}^{2}(\Omega)$ to ensure that $\langle\psi,\phi\rangle_{\mathrm{KFG}}$ exists \cite{RefL}. It can be noted that there is an isomorphism between the vectorial space of the solutions $\psi$ of the common KFG equation for the corresponding 1D particle, namely, \begin{equation} \left[\left(\partial_{t}-\frac{V}{\mathrm{i}\hbar}\right)^{2}+\hat{\mathrm{d}}\,\right]\psi=0 \end{equation} (Eq. (3)), where $\hat{\mathrm{d}}\equiv-c^{2}\partial_{xx}+\tau^{-2}$ ($\partial_{t}\equiv\partial/\partial t$ and $\partial_{xx}\equiv\partial^{2}/\partial x^{2}$, etc) and the vectorial space of the initial state vectors of the KFG equation in Hamiltonian form for this 1D particle, namely, Eq. (1) with $\hat{\mathrm{h}}$ given in Eq. (2) \cite{RefM}. In effect, a possible initial state vector, for example, at $t=0$, would have the form \begin{equation} \Psi(0)=\left[\begin{array}{c} \psi_{1}(0)\\ \psi_{2}(0) \end{array}\right]=\frac{1}{2}\left[\begin{array}{c} \psi(0)+\mathrm{i}\tau\left(\psi_{t}(0)-\frac{V}{\mathrm{i}\hbar}\psi(0)\right)\\ \psi(0)-\mathrm{i}\tau\left(\psi_{t}(0)-\frac{V}{\mathrm{i}\hbar}\psi(0)\right) \end{array}\right], \end{equation} that arises immediately from the relation given in Eq. (4). Thus, giving an initial state vector as $\Psi(0)$ is equivalent to providing the initial data for the solution vector $\psi$, namely, $\psi(0)$ and $\psi_{t}(0)$. Incidentally, operators $\hat{\mathrm{d}}$, which can act on the one-component state vectors $\psi$, and \textrm{$\hat{\mathrm{h}}$}, which can act on the two-component state vectors $\Psi$, are related as follows: \begin{equation} \hat{\mathrm{h}}=+\frac{\hbar}{2}\tau\left(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}\right)\hat{\mathrm{d}}+\frac{\hbar}{2}\tau^{-1}\left(\hat{\tau}_{3}-\mathrm{i}\hat{\tau}_{2}\right)+V(x)\hat{1}_{2}. \end{equation} Although the scalar product in Eqs. (7) and (10) does not possess the property of positive definiteness (i.e., $\langle\langle\Psi,\Psi\rangle\rangle>0$), it is a time-independent scalar product. Indeed, using Eq. (3) for $\psi$ and $\psi^{*}$, and for $\phi$ and $\phi^{*}$, it can be demonstrated that the following relation is verified: \begin{equation} \frac{\mathrm{d}}{\mathrm{d}t}\langle\langle\Psi,\Phi\rangle\rangle=-\frac{\mathrm{i}\hbar}{2\mathrm{m}}\left.\left[\,\psi_{x}^{*}\,\phi-\psi^{*}\phi_{x}\,\right]\right|_{a}^{b}=\frac{\mathrm{d}}{\mathrm{d}t}\langle\psi,\phi\rangle_{\mathrm{KFG}}, \end{equation} where $\left.\left[\, g\,\right]\right|_{a}^{b}\equiv g(b,t)-g(a,t)$, and $\psi_{x}\equiv\partial\psi/\partial x$, etc. This result is also valid when $V$ is different from zero inside the box (see Appendix I). The term evaluated at the endpoints of the interval $\Omega$ must vanish due to the boundary condition satisfied by $\psi$ and $\phi$, or $\Psi$ and $\Phi$ (see Appendix II). Additionally, if we make $\psi=\phi$, or $\Psi=\Phi$, in Eq. (14), we obtain the result \begin{equation} \frac{\mathrm{d}}{\mathrm{d}t}\langle\langle\Psi,\Psi\rangle\rangle=-\left.\left[\, j\,\right]\right|_{a}^{b}=\frac{\mathrm{d}}{\mathrm{d}t}\langle\psi,\psi\rangle_{\mathrm{KFG}}, \end{equation} where $j=j(x,t)=(\mathrm{i}\hbar/2\mathrm{m})(\psi_{x}^{*}\,\psi-\psi^{*}\psi_{x})$ would be the probability current density, although we know that this quantity, as well as $\varrho$, cannot be interpreted as probability quantities \cite{RefC,RefD}. The disappearance of the boundary term in Eq. (15) implies that the pseudo norm remains constant, and because $j(a,t)=j(b,t)$, we have that $\hat{\mathrm{h}}$ must be a pseudo-Hermitian operator. In the case that $\Omega=\mathbb{R}$, the scalar product $\langle\langle\Psi,\Phi\rangle\rangle$ is a time-independent constant whenever $\Psi$ and $\Phi$ are two normalizable solutions, i.e., solutions that have their pseudo norm finite. The square of the pseudo norm of these functions could be negative, but their magnitude cannot be infinite if the boundary term in Eq. (14) is expected to be zero. Next, we use the pseudo inner product given in Eq. (7), which is defined over an indefinite inner product space \cite{RefN}. For a collection of basic properties of this scalar product (but also of general results on Hamiltonians of the type given in Eq. (2)), see Ref. \cite{RefL}. Using integration by parts twice, it can be demonstrated that the Hamiltonian differential operator $\hat{\mathrm{h}}$ in Eq. (2) satisfies the following relation: \begin{equation} \langle\langle\Psi,\hat{\mathrm{h}}\Phi\rangle\rangle=\langle\langle\hat{\mathrm{h}}_{\mathrm{adj}}\Psi,\Phi\rangle\rangle+f[\Psi,\Phi], \end{equation} where the boundary term $f[\Psi,\Phi]$ is given by \begin{equation} f[\Psi,\Phi]\equiv\frac{\hbar^{2}}{2\mathrm{m}}\left.\left[\,\Psi_{x}^{\dagger}\,\hat{\tau}_{3}\,(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi-\Psi^{\dagger}\,\hat{\tau}_{3}\,(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi_{x}\,\right]\right|_{a}^{b}. \end{equation} This quantity can also be written in a way that will be especially important, namely, \begin{equation} f[\Psi,\Phi]\equiv\frac{\hbar^{2}}{2\mathrm{m}}\,\frac{1}{2}\left.\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi_{x}\,\right]\right|_{a}^{b}. \end{equation} The latter somewhat unexpected expression is true because the singular matrix $\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}$ obeys the following relation: $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})=2\hat{\tau}_{3}\,(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})$; however, $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})^{2}=\hat{0}$. The differential operator $\hat{\mathrm{h}}_{\mathrm{adj}}$ in Eq. (16) is the generalized Hermitian conjugate, or the formal generalized adjoint of $\hat{\mathrm{h}}$, namely, \begin{equation} \hat{\mathrm{h}}_{\mathrm{adj}}=\hat{\eta}^{-1}\,\hat{\mathrm{h}}^{\dagger}\,\hat{\eta}=\hat{\tau}_{3}\,\hat{\mathrm{h}}^{\dagger}\,\hat{\tau}_{3} \end{equation} ($\hat{\eta}=\hat{\tau}_{3}=\hat{\eta}^{-1}$ is sometimes called the metric operator; in this case, $\hat{\eta}$ is a bounded operator and satisfies $\hat{\eta}^{3}=\hat{\eta}$) and therefore (just formally, i.e., by using only the scalar product definition given in Eq. (7)), \begin{equation} \langle\langle\Psi,\hat{\mathrm{h}}\Phi\rangle\rangle=\langle\langle\hat{\mathrm{h}}_{\mathrm{adj}}\Psi,\Phi\rangle\rangle. \end{equation} The latter is essentially the relation that defines the generalized adjoint differential operator $\hat{\mathrm{h}}_{\mathrm{adj}}$ on an indefinite inner product space. Clearly, the latter definition requires that $f[\Psi,\Phi]$ in Eq. (16) vanishes. The Hamiltonian operator also formally satisfies the following relation: \begin{equation} \hat{\mathrm{h}}=\hat{\mathrm{h}}_{\mathrm{adj}}, \end{equation} that is, $\hat{\mathrm{h}}$ is formally generalized Hermitian (or formally pseudo-Hermitian), or formally generalized self-adjoint (or formally pseudo self-adjoint). However, if the boundary conditions imposed on $\Psi$ and $\Phi$ at the endpoints of the interval $\Omega$ lead to the cancellation of the boundary term in Eq. (16), then the differential operator $\hat{\mathrm{h}}$ is indeed generalized Hermitian (or pseudo-Hermitian), and as shown in Appendix II, it is also generalized self-adjoint (or pseudo self-adjoint), i.e., \begin{equation} \langle\langle\Psi,\hat{\mathrm{h}}\Phi\rangle\rangle=\langle\langle\hat{\mathrm{h}}\Psi,\Phi\rangle\rangle. \end{equation} Precisely, we want to obtain a general set of boundary conditions for the generalized Hermitian Hamiltonian differential operator. Thus, if we impose $\Psi=\Phi$ in the latter relation and in Eq. (16) (with the result in Eq. (21)), we obtain the following condition: \begin{equation} f[\Psi,\Psi]=\frac{\hbar}{\mathrm{i}}\left.\left[\, j\,\right]\right|_{a}^{b}=0\quad\left(\;\Rightarrow\; j(b,t)=j(a,t)\,\right), \end{equation} where $j=j(x,t)$ is given by \begin{equation} j=\frac{\mathrm{i}\hbar}{2\mathrm{m}}\,\frac{1}{2}\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}\,\right] \end{equation} (see Eq. (18)). But also because $\hat{\tau}_{3}\,(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})=\hat{1}_{2}+\hat{\sigma}_{x}$ (the latter if we use the expression given by Eq. (17)), and the result in Eq. (5), we obtain \begin{equation} j=\frac{\mathrm{i}\hbar}{2\mathrm{m}}\left(\,\psi_{x}^{*}\,\psi-\psi^{*}\psi_{x}\,\right), \end{equation} as expected (see the comment made just after Eq. (15)). Certainly, all the generalized Hermitian boundary conditions must lead to the equality of $j$ at the endpoints of the interval $\Omega$. Furthermore, we also obtain the result $\langle\langle\Psi,\hat{\mathrm{h}}\Psi\rangle\rangle=\langle\langle\hat{\mathrm{h}}\Psi,\Psi\rangle\rangle=\langle\langle\Psi,\hat{\mathrm{h}}\Psi\rangle\rangle^{*}$ (the superscript $^{*}$ denotes the complex conjugate); therefore, $\langle\langle\Psi,\hat{\mathrm{h}}\Psi\rangle\rangle\equiv\langle\langle\hat{\mathrm{h}}\rangle\rangle_{\Psi}\in\mathbb{R}$, i.e., the generalized mean value of the Hamiltonian operator is real valued. Other typical properties of operators that are Hermitian in the usual sense hold here as well; for example, the eigenvalues are real (see, for example, Refs. \cite{RefA,RefC}). Substituting $j$ from Eq. (25) into Eq. (23), we obtain the result (we omit the variable $t$ in the expressions that follow) \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\left.\left[\,\psi\,\lambda\psi_{x}^{*}-\psi^{*}\lambda\psi_{x}\,\right]\right|_{a}^{b} \] \begin{equation} =\left[\,\psi(b)\,\lambda\psi_{x}^{*}(b)-\psi^{*}(b)\,\lambda\psi_{x}(b)\,\right]-\left[\,\psi(a)\,\lambda\psi_{x}^{*}(a)-\psi^{*}(a)\,\lambda\psi_{x}(a)\,\right]=0, \end{equation} where $\lambda\in\mathbb{R}$ is a parameter required for dimensional reasons. It is very convenient to rewrite the latter two terms using the following identity: \[ z_{1}z_{2}^{*}-z_{1}^{*}z_{2}=\frac{\mathrm{i}}{2}\left[\,(z_{1}+\mathrm{i}z_{2})(z_{1}+\mathrm{i}z_{2})^{*}-(z_{1}-\mathrm{i}z_{2})(z_{1}-\mathrm{i}z_{2})^{*}\,\right] \] \begin{equation} =\frac{\mathrm{i}}{2}\left(\,\left|z_{1}+\mathrm{i}z_{2}\right|^{2}-\left|z_{1}-\mathrm{i}z_{2}\right|^{2}\,\right), \end{equation} where $z_{1}$ and $z_{2}$ are complex numbers. Then, the following result is obtained: \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\frac{\mathrm{i}}{2}\left(\,\left|\psi(b)+\mathrm{i}\lambda\psi_{x}(b)\right|^{2}-\left|\psi(b)-\mathrm{i}\lambda\psi_{x}(b)\right|^{2}\,\right) \] \[ -\frac{\mathrm{i}}{2}\left(\,\left|\psi(a)+\mathrm{i}\lambda\psi_{x}(a)\right|^{2}-\left|\psi(a)-\mathrm{i}\lambda\psi_{x}(a)\right|^{2}\,\right) \] \[ =\frac{\mathrm{i}}{2}\left(\,\left|\psi(b)+\mathrm{i}\lambda\psi_{x}(b)\right|^{2}+\left|\psi(a)-\mathrm{i}\lambda\psi_{x}(a)\right|^{2}\,\right) \] \begin{equation} -\frac{\mathrm{i}}{2}\left(\,\left|\psi(b)-\mathrm{i}\lambda\psi_{x}(b)\right|^{2}+\left|\psi(a)+\mathrm{i}\lambda\psi_{x}(a)\right|^{2}\,\right)=0, \end{equation} that is, \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\frac{\mathrm{i}}{2}\left[\begin{array}{c} \psi(b)+\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)-\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} \psi(b)+\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)-\mathrm{i}\lambda\psi_{x}(a) \end{array}\right] \] \begin{equation} -\frac{\mathrm{i}}{2}\left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]=0. \end{equation} Let us now consider the following general matrix boundary condition: \begin{equation} \left[\begin{array}{c} \psi(b)+\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)-\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]=\hat{\mathrm{M}}\left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right], \end{equation} where $\hat{\mathrm{M}}$ is an arbitrary complex matrix. By substituting Eq. (30) into Eq. (29), we obtain \[ \frac{\mathrm{i}}{2}\left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]^{\dagger}\left(\hat{\mathrm{M}}^{\dagger}\hat{\mathrm{M}}-\hat{1}_{2}\right)\left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]=0; \] therefore, $\hat{\mathrm{M}}$ is a unitary matrix (the justification for this result is given in the comment that follows Eq. (A14)). Thus, a general set of generalized Hermitian boundary conditions for the 1D KFG particle in a box can be written as follows: \begin{equation} \left[\begin{array}{c} \psi(b)-\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)+\mathrm{i}\lambda\psi_{x}(a) \end{array}\right]=\hat{\mathrm{U}}_{(2\times2)}\left[\begin{array}{c} \psi(b)+\mathrm{i}\lambda\psi_{x}(b)\\ \psi(a)-\mathrm{i}\lambda\psi_{x}(a) \end{array}\right], \end{equation} where $\hat{\mathrm{U}}_{(2\times2)}=\hat{\mathrm{M}}^{-1}$ is also unitary. This family of boundary conditions is similar to the one corresponding to the problem of the 1D Schr\"{o}dinger particle enclosed in a box; for example, see Eq. (28) in Ref. \cite{RefO}. In relation to this, we can also take the nonrelativistic approximation of the general boundary condition given in Eq. (31). For that purpose, it is convenient to first write the KFG wavefunction $\psi=\psi(x,t)$ as follows: $\psi=\psi_{\mathrm{S}}\exp(-\mathrm{i}\,\mathrm{m}c^{2}t/\hbar)$, where $\psi_{\mathrm{S}}=\psi_{\mathrm{S}}(x,t)$ is the Schr\"{o}dinger wavefunction. Because in this approximation we have that $\left|\,\mathrm{i}\hbar(\psi_{\mathrm{S}})_{t}\,\right|\ll\mathrm{m}c^{2}\left|\,\psi_{\mathrm{S}}\,\right|$, we can write $\psi_{t}=(-\mathrm{i}\,\mathrm{m}c^{2}t/\hbar)\psi$, and therefore $\psi_{1}=\left(1-\frac{V}{2\mathrm{m}c^{2}}\right)\psi$ and $\psi_{2}=\frac{V}{2\mathrm{m}c^{2}}\psi$ (see Eq. (4)). Thus, for weak external potentials and to the lowest order in $v/c$ (and for positive energy solutions), $\psi_{1}\approx\psi$ satisfies the Schr\"{o}dinger equation in the potential $V+\mathrm{m}c^{2}$ (the latter $\mathrm{m}c^{2}$ can be eliminated by using the expression $\psi_{1}\approx\psi=\psi_{\mathrm{S}}\exp(-\mathrm{i}\,\mathrm{m}c^{2}t/\hbar)$) but also $(\psi_{1})_{x}\approx\psi_{x}$ (see, for example, Refs. \cite{RefB,RefC,RefI}). It is then clear that, in the problem of the particle in a box, the one-component KFG wavefunction satisfies the same boundary conditions as the one-component Schr\"{o}dinger wavefunction. Incidentally, a similar result to Eq. (31) had already been obtained by taking the nonrelativistic limit of the most general family of boundary conditions for the 1D Dirac particle enclosed in a box \cite{RefP}. Additionally, in the analogous problem of a 1D Schr\"{o}dinger particle in the presence of a point interaction at the point $x=0$ (or a hole at the origin), the most general family of boundary conditions is similar to that given in Eq. (31) \cite{RefQ}. Indeed, all these results substantiate that the set of boundary conditions dependent on the four real parameters given in Eq. (31) is also the most general for a 1D KFG particle in the interval $[a,b]$. Moreover, by making the replacements $a\rightarrow0+$ and $b\rightarrow0-$ in Eq. (31), we obtain the respective most general set of boundary conditions for the case in which the 1D KFG particle moves along the real line with a hole at the origin. Some examples of boundary conditions for this system can be seen in Refs. \cite{RefG,RefI} and will be briefly discussed in Section III. For all the boundary conditions that are part of the general set of boundary conditions in Eq. (31), $\hat{\mathrm{h}}$ is a pseudo-Hermitian operator, but it is also a pseudo self-adjoint operator (see Appendix II). Certainly, the result in Eq. (31) is given in terms of the wavefunction $\psi$, but if the relation in Eq. (5) is used, it can also be written in terms of the components of $\Psi=\left[\,\psi_{1}\;\,\psi_{2}\,\right]^{\mathrm{T}}$, i.e., in terms of $\psi_{1}+\psi_{2}$, and its spatial derivative $(\psi_{1})_{x}+(\psi_{2})_{x}$, evaluated at the edges $x=a$ and $x=b$. Actually, the general family of boundary conditions given in Eq. (31) must be written in terms of $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$ evaluated at the ends of the box. We work on this in the next section. We give below some examples of boundary conditions that are contained in Eq. (31): $\psi(a)=\psi(b)=0$ ($\hat{\mathrm{U}}_{(2\times2)}=-\hat{1}_{2}$), i.e., $\psi$ can satisfy the Dirichlet boundary condition; $\psi_{x}(a)=\psi_{x}(b)=0$ ($\hat{\mathrm{U}}_{(2\times2)}=+\hat{1}_{2}$), i.e., $\psi$ can satisfy the Neumann boundary condition; $\psi(a)=\psi(b)$ and $\psi_{x}(a)=\psi_{x}(b)$ ($\hat{\mathrm{U}}_{(2\times2)}=+\hat{\sigma}_{x}$), $\psi$ can satisfy the periodic boundary condition; $\psi(a)=-\psi(b)$ and $\psi_{x}(a)=-\psi_{x}(b)$ ($\hat{\mathrm{U}}_{(2\times2)}=-\hat{\sigma}_{x}$), $\psi$ can satisfy the antiperiodic boundary condition; $\psi(a)=\psi_{x}(b)=0$ ($\hat{\mathrm{U}}_{(2\times2)}=\hat{\sigma}_{z}$), i.e., $\psi$ can satisfy a mixed boundary condition; $\psi_{x}(a)=\psi(b)=0$ ($\hat{\mathrm{U}}_{(2\times2)}=-\hat{\sigma}_{z}$), i.e., $\psi$ can satisfy another mixed boundary condition; $\psi(a)-\lambda\psi_{x}(a)=0$ and $\psi(b)+\lambda\psi_{x}(b)=0$ ($\hat{\mathrm{U}}_{(2\times2)}=\mathrm{i}\hat{1}_{2}$), $\psi$ can satisfy a kind of Robin boundary condition. In fact, the latter boundary condition would be the KFG version of the boundary condition commonly used in the so-called (one-dimensional) MIT bag model for hadronic structures (see, for example, Ref. \cite{RefP}). All these boundary conditions are typical of wave equations that are of the second order in the spatial derivative. Of all the boundary conditions included in the four-parameter family of boundary conditions, only those arising from a diagonal unitary matrix describe a particle in an impenetrable box. This is because, for these boundary conditions, the probability current density satisfies the relation $j(b)=j(a)=0$ for all $t$. Thus, the most general family of confining boundary conditions for a 1D KFG particle in a box only has two (real) parameters. The latter result is due to the similarity between the general set of boundary conditions given in Eq. (31) and the general sets of boundary conditions for the 1D Dirac and Schr\"{o}dinger particles, and because we already know that the confining boundary conditions come from a matrix $\hat{\mathrm{U}}_{(2\times2)}$ that is diagonal \cite{RefP}. \section{\noindent Boundary conditions for the 1D KFG particle in a box II} \noindent Here, we show that the most general family of pseudo self-adjoint boundary conditions can also be expressed in terms of $\Psi$ and $\Psi_{x}$ evaluated at the endpoints of the box. Specifically, in terms of $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$. Indeed, following a procedure similar to that used above to obtain Eq. (26), namely, substituting $j$ from Eq. (24) into Eq. (23), we obtain \textrm{ \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\frac{1}{2}\left.\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}\,\right]\right|_{a}^{b} \] \[ =\frac{1}{2}\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}(b)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}(b)\,\right] \] \begin{equation} -\frac{1}{2}\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}(a)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\lambda\Psi_{x}(a)\,\right]=0, \end{equation} }where again, we insert the real parameter $\lambda$ for dimensional reasons. Now, we use the following matrix identity twice: \begin{equation} \hat{\mathrm{Z}}_{2}^{\dagger}\,\hat{\mathrm{Z}}_{1}-\hat{\mathrm{Z}}_{1}^{\dagger}\,\hat{\mathrm{Z}}_{2}=\frac{\mathrm{i}}{2}\left[\,(\hat{\mathrm{Z}}_{1}+\mathrm{i}\hat{\mathrm{Z}}_{2})^{\dagger}(\hat{\mathrm{Z}}_{1}+\mathrm{i}\hat{\mathrm{Z}}_{2})-(\hat{\mathrm{Z}}_{1}-\mathrm{i}\hat{\mathrm{Z}}_{2})^{\dagger}(\hat{\mathrm{Z}}_{1}-\mathrm{i}\hat{\mathrm{Z}}_{2})\,\right]. \end{equation} Then, we obtain the following result: \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\frac{1}{2}\frac{\mathrm{i}}{2}\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\right. \] \[ \left.-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\,\right] \] \[ -\frac{1}{2}\frac{\mathrm{i}}{2}\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a)\right. \] \begin{equation} \left.-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a)\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a)\,\right]=0, \end{equation} that is, \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Psi,\Psi]=\frac{1}{2}\frac{\mathrm{i}}{2}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right] \] \begin{equation} -\frac{1}{2}\frac{\mathrm{i}}{2}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]=0. \end{equation} Now, we propose writing a general matrix boundary condition as follows: \begin{equation} \left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]=\hat{\mathrm{A}}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right], \end{equation} where $\hat{\mathrm{A}}$ is an arbitrary $4\times4$ complex matrix. By substituting Eq. (36) into Eq. (35), we obtain \[ \frac{1}{2}\frac{\mathrm{i}}{2}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]^{\dagger}\left(\hat{\mathrm{A}}^{\dagger}\hat{\mathrm{A}}-\hat{1}_{4}\right)\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]=0, \] then $\hat{\mathrm{A}}$ is a unitary matrix ($\hat{1}_{4}$ is the $4\times4$ identity matrix). Note that the components of the column vectors in Eq. (36) are themselves $2\times1$ column matrices and are given by \begin{equation} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi\pm\mathrm{i}\lambda\Psi_{x})(x)=\left[\begin{array}{c} (\psi\pm\mathrm{i}\lambda\psi_{x})(x)\\ -(\psi\pm\mathrm{i}\lambda\psi_{x})(x) \end{array}\right]\,,\quad x=a,b. \end{equation} Thus, the general boundary condition in Eq. (36) can be written as follows: \begin{equation} \left[\begin{array}{c} (\psi+\mathrm{i}\lambda\psi_{x})(b)\\ -(\psi+\mathrm{i}\lambda\psi_{x})(b)\\ (\psi-\mathrm{i}\lambda\psi_{x})(a)\\ -(\psi-\mathrm{i}\lambda\psi_{x})(a) \end{array}\right]=\hat{\mathrm{A}}\left[\begin{array}{c} (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ -(\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a)\\ -(\psi+\mathrm{i}\lambda\psi_{x})(a) \end{array}\right]. \end{equation} On the other hand, this relation can also be written as follows: \begin{equation} \left[\begin{array}{c} (\psi+\mathrm{i}\lambda\psi_{x})(b)\\ (\psi-\mathrm{i}\lambda\psi_{x})(a)\\ (\psi+\mathrm{i}\lambda\psi_{x})(b)\\ (\psi-\mathrm{i}\lambda\psi_{x})(a) \end{array}\right]=\hat{\mathrm{S}}\hat{\mathrm{A}}\hat{\mathrm{S}}^{\dagger}\left[\begin{array}{c} (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a)\\ (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a) \end{array}\right], \end{equation} where $\hat{\mathrm{S}}$ is given by \[ \hat{\mathrm{S}}=\left[\begin{array}{cccc} 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & 0 & -1 \end{array}\right] \] \begin{equation} =\frac{1}{2}\left(\hat{\sigma}_{z}\otimes\hat{1}_{2}+\mathrm{i}\hat{\sigma}_{y}\otimes\hat{\sigma}_{x}+\mathrm{i}\hat{\sigma}_{x}\otimes\hat{\sigma}_{y}+\hat{1}_{2}\otimes\hat{\sigma}_{z}\right), \end{equation} where $\otimes$ denotes the Zehfuss-Kronecker product of matrices, or the matrix direct product \begin{equation} \hat{\mathrm{F}}\otimes\hat{\mathrm{G}}\equiv\left[\begin{array}{ccc} \mathrm{F}_{11}\hat{\mathrm{G}} & \cdots & \mathrm{F}_{1n}\hat{\mathrm{G}}\\ \vdots & \ddots & \vdots\\ \mathrm{F}_{m1}\hat{\mathrm{G}} & \cdots & \mathrm{F}_{mn}\hat{\mathrm{G}} \end{array}\right], \end{equation} which is bilinear and associative and satisfies, among other properties, the mixed-product property: $(\hat{\mathrm{F}}\otimes\hat{\mathrm{G}})(\mathrm{\hat{J}}\otimes\hat{\mathrm{K}})=(\hat{\mathrm{F}}\mathrm{\hat{J}}\otimes\hat{\mathrm{G}}\hat{\mathrm{K}})$ (see, for example, Ref. \cite{RefR}). The matrix $\hat{\mathrm{S}}$ is unitary, and therefore, $\hat{\mathrm{S}}\hat{\mathrm{A}}\hat{\mathrm{S}}^{\dagger}$ is also a unitary matrix. Now, notice that the left-hand side of the relation in Eq. (39) is given by (see Eq. (30)) \begin{equation} \left[\begin{array}{c} \underset{}{\left[\begin{array}{c} (\psi+\mathrm{i}\lambda\psi_{x})(b)\\ (\psi-\mathrm{i}\lambda\psi_{x})(a) \end{array}\right]}\\ \left[\begin{array}{c} (\psi+\mathrm{i}\lambda\psi_{x})(b)\\ (\psi-\mathrm{i}\lambda\psi_{x})(a) \end{array}\right] \end{array}\right]=\left[\begin{array}{c} \underset{}{\hat{\mathrm{M}}\left[\begin{array}{c} (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a) \end{array}\right]}\\ \hat{\mathrm{M}}\left[\begin{array}{c} (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a) \end{array}\right] \end{array}\right]=\left[\begin{array}{cc} \hat{\mathrm{M}} & \hat{0}\\ \hat{0} & \hat{\mathrm{M}} \end{array}\right]\left[\begin{array}{c} (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a)\\ (\psi-\mathrm{i}\lambda\psi_{x})(b)\\ (\psi+\mathrm{i}\lambda\psi_{x})(a) \end{array}\right], \end{equation} and substituting the latter relation into Eq. (39), we obtain \begin{equation} \hat{\mathrm{S}}\hat{\mathrm{A}}\hat{\mathrm{S}}^{\dagger}=\left[\begin{array}{cc} \hat{\mathrm{M}} & \hat{0}\\ \hat{0} & \hat{\mathrm{M}} \end{array}\right]=\hat{1}_{2}\otimes\hat{\mathrm{M}} \end{equation} (because $\hat{\mathrm{M}}$ is a unitary matrix, the block diagonal matrix in Eq. (43) is also unitary). Then, from Eq. (43), we can write the matrix $\hat{\mathrm{A}}$ as follows: \begin{equation} \hat{\mathrm{A}}=\hat{\mathrm{S}}^{\dagger}\left[\begin{array}{cc} \hat{\mathrm{M}} & \hat{0}\\ \hat{0} & \hat{\mathrm{M}} \end{array}\right]\hat{\mathrm{S}}=\hat{\mathrm{S}}^{\dagger}(\hat{1}_{2}\otimes\hat{\mathrm{M}})\hat{\mathrm{S}}. \end{equation} Thus, the most general set of generalized self-adjoint boundary conditions for the 1D KFG particle in a box can be written as follows (see Eq. (36)): \begin{equation} \left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]=\hat{\mathrm{U}}_{(4\times4)}\left[\begin{array}{c} (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi+\mathrm{i}\lambda\Psi_{x})(b)\\ (\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi-\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right], \end{equation} where \[ \hat{\mathrm{U}}_{(4\times4)}=\hat{\mathrm{A}}^{-1}=\hat{\mathrm{A}}^{\dagger}=\hat{\mathrm{S}}^{\dagger}\left[\begin{array}{cc} \hat{\mathrm{M}}^{\dagger} & \hat{0}\\ \hat{0} & \hat{\mathrm{M}}^{\dagger} \end{array}\right]\hat{\mathrm{S}}=\hat{\mathrm{S}}^{\dagger}\left[\begin{array}{cc} \hat{\mathrm{M}}^{-1} & \hat{0}\\ \hat{0} & \hat{\mathrm{M}}^{-1} \end{array}\right]\hat{\mathrm{S}} \] \begin{equation} =\hat{\mathrm{S}}^{\dagger}\left[\begin{array}{cc} \hat{\mathrm{U}}_{(2\times2)} & \hat{0}\\ \hat{0} & \hat{\mathrm{U}}_{(2\times2)} \end{array}\right]\hat{\mathrm{S}}=\hat{\mathrm{S}}^{\dagger}(\hat{1}_{2}\otimes\hat{\mathrm{U}}_{(2\times2)})\hat{\mathrm{S}} \end{equation} (to reach this result, we use Eq. (44) and the fact that $\hat{\mathrm{U}}_{(2\times2)}=\hat{\mathrm{M}}^{-1}$, the latter two results and only some properties of the matrix direct product could also be used). Note that the general matrix boundary condition in Eq. (45) could also be written as follows: \begin{equation} (\hat{1}_{2}\otimes(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}))\left[\begin{array}{c} (\Psi-\mathrm{i}\lambda\Psi_{x})(b)\\ (\Psi+\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]=\hat{\mathrm{U}}_{(4\times4)}(\hat{1}_{2}\otimes(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2}))\left[\begin{array}{c} (\Psi+\mathrm{i}\lambda\Psi_{x})(b)\\ (\Psi-\mathrm{i}\lambda\Psi_{x})(a) \end{array}\right]; \end{equation} however, the matrix $\hat{1}_{2}\otimes(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})$ does not have an inverse and the column vector on the left side of this relation cannot be cleared. Thus, the expression given in Eq. (47) is an elegant way to write the general boundary condition, but it is not functional and could lead to errors. The boundary conditions that were presented just before the last paragraph of Sect. II can be extracted from Eq. (45) if the matrix $\hat{\mathrm{U}}_{(2\times2)}$ is known. In effect, the Dirichlet boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)=0$ ($\hat{\mathrm{U}}_{(4\times4)}=-\hat{1}_{4}=-\hat{1}_{2}\otimes\hat{1}_{2}$); the Neumann boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(b)=0$ ($\hat{\mathrm{U}}_{(4\times4)}=+\hat{1}_{4}=+\hat{1}_{2}\otimes\hat{1}_{2}$); the periodic boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(b)$ ($\hat{\mathrm{U}}_{(4\times4)}=\hat{\sigma}_{x}\otimes\hat{1}_{2}$); the antiperiodic boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)=-(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(a)=-(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(b)$ ($\hat{\mathrm{U}}_{(4\times4)}=-\hat{\sigma}_{x}\otimes\hat{1}_{2}$); a mixed boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(b)=0$ ($\hat{\mathrm{U}}_{(4\times4)}=\hat{\sigma}_{z}\otimes\hat{1}_{2}$); another mixed boundary condition is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)=0$ ($\hat{\mathrm{U}}_{(4\times4)}=-\hat{\sigma}_{z}\otimes\hat{1}_{2}$); a kind of Robin boundary condition (and a kind of MIT bag boundary condition for a 1D KFG particle) is $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi(a)-\lambda\Psi_{x}(a))=0$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})(\Psi(b)+\lambda\Psi_{x}(b))=0$ ($\hat{\mathrm{U}}_{(4\times4)}=\mathrm{i}\hat{1}_{4}=\mathrm{i}\hat{1}_{2}\otimes\hat{1}_{2}$). Then, to write all these boundary conditions in terms of $\psi(a)$ and $\psi(b)$, and $\psi_{x}(a)$ and $\psi_{x}(b)$, we must use the fact that $\Psi=\left[\,\psi_{1}\;\,\psi_{2}\,\right]^{\mathrm{T}}$ and $\psi=\psi_{1}+\psi_{2}$ (Eq. (5)). If we wish to obtain explicit relations between the components of $\Psi$ and $\Psi_{x}$ at $x=a$ and $\Psi$ and $\Psi_{x}$ at $x=b$, we must use the relations given in Eqs. (5) and (6). Additionally, it can be shown that when the matrix $\hat{\mathrm{U}}_{(2\times2)}$ is diagonal, then the matrix $\hat{\mathrm{U}}_{(4\times4)}$ is also diagonal; consequently, diagonal matrices $\hat{\mathrm{U}}_{(4\times4)}$ in Eq. (45) lead to confining boundary conditions (see the last paragraph of Sect. II). In general, the boundary conditions imposed on $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$ at the endpoints of the box do not imply that $\Psi$ and $\Psi_{x}$ must also satisfy them. For example, let us consider the problem of the 1D KFG particle in the step potential ($V(x)=V_{0}\,\Theta(x)$, where $\Theta(x)$ is the Heaviside step function). This problem was also considered in Refs. \cite{RefG,RefI}. The step potential is a (soft) point interaction in the neighborhood of the origin, that is, between the points $x=a\rightarrow0+$ and $x=b\rightarrow0-$, and the boundary condition is the periodic boundary condition, which in this case becomes the continuity condition of $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$ at $x=0$, i.e., $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0+)$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0+)$. As we know, from this condition, it is obtained that $\psi(0-)=\psi(0+)$ and $\psi_{x}(0-)=\psi_{x}(0+)$. If the relations $\psi_{1}+\psi_{2}=\psi$ (Eq. (5)) and $\psi_{1}-\psi_{2}=(E-V)\psi/\mathrm{m}c^{2}$ (Eq. (6)) are used (in the latter, we also assumed that $\psi$ is an energy eigenstate), one can find relations between $\{\Psi(0+),\Psi_{x}(0+)\}$ and $\{\Psi(0-),\Psi_{x}(0-)\}$. We find that the relation given in Eq. (30) in Ref. \cite{RefG} is none other than the boundary condition $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0+)$, with Eqs. (5) and (6) evaluated at $x=0\pm$. Likewise, the relation given in Eq. (31) of the same reference is none other than $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0+)$, with the spatial derivatives of Eqs. (5) and (6) also evaluated at $x=0\pm$. Finally, adding the latter two boundary conditions, we obtain Eq. (32) of Ref. \cite{RefG}. Clearly, if the height of the step potential is not zero, then $\Psi(0+)$ is different from $\Psi(0-)$, and $\Psi_{x}(0+)$ is different from $\Psi_{x}(0-)$. Similarly, in Ref. \cite{RefI}, it was explicitly proven that $\Psi(0+)\neq\Psi(0-)$ and $\Psi_{x}(0+)\neq\Psi_{x}(0-)$ (see Eqs. (19) and (20) in that reference), but it was also shown that the boundary condition should be written in the form $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(0+)$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0-)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}(0+)$. Incidentally, in the same reference, it was shown that the latter boundary condition can be obtained by integrating the 1D FV equation from $x=0-$ to $x=0+$. On the other hand, in the problem of the 1D KFG particle inside the box \textrm{$\Omega=[a,b]$}, and subjected to the potential $V$, with the Dirichlet boundary condition, $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi(b)=0$, we know that $\psi$ also satisfies this condition, namely, $\psi(a)=\psi(b)=0$. The latter boundary condition together with Eqs. (5) and (6) lead us to the boundary condition $\Psi(a)=\Psi(b)=0$. Indeed, in addition to $\psi_{1}(a)+\psi_{2}(a)=\psi_{1}(b)+\psi_{2}(b)=0$, $\psi_{1}(a)-\psi_{2}(a)=\psi_{1}(b)-\psi_{2}(b)=0$ (because $\psi_{t}(a,t)=\psi_{t}(b,t)=0$ also holds). Finally, $\Psi$ also satisfies the Dirichlet boundary condition at the edges of the box (the latter boundary condition was precisely the one used in Ref. \cite{RefH}). In short, let us suppose that the one-component wavefunction $\psi$ can vanish at a point on the real line, for example, at $x=0$ (also $V(0+)$ and $V(0-)$ must be finite numbers there). The latter is the Dirichlet boundary condition, namely, $\psi(0-)=\psi(0+)=0\equiv\psi(0)$. Certainly, this result is obtained from the disappearance of $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ at that same point, i.e., from the fact that the Hamiltonian operator with the latter boundary condition is a pseudo self-adjoint operator; then, the latter condition implies that the entire two-component wavefunction $\Psi$ has to disappear at that point (use Eqs. (5) and (6)). In other words, the 1D FV wave equation is a second-order equation in the spatial derivative that accepts the vanishing of the entire two-component wavefunction at a point. On the other hand, let us now suppose that $\psi_{x}$ can vanish at a point on the real line, for example, at $x=0$, but $\psi$ is nonzero there (also $V_{x}(0+)$ and $V_{x}(0-)$ must be finite numbers there). The latter is the Neumann boundary condition, namely, $\psi_{x}(0-)=\psi_{x}(0+)=0\equiv\psi_{x}(0)$. Indeed, we also have that $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$ vanishes at that same point. Then, it can be shown that $(\psi_{1})_{x}$ and $(\psi_{2})_{x}$ do not have to vanish at the point in question, and therefore, $\Psi_{x}$ is not zero there either (use Eqs. (5) and (6)). \section{Appendix I} \noindent The 1D KFG wave equation given in Eq. (3) can also be written as follows: \[ \left[\,-\hbar^{2}\frac{\partial^{2}}{\partial t^{2}}-\mathrm{i}2\hbar\, V(x)\frac{\partial}{\partial t}+(V(x))^{2}\right]\psi=\left[-\hbar^{2}c^{2}\frac{\partial^{2}}{\partial x^{2}}+(\mathrm{m}c^{2})^{2}\right]\psi,\tag{A1} \] and therefore, \[ \psi_{tt}=c^{2}\psi_{xx}-\left(\frac{\mathrm{m}c^{2}}{\hbar}\right)^{2}\psi+\frac{2V}{\mathrm{i}\hbar}\psi_{t}+\frac{V^{2}}{\hbar^{2}}\psi.\tag{A2} \] The scalar product for the two-component column state vectors $\Psi=\left[\,\psi_{1}\;\,\psi_{2}\,\right]^{\mathrm{T}}$ and $\Phi=\left[\,\phi_{1}\;\,\phi_{2}\,\right]^{\mathrm{T}}$, where $\psi_{1}+\psi_{2}=\psi$ and $\phi_{1}+\phi_{2}=\phi$, is given by \[ \langle\langle\Psi,\Phi\rangle\rangle\equiv\int_{\Omega}\mathrm{d}x\,\Psi^{\dagger}\hat{\tau}_{3}\Phi=\frac{\mathrm{i}\hbar}{2\mathrm{m}c^{2}}\int_{\Omega}\mathrm{d}x\,\left[\psi^{*}\left(\frac{\partial}{\partial t}-\frac{V}{\mathrm{i}\hbar}\right)\phi-\left(\left(\frac{\partial}{\partial t}-\frac{V}{\mathrm{i}\hbar}\right)\psi\right)^{*}\phi\right] \] \[ =\frac{\mathrm{i}\hbar}{2\mathrm{m}c^{2}}\int_{\Omega}\mathrm{d}x\,\left(\psi^{*}\phi_{t}-\psi_{t}^{*}\phi-\frac{2V}{\mathrm{i}\hbar}\psi^{*}\phi\right)\equiv\langle\psi,\phi\rangle_{\mathrm{KFG}}.\tag{A3} \] The latter quantity is preserved in time; in fact, taking its time derivative and using the result in Eq. (A2), and a similar relation for $\phi$ ($\psi$ and $\phi$ are solutions of the 1D KFG wave equation in its standard form), one obtains the same relation given in Eq. (14), namely, \[ \frac{\mathrm{d}}{\mathrm{d}t}\langle\langle\Psi,\Phi\rangle\rangle=\frac{\mathrm{d}}{\mathrm{d}t}\langle\psi,\phi\rangle_{\mathrm{KFG}}=-\frac{\mathrm{i}\hbar}{2\mathrm{m}}\left.\left[\,\psi_{x}^{*}\,\phi-\psi^{*}\phi_{x}\,\right]\right|_{a}^{b}.\tag{A4} \] As follows from the results obtained in Appendix II, if $\psi$ and $\phi$ both satisfy any boundary condition included in the most general set of boundary conditions, the boundary term in Eq. (A4) always vanishes. \section{Appendix II} \noindent The goal of this section is to show that if the functions belonging to the domain of $\hat{\mathrm{h}}$ (considered a densely defined operator) obey any of the boundary conditions included in Eq. (31), then the functions of the domain of $\hat{\mathrm{h}}_{\mathrm{adj}}$ must obey the same boundary condition. This means that for the general family of boundary conditions given in Eq. (31), the operator $\hat{\mathrm{h}}=\hat{\mathrm{h}}_{\mathrm{adj}}$ is pseudo self-adjoint. Our results are obtained using simple arguments that are part of the general theory of linear operators in an indefinite inner product space (see, for example, Refs. \cite{RefS,RefT}). Let us return to the result given in Eq. (16), namely, \[ \langle\langle\Xi,\hat{\mathrm{h}}\Phi\rangle\rangle=\langle\langle\hat{\mathrm{h}}_{\mathrm{adj}}\Xi,\Phi\rangle\rangle+f[\Xi,\Phi],\tag{A5} \] where $f[\Xi,\Phi]$ is given by (see Eq. (18)) \[ f[\Xi,\Phi]\equiv\frac{\hbar^{2}}{2\mathrm{m}}\,\frac{1}{2}\left.\left[\,\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Xi_{x}\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi-\left((\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Xi\right)^{\dagger}(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi_{x}\,\right]\right|_{a}^{b}.\tag{A6} \] Here, $\hat{\mathrm{h}}$ can act on column vectors $\Phi=\left[\,\phi_{1}\;\,\phi_{2}\,\right]^{\mathrm{T}}\in\mathcal{D}(\hat{\mathrm{h}})$, where $\mathcal{D}(\hat{\mathrm{h}})$ is the domain of $\hat{\mathrm{h}}$, a set of column vectors on which we allow the differential operator $\hat{\mathrm{h}}$ to act, which includes boundary conditions, and $\hat{\mathrm{h}}_{\mathrm{adj}}$ can act on column vectors $\Xi=\left[\,\xi_{1}\;\,\xi_{2}\,\right]^{\mathrm{T}}\in\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$ (in general, $\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$ may not coincide with $\mathcal{D}(\hat{\mathrm{h}})$). By virtue of the result given in Eq. (5), the respective solutions of Eq. (3) are the following: \[ \phi_{1}+\phi_{2}=\phi\quad\mathsf{and}\quad\xi_{1}+\xi_{2}=\xi.\tag{A7} \] The boundary term in Eq. (A6) can be written in terms of $\phi$ and $\xi$, namely, \[ f[\Xi,\Phi]=\frac{\hbar^{2}}{2\mathrm{m}}\left.\left[\,\xi_{x}^{*}\,\phi\,-\xi^{*}\phi_{x}\,\right]\right|_{a}^{b}.\tag{A8} \] First, let us suppose that every column vector $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$ satisfies the boundary conditions $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi(b)=0$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi_{x}(a)=(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Phi_{x}(b)=0$, or, equivalently, $\phi(a)=\phi(b)=0$ and $\phi_{x}(a)=\phi_{x}(b)=0$ (remember the first relation in Eq. (A7)). In this case, the boundary term in Eq. (A5) vanishes, and we have the result \[ \langle\langle\Xi,\hat{\mathrm{h}}\Phi\rangle\rangle=\langle\langle\hat{\mathrm{h}}_{\mathrm{adj}}\Xi,\Phi\rangle\rangle.\tag{A9} \] The latter relation is precisely the one that defines the generalized adjoint differential operator. It is clear that its verification did not require the imposition of any boundary condition on the vectors $\Xi\in\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$. Thus, until now, we have that $\mathcal{D}(\hat{\mathrm{h}})\neq\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$ (in fact, we have that $\mathcal{D}(\hat{\mathrm{h}})\subset\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$, i.e., $\mathcal{D}(\hat{\mathrm{h}})$ is a restriction of $\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$). If the operator $\hat{\mathrm{h}}$ is to be a generalized self-adjoint differential operator, the relation given in Eq. (21), namely, $\hat{\mathrm{h}}=\hat{\mathrm{h}}_{\mathrm{adj}}$, must be verified, and therefore, $\mathcal{D}(\hat{\mathrm{h}})=\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$. To achieve this, we must allow every vector $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$ to satisfy more general boundary conditions, that is, we must relax the domain of $\hat{\mathrm{h}}$. Let us suppose that we have a set of boundary conditions to be imposed on a vector $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$; if the cancellation of the boundary term $f[\Xi,\Phi]$ by these boundary conditions only depends on imposing the same boundary conditions on the vector $\Xi\in\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$, then $\hat{\mathrm{h}}$ will be a generalized self-adjoint differential operator. First, from Eq. (A8), we write the boundary term in Eq. (A5) as follows: \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Xi,\Phi]=\left.\left[\,\phi\,\lambda\xi_{x}^{*}-\xi^{*}\lambda\phi_{x}\,\right]\right|_{a}^{b} \] \[ =\left[\,\phi(b)\,\lambda\xi_{x}^{*}(b)-\xi^{*}(b)\,\lambda\phi_{x}(b)\,\right]-\left[\,\phi(a)\,\lambda\xi_{x}^{*}(a)-\xi^{*}(a)\,\lambda\phi_{x}(a)\,\right]=0.\tag{A10} \] \noindent It is fairly convenient to rewrite the latter two terms using the following identity: \[ z_{1}z_{2}^{*}-z_{3}^{*}z_{4}=\frac{\mathrm{i}}{2}\left[\,(z_{1}+\mathrm{i}z_{4})(z_{3}+\mathrm{i}z_{2})^{*}-(z_{1}-\mathrm{i}z_{4})(z_{3}-\mathrm{i}z_{2})^{*}\,\right],\tag{A11} \] where $z_{1}$, $z_{2}$, $z_{3}$ and $z_{4}$ are complex numbers. The latter relation is the generalization of that given in Eq. (27). In fact, making the replacements $z_{3}\rightarrow z_{1}$ and $z_{4}\rightarrow z_{2}$ in Eq. (A11), the relation given in Eq. (27) is obtained. Then, the following result is derived: \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Xi,\Phi]=\frac{\mathrm{i}}{2}\left[\left(\phi(b)+\mathrm{i}\lambda\phi_{x}(b)\right)\left(\xi(b)+\mathrm{i}\lambda\xi_{x}(b)\right)^{*}-\left(\phi(b)-\mathrm{i}\lambda\phi_{x}(b)\right)\left(\xi(b)-\mathrm{i}\lambda\xi_{x}(b)\right)^{*}\right] \] \[ -\frac{\mathrm{i}}{2}\left[\left(\phi(a)+\mathrm{i}\lambda\phi_{x}(a)\right)\left(\xi(a)+\mathrm{i}\lambda\xi_{x}(a)\right)^{*}-\left(\phi(a)-\mathrm{i}\lambda\phi_{x}(a)\right)\left(\xi(a)-\mathrm{i}\lambda\xi_{x}(a)\right)^{*}\right] \] \[ =\frac{\mathrm{i}}{2}\left[\left(\phi(b)+\mathrm{i}\lambda\phi_{x}(b)\right)\left(\xi(b)+\mathrm{i}\lambda\xi_{x}(b)\right)^{*}+\left(\phi(a)-\mathrm{i}\lambda\phi_{x}(a)\right)\left(\xi(a)-\mathrm{i}\lambda\xi_{x}(a)\right)^{*}\right] \] \[ -\frac{\mathrm{i}}{2}\left[\left(\phi(b)-\mathrm{i}\lambda\phi_{x}(b)\right)\left(\xi(b)-\mathrm{i}\lambda\xi_{x}(b)\right)^{*}+\left(\phi(a)+\mathrm{i}\lambda\phi_{x}(a)\right)\left(\xi(a)+\mathrm{i}\lambda\xi_{x}(a)\right)^{*}\right]=0, \] this means that \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Xi,\Phi]=\frac{\mathrm{i}}{2}\left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} \phi(b)+\mathrm{i}\lambda\phi_{x}(b)\\ \phi(a)-\mathrm{i}\lambda\phi_{x}(a) \end{array}\right] \] \[ -\frac{\mathrm{i}}{2}\left[\begin{array}{c} \xi(b)-\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)+\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\left[\begin{array}{c} \phi(b)-\mathrm{i}\lambda\phi_{x}(b)\\ \phi(a)+\mathrm{i}\lambda\phi_{x}(a) \end{array}\right]=0.\tag{A12} \] Let us now consider a more general set of boundary conditions to be imposed on a vector $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$ (i.e., more general than the boundary conditions that we presented after Eq. (A8)), namely, \[ \left[\begin{array}{c} \phi(b)+\mathrm{i}\lambda\phi_{x}(b)\\ \phi(a)-\mathrm{i}\lambda\phi_{x}(a) \end{array}\right]=\hat{\mathrm{N}}\left[\begin{array}{c} \phi(b)-\mathrm{i}\lambda\phi_{x}(b)\\ \phi(a)+\mathrm{i}\lambda\phi_{x}(a) \end{array}\right],\tag{A13} \] where $\hat{\mathrm{N}}$ in an arbitrary complex matrix. By substituting the latter relation in Eq. (A12), we obtain the following result: \[ \lambda\frac{2\mathrm{m}}{\hbar^{2}}f[\Xi,\Phi] \] \[ =\frac{\mathrm{i}}{2}\left\{ \left(\left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\hat{\mathrm{N}}-\left[\begin{array}{c} \xi(b)-\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)+\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\right)\left[\begin{array}{c} \phi(b)-\mathrm{i}\lambda\phi_{x}(b)\\ \phi(a)+\mathrm{i}\lambda\phi_{x}(a) \end{array}\right]\right\} =0, \] and therefore, \[ \left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\hat{\mathrm{N}}=\left[\begin{array}{c} \xi(b)-\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)+\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]^{\dagger}\tag{A14} \] (This result is because, at this point, we cannot impose any boundary conditions that would completely annul the column vectors in Eq. (A13), for example). Every vector $\Xi\in\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$ should satisfy the same boundary conditions that $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$ satisfies, i.e., the boundary conditions in Eq. (A13), namely, \[ \left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]=\hat{\mathrm{N}}\left[\begin{array}{c} \xi(b)-\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)+\mathrm{i}\lambda\xi_{x}(a) \end{array}\right].\tag{A15} \] Taking the Hermitian conjugate of the matrix relation in Eq. (A14) and substituting this result into Eq. (A15), we obtain \[ \left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]=\hat{\mathrm{N}}\hat{\mathrm{N}}^{\dagger}\left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]; \] therefore, $\hat{\mathrm{N}}$ is a unitary matrix. Thus, the most general family of generalized self-adjoint, or pseudo self-adjoint boundary conditions, for the 1D KFG particle in a box can be written in the form given by Eq. (31), namely, \[ \left[\begin{array}{c} \xi(b)-\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)+\mathrm{i}\lambda\xi_{x}(a) \end{array}\right]=\hat{\mathrm{U}}\left[\begin{array}{c} \xi(b)+\mathrm{i}\lambda\xi_{x}(b)\\ \xi(a)-\mathrm{i}\lambda\xi_{x}(a) \end{array}\right],\tag{A16} \] where $\hat{\mathrm{U}}=\hat{\mathrm{N}}^{-1}$. The fact that the boundary condition for $\Phi\in\mathcal{D}(\hat{\mathrm{h}})$ (for example, given in terms of $\phi$) is the same boundary condition for $\Xi\in\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$ (given in terms of $\xi$) ensures that $\mathcal{D}(\hat{\mathrm{h}})=\mathcal{D}(\hat{\mathrm{h}}_{\mathrm{adj}})$; therefore, $\hat{\mathrm{h}}$, which was already a pseudo-Hermitian operator, is also a pseudo self-adjoint operator. Additionally, the boundary term given in Eq. (14), or in Eq. (A4), vanishes, and therefore, the pseudo inner product is conserved. \section{Concluding remarks} \noindent The KFG Hamiltonian operator, or the Hamiltonian present in the 1D FV wave equation, is formally pseudo-Hermitian; this is well known. In addition, when this operator describes a 1D KFG particle in a box, it is a pseudo-Hermitian operator, but is also a pseudo self-adjoint operator. We obtained the most general set of boundary conditions for this problem, which depends on four real parameters. These results can be extended to the problem of the 1D KFG particle moving on the real line with a penetrable or an impenetrable obstacle at one point, i.e., with a point interaction there. As we have seen, the general set of boundary conditions can be written in terms of the one-component wavefunction for the 1D KFG wave equation $\psi$ and its derivative $\psi_{x}$, evaluated at the ends of the box. More interestingly, the general set can also be precisely written in terms of the two-component column vectors $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi$ and $(\hat{\tau}_{3}+\mathrm{i}\hat{\tau}_{2})\Psi_{x}$, evaluated at the ends of the box. As seen from the examples presented in Section III, $\Psi$ and $\Psi_{x}$, evaluated at $x=a$ and $x=b$, do not necessarily satisfy by themselves the same boundary conditions of the general set. However, any specific boundary condition on $\Psi$ and $\Psi_{x}$ can be obtained from the respective boundary condition that $\psi$ and $\psi_{x}$ satisfy at the ends of the box and by using the relations that arise between the components of the column vector $\Psi=\left[\,\psi_{1}\;\,\psi_{2}\,\right]^{\mathrm{T}}$, and $\psi$, $\psi_{t}$, and the potential $V$ (see Eqs. (5) and (6)). We hope that our article will be of interest to those interested in the fundamental and also technical aspects of relativistic wave equations. Furthermore, to the best of our knowledge, the main results of our article, i.e., those related to general sets of boundary conditions in the 1D KFG theory, do not appear to have been considered before. \section*{Conflicts of interest} \noindent The author declares no conflicts of interest.
\section{Introduction}\label{sec:1} In financial markets, trading moves prices against the trader: buying faster increases execution prices, and selling faster decreases them. This aspect of liquidity, known as market depth Black (1986) or price-impact, has received large attention in optimal liquidation problems, see, for instance, Almgren \& Chriss (2001), Schied et al. (2009), Gatheral \& Schied (2011), Bayrakatar \& Ludkovski (2014), Bank \& Voß (2019), Fruth et al. (2019), and the references therein. In this paper we consider the problem of optimal liquidation for exponential utility function in the Almgren--Chriss model Almgren \& Chriss (2001) with linear temporary impact for the underlying asset. We compute the asymptotic behavior of the exponential utility indifference prices where the risk aversion goes to infinity at a rate which is inversely proportional to the linear price impact which goes to zero. In addition we provide a family of asymptotically optimal hedging strategies. The main motivation for the study of the asymptotic behaviour of utility indifference prices is that in the presence of price impact, super–replication is prohibitively costly, see Guasoni \& Rasonyi (2015). Namely, in the presence of price impact, even in market models such as the Bachelier model or the Black–Scholes model (which are complete in the frictionless setup) there is no practical way to construct a hedging strategy which eliminates all risk from a financial position. This brings us to utility indifference pricing. We divide the proof of our main result (Theorem \ref{thm.1}) into two main steps: the proof of the lower bound and the proof of the upper bound. In the proof of the lower bound we apply Theorem 2.2 from Dolinsky (2022) which gives a dual representation of the certainty equivalent for the case where the investor has to liquidate her position. This dual representation together with the Brownian structure allows to compute the scaling limit of the utility indifference prices. The proof of the upper bound is done by an explicit construction of a family of portfolios which are asymptotically optimal. The rest of the paper is organized as follows. In the next section we introduce the setup and formulate the main results. In Section 3 we prove the lower bound. In Section 4 we prove the upper bound. In Section 5 we derive an auxiliary result from the field of deterministic variational analysis. \section{Preliminaries and Main Results} Let $T<\infty$ be the time horizon and let $W=(W_t)_{t \in [0,T]}$ be a standard one dimensional Brownian motion defined on the filtered probability space $(\Omega, \mathcal{F},(\mathcal F_t)_{t\in [0,T]}, \mathbb P)$ where the filtration $(\mathcal F_t)_{t\in [0,T]}$ satisfies the usual assumptions (right continuity and completeness). We consider a simple financial market with a riskless savings account bearing zero interest (for simplicity) and with a risky asset $S=\left(S_t\right)_{t \in [0,T]}$ with Bachelier price dynamics \begin{equation}\label{2.bac} S_t=S_0+\mu t+\sigma W_t \end{equation} where $S_0\in \mathbb R$ is the initial position of the risky asset, $\mu\in\mathbb R$ is the constant drift and $\sigma>0$ is the constant volatility. Following Almgren \& Chriss (2001), we model the investor’s market impact, in a temporary linear form and, thus, when at time $t$ the investor turns over her position $\Phi_t$ at the rate $\dot{\Phi}_t:=\frac{d\Phi_t}{dt}$ the execution price is $S_t+\frac{\Lambda}{2}\dot{\Phi}_t$ for some constant $\Lambda>0$. The portfolio value at the maturity date is given by \begin{equation}\label{2.1} V^{\Phi}_T:=\int_{0}^T \Phi_t dS_t-\frac{\Lambda}{2}\int_{0}^T \dot{\Phi}^2_t dt. \end{equation} In our setup the investor has to liquidate her position. Thus, the natural class of admissible strategies which we denote by $\mathcal A$ is the set all progressively measurable processes $\Phi=(\Phi_t)_{t\in [0,T]}$ with differentiable trajectories such that $\int_{0}^T \dot{\Phi}^2_t dt<\infty$ and $\Phi_T=0$ almost surely. We assume that the initial number of shares $\Phi_0$ is fixed. Consider a vanilla European option with the payoff $X=f(S_T)$ where $f$ is of the form \begin{equation}\label{2.form} f(x)=\max\left(0, \Theta \left(x-K\right)\right), \ \ x\in\mathbb R \end{equation} for some constants $\Theta,K\in \mathbb R$. Observe that this form includes call/put options. The investor will assess the quality of a hedge by the resulting expected utility. Assuming exponential utility with constant absolute risk aversion $\alpha>0$, the utility indifference price and the certainty equivalent price of the claim $X$ (see, e.g., Carmona (2009) for details on indifference prices) do not depend on the investor's initial wealth and, respectively, take the well-known forms \begin{equation}\label{2.2} \pi(\Lambda,\alpha,\Phi_0,X):= \frac{1}{\alpha}\log\left(\frac{\inf_{\phi\in\mathcal A}\mathbb E_{\mathbb P}\left[\exp\left(\alpha\left(X-V^{\Phi}_T\right)\right)\right]} {\inf_{\phi\in\mathcal A}\mathbb E_{\mathbb P}\left[\exp\left(-\alpha V^{\Phi}_T\right)\right]}\right) \end{equation} and $$c(\Lambda,\alpha,\Phi_0,X):= \frac{1}{\alpha}\log\left(\inf_{\phi\in\mathcal A}\mathbb E_{\mathbb P}\left[\exp\left(\alpha\left(X-V^{\Phi}_T\right)\right)\right]\right).$$ If the risk aversion $\alpha>0$ is fixed, then by applying standard density arguments we obtain that for $\Lambda\downarrow 0$, the above indifference price converges to the unique price of the continuous time complete (frictionless) market given by (\ref{2.bac}). A more interesting limit emerges, however, if we re-scale the investor’s risk-aversion in the form $\alpha:=A/\Lambda$. Hence, we fix $A>0$ and consider the case where the risk aversion is $\alpha(\Lambda):=\frac{A}{\Lambda}$. Before we formulate the main result we need some preparations. Introduce the functions \begin{equation}\label{def1} g(x):=\sup_{y\in\mathbb R} \left[f(x+y)-\frac{y^2}{4\sigma\sqrt A}\right]= \max\left(0, \Theta\left(x-K\right)+\sigma\sqrt A \Theta^2 \right), \ \ x\in \mathbb R \end{equation} and $$ u(t,x):=\mathbb E_{\mathbb P}\left[g(x+\sigma W_{T-t} )\right], \quad (t,x)\in [0,T]\times\mathbb R. $$ The term $u(t,S_t)$ represents the price at time $t$ of a European option with the payoff $g(S_T)$ in the complete market given by (\ref{2.bac}). It is well known that $u\in C^{1,2}([0,T)\times\mathbb R)$ solves the PDE \begin{equation}\label{PDE} \frac{\partial u}{\partial t}+\frac{\sigma^2}{2}\frac{\partial^2 u}{\partial x^2}=0 \ \ \ \ \mbox{in} \ \ [0,T)\times\mathbb R. \end{equation} Next, let $\Lambda>0$ and let $$\rho=\rho(\Lambda):=\frac{\sigma^2 \alpha(\Lambda)}{\Lambda}=\frac{\sigma^2 A }{\Lambda^2}$$ be the risk-liquidity ratio. Consider the (random) ODE on the interval $[0,T]$ \begin{eqnarray}\label{ODE} &\dot{F}_t=\sqrt\rho\left(\frac{\cosh(\sqrt\rho (T-t))}{2 \cosh^2\left(\frac{\sqrt\rho (T-t)}{2}\right)}\frac{\partial u}{\partial x}(t,S_t-\sigma\sqrt A F_t)-\tanh(\sqrt\rho (T-t))F_t\right), \\ &\mbox{with} \ \mbox{the} \ \mbox{initial} \ \mbox{condition} \ \ F_0=\Phi_0\coth(\sqrt\rho T)\nonumber. \end{eqnarray} From the linear growth of $g$ it follows that for any $\epsilon>0$ the functions $\frac{\partial u}{\partial x},\frac{\partial^2 u}{\partial x^2}$ are uniformly bounded in the domain $[0,T-\epsilon]\times\mathbb R$. In particular $\frac{\partial u}{\partial x}$ is Lipschitz continuous with respect to $x$ in the domain $[0,T-\epsilon]\times\mathbb R$. Observe that the functions $\frac{\cosh(\sqrt\rho (T-t))}{2 \cosh^2\left(\frac{\sqrt\rho (T-t)}{2}\right)}, \tanh(\sqrt\rho (T-t))$ are bounded. Hence, from the standard theory of ODE (see Walter (1998), Chapter II, Section 6) we obtain that there exists a unique solution to (\ref{ODE}) which we denote by $F^{\Lambda}=(F^{\Lambda}_t)_{t\in [0,T)}$ and the solution is Lipschitz continuous, and so $\lim_{t\rightarrow T-}F^{\Lambda}_t$ exists. Set $F^{\Lambda}_T:=\lim_{t\rightarrow T-}F^{\Lambda}_t$ and define \begin{equation}\label{2.3} \Phi^{\Lambda}_t:=\tanh\left(\sqrt{\rho(\Lambda)} (T-t)\right) F^{\Lambda}_t, \ \ t\in [0,T]. \end{equation} \begin{theorem}\label{thm.1} For vanishing linear price impact $\Lambda \downarrow 0$ and re-scaled high risk-aversion $A/\Lambda$ with $A>0$ fixed, the certainty equivalent of $X=\max\left(0, \Theta \left(S_T-K\right)\right)$ has the scaling limit \begin{equation}\label{1} \lim_{\Lambda\downarrow 0} c(\Lambda,A/\Lambda,\Phi_0,X)= u\left(0,S_0-\sigma\sqrt A\Phi_0\right)+\frac{\sigma\sqrt A \Phi^2_0 }{2}. \end{equation} Moreover, the trading strategies given by (\ref{2.3}) are asymptotically optimal, i.e. \begin{equation}\label{2} \lim_{\Lambda\downarrow 0}\frac{\Lambda}{A} \log\left(\mathbb E_{\mathbb P}\left[\exp\left(\frac{A}{\Lambda}\left(X-V^{\Phi^{\Lambda}}_T\right)\right)\right] \right)=u\left(0,S-\sigma\sqrt A\Phi_0\right)+\frac{\sigma\sqrt A \Phi^2_0 }{2}. \end{equation} \end{theorem} From Theorem \ref{thm.1} we obtain immediately the following corollary which says that the asymptotic value of the utility indifference prices is equal to the price of the vanilla European option with the payoff $g(S_T)$ and the shifted initial stock price $S_0-\sigma \sqrt A\Phi_0$. \begin{corollary} For vanishing linear price impact $\Lambda \downarrow 0$ and re-scaled high risk-aversion $A/\Lambda$ with $A>0$ fixed, the utility indifference price of $X$ has the scaling limit $$ \lim_{\Lambda\downarrow 0}\pi(\Lambda,A/\Lambda,\Phi_0,X)=u\left(0,S_0-\sigma\sqrt A\Phi_0\right).$$ \end{corollary} \begin{proof} Apply (\ref{2.3}) and take $X\equiv 0$ for the denominator of (\ref{2.2}). \end{proof} \begin{remark}\label{rem0} In the proof of the lower bound (given in the next section) we only assume that the payoff function $f$ is Lipschitz continuous. By a more careful analysis we can prove that in fact there is an equality, namely (\ref{1}) holds true for any payoff function $X=f(S_T)$ with a Lipschitz continuous $f$. Unfortunately, the proof of (\ref{2}) (given in Section 4) uses the specific structure of the payoff given by (\ref{2.form}). This together with the fact that the most common vanilla options in real markets are of the form (\ref{2.form}) led us to assume from the beginning that the payoff is of this form. Let us emphasize that our results can be extended to the multi--asset case with a similar proof. In the multi asset case the volatility $\sigma$ is replaced with a positive definite matrix and the functions $\coth$ and $\tanh$ are viewed as matrix valued functions. \end{remark} \begin{remark}\label{rem1} Theorem \ref{thm.1} can be viewed as an extension of the main result in Dolinsky \& Moshe (2022), for the case where the investor has to liquidate her portfolio at the maturity date. In both cases (with or without liquidation) the scaling limit of the utility indifference prices is equal to $\mathbb E \left[h\left(x+\sigma W_T\right)\right]$ for a modified function $h$. In the present paper $$h(x)=\sup_{y\in\mathbb R} \left[f(x+y)-\frac{y^2}{4\sigma\sqrt A}\right]$$ while in Dolinsky\& Moshe (2022) the modified payoff is smaller and given by $$h(x)=\sup_{y\in\mathbb R} \left[f(x+y)-\frac{y^2}{2\sigma\sqrt A}\right].$$ Next, we discuss the constructed asymptotically optimal portfolios. From (\ref{2.3}) we have \begin{equation}\label{4.0+} \dot{\Phi}^{\Lambda}_t=\sqrt{\rho(\Lambda)}\left(\tanh\left(\frac{\sqrt{\rho(\Lambda)}\left(T-t\right)}{2} \right)\Upsilon^{\Lambda}_t- \coth\left(\sqrt{\rho(\Lambda)} \left(T-t\right)\right)\Phi^{\Lambda}_t\right) \end{equation} where $\rho(\Lambda):=\frac{\sigma^2 A}{\Lambda^2}$ and $\Upsilon^{\Lambda}_t:=\frac{\partial u}{\partial x}(t,S_t-\sigma\sqrt A F^{\Lambda}_t)$, $t\in [0,T)$. Thus, we have a mean reverting structure which combines trucking the $\Delta$--hedging strategy of a modified claim $g$ and liquidating the position at the maturity date. As time $t$ approaches maturity the weight of the $\Delta$--hedging trading strategy becomes smaller and the investor trading is mainly towards liquidation. This is in contrast to the asymptotically optimal portfolios in Dolinsky and \& Moshe (2022) which are just based on trucking the appropriate $\Delta$--hedging strategy. \end{remark} \section{Proof of the Lower Bound} In this section we prove the following statement. \begin{proposition}\label{prop3.1} For vanishing linear price impact $\Lambda \downarrow 0$ and re-scaled high risk-aversion $A/\Lambda$ with $A>0$ fixed, we have the following lower bound \begin{equation*}\label{3} \lim\inf_{\Lambda\downarrow 0} c(\Lambda,A/\Lambda,\Phi_0,X)\geq u\left(0,S_0-\sigma\sqrt A\Phi_0\right)+\frac{\sigma\sqrt A \Phi^2_0 }{2}. \end{equation*} \end{proposition} We start with the following Lemma. \begin{lemma}\label{lem.10} Denote by $\Gamma$ the set of all progressively measurable processes $\theta=(\theta_t)_{t\in [0,T]}$ such that $\theta\in L^2(dt\otimes\mathbb P)$ and let $\mathcal M$ be the set of all $\mathbb P$--martingales $M=(M_t)_{t\in [0,T)}$ which are defined on the half-open interval $[0,T)$ and satisfy $||M||_{L^2(dt\otimes\mathbb P)}:=\mathbb E_{\mathbb P}\left[\int_{0}^T M^2_t dt\right]<\infty$. Then, for any $\Lambda,\alpha>0$ we have \begin{eqnarray*} &c(\Lambda,\alpha,\Phi_0,X)\\ &\geq \sup_{(\theta,M)\in \Gamma\times\mathcal M}\mathbb E_{\mathbb P}\left[ f\left(S_T+\sigma\int_{0}^T \theta_t dt\right)-\frac{1}{2\alpha}\int_{0}^T \theta^2_t dt\right.\\ &\left.-\Phi_0(M_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T \left|S_0+\mu t+\sigma\int_{0}^t \theta_s ds-M_t\right|^2 dt\right]. \end{eqnarray*} \end{lemma} \begin{proof} Denote by $\mathcal Q$ the set of all equivalent probability measures $\mathbb Q\sim\mathbb P$ with finite entropy $\mathbb E_{\mathbb Q}\left[\log\left(\frac{d\mathbb Q}{d\mathbb P}\right)\right]<\infty$ relative to $\mathbb P$. For any $\mathbb Q\in\mathcal Q$ let $\mathcal M^{\mathbb Q}$ be the set of all $\mathbb Q$--martingales $M^{\mathbb Q}=(M^{\mathbb Q}_t)_{t\in [0,T)}$ which are defined on the half-open interval $[0,T)$ and satisfy $||M^{\mathbb Q}||_{L^2(dt\otimes\mathbb Q)}:=\mathbb E_{\mathbb Q}\left[\int_{0}^T |M^{\mathbb Q}_t|^2 dt\right]<\infty$. From the linear growth of $f$ it follows that $\mathbb E_{\mathbb P}\left[e^{\alpha X}\right]<\infty$. Thus, define the probability measure $\tilde{\mathbb P}$ by $\frac{d\tilde{\mathbb P}}{d\mathbb P}:=\frac{e^{\alpha X}}{\mathbb E_{\mathbb P}\left[e^{\alpha X}\right]}.$ The Cauchy–Schwarz inequality yields that there exists $a>0$ such that $\mathbb E_{\tilde{\mathbb P}}\left[\exp\left(a\sup_{0 \leq t\leq T} S^2_t\right)\right]<\infty.$ Hence, Assumption 2.1 in Dolinsky (2022) holds true. Thus, by applying Theorem 2.2 in Dolinsky (2022) for the probability measure $\tilde{\mathbb P}$ and the simple equality $$\mathbb E_{\mathbb Q}\left[\log\left(\frac{d\mathbb Q}{d\tilde{\mathbb P}}\right)\right]= \mathbb E_{\mathbb Q}\left[\log\left(\frac{d\mathbb Q}{d\mathbb P}\right)-\alpha X\right]+ \alpha \log\left(\mathbb E_{\mathbb P}\left[e^{\alpha X}\right]\right) \ \ \forall \mathbb Q\in\mathcal Q$$ we obtain \begin{eqnarray}\label{3.21} &c(\Lambda,\alpha,\Phi_0,X)\\ &=\sup_{\mathbb Q\in\mathcal Q}\sup_{M^{\mathbb Q}\in\mathcal M^{\mathbb Q}}\mathbb E_{\mathbb Q}\left[X-\frac{1}{\alpha}\log\left(\frac{d\mathbb Q}{d\mathbb P}\right)-\Phi_0(M^{\mathbb Q}_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T |M^{\mathbb Q}_t-S_t|^2 dt\right].\nonumber \end{eqnarray} Next, Let $C[0,T]$ be the space of continuous functions $z:[0,T]\rightarrow\mathbb R$ equipped with the uniform norm $||z||:=\sup_{0\leq t \leq T} |z_t|$. Denote by $\hat\Gamma\subset\Gamma$ the set of all continuous and bounded processes $\theta=(\theta_t)_{t\in [0,T]}$ of the form $\theta=\tau(W)$ where $\tau: C[0,T]\rightarrow C[0,T]$ is Lipschitz continuous and predictable (i.e. $\tau_t(x)=\tau_t(y)$ if $x_{[0,t]}=y_{[0,t]}$). From standard density arguments and the Lipschitz continuity of $f$ it follows that in order to complete the proof of the Lemma it is sufficient to show that for any $(\theta,M)\in \hat\Gamma\times\mathcal M$ we have \begin{eqnarray}\label{3.22} &c(\Lambda,\alpha,\Phi_0,X)\nonumber\\ &\geq \mathbb E_{\mathbb P}\left[ f\left(S_T+\sigma\int_{0}^T \theta_t dt\right)-\frac{1}{2\alpha}\int_{0}^T \theta^2_t dt\right.\\ &\left.-\Phi_0(M_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T \left|S_0+\mu t+\sigma\int_{0}^t \theta_s ds-M_t\right|^2 dt\right].\nonumber \end{eqnarray} To this end let $(\theta,M)\in\hat\Gamma\times\mathcal M$ such that $\theta=\tau(W)$ where $\tau$ as above. Consider the stochastic differential equation (SDE) \begin{equation}\label{add} dY_t=dW_t-\tau_t(Y)dt, \ \ t\in [0,T] \end{equation} with the initial condition $Y_0=0$. Theorem 2.1 from Chapter IX in Revuz \& Yor (1999) yields that there exists a unique strong solution to the above SDE. From the Girsanov theorem it follows that there exists a probability measure $\mathbb Q\in\mathcal Q$ such that $W^{\mathbb Q}:=Y$ is a Brownian motion with respect to $\mathbb Q$. From (\ref{2.bac}) and (\ref{add}) we obtain that the distribution of $(S_t)_{t\in [0,T]}$ under $\mathbb Q$ is equal to the distribution of $\left(S_t+\sigma \int_{0}^t\theta_s ds\right)_{t\in [0,T]}$ under $\mathbb P$. Moreover, $$\mathbb E_{\mathbb Q}\left[\frac{1}{\alpha}\log\left(\frac{d\mathbb Q}{d\mathbb P}\right)\right]= \mathbb E_{\mathbb Q}\left[\frac{1}{2\alpha}\int_{0}^T \tau^2_t(Y) dt\right]= \mathbb E_{\mathbb P}\left[\frac{1}{2\alpha}\int_{0}^T \theta^2_t dt\right].$$ Finally, choose $M^{\mathbb Q}\in\mathcal M^{\mathbb Q}$ such that the law of $(W^{\mathbb Q}, M^{\mathbb Q})$ under $\mathbb Q$ is equal to the law of $(W,M+\sigma W)$ under $\mathbb P$. We conclude, \begin{eqnarray*} &\mathbb E_{\mathbb Q}\left[X-\frac{1}{\alpha}\int_{0}^T\log\left(\frac{d\mathbb Q}{d\mathbb P}\right)-\Phi_0(M^{\mathbb Q}_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T |M^{\mathbb Q}_t-S_t|^2 dt\right]\\ &=\mathbb E_{\mathbb P}\left[ f\left(S_T+\sigma\int_{0}^T \theta_t dt\right)-\frac{1}{2\alpha}\int_{0}^T \theta^2_t dt\right.\\ &\left.-\Phi_0(M_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T \left|S_0+\mu t+\sigma\int_{0}^t \theta_s ds-M_t\right|^2 dt\right]. \end{eqnarray*} This together with (\ref{3.21}) gives (\ref{3.22}) as required. \end{proof} Next, we prove the following. \begin{lemma}\label{lem.11} Denote by $L^2_0(\mathcal F_T,\mathbb P)$ the set of all random variables of the form \begin{equation}\label{3.rep} Z=\iota+\int_{0}^T\kappa_t dW_t \end{equation} for some $\iota\in\mathbb R$ and a predictable and bounded process $\kappa=(\kappa_t)_{t\in [0,T]}$ such that $\kappa_{[T-\epsilon,T]}\equiv 0$ for some (deterministic) $\epsilon>0$. Let $Z\in L^2_0(\mathcal F_T,\mathbb P)$. There exists a constant $\hat C>0$ (may depend on $Z$) such that for any $\Lambda \in (0,1)$ \begin{eqnarray*}\label{3.26} &\sup_{(\theta,M)\in \Gamma\times\mathcal M}\mathbb E_{\mathbb P}\left[ f\left(S_T+\sigma\int_{0}^T \theta_t dt\right)-\frac{1}{2\alpha(\Lambda)}\int_{0}^T \theta^2_t dt\right.\nonumber\\ &\left.-\Phi_0(M_0-S_0)-\frac{1}{2\Lambda}\int_{0}^T \left|S_0+\mu t+\sigma\int_{0}^t \theta_s ds-M_t\right|^2 dt\right]\nonumber\\ &\geq\mathbb E_{\mathbb P}\left[f\left(S_0+\sigma W_T+Z\right)-\frac{\left(Z+\sigma\sqrt A\Phi_0\right)^2}{4\sigma\sqrt A}\right]+\frac{\sigma\sqrt A\Phi^2_0}{2}-\hat C\Lambda \end{eqnarray*} where, as before $\alpha(\Lambda)=\frac{A}{\Lambda}$. \end{lemma} \begin{proof} Let $Z$ given by (\ref{3.rep}) and let $\Xi$ be the map from Proposition \ref{lem5.1}. Define the deterministic function $\nu:[0,T]\rightarrow\mathbb R$ by $\nu:=\Xi_T(\Lambda,\iota,\Phi_0)$ and for any $s<T$ define the stochastic process $(l_{\cdot,s})_{\cdot\in [s,T]}$ by $(l_{\cdot,s})_{\cdot\in [s,T]}=\Xi_{T-s}(\Lambda, \kappa_s,0)$. Next, introduce $(\theta,M)\in \Gamma\times \mathcal M$ \begin{eqnarray*} &\theta_t:=\frac{\dot{\nu}_t-\mu}{\sigma}+\frac{1}{\sigma}\int_{0}^t \frac{\partial l_{t,s}}{\partial t} d W_s, \ \ t\in [0,T],\\ &M_t:=S_0+\frac{\int_{0}^T \nu_t dt-\Phi_0\Lambda}{T}+\sigma \int_{0}^t \left(1+\frac{1}{T-s}\int_{s}^T l_{t,s} dt\right) d W_s, \ \ t\in [0,T]. \end{eqnarray*} Observe that from the definition of $\Xi$ we have $$\nu_0=0, \ \ \nu_T=\iota \ \ \mbox{and} \ \ l_{s,s}=0, \ \ l_{T,s}=\kappa_s \ \ \forall s.$$ This together with the Fubini theorem, the It\^{o} Isometry, (\ref{2.bac}) and (\ref{3.rep}) gives \begin{eqnarray}\label{3.27} &\mathbb E_{\mathbb P}\left[ f\left(S_T+\sigma\int_{0}^T \theta_t dt\right)-\frac{1}{2\alpha(\Lambda)}\int_{0}^T \theta^2_t dt -\Phi_0(M_0-S_0)-\right.\nonumber\\ &\left.\frac{1}{2\Lambda}\int_{0}^T \left|S_0+\mu t+\sigma\int_{0}^t \theta_s ds-M_t\right|^2 dt\right]\nonumber\\ &=\mathbb E_{\mathbb P}\left[f\left(S_0+\sigma W_T+Z\right)\right]\\ &+\frac{\mu \Lambda \iota}{\sigma^2 A}-\frac{\mu^2\Lambda }{2 \sigma^2 A}- I(\Lambda, \nu)-\int_{0}^{T-\epsilon} \mathbb E_{\mathbb P} \left[J_s(\Lambda,l) \right]ds\nonumber \end{eqnarray} where $$ I(\Lambda,\nu):=\frac{\Lambda}{ 2 \sigma^2 A}\int_{0}^T\dot{\nu}_t^2 dt+ \frac{1}{2\Lambda}\left(\int_{0}^T \nu^2_t dt-\frac{1}{T}\left(\Phi_0\Lambda-\int_{0}^T\nu_t dt\right)^2 \right) $$ and $$J_s(\Lambda,l):=\frac{\Lambda}{2 \sigma^2 A}\int_{s}^T \left(\frac{\partial l_{t,s}}{\partial t}\right)^2 dt+ \frac{1}{2\Lambda} \left(\int_{s}^T l^2_{t,s} dt-\frac{1}{T-s}\left(\int_{s}^T l_{t,s} dt\right)^2\right). $$ From Proposition \ref{lem5.1} there exists a constant $C>0$ (may depend on $\iota$ and $\kappa$) such that \begin{equation}\label{3.28} \left|I(\Lambda, \nu)-\frac{\left(\iota+\sigma\sqrt A\Phi_0\right)^2}{4\sigma\sqrt A}+\frac{\sigma\sqrt A\Phi^2_0}{2}\right|\leq C\Lambda \end{equation} and for any $s\in [0,T-\epsilon]$ \begin{equation}\label{3.29} \left|J_s(\Lambda,l)-\frac{\kappa^2_s}{4\sigma\sqrt A}\right|\leq C\Lambda. \end{equation} By combining the It\^{o} Isometry and (\ref{3.27})--(\ref{3.29}) we complete the proof. \end{proof} We now have all the pieces in place that we need for the \textbf{completion of the proof of Proposition \ref{prop3.1}}. \begin{proof} Recall the definition of $g$ given in (\ref{def1}). From the Lipschitz continuity of $f$ it follows that there exists a bounded (measurable) function $\zeta:\mathbb R\rightarrow\mathbb R$ such that \begin{equation}\label{final1} g(x)= f\left(x+\zeta(x)\right)-\frac{\zeta^2(x)}{4\sigma \sqrt A }, \ \ \ \forall x\in\mathbb R. \end{equation} Choose a sequence $Z_n\in L^2_0(\mathcal F_T,\mathbb P)$, $n\in\mathbb N$ such that $$\lim_{n\rightarrow\infty} Z_n=\zeta(S_0-\sigma\sqrt A\Phi_0+ \sigma W_T)-\sigma \sqrt A\Phi_0$$ where the limit is in $L^2(\mathbb P).$ From Lemmas \ref{lem.10}--\ref{lem.11} and (\ref{final1}) we obtain \begin{eqnarray*} &\lim\inf_{\Lambda\downarrow 0}c\left(\Lambda,A/\Lambda,\Phi_0,X\right)\\ &\geq \sup_{n\in\mathbb N} \mathbb E_{\mathbb P}\left[f\left(S_0+\sigma W_T+Z_n\right)-\frac{\left(Z_n+\sigma\sqrt A\Phi_0\right)^2}{4\sigma\sqrt A}\right]+\frac{\sigma\sqrt A\Phi^2_0}{2}\\ &\geq\mathbb E_{\mathbb P}\left[g\left(S_0-\sigma\sqrt A\Phi_0+\sigma W_T\right)\right]+ \frac{\sigma\sqrt A\Phi^2_0}{2}\\ &=u\left(0,S_0-\sigma\sqrt A\Phi_0\right)+\frac{\sigma\sqrt A \Phi^2_0 }{2}. \end{eqnarray*} \end{proof} \section{Proof of the Upper Bound}\label{sec:4} In order to complete the proof of Theorem \ref{thm.1} it remains to establish the following result. \begin{proposition}\label{prop2} Recall the trading strategies $\Phi^{\Lambda}$, $\Lambda>0$ given by (\ref{2.3}). Then, $$\lim\sup_{\Lambda\downarrow 0}\frac{\Lambda}{A} \log\left(\mathbb E_{\mathbb P}\left[\exp\left(\frac{A}{\Lambda}\left(X-V^{\Phi^{\Lambda}}_T\right)\right)\right] \right)\leq u\left(0,S-\sigma\sqrt A\Phi_0\right)+\frac{\sigma\sqrt A \Phi^2_0 }{2}.$$ \end{proposition} \begin{proof} The proof will be done in three steps.\\ \textbf{Step I: }\ In this step we use the specific structure of the payoff $f$ given by (\ref{2.form}). Let us show that for any $\Lambda>0$ \begin{equation}\label{4.--} g\left(S_T-\sigma\sqrt A F^{\Lambda}_T\right)\geq f(S_T)- \frac{\sigma\sqrt A |\Phi_0 \Theta|}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)} \end{equation} where, as before $\rho(\Lambda):=\frac{\sigma^2 A}{\Lambda^2}$. Fix $\Lambda>0$. From (\ref{ODE}) $$\frac{d}{dt}\left[\frac{F^{\Lambda}_t}{\cosh\left(\sqrt{\rho(\Lambda)} (T-t)\right)}\right]= \frac{\sqrt{\rho(\Lambda)}}{2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)}\Upsilon^{\Lambda}_t, \ \ \ t\in [0,T] $$ where, recall that $\Upsilon^{\Lambda}_t:=\frac{\partial u}{\partial x}\left(t,S_t-\sigma\sqrt A F^{\Lambda}_t\right)$, $t\in [0,T)$. Clearly, $|\Upsilon^{\Lambda}_t|\leq \Theta$, and so, \begin{eqnarray*} &|F^{\Lambda}_T|\leq \left|\frac{F^{\Lambda}_0}{\cosh\left(\sqrt{\rho(\Lambda)} T\right)}\right|+\Theta\int_{0}^T \frac{\sqrt{\rho(\Lambda)}} {2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)} dt\\ &\leq \left|\frac{\Phi_0}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)}\right|+|\Theta| . \end{eqnarray*} This together with (\ref{2.form}) and (\ref{def1}) gives (\ref{4.--}).\\ \textbf{Step II:} In this step we prove that there exists a constant $\tilde C>0$ such tht \begin{equation}\label{4.0} \left|\int_{0}^ T\Upsilon^{\Lambda}_t dt- \int_{0}^T \Phi^{\Lambda}_t dt\right|\leq \tilde C\Lambda, \ \ \forall \Lambda>0. \end{equation} Fix $\Lambda>0$. From (\ref{4.0+}) \begin{eqnarray*} &\frac{d}{dt}\left[\frac{\Phi^{\Lambda}_t}{\cosh\left(\sqrt{\rho(\Lambda)} (T-t)\right)}\right]\\ &= \frac{\sqrt{\rho(\Lambda)}}{2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)} \tanh\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)\Upsilon^{\Lambda}_t, \ \ \ t\in [0,T]. \end{eqnarray*} We get \begin{eqnarray*} &\Phi^{\Lambda}_t=\Phi_0\frac{\cosh\left(\sqrt{\rho(\Lambda)}(T-t)\right)}{\cosh(\sqrt{\rho(\Lambda)} T)} \\ &+\int_{0}^t \frac{\sqrt{\rho(\Lambda)}\cosh\left(\sqrt {\rho(\Lambda)} (T-t)\right)}{2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-s)}{2}\right)}\tanh\left(\frac{\sqrt{\rho(\Lambda)} (T-s)}{2}\right)\Upsilon^{\Lambda}_s ds \end{eqnarray*} and so, from the Fubini theorem $$\int_{0}^T \Phi^{\Lambda}_t dt-\int_{0}^T \Upsilon^{\Lambda}_t dt=\Phi_0\frac{\tanh \left(\sqrt{\rho(\Lambda)} T\right)}{\sqrt{\rho(\Lambda)}} -\int_{0}^T \frac{\Upsilon^{\Lambda}_s}{\cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-s)}{2}\right)} ds. $$ This together with the simple integral $$\int_{0}^T \frac{ds}{\cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-s)}{2}\right)} = \frac{2\tanh\left(\frac{\sqrt{\rho(\Lambda)} T}{2}\right)}{\sqrt{\rho(\Lambda)}}$$ and the inequality $|\Upsilon^{\Lambda}_t|\leq \Theta$ gives (\ref{4.0}). \\ \textbf{Step III:} In this step we complete the proof. Fix $\Lambda>0$ and introduce the process $$M^{\Lambda}_t:=\exp\left(\frac{A}{\Lambda}\left(u\left(t,S_t-\sigma\sqrt A F^{\Lambda}_t\right) +\frac{\sigma\sqrt A F^{\Lambda}_t\Phi^{\Lambda}_t}{2}- V^{\Phi^{\Lambda}}_t\right)\right), \ \ t\in [0,T].$$ From the It\^{o} formula, (\ref{2.1}), (\ref{PDE})--(\ref{2.3}) and (\ref{4.0+}) we obtain \begin{eqnarray*}\label{4.2} &\frac{dM^{\Lambda}_t}{M^{\Lambda}_t}=\frac{A}{\Lambda}\left( \Upsilon^{\Lambda}_t- \Phi^{\Lambda}_t \right) dS_t+\frac{\sigma^2 A^2}{2\Lambda^2}\left( \Upsilon^{\Lambda}_t- \Phi^{\Lambda}_t \right)^2 dt\nonumber\\ &-\frac{\sigma^2 A^2}{\Lambda^2} \Upsilon^{\Lambda}_t \left(\frac{\cosh\left(\sqrt{\rho(\Lambda)} (T-t)\right)}{2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)}\Upsilon^{\Lambda}_t-\Phi^{\Lambda}_t\right)dt\nonumber\\ &+\frac{\sigma^2 A^2}{2\Lambda^2}\left(\tanh\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)\Upsilon^{\Lambda}_t- \coth\left(\sqrt{\rho(\Lambda)} (T-t)\right)\Phi^{\Lambda}_t\right)^2dt\nonumber\\ &+\frac{\sigma^2 A^2}{2\Lambda^2}\Phi^{\Lambda}_t \left(\frac{\cosh\left(\sqrt{\rho(\Lambda)} (T-t)\right)} {2 \cosh^2\left(\frac{\sqrt{\rho(\Lambda)} (T-t)}{2}\right)}\Upsilon^{\Lambda}_t-\Phi^{\Lambda}_t\right)dt\nonumber\\ &+\frac{\sigma^2 A^2}{2\Lambda^2}\coth\left(\sqrt{\rho(\Lambda)} (T-t)\right)\Phi^{\Lambda}_t\\ &\times\left(\tanh\left(\frac{\sqrt{\rho(\Lambda)}(T-t)}{2}\right)\Upsilon^{\Lambda}_t- \coth\left(\sqrt{\rho(\Lambda)} (T-t)\right)\Phi^{\Lambda}_t\right)\nonumber\\\\ &=\frac{A}{\Lambda}\left(\Upsilon^{\Lambda}_t-\Phi^{\Lambda}_t \right) dS_t \end{eqnarray*} where the last equality follows from simple calculations. Hence, from (\ref{2.bac}) it follows that the process $$N^{\Lambda}_t:=\exp\left(-\frac{\mu A\int_{0}^t \left(\Upsilon^{\Lambda}_t-\Phi^{\Lambda}_s\right)ds}{\Lambda}\right)M^{\Lambda}_t, \ \ t\in [0,T]$$ is a local--martingale, and so from the obvious inequality $N^{\Lambda}>0$ we conclude that this process is a super--martingale. Finally, \begin{eqnarray*} &\frac{\Lambda}{A}\log\left(\mathbb E_{\mathbb P}\left[\exp\left(\frac{A}{\Lambda}\left(X-V^{\Phi^{\Lambda}}_T\right)\right)\right]\right)\\ &\leq \frac{\Lambda}{A}\log\left(\mathbb E_{\mathbb P}[M^{\Lambda}_T]\right)+\frac{\sigma\sqrt A |\Phi_0 \Theta|}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)}\\ &\leq \frac{\Lambda}{A}\log\left(\mathbb E_{\mathbb P}[N^{\Lambda}_T]\right)+\tilde C|\mu|\Lambda+\frac{\sigma\sqrt A |\Phi_0 \Theta|}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)}\\ &\leq \frac{\Lambda}{A}\log \left(N^{\Lambda}_0\right)+\tilde C|\mu|\Lambda+\frac{\sigma\sqrt A |\Phi_0 \Theta|}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)}\\ &=u\left(0,S_0-\sigma\sqrt A\Phi_0\coth\left(\sqrt{\rho(\Lambda)} T\right)\right)+\frac{\sigma\sqrt A\Phi^2_0 \coth \left(\sqrt{\rho(\Lambda)} T\right)}{2}\\ &+\tilde C|\mu|\Lambda+\frac{\sigma\sqrt A |\Phi_0 \Theta|}{\sinh\left(\sqrt{\rho(\Lambda)} T\right)}. \end{eqnarray*} The first inequality follows from (\ref{4.--}) and the relations $u(T,\cdot)=g(\cdot)$, $\Phi^{\Lambda}_T=0$. The second inequality is due to (\ref{4.0}). The super--martingale property of $N^{\Lambda}$ gives the third inequality. The equality is due to (\ref{2.3}). By taking $\Lambda\downarrow 0$ we complete the proof. \end{proof} \section{Auxiliary Result}\label{sec:5} For any $\mathbb T\in (0,T]$ and $x\in\mathbb R$ let $C_{0,x}[0,\mathbb T]$ be the space of all continuous functions $z:[0,\mathbb T]\rightarrow \mathbb R$ which satisfy $z_0=0$ and $z_{\mathbb T}=x$. \begin{proposition}\label{lem5.1} For any $\mathbb T\in (0,T]$ there exists a measurable map $\Xi_{\mathbb T}:(0,1)\times \mathbb R^2\rightarrow C[0,\mathbb T)$ such that for any $\Lambda\in (0,1)$ and $x,\phi\in\mathbb R$ the continuous function $\Xi_{\mathbb T}(\Lambda,x,\phi)\in C_{0,x}[0,\mathbb T]$ is the unique minimizer for the optimization problem \begin{equation}\label{5.1-} \min_{\delta\in C_{0,x}[0,\mathbb T]}\left[\frac{\Lambda}{2 \sigma^2 A}\int_{0}^{\mathbb T}\dot{\delta}_t^2 dt+ \frac{1}{2\Lambda}\left(\int_{0}^{\mathbb T}\delta^2_t dt-\frac{1}{\mathbb T}\left(\phi\Lambda-\int_{0}^{\mathbb T}\delta_t dt\right)^2\right)\right]. \end{equation} Moreover, denote the corresponding value by $V_{\mathbb T}(\Lambda,x,\phi)$. Then, for any $\epsilon>0$ and a compact set $K\subset \mathbb R^2$ there exists a constant $\hat C$ (may depend on $\epsilon$ and $K$) such that \begin{equation}\label{5.1+} \left|V_{\mathbb T}(\Lambda,x,\phi)-\frac{\left(x+\sigma\sqrt A\phi\right)^2}{4\sigma\sqrt A}+\frac{\sigma\sqrt A\phi^2}{2}\right|\leq \hat C\Lambda, \ \ \forall (\mathbb T,\Lambda, x,\phi)\in [\epsilon,T]\times (0,1)\times K. \end{equation} \end{proposition} \begin{proof} Fix $(\mathbb T,\Lambda,x,\phi)\in [\epsilon,T]\times (0,1)\times \mathbb R^2$. First we minimize the pattern given by (\ref{5.1-}) under the additional constraint that $\int_{0}^\mathbb T\delta_t dt$ is given. Then, we will find the optimal $\int_{0}^\mathbb T \delta_t dt$. For any $y\in\mathbb R$ let $C^y_{0,x}[0,\mathbb T]\subset C_{0,x}[0,\mathbb T]$ be the subset of all functions $\delta\in C_{0,x}[0,\mathbb T]$ which satisfy $\int_{0}^{\mathbb T}\delta_t dt=y$. Consider the minimization problem $$\min_{\delta\in C^y_{0,x}[0,\mathbb T]} \int_{0}^{\mathbb T} H(\dot \delta_t,\delta_t)dt$$ where $H(v_1,v_2):=\frac{\Lambda}{2\sigma^2 A}v^2_1+\frac{1}{2\Lambda} v^2_2$ for $v_1,v_2\in\mathbb R$. This optimization problem is convex and so it has a unique solution which has to satisfy the Euler–Lagrange equation (for details see Gelfand \& Fomin (1963)) $\frac{d}{dt}\frac{\partial H}{\partial \dot \delta_t}=\lambda+\frac{d}{dt}\frac{\partial H}{\partial \delta_t}$ for some constant $\lambda>0$ (lagrange multiplier due to the constraint $\int_{0}^{\mathbb T} \delta_t dt=y$). Thus, the optimizer which we denote by $\hat\delta$ solves the ODE $\ddot{\hat\delta}_t-\rho\hat\delta\equiv const$ (recall the risk-liquidity ration $\rho=\rho(\Lambda):=\frac{\sigma^2 A}{\Lambda^2}$). From the standard theory it follows that \begin{equation}\label{sol} \hat\delta_t=c_1\sinh(\sqrt\rho t)+c_2\sinh(\sqrt\rho(T-t))+c_3, \ \ t\in [0,\mathbb T] \end{equation} for some constants $c_1,c_2,c_3$. From the three constraints $\hat\delta_0=0$, $\hat\delta_{\mathbb T}=x$ and $\int_{0}^{\mathbb T} \hat\delta_t dt=y$ we obtain \begin{equation}\label{sol1} c_1=\frac{x-c_3}{\sinh(\sqrt\rho \mathbb T)}, \ \ c_2=-\frac{c_3}{\sinh(\sqrt\rho \mathbb T)} \ \ \mbox{and} \ \ c_3=\frac{\sqrt\rho y-x\tanh(\sqrt\rho \mathbb T/2)}{\sqrt\rho \mathbb T-2\tanh(\sqrt\rho \mathbb T/2)}. \end{equation} We argue that \begin{eqnarray}\label{5.1} &\rho\int_{0}^\mathbb T \hat\delta^2_t dt+\int_{0}^{\mathbb T} \dot{\hat\delta}^2_tdt=\rho\int_{0}^{\mathbb T} \left((\hat\delta_t-c_3)+c_3\right)^2 dt+\int_{0}^{\mathbb T} \dot{\hat\delta}^2_tdt\nonumber\\ &=\frac{\sqrt\rho}{2}\left(c^2_1+c^2_2\right)\sinh\left(2\sqrt\rho \mathbb T\right)-2c_1c_2\sqrt\rho\sinh(\sqrt\rho \mathbb T)-\rho c^2_3 \mathbb T+2\rho c_3 y\nonumber\\ &=\sqrt{\rho}x^2\coth(\sqrt\rho \mathbb T)+2\sqrt\rho c_1 c_2\sinh(\sqrt\rho \mathbb T)\left(\cosh(\sqrt\rho \mathbb T)-1\right)-\rho c^2_3 \mathbb T+2\rho c_3 y\nonumber\\ &=\sqrt{\rho}x^2\coth(\sqrt\rho \mathbb T)+\left(2\sqrt\rho \tanh(\sqrt \rho \mathbb T/2)-\rho \mathbb T\right)c^2_3\nonumber\\ &+2\left(\rho y-\sqrt\rho \tanh(\sqrt \rho \mathbb T/2)x\right)c_3\nonumber\\ &=\sqrt{\rho}\left(x^2\coth(\sqrt\rho \mathbb T)+\frac{\left(x\tanh(\sqrt\rho \mathbb T/2)-\sqrt\rho y\right)^2}{\sqrt\rho \mathbb T-2\tanh(\sqrt\rho \mathbb T/2)}\right). \end{eqnarray} Indeed, the first equality is obvious. The second equality follows from (\ref{sol}) and simple computations. The third equality is due to $c_1-c_2=\frac{x}{\sinh(\sqrt\rho \mathbb T)}$. The fourth equality is due to $c_1c_2=\frac{c^2_3-xc_3}{\sinh^2(\sqrt\rho \mathbb T)}$. The last equality follows from substituting $c_3$. From (\ref{5.1}) we conclude that in order to minimize (\ref{5.1-}) we need to find $y$ which minimizes the quadratic pattern $$\frac{1}{2\sqrt\rho\Lambda}\ \frac{\left(x\tanh(\sqrt\rho \mathbb T/2)-\sqrt\rho y\right)^2}{\sqrt\rho \mathbb T-2\tanh(\sqrt\rho \mathbb T/2)}-\frac{1}{2\Lambda \mathbb T}\left(\phi\Lambda-y\right)^2.$$ Observe that this quadratic pattern is convex in $y$ and so has a unique minimum \begin{equation}\label{sol2} y=\frac{x\mathbb T }{2}-\frac{\phi\Lambda \left(\sqrt\rho \mathbb T-2\tanh(\sqrt\rho \mathbb T/2)\right)}{2\tanh(\sqrt\rho \mathbb T/2)}. \end{equation} Thus, define $\Xi_{\mathbb T}(\Lambda,x,\phi):=\hat\delta$ where $\hat\delta$ is given by (\ref{sol})--(\ref{sol1}) and (\ref{sol2}). Clearly, $\Xi_{\mathbb T}(\Lambda,x,\phi)$ is the unique minimizer for (\ref{5.1-}). Let $$V_{\mathbb T}(\Lambda,x,\phi):= \frac{\Lambda}{2 \sigma^2 A}\int_{0}^{\mathbb T}\dot{\hat\delta}_t^2 dt+ \frac{1}{2\Lambda}\left(\int_{0}^{\mathbb T}\hat\delta^2_t dt-\frac{1}{\mathbb T}\left(\phi\Lambda-\int_{0}^{\mathbb T}\hat\delta_t dt\right)^2\right). $$ Finally, we prove (\ref{5.1+}). Choose $\epsilon>0$ and a compact set $K\subset\mathbb R^2$. Assume that $(\mathbb T,x,\phi)\in [\epsilon,T]\times K$. From (\ref{5.1}) and the equality $\rho=\frac{\sigma^2 A}{\Lambda^2}$ we get that there exists a constant $C_1$ (may depend on $\epsilon$ and $K$) such that \begin{equation}\label{5.100} \left|V_{\mathbb T}(\Lambda,x,\phi)-\left(\frac{x^2}{2\sigma \sqrt A}+\frac{y^2}{\sigma\sqrt A\mathbb T^2}+\frac{\phi y}{\mathbb T}-\frac{xy}{\sigma\sqrt A\mathbb T}\right)\right|\leq C_1\Lambda \end{equation} where $y$ given by (\ref{sol2}). From (\ref{sol2}) we have $\left|y-\frac{\mathbb T}{2}\left(x-\sigma\sqrt A\phi\right)\right|\leq C_2 \Lambda$ for some constant $C_2$ (may depend on $\epsilon$ and $K$). This together with (\ref{5.100}) gives (\ref{5.1+}) and completes the proof. \end{proof}
\section{Introduction} A {\it Higgs bundle} over a K\"ahler manifold $(X,\omega_X)$ is a pair $(E, \Phi)$ consisting of a holomorphic vector bundle $E$ and a holomorphic section $\Phi$ of $\End E \otimes\bigwedge^{1,0}$ satisfying $\Phi\wedge\Phi=0$. The holomorphic section $\Phi$ is called a Higgs field. In this paper, we consider Higgs bundles with non-holomorphic Higgs fields, which is not usually assumed in the definition of Higgs bundles. The Hermitian-Einstein equation and Donaldson's functional can be defined even if the Higgs field is non-holomorphic (see Section 2). Therefore, two questions arise: when can the Hermitian-Einstein equation be solved, and does it make sense to try to solve the equation? Neither issue seems easy to resolve, but with regard to the latter question, it is easy to observe the following: Suppose that $\dim_\C X=1$. Let $(E,\Phi)$ be a Higgs bundle with a non-holomorphic Higgs field $\Phi$, and $h$ a solution to the Hermitian-Einstein equation. Then, for every open subset $U\subseteq X$, if $\bar{\partial}\Phi=0$ on $U$, then $(E\left.\right|_U,\Phi\left.\right|_U, h\left.\right|_U)$ is a harmonic bundle on $U$. For example, let $(E,\Phi)\rightarrow X$ be a usual Higgs bundle with a holomorphic Higgs field $\Phi$ and $t:X\rightarrow \C$ a smooth function. Then, in general, $t\Phi$ is not a globally holomorphic Higgs field and $(E,t\Phi, h)$ is not a harmonic bundle for a solution $h$ to the Hermitian-Einstein equation of $(E,t\Phi)$. However, on an open subset $U$ such that $t$ is constant on $U$, $(E\left.\right|_U,t\Phi\left.\right|_U, h\left.\right|_U)$ is a harmonic bundle. We consider the problem of determining when the Hermitian-Einstein equation can be solved. We suppose that $X$ is compact and that the holomorphic vector bundle decomposes into a direct sum of holomorphic line bundles. In this paper, by applying \cite[Theorem 1]{Miy1}, under an assumption on the non-holomorphic Higgs field, we give some necessary and sufficient conditions for Donaldson's functional which is restricted to the set of diagonal Hermitian metrics associated with a holomorphic decomposition of the vector bundle to attain a minimum. In particular, we show that we can solve the Hermitian-Einstein equation under a strong assumption even if the Higgs field is non-holomorphic. In order to state the theorem precisely, we introduce some notations: \begin{itemize} \item Let $E\rightarrow (X,\omega_X)$ be a holomorphic vector bundle over a compact K\"ahler manifold and $\Phi$ a smooth section of $\End E\otimes\bigwedge^{1,0}$ satisfying $\Phi\wedge\Phi=0$. Note that we do not use the integrability condition in the following. We also suppose that $c_1(E)=0$ for simplicity. \item We denote by $\Lambda_{\omega_X}$ the adjoint of $\omega_X\wedge$. \item Suppose that the holomorphic vector bundle $E$ decomposes as $E=L_1\oplus\cdots\oplus L_r$ with holomorphic line bundles $L_1,\dots, L_r\rightarrow X$. We decompose $\Phi$ as $\Phi=\Phi_0+\sum_{i,j=1,\dots, r}\Phi_{i,j}$, where $\Phi_0$ is the diagonal part and $\Phi_{i,j}$ is a (1,0)-form which takes values in $L_j^{-1}L_i$. \item Let $V$ be an $r-1$-dimensional real vector space defined as $V\coloneqq \{x=(x_1,\dots, x_r)\in\R^r\mid x_1+\cdots+x_r=0\}$. \item We define vectors $v_{i,j}\in V (i,j=1,\dots, r) $ as $v_{i,j}\coloneqq u_i-u_j$, where we denote by $u_1,\dots, u_r$ the canonical basis of $\R^r$. \item For each $j=1,\dots, r$, we define a real number $\gamma_j$ as $\gamma_j\coloneqq \deg_{\omega_X}(L_j)$ and we also define a vector $\gamma\in V$ as $\gamma\coloneqq (\gamma_1,\dots, \gamma_r)$. \item We define a space $\H_E$ of Hermitian metrics as \begin{align*} \H_E\coloneqq \{h\mid \text{$h$ is a smooth Hermitian metric on $E$ such that $\det(h)=1$}\}. \end{align*} We also define a subset $\diag_L(\H_E)\subseteq \H_E$ as \begin{align*} \diag_L(\H_E)\coloneqq \{h\in\H_E\mid \text{$h$ splits into $h=(h_1,\dots, h_r)$ for the decomposition}\}. \end{align*} \item For an $h\in\H_E$, we denote by $F_h$ the curvature of $h$, and by $\Phi^{\ast h}$ the adjoint of $\Phi$ with respect to the metric $h$. \item We fix a metric $K=(K_1,\dots, K_r)\in\diag_L(\H_E)$. \end{itemize} Then the following holds: \begin{theo}\label{main theorem 1} {\it Suppose that for each $i,j=1,\dots, r$, if $\Phi_{i,j}\neq 0$, then $\log|\Phi_{i,j}|_{K,\omega_X}^2$ is integrable. Then the following are equivalent: \begin{enumerate}[(i)] \item Donaldson's functional $\M(\cdot,K)$ restricted to $\diag_L(\H_E)$ attains a minimum; \item For any geodesic $(h_t)_{t\in\R}$ such that $h_t\in\diag_L(\H_E)$ for all $t\in\R$, if $\M(h_t,K)$ is not a constant, then $\lim_{t\to\infty}\M(h_t,K)=\infty$. \item There exists an $h\in\diag(\H_E)$ such that \begin{align} \pr(\Lambda_{\omega_X}(F_h+[\Phi\wedge\Phi^{\ast h}]))=0, \label{projection} \end{align} where $\pr:\End E\rightarrow \End E$ is the projection to the diagonal part. \item Donaldson's functional $\M(\cdot, K)$ restricted to $\diag_L(\H_E)$ is bounded below and there exist constants $C, C^\prime, C^{\prime\prime}$ such that \begin{align*} |\xi|_{L^2}\leq (\M(h,K)+C)^2+C^\prime \M(h,K)+C^{\prime\prime} \ \text{for all $h\in\diag_L(\H_E)$}, \end{align*} where we denote by $\xi$ the pair $(f_1,\dots, f_r)$ of functions such that $h=(e^{f_1}K_1,\dots, e^{f_r}K_r)$. \item The following holds: \begin{align} -\gamma\in\sum_{\substack{i,j=1,\dots, r, \\ \Phi_{i,j}\neq 0}}\R_{> 0}v_{i,j}. \label{gamma} \end{align} Moreover, if one of the above conditions is satisfied, a minimizer $h\in\diag_L(\H_E)$ of Donaldson's functional restricted to $\diag_L(\H_E)$ is a critical point of Donaldson's functional $\M(\cdot,K):\H_E\rightarrow \R$ if and only if the off-diagonal part of $\Lambda_{\omega_X}[\Phi\wedge\Phi^{\ast h}]$ vanishes. \end{enumerate} } \end{theo} \begin{cor} {\it Suppose that the non-holomorphic Higgs field is of the following form: \begin{align} &\Phi=\left( \begin{array}{cccc} 0 & & &\Phi_r\\ \Phi_1 & 0 & &\\ & \ddots& \ddots& \\ &&\Phi_{r-1}&0 \end{array} \right). \label{cyclic} \end{align} Then, if $\Phi_i\neq 0$ and $\log|\Phi_i|_{K,\omega_X}^2$ is integrable for all $i=1,\dots, r$, then the Hermitian-Einstein equation has a unique diagonal solution.} \end{cor} \begin{rem} Higgs bundles whose Higgs fields have the form given in (\ref{cyclic}) are called cyclic Higgs bundles (see \cite{Miy1, Miy2, Miy3} and the references therein). \end{rem} \begin{rem} For the relationship between the stability condition and condition (\ref{gamma}), we refer the reader to \cite{Miy2}. \end{rem} \begin{rem} The author is not aware of any work that extends Hitchin and Simpson's theorem \cite{Hit1, Sim1} to cases where the Higgs field is non-holomorphic. However, there is a work \cite{BT1} that studies the extension to the case where the base manifolds are not complex when the Higgs field is trivial. \end{rem} \begin{rem} For the proof of the implications (i) $\Rightarrow$ (ii), (ii) $\Leftrightarrow$ (v), (i) $\Leftrightarrow$ (iii), (iv) $\Rightarrow$ (i), we need not assume that for each $i,j=1,\dots, r$, if $\Phi_{i,j}\neq 0$, then $\log|\Phi_{i,j}|^2_{K,\omega_X}$ is integrable. \end{rem} \begin{rem} Even if the Higgs field is holomorphic, the author does not know how to show from the definition of stability for a more general geodesic and for a more general Higgs bundle that the functional diverges when the time of the geodesic goes to infinity (for the case where the Higgs field is trivial, see \cite{HK1, JMS1}). \end{rem} \section{Hermitian-Einstein equation and Donaldson's functional} In order to clarify the meaning of the terms we use and in order to avoid confusion, this section gives precise definitions of each concept. Let $(X,\omega_X)$ be a K\"ahler manifold. We suppose that $X$ is compact for simplicity. Let $E\rightarrow X$ be a holomorphic vector bundle and $\Phi$ a smooth section of $\End E\otimes \bigwedge^{1,0}$ satisfying $\Phi\wedge\Phi=0$. \begin{defi}[Hermitian-Einstein equation] We call the following PDE for a Hermitian metric $h$ on $E$ the {\it Hermitian-Einstein equation}: \begin{align*} \Lambda_{\omega_X}(F_h^{\perp}+[\Phi\wedge\Phi^{\ast h}])=0, \end{align*} where we denote by $F_h^{\perp}$ the trace-free part of the curvature. \end{defi} \begin{defi}[Donaldson's functional]\label{Donaldson's functional} For smooth Hermitian metrics $h$ and $K$ on $E$ such that $\det(h)=\det(K)$, we define a real number $\M(h,K)$ as follows: \begin{align*} \M(h,K)\coloneqq \int_0^1dt\int_X\inum \Tr(\Lambda_{\omega_X}(F_{h_t}^\perp+[\Phi\wedge\Phi^{\ast h_t}])g_t^{-1}\partial_tg_t), \end{align*} where $(h_t)_{0\leq t\leq 1}$ is a piecewise smooth family of Hermitian metrics such that $\det(h_t)=\det(K)$ and $g_t:E\rightarrow E$ is a unique Hermitian endmorphism with respect to $K$ and $h_t$ satisfying $K(g_t\cdot,\cdot)=h_t(\cdot, \cdot)$. As with the usual Donalson's functional \cite{Don1, Sim1}, $\M(h,K)$ does not depend on the choice of the path $(h_t)_{0\leq t\leq 1}$. We call $\M(\cdot,\cdot)$ {\it Donalson's functional}. \end{defi} As with the usual Donaldson's functional, the following holds: \begin{prop}\label{convex}{\it Let $K$ be a smooth metric on $E$ and $(h_t)_{t\in \R}$ a smooth family of Hermitian metrics such that $\det(h_t)=\det(K)$ for all $t\in\R$. We denote by $g_t:E\rightarrow E$ the unique Hermitian endmorphism with respect to $K$ and $h_t$ satisfying $K(g_t\cdot,\cdot)=h_t(\cdot, \cdot)$. Then the following holds: \begin{enumerate} \item The following holds: \begin{align*} \frac{d}{dt}\M(h_t,K)=\int_X\inum\Tr(\Lambda_{\omega_X}(F_{h_t}^\perp+[\Phi\wedge\Phi^{\ast h_t}])g_t^{-1}\partial_tg_t). \end{align*} \item Suppose that there exists a Hermitian endmorophism $s:E\rightarrow E$ with respect to $K$ such that $g_t=e^{ts}$ for all $t\in\R$. Then the following holds: \begin{align*} \frac{d^2}{dt^2}\M(h_t,K)=\int_X|(\bar{\partial}+\ad(\Phi))s|_{h_t}^2, \end{align*} where $\ad(\Phi)$ denotes $[\Phi, \cdot]$. \end{enumerate} } \end{prop} \section{Proof} \begin{proof}[Proof of Theorem \ref{main theorem 1}] Proof of Theorem \ref{main theorem 1} is obtained by applying \cite[Theorem 1]{Miy1}. Consider condition (iii) of Theorem \ref{main theorem 1}. Equation (\ref{projection}) for a metric $(e^{f_1}K_1,\dots, e^{f_r}K_r)$ is the following: \begin{align} \Delta_{\omega_X}\xi+\sum_{j=1}^r4|\Phi_{i,j}|^2_{K,\omega_X}e^{(v_{i,j}, \xi)}v_{i,j}=-2\inum \Lambda_{\omega_X}F_K, \label{mu} \end{align} where $\Delta_{\omega_X}$ denotes the geometric Laplacian, and $\xi$ is defined as $\xi\coloneqq (f_1,\dots, f_r)$. Equation (\ref{mu}) is a special case of equations considered in \cite{Miy1}, and Donalson's functional restricted to $\diag_L(\H_E)$ coincides with the functional introduced in \cite{Miy1}. Then from \cite[Theorem 1]{Miy1} and its proof, one can check that conditions in Theorem \ref{main theorem 1} are equivalent. \end{proof} \section{Non-holomorphic splittings} We discuss a little about non-holomorphic splittings of the vector bundle $E$. We introduce some notations: \begin{itemize} \item Let $M_1,\dots, M_r$ be smooth sublinebundles of $E$ such that $E=M_1\oplus\cdots\oplus M_r$. We also fix a holomorphic splitting of $E$: $E=L_1\oplus\cdots\oplus L_r$. \item Let $\diag_L(\H_E)$ (resp. $\diag_M(\H_E)$) be the space of diagonal metrics concerning the decomposition $E=L_1\oplus\cdots \oplus L_r$ (resp. $E=M_1\oplus\cdots\oplus M_r$). \item We fix an initial metric $K=(K_1,\dots, K_r)\in \diag_M(\H_E)$. We also fix a metric $h_\refe\in \diag_L(\H_E)$. \item We denote by $\Phi=\Phi_0+\sum_{i,j=1,\dots, r}\Phi_{i,j}$ the decomposition of $\Phi$ corresponding to the splitting $E=M_1\oplus\cdots\oplus M_r$. \item We normalize the volume of $X$ as 1. \end{itemize} Then the following holds: \begin{prop} {\it Let $h\in\diag_M(\H_E)$. Then the following holds: \begin{align} \M(h, K)&= \int_X(\Psi(s)(\bar{\partial}s),\bar{\partial}s)_{h_\refe}+\inum\int_X\Tr((\delta(\xi)-\overline{\delta(\xi)})\Lambda_{\omega_X}F_{h_\refe}) \notag \\ &+\sum_{i,j=1,\dots, r}\int_X2|\Phi_{i,j}|_{K,\omega_X}^2e^{(v_{i,j}, \xi)}+(2\pi\gamma, \overline{\delta(\xi)})+C, \label{functional} \end{align} where: \begin{itemize} \item $\xi=(f_1,\dots, f_r)$ is a pair of functions satisfying $h=(e^{f_1}K_1,\dots, e^{f_r}K_r)$, \item $s$ is the unique endomorphism satisfying $h=h_\refe(e^{s}\cdot,\cdot)$ and $\delta(\xi)$ the projection of $s$ to the diagonal part of $\End E$ of the decomposition induced from $E=L_1\oplus\cdots\oplus L_r$. \item $\overline{\delta(\xi)}$ is the average $\int_X\delta(\xi)$ of $\delta(\xi)$. \item $\gamma\coloneqq (\deg_{\omega_X}(L_1),\dots, \deg_{\omega_X}(L_r))$ is concerned to be a diagonal matrix. \item The definition of $\Psi:\R\times\R\rightarrow \R$ is the same as that of \cite[P.882]{Sim1} and the definition of $\Psi(s)(\bar{\partial}s)$ is the same as that of \cite[pp.879-882]{Sim1}. \item $C$ is a constant which is independent of $\xi$. \end{itemize} } \end{prop} \begin{proof} We decompose Donaldson's functional (see Definition \ref{Donaldson's functional}) $\M(h,K)$ as follows: \begin{align*} &\M(h,K)=\M_1(h,K)+\M_2(h,K), \\ &\M_1(h,K)\coloneqq \int_0^1dt\int_X\inum \Tr(\Lambda_{\omega_X}F_{h_t}g_t^{-1}\partial_tg_t), \\ &\M_2(h,K)\coloneqq \int_0^1dt\int_X\inum \Tr(\Lambda_{\omega_X}([\Phi\wedge\Phi^{\ast h_t}])g_t^{-1}\partial_tg_t). \end{align*} Then the second term $\M_2(h,K)$ coincides with $\sum_{i,j=1,\dots, r}\int_X2|\Phi_{i,j}|_{K,\omega_X}^2e^{(v_{i,j}, \xi)}$. The first term $\M_1(h,K)$ is further decomposed as follows: \begin{align*} \M_1(h,K)=\M_1(h,h_\refe)+\M_1(h_\refe,K). \end{align*} We set $C\coloneqq \M_1(h_\refe,K)$. We decompose $\M_1(h,h_\refe)$ as \begin{align*} \M_1(h,h_\refe)&=\int_X(\Psi(s)\bar{\partial}s,\bar{\partial}s)_{h_\refe}+\inum\int_X\Tr(s\Lambda_{\omega_X}F_{h_\refe}) \\ &=\int_X(\Psi(s)\bar{\partial}s,\bar{\partial}s)_{h_\refe}+\inum\int_X\Tr((\delta(\xi)-\overline{\delta(\xi)})\Lambda_{\omega_X}F_{h_\refe})+(2\pi\gamma, \overline{\delta(\xi)}). \end{align*} Then we have (\ref{functional}). \end{proof} \begin{rem} For a non-holomorphic splitting, even if the Higgs field is holomorphic and $\Phi_{i,j}\neq 0$, $\log|\Phi_{i,j}|_{K,\omega_X}^2$ is not integrable in general. \end{rem} \medskip \noindent {\bf Acknowledgements.} I would like to express my gratitude to Ryushi Goto and Hisashi Kasuya for their valuable discussions and many supports. I am very grateful to Yoshinori Hashimoto for his valuable discussions, many supports, helpful comments on this paper, and for informing me of the paper \cite{BT1}. I would also like to express my gratitude to Qiongling Li for answering my questions.
\section{Introduction}\label{sec:intro} Let $N$ and $P$ be $C^\infty$-manifolds. Two $C^\infty$-mappings $f$ and $g$ from $N$ into $P$ are said to be $C^\infty$-equivalent (resp. $C^0$-equivalent) if there exist $C^\infty$-diffeomorphisms (resp. homeomorphisms) $\Phi:N\to N$ and $\Psi :P\to P$ such that $g=\Psi \circ f \circ \Phi^{-1}$. We denote the space of all $C^\infty$-mappings of $N$ into $P$ (resp. the space of all proper $C^\infty$-mappings of $N$ into $P$) endowed with the Whitney $C^\infty$-topology by $C^\infty(N,P)$ (resp. $C^\infty_{pr}(N,P)$). We say that $f$ is \emph{$C^\infty$-stable} (resp. \emph{$C^0$-stable}) if there exists an open neighborhood $\mathscr{U}$ of $f$ such that any mapping in $\mathscr{U}$ is $C^\infty$-equivalent (resp. $C^0$-equivalent) to $f$. In what follows, unless otherwise stated, all manifolds and mappings are of class $C^\infty$. On the $C^\infty$-stability, in a celebrated series around 1970 \cite{Mather1968,Mather1968b,Mather1969,Mather1969b,Mather1970,Mather1971}, Mather established a significant theory and he gave a characterization of the density of proper $C^\infty$-stable mappings in $C^\infty_{pr}(N,P)$ as follows: \begin{theorem}[\cite{Mather1971}]\label{thm:mather} Let $N$ and $P$ be manifolds of dimensions $n$ and $p$, respectively. Then, the set of all proper $C^\infty$-stable mappings is dense in $C^\infty_{pr}(N,P)$ if and only if the pair $(n,p)$ satisfies one of the following conditions. \begin{enumerate}[$(1)$] \item $n<\frac{6}{7}p+\frac{8}{7}$ and $p-n\geq 4$ \item $n<\frac{6}{7}p+\frac{9}{7}$ and $3\geq p-n\geq 0$ \item $p<8$ and $p-n=-1$ \item $p<6$ and $p-n=-2$ \item $p<7$ and $p-n\leq-3$ \end{enumerate} \end{theorem} A dimension pair $(n,p)$ is called \emph{nice} if it satisfies one of the conditions (1)--(5) in \cref{thm:mather}. Since $C^\infty_{pr}(N,P)=C^\infty(N,P)$ in the case where $N$ is compact, \cref{thm:mather} yields a characterization of the density of $C^\infty$-stable mappings in $C^\infty(N,P)$ in the case. After that, the case where a source manifold is non-compact was considered by Dimca, and in 1979, he gave the following result. \begin{proposition}[\cite{Dimca1979}]\label{thm:dimca} Let $N$ be a non-compact manifold. Then, the set of all $C^\infty$-stable mappings is not dense in $C^\infty(N,\mathbb{R})$. \end{proposition} Then, in \cite{Ichiki2022}, for a non-compact source manifold $N$ and an arbitrary target manifold $P$, the following has been shown rigorously: \begin{theorem}[\cite{Ichiki2022}]\label{thm:main2} Let $N$ be a non-compact manifold, and $P$ a manifold. Then, the set of all $C^\infty$-stable mappings is never dense in $C^\infty(N,P)$. \end{theorem} By combining Mather's theorem (\cref{thm:mather}) and \cref{thm:main2}, we obtain the following characterization of the density of $C^\infty$-stable mappings in $C^\infty(N,P)$ in the case where $N$ is not necessarily compact. \begin{corollary}[\cite{Mather1971,Ichiki2022}]\label{thm:combine} Let $N$ and $P$ be manifolds of dimensions $n$ and $p$, respectively. Then, the set of all $C^\infty$-stable mappings is dense in $C^\infty(N,P)$ if and only if $N$ is compact and $(n,p)$ is nice. \end{corollary} On the $C^0$-stability, Mather established the following theorem in 1973, which is so significant as well as \cref{thm:mather}, and the bibles \cite{Wall1995,Gibson1976,Ruas2022} have been published. \begin{theorem}[\cite{Mather1973a}]\label{thm:mather_t} Let $N$ and $P$ be manifolds. Then, the set of all proper $C^0$-stable mappings is dense in $C^\infty_{pr}(N,P)$. \end{theorem} \cref{thm:mather_t} implies that the set of all $C^0$-stable mappings is always dense in $C^\infty(N,P)$ if $N$ is compact. In this paper, we give the following result in the case where $N$ is non-compact. \begin{theorem}\label{thm:main} Let $N$ be a non-compact manifold, and $P$ a manifold. Then, the set of all $C^0$-stable mappings is never dense in $C^\infty(N,P)$. \end{theorem} In \cref{sec:preparation}, we state a more essential result (see \cref{thm:main_a}) than \cref{thm:main} by using the notion of topologically critical points, which is the main theorem of this paper, and \cref{thm:main} follows from the result as a corollary. We note that \cref{thm:main} implies \cref{thm:main2} since any $C^\infty$-stable mapping is $C^0$-stable. By combining Mather's theorem on $C^0$-stability (\cref{thm:mather_t}) and \cref{thm:main}, we also obtain a characterization of the density of $C^0$-stable mappings in $C^\infty(N,P)$ in the case where $N$ is not necessarily compact as follows: \begin{corollary} Let $N$ and $P$ be manifolds. Then, the set of all $C^0$-stable mappings is dense in $C^\infty(N,P)$ if and only if $N$ is compact. \end{corollary} The remainder of this paper is organized as follows. In \cref{sec:preparation}, we state the main theorem, which is a more essential result than \cref{thm:main}, and preparations for the proof. In \cref{sec:proof}, we show the main theorem. \section{Main theorem and preparations for the proof}\label{sec:preparation} Let $N$ and $P$ be manifolds, and $f : N\to P$ a mapping. A point $q\in N$ is called a \emph{topologically critical point} (resp. \emph{critical point}) of $f$ if $f|_U:U\to P$ is not an open mapping for any open neighborhood $U$ of $q$ (resp. $\rank df_q<\dim P$). We give the following remark on topologically critical points. \begin{remark}\label{rem:top} \begin{enumerate} \item If $q\in N$ is a topologically critical point of $f:N\to P$, then $q$ is a critical point as follows: Suppose that $q\in N$ is not a critical point. Then, since $\rank df_q\geq \dim P$, there exists an open neighborhood $U$ such that $f|_U:U\to P$ is an open mapping by the implicit function theorem, which contradicts the hypothesis that $q$ is a topologically critical point. \item A critical point is not necessarily a topologically critical point. For example, let $f:\mathbb{R}\to \mathbb{R}$ be the function defined by $f(x)=x^3$. Then, $x=0$ is a critical point of $f$, however the point is not a topologically critical point. \item \label{rem:top_p} Suppose that $f,g\in C^\infty(N,P)$ are $C^0$-equivalent, that is, $g=\Psi \circ f \circ \Phi^{-1}$, where $\Phi:N\to N$ and $\Psi:P\to P$ are homeomorphisms. If $q\in N$ is a topologically critical point of $f$, then $\Phi(q)$ is a topologically critical point of $g$. Namely, topologically critical points can be preserved by homeomorphisms although usual critical points are not necessarily preserved by them. \end{enumerate} \end{remark} The following is the main theorem, and \cref{thm:main} is an easy consequence of this theorem. \begin{theorem}\label{thm:main_a} Let $N$ be a non-compact manifold, and $P$ a manifold. Then, there exists a non-empty open subset $\mathscr{U}$ of $C^\infty(N,P)$ such that for any positive integer $d$ satisfying $d\geq 2$, \begin{align*} \mathscr{U}_d=\set{f\in \mathscr{U}|\mbox{$f$ has $d$ topologically critical points with the same image}} \end{align*} is dense in $\mathscr{U}$. In particular, any mapping in $\mathscr{U}$ is not $C^0$-stable. \end{theorem} In \cref{thm:main_a}, when we show that any mapping in $\mathscr{U}$ is not $C^0$-stable, we use the simple fact that topologically critical points are preserved by homeomorphisms as mentioned in \cref{rem:top}\cref{rem:top_p}, which is an advantage of topologically critical points compared to usual critical points. In what follows, for a given positive integer $m$, we denote the origin $(0,\ldots, 0)$ of $\mathbb{R}^m$ by $0$, the Euclidean norm of $x\in \mathbb{R}^m$ by $\|x\|$, and the $m$-dimensional open ball with center $x\in \mathbb{R}^m$ and radius $r>0$ by $B^m(x,r)$, that is, \begin{align*} B^m(x,r)=\set{x'\in \mathbb{R}^m|\|x-x'\|<r}. \end{align*} For a set (resp. a topological space) $X$ and a subset $A$ of $X$, we denote the complement of $A$ (resp. the closure of $A$) by $A^c$ (resp. $\overline{A}$). The former assertion on a usual critical point of the following lemma is the same as \cite[Lemma~2.1]{Ichiki2022}, and we update the lemma by adding the latter assertion on topologically critical points as follows: \begin{lemma}\label{thm:critical} Let $f=(f_1,\ldots, f_p):B^n(0,r)\to \mathbb{R}^p$ $(r>0)$ be a mapping such that \begin{align*} f_p(x)=\frac{1}{2}\sum_{i=1}^nx_i^2+a, \end{align*} where $a$ is a real number and $x=(x_1,\ldots, x_n)$. If $g=(g_1,\ldots, g_p):B^n(0,r)\to \mathbb{R}^p$ satisfies \begin{align}\label{eq:d0} \sqrt{\sum_{i=1}^n\left(\frac{\partial f_p}{\partial x_i}(x)- \frac{\partial g_p}{\partial x_i}(x)\right)^2} <\frac{r}{2} \end{align} for any $x\in B^n(0,r)$, then there exists a critical point $x_0$ of $g$ in $B^n(0,r)$. Moreover, if $\mathrm{Hess}(g_p)_{x_0}$ is positive definite, then $x_0$ is a topologically critical point of $g$, where $\mathrm{Hess}(g_p)_{x_0}$ is the Hessian matrix of $g_p$ at $x_0$. \end{lemma} \begin{proof}[Proof of \cref{thm:critical}] By the same proof as \cite[Lemma~2.1]{Ichiki2022}, it follows that there exists a critical point $x_0$ of $g$ in $B^n(0,r)$ such that $\frac{\partial g_p}{\partial x_i}(x_0)=0$ for any $i\in \set{1,\ldots, n}$. Suppose that $\mathrm{Hess}(g_p)_{x_0}$ is positive definite. Since $x_0$ is also a critical point of $g_p$, there exists a coordinate neighborhood $(U,\varphi)$ of $B^n(0,r)$ containing $x_0$ ($\varphi(x_0)=0\in \mathbb{R}^n$) such that $g_p\circ \varphi^{-1}:\varphi(U)\to \mathbb{R}$ has the following form: \begin{align*} (g_p\circ \varphi^{-1})(t_1,\ldots, t_n)=g_p(x_0)+t_1^2+\cdots +t_n^2, \end{align*} which implies that $x_0$ is a topologically critical point of $g$. \end{proof} \section{Proof of the main theorem}\label{sec:proof} The proof is divided into the following three steps: In STEP~1, we construct the $C^\infty$ mapping $f:N\to P$ defined by \eqref{eq:f}. In STEP~2, we construct the open neighborhood $\mathscr{U}$ of $f$ in $C^\infty(N,P)$ given by \eqref{eq:u}, and we provide a lemma on properties of a mapping in $\mathscr{U}$ (see \cref{thm:u}). Finally, in STEP~3, after preparing two lemmas (\cref{thm:contain,thm:summary}), we show that $\mathscr{U}_d$ is dense in $\mathscr{U}$, and by using this assertion and the simple fact that topologically critical points are preserved by homeomorphisms, we prove that any mapping in $\mathscr{U}$ is not $C^0$-stable. The method of the proof is almost the same as that of \cref{thm:main2}, but the most important difference is the addition of condition (c) in the definition of $O_\alpha$ in \cref{eq:o} of STEP~2 to deal with topological critical points instead of ordinary critical points (more precisely, to use \cref{thm:critical}). In fact, in the proof of \cref{thm:main2}, there are only conditions (a) and (b) in the definition of $O_\alpha$, and the open set $\mathscr{U}$ in \cref{eq:u} is defined by using an open subset of the 1-jet space $J^1(N,P)$. On the other hand, in this proof, since we add condition (c), we define $\mathscr{U}$ in \cref{eq:u} using an open set in the 2-jet space $J^2(N,P)$. STEP 1 is the same as that in \cref{thm:main2}, but is also described in this paper for the sake of readers' convenience since in this first step we introduce some symbols that will be subsequently used. \smallskip \underline{STEP~1}. Set $n=\dim N$, $p=\dim P$ and $\ell=2n+1$. By Whitney's embedding theorem, there exist an embedding $F:N\to \mathbb{R}^\ell$ such that $F(N)$ is a closed subset of $\mathbb{R}^\ell$. Then, there exists a point $z_0\in \mathbb{R}^\ell\setminus F(N)$. Since $N$ is non-compact, $F(N)$ is also non-compact. Thus, $F(N)$ is not bounded, which implies that there exists a sequence $\set{R_\alpha}_{\alpha\in \mathbb{N}}$ of positive real numbers and a sequence $\set{z_\alpha}_{\alpha\in \mathbb{N}}$ of points in $\mathbb{R}^\ell$ such that \begin{itemize} \item $R_\alpha<R_{\alpha+1}$ for any $\alpha\in \mathbb{N}$ and $\displaystyle\lim_{\alpha \to \infty}R_\alpha=\infty$, \item $z_\alpha\in F(N)\cap (B^\ell(z_0,R_{\alpha+1})\setminus \overline{B^\ell(z_0,R_{\alpha})})$ for any $\alpha\in \mathbb{N}$. \end{itemize} Let $\alpha$ be a positive integer. Set $q_\alpha=F^{-1}(z_\alpha)$. Here, note that \begin{align*} F^{-1}(B^\ell(z_0,R_{\alpha+1})\setminus \overline{B^\ell(z_0,R_{\alpha})}) \end{align*} is an open neighborhood of $q_\alpha$. Then, there exists a coordinate neighborhood $(U_\alpha,\varphi_\alpha)$ of $N$ with the following properties: \begin{itemize} \item $\overline{U_\alpha}$ is compact, \item $q_\alpha\in U_\alpha\subset F^{-1}(B^\ell(z_0,R_{\alpha+1})\setminus \overline{B^\ell(z_0,R_{\alpha})})$, \item $\varphi_\alpha(q_\alpha)=0\in \mathbb{R}^n$. \end{itemize} Moreover, there exist an open neighborhood $U_\alpha'$ of $q_\alpha$ and $\rho_\alpha:N\to \mathbb{R}$ ($0\leq \rho_\alpha(q)\leq 1$) such that \begin{itemize} \item $\overline{U_\alpha'}\subset U_{\alpha}$, \item $\rho_\alpha(q)=1$ for any $q\in \overline{U_\alpha'}$, \item $\supp \rho_\alpha\subset U_\alpha$, \end{itemize} where $\supp \rho_\alpha=\overline{\set{q\in N|\rho_\alpha(q)\not=0}}$. Notice that $\supp \rho_\alpha$ is compact since $\overline{U_\alpha}$ is compact. By choosing $U_\alpha'$ smaller for each $\alpha\in \mathbb{N}$ we can assume that \begin{itemize} \item $\varphi_\alpha(U_\alpha')=B^n(0,r_\alpha)$, \item $\displaystyle\lim_{\alpha \to \infty}r_\alpha=0$, \end{itemize} where each $r_\alpha$ is a positive real number. Let $\gamma=(\gamma_1,\ldots, \gamma_p):\mathbb{N}\to \mathbb{Q}^p$ be a bijection, and let $\eta_\alpha:\varphi_\alpha(U_\alpha)\to \mathbb{R}^p$ be the mapping defined by \begin{align*} \eta_\alpha(x)= \displaystyle\left(\gamma_1(\alpha),\ldots, \gamma_{p-1}(\alpha),\frac{1}{2}\sum_{i=1}^nx_i^2+\gamma_{p}(\alpha)\right) \end{align*} for each $\alpha\in \mathbb{N}$, where $x=(x_1,\ldots, x_n)$. Let $(V,\psi)$ be a coordinate neighborhood of $P$ that satisfies $\psi(V)=\mathbb{R}^p$. Since $U_\alpha\cap U_\beta=\varnothing$ if $\alpha\not=\beta$, we can define $f:N\to P$ as follows: \begin{align}\label{eq:f} f(q)=\left\{ \begin{array}{ll} \displaystyle\psi^{-1}(\rho_\alpha(q)(\eta_\alpha\circ \varphi_\alpha)(q)) & \mbox{if $q\in U_\alpha$}, \\ \\ \displaystyle\psi^{-1}(0) & \mbox{if $q\not\in \bigcup_{\alpha\in \mathbb{N}}U_\alpha$}. \end{array} \right. \end{align} We show that $f$ is of class $C^\infty$. Let $q\in N$ be any point. If $q\in \bigcup_{\alpha\in \mathbb{N}}U_\alpha$, then by the definition of $f$ it is clear that $f$ is of class $C^\infty$ at $q$. Thus, we consider the case $q\in (\bigcup_{\alpha\in \mathbb{N}}U_\alpha)^c$. Since $\displaystyle\lim_{\alpha\to \infty}R_\alpha=\infty$, there exists $\beta \in\mathbb{N}$ such that $q\in F^{-1}(B^\ell(z_0,R_\beta))$. For simplicity, set \begin{align*} A=F^{-1}(B^\ell(z_0,R_\beta))\cap \left(\bigcup_{\alpha\in \mathbb{N}}\supp \rho_\alpha\right)^c. \end{align*} Note that $q\in A$. Since $R_\alpha<R_{\alpha+1}$ for any $\alpha\in \mathbb{N}$, we have \begin{align*} F^{-1}(B^\ell(z_0,R_\beta))\subset (\supp \rho_\alpha)^c \end{align*} for each $\alpha\in \mathbb{N}$ satisfying $\alpha>\beta$. Thus, we obtain \begin{align*} A&=F^{-1}(B^\ell(z_0,R_\beta))\cap \left(\bigcap_{\alpha\in \mathbb{N}}(\supp \rho_\alpha)^c\right) \\ &=F^{-1}(B^\ell(z_0,R_\beta))\cap \left(\bigcap_{\alpha\leq \beta}(\supp \rho_\alpha)^c\right), \end{align*} which implies that $A$ is an open subset of $N$. Since $\rho_\alpha |_{A}$ is a constant function with a constant value $0$ for each $\alpha\in \mathbb{N}$, the mapping $f|_A$ is also constant. Thus, $f$ is of class $C^\infty$ at $q$. \smallskip \underline{STEP~2}. In this step, we construct the open neighborhood $\mathscr{U}$ of $f$ in $C^\infty(N,P)$ given by \eqref{eq:u}, and we provide a lemma on properties of a mapping in $\mathscr{U}$. Since $z_0\in \mathbb{R}^\ell\setminus F(N)$, we can define the following continuous function $\delta:N\to \mathbb{R}$: \begin{align*} \delta(q)=\frac{1}{\norm{F(q)-z_0}}. \end{align*} Let $\pi:J^2(N,P)\to N\times P$ be the natural projection defined by $\pi(j^2g(q))=(q,g(q))$. Then, for each $\alpha\in \mathbb{N}$, set \begin{align}\label{eq:o} O_\alpha=\set{j^2g(q)\in \pi^{-1}(U_\alpha\times V)|\mbox{$j^2g(q)$ satisfies \cref{eq:t}, \cref{eq:d} and \cref{eq:hess}}}, \end{align}where \begin{enumerate}[(a)] \item $\norm{(\psi\circ f)(q)-(\psi\circ g)(q)}<\delta(q)$\label{eq:t}, \\ \item $\displaystyle\sqrt{\sum_{i=1}^n\left(\frac{\partial (\psi_p\circ f\circ \varphi_\alpha^{-1})}{\partial x_i}(\varphi_\alpha(q))- \frac{\partial (\psi_p\circ g\circ \varphi_\alpha^{-1})}{\partial x_i}(\varphi_\alpha(q))\right)^2}<\frac{r_\alpha}{2}$, \label{eq:d} \\ \item \mbox{$\mathrm{Hess}(\psi_p\circ g\circ \varphi_\alpha^{-1})_{\varphi_\alpha(q)}$ is positive definite,}\label{eq:hess}\end{enumerate} where $\psi_p$ is the $p$-th component of $\psi$. From \cref{eq:t}, \cref{eq:d} and \cref{eq:hess}, it is not hard to see that $O_\alpha$ is an open subset of $J^2(N,P)$. We prove that $\bigcap_{\alpha\in \mathbb{N}}(\overline{U_\alpha'})^c$ is an open subset of $N$. Let $q\in \bigcap_{\alpha\in \mathbb{N}}(\overline{U_\alpha'})^c$ be any point. Since $\displaystyle\lim_{\alpha\to \infty}R_\alpha=\infty$, there exists $\beta\in \mathbb{N}$ such that $q\in F^{-1}(B^\ell(z_0,R_\beta))$. Since $R_\alpha<R_{\alpha+1}$ for each $\alpha\in \mathbb{N}$, we obtain $F^{-1}(B^\ell(z_0,R_\beta))\subset (\overline{U_\alpha'})^c$ for any $\alpha\in \mathbb{N}$ satisfying $\alpha>\beta$, which implies that \begin{align*} F^{-1}(B^\ell(z_0,R_\beta))\cap \left(\bigcap_{\alpha\leq \beta}(\overline{U_\alpha'})^c\right)\subset \bigcap_{\alpha\in \mathbb{N}}(\overline{U_\alpha'})^c. \end{align*} Since the left-hand side of the above expression is an open neighborhood of $q$, it follows that $\bigcap_{\alpha\in \mathbb{N}}(\overline{U_\alpha'})^c$ is open. Thus, since $\pi$ is continuous, \begin{align*} O:=\left(\bigcup_{\alpha\in \mathbb{N}}O_\alpha\right)\cup \pi^{-1}\left(\left(\bigcap_{\alpha\in \mathbb{N}}\left(\overline{U_\alpha'}\right)^c\right)\times V\right) \end{align*} is open in $J^2(N,P)$. Therefore, we can construct the following open subset of $C^\infty(N,P)$: \begin{align}\label{eq:u} \mathscr{U}:=\set{g\in C^\infty(N,P)|j^2g(N)\subset O}. \end{align} By showing that $j^2f(N)\subset O$, we will prove that $\mathscr{U}\not=\varnothing$. Let $j^2f(q)$ $(q\in N)$ be any element of $j^2f(N)$. If there exists $\alpha \in \mathbb{N}$ such that $q\in U_\alpha$, then $j^2f(q)\in O_\alpha$ $(\subset O)$ since $f(q)\in V$ and $j^2f(q)$ clearly satisfies \cref{eq:t}, \cref{eq:d} and \cref{eq:hess}. When $q\not\in \bigcup_{\alpha\in \mathbb{N}}U_\alpha$, since \begin{align}\label{eq:n} N=\left(\bigcup_{\alpha\in \mathbb{N}}U_\alpha\right) \cup \left(\bigcap_{\alpha\in \mathbb{N}}\left(\overline{U_\alpha'}\right)^c\right), \end{align} it must follow that $q\in \bigcap_{\alpha\in \mathbb{N}}\left(\overline{U_\alpha'}\right)^c$. Therefore, since $f(q)\in V$, we obtain \begin{align*} j^2f(q)\in \pi^{-1}\left(\left(\bigcap_{\alpha\in \mathbb{N}}(\overline{U_\alpha'})^c\right)\times V\right)\ (\subset O), \end{align*} which implies that $\mathscr{U}\not=\varnothing$. The following lemma describes properties of a mapping in $\mathscr{U}$ and it is an upgrade of \cite[Lemma~3.1]{Ichiki2022} to a claim about a topological critical point instead of a usual critical point. \begin{lemma}\label{thm:u} For any mapping $g\in \mathscr{U}$, we have $g(N)\subset V$ and there exists a sequence $\set{q_\alpha'}_{\alpha\in \mathbb{N}}$ of points in $N$ with the following properties. \begin{enumerate}[$(1)$] \item \label{thm:u_critical} For each $\alpha \in \mathbb{N}$, $q_\alpha'$ is a topologically critical point of $g$ in $U_\alpha'$. \item \label{thm:u_dense} The set $\set{g(q_\alpha')|\alpha\in\mathbb{N}}$ is dense in $V$. \end{enumerate} \end{lemma} \begin{proof}[Proof of \cref{thm:u}] From the definition of $\mathscr{U}$, we have $g(N)\subset V$. Let $\alpha$ be any positive integer. Then, we have \begin{align*} (\psi_p\circ f\circ \varphi_\alpha^{-1})(x)=\frac{1}{2}\sum_{i=1}^nx_i^2+\gamma_p(\alpha) \end{align*} for any $x=(x_1,\ldots, x_n)\in \varphi_\alpha(U_\alpha')$ $(=B^n(0,r_\alpha))$. For any $q\in U_\alpha'$, we obtain $j^2g(q)\in O_\alpha$ since we have \cref{eq:n} and $U_\alpha'$ is contained in $U_\alpha$ which does not intersect with $U_\beta$ $(\beta\not=\alpha)$. Hence, $(\psi_p\circ g\circ \varphi_\alpha^{-1})|_{B^n(0,r_\alpha)}$ satisfies \cref{eq:d} and \cref{eq:hess}, which implies that there exists a topologically critical point of $(\psi_p\circ g\circ \varphi_\alpha^{-1})|_{B^n(0,r_\alpha)}$ in $B^n(0,r_\alpha)$ by \cref{thm:critical}. Namely, there exists a topologically critical point of $g$ in $U_\alpha'$. We denote this point by $q_\alpha'$. Since $\set{q_\alpha'}_{\alpha\in \mathbb{N}}$ satisfies \cref{thm:u_critical}, it is sufficient to prove that the sequence of points also satisfies \cref{thm:u_dense}. Let $V'$ be any open subset of $V$. We show that $\set{g(q_\alpha')|\alpha\in \mathbb{N}}\cap V'\not=\varnothing$. Then, by choosing $V'$ smaller, we can assume that $\psi(V')=B^p(y_0,\varepsilon)$, where $y_0$ is a point of $\mathbb{R}^p$ and $\varepsilon$ is a positive real number. Note that for each $\alpha\in \mathbb{N}$, we have \begin{equation} \begin{split}\label{eq:al_0} \norm{(\psi\circ g)(q_\alpha')-y_0}\leq &\norm{(\psi\circ g)(q_\alpha')-(\psi\circ f)(q_\alpha')} + \\ &\norm{(\psi\circ f)(q_\alpha')-(\psi\circ f)(q_\alpha)} + \norm{(\psi\circ f)(q_\alpha)-y_0}. \end{split} \end{equation} Since \begin{align*} \delta(q_\alpha')=\frac{1}{\norm{F(q_\alpha')-z_0}}<\frac{1}{R_\alpha} \end{align*} for any $\alpha\in \mathbb{N}$ and $\displaystyle\lim_{\alpha\to \infty}R_\alpha=\infty$, there exists $\alpha_1\in \mathbb{N}$ such that $\delta(q_\alpha')<\frac{\varepsilon}{3}$ for any $\alpha\in \mathbb{N}$ satisfying $\alpha\geq \alpha_1$. Here, note that for each $\alpha\in \mathbb{N}$, we get \begin{align*} \norm{(\psi\circ g)(q_\alpha')-(\psi\circ f)(q_\alpha')}<\delta(q_\alpha') \end{align*} by \cref{eq:t} since $j^2g(q_\alpha')\in O_\alpha$. Thus, it follows that for any $\alpha\in \mathbb{N}$, \begin{align}\label{eq:al_1} \alpha\geq \alpha_1 \Longrightarrow \norm{(\psi\circ g)(q_\alpha')-(\psi\circ f)(q_\alpha')}<\frac{\varepsilon}{3}. \end{align} For each $\alpha\in \mathbb{N}$, since $q_\alpha, q_\alpha'\in U_\alpha'$, we have \begin{align*} \norm{(\psi\circ f)(q_\alpha')-(\psi\circ f)(q_\alpha)}= \norm{\eta_\alpha(\varphi_\alpha(q_\alpha'))-\gamma(\alpha)} = \frac{\norm{\varphi_\alpha(q_\alpha')}^2}{2} < \frac{r_\alpha^2}{2}. \end{align*} Since $\displaystyle\lim_{\alpha\to \infty}r_\alpha=0$, there exists $\alpha_2\in \mathbb{N}$ such that for any $\alpha\in \mathbb{N}$, \begin{align}\label{eq:al_2} \alpha\geq \alpha_2 \Longrightarrow \norm{(\psi\circ f)(q_\alpha')-(\psi\circ f)(q_\alpha)}<\frac{\varepsilon}{3}. \end{align} Since $(\psi \circ f)(q_\alpha)=\gamma(\alpha)$ for each $\alpha\in \mathbb{N}$, we have \begin{align*} \set{(\psi \circ f)(q_\alpha)|\alpha\in\mathbb{N}}=\mathbb{Q}^p. \end{align*} Hence, there exists $\alpha_3\in \mathbb{N}$ such that $\alpha_3>\max\set{\alpha_1,\alpha_2}$ and \begin{align}\label{eq:al_3} \norm{(\psi\circ f)(q_{\alpha_3})-y_0}<\frac{\varepsilon}{3}. \end{align} Thus, we get $\norm{(\psi\circ g)(q_{\alpha_3}')-y_0}<\varepsilon$ by \eqref{eq:al_0} to \cref{eq:al_3}, which implies that $g(q_{\alpha_3}')\in V'$. \end{proof} \smallskip \underline{STEP~3}. The purpose of this step is to show that $\mathscr{U}_d$ is dense in $\mathscr{U}$, where $d\geq 2$ is a given integer. Let $g\in \mathscr{U}$ be an arbitrary mapping, and let $\mathscr{U}_g$ be any open neighborhood of $g$. Then, there exist a non-negative integer $k$ and an open set $O'$ of $J^k(N,P)$ such that \begin{align*} g\in \set{h\in C^\infty(N,P)|j^kh(N)\subset O'}\subset \mathscr{U}_g. \end{align*} For the proof, it is sufficient to show that there exists a mapping $h\in \mathscr{U}_d$ such that $j^kh(N)\subset O'$. For any $\alpha\in \mathbb{N}$ and $c\in \mathbb{R}^p$, let $G_{\alpha,c}:N\to P$ be the mapping defined by \begin{align*} G_{\alpha,c}=\psi^{-1}\circ (\psi \circ g+\rho_\alpha c). \end{align*} \begin{lemma}[{\cite[Lemma~3.2]{Ichiki2022}}]\label{thm:contain} Let $\alpha$ be any positive integer. Then, there exists a positive real number $r_\alpha'$ such that $j^kG_{\alpha,c}(N)\subset O'$ for any $c\in B^p(0,r_\alpha')$. \end{lemma} Since $g\in \mathscr{U}$, note that there exists a sequence $\set{q_\alpha'}_{\alpha\in \mathbb{N}}$ of points in $N$ satisfying \cref{thm:u_critical} and \cref{thm:u_dense} of \cref{thm:u}. The following lemma can be also shown by the same method as \cite[Lemma~3.3]{Ichiki2022}. \begin{lemma}\label{thm:summary} Let $m$ be any positive integer. Then, there exist $(m+1)$ distinct positive integers $\alpha_1,\ldots, \alpha_{m+1}$ and $m$ positive real numbers $r_{\alpha_1}',\ldots, r_{\alpha_m}'$ $(r_{\alpha_1}'>\cdots >r_{\alpha_m}')$ such that for any $j\in \set{1,\ldots, m}$, \begin{enumerate}[$(1)$] \item $j^kG_{\alpha_j,c}(N)\subset O'$ for any $c\in B^p(0,r_{\alpha_j}')$, \item $\norm{(\psi\circ g)(q_{\alpha_{j+1}}')-(\psi\circ g)(q_{\alpha_{j}}')}<\displaystyle\frac{r_{\alpha_{j}}'}{d-1}$, where $d\geq 2$ is given in \cref{thm:main_a}. \end{enumerate} \end{lemma} \begin{proof}[Proof of \cref{thm:summary}] We will prove this lemma by induction on $m$. Let $\alpha_1$ be a positive integer. By \cref{thm:contain}, there exists a positive real number $r_{\alpha_1}'$ such that $j^kG_{\alpha_1,c}(N)\subset O'$ for any $c\in B^p(0,r_{\alpha_1}')$. From \cref{thm:u}~\cref{thm:u_dense}, there exists $\alpha_2 \in \mathbb{N}\setminus\set{\alpha_1}$ satisfying \begin{align*} \norm{(\psi\circ g)(q_{\alpha_2}')-(\psi\circ g)(q_{\alpha_1}')}<\frac{r_{\alpha_1}'}{d-1}. \end{align*} Thus, the case $m=1$ holds. We assume that the lemma holds for $m=i$, where $i$ is a positive integer. By \cref{thm:contain}, there exists a positive real number $r_{\alpha_{i+1}}'$ $(r_{\alpha_i}'>r_{\alpha_{i+1}}')$ such that $j^kG_{\alpha_{i+1},c}(N)\subset O'$ for any $c\in B^p(0,r_{\alpha_{i+1}}')$. From \cref{thm:u}~\cref{thm:u_dense}, there exists $\alpha_{i+2}\in \mathbb{N}\setminus\set{\alpha_1,\ldots, \alpha_{i+1}}$ satisfying $\norm{(\psi\circ g)(q_{\alpha_{i+2}}')-(\psi\circ g)(q_{\alpha_{i+1}}')}<\frac{r_{\alpha_{i+1}}'}{d-1}$. Therefore, the case $m=i+1$ holds. \end{proof} For simplicity, set $I=\set{1,\ldots, d-1}$. By \cref{thm:summary} in the case $m=d-1$, there exist $d$ distinct positive integers $\alpha_1,\ldots, \alpha_{d}$ and $d-1$ positive real numbers $r_{\alpha_1}',\ldots, r_{\alpha_{d-1}}'$ $(r_{\alpha_1}'>\cdots >r_{\alpha_{d-1}}')$ such that for any $j\in I$, \begin{enumerate}[(a)] \setcounter{enumi}{3} \item \label{thm:summary_contain} $j^kG_{\alpha_j,c}(N)\subset O'$ for any $c\in B^p(0,r_{\alpha_j}')$, \item \label{thm:summary_i} $\norm{(\psi\circ g)(q_{\alpha_{j+1}}')-(\psi\circ g)(q_{\alpha_{j}}')}<\displaystyle\frac{r_{\alpha_{j}}'}{d-1}$. \end{enumerate} Let $h:N\to P$ be the mapping defined by \begin{align*} h=\psi^{-1}\circ \left(\psi\circ g+\sum_{i=1}^{d-1}\rho_{\alpha_i}c_i\right), \end{align*} where $c_i=(\psi\circ g)(q_{\alpha_{d}}')-(\psi\circ g)(q_{\alpha_i}')\in \mathbb{R}^p$. First, we show that $j^kh(N)\subset O'$. Let $q\in N$ be an arbitrary point. In the case where $q$ is an element of $(\bigcup_{j=1}^{d-1}\supp \rho_{\alpha_j})^c$, since $h=g$ on the open neighborhood $(\bigcup_{j=1}^{d-1}\supp \rho_{\alpha_j})^c$ of $q$, we have $j^kh(q)=j^kg(q)\in O'$. We consider the case where there exists $j\in I$ satisfying $q\in \supp \rho_{\alpha_j}$. Since $\supp \rho_{\alpha_j}\subset \bigcap_{i\in I\setminus \set{j}}(\supp \rho_{\alpha_i})^c$ and $h=G_{\alpha_j,c_j}$ on the open neighborhood $\bigcap_{i\in I\setminus \set{j}}(\supp \rho_{\alpha_i})^c$ of $q$, we obtain $j^kh(q)=j^kG_{\alpha_j,c_j}(q)$. Moreover, since \begin{equation} \begin{split}\label{eq:c} \norm{c_j}&=\norm{(\psi\circ g)(q_{\alpha_{d}}')-(\psi\circ g)(q_{\alpha_{j}}')} \\ &\leq\sum_{i=j}^{d-1}\norm{(\psi\circ g)(q_{\alpha_{i+1}}')-(\psi\circ g)(q_{\alpha_{i}}')} \\ &<\sum_{i=j}^{d-1}\frac{r_{\alpha_{i}}'}{d-1} \\ &\leq r_{\alpha_{j}}', \end{split} \end{equation} we have $c_j\in B^p(0,r_{\alpha_j}')$. The last two inequalities in \cref{eq:c} follow from \cref{thm:summary_i} and $r_{\alpha_j}'>\cdots >r_{\alpha_{d-1}}'$, respectively. Thus, we obtain $j^kG_{\alpha_j,c_j}(q)\in O'$ by \cref{thm:summary_contain}, which implies that $j^kh(q)\in O'$. Now, we show that $h\in \mathscr{U}_d$. For any $i,j\in I$, since $\rho_{\alpha_i}(q_{\alpha_j}')=\delta_{ij}$ and $\rho_{\alpha_i}(q_{\alpha_{d}}')=0$, we obtain{\small \begin{align*} \left(\psi\circ g+\sum_{i=1}^{d-1}\rho_{\alpha_i}c_i\right)(q_{\alpha_j}') =(\psi\circ g)(q_{\alpha_j}')+c_j =(\psi\circ g)(q_{\alpha_{d}}') =(\psi\circ h)(q_{\alpha_{d}}'), \end{align*}}where $\delta_{ij}$ is the Kronecker delta. Thus, we have $h(q_{\alpha_1}')=\cdots= h(q_{\alpha_{d}}')$. Moreover, for any $j\in I$, the point $q_{\alpha_j}'$ (resp. $q_{\alpha_{d}}'$) is a topologically critical point of $h$ since $h=\psi^{-1}\circ (\psi\circ g+c_j)$ on an open neighborhood of $q_{\alpha_j}'$ (resp. $h=g$ on an open neighborhood of $q_{\alpha_{d}}'$). Therefore, we obtain $h\in \mathscr{U}_d$. Finally, we will show that any mapping in $\mathscr{U}$ is not $C^0$-stable. Suppose that there exists a $C^0$-stable mapping $\Tilde{g}$ in $\mathscr{U}$. Then, there exists an open neighborhood $\mathscr{U}_{\Tilde{g}}$ of $\tilde{g}$ such that any mapping in $\mathscr{U}_{\Tilde{g}}$ is $C^0$-equivalent to $\Tilde{g}$. Since we have shown that $\mathscr{U}_{p+1}$ is dense in $\mathscr{U}$, and topologically critical points are preserved by homeomorphisms as mentioned in \cref{rem:top}\cref{rem:top_p}, any mapping in $\mathscr{U}_{\Tilde{g}}$ has $(p+1)$ topologically critical points with the same image. This contradicts the fact that the set of all mappings with normal crossings is dense in $C^\infty(N,P)$. \hfill \ensuremath{\Box} \section*{Acknowledgements} The author would like to thank Toru Ohmoto for his kind comments. This work was supported by JSPS KAKENHI Grant Number JP21K13786.
\section{Introduction} Consider a learner that wants to predict the next day’s temperature range at a given location based on inputs such as the current day's temperature range, humidity, atmospheric pressure, precipitation, wind speed, solar radiation, location, and time of year. In our model, this learner is tested daily. On a given day, the learner gets inputs for that day, which it uses to output a prediction for the next day’s temperature range; when the next day arrives, it sees the correct temperature range, then uses this feedback to update future predictions. As this is repeated, the learner accumulates information to help it make better predictions. A natural question arises: can the learner guarantee that its predictions become better over time, and if so, how quickly? We investigate a model of online learning of real-valued functions previously studied in \cite{kl,long,mycielski,angluin,littlestone,lw} where an algorithm $A$ learns a real-valued function $f$ from some class $\mathcal F$ in trials. Past research on this model focused on functions of one input, for example, predicting the temperature range solely based on the time of year. The research showed that, as long as the function is sufficiently smooth, the learner can become a good predictor fairly rapidly. Suppose that $\mathcal F$ consists of functions $f: S \to \mathbb R$ for some set $S$, and fix some $f \in \mathcal F$. In each trial $t=0,\ldots,m$, $A$ receives an input $s_t \in S$, guesses $\hat y_t$ for the value of $f(s_t)$, and receives the actual value of $f(s_t)$. Following \cite{kl}, we focus on an error function which measures how difficult it is for a learner to predict functions accurately in the worst case. The error function depends on two parameters, $p$ and $q$, which determine how harshly the learner is punished for errors and the types of functions that the learner might encounter, respectively. Small values of $p$ and $q$ are more difficult for the learner, leading to higher values of the error function. For each algorithm $A$, $p > 0$, $f \in \mathcal F$, and $\sigma=(s_0,\ldots,s_m) \in S^{m+1}$, define \[ \mathscr L_p(A,f,\sigma)=\sum_{t=1}^m|\hat y_t-f(s_t)|^p. \] When $f$ and $\sigma$ are clear from the context, we refer to $\mathscr L_p(A,f,\sigma)$ as \textit{the total $p$-error of $A$}. Define \[ \mathscr L_p(A,\mathcal F)=\displaystyle\sup_{f \in \mathcal F,\sigma \in \cup_{m \in \mathbb Z^+}S^m}\mathscr L_p(A,f,\sigma) \] and $\operatorname{opt}_p(\mathcal F)=\displaystyle\inf_A \mathscr L_p(A,\mathcal F)$. Note that unlike the definition of $\operatorname{opt}$ presented in \cite{kl,long,geneson}, $\mathcal F$ may consist of real-valued functions on any domain, not just functions from $[0,1]$ to $\mathbb R$. The case where $\mathcal F$ contains functions $f: [0,1] \to \mathbb R$ whose derivatives have various bounded norms was studied in \cite{kl,long,geneson}. For $q \ge 1$, let $\mathcal F_q$ be the class of absolutely continuous functions $f: [0,1] \to \mathbb R$ such that $\int_0^1|f'(x)|^q \text{d}x \le 1$, and let $\mathcal F_\infty$ be the class of absolutely continuous functions $f: [0,1] \to \mathbb R$ such that $\displaystyle \sup_{x \in (0,1)}|f'(x)| \le 1$. As noted in \cite{long}, $\mathcal F_\infty$ contains exactly those $f: [0,1] \to \mathbb R$ such that $|f(x)-f(y)| \le |x-y|$ for all $x,y \in [0,1]$. Also, by Jensen's inequality, $\mathcal F_\infty \subseteq \mathcal F_q \subseteq \mathcal F_r$ for all $q \ge r \ge 1$. Hence $\operatorname{opt}_p(\mathcal F_\infty) \le \operatorname{opt}_p(\mathcal F_q) \le \operatorname{opt}_p(\mathcal F_r)$ for all $p \ge 1$ and $q \ge r \ge 1$. Previous papers determined the exact values of $\operatorname{opt}_p(\mathcal F_q)$ for $p = 1$, $q = 1$, and $p, q \ge 2$, as well as bounds on $\operatorname{opt}_p(\mathcal F_q)$ for $p \in (1, 2)$ and $q \ge 2$. \begin{figure}[t] \centering \begin{tikzpicture} \begin{axis}[ tick label style={font=\scriptsize}, axis y line*=left, axis x line*=bottom, xmin=1, xmax=5, ymin=1, ymax=5, xtick={1,2}, xtick style={draw=none}, ytick style={draw=none}, ytick={1,2}, xlabel=$p$, ylabel=$q$ ] \addplot [black] coordinates { (2,2) (2,5) }; \addplot [black] coordinates { (1,2) (5,2) }; \addplot [black] coordinates { (1,1) (1,5) }; \addplot [black] coordinates { (1,1) (5,1) }; \iffalse \addplot [black,domain=3:5] { 1+1/(x-2) }; \fi \node at (axis cs:3.5,3.5) { $1$ }; \node[scale=0.8] at (axis cs:1.5,3.5) { $O\left(\frac{1}{p-1}\right)$ }; \end{axis} \end{tikzpicture} \caption{Exact values and bounds on $\operatorname{opt}_p(\mathcal{F}_q)$ for $p, q > 1$ prior to the results in this paper} \label{old_bounds} \end{figure} The paper \cite{kl} proved that $\operatorname{opt}_p(\mathcal{F}_1) = \infty$ for all $p \ge 1$. They also showed that $\operatorname{opt}_1(\mathcal{F}_q) = \operatorname{opt}_1(\mathcal{F}_{\infty}) = \infty$ for all $q \ge 1$. In contrast, they found that $\operatorname{opt}_p(\mathcal{F}_q) = \operatorname{opt}_p(\mathcal{F}_{\infty}) = 1$ for all $p \ge 2$ and $q \ge 2$. This was also proved in \cite{FM} using a different algorithm based on a generalization of the Widrow-Hoff algorithm \cite{kaczmarz, wh}, and a noisy version of this problem was studied in \cite{clw}. In this paper, we extend the region of values of $p, q$ for which it is known that $\operatorname{opt}_p(\mathcal{F}_q) = 1$. \begin{thm}\label{more1bound} For any reals $q>1$ and $p \ge 2+\frac{1}{q-1}$, we have $\operatorname{opt}_p(\mathcal F_q)=1$. \end{thm} For $p = 1+\varepsilon$ with $\varepsilon \in (0, 1)$, the paper \cite{kl} proved that $\operatorname{opt}_p(\mathcal{F}_q) = O(\varepsilon^{-1})$ for all $q \ge 2$, which implies that $\operatorname{opt}_p(\mathcal{F}_{\infty}) = O(\varepsilon^{-1})$. However, these bounds are not sharp. In this paper, we determine $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q)$ up to a constant factor for all $\varepsilon \in (0, 1)$ and $q \ge 2$. \begin{thm}\label{mainth} For all $\varepsilon \in (0, 1)$, we have $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Theta(\varepsilon^{-\frac{1}{2}})$ and $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = \Theta(\varepsilon^{-\frac{1}{2}})$ for all $q \ge 2$, where the constants in the bound do not depend on $q$. \end{thm} The proof of Theorem \ref{mainth} splits into an upper bound and a lower bound. For the upper bound, we use H\"older's inequality combined with results from \cite{kl}. For the lower bound, we modify a construction used in \cite{long}, which obtained bounds on a finite variant of $\operatorname{opt}_1(\mathcal{F}_q)$ that depends on the number of trials $m$. The results of \cite{kl} and \cite{long} left open the problem of determining $\operatorname{opt}_p(F_q)$ for $q \in (1, 2)$. It was not even known up to a constant factor. We make progress on this problem by determining $\operatorname{opt}_2(\mathcal F_{1+\varepsilon})$ up to a constant factor for $\varepsilon \in (0, 1)$. Figure \ref{old_bounds} shows the bounds and exact values known for $p, q > 1$ prior to the results in our paper, while Figure \ref{new_bound} shows the bounds and exact values known for $p, q > 1$ including the results in our paper. \begin{thm}\label{qin12bound} For $\varepsilon \in (0,1)$, we have $\operatorname{opt}_2(\mathcal F_{1+\varepsilon})=\Theta(\varepsilon^{-1})$. \end{thm} The paper \cite{kl} also discussed the problem of online learning for smooth functions of multiple variables. Previous research on learning multi-variable functions \cite{barron, hardle, haussler} has focused on expected loss rather than worst-case loss, using models where the inputs $x_i$ are determined by a probability distribution. \begin{figure}[t] \centering \begin{tikzpicture} \begin{axis}[ tick label style={font=\scriptsize}, axis y line*=left, axis x line*=bottom, xmin=1, xmax=5, ymin=1, ymax=5, xtick={1,2}, xtick style={draw=none}, ytick style={draw=none}, ytick={1,2}, xlabel=$p$, ylabel=$q$ ] \addplot [black] coordinates { (2,1) (2,5) }; \addplot [black] coordinates { (1,2) (5,2) }; \addplot [black] coordinates { (1,1) (1,5) }; \addplot [black] coordinates { (1,1) (5,1) }; \addplot [black,domain=3:5] { 1+1/(x-2) }; \node at (axis cs:3.5,3.5) { $1$ }; \node[scale=0.8] at (axis cs:1.5,3.5) { $\Theta\left(\frac{1}{\sqrt{p-1}}\right)$ }; \node at (axis cs:4.5,1.7) { $1$ }; \node[scale=0.8] at (axis cs:2.7,1.5) { $O\left(\frac{1}{q-1}\right)$ }; \end{axis} \end{tikzpicture} \caption{Exact values and bounds on $\operatorname{opt}_p(\mathcal{F}_q)$ for $p, q > 1$ including the results in this paper} \label{new_bound} \end{figure} We introduce a natural extension of the single-variable setup from \cite{kl} to multi-variable functions. Specifically, for $q \ge 1$ and $d \in \mathbb Z^+$, let $\mathcal F_{q,d}$ be the class of functions $f: [0,1]^d \to \mathbb R$ such that for any $(d-1)$-tuple $(x_1,\ldots,x_{d-1}) \in [0,1]^{d-1}$ and integer $i$ with $1 \le i \le d$, the function $g: [0,1] \to \mathbb R$ given by $g(x)=f(\mathbf v_{i,x})$ is in $\mathcal F_q$, where $\mathbf v_{i,x} \in [0,1]^d$ is the vector formed when $x$ is inserted at the $i^{\text{th}}$ position of $(x_1,\ldots,x_{d-1})$. One of the most fundamental questions about $\operatorname{opt}_p(\mathcal F_{q,d})$ is to determine when it is finite and when it is infinite. We answer this question almost completely when $q = \infty$. \begin{thm}\label{mvinfty} For any positive integer $d$, $\operatorname{opt}_p(\mathcal F_{\infty,d})$ is finite when $p > d$ and infinite when $0 < p < d$. \end{thm} As a corollary, it immediately follows for $0 < p < d$ that $\operatorname{opt}_p(\mathcal F_{q,d}) = \infty$ for all $q \ge 1$. Moreover, it is easy to see that $\operatorname{opt}_p(\mathcal F_{1,d}) = \infty$ for all positive integers $d$ and $p$. The papers \cite{kl} and \cite{long} also investigated worst-case mistake bounds for online learning of smooth functions when the number of trials is bounded. In particular, using the same notation as in the first paragraph of this section, define \[ \mathscr L_p(A,f,\sigma, m)=\sum_{t=1}^m|\hat y_t-f(s_t)|^p. \] Moreover, define \[ \mathscr L_p(A,\mathcal F,m)=\displaystyle\sup_{f \in \mathcal F,\sigma \in S^{m+1}}\mathscr L_p(A,f,\sigma,m) \] and $\operatorname{opt}_p(\mathcal F,m)=\displaystyle\inf_A \mathscr L_p(A,\mathcal F,m)$. The paper \cite{kl} proved that $\operatorname{opt}_1(\mathcal F_q,m) = O(\log(m))$ for all $q \ge 2$ and $\operatorname{opt}_1(\mathcal F_2,m) = \Omega(\sqrt{\log(m)})$. The paper \cite{long} sharpened these bounds by proving that $\operatorname{opt}_1(\mathcal F_q,m) = \Theta(\sqrt{\log(m)})$ for all $q \ge 2$ and $\operatorname{opt}_1(\mathcal F_2,m) = \frac{\sqrt{\log_2(m)}}{2} \pm O(1)$. We obtain sharp bounds for online learning of smooth functions with a bounded number of trials when $0 < p < d$. In particular, these sharp bounds are also new in the single-variable case. \begin{thm}\label{bounded_m_trials} For any positive integer $d$ and real number $p$ with $0 < p<d$, we have $\operatorname{opt}_p(\mathcal F_{\infty,d}, m)=\Theta(m^{1-\frac{p}{d}})$, where the constants in the bounds depend on $p$ and $d$. \end{thm} In Section \ref{2}, we focus on the single-variable setup. We prove Theorem \ref{qin12bound} in Subsections \ref{pqlower} and \ref{2qupper}. Subsection \ref{pqlower} establishes the lower bound, while Subsection \ref{2qupper} establishes the upper bound along with several useful lemmas. Subsection \ref{pqupper} focuses on proving Theorem \ref{more1bound}. In Subsection \ref{pql2}, we prove Theorem \ref{mainth}. In Section \ref{3}, we focus on the multi-variable setup, establishing various bounds on $\operatorname{opt}_p(\mathcal F_{q,d})$. Finally, in Section \ref{s:open}, we discuss open problems. \section{Results in the single-variable setup for $q \in (1,2)$}\label{2} First, we adopt some notation from \cite{kl}. For $f: [0,1] \to \mathbb R$, define the \textit{$q$-action} of $f$, denoted by $J_q[f]$, as \[ J_q[f]=\int_0^1 |f'(x)|^q\text{d}x, \] so that $\mathcal F_q$ is exactly the set of absolutely continuous $f: [0,1] \to \mathbb R$ such that $J_q[f] \le 1$. Also, for a nonempty set $S=\{(u_i,v_i): 1 \le i \le m\}$ of points in $[0,1] \times \mathbb R$ such that $u_1<\ldots<u_m$, define \[ f_S(x)=\begin{cases} v_1 & x \le u_1 \\ v_i+\frac{(x-u_i)(v_{i+1}-v_i)}{u_{i+1}-u_i} & x \in (u_i,u_{i+1}] \\ v_m & x>u_m \end{cases} \] and set $f_{\emptyset}(x) \equiv 0$. Finally, define the learning algorithm LININT as follows: on trial $0$, LININT guesses $\hat y_0=0$, and on trial $i>0$, with the points in $S=\{(x_0,f(x_0)),\ldots,(x_{i-1},f(x_{i-1}))\}$ having been revealed and given $x_i$, LININT guesses $\hat y_i=f_S(x_i)$. \subsection{Lower bounds for $\operatorname{opt}_p(\mathcal F_q)$}\label{pqlower} First, for all $p,q>1$ we have an obvious lower bound for $\operatorname{opt}_p(\mathcal F_q)$. \begin{prop}\label{pq1} For $p,q>1$, we have $\operatorname{opt}_p(\mathcal F_q) \ge 1$. \end{prop} \iffalse \begin{proof} Consider the adversary strategy where the adversary picks $x_0=0$ and reveals $f(x_0)=0$, then picks $x_1=1$ and reveals $f(x_1)=\pm 1$ such that the error $|\hat y_1-f(x_1)|$ is at least 1. This is consistent with one of the functions $\{f(x)=x,f(x)=-x\} \subset \mathcal F_q$ and guarantees $\sum_{i \ge 1} |\hat y_i-f(x_i)|^p \ge 1$. \end{proof} \else The paper \cite{kl} proved that equality holds when $p,q \ge 2$. As we will see, equality also holds when $q \in (1,2)$ for sufficiently large values of $p$. For $q \in (1,2)$ and $p>1$, we also prove a lower bound for $\operatorname{opt}_2(\mathcal F_q)$, using an adversary strategy similar to that in Theorem 8 of \cite{kl}. \begin{thm}\label{pqlow} For $q \in (1,2)$, we have $\operatorname{opt}_p(\mathcal F_q) \ge \frac{q}{(p2^pe \ln 2)(q-1)}$. \end{thm} \begin{proof} Fix $q \in (1,2)$ and an algorithm $A$ for learning $\mathcal F_q$. Consider the following family of adversary strategies, depending on a parameter $b \in (0,1)$. The adversary picks $x_0=0$ and reveals $f(x_0)=0$, then picks $x_1=1$ and reveals $f(x_1)=\pm b$ such that $|\hat y_1-f(x_1)| \ge b$; without loss of generality, suppose $f(x_1)=b$. Then for the next $k=\left\lfloor -\frac{q\log_2 b}{q-1} \right\rfloor$ trials, the adversary recursively picks $x_i$ and $f(x_i)$ as follows. On trial $2 \le i<k+2$, the adversary sets $l_i$ to be the greatest real $x \in [0,1]$ such that $f(x)=0$ has been previously revealed, and similarly sets $r_i$ to be the least real $x \in [0,1]$ such that $f(x)=b$ has been previously revealed, then sets $x_i=\frac{l_i+r_i}{2}$. Upon receiving $A$'s guess $\hat y_i$, the adversary reveals $f(x_i)=0$ or $f(x_i)=b$ such that $|f(x_i)-\hat y_i| \ge \frac{b}{2}$. To see that this strategy is well-defined, note that all the $x_i$ are distinct\iffalse (for example, there exists $r \in [0,1]$ such that the sequence $x_2,\ldots,x_{k+1}$ is exactly the sequence of guesses made by a binary search algorithm trying to guess $r$)\else, so it suffices to show that there exists a function $f \in \mathcal F_q$ which is consistent with all $(x_i,f(x_i))$. Indeed, take $f=f_{\{(x_0,f(x_0)),\ldots,(x_{k+1},f(x_{k+1}))\}}$ which linearly interpolates between all points $(x_i,f(x_i))$; then $f$ has only one segment of nonzero slope, with \[ J_q[f]=2^{-k}\left(\frac{b}{2^{-k}}\right)^q=2^{k(q-1)}b^q \le 2^{-\frac{q\log_2 b}{q-1} \cdot (q-1)}b^q=1. \] Thus the adversary guarantees an error of at least \[ \operatorname{opt}_p(\mathcal F_q) \ge \sum_{i=1}^{k+1}|f(x_i)-\hat y_i|^p \ge b^p+k\left(\frac{b}{2}\right)^p \ge -\frac{b^pq\log_2 b}{2^p(q-1)}. \] Picking $b=e^{-\frac{1}{p}}$ yields $\operatorname{opt}_p(\mathcal F_q) \ge \frac{q}{(p2^pe \ln 2)(q-1)}$. \end{proof} In particular, when $p=2$ we get the following: \begin{cor}\label{2qlow} For $q \in (1,2)$, we have \[\operatorname{opt}_2(\mathcal F_q) \ge \frac{q}{(8e\ln 2)(q-1)}>\frac{1}{(8e\ln 2)(q-1)}.\] \end{cor} \subsection{Bounds for $\operatorname{opt}_2(\mathcal F_q)$}\label{2qupper} The main result of this section is that for $\varepsilon \in (0,1)$, $\operatorname{opt}_2(\mathcal F_{1+\varepsilon})=\Theta(\varepsilon^{-1})$. For $q \in (1,2)$, Corollary \ref{2qlow} gives a lower bound for $\operatorname{opt}_2(\mathcal F_q)$; we now prove an upper bound for $\operatorname{opt}_2(\mathcal F_q)$ and use this to derive the desired result. First, we show that a similar fact to Lemma 9 in \cite{kl} holds. \begin{lem}\label{fsmin} Let $u_1<\ldots<u_m$ be reals in $[0,1]$ and $v_1,\ldots,v_m$ be reals, and define $S=\{(u_1,v_1),\ldots,(u_m,v_m)\}$. Then for any $q \in (1,2)$ and absolutely continuous $f: [0,1] \to \mathbb R$ such that $f(u_i)=v_i$ for $1 \le i \le m$, we have $J_q[f] \ge J_q[f_S]$. \end{lem} \begin{proof} If $m=1$, then $J_q[f_S]=0$ and the result is clear. Otherwise, fix some absolutely continuous $f: [0,1] \to \mathbb R$ which is consistent with the $(u_i,v_i)$, and fix $1 \le i<m$. Then by Jensen's inequality, \[ \frac{\int_{u_i}^{u_{i+1}}|f'(x)|^q\text{d}x}{u_{i+1}-u_i} \ge \left(\frac{\int_{u_i}^{u_{i+1}}|f'(x)|\text{d}x}{u_{i+1}-u_i}\right)^q \ge \left(\frac{\left|\int_{u_i}^{u_{i+1}}f'(x)\text{d}x\right|}{u_{i+1}-u_i}\right)^q=\left|\frac{v_{i+1}-v_i}{u_{i+1}-u_i}\right|^q. \] Thus we obtain \[ J_q[f] \ge \int_{u_1}^{u_m}|f'(x)|^q\text{d}x \ge \sum_{i=1}^{m-1}(u_{i+1}-u_i)\left|\frac{v_{i+1}-v_i}{u_{i+1}-u_i}\right|^q=J_q[f_S] \] by summing over all $1 \le i<m$. \end{proof} This leads to the following useful fact. \begin{lem}\label{linint1} For any $q>1$, target function $f \in \mathcal F_q$, integer $m \ge 1$, and sequence of inputs $x_0,\ldots,x_m \in [0,1]$, \textnormal{LININT} never produces an error $|\hat y_i-f(x_i)|>1$ on any trial $i \ge 1$. \end{lem} \begin{proof} Suppose otherwise, so that LININT produces an error $|\hat y_i-f(x_i)|>1$ for $i \ge 1$; then there exists $0 \le j<i$ such that $|f(x_i)-f(x_j)|>1$. Letting $S=\{(x_0,f(x_0)),\ldots,(x_i,f(x_i))\}$, by Lemma \ref{fsmin} \[ J_q[f] \ge J_q[f_S] \ge |x_i-x_j|\left|\frac{f(x_i)-f(x_j)}{x_i-x_j}\right|^q \ge |f(x_i)-f(x_j)|>1, \] upon which $f \not \in \mathcal F_q$, contradiction. \end{proof} \begin{cor}\label{linintp} For any $q>1$ and $p'>p>1$, we have $\mathscr L_{p'}(\textnormal{LININT},\mathcal F_q) \le \mathscr L_p(\textnormal{LININT},\mathcal F_q)$. \end{cor} \begin{proof} On every trial $i \ge 1$, \textnormal{LININT} produces an error $|\hat y_i-f(x_i)| \le 1$, so $|\hat y_i-f(x_i)|^{p'} \le |\hat y_i-f(x_i)|^{p}$ for all $i \ge 1$. \end{proof} With this, the proof proceeds similarly to the proof of Theorem 11 in \cite{kl}. Specifically, we will compare changes in $J_q[f_S]$ as new points are added to $S$ to the squared errors $(\hat y-f_S(x))^2$ produced by LININT to bound $\mathscr L_2(\text{LININT},\mathcal F_q)$. This requires the following inequalities. \begin{lem}\label{2qin} For reals $a > 0$, $b>0$, $q \in (1,2)$, and $x \in (-a,b)$, we have \[ a\left(1+\frac{x}{a}\right)^q+b\left(1-\frac{x}{b}\right)^q-(a+b) \ge \frac{2q(q-1)}{a+b} \cdot x^2. \] \end{lem} \begin{proof} Fix $a,b,q$, and define the function \[ f(x)=a\left(1+\frac{x}{a}\right)^q+b\left(1-\frac{x}{b}\right)^q-(a+b)-\frac{2q(q-1)}{a+b} \cdot x^2 \] for $x \in (-a,b)$, so that we wish to show $f(x) \ge 0$ for all $x \in (-a,b)$. Compute \begin{align*} f'(x) &= q\left[\left(1+\frac{x}{a}\right)^{q-1}-\left(1-\frac{x}{b}\right)^{q-1}-\frac{4(q-1)}{a+b}x\right] \\ f''(x) &= q(q-1)\left[\frac{1}{a}\left(1+\frac{x}{a}\right)^{q-2}+\frac{1}{b}\left(1-\frac{x}{b}\right)^{q-2}-\frac{4}{a+b}\right] \\ f^{(3)}(x) &= q(q-1)(q-2)\left[\frac{1}{a^2}\left(1+\frac{x}{a}\right)^{q-3}-\frac{1}{b^2}\left(1-\frac{x}{b}\right)^{q-3}\right] \\ f^{(4)}(x) &= q(q-1)(q-2)(q-3)\left[\frac{1}{a^3}\left(1+\frac{x}{a}\right)^{q-4}+\frac{1}{b^3}\left(1-\frac{x}{b}\right)^{q-4}\right]. \end{align*} First, we show $f''(x) \ge 0$ for all $x \in (-a,b)$. Note that $f^{(4)}(x)>0$ for all $x$ and \[ \lim_{x \to -a^+}f''(x)=\lim_{x \to b-}f''(x)=\infty, \] so $f^{(3)}(x)$ is increasing on $(-a,b)$ and it suffices to check that $f''(x) \ge 0$ at the point where $f^{(3)}(x)=0$. Solving for this $x$ yields \begin{align*} f^{(3)}(x)=0 & \iff \frac{1}{a^2}\left(1+\frac{x}{a}\right)^{q-3}=\frac{1}{b^2}\left(1-\frac{x}{b}\right)^{q-3} \\ & \iff \left(\frac{1+\frac{x}{a}}{1-\frac{x}{b}}\right)^{3-q}=\frac{b^2}{a^2} \iff \frac{1+\frac{x}{a}}{1-\frac{x}{b}}=\frac{b^\frac{2}{3-q}}{a^\frac{2}{3-q}} \\ & \iff x=\frac{-a^\frac{2}{3-q}+b^\frac{2}{3-q}}{a^\frac{q-1}{3-q}+b^\frac{q-1}{3-q}}. \end{align*} At this $x$, \begin{align*} f''(x) &= q(q-1)\left[\frac{1}{a}\left(1+\frac{-a^\frac{2}{3-q}+b^\frac{2}{3-q}}{a^\frac{2}{3-q}+ab^\frac{q-1}{3-q}}\right)^{q-2}+\frac{1}{b}\left(1-\frac{-a^\frac{2}{3-q}+b^\frac{2}{3-q}}{a^\frac{q-1}{3-q}b+b^\frac{2}{3-q}}\right)^{q-2}-\frac{4}{a+b}\right] \\ &= q(q-1)\left[\frac{1}{a}\left(\frac{(a+b)b^\frac{q-1}{3-q}}{a\left(a^\frac{q-1}{3-q}+b^\frac{q-1}{3-q}\right)}\right)^{q-2}+\frac{1}{b}\left(\frac{(a+b)a^\frac{q-1}{3-q}}{b\left(a^\frac{q-1}{3-q}+b^\frac{q-1}{3-q}\right)}\right)^{q-2}-\frac{4}{a+b}\right] \\ &= q(q-1)\left[\frac{\left(a^\frac{q-1}{3-q}+b^\frac{q-1}{3-q}\right)^{2-q}\left(a^{1-q}b^\frac{(q-1)(q-2)}{3-q}+a^\frac{(q-1)(q-2)}{3-q}b^{1-q}\right)}{(a+b)^{2-q}}-\frac{4}{a+b}\right] \\ & \ge q(q-1)\left[\frac{2^{2-q}(ab)^\frac{(q-1)(2-q)}{2(3-q)} \cdot 2(ab)^\frac{(q-1)(2q-5)}{2(3-q)}}{(a+b)^{2-q}}-\frac{4}{a+b}\right] \\ &= 4q(q-1)\left[\frac{1}{(a+b)^{2-q}(4ab)^\frac{q-1}{2}}-\frac{1}{a+b}\right] \\ & \ge 4q(q-1)\left[\frac{1}{(a+b)^{2-q}(a+b)^{q-1}}-\frac{1}{a+b}\right]=0, \end{align*} where all inequalities follow from the inequality $(u+v)^2 \ge 4uv \iff (u-v)^2 \ge 0$ for all reals $u,v$. Since $f''(x)$ is minimized here, it follows that $f''(x) \ge 0$ for all $x \in (-a,b)$. Since $f'(0)=0$ and $f''(x) \ge 0$ for all $x \in (-a,b)$, it follows that $f'(x) \le 0$ for $x<0$ and $f'(x) \ge 0$ for $x>0$, so $f(x) \ge f(0)=0$ for all $x \in (-a,b)$. \end{proof} \begin{lem}\label{2qout} For reals $a,b \in (0,1)$, $q \in (1,2)$, and $x \not \in (-a,b)$, we have \[ a\left|\frac{x}{a}+1\right|^q+b\left|\frac{x}{b}-1\right|^q-(a+b) \ge \frac{(q-1)|x|^q}{(a+b)^{q-1}}. \] \end{lem} \begin{proof} Fix $a,b,q$; by symmetry, it suffices to consider $x \ge b$. Define the function \[ f(x)=a\left(\frac{x}{a}+1\right)^q+b\left(\frac{x}{b}-1\right)^q-(a+b)-\frac{(q-1)x^q}{(a+b)^{q-1}} \] for $x \ge b$, so that we wish to show $f(x) \ge 0$ for all $x \ge b$. Since \begin{align*} f'(x) &= q\left(\frac{x}{a}+1\right)^{q-1}+q\left(\frac{x}{b}-1\right)^{q-1}-\frac{q(q-1)x^{q-1}}{(a+b)^{q-1}} \\ & \ge q\left(\frac{x}{a+b}\right)^{q-1}+q\left(\frac{x}{b}-1\right)^{q-1}-\frac{qx^{q-1}}{(a+b)^{q-1}}>0 \end{align*} for all $x>b$, $f$ is increasing, so it suffices to show \[ f(b)=a\left(\frac{a+b}{a}\right)^q-(a+b)-\frac{(q-1)b^q}{(a+b)^{q-1}} \ge 0. \] Dividing by $a+b$ and substituting $r=\frac{a}{a+b}$, we see that this is equivalent to \[ g(r)=\frac{1}{r^{q-1}}-1-(q-1)(1-r)^q \ge 0 \] for $r \in (0,1)$. As $g(1)>0$, it suffices for \begin{align*} & g'(r)=r^{-q}(q-1)\left(qr^q(1-r)^{q-1}-1\right)<0 \\ & \iff qr^{q-1}(1-r)^{q-1}<\frac{1}{r}. \end{align*} For $r \in (0, 1)$, the quantity $r^{q-1}(1-r)^{q-1}$ is maximized when $r = \frac{1}{2}$, so it suffices to prove that $q\left(\frac{1}{2}\right)^{2q-2} < 1$ for $q \in (1,2)$. Define $h(q)=q\left(\frac{1}{2}\right)^{2q-2}$, so $h'(q) = 4^{1-q} (1- q \ln{4}) < 0$ for $q \in (1, 2)$. Since $h(1) = 1$, we have $h(q) < 1$ for $q \in (1,2)$. \end{proof} \begin{cor}\label{2qoutcor} For reals $a,b \in (0,1)$ such that $a+b \le 1$, $q \in (1,2)$, and $x \not \in (-a,b)$, we have \[ a\left|\frac{x}{a}+1\right|^q+b\left|\frac{x}{b}-1\right|^q-(a+b) \ge (q-1)|x|^q. \] \end{cor} Combining the above yields the following key result. \begin{lem}\label{2qboth} Fix $q \in (1,2)$, a nonempty set $S=\{(u_1,v_1),\ldots,(u_k,v_k)\}$ of points in $[0,1] \times \mathbb R$, and $(x,y) \in [0,1] \times \mathbb R$ such that $u_1<\ldots<u_k$, $x \neq u_i$ for any $1 \le i \le k$, and $J_q\left[f_{S \cup \{(x,y)\}}\right] \le 1$. Then \[ J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S] \ge (q-1)(y-f_S(x))^2. \] \end{lem} \begin{proof} First, suppose $x<u_1$. Then compared to $f_S$, the function $f_{S \cup \{(x,y)\}}$ contains a new line segment of (possibly) nonzero slope between $(x,y)$ and $(u_1,v_1)$, so as $|y-f_S(x)|=|v_1-y| \le 1$ (by Lemma \ref{linint1}) and $|u_1-x| \le 1$, \[ J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S]=(u_1-x)\left|\frac{v_1-y}{u_1-x}\right|^q \ge (v_1-y)^2=(y-f_S(x))^2 \ge (q-1)(y-f_S(x))^2. \] The case $x>u_k$ is similar. Now suppose there exists an integer $1 \le i<k$ such that $u_i<x<u_{i+1}$. In this case, \begin{align*} J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S] &= (x-u_i)\left|\frac{y-v_i}{x-u_i}\right|^q+(u_{i+1}-x)\left|\frac{v_{i+1}-y}{u_{i+1}-x}\right|^q-(u_{i+1}-u_i)\left|\frac{v_{i+1}-v_i}{u_{i+1}-u_i}\right|^q. \end{align*} Substituting $a=x-u_i,b=u_{i+1}-x,d=y-f_S(x)$, and $m=\frac{v_{i+1}-v_i}{u_{i+1}-u_i}=\frac{f_S(x)-v_i}{a}=\frac{v_{i+1}-f_S(x)}{b}$, we can rewrite the above as \begin{align*} J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S] &= a\left|m+\frac{d}{a}\right|^q+b\left|m-\frac{d}{b}\right|^q-(a+b)|m|^q \\ &= |m|^q\left(a\left|1+\frac{d}{ma}\right|^q+b\left|1-\frac{d}{mb}\right|^q-(a+b)\right). \end{align*} Then applying either Lemma \ref{2qin} or Corollary \ref{2qoutcor} (depending on whether $\frac{d}{m} \in (-a,b)$) yields \begin{align*} J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S] & \ge |m|^q\min\left\{\frac{2q(q-1)}{a+b} \cdot \left(\frac{d}{m}\right)^2,(q-1)\left|\frac{d}{m}\right|^q\right\} \\ &= \min\left\{\frac{2q(q-1)}{|m|^{2-q}(a+b)} \cdot d^2,(q-1)|d|^q\right\}. \end{align*} If $0<|m| \le 1$, then $a+b=u_{i+1}-u_i \le 1 \implies |m|^{2-q}(a+b) \le 1$, while if $|m| \ge 1$, then \[ |m|^{2-q}(a+b) \le |m|^q(a+b) \le J_q\left[f_{S}\right] \le J_q[f_{S \cup \{(x,y)\}}] \le 1 \] by Lemma \ref{fsmin}, so in either case \[ \frac{2q(q-1)}{|m|^{2-q}(a+b)} \cdot d^2 \ge 2q(q-1)d^2 \ge (q-1)d^2. \] Moreover, since $J_q\left[f_{S \cup \{(x,y)\}}\right] \le 1$, by Lemma \ref{linint1} $|d| \le 1.$ Hence $(q-1)|d|^q \ge (q-1)d^2$ as well. \end{proof} This directly yields the desired upper bound. \begin{thm}\label{2qup} For $q \in (1,2)$, we have $\mathscr L_2(\normalfont\text{LININT},\mathcal F_q) \le \frac{1}{q-1}$. \end{thm} \begin{proof} Fix a target function $f \in \mathcal F_q$, an integer $m \ge 1$, and a sequence of inputs $\sigma=(x_0,\ldots,x_m) \in [0,1]^{m+1}$. Assume without loss of generality that all $x_i$ are distinct. For $0 \le i \le m$, define $S_i=\{(x_0,f(x_0)),\ldots,(x_i,f(x_i))\}$, and suppose LININT produces guesses $\hat y_0,\ldots,\hat y_m \in \mathbb R$. By Lemma \ref{fsmin} and Lemma \ref{2qboth}, \[ 1 \ge J_q[f] \ge J_q\left[f_{S_m}\right]=\sum_{i=1}^m\left(J_q\left[f_{S_i}\right]-J_q\left[f_{S_{i-1}}\right]\right) \ge (q-1)\sum_{i=1}^m(\hat y_i-f(x_i))^2, \] so \[ \mathscr L_2(\text{LININT},f,\sigma)=\sum_{i=1}^m(\hat y_i-f(x_i))^2 \le \frac{1}{q-1} \] for any $f \in \mathcal F_q$, integer $m \ge 1$, and $\sigma \in [0,1]^{m+1}$. Thus $\mathscr L_2(\text{LININT},\mathcal F_q) \le \frac{1}{q-1}$. \end{proof} Finally, combining the above with the lower bound in Corollary \ref{2qlow}, we get the following result. \begin{thm}\label{2q} For $\varepsilon \in (0,1)$, we have $\operatorname{opt}_2(\mathcal F_{1+\varepsilon})=\Theta(\varepsilon^{-1})$. \end{thm} \begin{proof} Combining Corollary \ref{2qlow} and Theorem \ref{2qup}, \[\frac{\varepsilon^{-1}}{8e \ln 2}<\frac{1+\varepsilon}{(8e \ln 2)\varepsilon} \le \operatorname{opt}_2(\mathcal F_{1+\varepsilon}) \le \varepsilon^{-1}. \] Hence, $\operatorname{opt}_2(\mathcal F_{1+\varepsilon})=\Theta(\varepsilon^{-1})$.\end{proof} It is simple to generalize the upper bound in Theorem \ref{2qup} to all $p \ge 2$. \begin{cor}\label{finitepg2} For $\varepsilon \in (0,1)$ and $p \ge 2$, we have $\operatorname{opt}_p(\mathcal F_{1+\varepsilon})=O(\varepsilon^{-1})$. \end{cor} \begin{proof} By Lemma \ref{linintp}, $\operatorname{opt}_p(\mathcal F_{1+\varepsilon}) \le \mathscr L_p(\text{LININT},\mathcal F_{1+\varepsilon}) \le \mathscr L_2(\text{LININT},\mathcal F_{1+\varepsilon})=O(\varepsilon^{-1})$. \end{proof} \subsection{An exact result for large $p$}\label{pqupper} In this section, we prove that for $q \in (1,2)$ and $p \ge 2+\frac{1}{q-1}$, $\operatorname{opt}_p(\mathcal F_q)=1$. This first requires the following lemma. \begin{lem}\label{uv} For reals $q \in (1,2)$, $a \in (0,1)$, and $u,v$ satisfying $|u-v| \ge \frac{(q-1)^{q-1}}{a(1-a)}$, we have \[ a|u|^q+(1-a)|v|^q>1. \] \end{lem} \begin{proof} Without loss of generality, suppose $u>v$, so that $u \ge v+\frac{(q-1)^{q-1}}{a(1-a)}$. First, suppose $v<0<u$; then $|u|+|v| \ge \frac{(q-1)^{q-1}}{a(1-a)}$. By the weighted power mean inequality, \begin{align*} \frac{|u|(a|u|^{q-1})+|v|((1-a)|v|^{q-1})}{|u|+|v|} & \ge \left(\frac{a^{-\frac{1}{q-1}}+(1-a)^{-\frac{1}{q-1}}} {|u|+|v|}\right)^{-(q-1)} \\ \implies a|u|^q+(1-a)|v|^q & \ge \frac{(|u|+|v|)^q}{\left(a^{-\frac{1}{q-1}}+(1-a)^{-\frac{1}{q-1}}\right)^{q-1}} \\ & \ge \frac{(q-1)^{q(q-1)}}{a^q(1-a)^q\left(a^{-\frac{1}{q-1}}+(1-a)^{-\frac{1}{q-1}}\right)^{q-1}} \\ & \ge \frac{(q-1)^{q(q-1)}}{2^{q-1}a^q(1-a)^q\max\left\{a^{-1},(1-a)^{-1}\right\}} \\ &= \frac{(q-1)^{q(q-1)}}{2^{q-1}\max\left\{a^{q-1}(1-a)^q,a^q(1-a)^{q-1}\right\}}. \end{align*} By the weighted arithmetic mean - geometric mean inequality, for $r \in (0, 1)$ we have \begin{align*} r^q(1-r)^{q-1} &= \frac{q^q}{(q-1)^q}\left(\frac{(q-1)r}{q}\right)^q(1-r)^{q-1} \\ & \le \frac{q^q}{(q-1)^q}\left(\frac{q \cdot \frac{(q-1)r}{q}+(q-1)(1-r)}{(q-1)+q}\right)^{(q-1)+q} \\ &= \frac{q^q}{(q-1)^q}\left(\frac{q-1}{2q-1}\right)^{2q-1}. \end{align*} Thus \[ \max\left\{a^{q-1}(1-a)^q,a^q(1-a)^{q-1}\right\} \le \frac{q^q}{(q-1)^q}\left(\frac{q-1}{2q-1}\right)^{2q-1}=\frac{q^q(q-1)^{q-1}}{(2q-1)^{2q-1}}, \] so \[ a|u|^q+(1-a)|v|^q \ge \frac{(q-1)^{(q-1)^2}(2q-1)^{2q-1}}{2^{q-1}q^q}. \] Consider \[ f(q)=(q-1)^2\ln(q-1)+(2q-1)\ln(2q-1)-(q-1)\ln 2-q\ln q \] over $q \in (1,2)$. Note that \begin{align*} f'(q) &= (2(q-1)\ln(q-1)+(q-1))+(2\ln(2q-1)+2)-\ln 2-(\ln q+1) \\ &= 1-\ln 2+2(q-1)\ln(q-1)+(q-1-\ln q)+2\ln(2q-1) \\ & \ge 1-\ln 2+2(q-1)\ln(q-1)+2\ln(2q-1), \end{align*} as $e^x \ge 1+x$ implies that $x \ge \ln(1+x)$ for $x>-1$. Since $x\ln x$ is decreasing on $\left(0,\frac{1}{e}\right)$ and increasing on $\left(\frac{1}{e},\infty\right)$ (so in particular $x \ln x \ge -\frac{1}{e}$ for $x>0$), \begin{align*} q \in (1,1.004] & \implies f'(q) \ge 1-\ln 2+0.008\ln 0.004>0 \\ q \in [1.004,1.055] & \implies f'(q) \ge 1-\ln 2+0.11\ln 0.055+2\ln 1.008>0 \\ q \in [1.055,1.12] & \implies f'(q) \ge 1-\ln 2+0.24\ln 0.12+2\ln 1.11>0 \\ q \in [1.12,2) & \implies f'(q) \ge 1-\ln 2-\frac{2}{e}+2\ln 1.24>0, \end{align*} so for all $q \in (1,2)$, $f'(q)>0$. As $\displaystyle\lim_{q \to 1^+}f(q)=0$, it follows that $f(q)>0$ for $q \in (1,2)$, so $a|u|^q+(1-a)|v|^q \ge e^{f(q)}>1$ whenever $v<0<u$. Now suppose $v \ge 0$. As $|x|^q$ is increasing for $x \ge 0$, \[ a|u|^q+(1-a)|v|^q \ge a\left(\frac{(q-1)^{q-1}}{a(1-a)}\right)^q=\frac{(q-1)^{q(q-1)}}{a^{q-1}(1-a)^q}. \] Using the work above, \[ \frac{(q-1)^{q(q-1)}}{a^{q-1}(1-a)^q} \ge \frac{(q-1)^{q(q-1)}}{\max\left\{a^{q-1}(1-a)^q,a^q(1-a)^{q-1}\right\}}>2^{q-1}>1, \] so the inequality holds whenever $v \ge 0$. The case $u \le 0$ is identical, which completes the proof. \end{proof} With this, we have the following key result. \begin{lem}\label{pqboth} Fix $q \in (1,2)$, a nonempty set $S=\{(u_1,v_1),\ldots,(u_k,v_k)\}$ of points in $[0,1] \times \mathbb R$, and $(x,y) \in [0,1] \times \mathbb R$ such that $u_1<\ldots<u_k$, $x \neq u_i$ for any $1 \le i \le k$, and $J_q\left[f_{S \cup \{(x,y)\}}\right] \le 1$. Let $p=2+\frac{1}{q-1}$. Then \[ J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S] \ge |y-f_S(x)|^p. \] \end{lem} \begin{proof} We first show that $|y-f_S(x)|>(q-1)^{q-1}$ and $x \in (u_1,u_k)$ cannot both hold. Suppose otherwise, so that there exists an integer $1 \le i<k$ such that $u_i<x<u_{i+1}$. We will derive a contradiction by showing $J_q\left[f_{S \cup \{(x,y)\}}\right]>1$. Clearly \[ J_q\left[f_{S \cup \{(x,y)\}}\right] \ge (x-u_i)\left|\frac{y-v_i}{x-u_i}\right|^q+(u_{i+1}-x)\left|\frac{v_{i+1}-y}{u_{i+1}-x}\right|^q. \] Substituting $a=x-u_i,b=u_{i+1}-x,d=y-f_S(x)$, and $m=\frac{v_{i+1}-v_i}{u_{i+1}-u_i}$ as in Lemma \ref{2qboth}, this rewrites as \[ J_q\left[f_{S \cup \{(x,y)\}}\right] \ge a\left|m+\frac{d}{a}\right|^q+b\left|m-\frac{d}{b}\right|^q. \] As $a+b=u_{i+1}-u_i \le 1$ and $q>1$, \[ J_q\left[f_{S \cup \{(x,y)\}}\right] \ge \frac{a}{a+b}\left|(a+b)m+\frac{d(a+b)}{a}\right|^q+\frac{b}{a+b}\left|(a+b)m-\frac{d(a+b)}{b}\right|^q, \] and because \[ |d|>(q-1)^{q-1} \implies \left|d(a+b)\left(\frac{1}{a}+\frac{1}{b}\right)\right|=\frac{|d|(a+b)^2}{ab} \ge \frac{(q-1)^{q-1}}{\frac{a}{a+b} \cdot \frac{b}{a+b}}, \] applying Lemma \ref{uv} yields $J_q\left[f_{S \cup \{(x,y)\}}\right]>1$, contradiction. Thus at least one of $|y-f_S(x)| \le (q-1)^{q-1}$ and $x \not \in (u_1,u_k)$ holds. If \[ |y-f_S(x)| \le (q-1)^{q-1} \implies (q-1)(y-f_S(x))^2 \ge |y-f_S(x)|^p, \] the result follows from Lemma \ref{2qboth}. Otherwise, assume without loss of generality that $x<u_1$ (the case $x>u_k$ is similar); then \[ J_q\left[f_{S \cup \{(x,y)\}}\right]-J_q[f_S]=(u_1-x)\left|\frac{v_1-y}{u_1-x}\right|^q \ge |v_1-y|^q \ge |v_1-y|^p=|y-f_S(x)|^p \] by Lemma \ref{linint1} (as $q<2<p$) and the result holds in this case as well. \end{proof} This immediately yields the following. \begin{thm}\label{pq} For any reals $q>1$ and $p \ge 2+\frac{1}{q-1}$, we have $\operatorname{opt}_p(\mathcal F_q)=1$. \end{thm} \begin{proof} By Proposition \ref{pq1} and Corollary \ref{linintp}, it suffices to prove that for $q \in (1,2)$ and $p=2+\frac{1}{q-1}$, $\mathscr L_p(\text{LININT},\mathcal F_q) \le 1$. Fix $p=2+\frac{1}{q-1}$, a target function $f \in \mathcal F_q$, an integer $m \ge 1$, and a sequence of inputs $\sigma=(x_0,\ldots,x_m) \in [0,1]^{m+1}$. Assume without loss of generality that all $x_i$ are distinct. For $0 \le i \le m$, define $S_i=\{(x_0,f(x_0)),\ldots,(x_i,f(x_i))\}$, and suppose LININT produces guesses $\hat y_0,\ldots,\hat y_m \in \mathbb R$. By Lemma \ref{fsmin} and Lemma \ref{pqboth}, \[ 1 \ge J_q[f] \ge J_q\left[f_{S_m}\right]=\sum_{i=1}^m\left(J_q\left[f_{S_i}\right]-J_q\left[f_{S_{i-1}}\right]\right) \ge \sum_{i=1}^m|\hat y_i-f(x_i)|^p, \] so $\mathscr L_p(\text{LININT},f,\sigma) \le 1$ for any $f \in \mathcal F_q$ and $\sigma$. Thus $\mathscr L_p(\text{LININT},\mathcal F_q) \le 1$. \end{proof} \subsection{Sharp bounds for $p \in (1, 2)$}\label{pql2} The paper \cite{kl} showed that $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = O(\varepsilon^{-1})$ for all $\varepsilon \in (0, 1)$ and $q \ge 2$. In this section, we first improve their upper bound by proving that $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = O(\varepsilon^{-\frac{1}{2}})$ for all $\varepsilon \in (0, 1)$ and $q \ge 2$. Then we show that this bound is sharp by proving that $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = \Omega(\varepsilon^{-\frac{1}{2}})$ for all $q \ge 1$. In order to prove the upper bound, we use two lemmas from \cite{kl}. To state the lemmas and prove our upper bound, we use the following notation. Let $x_0, \ldots, x_m$ be any sequence of distinct elements of $[0, 1]$, and let $f \in \mathcal{F}_2$. Let $\hat{y}_1, \ldots, \hat{y}_m$ be LININT's predictions on trials $1, \ldots, m$. For each $i > 1$, let $d_i = \min_{j < i} |x_j - x_i|$ and let $e_i = |\hat{y}_i - f(x_i)|$. \begin{lem}[\cite{kl}] \label{ei2di} For all positive integers $m$, we have $\sum_{i = 1}^m \frac{e_i^2}{d_i} \le 1$. \end{lem} \begin{lem}[\cite{kl}] \label{sumditop} For all positive integers $m$ and real numbers $x > 1$, we have $\sum_{i = 1}^m d_i^x \le 1 + \frac{1}{2^x - 2}$. \end{lem} By combining Lemmas \ref{ei2di} and \ref{sumditop} with H\"older's inequality, we obtain the following sharp upper bound. \begin{thm}\label{upperbound} If $p = 1+\varepsilon \in (1,2)$, then $\operatorname{opt}_{p}(\mathcal{F}_2) = O(\varepsilon^{-\frac{1}{2}})$. \end{thm} \begin{proof} First, note that \[\sum_{i = 1}^m e_i^p = \sum_{i = 1}^m \frac{e_i^p}{d_i^{\frac{p}{2}}} \cdot d_i^{\frac{p}{2}}.\] By H\"older's inequality, we have \begin{align*} \sum_{i = 1}^m \frac{e_i^p}{d_i^{\frac{p}{2}}} \cdot d_i^{\frac{p}{2}} \le \left(\sum_{i = 1}^m \frac{e_i^2}{d_i}\right)^{\frac{p}{2}} \left( \sum_{i = 1}^m d_i^{\frac{p}{2-p}}\right)^{1 - \frac{p}{2}}. \end{align*} Note that $\sum_{i = 1}^m \frac{e_i^2}{d_i} \le 1$ by Lemma \ref{ei2di} and \[\sum_{i = 1}^m d_i^{\frac{p}{2-p}} \le 1 + \frac{1}{2^{\frac{p}{2-p}}-2}\] by Lemma \ref{sumditop}, since $p > 1$ implies that $\frac{p}{2-p} > 1$. Thus \[\left(\sum_{i = 1}^m d_i^{\frac{p}{2-p}}\right)^{1 - \frac{p}{2}} \le \left(1 + \frac{1}{2^{\frac{p}{2-p}}-2}\right)^{1-\frac{p}{2}}.\] Let $\delta = \frac{p}{2-p}-1$, and note that $\frac{1}{\delta} = \frac{2-p}{2p - 2}$. Thus \[\left(1 + \frac{1}{2^{\frac{p}{2-p}}-2}\right)^{1-\frac{p}{2}} = \left(1 + \frac{1}{2^{1+\delta}-2}\right)^{1-\frac{p}{2}} = O\left(\left(1+\frac{1}{\delta}\right)^{\frac{2-p}{2}}\right)=O\left(\left(\frac{p}{2p-2}\right)^{\frac{2-p}{2}}\right),\] where the upper bound follows from the fact that $e^{\delta \ln{2}} \ge 1+\delta \ln{2}$. Thus we have proved that \[\sum_{i = 1}^m e_i^p = O\left(\left(\frac{p}{2p-2}\right)^{\frac{2-p}{2}}\right),\] so $\operatorname{opt}_{p}(\mathcal{F}_2) = O\left(\left(2p-2\right)^{-\frac{2-p}{2}}\right)$, where we use the fact that $p^{\frac{2-p}{2}} = \Theta(1)$ for $p \in (1,2)$ to obtain the last bound. Since $p = 1+\varepsilon$, we have \[\operatorname{opt}_{p}(\mathcal{F}_2) = O\left(\left(2p-2\right)^{-\frac{2-p}{2}}\right) = O\left(\varepsilon^{-\frac{1-\varepsilon}{2}}\right) = O(\varepsilon^{-\frac{1}{2}}),\] where we use the fact that $\varepsilon^{\varepsilon} = \Theta(1)$ for $\varepsilon \in (0, 1)$ to obtain the last bound. \end{proof} We obtain the next corollary since $\operatorname{opt}_p(\mathcal{F}_{\infty}) \le \operatorname{opt}_p(\mathcal{F}_r) \le \operatorname{opt}_p(\mathcal{F}_q)$ whenever $1 \le q \le r$. \begin{cor} \label{mainupper} If $\varepsilon \in (0, 1)$, then $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = O(\varepsilon^{-\frac{1}{2}})$ and $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = O(\varepsilon^{-\frac{1}{2}})$ for all $q \ge 2$, where the constant does not depend on $q$. \end{cor} In order to show that the last corollary is sharp up to a constant factor, we construct a family of functions in $\mathcal{F}_{\infty}$. Our proof uses the following lemma from \cite{kl} which was also used in \cite{long}. \begin{lem}[\cite{kl}] \label{kl_jlem} Let $S \subseteq [0, 1] \times \mathbb{R}$ with $S = \left\{(u_i, v_i): 1 \le i \le m\right\}$ and $u_1 < u_2 < \cdots < u_m$. If $(x,y) \in [0, 1] \times \mathbb{R}$ and there exists $1 \le j \le m$ such that $|x-u_j| = |x-u_{j+1}| = \min_i |x-u_i|$, then $J_2[f_{S \cup \left\{(x,y) \right\}}] = J_2[f_S] + \frac{2(y-f_S(x))^2}{\min_i |x-u_i|}$. \end{lem} The method in the following proof is similar to one used in \cite{long} to obtain bounds for a finite variant of $\operatorname{opt}_1(\mathcal{F}_q)$ for $q \ge 2$ that depends on the number of trials $m$. \begin{thm}\label{lowerbound} If $\varepsilon \in (0, 1)$, then $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Omega(\varepsilon^{-\frac{1}{2}})$. \end{thm} \begin{proof} Since $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) \ge 1$ for all $\varepsilon \in (0, 1)$, it suffices to prove the theorem for $\varepsilon \in \left(0, \frac{1}{2}\right)$. Define $x_0 = 1$ and $y_0 = 0$. For natural numbers $i, j$ with $0 \le j < 2^{i-1}$, define $x_{2^{i-1}+j} = \frac{1}{2^i}+\frac{j}{2^{i-1}}$. For each $i = 1, 2, \ldots$, we consider the trials for $x_{2^{i-1}}, \ldots, x_{2^i - 1}$ to be part of stage $i$, so that $x_1 = \frac{1}{2}$ is in stage $1$, $x_2 = \frac{1}{4}$ and $x_3 = \frac{3}{4}$ are in stage $2$, and so on. Let $A$ be any algorithm for learning $\mathcal{F}_{\infty}$. Using $A$, we construct an infinite sequence of piecewise linear functions $f_0, f_1, \ldots \in \mathcal{F}_{\infty}$ and an infinite sequence of numbers $y_0, y_1, \ldots \in \mathbb{R}$ for which $f_t$ is consistent with the $x_k$ and $y_k$ values for $k \le t$ and $A$ has total $(1+\varepsilon)$-error at least \[\sum_{k = 1}^i 2^{k-2} \left(\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{k}{2}}}{2^{k+1}}\right)^{1+\varepsilon}\] after $i$ stages. This implies that \[\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) \ge \sum_{k = 1}^{\infty} 2^{k-2} \left(\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{k}{2}}}{2^{k+1}}\right)^{1+\varepsilon}.\] In order to analyze the functions $f_i$, we will also define and analyze another infinite sequence of piecewise linear functions $g_{i, j}$ with $0 \le j \le 2^{i-1}$ and another infinite sequence of numbers $v_1, v_2, \ldots \in \mathbb{R}$. We start by letting $f_0$ be the $0$-function. Next, we inductively define both sequences of piecewise linear functions. Fix a stage $i$, and let $g_{i, 0} = f_{2^{i-1}-1}$. Let $t$ be a trial in stage $i$, and let $v_t$ be whichever of $f_{t-1}(x_t) \pm \frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{i}{2}}}{2^{i+1}}$ is furthest from $\hat{y}_t$. Let $g_{i, t-2^{i-1}+1}$ be the function which linearly interpolates $\left\{(0, 0), (1, 0) \right\} \cup \left\{(x_s, y_s): s < 2^{i-1} \right\} \cup \left\{(x_s, v_s): 2^{i-1} \le s \le t \right\}$. For any $t \ge 1$, let $L_t$ and $R_t$ be the elements of $\left\{0, 1 \right\} \cup \left\{x_s: s < t \right\}$ that are closest to $x_t$ on the left and right respectively. If both $|v_t - f_{t-1}(L_t)| \le 2^{-i}$ and $|v_t - f_{t-1}(R_t)| \le 2^{-i}$, then let $y_t = v_t$. Otherwise we let $y_t = f_{t-1}(x_t)$. Finally, we define $f_t$ to be the function which linearly interpolates $\left\{(0, 0), (1, 0)\right\} \cup \left\{(x_s, y_s): s \le t\right\}$. By definition, we have $f_t \in \mathcal{F}_{\infty}$ for each $t \ge 0$. We will prove next that for all $i, j$ we have $J_2[g_{i, j}] \le \frac{1}{4}$, and then we will use this to prove that $y_t = f_{t-1}(x_t)$ for at most half of the trials $t$ in stage $i$. The proof will use double induction, first on $i$ and then on $j$, and we will prove the stronger statement that \begin{equation}\label{stronger_statement} J_2[g_{i, j}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i-1} (1-\varepsilon)^k + \frac{j \varepsilon (1-\varepsilon)^i }{2^{i+1}}.\end{equation} In order to prove this statement, we will also prove that \begin{equation}\label{sum0toi-1of_f}J_2[f_{2^{i-1}-1}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i-1} (1-\varepsilon)^k\end{equation} for all $i \ge 1$. Note that this is equivalent to proving that \[J_2[g_{i, 0}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i-1} (1-\varepsilon)^k\] for all $i \ge 1$. Clearly this is true for $i = 1$, which is the base case of the induction on $i$. Fix some stage $i \ge 1$. We will assume that Inequality \ref{sum0toi-1of_f} is true for this fixed $i$, and use this to prove that \begin{equation}\label{sum0toiof_f}J_2[f_{2^{i}-1}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i} (1-\varepsilon)^k.\end{equation} In order to prove Inequality \ref{sum0toiof_f}, we will prove Inequality \ref{stronger_statement} for all $0 \le j \le 2^{i-1}$. This follows from the inductive hypothesis for $i$ and the definition of $g_{i, 0}$ when $j = 0$, which is the base case of the induction on $j$. Fix some integer $j$ with $0 \le j \le 2^{i-1}-1$ and assume that Inequality \ref{stronger_statement} is true for this fixed $j$. By Lemma \ref{kl_jlem}, we have \[J_2[g_{i, j+1}] = J_2[g_{i, j}]+ \frac{2\left(\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{i}{2}}}{2^{i+1}}\right)^2}{2^{-i}} = J_2[g_{i, j}]+\frac{\varepsilon (1-\varepsilon)^i}{2^{i+1}}.\] By the inductive hypothesis for $j$, we obtain \[J_2[g_{i, j+1}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i-1} (1-\varepsilon)^k+ \frac{j \varepsilon (1-\varepsilon)^i }{2^{i+1}} + \frac{\varepsilon (1-\varepsilon)^i}{2^{i+1}},\] which completes the inductive step for $j$. Substituting $j = 2^{i-1}$, we obtain \[J_2[g_{i,2^{i-1}}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i} (1-\varepsilon)^k.\] Note that Lemma \ref{kl_jlem} implies that \[J_2[f_{2^{i-1}-1+j}] \le J_2[g_{i, j}]\] for all $j = 0, \ldots, 2^{i-1}$, so we obtain Inequality \ref{sum0toiof_f}, which completes the inductive step for $i$. By Inequality \ref{stronger_statement}, we obtain \[J_2[g_{i, j}] \le \frac{\varepsilon}{4} \sum_{k = 0}^{i-1} (1-\varepsilon)^k + \frac{\varepsilon (1-\varepsilon)^i }{4} = \frac{\varepsilon}{4} \sum_{k = 0}^{i} (1-\varepsilon)^k\] for all $j$ with $0 \le j \le 2^{i-1}$. Note that \[\frac{\varepsilon}{4} \sum_{k = 0}^{i} (1-\varepsilon)^k < \frac{\varepsilon}{4} \sum_{k = 0}^{\infty} (1-\varepsilon)^k = \frac{1}{4}.\] Now that we have shown that $J_2[g_{i, j}] \le \frac{1}{4}$, we are ready to prove for each $i \ge 1$ that $y_t = f_{t-1}(x_t)$ for at most half of the trials $t$ in stage $i$. For each trial $t$ with $y_t = f_{t-1}(x_t)$, note that the absolute value of the slope of $g_{i, t-2^{i-1}+1}$ must exceed $1$ in at least one of the intervals of length $2^{-i}$ on either side of $x_t$. If $y_t = f_{t-1}(x_t)$ for at least $b$ of the trials in stage $i$, then restricting to intervals of slope at least $1$ implies that $J_2[g_{i, 2^{i-1}}] \ge b 2^{-i}$. Since $J_2[g_{i, 2^{i-1}}] \le \frac{1}{4}$, we must have $b \le 2^{i-2}$. Thus during stage $i$, there are at most $2^{i-2}$ trials $t$ with $y_t = f_{t-1}(x_t)$, which implies that there are at least $2^{i-2}$ trials with $y_t = v_t$. In each of those trials, $A$ was off by at least $\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{i}{2}}}{2^{i+1}}$, so the total $(1+\varepsilon)$-error of $A$ after $i$ stages is at least $\sum_{k = 1}^i 2^{k-2} \left(\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{k}{2}}}{2^{k+1}}\right)^{1+\varepsilon}$. Thus \[ \operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) \ge \sum_{k = 1}^{\infty} 2^{k-2} \left(\frac{\sqrt{\varepsilon}(1-\varepsilon)^{\frac{k}{2}}}{2^{k+1}}\right)^{1+\varepsilon} = \frac{\frac{1}{2}\left(\frac{\sqrt{\varepsilon(1-\varepsilon)}}{4}\right)^{1+\varepsilon}}{1-2\left(\frac{\sqrt{1-\varepsilon}}{2}\right)^{1+\varepsilon}} = \Omega\left(\frac{(\varepsilon(1-\varepsilon))^{\frac{1+\varepsilon}{2}}}{1-2\left(\frac{\sqrt{1-\varepsilon}}{2}\right)^{1+\varepsilon}}\right). \] Since $\varepsilon^{\varepsilon} = \Theta(1)$ and $(1-\varepsilon)^{1+\varepsilon} = \Theta(1)$ for $\varepsilon \in \left(0, \frac{1}{2}\right)$, we have $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Omega\left(\frac{\sqrt{\varepsilon}}{1-2\left(\frac{\sqrt{1-\varepsilon}}{2}\right)^{1+\varepsilon}}\right)$. Since $2^{\varepsilon} = \Theta(1)$ for $\varepsilon \in \left(0, \frac{1}{2}\right)$, we have $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Omega\left(\frac{\sqrt{\varepsilon}}{2^{\varepsilon}-\sqrt{1-\varepsilon}^{1+\varepsilon}}\right)$. Note that $(1-\varepsilon)^{\frac{1+\varepsilon}{2}} \ge 1-\varepsilon(1+\varepsilon)$ for $\varepsilon \in \left(0, \frac{1}{2}\right)$. To check this, note that it is true when $\varepsilon = 0$, and the derivative of $(1-\varepsilon)^{\frac{1+\varepsilon}{2}} - (1-\varepsilon(1+\varepsilon))$ is \[2 \varepsilon +1+ (1-\varepsilon)^{\frac{1+\varepsilon}{2}}\left(\frac{1}{2}\ln(1-\varepsilon)-\frac{1}{2} -\frac{\varepsilon}{1-\varepsilon}\right) > 0\] for $\varepsilon \in \left(0, \frac{1}{2}\right)$. Thus, $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Omega\left(\frac{\sqrt{\varepsilon}}{2^{\varepsilon}-1+\varepsilon(1+\varepsilon)}\right)$. Also note that $2^{\varepsilon} \le 1+\varepsilon$ for $\varepsilon \in (0, 1)$. Equality holds at $\varepsilon = 0$ and $\varepsilon = 1$, and the derivative of $1+\varepsilon - 2^{\varepsilon}$ is $1-2^{\varepsilon}\ln{2}$, which is positive for $\varepsilon \in \left(0, \frac{-\ln{\ln{2}}}{\ln{2}}\right)$ and negative for $\varepsilon \in \left(\frac{-\ln{\ln{2}}}{\ln{2}}, 1\right)$. Thus $2^{\varepsilon}-1+\varepsilon(1+\varepsilon) < 3\varepsilon$, so $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Omega(\varepsilon^{-\frac{1}{2}})$. \end{proof} The next corollary follows from Theorem \ref{lowerbound}, again using the fact that $\operatorname{opt}_p(\mathcal{F}_{\infty}) \le \operatorname{opt}_p(\mathcal{F}_r) \le \operatorname{opt}_p(\mathcal{F}_q)$ whenever $1 \le q \le r$. \begin{cor} \label{mainlower} If $\varepsilon \in (0, 1)$, then $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = \Omega(\varepsilon^{-\frac{1}{2}})$ for all $q \ge 1$, where the constant does not depend on $q$. \end{cor} Combining Corollaries \ref{mainupper} and \ref{mainlower}, we have the following theorem. \begin{thm} If $\varepsilon \in (0, 1)$, then $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_{\infty}) = \Theta(\varepsilon^{-\frac{1}{2}})$ and $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = \Theta(\varepsilon^{-\frac{1}{2}})$ for all $q \ge 2$, where the constant in the bound does not depend on $q$. \end{thm} \section{A multi-variable generalization}\label{3} In this section, we prove several results on $\operatorname{opt}_p(\mathcal F_{q,d})$. First, we prove a simple lower bound for $\operatorname{opt}_p(\mathcal F_{q,d})$ in terms of $\operatorname{opt}_p(\mathcal F_q)$. \begin{prop} \label{dlower} For any positive integer $d$, real number $p > 0$, and $q \in [1, \infty) \cup \left\{\infty\right\}$, we have \[ \operatorname{opt}_p(\mathcal F_{q,d}) \ge d^p \cdot \operatorname{opt}_p(\mathcal F_q). \] \end{prop} \begin{proof} If $\operatorname{opt}_p(\mathcal F_{q,d})=\infty$, there is nothing to prove, and if $\operatorname{opt}_p(\mathcal F_q)=\infty$, it is clear, by restricting the inputs $\mathbf x_i$ to the set $\{c\mathbf e_1: c \in [0,1]\} \subset [0,1]^d$ (where $\mathbf e_1 \in [0,1]^d$ has a $1$ in the first component and a $0$ in the rest), that $\operatorname{opt}_p(\mathcal F_{q,d})=\infty$ as well. Now suppose that both $\operatorname{opt}_p(\mathcal F_{q,d})$ and $\operatorname{opt}_p(\mathcal F_q)$ are finite. Fix any algorithm $A$ for learning $\mathcal F_{q,d}$. Let $\mathbf{1}$ be the all-ones $d$-tuple and let $a(x_i : (x_0, z_0),\dots,(x_{i-1},z_{i-1}))$ denote the output of $A$ given the input $x_i \mathbf{1}$ after learning the pairs $(x_j \mathbf{1}, z_j)$ for $j < i$, given that there is a function in $\mathcal{F}_{q,d}$ which passes through the points $(x_j \mathbf{1}, z_j)$ for $j < i$. Then let $A’$ be the algorithm for learning $\mathcal{F}_q$ which, given the input $x_i$ after learning the pairs $(x_j, w_j)$ for $j < i$, returns the output \[ a'(x_i : (x_0, w_0),\dots,(x_{i-1},w_{i-1}))=\frac{a(x_i : (x_0, d w_0),\dots,(x_{i-1},d w_{i-1}))}{d}, \] given that there is a function in $\mathcal{F}_q$ which passes through the points $(x_j, w_j)$ for $j < i$. Fix $\varepsilon > 0$. Then there exist $f \in \mathcal{F}_q$ and a sequence of inputs $x_0, x_1, \ldots, x_M$ such that \[ \sum_{i = 1}^{M} |a'(x_i : (x_0, f(x_0)),\dots,(x_{i-1},f(x_{i-1})))-f(x_i)|^p \ge \operatorname{opt}_p(\mathcal{F}_q)-\varepsilon.\] Against $A$, the adversary uses the function \[\gamma(a_1,\ldots,a_d) = \sum_{i = 1}^d f(a_i)\] with the inputs $x_0 \mathbf{1}, x_1 \mathbf{1}, \ldots, x_M \mathbf{1}$. First, suppose that $q \in [1, \infty)$. Observe that for any $1 \le k \le d$ and $d-1$ reals $x_i \in [0,1]$, where $1 \le i \le d$ but $i \neq k$, \[ \int_0^1 \left| \frac{\text{d}\gamma}{\text{d}x_k} \right|^q\text{d}x_k = \int_0^1|f'(x)|^q\text{d}x \le 1 \] since $f \in \mathcal F_q$; hence, $\gamma \in \mathcal F_{q,d}$. Next, suppose that $q = \infty$. Observe that $\left| \frac{\text{d}\gamma}{\text{d}x_k} \right| = |f'(x_k)| \le 1$ for all $x_k \in [0,1]$ since $f \in \mathcal F_q$; hence, in this case we also have $\gamma \in \mathcal F_{q,d}$. To finish the proof, let \[e_i = |a'(x_i: (x_0, f(x_0)),\dots,(x_{i-1},f(x_{i-1})))-f(x_i)|\] and \[k_i = |a(x_i : (x_0, \gamma(x_0 \mathbf{1})),\dots,(x_{i-1},\gamma(x_{i-1} \mathbf{1})))-\gamma(x_i \mathbf{1})|\] for each $i$. Thus, \[k_i = |d a'(x_i : (x_0, f(x_0)),\dots,(x_{i-1},f(x_{i-1})))-d f(x_i)| = d e_i\] and \[ \sum_{i = 1}^{M} e_i^p \ge \operatorname{opt}_p(\mathcal{F}_q)-\varepsilon.\] Hence, \[ \sum_{i = 1}^{M} k_i^p \ge d^p(\operatorname{opt}_p(\mathcal{F}_q)-\varepsilon).\] Taking $\varepsilon \to 0$ finishes the proof. \end{proof} The next corollary follows from Proposition \ref{dlower} since $\operatorname{opt}_p(\mathcal F_{1}) = \infty$ \cite{kl}. \begin{cor} For any positive integer $d$ and real number $p > 0$, we have $\operatorname{opt}_p(\mathcal F_{1,d}) = \infty$. \end{cor} Now we directly prove some results about $\operatorname{opt}_p(\mathcal F_{\infty,d})$, depending on whether $p<d$ or $p>d$. The main negative result is the following. \begin{thm}\label{p_inf_d} Let $d>0$ be an integer and $p$ be a real number with $0 < p<d$. Then $\operatorname{opt}_p(\mathcal F_{\infty,d})=\infty$. \end{thm} \begin{proof} Fix any algorithm $A$ for learning $\mathcal F_{\infty,d}$. Then choose any integer $n \ge 1$, and let $S$ be the set of reals $0<r<1$ such that $2n r$ is an odd integer (so $|S|=n$). The adversary first reveals $f(0,\ldots,0)=0$, then chooses $\mathbf x_i$ ranging over all elements of $S^d$ in lexicographic order, receives input $\hat y_i$ from $A$, and reveals $f(\mathbf x_i)=\pm\frac{1}{2n}$, whichever is farther from $\hat y_i$. Let $\{x\}=x-\lfloor x \rfloor$ denote the fractional part of $x$. At the end of the $n^{d}+1$ trials, the algorithm's revealed values of $f$ are consistent with a function $f: [0,1]^d \to \mathbb R$ given by \[ f(x_1,\ldots,x_d)=\pm \frac{1}{n} \min_{1 \le i \le d} \left(\min \left(\{n x_i\},\{-n x_i\}\right) \right), \] where the signs $\pm$ are chosen such that $f(\mathbf x)$ agrees with the adversary's outputs for any $\mathbf x=(x_1,\ldots,x_d) \in S^d$ and $f$ has constant sign in any region \[ \left(\frac{n_1}{n},\frac{n_1+1}{n}\right) \times \ldots \times \left(\frac{n_d}{n},\frac{n_d+1}{n}\right) \subset [0,1]^d \] for integers $0 \le n_i < n$. The consistency follows since $\{n x_i\} = \{-n x_i\} = \frac{1}{2}$ for all $x_i \in S$. First, we show $f \in \mathcal F_{\infty,d}$. Fix any $1 \le i \le d$ and $\mathbf x=(x_1,\ldots,x_{d-1}) \in [0,1]^{d-1}$, and consider the function $g:[0,1] \to \mathbb R$ given by $g(x)=f(\mathbf x')$, where $\mathbf x' \in [0,1]^d$ is formed by inserting $x$ into the $i^{\text{th}}$ position of $\mathbf x$. Then $g$ is given by \[ g(x)=\pm \frac{1}{n}\min\left(\min\left(\{n x\},\{-n x\}\right),M\right), \] where \[ M=\min_{1 \le i \le d-1} \left(\min \left(\{n x_i\},\{-n x_i\}\right) \right). \] Evidently $g$ is piecewise linear, with finitely many points where $g'$ is not defined and $|g'(x)| = 1$ or $g'(x) = 0$ everywhere else by definition of $g$; moreover, since the function $\min(\{n x\},\{-n x\})$ is continuous, it follows that $g$ is continuous. Hence $g \in \mathcal F_\infty$. Since this holds for any choice of $1 \le i \le d$ and $\mathbf x \in [0,1]^d$, it follows that $f \in \mathcal F_{\infty,d}$. Now we find a lower bound for the error the adversary can guarantee. There are $n^{d}$ trials past the first, each of which has $|\hat y_i-f(\mathbf x_i)| \ge \frac{1}{2n}$; hence the adversary guarantees \[ \sum_{i>0}|\hat y_i-f(\mathbf x_i)|^p \ge \frac{n^{d}}{(2n)^{p}}=\frac{1}{2^p} \cdot n^{d-p}. \] Because $p<d$, this grows arbitrarily large as $n$ increases; hence $\operatorname{opt}_p(\mathcal F_{\infty,d})=\infty$. \end{proof} As $\mathcal F_\infty \subseteq \mathcal F_q$ implies that $\mathcal F_{\infty,d} \subseteq \mathcal F_{q,d}$ for any $q \ge 1$, this bound extends to $q \neq \infty$. \begin{cor} Let $d>0$ be an integer and $p$ be a real number with $0 < p<d$. For any $q \ge 1$, we have $\operatorname{opt}_p(\mathcal F_{q,d})=\infty$. \end{cor} In order to establish upper bounds on $\operatorname{opt}_p(\mathcal F_{\infty,d})$, we prove the following lemma. \begin{lem}\label{tri} For $f \in \mathcal F_{\infty,d}$ and $\mathbf x_1=(x_{1,1},\ldots,x_{d,1}),\mathbf x_2=(x_{1,2},\ldots,x_{d,2}) \in [0,1]^d$, we have \[ |f(\mathbf x_1)-f(\mathbf x_2)| \le \sum_{i=1}^d|x_{i,1}-x_{i,2}|. \] \end{lem} \begin{proof} Fix such $f,\mathbf x_1,\mathbf x_2$. Define a sequence of $\mathbf x_i' \in [0,1]^d$, for $0 \le i \le d$, such that $\mathbf x_i'$ has its first $i$ components equal to the first $i$ components of $\mathbf x_2$ and its last $d-i$ components equal to the last $d-i$ components of $\mathbf x_1$ (so $\mathbf x_0'=\mathbf x_1$ and $\mathbf x_d'=\mathbf x_2$). By the triangle inequality, \[ |f(\mathbf x_1)-f(\mathbf x_2)|=\left|\sum_{i=1}^d \left(f(\mathbf x_{i-1}')-f(\mathbf x_i')\right)\right| \le \sum_{i=1}^d \left|f(\mathbf x_{i-1}')-f(\mathbf x_i')\right|. \] Now consider any $1 \le i \le d$. Note that $\mathbf x_{i-1}$ and $\mathbf x_i'$ only differ in their $i^{\text{th}}$ components, with one being $x_{i,1}$ and the other being $x_{i,2}$. Then by definition of $\mathcal F_{\infty,d}$ and using the fact that for $g \in \mathcal F_\infty$ and $x_1,x_2 \in [0,1]$, $|g(x_1)-g(x_2)| \le |x_1-x_2|$, it follows that $\left|f(\mathbf x_{i-1}')-f(\mathbf x_i')\right| \le |x_{i,1}-x_{i,2}|$. Summing over $1 \le i \le d$ yields the result. \end{proof} Lemma \ref{tri} makes the class $\mathcal F_{\infty,d}$ particularly nice to work with. Using a nearest neighbor algorithm, we establish the following upper bound. \begin{thm} \label{dpupper} Suppose $p>d$. Then $\operatorname{opt}_p(\mathcal F_{\infty,d}) \le \frac{(2^d-1)d^p}{1-\frac{2^d}{2^p}}$. \end{thm} \begin{proof} Consider the algorithm $A$ which guesses $0$ on the first input and, on trial $i$ (after receiving inputs $\mathbf x_0,\ldots,\mathbf x_{i-1}$), picks the least index $0 \le j<i$ which minimizes the $L_1$ distance between $\mathbf x_j$ and $\mathbf x_i$ and guesses $\hat y_i=f(\mathbf x_j)$. We will show $\mathscr L_p(A,\mathcal F_{\infty,d}) \le \frac{(2^d-1)d^p}{1-\frac{2^d}{2^p}}$. Fix $f \in \mathcal F_{\infty,d}$ and a sequence $\mathbf x_0,\ldots,\mathbf x_m$ of $\mathbf x_i \in [0,1]^d$. Assume all the $\mathbf x_i$ are distinct. Then for each $1 \le i \le m$, there exists a least integer $k_i$ such that, if $[0,1]^d$ is divided into $2^{k_id}$ regions given by \[ \{ (x_1,\ldots,x_d) \in [0,1]^d: n_i \le 2^{k_i}x_i \le n_i+1 \} \] over all $d$-tuples $(n_1,\ldots,n_d)$ of integers $0 \le n_i<2^{k_i}$, then $\mathbf x_i$ is not in the same region as any of $\mathbf x_0,\ldots,\mathbf x_{i-1}$. Note that because $\mathbf x_0$ and $\mathbf x_i$ are both in $[0,1]^d$ for any $1 \le i \le m$, all $k_i$ are at least $1$. For each integer $k \ge 1$, let $c_k$ be the number of integers $1 \le i \le m$ such that $k_i=k$. By the Pigeonhole Principle, for any fixed integer $k \ge 0$, there exist at most $2^{kd}-1$ indices $1 \le i \le m$ such that $k_i \le k$; otherwise, at least $2^{kd}+1$ of the $\mathbf x_i$ (including $\mathbf x_0$) would be the first within their containing length-$2^{-k}$ hypercube region. Thus \begin{equation} \label{cksum2} \sum_{k=1}^{K}c_k \le 2^{Kd}-1 \end{equation} for any integer $K \ge 1$. Moreover, for any $1 \le i \le m$, $\mathbf x_i$ lies in the same length-$2^{-(k_i-1)}$ hypercube as one of $\mathbf x_0,\ldots,\mathbf x_{i-1}$, and this hypercube has $L_1$ distance $\frac{d}{2^{k_i-1}}$ between two of its opposite vertices, so by Lemma \ref{tri}, \begin{equation}\label{yifxiabs}|\hat y_i-f(\mathbf x_i)| \le \frac{d}{2^{{k_i}-1}}.\end{equation} Combining these, \begin{align*} \sum_{i=1}^m |\hat y_i-f(\mathbf x_i)|^p & \le \sum_{k \ge 1} c_k\left(\frac{d}{2^{k-1}}\right)^p = \sum_{K \ge 1} \left[ \left(\sum_{k=1}^K c_k\right) \left(\left(\frac{d}{2^{K-1}}\right)^p-\left(\frac{d}{2^K}\right)^p\right) \right] \\ &\le d^p\sum_{K \ge 1}(2^{Kd}-1)(2^{-p(K-1)}-2^{-pK}) = d^p(2^p-1)\sum_{K \ge 1}2^{-pK}(2^{Kd}-1) \\ &= d^p(2^p-1)\left(\frac{2^{d-p}}{1-2^{d-p}}-\frac{2^{-p}}{1-2^{-p}}\right) = \frac{(2^d-1)d^p}{1-\frac{2^d}{2^p}}. \end{align*} This holds for all $f \in \mathcal F_{\infty,d}$ and sequences of $\mathbf x_i$; hence $\mathscr L_p(A,\mathcal F_{\infty,d}) \le \frac{(2^d-1)d^p}{1-\frac{2^d}{2^p}}$. \end{proof} The next corollary follows from Proposition \ref{dlower} and Theorem \ref{dpupper} since $\operatorname{opt}_p(\mathcal F_{\infty}) = 1$ for all $p \ge 2$. \begin{cor} For any fixed positive integer $d$ and real number $p \ge d+1$, we have $\operatorname{opt}_p(\mathcal F_{\infty,d}) = \Theta(d^p)$, where the constant in the upper bound depends only on $d$. \end{cor} We can also use Theorems \ref{p_inf_d} and \ref{dpupper} to obtain sharp bounds on the worst-case errors for learning $\mathcal{F}_{\infty,d}$ when the number of trials is bounded. \begin{cor} Let $d>0$ be an integer and $p$ be a real number with $0 < p<d$. Then $\operatorname{opt}_p(\mathcal F_{\infty,d}, m)=\Theta(m^{1-\frac{p}{d}})$, where the constants in the bounds depend on $p$ and $d$. \end{cor} \begin{proof} By Theorem \ref{p_inf_d}, we have $\operatorname{opt}_p(\mathcal F_{\infty,d}, m) \ge \frac{1}{2^p} n^{d-p}$ for $n = \lfloor m^{1/d} \rfloor$, so we obtain the lower bound $\operatorname{opt}_p(\mathcal F_{\infty,d}, m) \ge \frac{1}{2^p} m^{\frac{d-p}{d}}(1-o(1))$. For the upper bound, we use the algorithm and notation of Theorem \ref{dpupper} with $K = \left\lceil \frac{ \log_2(m+1)}{d}\right\rceil$ to obtain \begin{align*} \sum_{i=1}^m |\hat y_i-f(\mathbf x_i)|^p & \le \sum_{i=1}^m \left(\frac{d}{2^{k_i-1}}\right)^p \le \sum_{k = 1}^{K} (2^{kd}-2^{(k-1)d})\left(\frac{d}{2^{k-1}}\right)^p \\ &= d^p (2^d - 1) \sum_{k = 1}^{K} 2^{(k-1)(d-p)} = d^p (2^d - 1) \frac{2^{K(d-p)}-1}{2^{d-p}-1} \\ &< \frac{d^p (2^d - 1)2^{d-p}}{2^{d-p}-1}m^{\frac{d-p}{d}}(1+o(1)), \end{align*} where the first inequality follows from Inequality \ref{yifxiabs} and the second inequality follows from Inequality \ref{cksum2} since $\left(\frac{d}{2^{k-1}}\right)^p$ is decreasing in $k$. Thus \[ \operatorname{opt}_p(\mathcal F_{\infty,d}, m) \le \frac{d^p (2^d - 1)2^{d-p}}{2^{d-p}-1}m^{\frac{d-p}{d}}(1+o(1)). \] \end{proof} \section{Discussion and open problems}\label{s:open} With the results in this paper, the value of $\operatorname{opt}_p(\mathcal{F}_q)$ is now bounded up to a constant factor for all $p, q \ge 1$ except when $q \in (1, 2)$ and $p \in (1, 2) \cup (2, 2+\frac{1}{q-1})$. In particular, by combining the results in this paper with the results in \cite{kl}, we now know that $\operatorname{opt}_p(\mathcal{F}_q) = 1$ for all $(p , q)$ that lie in the following regions. \begin{itemize} \item $p, q \ge 2$ \item $q \in (1, 2)$ and $p \ge 2+\frac{1}{q-1}$ \end{itemize} In addition to investigating the regions in which $\operatorname{opt}_p(\mathcal{F}_q)$ is not bounded up to a constant factor, it remains to narrow the constant gap between the upper and lower bounds for $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q) = \Theta(\varepsilon^{-\frac{1}{2}})$ when $\varepsilon \in (0, 1)$ and $q \in [2, \infty) \cup \left\{ \infty \right\}$. Another similar problem is to narrow the constant gap between the upper and lower bounds for $\operatorname{opt}_2(\mathcal{F}_q) = \Theta(\varepsilon^{-1})$ when $q \in (1, 2)$. The results in this paper also help characterize the values of $(p, q)$ for which $\operatorname{opt}_p(\mathcal{F}_q)$ is finite. Before this paper, it was only known that $\operatorname{opt}_2(\mathcal{F}_q)$ is finite for $p > 1$ and $q \ge 2$, and $\operatorname{opt}_p(\mathcal{F}_q) = \infty$ when $p = 1$ or $q = 1$. With our new results, we now know that $\operatorname{opt}_p(\mathcal{F}_q)$ is also finite when $p \ge 2$ and $q > 1$. We make the following conjecture about this problem. \begin{conj} For all $p > 1$ and $q > 1$, $\operatorname{opt}_p(\mathcal{F}_q)$ is finite. \end{conj} Besides the new results about smooth functions of a single variable, we also introduced a generalization of the model to multi-variable functions and found some bounds for this multi-variable online learning scenario. We showed that $\operatorname{opt}_p(\mathcal F_{\infty,d})$ is infinite when $0 < p < d$ and finite when $p > d$, but it remains to determine whether $\operatorname{opt}_d(\mathcal F_{\infty,d})$ is finite for $d > 1$. For finite $q \ge 1$ and $0 < p < d$, we also know that $\operatorname{opt}_p(\mathcal F_{q,d})$ is infinite, but it remains to determine whether $\operatorname{opt}_p(\mathcal F_{q,d})$ is finite for $p \ge d$ and $q \in (1, \infty)$. In addition, we proved for any fixed positive integer $d$ that $\operatorname{opt}_p(\mathcal F_{\infty,d}) = \Theta(d^p)$ for $p \ge d+1$, where the constant in the upper bound depends on $d$. The multiplicative gap between the upper and lower bounds is $2^{d+1} - 2$. We conjecture that the lower bound is sharp for $p$ sufficiently large with respect to $d$ and $q$. \begin{conj} For all $q \in [1, \infty) \cup \left\{\infty\right\}$, for all positive integers $d$, and for all real numbers $p$ sufficiently large with respect to $q$ and $d$, we have $\operatorname{opt}_p(\mathcal F_{q,d}) = d^p$. \end{conj} The papers \cite{kl} and \cite{long} investigated $\operatorname{opt}_1(\mathcal{F}_q, m)$ for $q \ge 2$, where $m$ is the number of trials. It would be natural to study $\operatorname{opt}_p(\mathcal{F}_q, m)$ for $p = 1+\varepsilon$ with $0 < \varepsilon < 1$ and $q \ge 1$, since $\operatorname{opt}_{1+\varepsilon}(\mathcal{F}_q)$ can grow arbitrarily large as $\varepsilon \rightarrow 0$. We bounded $\operatorname{opt}_p(\mathcal F_{\infty,d}, m)$ up to a constant factor for any fixed positive integer $d$ and fixed real number $p$ with $0 < p<d$, but the constants in the bounds depend on $p$ and $d$. It remains to narrow the gap between the upper bound of $\frac{d^p (2^d - 1)2^{d-p}}{2^{d-p}-1}m^{\frac{d-p}{d}}(1+o(1))$ and the lower bound of $\frac{1}{2^p} m^{\frac{d-p}{d}}(1-o(1))$. It would also be interesting to investigate $\operatorname{opt}_p(\mathcal F_{q,d}, m)$ for finite values of $q$. Another possible direction would be to investigate families of smooth functions with additional restrictions. For example, let $\mathcal{E}_{q} \subseteq \mathcal{F}_q$ be the family of exponential functions $f(x) = e^{a x +b}$ with $f \in \mathcal{F}_q$. \begin{prop} For all $p > 0$ and $q \ge 1$, we have $\operatorname{opt}_p(\mathcal{E}_q) = 1$. \end{prop} \begin{proof} The upper bound $\operatorname{opt}_p(\mathcal{E}_q) \le 1$ follows by Lemma \ref{linint1}, since the learner knows the function after two rounds with different inputs and the first round does not count for the total error. For the lower bound, consider an adversary that chooses some $\varepsilon \in (0,1)$, defines $\varrho = 1-\sqrt[1-\varepsilon]{1-\varepsilon}$, and reveals $f(0) = -\frac{1-\varepsilon}{\ln(1-\varepsilon)}$. On the second turn, they either reveal $f(1) = -\frac{1}{\ln(1-\varepsilon)}$ or $f(1) = -\frac{1-\varrho}{\ln(1-\varrho)}$, whichever maximizes the error for the learner's guess. If $f(1) = -\frac{1}{\ln(1-\varepsilon)}$, then $f(x) = e^{a x +b}$ with $a = -\ln(1-\varepsilon)$ and $b = \ln(1-\varepsilon)-\ln(-\ln(1-\varepsilon))$. Note that $f'(x) = a e^{a x + b} \in [1-\varepsilon, 1]$ for all $x \in [0,1]$, so $f \in \mathcal{E}_q$ for all $q \ge 1$. If $f(1) = -\frac{1-\varrho}{\ln(1-\varrho)}$, then $f(x) = e^{a x +b}$ with $a = \ln(1-\varrho)$ and $b = -\ln(-\ln(1-\varrho))$. Note that $f'(x) = a e^{a x + b} \in [-1, -1+\varrho]$ for all $x \in [0,1]$, so $f \in \mathcal{E}_q$ for all $q \ge 1$. Moreover, note that \[\lim_{\varepsilon \rightarrow 0} \left(-\frac{1}{\ln(1-\varepsilon)}+\frac{1-\varrho}{\ln(1-\varrho)}\right) = \lim_{\varepsilon \rightarrow 0} \left( \frac{-1+(1-\varepsilon)\sqrt[1-\varepsilon]{1-\varepsilon}}{\ln(1-\varepsilon)} \right) = 2,\] by L'H\^{o}pital's rule. Thus $\operatorname{opt}_p(\mathcal{E}_q) \ge 1$. \end{proof} Let $\mathcal{P}_{q, m} \subseteq \mathcal{F}_q$ be the family of polynomial functions $f \in \mathcal{F}_q$ of degree at most $m$. It is easy to see that $\operatorname{opt}_p(\mathcal{P}_{q, 1}) = 1$ for all $p > 0$ and $q \ge 1$, but it would be interesting to investigate $\operatorname{opt}_p(\mathcal{P}_{q, m})$ for $m > 1$. Note that we have $\operatorname{opt}_p(\mathcal{P}_{q, m}) \le \operatorname{opt}_p(\mathcal{F}_q, m)$ for all $p > 0$, $q \ge 1$, and $m \ge 1$, since the learner will know $f \in \mathcal{P}_{q, m}$ with certainty after being tested on $m+1$ different inputs. Let $\mathcal{P}_{q} \subseteq \mathcal{F}_q$ be the family of all polynomial functions $f \in \mathcal{F}_q$. We make the following conjecture about this family. \begin{conj} For all $p > 0$ and $q \ge 1$, we have $\operatorname{opt}_p(\mathcal{P}_q) = \operatorname{opt}_p(\mathcal{F}_q)$. \end{conj} Some other possible subsets of $\mathcal{F}_q$ that could be investigated are piecewise functions with at most $k$ pieces where the pieces are polynomials of degree at most $m$, sums of exponential functions, and sums of trigonometric functions. Finally, we return to the problem from the introduction of predicting the next day's temperature range at a given location. In particular, consider the single-variable problem where we predict the next day's temperature range based only on the time of year. An issue with using the model from \cite{kl} for this temperature prediction problem is that the same input for time of year could have different outputs for the temperature range in different years. A more realistic way to model this problem would be to choose the output from a probability distribution which depends on the input. In order for the learner to be able to guarantee a finite bound on the worst-case error, the number of trials would be bounded and restrictions would be placed on the probability distribution. For example, the density function for the probability distribution could be required to have smoothness properties like the functions from \cite{kl}, and the support of the density function could be required to be a subset of $[0,r]$ for some $r > 0$. Investigating such a model would be an interesting direction for future research. Note that this model reduces to the model from \cite{kl} when the support consists of a single point. \section{Acknowledgments} Most of this research was performed in PRIMES 2022. We thank the organizers for this research opportunity. Our paper subsumes \cite{geneson}, which proved Theorem \ref{mainth}. We also thank the anonymous reviewers for helpful comments which improved the clarity and presentation of the results in this paper.
\section{Introduction} Feedforward neural networks(FNNs), as one of the most frequently used neural networks which can be defined mathematically as: $$ G_N(x_i) = \sum_{i = 1}^{N} { \beta_i g(\left \langle \omega_i,x_i \right \rangle + b_i)}, $$ where $x_i = (x_{i1}, x_{i2}, \dots,x_{ip}) \in \mathbb{R}^p$ is the input, $b_i$ is the bias and $g$ is the activation function. $\left \langle \omega_i, x_i \right \rangle = \sum_{j = 1}^{p} \omega_{ij}x_{ij}$ is the euclidean inner product, $\omega_{i}=(\omega_{i1}, \omega_{i2}, \dots,\omega_{ ip}) \in \mathbb{R}^p$ are the weights connecting the input and the $i$-th hidden node, and $\beta_i \in \mathbb{R}$ are the weights connecting the $i$-th hidden and output node. In terms of the traditional learning algorithm of FNNs, all parameters in the network need to be adjusted based on specific tasks. A classical learning method is the backpropagation (BP) algorithm, which is mainly solved by gradient descent: $$ \min\limits_{\omega_i, \beta_i, b_i} \sum_{i=1}^{n}\Vert t_{i} - G_N(x_{i}) \Vert_2^2, $$ where $(x_{i}, t_{i}) (i = 1,2,\dots,n)$ denotes the training samples. However, a randomized learner model, different to the traditional learning of FNNs, called as Extreme learning machine(ELM) and related algorithms were proposed by Huang\cite{HUANG2006489}. In the ELM model, $\omega_i$ and $b_i$ are randomly assigned without training, so only $\beta_i$ needs to be trained. Set $\mathbf{T} = [t_1, t_2, \dots, t_n]$ and \begin{align}\label{eq:1} \mathbf{H} = \begin{bmatrix} g(\langle \omega_1, x_1 \rangle + b_1) & \dots & g(\langle \omega_N, x_1 \rangle + b_N)\\ \vdots & \dots & \vdots \\ g(\langle \omega_1, x_n \rangle + b_1) & \dots & g(\langle \omega_N, x_n \rangle + b_N) \end{bmatrix}, \end{align} once the input weights and biases are specified randomly with uniform distribution in $[-c, c]$, the hidden output matrix remains unchanged during the training phase. Accordingly, the output weights could be written by utilizing the least squares method: \begin{align}\label{eq:2} \min\limits_{\beta \in \mathbb{R}^N} {\left\{ \left \| \mathbf{H} \beta - \mathbf{T} \right \|_2^2\right \} }, \end{align} the solution to model \eqref{eq:2} could be written as $\beta={\mathbf{H}^ \dagger} \mathbf{T}$, where $\mathbf{H}^ \dagger$ is the Moore–Penrose generalized inverse of hidden output matrix $\mathbf{H}$\cite{201708}. The theoretical basis for the general approximation capability of ELM networks has been proposed and established by Igelnik\cite{1995Stochastic} , where the range of randomly allocated input weights and biases are data related and assigned in a constructive mode. Consequently, the scope of parameters in the algorithm implementation should be carefully estimated for diverse datasets. On the other hand, considering the sparsity of the output parameter $\beta$ for many high-dimensional data, Cao et al.\cite{CAO20142457} proposed a $\ell_1$ regular ELM model based on the sparsity of the $\ell_1$ regularization term, which takes the following form: \begin{align}\label{eq:3} \min\limits_{\beta \in \mathbb{R}^N} {\left \{ \dfrac{1}{2} \Vert \mathbf{H} \beta - \mathbf{T} \Vert_2^2 + \lambda \Vert \beta \Vert_1 \right \}, } \end{align} where $\lambda > 0$ is a regularization parameter and $\beta$ is the output coefficient calculated by iteration. This model is called the Lasso model, and has been studied by many scholars in recent years \cite{2011Regression}. For the model $\eqref{eq:2}$, Fan et al. \cite{9235314} added a $\ell_{0.5}$ regularization term to the ELM model, based on the solution generated by $\ell_{0.5}$ is sparser than the $\ell_{1}$ regularization term \cite{Xu6205396}, and the model is defined as follows: \begin{align}\label{eq:4} \min\limits_{\beta \in \mathbb{R}^N} {\left \{ \dfrac{1}{2} \Vert \mathbf{H} \beta - \mathbf{T} \Vert_2^2 + \lambda \Vert \beta \Vert_{0.5} \right \}, } \end{align} where $\lambda > 0$ is a regularization parameter, the model can be solved by the iterative semi-threshold algorithm \cite{Xu6205396}. The other regularization model for model $\eqref{eq:2}$ was about the $\ell_2$ regularization term ($\ell_2$-ELM) \cite{CAO2016546}: \begin{align}\label{eq:5} \min\limits_{\beta \in \mathbb{R}^N} {\left \{ \dfrac{1}{2} \Vert \mathbf{H} \beta - \mathbf{T} \Vert_2^2 + \mu \Vert \beta \Vert_2^2 \right \}, } \end{align} where $\mu$ is a regularization parameter, and when the expression $\mathbf{H}^T\mathbf{H} + \mu \mathbf{I}$ is invertible after choosing the parameter $\mu$, then the solution of the model \eqref{eq:5} can be written as $\beta = (\mathbf{H}^T\mathbf{H} + \mu \mathbf{I})^{-1} \mathbf{I})^{-1} \mathbf{H}^T \mathbf{T}$. Hai et al.\cite{Hailiang0A} proposed a $\ell_2$-$\ell_1$-ELM hybrid model by integrating the sparsity of the $\ell_1$ regularization term and the stability of the $\ell_{2}$ regularization term as follows: \begin{align}\label{eq:6} \min\limits_{\beta \in \mathbb{R}^N} {\left \{ \dfrac{1}{2} \Vert \mathbf{H} \beta - \mathbf{T} \Vert_2^2 + \lambda(\gamma \Vert \beta \Vert_1 + \varepsilon \Vert \beta \Vert_2^2) \right \}}, \end{align} where $ \lambda \ge0$, $ \gamma \ge 0 $ and $ \varepsilon \ge0$ are regularization parameters. Inspired by the $\ell_{2}$-$\ell_{1}$-ELM model, according to Xu et al.\cite{XU20121225}, they found that the sparsity of the solution of the $\ell_p(p \in (0,1))$ regularization term: when $0< p < 0.5$, there is no significant difference in the sparse effect of $\ell_{p}$; when $0.5 < p < 1$, the smaller $p$, the better the sparse effect, so the $\ell_{0.5}$ regularization term can be used as a representative element of $\ell_{p}(p \in(0,1))$; Therefore, we propose the $\ell_{2}$-$\ell_{0.5}$-ELM model by combining the stability of $\ell_{2}$ regularization term and the sparsity of $\ell_{0.5}$ which is sparser than $\ell_{1}$, the new model is described as: \begin{align}\label{eq:7} \min\limits_{\beta \in \mathbb{R}^N} {\left \{ \dfrac{1}{2} \Vert \mathbf{H} \beta - \mathbf{T} \Vert_2^2 + \lambda(\gamma \Vert \beta \Vert_{0.5} + \varepsilon\Vert \beta \Vert_2^2) \right \}}, \end{align} where the parameters have the same meaning as the expression of \eqref{eq:6}. The thought of adding $\ell_{0.5}$ and $\ell_2$ penalties simultaneously in the optimization model could be found in classification \cite{2006Gene,2018Hybrid}. This study mainly establishes an iterative algorithm and studies some properties of randomized learner model as Hai\cite{Hailiang0A}. In particular, we integrate the features of ELM and propose an iterative strategy for solving the hybrid model \eqref{eq:7}. The main contributions of this paper can be summarized as follows: (i) The whole model is a non-convex, non-smooth and non-Lipschitz optimization problem due to the existence of $\ell_{0.5}$ norm. We propose a new algorithm called as an $\ell_2$-$\ell_{0.5}$-ELM algorithm. This algorithm is proved to be effective by analyzing the sum minimization problem of two convex functions with certain characteristics. (ii) The key theoretical properties such as convergence, sparsity are derived to guarantee the feasibility of the proposed method. (iii) Numerous experiments were carried out, including some UCI datasets collected from experts and intelligent systems fields, gene datasets and ORL face image datasets. Experimental results show that the better performance of the proposed $\ell_{2}$- $\ell_{0.5}$-ELM algorithm. The rest of this paper is organized as follows. Section $2$ reviews some basic concepts and theories. Section $3$ demonstrates the iterative method by a fixed point equation and proposes a algorithm for $\ell_2$ - $\ell_{0.5}$-ELM model. In Section $4$, some theoretical results about convergence and sparsity are analyzed. In Section $5$, experimental results on UCI datasets, gene datasets and ORL face image datasets are shown. The conclusion is drawn in Section $6$. \section{Preliminaries} In this section, we present some fundamental concepts and convex optimization theorems primarily. Initially, it is about the half-thresholding function\cite{Xu6205396}. $\mathscr{P}(\lambda, t):\mathbb{R} \rightarrow \mathbb{R}, \lambda > 0$, which can be written as: \begin{align} \label{eq:half1111} \mathscr{P}(\lambda, t) = \begin{cases} \frac{2}{3}t\left(1+ \cos\left(\frac{2(\pi- \phi(t))}{3}\right)\right) & \vert t \vert > \frac{{3}}{4} {\lambda}^{\frac{2}{3}}\\ 0 & \vert t \vert \le \frac{{3}}{4} {\lambda}^{\frac{2}{3}}\\ \end{cases}, \end{align} where $\phi_(t)= \arccos\left(\frac{\lambda}{8}(\frac{|t|}{3})^{-\frac{3}{2}}\right), \pi= 3.14$, and then the corresponding half-thresholding operator ${\rm half}(\lambda, \beta):\mathbb{R}^N \rightarrow \mathbb{R}^N$ acts component-wise as: \begin{align}\label{eq:8} \left[{\rm half}(\lambda, \beta) \right]_i = \mathscr{P}(\lambda, \beta_i). \end{align} Next, we introduce one key characteristic of the half-thresholding operator \cite{Xu6205396,Combettes2005SignalRB}: \begin{align}\label{eq:9} \Vert {\rm half}(\lambda, t) - {\rm half}(\lambda, t') \Vert \le \Vert t - t'\Vert. \end{align} Another crucial notion of convex optimization is the proximity operator \cite{Micchelli}: $$ {\rm prox}_{\varphi} \beta = \arg \min \left \{ \dfrac{}{} \left \|u - \beta \right \|_2^2 + \varphi(u) \right \}, $$ where $\phi$ is a real-valued convex function on $\mathbb{R}^N$. A primary property of the proximity operator is drawn in Proposition \ref{Proposition 1}\cite{Combettes2005SignalRB}, which will be utilized to prove our major result. \begin{prop}\label{Proposition 1} Let $\varphi$ be a real-valued convex function on $\mathbb{R}^N$. Suppose $\psi(\cdot) = \varphi + \frac{\rho}{2} \| \cdot \|_2^2 + \langle \cdot, u \rangle + \sigma$, where $u \in {\mathbb{R}}^{N}$, $\rho \in [0, \infty )$, $\sigma \in \mathbb{R}$, then \begin{align}\label{eq:10} {\rm prox}_{\psi} \beta = {\rm prox}_{\varphi / (1 + \rho)}((\beta - u) / (1 + \rho)). \end{align} \end{prop} \section{Solution: Fixed point iterative algorithm for the model} For the ELM, the output matrix $\mathbf{H}$ is a bounded linear operator from $\mathbb{R}^N$ to $\mathbb{R}^m$ owing to the activation function $g(\cdot)\in (0, 1)$, which is finite. In order to further improve the accuracy and sparsity, we employ the regularization model \eqref{eq:7} to estimate the output weights of the network. We define concisely as: $$ p_{\gamma, \varepsilon} = \gamma \| \beta \|_{0.5} + \varepsilon \| \beta \|_2^2, $$ where $\varepsilon$, $\gamma \ge 0$, $p_{\gamma, \varepsilon}: \mathbb{R}^N \rightarrow [0, \infty)$. Then the model \eqref{eq:7} can be redefined as \begin{align}\label{eq:11} \min_{\beta \in \mathbf{R}^N} \left \{ \dfrac{1}{2} \| \mathbf{H} \beta - \mathbf{T} \|_2^2 + \lambda p_{\gamma, \varepsilon} \right \}. \end{align} Furthermore, we introduce the following Lemma and Theorem which will be utilized to solve our model: \begin{lemma}\label{lemma:1} For all $\lambda > 0 $ and $\beta \in \mathbb{R}^N$,the half-thresholding operator $(8)$ can be described as: $$ {\rm half}(\lambda, \beta) = \arg \min_{u} \left \{ \dfrac{1}{2} \| u - \beta\|_2^2 + \lambda \| u \|_{0.5} \right \}. $$ \end{lemma} \begin{lemma}\label{lemma:2} For all $\lambda > 0, \gamma \ge 0, \varepsilon \ge 0$ and $\beta \in \mathbb{R}^N$, ${\rm half}({\frac{\lambda \gamma}{1 + 2 \varepsilon \lambda}}, \frac{\beta}{1 + 2 \varepsilon \lambda})$ is the proximity operator of $\lambda p_{\gamma,\varepsilon}(\beta)$. \end{lemma} \begin{theo}\label{theo:1} Let $\lambda > 0$, $\gamma \ge 0$, $\varepsilon \ge 0$ and $\delta \in (0, \infty)$. Then $\beta$ is a minimizer of function \eqref{eq:11} if and only if it meets the fixed point equation: \begin{align}\label{eq:13} \beta = {\rm half}\left ({\frac{\delta \lambda \gamma}{1+2\varepsilon \lambda \delta}}, \frac{(\mathbf{I} - \delta \mathbf{H}^T \mathbf{H})\beta - \delta \mathbf{H}^T \mathbf{T}}{1 + 2 \varepsilon \lambda \delta} \right), \end{align} where the unit operator $\mathbf{I}: \mathbb{R}^N \rightarrow \mathbb{R}^N$, the definition of $\mathbf{H}$ is shown in \eqref{eq:1}, and $\mathbf{H}^T$ represents the adjoint of $\mathbf{H}$. \end{theo} Moreover, from the property of the proximity operator, we can drive a precise statement for the Lipschitz constant of a contractive map and the corresponding theorem as follows. \begin{theo}\label{theo:2} Set $\lambda > 0, \gamma \ge 0, \varepsilon \ge 0$ and $\delta \in (0, \infty)$. Suppose that there exist two positive constants $\kappa_0$ and $\kappa$, such that the norm of the output matrix $\mathbf{H}$ shown in \eqref{eq:1} of the hidden layer is finite by them, namely $\kappa_0 \le \| \mathbf{H}^T \mathbf{H}\|_2 \le \kappa $, Thus $\beta$ is a minimizer of \eqref{eq:11} if and only if it is a fixed point of the Lipchitz map $\Gamma: \mathbb{R}^N \rightarrow \mathbb{R}^N$, that is, $\beta = \Gamma \beta$ where \begin{align}\label{eq:13} \Gamma \beta = {\rm half}\left({\frac{\delta \lambda \gamma}{1 + 2\varepsilon \lambda \delta}}, \frac{(\mathbf{I} - \delta \mathbf{H}^T \mathbf{H}) \beta + \delta \mathbf{H}^T \mathbf{T}}{1 + 2 \varepsilon \lambda \delta}\right). \end{align} Selecting $\delta = \frac{2}{\kappa_0 + \kappa}$, the Lipschitz constant is finite by $q = 1 - \dfrac{2 \kappa_0}{\kappa + \kappa_0} \le 1$. In particular, if $\kappa_0 > 0$, we can get $\Gamma$ is a contractive map. \end{theo} Theorem \ref{theo:1} and Theorem \ref{theo:2} illustrate that the problem of $\ell_2$-$\ell_{0.5}$-ELM can be described as a fixed point algorithm. Furthermore, the next theorem will introduce the iterative procedure of the $\ell_2$-$\ell_{0.5}$-ELM. \begin{theo}\label{theo:3} Suppose that $\kappa_0$ and $\kappa$ are positive constants, such that the norm of the output matrix $\mathbf{H}$ shown in $(1)$ of the hidden layer is finite by them, namely, $\kappa_0 \le \| \mathbf{H}^T \mathbf{H}\|_2 \le \kappa $, and the sequence $\left \{ \beta \right \}_{l = 0}^{\infty} \subseteq \mathbf{R}^N$ is described iteratively as \begin{align}\label{eq:14} \beta_{l} = {\rm half} \left({\frac{\delta \lambda \gamma}{1 + 2\varepsilon \lambda \delta}}, \frac{(\mathbf{I} - \delta \mathbf{H}^N \mathbf{H})\beta_{l-1} - \delta \mathbf{H}^T \mathbf{T}}{1 + 2 \varepsilon \lambda \delta } \right), \end{align} where $l = 1, 2, 3, \dots, \lambda > 0, \varepsilon > 0, \gamma \ge 0$ and $\delta = \frac{2}{\kappa + \kappa_0}$. Thus $\{ \beta_{l} \}_{l = 0}^{\infty}$ strongly converges the minimizer of model $(10)$ in spite of the choice of $\beta_0$. \end{theo} \begin{remark} \label{remark:1} It is not difficult to obtain from the proof of Theorem \ref{theo:3}. $$ \Vert \beta_{l} - \beta^{*} \Vert_2 \le \dfrac{\kappa + \kappa_0}{\kappa_0 (\kappa + \kappa_0 + 4 \varepsilon \lambda )} \left ( \dfrac{\kappa - \kappa_0}{\kappa + \kappa_0} \right )^{l} \Vert \mathbf{H}^T \mathbf{T}\Vert_2. $$ Therefore, for each $\xi > 0$, if $$ \dfrac{\kappa + \kappa_0}{\kappa_0 (\kappa + \kappa_0 + 4 \varepsilon \lambda )} \left ( \dfrac{\kappa - \kappa_0}{\kappa + \kappa_0} \right )^{l}\Vert \beta_{1} - \beta_{0}\Vert_2 < \xi. $$ namely, $$ l > \dfrac{ \log \left(\frac{ \Vert \beta_1 - \beta_0\Vert_2 (\kappa + \kappa_0)}{\xi\kappa_0 (\kappa + \kappa_0 + 4 \varepsilon \lambda )} \right)}{\log \left( \frac{\kappa + \kappa_0}{\kappa - \kappa_0} \right)}, $$ thus $$ \Vert \beta_{l} - \beta^{*} \Vert_2 < \xi. $$ \end{remark} As a conclusion, the complete $\ell_2$-$\ell_{0.5}$-ELM algorithm is given in Algorithm $1$ which integrates the result of Theorem \ref{theo:3} and Remark \ref{remark:1}. Next section, we want give some properties of our proposed algorithm. \begin{table}[h] \centering \begin{tabular}{p{19.6pc}} \toprule \textbf{Algorithm 1:} the algorithm for $\ell_2$-$\ell_{0.5}$-ELM model \\ \midrule \textbf{Input:}Given a set of training samples $\mathscr{f} = \left \{ (x_j, t_j): x_j \in \mathbb{R}^{p}, t_j \in \mathbb{R}^m, j = 1, 2, \dots, n \right \}$, activation function $g$, hidden node number $N$, the related regularization parameters $\lambda > 0$, $\gamma \ge 0$, $\varepsilon \ge 0$, the corresponding parameter $\delta$, and an acceptable error $\xi$.\\ \textbf{Step 1:} Randomly assign a proper scope for input weight $\omega_i$ and bias $b_i(i = 1, 2,\dots, N)$ \\ \textbf{Step 2:} Compute the hidden layer output matrix $\mathbf{H}$;\\ \textbf{Step 3:} Set $\beta_0 = \left(0, 0, \dots, 0 \right)$, $\beta_1 = {\rm half}({\dfrac{\delta \lambda \gamma}{1+2 \varepsilon \lambda \delta}}, \dfrac{(\mathbf{I} - \delta \mathbf{H}^T \mathbf{H}) \beta_0 + \delta \mathbf{H}^T \mathbf{T}}{1 + 2 \varepsilon \lambda \delta})$, and $l_{max}$ be a minimal positive integer but larger than $\dfrac{ \log \left(\dfrac{ \Vert \beta_1 - \beta_0\Vert_2 (\kappa + \kappa_0)}{\xi\kappa_0 (\kappa + \kappa_0 + 4 \varepsilon \lambda )} \right)}{\log \left( \frac{\kappa + \kappa_0}{\kappa - \kappa_0} \right)}. $ \\ \textbf{Step 4:} For $l = 1:l_{max}$ \\ \quad\quad\quad\quad if $l \ge l_{max}$, stop;\\ \quad\quad\quad\quad else $l:=l+1$ and update the $\beta$ as follows: $\beta_{l+1} = {\rm half}({\dfrac{\delta \lambda \gamma}{1+2 \varepsilon \lambda \delta}}, \dfrac{(\mathbf{I} - \delta \mathbf{H}^T \mathbf{H}) \beta_l + \delta \mathbf{H}^T \mathbf{T}}{1 + 2 \varepsilon \lambda \delta}). $\\ repeat \textbf{Step 4}, until that the desired output weight is $\hat{\beta} = \beta_{max}$.\\ \textbf{Output:} Return the output weights $\hat{\beta}$;\\ \bottomrule \end{tabular}% \label{tab:addlabel}% \end{table} \section{Some characteristics for \texorpdfstring{$\ell_{2}$-$\ell_{0.5}$-ELM}{PDFstring}} For the new section, we want to discuss and analyze some key characteristics of the estimator regarding $\ell_2$-$\ell_{0.5}$-ELM, such as the convergence and sparsity. \begin{theo} $\beta_{l}$ strongly converges to the minimum value $\beta^{*}$ of the minimization problem $$ \min_{\beta \in \mathbf{R}^N} \left \{ \dfrac{1}{2} \| \mathbf{H}\beta - \mathbf{T}\|_2^2 + \lambda p_{\gamma \varepsilon}(\beta) \right \} $$ as $l \rightarrow \infty$. \end{theo} $\beta_{0.5}$ in the $\ell_2$-$\ell_{0.5}$-ELM is a highly significant part of the sparsity of the solution. Thus, we set the Theorem \ref{theo:5} as follows. \begin{theo}\label{theo:5} Suppose $\lambda > 0, \gamma > 0$, then the support of ${\rm half}({\frac{\lambda \gamma}{1+2 \varepsilon \lambda }}, \frac{\beta}{1 + 2 \varepsilon \lambda})$ is finite for any $\beta \in \mathbb{R}^N$. Particularly, $\beta^{*}$ and $\beta_{l}$ are all finitely supported. \end{theo} If the regularization parameters $\lambda$ and $\gamma$ are fixed as some constant values, then $\beta^{*}$ and $\beta_{l}$ have only a few finite nonzero coefficients, and hence the solution to \eqref{eq:11} is sparse. \section{Performance evaluation} In the new section, a succession of experiments, containing some UCI benchmark datasets\cite{Hailiang0A} and gene data, are carried out to demonstrate the performance of the proposed $\ell_2$-$\ell_{0.5}$-ELM method. All the experiments are performed in the Mac Pycharm environment running on Quad-Core Intel Core i5, CPU (8 GB 2133 MHz LPDDR3) processor with the speed of 1.40GHz. The activation function of networks used in the experiments is taken as sigmoid function $g(x) = 1 / (1 + e ^{-x})$. The $\ell_2$-$\ell_{0.5}$-ELM model is compared with seven other models: BP, SVM, ELM, $\ell_2$-$\ell_{1}$-ELM, $\ell_2$-ELM, $\ell_1$-ELM, $\ell_{0.5}$-ELM. BP includes only one hidden layer and output layer, and all parameters are trained by back-propagation algorithm; $\ell_1$-ELM and $\ell_{0.5}$-ELM are the simplified forms of $\ell_2$-$\ell_{1}$-ELM and $\ell_2$-$\ell_{0.5}$-ELM, respectively. The activation function is defined as: $g(x) = 1/(1 + e^{-x})$. In order to check the algorithm for $\ell_2$-$\ell_{0.5}$-ELM model, three real classification datasets from the UCI machine learning repository are considered. The basic information of each dataset is shown in Table \ref{table_ELM_all}. The average of $30$ experimental validations was used as the final result. For these datasets, the sample size is fixed, but each sample is randomly assigned as training or testing data. \subsection{Performance for UCI datasets} To validate the performance of the proposed $\ell_2$-$\ell_{0.5}$-ELM model, three types of real classification datasets were used for the experiments, including UCI\cite{2013UCI}, gene expression, and ORL face datasets. The UCI machine learning repository (2013UCI) contains three datasets: Austrian Credit Approval(Austrian), Ionosphere, and Balance Scale(Balance). The gene expression datasets contain colon\cite{Alon6745} and DLBCL\cite{2011The}, both of which are binary datasets. Moreover, the ORL face dataset includes $400$ images divided into $40$ categories. Each category contains $10$ images with different facial details and each image size is $112 \times 92$. The detail information of all datasets are summarized in Table \ref{table_ELM_all}. In addition, these data were obtained from different application fields, and it is hoped that the $\ell_2$-$\ell_{0.5}$-ELM model can be analyzed from multiple perspectives by using these data from different backgrounds. \setcounter{table}{0} \begin{table} \centering \caption{Details of the $6$ datasets} \label{table_ELM_all} \begin{tabular}{llccc} \toprule Dataset & Type & Sapmple& Feature& Catagory \\ \midrule Austrian & UCI& 690& 14& 2 \\ Ionosphere& UCI& 151& 34& 2 \\ Balance & UCL& 625& 4& 3 \\ colon& gene& 62& 2000& 2 \\ DLBCL& gene& 77& 7129& 2\\ ORL& image& 400& 10304& 40 \\ \bottomrule \end{tabular} \end{table} \begin{table} \centering \caption{Performance comparison of 8 models on 3 different datasets} \label{table_ELM1_TAA} \fontsize{7}{9}\selectfont \begin{tabular}{cllcl} \toprule Datasets & Methods & Times(s) &Remaining Nodes & Accuracy($\% \pm{\%}$) \\ \midrule Austrain & BP &2.1751 & 600 & 72.58 $\pm$ 13.57 \\ & SVM &\textbf{0.0448} & --- & 79.14 $\pm$ 1.98 \\ & ELM &0.0588 &600 &65.37 $\pm$ {3.08} \\ & $\ell_{0.5}$-ELM &5.8542 &48.5 &82.76 $\pm$ 0.00\\ &$\ell_{1}$-ELM &8.1648 &118.5 &81.38 $\pm$ 0.00\\ & $\ell_{2}$-ELM &8.2735 &600 &80.36 $\pm$ 0.00\\ & $\ell_{2}$-$\ell_{1}$-ELM &10.041 &492.5 &81.38 $\pm$ 0.00\\ & $\ell_{2}$-$\ell_{0.5}$-ELM &7.5875 &118.5 &\textbf{82.76 $\pm$ 0.00}\\ Ionosphere & BP &2.1751 &600 &72.58 $\pm$ 13.57 \\ & SVM &0.0108 &-- &86.51 $\pm$ 2.09 \\ & ELM &\textbf{0.0003} &600 &91.55 $\pm$ 2.78 \\ & $\ell_{0.5}$-ELM &0.0487 &29.5 &96.96 $\pm$ 0.00 \\ &$\ell_{1}$-ELM &5.4755 &115.9 &97.24 $\pm$ 1.06 \\ & $\ell_{2}$-ELM &0.0520 &600 &96.05 $\pm$ 1.57 \\ & $\ell_{2}$-$\ell_{1}$-ELM &4.4093 &437.5 &96.84 $\pm$ 0.98 \\ & $\ell_{2}$-$\ell_{0.5}$-ELM &0.0569 &193 &\textbf{98.01 $\pm$ 0.00} \\ Balance &BP &4.3814 &600 &59.99 $\pm$ 25.26 \\ &SVM &0.0215 &-- &88.63 $\pm$ 1.86 \\ & EL,M &\textbf{0.0008} &600 &50.72 $\pm$ 6.66 \\ & $\ell_{0.5}$-ELM &0.1285 &23.3 &90.55 $\pm$ 0.00 \\ &$\ell_{1}$-ELM &6.5074 &42.9 &90.47 $\pm$ 1.66 \\ & $\ell_{2}$-ELM &0.1579 &600 &90.55 $\pm$ 0.00 \\ & $\ell_{2}$-$\ell_{1}$-ELM &6.8678 &246.4 &90.10 $\pm$ 1.35 \\ & $\ell_{2}$-$\ell_{0.5}$-ELM &0.0974 &52.7 &\textbf{90.91 $\pm$ 0.00} \\ \bottomrule \end{tabular} \end{table} We repeat $30$ trials and take the averages as the final results on account of reducing the random error. And the regularization parameters are used to control the trade-off between the error and the penalty. For Austrian dataset, take the parameters ( $\ell_2$-$\ell_{0.5}$-ELM, $\ell_2$-$\ell_1$-ELM : $\lambda = 0.8, \gamma = 0.1 , \varepsilon=0.9$) and for Ionosphere dataset, take ( $\ell_2$-$\ell_{0.5}$-ELM, $\ell_2$-$\ell_1$-ELM : $\lambda = 0.9, \gamma = 0.05, \varepsilon=0.9$) and Balance Scale dataset, ( $\ell_2$-$\ell_{0.5}$-ELM : $\lambda =0.8 , \gamma = 1, \varepsilon=1$, for $\ell_2$-$\ell_1$-ELM : $\lambda = 0.005, \gamma =0.5, \varepsilon=0.5$), we set the acceptable error $\xi = 0.0001, 0.001, 0.0001$ respectively. The number of hidden nodes in the experiments is $600$. Table \ref{table_ELM1_TAA} shows the running time, the number of nodes retained, and the accuracy of the test for each dataset for the eight models (the standard deviation is kept to $4$ significant digits, $0.00$ in the table indicates a standard deviation of less than $10^{-4}$). These indices are used to measure the sparsity, stability and effectiveness of the proposed method. The corresponding figures on testing are shown as follows. From the results of \ref{fig:1}-\ref{fig:3}, we can see that the accuracy of the ELM model is lower than all the regularized ELM models. The standard deviation of the ELM model is higher than that of other regularized ELM models, which indicates that the stability of the ELM model is lower. The accuracy of the $\ell_2$-$\ell_{0.5}$-ELM model at all nodes can be compared with other regularized ELM models, and the accuracy at most hidden nodes is higher than other comparable regularized ELM models. This indicates that the $\ell_2$-$\ell_{0.5}$-ELM model has consistently good classification prediction. In terms of the standard deviation of different nodes, the $\ell_{2}$-$\ell_{0.5}$-ELM model is lower than the other compared models, indicating that the classification accuracy of this method is more stable. \begin{figure*} \centering \includegraphics[scale=0.4]{Austrain_Accuracy_SDs.pdf} \caption{Performance comparison of $6$ models in the Austrian dataset} \label{fig:1} \end{figure*} \begin{figure*} \centering \includegraphics[scale=0.4]{Ionosphere_Accuracy_SDs.pdf} \caption{Performance comparison of $6$ models in the Ionosphere dataset} \label{fig:2} \end{figure*} \begin{figure*} \centering \includegraphics[scale=0.4]{Balance_Accuracy_SDs.pdf} \caption{Performance comparison of $6$ models in the Balance dataset} \label{fig:3} \vspace*{-8pt}\end{figure*} We can see the performance of $\ell_2$-$\ell_{0.5}$-ELM in detail and draw the following conclusions: (i) In $3$ datasets, the classification accuracy of the regularized ELM methods ($\ell_2$-$\ell_{0.5}$-ELM, $\ell_{0.5}$-ELM, $\ell_2$-$\ell_{1}$-ELM, $\ell_{1}$-ELM, $\ell_{2}$-ELM) are significantly higher than that of the BP, SVM and ELM methods, indicating that the regularized ELM methods have better generalization performance, and the classification accuracy of $\ell_2$-$\ell_{0.5}$-ELM methods is higher than that of other compared regularized ELM methods. (ii) From the perspective of the number of remaining hidden nodes, $\ell_{0.5}$-ELM has the lowest number of hidden nodes. It is shown that the $\ell_{0.5}$ or $\ell_1$-regularization term is beneficial to enhance the sparsity of the hidden nodes of the model. Compared with the $\ell_{2}$-$\ell_{1}$-ELM model, the $\ell_{2}$-$\ell_{0.5}$-ELM model adds the $\ell_{0.5}$ regularization term to the model, which has a sparser solution and thus a better generalization ability. (iii) From the perspective of algorithm running time, the ELM model runs in the shortest time (the ELM model can obtain the analytic solution directly without iterative computation). In comparison, the SVM model runs faster than all ELM methods with regularity. Secondly, for the $5$ regularized ELM models, the models with $\ell_{0.5}$ regularization terms ($\ell_{0.5}$-ELM, $\ell_{2}$-$\ell_{0.5}$-ELM) are faster than the models with $\ell_1$ regularization terms ($\ell_{1}$-ELM, $\ell_{2}$- $\ell_{1}$-ELM). \subsection{Performance for gene datasets} In this section, the performance of the $\ell_{2}$-$\ell_{0.5}$-ELM model is validated using the colon and DLBCL data. The training and testing sets of each dataset were experimented in the ratio of $1:1$. The regularization parameters are set as follows, colon data: ($\ell_2$-$\ell_{0.5}$-ELM and $\ell_2$-$\ell_1$-ELM : $\lambda = 0.09, \gamma = 0.9 , \varepsilon=0.9$), DLBCL data: ($\ell_2$-$\ell_{0.5}$-ELM and $\ell_2$-$\ell_1$-ELM : $\lambda = 0.005, \gamma = 0.5, \varepsilon=0.5$); and $\xi = 0.001$. Each dataset was repeatedly run $30$ times, and the average was taken as the final result. As shown in Table \ref{table_ELM1_colon_DLBC}. \begin{table} \centering \caption{Performance comparison of $8$ models in $2$ gene datasets} \label{table_ELM1_colon_DLBC} \fontsize{7.6}{9.6}\selectfont \begin{tabular}{clllll} \toprule Datasets & Methods & Times(s) &Remaining Nodes & Accuracy($\% \pm{\%}$) \\ \midrule colon &BP &22.2641 &1000.0 &55.52 $\pm$ 9.15 \\ &SVM &0.0358 &-- &77.5 $\pm$ 7.28 \\ & ELM &0.0056 &1000.0 &83.02 $\pm$ 1.92 \\ & $\ell_{0.5}$-ELM &0.0829 &370.5 &75.00 $\pm$ 0.00 \\ &$\ell_{1}$-ELM &0.0488 &974.5 &84.79 $\pm$ 2.22 \\ & $\ell_{2}$-ELM &0.0815 &1000.0 &84.17 $\pm$ 2.20 \\ & $\ell_{2}$-$\ell_{1}$-ELM &0.0401 &1000.0 &83.96 $\pm$ 2.24 \\ & $\ell_{2}$-$\ell_{0.5}$-ELM &0.0879 &877.0 &\textbf{87.50 $\pm$ 0.00} \\ DLBCL &BP &122.3174 &1000.0 &57.24 $\pm$ 12.55 \\ &SVM &0.0968 &-- &87.24 $\pm$ 5.98 \\ & ELM &0.0060 &786.0 &89.90 $\pm$ 5.98 \\ & $\ell_{0.5}$-ELM &5.2214 &242.0 &\textbf{91.43 $\pm$ 0.00} \\ &$\ell_{1}$-ELM &18.2957 &188.5 &89.05 $\pm$ 5.12 \\ & $\ell_{2}$-ELM &5.2324 &764.0 &89.51 $\pm$ 5.48 \\ & $\ell_{2}$-$\ell_{1}$-ELM &15.5286 &431.5 &89.62 $\pm$ 6.10 \\ & $\ell_{2}$-$\ell_{0.5}$-ELM &5.4519 &575.5 &\textbf{91.43 $\pm$ 0.00} \\ \bottomrule \end{tabular} \end{table} \begin{figure*} \centering \includegraphics[scale=0.4]{colon_Accuracy_SDs.pdf} \caption{Performance comparison of $6$ models in colon dataset} \label{fig:4} \end{figure*} It can be demonstrated that the prediction accuracy of the single-layer BP network is very low and does not capture the features of the data very well. It can also be found that the prediction accuracy of the $\ell_2$-$\ell_{0.5}$-ELM model is slightly higher than that of the other methods. The standard deviations of the accuracy of the ELM methods with $\ell_{0.5}$ regularization are much smaller than those of BP, SVM, and ELM, indicating that the ELM model variants with $\ell_{0.5}$ regularization terms can improve the stability of the solutions; The number of hidden nodes in the $\ell_{0.5}$-ELM and $\ell_{1}$-ELM models is smaller, that is, the sparsity of these two regularization terms is the strongest, indicating that the addition of $\ell_{0.5}$ or $\ell_1$ regularization terms in the ELM model enhances the sparsity of the model, while the number of hidden nodes in the $\ell_2$-ELM model is $1000$. The number of nodes in the $\ell_2$-ELM model is $1000$, indicating that the $\ell_2$-regularization term has no sparse effect on the model. The $\ell_2$ norm is used to increase the stability of the model by penalizing oversized regularization parameters. This makes the $\ell_{2}$-$\ell_{0.5}$-ELM sparser and model stable, and thus obtains better generalization ability. From the perspective of algorithm running time, it can be seen that the ELM model has the shortest running time (the ELM model can obtain the analytical solution directly without iterative solving). In contrast, the SVM model runs faster than all ELM methods with regularization. Further, we use the colon data to verify the effect of different number of hidden nodes ($200, 400, 600, 800, 1000, 1200$) on the stability of the ELM correlation model. We perform $30$ experiments for each hidden node and calculate the ELM, $\ell_2$-$\ell_{0.5}$-ELM, $\ell_{0.5}$-ELM, $\ell_2$-$\ell_{1}$-ELM, $\ell_{1}$-ELM, $\ell_{2}$-ELM for the test set accuracy and standard deviation as shown in Figure \ref{fig:4}. The test accuracy of $\ell_2$-$\ell_{0.5}$-ELM at all nodes can be compared with all regularized ELM models, while the accuracy at most hidden nodes is higher than other models. The standard deviation of $\ell_2$-$\ell_{0.5}$-ELM model is lower than other regularized ELM models. \begin{table}[b] \centering \caption{ Performance comparison of $8$ models in ORL face dataset} \label{table_ELM_ORL_all} \begin{tabular}{clllll} \toprule & Methods & Accuracy($\%$) \\ \midrule &BP &31.00 $\pm$ 4.90 \\ &SVM &71.53 $\pm$ 2.12 \\ & ELM &70.58 $\pm$ 2.95 \\ & $\ell_{0.5}$-ELM &71.00 $\pm$ 2.34 \\ &$\ell_{1}$-ELM &70.85 $\pm$ 2.86 \\ & $\ell_{2}$-ELM &71.17 $\pm$ 2.47 \\ & $\ell_{2}$-$\ell_{1}$-ELM &70.58 $\pm$ 2.87 \\ & $\ell_{2}$-$\ell_{0.5}$-ELM &\textbf{71.67 $\pm$ 2.34}\\ \bottomrule \end{tabular} \end{table} \begin{table*} \caption{ Performance comparison of $6$ models in ORL face dataset} \label{table:ORL} \begin{tabular}{ccccccc} \toprule Nodes &ELM &$\ell_{0.5}$-ELM & $\ell_{1}$-ELM & $\ell_{2}$-ELM & $\ell_2$-$\ell_1$-ELM & $\ell_{2}$-$\ell_{0.5}$-ELM\\ \midrule 500 &52.92$\pm$3.04 &66.10$\pm$2.55 &60.00 $\pm$1.77 &62.63$\pm$ 2.38 &59.25 $\pm$2.32 &\textbf{65.83 $\pm $ 2.46}\\ 1500 &76.08$\pm$0.73 &77.00$\pm$0.93 &76.33 $\pm$0.67 &76.75$\pm$ 0.75 &76.33 $\pm$0.76 &\textbf{77.20 $\pm${0.93}}\\ 2000 &78.25$\pm$2.00 &78.73$\pm$2.45 &78.33 $\pm$2.08 &78.63$\pm$ 2.18 &78.33 $\pm$2.08 &\textbf{78.83 $\pm$2.45}\\ 2500 &79.58$\pm$3.49 &79.74$\pm$3.36 &79.67 $\pm$3.44 &79.21$\pm$3.29 &79.63 $\pm$3.44 &\textbf{79.76 $\pm$ 3.26}\\ 3000 &81.50$\pm$1.98 &81.55$\pm$2.69 &81.42 $\pm$2.07 &81.45$\pm$2.39 &81.42 $\pm$2.07 &\textbf{81.58 $\pm$ 2.68}\\ 3500 &81.17$\pm$1.81 &81.13$\pm$2.22 &81.17 $\pm$1.87 &81.17$\pm$1.89 &81.17 $\pm$1.87 &\textbf{81.25 $\pm$ 2.12}\\ 4000 &82.00$\pm$1.81 &82.00$\pm$1.67 &81.92 $\pm$1.74 &81.96$\pm$1.64 &81.92 $\pm$1.74 &\textbf{82.08 $\pm$ 1.65}\\ mean &75.22$\pm$9.12 &77.16$\pm$5.33 &76.21 $\pm$7.00 &76.62$\pm$6.21 &76.08 $\pm$7.24 &\textbf{77.26 $\pm$ 5.32}\\ \bottomrule \end{tabular} \end{table*} \subsection{Performance for ORL face dataset} The ORL face dataset is used for experimental validation. The number of hidden nodes for the experiment is $1000$. The average of $30$ experiments is used as the final result. Since the original image has high dimensionality, we preprocess each image by using the $(2D)^2$PCA\cite{5946776} dimensionality reduction technique. And the training set and test set are in the ratio of $7:3$. The values of the regular parameters set in the experiment are as follows: $\ell_{0.5}$-ELM and $\ell_{1}$-ELM ($\gamma = 0.05, \varepsilon = 0$), $\ell_{2}$-ELM ($\gamma = 0, \varepsilon = 0.5$), $\ell_{2}$ -$\ell_{1}$-ELM, $\ell_{2}$-$\ell_{0.5}$-ELM($\gamma = 0.05, \varepsilon = 0.5$); $\lambda = 0.001$ and $\varepsilon = 0.0001$ are chosen in all experiments. This experiment validates the performance of the model in terms of accuracy and standard deviation. The results are shown in Table \ref{table_ELM_ORL_all}. From the table, it can be seen that the accuracy of the $\ell_{2}$-$\ell_{0.5}$-ELM model (which is slightly higher than the SVM model) is slightly higher than all other models tested. Further, we verify the effect of different values of hidden nodes on the prediction accuracy. The number of hidden nodes chosen in the experiment is $500$, $1000$, $1500$, $2000$, $2500$, $3000$, $3500$, $4000$. The results are shown in Table \ref{table:ORL}, which show that the test accuracy of $\ell_2$-$\ell_{0.5}$-ELM model is higher than the other comparative ELM models. The test accuracy of the ELM model fluctuates the most with the changing of the number of hidden nodes, i.e., the selection of different nodes has the greatest impact on it, indicating that the ELM model is less stable in high-dimensional data. In contrast, the standard deviations of all the regularized ELM methods ($5.33, 7.00, 6.21, 7.24, 5.32$) are lower than those of the ELM methods, indicating that the stability of the ELM model is improved by adding the regularization term. ELM methods, indicating that the stability of the proposed method is better than the other $5$ compared to ELM methods. \section{Conclusion} In order to further improve the stability and generalization of the ELM model, this paper proposes a $\ell_2$-$\ell_{0.5}$-ELM model by combining the $\ell_{0.5}$ and the $\ell_2$ regularization term. The iterative algorithm is applied to solve the model with a fixed points algorithm. The convergence and sparsity of this algorithm are proved. Moreover, the proposed $\ell_{2}$-$\ell_{0.5}$-ELM model is compared with BP, SVM, ELM, $\ell_{0.5}$-ELM, $\ell_{1}$-ELM, $\ell_{2}$-ELM and $\ell_2$-ELM. $\ell_2$-$\ell_{1}$-ELM models. Experimental comparisons on several datasets (UCI dataset, gene dataset, ORL face dataset) show that the $\ell_{2}$-$\ell_{0.5}$-ELM method outperforms the other $7$ models in terms of prediction accuracy and stability on these data. Therefore, the model can be improved as follows: the information of previously computed nodes is not used in the computation of different hidden nodes, and it can be learned from the incremental learning point of view, which can reduce the computation time to a certain extent. \balance \bibliographystyle{ACM-Reference-Format}
\section{Introduction}\label{sec_intro} Positioning in 5G relies to a large extent on the use of mmWave frequencies, with their ample bandwidth and large antenna arrays \cite{b5g_commag_2021,dwivedi2021positioning,Fascista_ICASSP2020}. Large bandwidths offer high delay resolution but provide limited opportunities for optimization, as \acp{BS} must use non-overlapping subcarriers for multi-BS positioning solutions. Large antenna arrays yield high angle resolution, as well as the ability to shape signals in the spatial domain, e.g., for interference control, but also for optimizing positioning performance \cite{signalDesign_TVT_2022}. Harnessing the improved resolution and also exploiting optimized spatial designs enhance the performance of the channel estimation routine, which detects the number of paths, and for each path estimates the geometric parameters (i.e., \ac{ToA}, \ac{AoA}, \ac{AoD}) \cite{TR38.855}. As channel estimation is a joint function among communication, positioning, and sensing, it is important to develop methods that are both accurate and of moderate complexity \cite{Fascista_WCL}, especially for \ac{ISAC} systems towards 6G multi-functional wireless networks \cite{overviewISAC_2021}. In a general pilot-based channel estimation setup, the optimal channel parameters are the maximum \emph{a posteriori} (MAP) estimates given the received signal sequence. However, optimization methods employed in MAP estimation can involve heavy computations. On the other hand, it is notable that mmWave channels are usually sparse, due to a limited number of multipath propagation arriving at the receiver with relatively strong path gains. As a result, sparsity-inspired low-complexity channel estimation methods are developed \cite{tsai2018millimeter, lee2016channel, alkhateeb2014channel, JiaGeZhuWym21, WenKulWitWym19, gridless_ESPRIT_JSTSP_2021}. Among them, the estimation of signal parameters via rotational invariance techniques (ESPRIT)-based channel estimation methods have been widely studied, due to their good trade-off between estimation performance and complexity \cite{JiaGeZhuWym21, WenKulWitWym19, gridless_ESPRIT_JSTSP_2021}. Recently, ESPRIT-based approaches have been applied to the beamspace, which is attractive since analogue and/or digital beamforming structures are employed in most massive MIMO mmWave systems \cite{gridless_ESPRIT_JSTSP_2021, Fan_ESPRIT_2021, WenGarKulWitWym18}. However, to apply beamspace ESPRIT methods, precoders are required to hold the \ac{SIP}. Examples of such precoding matrices include the discrete Fourier transform (DFT) beams \cite{gridless_ESPRIT_JSTSP_2021, beamspace_ESPRIT} and the directional beams \cite{Fan_ESPRIT_2021}. When the \ac{SIP} does not hold for the precoding matrix, an approximation will be applied during the derivation of the beamspace ESPRIT methods, leading to performance degradations \cite{Fan_ESPRIT_2021}. In addition, research on \ac{CRB}-optimized precoder design suggests that the optimal precoding matrix usually does not hold the \ac{SIP} \cite{signalDesign_TVT_2022,precoderNil2018,Fascista_RIS}. In other words, there is an inevitable performance loss when low-complexity ESPRIT methods are employed with \ac{CRB}-optimized precoders. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figures/system_model.png} \caption{mmWave \ac{MISO} downlink scenario where the UE aims to estimate the \acp{AoD} of multiple paths using high-resolution beamspace ESPRIT methods.} \label{fig_scenario} \vspace{-0.2in} \end{figure} In this paper, we investigate the problem of ESPRIT-oriented precoder design for \ac{AoD} estimation in mmWave communications, targeting a near-optimal precoding scheme in terms of accuracy while enjoying the low-complexity and high-resolution ESPRIT methods for channel estimation. Our specific contributions are as follows: \begin{itemize} \item We formulate the problem of ESPRIT-oriented precoder design as a beampattern synthesis problem that considers joint optimization of the precoding matrix and the \ac{SIP}-restoring matrix of ESPRIT. \item We propose an alternating optimization strategy that updates the precoder and the \ac{SIP}-restoring matrix sequentially under the unit-modulus constraint on individual precoder elements, suitable for phase-only beamforming architectures. \item Through simulation results, we provide important insights into the beampatterns of the resulting ESPRIT-oriented precoders and demonstrate the effectiveness of the proposed design approach in ESPRIT-based channel estimation. \end{itemize} \section{System Model and Problem Description} \label{sec_sysmod} \subsection{System Model} We consider a mmWave \ac{MISO} \ac{DL} flat-fading communications scenario with an $N_\rmtx$-antenna \ac{BS} and a single-antenna \ac{UE}, as shown in Fig.~\ref{fig_scenario}. Considering the presence of $L$ paths\footnote{We consider a mmWave tracking scenario \cite{precoderNil2018,mmWave_Tracking_2020_TVT,mmWave_Tracking_2020_TCOM} with known $L$.}, the received signal at the \ac{UE} at transmission instance $m$ and snapshot $n$ is given by \begin{align}\label{eq_ym} y_{m,n} = \sqrt{P} \sum_{\ell=0}^{L-1} \alpha_{\ell,n} \, \mathbf{a}^\mathsf{T}(\theta_{\ell}) \mathbf{f}_m s_{m,n} + z_{m,n} \end{align} for $m = 1, \ldots, M$ and $n = 1, \ldots, N$, where $M$ and $N$ denote, respectively, the number of transmissions and the number of snapshots\footnote{Here, snapshots may correspond to, for instance, different subcarriers of an \ac{OFDM} system. In this case, it is reasonable to assume that the channel gains $\alpha_{\ell,n}$ change across snapshots, but the \acp{AoD} $\theta_{\ell}$ remain constant.}. In \eqref{eq_ym}, $P$ denotes the transmit power, $[\mathbf{a}(\theta)]_k = e^{j 2 \pi \frac{d}{\lambda} k \sin \theta}$, $k = 0 , \ldots , N_\rmtx-1$, is the steering vector for the \ac{BS} TX array, $\lambda = c/ f_c $ is the wavelength with $c$ and $ f_c $ denoting the speed of propagation and carrier frequency, respectively, $d$ is the array element spacing, $\mathbf{f}_m \in \complexset{N_\rmtx}{1}$ denotes the \ac{BS} precoder at time $m$, $\alpha_{\ell,n}$ and $\theta_{\ell}$ are the complex channel gain and \ac{AoD} of the $\thn{\ell}$ path for the $\thn{n}$ snapshot, respectively, $s_{m,n}$ is the pilot symbol, and $z_{m,n} \sim {\mathcal{CN}}(0, \sigma^2)$ is \ac{AWGN} with power $\sigma^2$. For simplicity, we set $s_{m,n} = 1, \, \forall m, n$. Aggregating the observations \eqref{eq_ym} over $M$ transmissions, we have the received signal at the $\thn{n}$ snapshot \begin{align}\label{eq_yy} \mathbf{y}_n = \sqrt{P} \mathbf{F}^\mathsf{T} \mathbf{V} \bm{\alpha} _n + \mathbf{z}_n ~, \end{align} where $\mathbf{y}_n \triangleq [y_{1,n} \, \cdots \, y_{M,n} ]^\mathsf{T} \in \complexset{M}{1}$, $\mathbf{F} \triangleq \left[ \mathbf{f}_1 \, \cdots \, \mathbf{f}_M \right] \in \complexset{N_\rmtx}{M}$ is the precoding matrix satisfying $\tracesmall{\mathbf{F} \mathbf{F}^\mathsf{H}} = M$, $\mathbf{V} \triangleq \left[ \mathbf{a}(\theta_0) \, \cdots \, \mathbf{a}(\theta_{L-1}) \right] \in \complexset{N_\rmtx}{L}$, $ \bm{\alpha} _n \triangleq [\alpha_{0,n} \, \cdots \, \alpha_{L-1,n}]^\mathsf{T} \in \complexset{L}{1}$, and $\mathbf{z}_n \sim {\mathcal{CN}}({ {\boldsymbol{0}} }, \sigma^2 { \boldsymbol{\mathrm{I}} })$ represents the \ac{AWGN} component. \subsection{Problem Description} In the considered mmWave scenario, the \ac{UE} aims to estimate the \acp{AoD} $ \bm{\theta} = [\theta_0 \, \cdots \, \theta_{L-1}]^\mathsf{T}$ using beamspace ESPRIT \cite{RoyKai89,beamspace_ESPRIT} from the beamspace observations $\{\mathbf{y}_n\}_{n=1}^{N}$ in \eqref{eq_yy}. The problem of interest is to design the \ac{BS} precoding matrix $\mathbf{F}$ to maximize the accuracy of estimation of $ \bm{\theta} $ at the UE while at the same time trying to preserve as much as possible the \ac{SIP} required by ESPRIT-based estimation \cite{beamspace_ESPRIT}. \section{ESPRIT-Oriented Precoder Design} \label{sec_esprit} In this section, we provide a review of beamspace ESPRIT and revisit the \ac{SIP}, which enforces a certain structure on the precoder. Based on this structure and using an ESPRIT-unaware baseline precoder $\FF^{\rm{base}}$ (which will be introduced later in Sec.~\ref{sec_baseline}), we formulate a novel precoder design problem that jointly optimizes beampattern synthesis accuracy (with respect to $\FF^{\rm{base}}$) and ESPRIT SIP error (i.e., the level of degradation of \ac{SIP}), leading to near-optimal performance for ESPRIT-based estimators. \subsection{Review of Beamspace ESPRIT}\label{sec_beamspace_esprit} From \eqref{eq_yy}, we compute the covariance matrix \begin{align} \label{eq_rcov} \mathbf{R} = \frac{1}{N} \sum_{n=1}^N \mathbf{y}_n \mathbf{y}_n^\mathsf{H} = P \mathbf{F}^\mathsf{T} \mathbf{V} \Big(\frac{1}{N} \sum_{n=1}^N \bm{\alpha} _n \bm{\alpha} _n^\mathsf{H} \Big) \mathbf{V}^\mathsf{H} \mathbf{F}^* + \sigma^2 { \boldsymbol{\mathrm{I}} }~, \end{align} where $\mathbf{V}$ is a Vandermonde matrix which holds the \ac{SIP}, satisfying $\mathbf{J}_1 \mathbf{V} = \mathbf{J}_2 \mathbf{V} \boldsymbol{\Phi}^\mathsf{H}$ where $\mathbf{J}_1 = \left[ { \boldsymbol{\mathrm{I}} }_{N_\rmtx-1} ,~ { {\boldsymbol{0}} }_{(N_\rmtx-1)\times 1} \right] \in \realset{(N_\rmtx-1)}{N_\rmtx}$ and $\mathbf{J}_2 = \left[ { {\boldsymbol{0}} }_{(N_\rmtx-1)\times 1} , ~ { \boldsymbol{\mathrm{I}} }_{N_\rmtx-1} \right] \in \realset{(N_\rmtx-1)}{N_\rmtx}$ are selection matrices, and $\boldsymbol{\Phi} = \mathrm{Diag}([[\mathbf{a}(\theta_0)]_1, [\mathbf{a}(\theta_1)]_1, \cdots, [\mathbf{a}(\theta_{L-1})]_1]^\mathsf{T})$. In \eqref{eq_rcov}, we assume that $\frac{1}{N} \sum_{n=1}^N \bm{\alpha} _n \bm{\alpha} _n^\mathsf{H}$ is a diagonal matrix (i.e., paths are decorrelated), meaning that the dimension of the signal subspace is $L$. In the precoded case, it has been shown in \cite{beamspace_ESPRIT, Fan_ESPRIT_2021} that if the matrix $\mathbf{F}$ holds the \ac{SIP}, i.e., \begin{align}\label{eq_sip} \mathbf{J}_1 \mathbf{F} = \mathbf{J}_2 \mathbf{F} \mathbf{\Lambda} \end{align} for some non-singular $\mathbf{\Lambda} \in \complexset{M}{M}$, we can restore the \ac{SIP} from $\mathbf{C} = \mathbf{F}^\mathsf{T} \mathbf{V}$, by finding a non-null matrix $\mathbf{Q}$ such that \begin{align}\label{eq_Bsip} \mathbf{Q} \mathbf{C} \boldsymbol{\Phi} = \mathbf{Q} \mathbf{\Lambda}^\mathsf{T} \mathbf{C}~, \end{align} where $\mathbf{Q} \in \mathbb{C}^{M\times M}$ satisfies \begin{align}\label{eq_Q} \mathbf{Q} [\mathbf{F}^{T}{\mathbf{e}} _M ~~ \mathbf{\Lambda}^\mathsf{T} \mathbf{F}^\mathsf{T}{\mathbf{e}} _1 ]= \boldsymbol{0}, \end{align} and ${\mathbf{e}} _m \in \realset{N_\rmtx}{1}$ is the $m$-th column of the identity matrix ${ \boldsymbol{\mathrm{I}} }_{N_\rmtx}$. From \eqref{eq_Q}, $\mathbf{Q}$ can be obtained as $\mathbf{Q} = { \boldsymbol{\mathrm{I}} }_M - \sum_{i=0}^{1} \mathbf{q}_i \mathbf{q}_i^{\mathsf{H}} $, where $\mathbf{q}_0, \mathbf{q}_1 \in \complexset{M}{1}$ are orthonormal column vectors spanning the subspace corresponding to $[\mathbf{F}^{T}{\mathbf{e}} _M ~~ \mathbf{\Lambda}^\mathsf{T} \mathbf{F}^\mathsf{T}{\mathbf{e}} _1 ] \in \complexset{M}{2}$ \cite{Fan_ESPRIT_2021}. Since perfect SIP cannot always be guaranteed\footnote{Perfect SIP holds for DFT beams and directional/sum beams (i.e., steering vectors).} in \eqref{eq_sip}, one can resort to the least-squares (LS) solution to find an approximate $\mathbf{\Lambda}$ \cite{Fan_ESPRIT_2021}: \begin{align}\label{eq_ls_sip_prob} \widehat{\Lambdab}_{\rm{LS}} &= \mathrm{arg} \mathop{\mathrm{min}}\limits_{\mathbf{\Lambda}} ~ \norm{ \mathbf{J}_1 \mathbf{F} - \mathbf{J}_2 \mathbf{F} \mathbf{\Lambda} }_F^2 \\ \label{eq_ls_sip} &= \left( \mathbf{F}^H \mathbf{J}_2^H \mathbf{J}_2 \mathbf{F} \right)^{-1} \mathbf{F}^H \mathbf{J}_2^H \mathbf{J}_1 \mathbf{F} ~, \end{align} where $\norm{\cdot}_F$ denotes the Frobenius norm. Given an estimate of the covariance matrix $\mathbf{R}$, the signal subspace matrix $\mathbf{U}_\mathrm{s} \in \mathbb{C}^{M\times L}$ can be obtained through the SVD (or truncated SVD) operation. Since both $\mathbf{C}$ and $\mathbf{U}_\mathrm{s}$ span the same signal subspace, we have $\mathbf{C} = \mathbf{U}_\mathrm{s} \mathbf{T}$, where $\mathbf{T}\in \mathbb{C}^{L\times L}$ is a non-singular matrix. Using the \ac{SIP} of $\mathbf{C}$ in \eqref{eq_Bsip}, we further obtain $\mathbf{Q} \mathbf{U}_{\mathrm{s}} \boldsymbol{\Pi} = \mathbf{Q}\mathbf{\Lambda}^\mathsf{T}\mathbf{U}_{\mathrm{s}}$ where $\boldsymbol{\Pi} = \mathbf{T} \boldsymbol{\Phi} \mathbf{T}^{-1}$. The diagonal elements in $\boldsymbol{\Phi}$ will be used to estimate the AoD of each path. The beamspace ESPRIT approach can be summarized as follows: \begin{itemize} \item Find $\boldsymbol{\Lambda}$ and $\mathbf{Q}$ for given $\mathbf{F}$. \item Obtain an estimate of $\mathbf{R}$ as $\widetilde{\mathbf{R}}$ using multiple snapshots. \item Perform SVD (or truncated SVD) on $\widetilde{\mathbf{R}}$ to obtain $\mathbf{U}_{\mathrm{s}}$. \item Obtain the least-square (LS) solution of $\boldsymbol{\Pi}$ as $\widetilde{\boldsymbol{\Pi}} = (\mathbf{Q}\mathbf{U}_{\mathrm{s}})^{\dagger} \mathbf{Q}\mathbf{\Lambda}^\mathsf{T}\mathbf{U}_{\mathrm{s}}$, where $(\cdot)^{\dagger}$ denotes Moore-Penrose pseudo-inverse. \item Perform eigenvalue decomposition on $\widetilde{\boldsymbol{\Pi}}$ to obtain an estimate of $\boldsymbol{\Phi}$, and retrieve the corresponding AoDs. \end{itemize} \subsection{ESPRIT-Oriented Precoder Design with SIP Considerations} We formulate the problem of ESPRIT-oriented precoder design as a beampattern synthesis via joint optimization of $\mathbf{F}$ and $\mathbf{\Lambda}$, starting from a desired beampattern created by an ESPRIT-unconstrained precoder $\FF^{\rm{base}}$ as baseline. The goal is to minimize the weighted average of the beampattern synthesis error and the ESPRIT \ac{SIP} error, quantified by the error of the LS solution in \eqref{eq_ls_sip_prob}: \begin{subequations} \label{eq_problem_sip_gen} \begin{align} \label{eq_problem_sip} \mathop{\mathrm{min}}\limits_{\mathbf{F}, \mathbf{\Lambda}} &~~ \underbrace{ \norm{ \mathbf{B} - \mathbf{A}^\mathsf{T} \mathbf{F} }_F^2}_{\substack{{\rm{beampattern~synthesis}} \\ {\rm{accuracy}} }} + ~ \eta \underbrace{ \norm{ \mathbf{J}_1 \mathbf{F} - \mathbf{J}_2 \mathbf{F} \mathbf{\Lambda} }_F^2 }_{\substack{{\rm{SIP\,approximation}} \\ {\rm{error}} }} \\ \label{eq_problem_sip_cons_analog} ~~ \mathrm{s.t.} &~~ \abs{ [\mathbf{F}]_{n,m}} = 1 , \, \forall n,m ~, \end{align} \end{subequations} where $\mathbf{B} = \mathbf{A}^\mathsf{T} \FF^{\rm{base}} \in \complexset{N_{\rm{grid}}}{M}$ represents the desired beampattern corresponding to $\FF^{\rm{base}}$ at $N_{\rm{grid}}$ angular grid points $\{ \theta_i \}_{i=1}^{N_{\rm{grid}}}$, $\mathbf{A} = \left[ \mathbf{a}(\theta_1) \, \cdots \, \mathbf{a}(\theta_{N_{\rm{grid}}}) \right] \in \complexset{N_\rmtx}{N_{\rm{grid}}}$ is the transmit steering matrix evaluated at the specified grid locations, and $\eta$ is a predefined weight on the SIP error, chosen to provide a suitable trade-off between beampattern synthesis accuracy and SIP approximation error. In addition, the constraint \eqref{eq_problem_sip_cons_analog} is imposed to ensure compatibility with phase-only beamforming architectures \cite{analogBeamformerDesign_TSP_2017} (e.g., analog passive arrays \cite{phasedArray_2016}). In the case of phase-amplitude beamforming (e.g., via active phased arrays \cite{phasedArray_2016}), the problem becomes the special case of \eqref{eq_problem_sip_gen} without the constraint \eqref{eq_problem_sip_cons_analog}. \subsection{Alternating Optimization to Solve \eqref{eq_problem_sip_gen}} The problem \eqref{eq_problem_sip_gen} is non-convex due to \textit{(i)} the non-convexity of \eqref{eq_problem_sip} in the joint variable $\mathbf{F}$ and $\mathbf{\Lambda}$, and \textit{(ii)} the unit-modulus constraint in \eqref{eq_problem_sip_cons_analog}. To tackle \eqref{eq_problem_sip_gen}, we resort to an alternating optimization method that updates $\mathbf{F}$ and $\mathbf{\Lambda}$ in an iterative fashion. \subsubsection{Optimize $\mathbf{F}$ for fixed $\mathbf{\Lambda}$} Using the vectorization property of the Kronecker product, the objective function \eqref{eq_problem_sip} can be rewritten as \begin{align} & g(\mathbf{f}) \\ \nonumber &= \norm{ \mathbf{b} - \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{A}^T \right) \mathbf{f} }_2^2 + \eta \norm{ \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{J}_1 - \mathbf{\Lambda}^T \otimes \mathbf{J}_2 \right) \mathbf{f} }_2^2 ~, \end{align} where $\mathbf{f} \triangleq \vecc{\mathbf{F}}$ and $\mathbf{b} \triangleq \vecc{\mathbf{B}}$. Defining \begin{align} \mathbf{Q} &\triangleq \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{A}^T \right)^H \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{A}^T \right) \\ \nonumber &~~+ \eta \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{J}_1 - \mathbf{\Lambda}^T \otimes \mathbf{J}_2 \right)^H \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{J}_1 - \mathbf{\Lambda}^T \otimes \mathbf{J}_2 \right) ~, \\ \nonumber \mathbf{p} &\triangleq \left({ \boldsymbol{\mathrm{I}} }_M \otimes \mathbf{A}^T \right)^H \mathbf{b} ~, \end{align} the problem \eqref{eq_problem_sip_gen} for fixed $\mathbf{\Lambda}$ can be expressed as \begin{align} \label{eq_problem_sip_quadratic} \mathop{\mathrm{min}}\limits_{\mathbf{f}} &~~ \mathbf{f}^H \mathbf{Q} \mathbf{f} - 2 \realp{ \mathbf{p}^H \mathbf{f} } \\ \nonumber ~~ \mathrm{s.t.} &~~ \abs{f_{n}} = 1 , \, \forall n ~. \end{align} The problem \eqref{eq_problem_sip_quadratic} can be solved using gradient projections iterations in \cite[Alg.~1]{analogBeamformerDesign_TSP_2017}. \subsubsection{Optimize $\mathbf{\Lambda}$ for fixed $\mathbf{F}$} The subproblem of \eqref{eq_problem_sip_gen} for fixed $\mathbf{F}$ is exactly the LS problem defined in \eqref{eq_ls_sip_prob}, whose solution is provided in \eqref{eq_ls_sip}. The overall algorithm to solve \eqref{eq_problem_sip_gen} via alternating optimization of $\mathbf{F}$ and $\mathbf{\Lambda}$ is summarized in Algorithm~\ref{alg_overall}. \begin{algorithm}[t] \caption{ESPRIT-Oriented Precoder Design via Joint Optimization of $\mathbf{F}$ and $\mathbf{\Lambda}$ in \eqref{eq_problem_sip_gen}} \label{alg_overall} \begin{algorithmic}[1] \State \textbf{Input:} Baseline precoder $\FF^{\rm{base}}$, transmit steering matrix $\mathbf{A}$, selection matrices $\mathbf{J}_1$ and $\mathbf{J}_2$, SIP error weight $\eta$, convergence threshold $\epsilon$. \State \textbf{Output:} ESPRIT-oriented precoder $\mathbf{F}$, SIP-restoring matrix $\mathbf{\Lambda}$. \State \textbf{Initialization:} \State Initialize the precoder as $\mathbf{F} = \FF^{\rm{base}}$. \State Initialize the SIP-restoring matrix as $\mathbf{\Lambda} = \widehat{\Lambdab}_{\rm{LS}}$ via \eqref{eq_ls_sip}. \State \textbf{Alternating Optimization Iterations:} \State \textbf{repeat} \Indent \State Update $\mathbf{F}$ in \eqref{eq_problem_sip_quadratic} via \cite[Alg.~1]{analogBeamformerDesign_TSP_2017}. \State Update $\mathbf{\Lambda}$ via \eqref{eq_ls_sip}. \EndIndent \State \textbf{until} the objective \eqref{eq_problem_sip} converges. \end{algorithmic} \normalsize \end{algorithm} \section{Simulation Results}\label{sec_sim} To evaluate the performance of the proposed ESPRIT-oriented precoder design approach in Algorithm~\ref{alg_overall}, we perform numerical simulations using a mmWave setup with $ f_c = 28 \, \rm{GHz}$, $N_\rmtx = 64$ and $d = \lambda /2$. The \ac{SNR} of the $\thn{\ell}$ path is defined as $\snr_{\ell} = P \abs{ \alpha_{\ell} }^2/\sigma^2$. In the following parts, we first present our approach for creating baseline precoders and provide illustrative examples on beampatterns associated to ESPRIT-oriented precoders to gain insights into how ESPRIT SIP considerations change the shape of the beampatterns. Then, we evaluate the \ac{AoD} estimation performance of the designed precoders. \subsection{Baseline Construction via Codebook-Based Approach}\label{sec_baseline} Following the idea in \cite{signalDesign_TVT_2022}, we propose to construct the baseline precoder $\FF^{\rm{base}}$ via a codebook-based approach. Suppose that the \ac{BS} has a coarse \textit{a-priori} information on the \acp{AoD} $ \bm{\theta} $ in the form of uncertainty intervals, e.g., obtained via tracking routines \cite{mmwave_training_2016,Mendrzik_JSTSP_2019,signalDesign_TVT_2022}. Let ${\mathcal{U}}_{\ell} = [\theta_{{\rm{min}},\ell} , \, \theta_{{\rm{max}},\ell}]$ denote the uncertainty interval for the \ac{AoD} of the $\thn{\ell}$ path and $\{ \theta_{\ell,i} \}_{i=1}^{ N_{\ell} }$ the uniformly spaced \acp{AoD} covering $ {\mathcal{U}}_{\ell} $, where the grid size $ N_{\ell} $ is dictated by the $3 \, \rm{dB}$ beamwidth angular spacing \cite{zhang2018multibeam}. Accordingly, we define the codebook \cite{signalDesign_TVT_2022} \begin{align} \label{eq_ffdig} \FF^{\rm{base}} \triangleq \left[ \FF^{\rm{sum}} ~ \gamma \FF^{\rm{diff}} \right] ~, \end{align} where \begin{align}\label{eq_codebook_def} \FF^{\rm{sum}} &\triangleq \left[ \FF^{\rm{sum}}_0 \, \cdots \, \FF^{\rm{sum}}_{L-1} \right] ~, \\ \FF^{\rm{diff}} &\triangleq \left[ \FF^{\rm{diff}}_0 \, \cdots \, \FF^{\rm{diff}}_{L-1} \right] ~, \\ \FF^{\rm{sum}}_{\ell} &\triangleq \left[ \mathbf{a}^{ * }(\theta_{\ell,1}) \, \cdots \, \mathbf{a}^{ * }(\theta_{\ell, N_{\ell} }) \right] ~, \\ \FF^{\rm{diff}}_{\ell} &\triangleq \left[ \dt{\mathbf{a}} ^{ * }(\theta_{\ell,1}) \, \cdots \, \dt{\mathbf{a}} ^{ * }(\theta_{\ell, N_{\ell} }) \right] ~, \end{align} for $\ell = 0, \ldots, L-1$, with $\dt{\mathbf{a}} (\theta) \triangleq {\partial \mathbf{a}(\theta)}/{\partial \theta}$. Here, $\FF^{\rm{sum}}$ and $\FF^{\rm{diff}}$ correspond to \textit{sum} (directional) and \textit{difference} (derivative) beams commonly employed in monopulse radar processing for accurate \ac{AoD} estimation \cite{monopulse_review}. Similar to radar, a combined use of these beams is shown to be optimal for positioning, as well \cite{signalDesign_TVT_2022}. In \eqref{eq_ffdig}, $\gamma$ represents the predefined weighting factor of the difference beams with respect to the sum beams, which is set to $\gamma = 0.01$ in simulations, and $\FF^{\rm{sum}}$ and $\FF^{\rm{diff}}$ are normalized to have the same Frobenius norm before applying $\gamma$. To provide visualization and physical intuition, Fig.~\ref{fig_sum_diff_beam} shows the beampatterns of the sum and difference beams. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figures/sum_diff_beam-eps-converted-to.pdf} \vspace{-0.05in} \caption{Illustration of the beampatterns corresponding to the sum and difference beams in \eqref{eq_ffdig}, steered towards the \ac{AoD} $\theta = 0 \degree$. The sum beam provides the obvious benefit of maximizing the SNR towards the desired angle, while the difference beam improves \ac{AoD} accuracy in the small neighborhood around the targeted angle via its sharp curvature, which enables small angular deviations to induce large amplitude changes.} \label{fig_sum_diff_beam} \vspace{-0.1in} \end{figure} \subsection{Illustrative Examples for ESPRIT-Oriented Precoders}\label{sec_illust_ex} Fig.~\ref{fig_beampattern_eta} shows the beampatterns of the ESPRIT-oriented precoders for three different $\eta$ values in Algorithm~\ref{alg_overall} by using the difference beam as the baseline. In Fig.~\ref{fig_sip_vs_eta}, the corresponding SIP errors in \eqref{eq_problem_sip} are plotted with respect to $\eta$. For small $\eta$, the ESPRIT-oriented precoder has a beampattern very close to that of the difference beam since Algorithm~\ref{alg_overall} places more emphasis on beampattern synthesis accuracy than on SIP approximation error, as seen from \eqref{eq_problem_sip}. As $\eta$ increases, SIP gains more emphasis, meaning that the resulting beam approaches the sum beam, for which the SIP is perfectly satisfied, as discussed in Sec.~\ref{sec_beamspace_esprit}. This leads us to the following important observation. \textbf{Observation 1:} \textit{Phase-only ESPRIT-oriented precoder converges from \textbf{difference beam} towards \textbf{sum beam} as $\eta$ increases.} \begin{figure} \begin{center} \vspace{-0.22in} \subfigure[]{ \label{fig_eta_1e0} \includegraphics[width=0.43\textwidth]{Figures/illust_eta_1e0-eps-converted-to.pdf} } \subfigure[]{ \label{fig_eta_1e4} \includegraphics[width=0.43\textwidth]{Figures/illust_eta_1e4-eps-converted-to.pdf} } \subfigure[]{ \label{fig_eta_1e6} \includegraphics[width=0.43\textwidth]{Figures/illust_eta_1e6-eps-converted-to.pdf} } \end{center} \vspace{-0.2in} \caption{The beampatterns of the ESPRIT-oriented precoders obtained via Algorithm~\ref{alg_overall} for varying $\eta$ values, where the baseline precoder $\FF^{\rm{base}}$ is set to the difference beam with $\theta = -10 \degree$.} \label{fig_beampattern_eta} \vspace{-0.15in} \end{figure} To provide further insights, we show in Fig.~\ref{fig_phase_vs_eta} the phase differences across the antenna elements of the ESPRIT-oriented precoder for various $\eta$ values. For small $\eta$, the ESPRIT-oriented precoder is close to the difference beam, which has a phase jump at the center of the array. The phase difference profile becomes more smooth as $\eta$ increases due to the SIP requirement, which causes the resulting beam to converge to the sum beam (which has uniform phase increments). Thus, the second important observation regarding ESPRIT-oriented precoders is stated as follows. \textbf{Observation 2:} \textit{ESPRIT SIP requirement enforces \textbf{uniform phase increments} across antenna elements.} \begin{figure} \centering \vspace{-0.2in} \includegraphics[width=0.9\linewidth]{Figures/SIP_error_vs_eta-eps-converted-to.pdf} \vspace{-0.05in} \caption{SIP error in \eqref{eq_problem_sip} with respect to the penalty parameter $\eta$, where $\FF^{\rm{base}}$ is the difference beam with $\theta = -10 \degree$.} \label{fig_sip_vs_eta} \vspace{-0.1in} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figures/phase_changes_vs_eta-eps-converted-to.pdf} \caption{Phase changes of the ESPRIT-oriented precoder obtained via Algorithm~\ref{alg_overall} across the antenna elements for varying $\eta$ values, where the baseline precoder is taken as the difference beam with $\theta = -10 \degree$.} \label{fig_phase_vs_eta} \vspace{-0.15in} \end{figure} \subsection{Evaluation of \ac{AoD} Estimation Performance} To evaluate the \ac{AoD} estimation performance of the ESPRIT-oriented precoders designed via Algorithm~\ref{alg_overall}, we investigate the accuracy quantified through the \ac{RMSE} of $ \bm{\theta} $, i.e., \begin{align}\label{eq_rmse} {\rm{RMSE}} _{ \bm{\theta} } = \big( \E \big\{ \norms{ \widehat{\thetab} - \bm{\theta} }^2 \big\} \big)^{1/2} ~, \end{align} where $ \widehat{\thetab} = [ \widehat{\theta} _0 \, \cdots \, \widehat{\theta} _{L-1}]^\mathsf{T}$ represents the estimate of $ \bm{\theta} $ from $\mathbf{y}$ in \eqref{eq_yy}. To obtain $ \widehat{\thetab} $, we apply 1-D beamspace ESPRIT \cite{beamspace_ESPRIT} described in Sec.~\ref{sec_beamspace_esprit} on the observations $\mathbf{y}$ in \eqref{eq_yy}. We run $100$ Monte Carlo trials with $50$ snapshots each to construct the covariance matrix for ESPRIT at each trial. The channel gains $ \alpha_{\ell} $ are generated randomly across the snapshots by multiplying a fixed gain (determined based on $\snr_{\ell}$) with a random zero-mean complex Gaussian coefficient with standard deviation $10$. In addition, based on the results in Sec.~\ref{sec_illust_ex}, we set $\eta = 10^5$ in Algorithm~\ref{alg_overall}. For performance benchmarking, we consider the following precoders: \begin{itemize} \item \textit{Sum:} The precoder $\FF^{\rm{sum}}$ in \eqref{eq_codebook_def}, which by definition contains only unit-amplitude elements (i.e., steering vectors), leading to phase-only beamforming without further optimization. \item \textit{Sum-Diff:} The precoder $\FF^{\rm{base}}$ in \eqref{eq_ffdig}, optimized to have unit-amplitude elements by using \cite[Alg.~1]{analogBeamformerDesign_TSP_2017}, which corresponds to a single $\mathbf{F}$ update step in Algorithm~\ref{alg_overall}. \item \textit{Sum-Diff, ESPRIT-Or.:} The precoder obtained via the proposed ESPRIT-oriented precoder design algorithm in Algorithm~\ref{alg_overall}. \end{itemize} All the precoders are normalized to have the same Frobenius norm $\norm{\mathbf{F}}_F$ so that the total transmit power in \eqref{eq_yy} remains the same among the different strategies for fair comparison. We first consider a single-path scenario with $\theta_0 = 20 \degree$ and ${\mathcal{U}}_0 = [17 \degree , \, 23 \degree]$. Fig.~\ref{fig_rmse_snr_theta_20_delta_3_single_path} shows the RMSEs obtained by the considered precoding strategies as a function of the SNR, also in comparison with the \ac{CRB}\footnote{Since the \acp{CRB} belonging to the different precoders are very close to each other, we only show the \ac{CRB} corresponding to $\FF^{\rm{sum}}$ for the sake of figure readability.}. It can be observed that the ESPRIT-oriented precoder provides noticeable improvement over the ESPRIT-unaware conventional sum-diff precoder at low \acp{SNR}, indicating the effectiveness of the proposed design strategy in Algorithm~\ref{alg_overall}. However, the conventional sum precoder outperforms the ESPRIT-oriented design at low \acp{SNR}, while the RMSEs of all the precoders converge to the CRB as the \ac{SNR} increases. This suggests that although Algorithm~\ref{alg_overall} succeeds in improving the performance, the sum precoder appears to be the best choice in this specific scenario. Next, we consider a different setting with $\theta_0 = 70 \degree$ and ${\mathcal{U}}_0 = [67 \degree , \, 73 \degree]$, whose results are reported in Fig.~\ref{fig_rmse_snr_theta_70_delta_3_single_path}. We observe that the proposed ESPRIT-oriented design significantly outperforms both the traditional sum precoder and sum-diff precoder in the medium and high SNR regimes, closing the gap to the \ac{CRB}. Comparing Fig.~\ref{fig_rmse_snr_theta_20_delta_3_single_path} and Fig.~\ref{fig_rmse_snr_theta_70_delta_3_single_path}, it is seen that performance gains provided by Algorithm~\ref{alg_overall} depend on the \ac{AoD} of the path. To further investigate this point, we plot in Fig.~\ref{fig_rmse_theta} the RMSE with respect to the path \ac{AoD} for a fixed SNR of $20 \, \rm{dB}$ with varying degrees of angular uncertainty. A common observation is that for all \acp{AoD}, the ESPRIT-oriented sum-diff precoder outperforms the standard sum-diff precoder, which does not consider the ESPRIT SIP conditions, suggesting that Algorithm~\ref{alg_overall} can provide considerable accuracy gains in ESPRIT-based estimation. For $\pm 1 \degree$ uncertainty, the ESPRIT-oriented precoder achieves lower RMSE than the sum precoder for $\theta \in [-60 \degree, 60 \degree]$ in agreement with \cite{signalDesign_TVT_2022}, while the trend becomes the opposite outside this interval. Looking at the $\pm 3 \degree$ uncertainty case, the sum precoder performs slightly better than the ESPRIT-oriented one around $\theta = 0 \degree$, while the latter can significantly outperform the former at the end-fire of the array, i.e., when the absolute value of the \ac{AoD} is above $60 \degree$. Furthermore, for the $\pm 5 \degree$ uncertainty case, the proposed ESPRIT-oriented design provides substantial gains over the sum precoder for almost the entire range of \ac{AoD} values, which further evidences the effectiveness of the proposed algorithm. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figures/rmse_snr_theta_20_delta_3_single_path-eps-converted-to.pdf} \caption{ESPRIT RMSEs obtained by the considered precoders with respect to SNR for a single-path scenario, where $\theta_0 = 20 \degree$ and ${\mathcal{U}}_0 = [17 \degree , \, 23 \degree]$.} \label{fig_rmse_snr_theta_20_delta_3_single_path} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figures/rmse_snr_theta_70_delta_3_single_path-eps-converted-to.pdf} \caption{ESPRIT RMSEs obtained by the considered precoders with respect to SNR for a single-path scenario, where $\theta_0 = 70 \degree$ and ${\mathcal{U}}_0 = [67 \degree , \, 73 \degree]$.} \label{fig_rmse_snr_theta_70_delta_3_single_path} \vspace{-0.1in} \end{figure} \begin{figure} \begin{center} \subfigure[]{ \label{fig_unc_1} \includegraphics[width=0.45\textwidth]{Figures/rmse_theta_SNR_20_dB_uncert_1_deg-eps-converted-to.pdf} } \subfigure[]{ \label{fig_unc_3} \includegraphics[width=0.45\textwidth]{Figures/rmse_theta_SNR_20_dB_uncert_3_deg-eps-converted-to.pdf} } \subfigure[]{ \label{fig_unc_5} \includegraphics[width=0.45\textwidth]{Figures/rmse_theta_SNR_20_dB_uncert_5_deg-eps-converted-to.pdf} } \end{center} \vspace{-0.2in} \caption{ESPRIT RMSEs obtained by the considered precoders with respect to the path \ac{AoD} for a single-path scenario with \subref{fig_unc_1} $\pm 1$, \subref{fig_unc_3} $\pm 3$, and \subref{fig_unc_5} $\pm 5$ degrees of angular uncertainty for ${\rm{SNR}} = 20 \, \rm{dB}$.} \label{fig_rmse_theta} \vspace{-0.2in} \end{figure} Finally, we investigate the RMSE performances for a two-path scenario with $ \bm{\theta} = [20\degree, 70\degree]$, ${\mathcal{U}}_0 = [17 \degree , \, 23 \degree]$, ${\mathcal{U}}_1 = [67 \degree , \, 73 \degree]$, and ${\rm{SNR}} = [20, 0] \, \rm{dB}$. Fig.~\ref{fig_rmse_snr_two_paths} plots the RMSE with respect to the SNR of the second path, where the SNRs of both paths are changed simultaneously while keeping their difference fixed. It is observed that the proposed ESPRIT-based design achieves higher accuracy than the benchmark schemes in the medium and high SNR regimes. The gap to the CRB can be attributed to the intrinsic suboptimality of ESPRIT \cite{esprit_tsp_91,doa_esprit_TAES_93} and to imperfect decorrelation of the paths in the estimated correlation matrix $\widetilde{\mathbf{R}}$. \begin{figure} \centering \vspace{-0.2in} \includegraphics[width=0.9\linewidth]{Figures/rmse_snr_theta_20_70_delta_3_two_paths-eps-converted-to.pdf} \vspace{-0.05in} \caption{ESPRIT RMSEs obtained by the considered precoders with respect to SNR for a two-path scenario, where $ \bm{\theta} = [20\degree, 70\degree]$ with $\pm 3$ degrees of uncertainty for both paths.} \label{fig_rmse_snr_two_paths} \vspace{-0.1in} \end{figure} \section{Concluding Remarks} In this paper, we have studied the problem of mmWave precoder design tailored specifically to ESPRIT-based channel estimation. Considering the fact that standard precoders (i.e., sum beam) fail to achieve satisfactory performance in \ac{AoD} estimation and that \ac{CRB}-optimized precoders (sum-diff beam) destroy the \ac{SIP} of ESPRIT, leading to large degradations in ESPRIT accuracy, we have developed a novel ESPRIT-oriented precoder design approach that jointly optimizes the precoder and the \ac{SIP}-restoring matrix used in ESPRIT. Simulation results have provided valuable insights into how the \ac{SIP} requirement impacts the beampattern of the ESPRIT-oriented precoders and shown the effectiveness of the proposed design strategy. As future work, similar design principles can be employed to extend the current study to higher dimensions, i.e., 2-D uniform rectangular arrays (URAs) at both the \ac{BS} and the \ac{UE} sides, possibly with \ac{OFDM} transmission, leading to ESPRIT-oriented precoder and combiner designs for 5-D channel estimation (\ac{AoD}, \ac{AoA} and delay) \cite{Fan_ESPRIT_2021}. \section*{Acknowledgment} { {This work was supported, in part, by the European Commission through the H2020 project Hexa-X (Grant Agreement no. 101015956), the MSCA-IF grant 888913 (OTFS-RADCOM), ICREA Academia Program, and Spanish R+D project PID2020-118984GB-I00.}} \bibliographystyle{IEEEtran}
\section{Introduction}\setcounter{equation}{0}\label{Cha:1} We consider the following Dirichlet boundary value problems for general second-order elliptic partial differential equations \begin{eqnarray}\label{PDEs:NSPD:2Order} -\mathrm{div}(\boldsymbol{\alpha}(x) \nabla u)+\boldsymbol{\beta}(x) \cdot \nabla u+\gamma(x) u = f &\quad& \mbox{in $\Omega$ }, \\ \label{DHBC:NSPD:2Order} u = 0 &\quad& \mbox{on $\partial \Omega$ }, \end{eqnarray} where the coefficient $\boldsymbol{\alpha}(x) \in \mathbb{R}^{d} \times \mathbb{R}^{d}$ is smooth functions on $\bar{\Omega}$, and satisfies consistent ellipticity, namely, there are minimum and maximum eigenvalues $\alpha_{*}$ and $\alpha^{*}$ respectively, satisfying $\alpha_{*}|\xi|^2 \leqslant \mathbf{\alpha}(x)\xi \cdot \xi \leqslant \alpha^{*}|\xi|^2, ~~\forall \xi \in \mathbb{R}^d$. Both $\boldsymbol{\beta}(x) \in \mathbb{R}^{d}$ and $\gamma(x) \in \mathbb{R}^1$ are smooth functions on $\bar{\Omega}$, and $f \in L^2(\Omega)$ is a given function. Noting that when $\boldsymbol{\beta}(x) \neq \boldsymbol{0}$, the continuous variational problems (CVP) of \eqref{PDEs:NSPD:2Order}-\eqref{DHBC:NSPD:2Order} are nonsymmetric, and when $\gamma(x)<0$, the CVP of \eqref{PDEs:NSPD:2Order}-\eqref{DHBC:NSPD:2Order} may be indefinite. The two-grid (TG) algorithm was first introduced by Xu \cite{XuJC96:1759} for solving nonasymmetric or indefinite problems. The main idea of the TG algorithm is to solve the original problems on the coarse mesh to obtain an approximate finite element solution, and then use the approximate solution to solve the corresponding linear symmetric positive definite problems on the fine mesh. Over the last two decades, the TG algorithm has been widely used to solve many problems, such as nonlinear elliptic problems \cite{BiCJWangC18:23,ZhongLQZhouLL21:105587}, semilinear parabolic equations \cite{MarionXu95:1170}, nonlinear parabolic equations \cite{DawsonWheele94Meeting,DawsonWheele98:435}, Poisson-Nernst-Planck problems \cite{YangYLuBZ19:556}, and Maxwell equations \cite{ZhongLQLiuCM13:432,ZhongLQShuS13:93}. The main objective of this paper is to propose a new iterative two-level algorithm. Compared with the traditional iterative two-grid algorithm, our algorithm needs only one mesh and takes less CPU time to achieve the same accuracy. In this work, we first present elliptic problems discretized by the finite element method. Then, we propose an iterative two-level algorithm. Finally, some numerical results are presented to illustrate the efficiency of the proposed algorithms. \section{Finite element discretizations}\setcounter{equation}{0} Given $S \subset \mathbb{R}^d(d=2, 3)$, we denote $W^{1, 2}(S)$ as the standard Sobolev space with norm $\| \cdot \|_{1, 2, S}$. For simplicity of notation, we denote $\| \cdot \|_{1} = \| \cdot \|_{1, 2, \Omega}$, and $H^1_0(\Omega) := \{u\in H^1(\Omega) : u|_{\partial \Omega} =0 \}$ in the sense of trace. We define the following two bilinear forms \begin{eqnarray} \label{Def:Bilinear:a} a(u, v)&:=&\int_\Omega (\boldsymbol{\alpha}(x)\nabla u) \cdot \nabla v \mathrm{d}x, \\ \label{Def:Bilinear:hata} \hat{a}(u, v)&:=&a(u, v)+\int_\Omega (\boldsymbol{\beta}(x) \cdot \nabla u+\gamma (x)u)v \mathrm{d}x. \end{eqnarray} Then, we obtain the CVP of \eqref{PDEs:NSPD:2Order}-\eqref{DHBC:NSPD:2Order}: Find $u \in H_{0}^{1}(\Omega)$, such that \begin{equation}\label{Eqn:2.10} \hat{a}(u, v)=(f, v),~~\forall v \in H_{0}^{1}(\Omega). \end{equation} We assume that $\Omega$ is partitioned by a quasi-uniform division $\mathcal{T}_h = \{\tau_i\}$. By this we mean that $\tau_i$'s are simplexes of the size $h$ with $h \in (0,1)$ and $\bar{\Omega} = \cup_i \tau_i$. For the given quasi-uniform division $\mathcal{T}_h$, the conforming finite element space is defined as follows \begin{equation*}\label{Eqn:2.1} V_h^l:=\{ v \in C(\Omega) : v|_{\tau} \in \mathbb{P}_l(\tau),~ \forall \tau \in \mathcal{T}_h, ~v |_{\partial \Omega}=0 \}, \end{equation*} where $\mathbb{P}_l(\tau)$ is the space of polynomial of degree not greater than a positive integer $l$ on the subdivision element $\tau$. The discrete variational problems of \eqref{Eqn:2.10} is to find $u_h^l \in V_h^l$, such that \begin{equation}\label{Eqn:2.11} \hat{a}(u_h^l, v_h^l)=(f, v_h^l),~~\forall v_h^l\in V_h^l. \end{equation} \section{Iterative two-level algorithm} \setcounter{equation}{0} The basic mechanism of the classical iterative two-grid algorithm is two quasi-uniform tetrahedral nested meshes of $\Omega$, namely the fine space $V_h^{k, l}$ and the coarse space $V_H^{k, l}$, with two different meshes sizes $h$ and $H(h<H)$. Furthermore, in the application given in the succeeding text, we shall always assume that $ H=O\left(h^\lambda\right) \text { for some } 0<\lambda<1. $ \begin{algorithm}[Algorithm 4.1 of \cite{XuJC96:1759}]\label{Alg:Itg1} Let $u_{h}^{l,0}=0$; assume that $u_{h}^{l,k}\in {V}_h^l(k\geq 0)$ has been obtained, $u_{h}^{l,k+1}\in {V}_h^l$ is defined as follows: \begin{description} \item[1.] Find $e_{H}^{l,k}\in V_H^l$, such that $ \hat{a}(e_{H}^{l,k},v_H^l) = (f,v_H^l) - \hat{a}(u^{l,k}_{h},v_H^l), \ \forall v_H^l\in V_H^l. $ \item[2.] Find $u_{h}^{l,k+1}\in V_h^l$, such that $ a(u_{h}^{l,k+1},v_h^{l}) = (f,v_h^l) - N( u_{h}^{l,k} + e_{H}^{l,k},v_h^l),\ \forall v^l_{h}\in V_h^l, $ where $N(u, v):=\hat{a}(u, v)-a(u, v), \quad \forall u, v \in H_{0}^{1}(\Omega).$ \end{description} \end{algorithm} Assume that $u_{h}^{l,k+1}\in V_h^l$ is the solution obtained by Algorithm \ref{Alg:Itg1} with $k\geq 1$, then we have (see Theorem 4.4 of \cite{XuJC96:1759}) \begin{equation}\label{Eroor} \| u - u_{h}^{l,k+1} \|_1\lesssim (h^l + H^{k+l}) \|u\|_{l+1}, \end{equation} which means that the two-grid solution given by Algorithm \ref{Alg:Itg1} can effectively approximate the finite element solution $u_h^l$ of \eqref{Eqn:2.11}. \begin{remark} In order to obtain the optimal convergence order in \eqref{Eroor}, we should assume that $H$ and $h$ satisfy the relation $h=O(H^\frac{l+k}{l})$. However, there are exact nested grids, which satisfy $h=O(H^\frac{l+k}{l})$, very difficult to implement. \end{remark} Next, we consider replacing $V^l_h$ with $V_H^s(s\geq l+1)$ in the second step of Algorithm \ref{Alg:Itg1}, and obtain the following algorithm. \begin{algorithm}\label{Alg:Itg2} Let $\hat{u}_{H}^{l,0}=0$; assume that $\hat{u}_{H}^{s,k}\in {V}_H^s(k\geq 0)$ has been obtained, $\hat{u}_{H}^{s,k+1}\in {V}_H^s$ is defined as follows: \begin{description} \item[1.] Find $e_{H}^{l,k}\in V_H^l$, such that $ \hat{a}(e_{H}^{l,k},v_H^l) = (f,v_H^l) - \hat{a}(\hat{u}^{s,k}_{H},v_H^l), \ \forall v_H^l\in V_H^l. $ \item[2.] Find $\hat{u}_{H}^{s,k+1}\in V_H^s$, such that $ a(\hat{u}_{H}^{s,k+1},v_H^{s}) = (f,v_H^s) - N( \hat{u}_{H}^{s,k} + e_{H}^{l,k},v_H^s),\ \forall v^s_{H}\in V_H^s. $ \end{description} \end{algorithm} \begin{remark} Comparing Algorithm \ref {Alg:Itg1} with Algorithm \ref{Alg:Itg2}, although the SPD problems are solved in the second step of the algorithm, $V_H^{s}$ has fewer degrees of freedom than $V_h^{l}$ (See Table \ref{Tab:3}), which can greatly reduce the computation time. \end{remark} \begin{table}[!htbp] \renewcommand\arraystretch{1} \centering \begin{tabular}{cccccc} \hline $\mathcal{T}_H$ & $dof(V_H^3)$& $dof(V_h^3)$ & $dof(V_H^4)$ & $dof(V_H^5)$ & $dof(V_H^6)$\\ \hline 1/9 & 784 & 59536 & 1369 & 2116 & 3025 \\ 1/10 & 961 & 90601 & 1681 & 2601 & 3721 \\ 1/11 & 1156 & 132496 & 2025 & 3136 & 4489 \\ 1/12 & 1369 & 187489 & 2401 & 3721 & 5329\\ \hline \end{tabular} \caption{ Taking $h=H^2$, $V_H^{4}$, $V_H^{5}$, $V_H^{6}$ and $V_h^{3}$ degrees of freedom comparison }\label{Tab:3} \end{table} \section{Numerical results} In this section, numerical experiments are carried out to verify the effectiveness of the iterative two-level algorithm. We performed all experiments for our iterative two-level algorithm with the help of the software package Fenics \cite{LoggMardal12Book}. \begin{example}\label{example-1} We consider model problems \eqref{PDEs:NSPD:2Order}-\eqref{DHBC:NSPD:2Order}, where the computational domain is $\Omega=(0, 1)^2$, the coefficients are $\alpha = 1.0$, $\boldsymbol{\beta}=(0, 0)^t$ and $\gamma = -10$, the exact solution is $u= \sin(\pi x)\sin(\pi y)$, and $f$ can be obtained by substituting the exact solution into equation \eqref{PDEs:NSPD:2Order}. \end{example} We first partition the $x-$ axis and $y-$ axis of the domain $\Omega$ into equally distributed $M$ subintervals, then divide each square into two triangles by using the line with slope $-1$. Hence, we obtain a sequence of nested and structured grids and the corresponding meshes as $\mathcal{T}_{H}$ with $H=1/M$, where $M\geq 2$ is an integer, see Figure \ref{StructuredGrid:2D:4}. We choose the piecewise conform $l$ order finite element spaces $V_H^{l}$ based on the meshes $\mathcal{T}_{H}$. For Algorithm \ref{Alg:Itg1}, we choose $h=H^2$. \begin{figure}[H] \centerline{\includegraphics[scale=1]{uni.jpg}} \caption{Structured grids with $\mathcal{T}_{1/4}$ (left) and $\mathcal{T}_{1/8}$ (right).} \label{StructuredGrid:2D:4} \end{figure} \begin{table}[!htbp] \centering \begin{tabular}{ccccccc} \hline \multicolumn{1}{l}{} &\multicolumn{3}{c}{ Algorithm \ref{Alg:Itg1}, $l=3$, $k=3$} &\multicolumn{3}{c}{Algorithm \ref{Alg:Itg2}, $l=3$, $s=6$, $k=3$} \\ \cline{2-4} \cline{5-7} $H$ & $\|u-u_{h}^{3, 3} \|_1$ &$\|u-u_{h}^{3, 3} \|_1*H^{-6}$ & CPU & $\|u-\hat{u}_{H}^{6, 3}\|_1$ & $\|u-\hat{u}_{H}^{6, 3}\|_1*H^{-6}$&CPU \\ \hline 1/9 &9.8925E-07& 5.2573E-01& 6.1544 &5.7750E-08& 3.0691E-02& 0.2503\\ 1/10 &5.2609E-07& 5.2609E-01& 9.0338 &3.0706E-08& 3.0706E-02& 0.3082\\ 1/11 &2.9711E-07& 5.2635E-01& 16.177 &1.7339E-08& 3.0717E-02& 0.3644\\ 1/12 &1.7634E-07& 5.2655E-01& 24.047 &1.0290E-08& 3.0726E-02& 0.4347\\ \hline \end{tabular} \caption{Compare the $H^1$ error estimate between the classical iterative two-grid algorithm \ref{Alg:Itg1} and the iterative two-level algorithm \ref{Alg:Itg2}. }\label{lable-t3-7} \end{table} From Table \ref{lable-t3-7}, we can observe that both our algorithm and the traditional iterative mesh can reach the optimal convergence order. And to achieve the same accuracy, our algorithm uses less CPU time. \begin{table}[!htbp] \centering \begin{tabular}{ccccccc} \hline \multicolumn{1}{l}{} &\multicolumn{3}{c}{ Algorithm \ref{Alg:Itg2}, $l=3$, $s=4$, $k=3$} &\multicolumn{3}{c}{Algorithm \ref{Alg:Itg2}, $l=3$, $s=5$, $k=3$ } \\ \cline{2-4} \cline{5-7} $H$ & $\|u-\hat{u}_{H}^{4, 3} \|_1$ &$\|u-\hat{u}_{H}^{4, 3} \|_1*H^{-4}$ & CPU & $\|u-\hat{u}_{H}^{5, 3}\|_1$ & $\|u-\hat{u}_{H}^{5, 3}\|_1*H^{-5}$&CPU \\ \hline 1/9 &3.6409E-05& 2.3888E-01& 0.1383&1.6093E-06& 9.5028E-02& 0.1825\\ 1/10 &2.3903E-05& 2.3903E-01& 0.1633&9.5141E-07& 9.5141E-02& 0.2172 \\ 1/11 &1.6334E-05& 2.3915E-01& 0.2785&5.9129E-07& 9.5228E-02& 0.2571 \\ 1/12 &1.1538E-05& 2.3924E-01& 0.2237&3.8298E-07& 9.5299E-02& 0.3020 \\ \hline \end{tabular} \caption{ the $H^1$ error estimate of the iterative two-level algorithm \ref{Alg:Itg2}. }\label{lable-t3-17} \end{table} From the Tables \ref{lable-t3-7}- \ref{lable-t3-17}, it can be found that when the degree of the coarse space polynomial degree $l=3$ is fixed, as the degree of the fine space polynomial increases once, the convergence order of the error estimates in $H^1$-norm for the solution of the algorithm \ref{Alg:Itg2} increase by one order. It can be seen that the errors in $H^1$-norm for the solution of the algorithm \ref{Alg:Itg2} depend on the value of $s$. \begin{example}\label{example-2} We consider model problems \eqref{PDEs:NSPD:2Order}-\eqref{DHBC:NSPD:2Order}, where the computational domain is $\Omega=(0, 1)^2$, the coefficients are $\alpha = 1.0$, $\boldsymbol{\beta}=(0, 0)^t$ and $\gamma = -10$, the exact solution is $u= x(1-x)^2y(1-y)^2$, and $f$ can be obtained by substituting the exact solution into equation \eqref{PDEs:NSPD:2Order}. \end{example} \begin{table}[!htbp] \centering \begin{tabular}{ccccccc} \hline \multicolumn{1}{l}{} &\multicolumn{3}{c}{ Algorithm \ref{Alg:Itg1}, $l=3$, $k=3$} &\multicolumn{3}{c}{Algorithm \ref{Alg:Itg2}, $l=3$, $s=6$, $k=3$} \\ \cline{2-4} \cline{5-7} $H$ & $\|u-u_{h}^{3, 3} \|_1$ &$\|u-u_{h}^{3, 3} \|_1*H^{-6}$ & CPU & $\|u-\hat{u}_{H}^{6, 3}\|_1$ & $\|u-\hat{u}_{H}^{6, 3}\|_1*H^{-6}$&CPU \\ \hline 1/9 &6.0567E-08& 3.2188E-02& 6.0850&2.8919E-13& 1.5369E-07& 0.1901\\ 1/10 &3.2255E-08& 3.2255E-02& 8.9463&1.2153E-13& 1.2153E-07& 0.2335 \\ 1/11 &1.8235E-08& 3.2305E-02& 16.0683&7.9992E-14& 1.4171E-07& 0.2751 \\ 1/12 &1.0832E-08& 3.2344E-02& 23.8708&7.8801E-14& 2.3530E-07& 0.3291 \\ \hline \end{tabular} \caption{Compare the $H^1$ error estimate between the classical iterative two-grid algorithm \ref{Alg:Itg1} and the iterative two-level algorithm \ref{Alg:Itg2}. }\label{lable-t3-117} \end{table} \begin{table}[!htbp] \centering \begin{tabular}{ccccccc} \hline \multicolumn{1}{l}{} &\multicolumn{3}{c}{ Algorithm \ref{Alg:Itg2}, $l=3$, $s=4$, $k=3$} &\multicolumn{3}{c}{Algorithm \ref{Alg:Itg2}, $l=3$, $s=5$, $k=3$ } \\ \cline{2-4} \cline{5-7} $H$ & $\|u-\hat{u}_{H}^{4, 3} \|_1$ &$\|u-\hat{u}_{H}^{4, 3} \|_1*H^{-4}$ & CPU & $\|u-\hat{u}_{H}^{5, 3}\|_1$ & $\|u-\hat{u}_{H}^{5, 3}\|_1*H^{-5}$&CPU \\ \hline 1/9 &1.9981E-06& 1.3110E-02& 0.1035 &5.2140E-08& 3.0788E-03& 0.1380\\ 1/10 &1.3129E-06& 1.3129E-02& 0.1214 &3.0796E-08& 3.0796E-03& 0.1637\\ 1/11 &8.9783E-07& 1.3145E-02& 0.1420 &1.9126E-08& 3.0803E-03& 0.1938\\ 1/12 &6.3456E-07& 1.3158E-02& 0.1661 &1.2381E-08& 3.0809E-03& 0.2273\\ \hline \end{tabular} \caption{ the $H^1$ error estimate of the iterative two-level algorithm \ref{Alg:Itg2}. }\label{lable-t3-177} \end{table} The same conclusions can be observed in Tables \ref{lable-t3-117} and \ref{lable-t3-177} as in Tables \ref{lable-t3-7} and \ref{lable-t3-17}. \section*{Acknowledgment} The first, second and fourth authors are supported by the National Natural Science Foundation of China (No. 12071160). The second author is also supported by the National Natural Science Foundation of China (No. 11901212). The third author is supported by the National Natural Science Foundation of China (No. 12161026), Guangxi Natural Science Foundation (No. 2020GXNSFAA159098). \section*{References} \bibliographystyle{abbrv}
\section{Introduction} Passwords are still predominant for authentication with online services~\cite{quermann_state_2018}, although new threats are constantly emerging. Credential stuffing and password spraying attacks~\cite{haber_attack_2020} use leaked login credentials (username and password) sourced from data breaches, and try them in some way on (other) online services. These attacks are very popular today~\cite{akamai_loyalty_2020} since attackers can automate them with little effort% . Major online services responded to this threat with implementing risk-based authentication (RBA)~\cite{wiefling_is_2019}, aiming to strengthen password-based authentication with little impact on the user. \subsubsection*{Risk-Based Authentication (RBA)} RBA determines whether a login attempt is a legitimate one or an account takeover attempt. To do so, RBA monitors additional features when users submit their login credentials. Popular features range from network (e.g., IP~address), device (e.g., smartphone model and operating system), or client (e.g., browser vendor and version), to (behavioral) biometric information (e.g., login time)~\cite{wiefling_whats_2021,wiefling_is_2019}. Based on the feature values and those of previous logins, RBA calculates a risk score. An access threshold typically classifies the score into low, medium, and high risk~\cite{freeman_who_2016,hurkala_architecture_2014,molloy_risk-based_2012}. On a low risk (e.g., usual device and location), the RBA system grants access with no further intervention. On a medium or higher risk (e.g., unusual device and location), RBA requests additional information from the user, e.g., verifying the email address. After providing the correct proof, access is granted.% RBA is considered a scalable interim solution when passwords cannot simply be replaced by more secure authentication methods in many cases~\cite{wiefling_more_2020,wiefling_whats_2021}. The National Institute of Standards and Technology (NIST, USA) and National Cyber Security Centre (NCSC, UK) recommend RBA to mitigate attacks involving stolen passwords~\cite{grassi_digital_2017,national_cyber_security_centre_cloud_2018}. Beyond that, users found RBA more usable than equivalent two-factor authentication (2FA) variants and comparably secure~\cite{wiefling_more_2020}. Also, in contrast to 2FA, RBA both offers good security and rarely requests additional authentication in practice~\cite{wiefling_whats_2021}, reducing the burden on users. \subsubsection*{Research Questions} However, users obtain the security and usability gain of RBA at the cost of disclosing more potentially sensitive data with a personal reference, such as IP addresses and browser identifiers. Therefore, user privacy is at risk when RBA databases are forwarded or breached, as additional data besides usernames would potentially allow to identify individuals. More and more data protection laws aim to protect users from massive data collection by online services. Considering that, we wondered whether and to what extent the integration of RBA systems complies with the principles of modern data protection. We also wondered which trade-offs are possible to balance security and privacy goals. To further investigate RBA's privacy aspects, we formulated the following research questions: \newlist{RQLIST}{enumerate}{1} \setlist[RQLIST]{label=\bfseries RQ\arabic*:, leftmargin=2.7em, parsep=0em} \newlist{RQ2LIST}{enumerate}{2} \setlist[RQ2LIST]{label=\bgroup\bfseries \alph*)\egroup,leftmargin=1.3em, parsep=0em} \begin{RQLIST} \item \begin{RQ2LIST} \item In what ways can RBA features % be stored to increase the user privacy? \item How can RBA features % be stored to protect user privacy in terms of data breaches? \end{RQ2LIST} \item To what extent can a RBA feature maintain good security while preserving privacy in practice? \end{RQLIST} \subsubsection*{Contributions} We propose and discuss five privacy enhancements that can be used by RBA models used by the majority of deployments found in practice. To estimate their usefulness in practice, we evaluated a subset of these enhancements on a RBA feature that is highly relevant in terms of security and privacy, i.e., the IP address. We evaluated with a data set containing the login history of 780 users on a real-world online service for over 1.8 years% . % Our results show for the first time that it is possible to increase feature privacy while maintaining RBA's security and usability properties. However, increasing privacy is limited to certain conditions that need to be considered while designing the RBA system. We also identified future challenges and research directions that might arise with a widespread RBA adoption in the future. The results support service owners to provide data protection compliant RBA solutions. They assist developers in designing RBA implementations with increased privacy. Researchers gain insights on how RBA can become more privacy friendly% , and further research directions. \section{Background}\label{sec:background} In the following section, we provide a brief introduction to RBA and explain how the use of RBA correlates with the several privacy principles defined by industry standards and legislation. \subsection{RBA Model} \label{subsec:rba-model} Since RBA is not a standardized procedure, multiple solutions % exist in practice. We focus on the implementation by Freeman et al.~\cite{freeman_who_2016}, since it performed best in a \censorchange{previous study}{study of Wiefling et al.}~\cite{wiefling_whats_2021}. Also, this RBA model is known to be widely used, e.g., by popular online services like Amazon, Google, and LinkedIn~\cite{wiefling_is_2019,wiefling_whats_2021}. The model calculates the risk score $S$ for a user $u$ and a set of feature values $(FV^1,..., FV^d)$ with $d$ features as: \begin{equation} S_{u}(FV) = \left( \prod_{k=1}^{d} \frac{p(FV^k)% }{p(FV^k | u, legit)% } \right) \frac{p(u | attack)}{p(u | legit)} \end{equation} $S$ has the probabilities $p(FV^k)$ that a feature value appears in the global login history of all users, and \linebreak $p(FV^k | u, legit)$ that a legitimate user has this feature value in its own login history. The probability $p(u | attack)$ describes how likely the user is being attacked, and $p(u | legit)$ describes how likely the legitimate user is logging in. \subsection{Regulatory Foundations} \highlight{In the past few years, the introduction of new data protection laws, such as the General Data Protection Regulation (GDPR)}~\cite{european_union_gdpr_2016} \highlight{and the California Consumer Privacy Act (CCPA)}~\cite{california_ccpa_2018}, \highlight{dramatically changed the way online services (i.e., data controllers) process their users' data. Formerly loose recommendations on handling user data have been replaced by clear and binding data protection principles, which data controllers must adhere to. However, the details and scope of the principles vary between jurisdictions. For internationally operating data controllers, this poses the problem that their data processing operations must be designed to be compatible with different requirements. Fortunately, the privacy framework specified in ISO 29100:2011}~\cite{iso_isoiec_2011} \highlight{already compiles an intersection of privacy principles from data protection laws worldwide. Thus, it provides data controllers a solid basis for designing legally compliant data processing operations that can be tailored to the details of different jurisdictions. We outline the requirements for the design of RBA systems based on the privacy principles defined in ISO 29100:2011, aiming at compatibility with different jurisdictions.} \inlineheading{Applicability of Privacy \highlight{Principles}} Generally speaking, \highlight{the privacy principles defined in established privacy laws and frameworks aim} to protect the privacy of individuals. Thus, they only apply to data with a personal reference. Such data are called, e.g., \emph{``personal data''} (GDPR \cite{european_union_gdpr_2016}), \emph{``personal information''} (CCPA \cite{california_ccpa_2018}), or \emph{``personally identifiable information''} (PII) (ISO \cite{iso_isoiec_2011}). The definitions are very similar and usually refer to \emph{``any information that (a) can be used to identify [an individual] to whom such information relates, or (b) is or might be directly or indirectly linked to [an individual]''} \cite{iso_isoiec_2011}. \highlight{The data processed by RBA certainly fall within this definition,} since implementations rely on features that already serve as (unique) identifiers by themselves (e.g., IP address)~\cite{wiefling_is_2019}. \highlight{Also, the risk score calculated by RBA represents an identifier by itself, as it constitutes a set of characteristics that uniquely identifies an individual.} % Therefore, RBA has to comply with \highlight{ISO~29100:2011's} privacy principles discussed below. \inlineheading{Consent and Choice} \highlight{In general, data controllers must ensure the lawfulness of data processing. While most jurisdictions recognize user consent as a lawful basis, applicable laws may allow processing without consent. Depending on the assets associated with a user account, data controllers may argue that RBA use is required to comply with the obligation to implement appropriate technical safeguards against unauthorized access. Nonetheless, to ensure compliance, providers should design RBA mechanisms with consent in mind and provide their users with clear and easy-to-understand explanations.% } \inlineheading{Collection Limitation and Data Minimization} Data controllers must limit the PII collection and processing to what is necessary for the specified purposes. \highlight{RBA feature sets should therefore be reviewed for suitability with redundant or inappropriate features removed}~\cite{wiefling_whats_2021}. \highlight{This includes considering using pseudonymized data for RBA and disposing of the feature values when they are no longer useful for the purpose of RBA. In practice, this creates the challenge to not reduce a risk score's reliability.} \inlineheading{Use, Retention, and Disclosure Limitation} The data processing must be limited to purposes specified by the data controller, and data must not be disclosed to recipients other than specified. RBA should ensure that features cannot be used for purposes other than the calculation of risk scores. Moreover, after a feature value becomes outdated, it should be securely destroyed or anonymized. We would point out that privacy laws do not apply to anonymized data and could therefore serve data controllers for developing and testing purposes beyond the retention period specified in their privacy statements. \inlineheading{Accuracy and Quality} Data controllers must ensure that the processed data are accurate and of quality. This is not only due to their own business interests, but also because data subjects have a right to expect their data being correct. This directly affects RBA, since it has the power to deny a significant benefit to users (i.e., access to their user account) with potentially significant harm. Data controllers must hence ensure by appropriate means that the stored feature values are correct and valid. \inlineheading{Individual Participation and Access} Data controllers must allow data subjects to access and review their PII. For RBA, this means that users should be allowed to be provided with a copy of the feature values used. \inlineheading{Information Security} Data controllers are obliged to protect PII with appropriate controls at the operational, functional, and strategic level against risks. These % include, but are not limited to, risks associated with unauthorized access or processing and denial of service. Privacy laws demand extensive protections in this regard, \emph{``taking into account the state of the art, the costs of implementation and the nature, scope, context and purposes of processing as well as the risk of varying likelihood and severity for the rights and freedoms of natural persons''} (Art. 32 (1) GDPR). \highlight{Since RBA risk scores do not necessarily rely on evaluating plain text feature values}~\cite{wiefling_whats_2021}\highlight{, the collected data should be stored in an appropriate pseudonymized, masked, truncated, or encrypted form, depending on the RBA implementation.} Moreover, data controllers \highlight{should implement additional technical and organizational measures as needed,} and be able to ensure the integrity, availability, and resilience of RBA. \inlineheading{Accountability and Privacy Compliance} Data controllers should inform data subjects about privacy-related policies, transfers of PII to other countries, and data breaches. Data controllers should also implement organizational measures to help them verify and demonstrate legal compliance. These include, but are not limited to, risk assessments and recovery procedures. RBA implementations should therefore consider the worth of RBA features to both attackers and data subjects, and the recovery from data breaches. This is crucial in order not to undermine the security of user accounts and their associated assets. \section{Privacy Enhancements (RQ1)} \label{sec:privacy-considerations} To comply with the privacy principles and derived data protection requirements, service owners should consider mechanisms to increase privacy in their RBA implementations. In the following, we introduce threats and their mitigation to increase privacy properties of RBA features. \subsection{Feature Sensitivity and Impact Level} \label{subsec:feature-sensitivity} RBA feature sets always intend to distinguish attackers from legitimate users. In doing so, the features may contain sensitive PII. However, not only do users perceive such PII differently regarding their sensitivity~\cite{schomakers_internet_2019}. Their (unintended) disclosure could also have far-reaching negative consequences for user privacy. Developers and providers should therefore determine the impact from a loss of confidentiality of the RBA feature values. Specifically, the following aspects need consideration \cite{mccallister_guide_2010}: \inlineheading{Identifiability\highlight{ and Linkability}} RBA feature sets should be evaluated regarding their ability to identify natural persons behind them. In particular, RBA systems that rely on intrusive online tracking methods, such as browser fingerprinting, store % sensitive browser-specific information that form a % linked identifier. In the event of losing confidentiality, the features would allow clear linkage between profiles at different online services, despite \highlight{users using different login credentials or pseudonyms}. Depending on the service, this could result in negative social or legal consequences for individuals. It could also enable more extensive and unintended activity tracking, and de-anonymizing information associated with user accounts% . Previous work found that powerful RBA feature sets do not require to uniquely identify users when focusing on the detection of account takeover attempts~\cite{wiefling_whats_2021}. % Also, users are more willing to accept the processing of sensitive information when they are certain that it is anonymous and does not allow them to be identified~\cite{markos_new_2018,schomakers_all_2020}. Thus, the use of non-intrusive features may increase user trust in online services, too. \inlineheading{Feature Values Sensitivity} Aside from % identifying individuals by RBA feature sets, the individual feature values may already contain sensitive PII. Sensitive PII in the scope of RBA may be feature values that are easily spoofable and can be misused to attack other online services in the event of a data breach. Sensitive PII may also refer to data perceived as sensitive by online users. For example, the most important feature of current RBA methods, namely the IP address~\cite{wiefling_whats_2021,wiefling_is_2019,freeman_who_2016,steinegger_risk-based_2016,hurkala_architecture_2014}, is perceived as highly sensitive by online users of diverse cultural backgrounds~\cite{markos_information_2017,schomakers_internet_2019,almotairi_perception_2020}. Since users are generally less willing to share data with increased sensitivity, RBA feature sets should limit the use of sensitive data if possible, in order to meet user interests. \subsection{Threats} RBA features may contain personal sensitive data, which has to be protected against attackers. To support online services in their protection efforts, we introduce \highlight{three privacy threat types}. We based the threats on those found in literature and our own observations in practice. \inlineheading{Data Misuse} \highlight{Online services could misuse their own RBA feature data for unintended purposes, such as user tracking, profiling, or advertising} ~\cite{bonneau_privacy_2014}. \highlight{This type of misuse previously happened with phone numbers stored for 2FA purposes}~\cite{venkatadri_investigating_2018}. \highlight{While users have to trust online services to not misuse their data, responsible online services should also take precautions to minimize chances for miuse scenarios or unintended processing, e.g., by internal misconduct or after the company changed the ownership.} \inlineheading{Data Forwarding} Online services can be requested or forced to hand out stored feature data, e.g., to state actors, advertising networks, or other third parties. Especially IP addresses are commonly requested% ~\cite{europol_sirius_2019}. When such data are forwarded to third parties, the users' privacy is breached. For instance, the IP address could be used to reveal the user's geolocation or even their identity.% \inlineheading{Data Breach} Attackers % obtained the database containing the feature values% , e.g., by hacking the online service% . As a result, online services lost control over their data. Attackers can try to re-identify users based on the feature values, e.g., by combining them with other data sets. They can further try to reproduce the feature values and try account takeover attacks on a large scale, similar to credential stuffing. On success, they could access sensitive user data stored on the online service, e.g., private messages. % \subsection{Mitigation} Online services can implement several measures to mitigate the outlined privacy threats. We propose five % measures that are based on methods found in related research fields, as well as privacy regulations and our own observations with the selected RBA model (see Section~\ref{sec:background}). Based on the introduced RBA model, we considered all feature values as categorical data, in order to calculate the probabilities. When this condition is met, the proposed measures are also applicable to other RBA models~\cite{wiefling_whats_2021}% .% As an example for practical solutions, we describe how the considerations can be applied to the \emph{IP address} feature, with regard to the IPv4 address. We chose this feature since it is both considered the most important RBA feature in terms of security to date and sensitive re-linkable data in terms of privacy (see Section~\ref{subsec:feature-sensitivity}). \subsubsection{Aggregating} The RBA model only depends on feature value frequencies% . To minimize data and limit misuse~\cite{iso_isoiec_2011}, we can aggregate or reorder feature data in the login history without affecting the results. The data set would then reveal how often a feature combination occurred, but not its chronological order. Removing this % information can % mitigate re-identification in login sequences. \subsubsection{Hashing} A cryptographic hash function, such as SHA-256, transforms a data input of arbitrary value to an output of fixed length% . As inverting a hash function is not possible in theory, attackers need to recalculate all possible hashing values to restore the input values~\cite{% llewellyn-jones_cracking_2017}. Assuming that the hashes are practically collision-free, using hashed feature values will produce the same RBA results as with the original values. This is the case, because the feature values are only transformed into a different representation% . Therefore, this could be a solution to protect feature data in terms of the outlined threats. % However, the IPv4 address has 32 bit limited input values, where some addresses have a specific semantic and purpose, and cannot be assigned to devices. Thus, % attackers can simply hash all $2^{32} -1$ values to restore the correct IP address. To counteract this problem, we can append a large random string (salt) to the input value: \begin{equation} H(192.168.1.166\ ||\ salt) = 243916...aad132 \end{equation} Attackers need to guess the salt correctly, which is high effort when the salt is large. Thus, this mitigation strategy increases the required guessing time for each feature value. Taking it a step further, we can even hash the results multiple times to increase the computation time% : \begin{equation} H(H(...H(192.168.1.166\ ||\ salt))) = [hash] \end{equation} This is similar to key derivation strategies used in password databases~\cite{moriarty_pkcs_2017}. However, we can only use a global salt for all database entries, as RBA mechanisms need to be able to identify identical feature values across users in the database. By increasing the computational cost, attackers cannot scale attacks as they would have with the unhashed feature values.% \subsubsection{Truncation} A more destructive approach to increase privacy for RBA features is to change or remove details from their data values. This can reduce the number of records with unique quasi identifiers. Since the feature data then becomes less useful for other use cases like tracking or re-identification, we consider it a measure to mitigate the privacy threats. Regarding the IP address, we could set the last bits to zero. For truncating the last eight bits, for example, this would result in: \begin{equation} Truncate(192.168.1.166, 8\ Bit) = 192.168.1.0 \end{equation} This mechanism is known from IP address anonymization strategies~\cite{chew_privacy_2019,burkhart_risk-utility_2008}. However, we can also apply it on other features, e.g., reducing timing precision or coarse-graining browser version number in the user agent string~\cite{pugliese_long-term_2020}. Since we remove information that could potentially identify an individual, e.g., the device's internet connection, this can potentially increase privacy. However, this can also influence the RBA results, as there are fewer feature values for attackers to guess. % \subsubsection{K-Anonymity} The k-anonymity privacy concept~\cite{sweeney_k-anonymity_2002} ensures that at least $k$ entries in a data set have the same quasi identifier values. If attackers obtained the data set and know a victim's IP address, they would not be able to distinguish the person from $k$ other users. This makes it an effective countermeasure against re-identification in case of data forwarding and data breaches. To achieve k-anonymity for RBA, at least $k$~users need to have the same feature value. To ensure this, we added potentially missing entries to the RBA login history after each successful login. We added these entries to random users to only affect the global login history probabilities in order to keep a high security level. We created these users just for this purpose. To retain the global data set properties, the user count increased gradually to have the same mean number of login attempts per user. \subsubsection{Login History Minimization} Another approach is to limit the login history, in terms of the amount of features and entries, for a number of entries or a constant time period~\cite{iso_isoiec_2011}. A study already showed that few entries are sufficient to achieve a high RBA protection~\cite{wiefling_whats_2021}. In so doing, we mitigate tracking users for an extended period of time. However, this can affect the RBA performance based on the usage pattern of the corresponding online service. Especially when it is a less-than-monthly-use online service, we assume that features need to be stored for a longer period than for daily use websites to achieve a comparable RBA performance. \section{Case Study Evaluation (RQ2)} \label{sec:case-study-evaluation} Aggregating and hashing, when collision-free, does not affect the RBA results, as they only change the data representation for the RBA model. The other approaches, however, potentially could. To assess their impact on RBA behavior in practice, we studied truncation and k-anonymity using real-world login data. The properties and limited size of our data set did not allow to reliably test the login history minimization approach, so we left it for future work. Nevertheless, we outlined this relevant privacy consideration for the sake of completeness. We used the IP address feature as in the other examples. \subsection{Data Set} For the evaluation, we used \censorchange{our}{a} long-term RBA data set\censorchange{}{ by Wiefling et al.}, including features of 780 users collected on a real-world online service~\cite{wiefling_whats_2021}. The online service collected the users' features after each successful login. The users signed in 9555 times in total between August 2018 to June 2020. They mostly logged in daily (44.3\%) or several times a week (39.2\%), with a mean of 12.25 times in total. To improve data quality and validity, \censorchange{we}{they} removed all users who noticed an illegitimate login in their account. The online service was an e-learning website, which students used to exercise for study courses and exams. As the users were mostly located in the same city, it is a very challenging data set for RBA. They could get similar IP addresses with higher probability. Therefore, it is important to evaluate how the RBA protection changes in such a challenging scenario. \subsubsection{Legal and Ethical Considerations} The study participants\censorchange{}{ of Wiefling et al.}~\cite{wiefling_whats_2021} signed a consent form agreeing to the data collection and use for study purposes. \censorchange{}{They also agreed to using the data in this analysis. }They were always able to view a copy of their data and delete it on request. The collected data were stored on encrypted hard drives and only the researchers had access to it. We do not have a formal IRB process at our university. Still, we made sure to minimize potential harm by complying with the ethics code of \censorchange{the German Sociological Association (DGS)}{a nationwide sociological association} and the standards of good scientific practice of \censorchange{the German Research Foundation (DFG)}{a nationwide research funding organisation\footnote{\label{footnote:orgname-omitted}Organization names omitted during blind review}}. We also made sure to comply with the GDPR. \subsubsection{Limitations} Our results are limited to the data set and the users who participated in the study. They are limited to the population of a certain region of a certain country. They are not representative for large-scale online services, but show a typical use case scenario of a daily to weekly use website. As in similar studies, we can never fully exclude that intelligent attackers targeted the website. However, multiple countermeasures minimized the possibility that the website was infiltrated~\cite{wiefling_whats_2021}. \subsection{Attacker Models} We evaluated the privacy enhancements using three RBA attacker models found in related literature~\cite{wiefling_whats_2021,freeman_who_2016}. % All attackers possess the login credentials of the target.% \textbf{Naive attackers} try to log in from a random Internet Service Providers (ISP) from somewhere in the world. We simulated these attackers by using IP addresses sourced from real-world attacks on online services~\cite{firehol_all_2020}. \textbf{VPN attackers} know the country of the victim. Therefore, we simulated these attackers with IP addresses from real-world attackers located in the victim's country~\cite{firehol_all_2020}. \textbf{Targeted attackers} know the city, browser, and device of the victim. Therefore, they choose similar feature values, including similar ISPs. We simulated these attackers with our data set, with the unique feature combinations from all users except the victim. Since the IP addresses of our data set were in close proximity to each other, our simulated attacker was aware of these circumstances and chose them in a similar way. \subsection{Methodology} In order to test our privacy enhancements in terms of practical RBA solutions, we defined a set of desired properties. Our enhancements need to: \begin{enumerate*}[label=(\Alph*)] \item \textbf{Keep the percentage of blocked attackers}: The ability to block a high number of attackers should not decrease when using the privacy enhancements. This is necessary to keep the security properties of the RBA system. \item \textbf{Retain differentiation between legitimate users and attackers}: When applied, the risk score differences between legitimate users and attackers should only change within a very small range. Otherwise, the usability and security properties of the RBA system would decrease. \end{enumerate*} We outline the tests to evaluate the privacy enhancements below. Based on the method in Wiefling et al.~\cite{wiefling_whats_2021}, we reproduced the login behavior for attackers and legitimate users by replaying the user sessions. We integrated truncation and k-anonymity in the reproduction process, to test the countermeasures. The RBA model used the IP address and user agent string as features, since this can be considered the RBA state of practice~\cite{wiefling_is_2019,wiefling_whats_2021}. We truncated the IP addresses in ranges from 0 to 24 bits, to observe the effects on the RBA performance. We assume that cutting more than 25 bits % will not allow to reliably detect attackers. We also tested k-anonymity with the IP address feature until $k=6$. As US government agencies consider less than five entries to be sensitive~\cite{federal_committee_on_statistical_methodology_report_2005}, we chose to cover this threshold. \subsubsection{Test A: Percentage of Blocked Attackers} To compare the RBA performance regarding all three attacker models, we calculated the percentage of how many attackers would be blocked. We call this percentage the \emph{true positive rate} (TPR), as previous work did~\cite{wiefling_whats_2021,freeman_who_2016}. For a fair comparison, we observed how the TPR changed when aiming to block 99.5\% of attackers. We chose this TPR baseline since it showed good performance regarding usability and security properties in a previous study~\cite{wiefling_whats_2021}. To ease comparison, we adjusted the TPR for each truncation or k-anonymity step $x_i$ as percentage differences to the baseline without modifications (relative TPR): \begin{equation} TPR_{relative_{x_i}} = \frac{TPR_{x_i} - TPR_{baseline}}{TPR_{baseline}} \end{equation} Following that, $TPR_{relative_{x_i}} < 0.0$ means that the TPR decreased compared to the baseline. \subsubsection{Test B: Risk Score Changes} To determine the degree that attackers and legitimate users can be differentiated in the RBA model, we calculated the \emph{risk score relation} (RSR)~\cite{wiefling_whats_2021}. It is the relation between the mean risk scores for attackers and legitimate users: \begin{equation} RSR_{basic} = \frac{mean\ attacker\ risk\ score}{mean\ legitimate\ risk\ score} \end{equation} To ease comparison, we normalized each RSR for every truncation or k-anonymity step $x_i$ as percentage differences to the baseline (relative RSR). The baseline is the IP address without modifications: \begin{equation} RSR_{relative_{x_i}} = \frac{RSR_{basic_{x_i}} - RSR_{baseline}}{RSR_{baseline}} \end{equation} As a result, $RSR_{relative_{x_i}} < 0.0$ signals that attackers and legitimate users can no longer be distinguished as good as they were before introducing the privacy enhancing measures. \subsubsection{Limit Extraction} For each test, we defined the following thresholds to extract limits that do not degrade RBA performance to an acceptable extent. (Test A) We require the RBA performance to remain constant. Thus, we selected the reasonable limit as the point at which the relative TPR decreases compared to the baseline, i.e., attackers cannot be blocked as good as before any more. (Test B) Unlike tracking, RBA uses the feature information in addition to an already verified identifier, e.g., passwords. Thus, we consider it feasible to reduce the RSR slightly for the sake of privacy. Based on our observations% , RSR changes below 0.01 can be tolerable for our case study evaluation. Thus, we chose the reasonable limit as the point at which the relative RSR is lower than 0.01. \subsection{Results} In the following, we present the results for all attacker models. We discuss the results after this section. We used a high performance computing cluster using more than 2000 cores for the evaluation. This was necessary since calculating the results with the simulated attackers was computationally intensive. For statistical testing, we used Kruskal-Wallis tests for the omnibus cases and Dunn's multiple comparison test with Bonferroni correction for post-hoc analysis. We considered p-values less than 0.05 to be significant. \subsubsection{Truncation} Figure~\ref{fig:relative-rsr-tpr} shows the % truncation test results for all attackers. The TPR differences between the targeted attacker and both remaining attackers were significant (Targeted/Naive: p=0.0151, Targeted/VPN: p$<$0.0001). The TPRs exceeded the limit after 20 bits for naive, 3 bits for VPN, and 14 bits for targeted attackers. \begin{figure} \centering \highlightimage{\includegraphics[width=\linewidth]{relative-rsr-tprs.pdf}} \caption{Results for truncating the IP address. Top: Relative TPR (Test A). There were significant differences between targeted and both VPN and naive attackers. Bottom: Relative RSR (Test B). The differences between VPN and both targeted and naive attackers were significant.} \label{fig:relative-rsr-tpr} \end{figure} Regarding the relative RSRs, there are significant differences between VPN and both remaining attackers (p$<$0.0001). The RSRs exceeded the limit after 3 bits for naive, 21 bits for VPN, and 3 bits for targeted attackers. Combining both results, the accepted truncation limits based on our criteria were 3 bits for all % attacker models. \subsubsection{K-Anonymity} Figure~\ref{fig:relative-rsr-tpr-k} shows the combined k-anonymity test results for the three attacker models. The relative TPR decreased after $k=1$ for targeted attackers, $k=2$ for naive attackers, and not at all for VPN attackers until at least $k=6$. There were significant TPR differences between naive and VPN attackers (p=0.0066). \begin{figure} \centering \highlightimage{\includegraphics[width=\linewidth]{relative-rsr-tprs-k.pdf}} \caption{Results for k-anonymity regarding the IP address. Top: Relative TPR (Test A). Differences between naive and VPN attackers were significant. Bottom: Relative RSR (Test B). There were no significant differences.} \label{fig:relative-rsr-tpr-k} \end{figure} The relative RSR did not decrease for all attacker types and there were no significant differences. Combining the results, the acceptable k levels based on our criteria were $k=1$ for targeted attackers, $k=2$ for naive attackers, and at least $k=6$ for VPN attackers. \section{Discussion} \label{sec:discussion} Our % results show that IP address truncation significantly affects the RBA risk score and reduces the probability of attack detection. The truncation for VPN attackers resulted in a local maximum of the RSR at 12 bits, and thus apparently improved detection. However, this was due to the fact that the VPN attacker only had an % IP address range limited to % the VPN service's server locations% . Since the first IP address bits correspond to a node's geolocation, they were mostly distinct from legitimate users residing in different areas. Thus, truncating % increased the risk scores for VPN attackers until 12 bit, as the probability for the global login history $p(FV^k)$ decreased but the one for the local history $p(FV^k | u, legit)$ remained constant. In contrast to that, targeted attackers also had a limited IP address range, but they were located in the same region as the legitimate users. Also, naive attackers had a large IP address range% . Thus, in both cases, the differences between $p(FV^k)$ and $p(FV^k | u, legit)$ remained constant to similar levels until 12 bits. Following that, and what our evaluation indicates, we do not recommend truncating more than three bits for a stable RBA performance in our case study scenario. % K-anonymity increased the distinguishability between legitimate users and attackers, i.e., the RSR. This was due to the fact that this mechanism added new entries to the global login history. As a result, the overall probability for unknown feature values in the global login history $p(FV^k)$ decreased, making it harder for attackers to achieve a low risk score. However, this also decreased the detection of attackers, i.e., the TPR, in most cases, since $k$ more users had similar feature values in the data set. As a side effect of these results, unique feature values got less unique in total. Thus, due to the determined limit of $k=1$, k-anonymity for targeted attackers can only be achieved with degraded RBA performance. The overhead produced by the additional entries increased with each $k$ (see Table~\ref{tab:k-anonymity-overhead}). It was even more than the data set itself at k\textgreater 3, which makes the current mechanism impractical for very large online services. To mitigate this issue, mechanisms could be introduced which remove some additional login entries when k-anonymity can be fulfilled after some time. \begin{table}[] \centering \caption{Overhead created by additional login entries to achieve k-anonymity} \resizebox{0.6\linewidth}{!}{% \begin{tabular}{@{}lll@{}} \toprule k & Additional Entries & Increase to Baseline \\ \midrule 1 & 0 & 0.0 \\ 2 & 3928 & 0.41 \\ 3 & 7965 & 0.83 \\ 4 & 12013 & 1.26 \\ 5 & 16065 & 1.68 \\ 6 & 20120 & 2.11 \\ \bottomrule \end{tabular}% } \label{tab:k-anonymity-overhead} \end{table} K-anonymity is not scalable with an increasing number of features~\cite{aggarwal_k-anonymity_2005}, while the other approaches are. Thus, sensible RBA privacy enhancements might be a combination of all outlined countermeasures, to ensure scalability. Based on our results, we discuss privacy challenges and further research directions in the following. \subsection{Privacy Challenges} When integrating privacy into RBA systems, there are several challenges that should be considered in practice. We describe them below. \inlineheading{Role of the IP Address Feature} Using a combination of privacy enhancements for the IP address might be sufficient for some applications. However, % this feature is still sensitive information. Thus, the question arises whether online services should consider privacy enhancing alternatives instead of storing the IP address% . One alternative could be to derive only the region and ASN from the IP address, and discard the rest. Other approaches even enable identifying network anomalies, e.g., IP spoofing using a VPN connection, without having to rely on the IP address at all. For example, the server-originated round-trip time (RTT)~\cite{wiefling_whats_2021} can be used to estimate the distance between the user's device and the server location and may replace IP addresses as RBA features. As the RTTs vary based on the server location, they become useless for most re-identification attacks using leaked databases, as server locations are distributed in practice. They can even be enriched with random noise to further enhance privacy. \inlineheading{Risk of Feature Stuffing} Such considerations can be more and more important with widespread RBA adoption in the future. We assume that when databases with RBA feature values got stolen, this might have serious consequences for other services using RBA. In contrast to passwords, behavioral RBA feature values cannot be changed after compromise. Attackers can attempt to automatically reproduce these feature values on other websites. Thus, more privacy preserving alternatives that are hard to spoof for attackers might be crucial to mitigate largely scalable ``feature stuffing'' attacks. \inlineheading{Handling Data Deletion Requests} Further conflicts could arise with data protection regulations. Users are legally permitted to request data deletion. So when they request online services to delete their RBA feature data, they might lose RBA protection on their user accounts. \subsection{Research Directions} Our case study evaluation provided first insights on truncating feature values to increase privacy. As the results showed that this is possible to a certain degree while maintaining RBA performance, further work can investigate it for other types of features, e.g., the user agent string. % The proposed k-anonymity mechanism can increase privacy regarding unique entries in the data set. However, users might still be identifiable when they have a combination of typical feature values, e.g., a home and a work IP address. This non-trivial task had been addressed in dynamic databases% ~\cite{garcia-alfaro_general_2018, xiao_m-invariance_2007}. Future work may investigate whether such mechanisms are also applicable to RBA. As we could not reliably test the login history minimization approach with our data set, future work should investigate this on a medium to large-scale online service with regular use% . \section{Related Work} \label{sec:related-work} Burkhard et al.~\cite{burkhart_risk-utility_2008} investigated truncating IP addresses in anomaly detection systems. They found that truncating more than four bits degraded the performance of these systems. Chew et al.~\cite{chew_privacy_2019} further evaluated IP truncation in intrusion detection systems. Their results showed that the detection accuracy in many of the tested classifiers decreased after removing more than 8 bits. % Our study showed that three bits could be removed from the IP address to maintain RBA performance at the same time. Both Safa et al.~\cite{cuppens-boulahia_privacy-preserving_2014}, and Blanco-Justicia and Domingo-Ferrer~\cite{blanco-justicia_efficient_2018} proposed privacy-preserving authentication models for implicit authentication using mobile devices. Their models relied on client-originated features, and the former also calculated risk scores on the client's device. However, this is not applicable to our RBA use case, as it relies on server-originated features and risk scores to prevent client-side spoofing. To the best of our knowledge, there were no studies investigating privacy enhancements in RBA systems. However, some literature touched on privacy aspects related to RBA. Bonneau et al.~\cite{bonneau_privacy_2014} discussed privacy concerns of using additional features for authentication. They found that privacy preserving techniques might mitigate these concerns, but these had not been deployed in practice. We proposed and tested some techniques for the first time in our case study. Wiefling et al.~\cite{wiefling_more_2020} investigated RBA's usability and security perceptions. The results showed that users tended to reject providing phone numbers to online services for privacy reasons. They further studied RBA characteristics on a real-world online service~\cite{wiefling_whats_2021}, showing that the feature set can be very small to achieve good RBA performance. We demonstrated that the privacy can be further enhanced through different mechanisms. \section{Conclusion} \label{sec:conclusion} With a widespread use of RBA to protect users against attacks involving stolen credentials, more and more online services will potentially store sensitive feature data of their users, like IP addresses and browser identifiers, for long periods of time. Whenever such information is forwarded or leaked, it poses a potential threat to user privacy. To mitigate such threats, the design of RBA systems must balance security and privacy. Our study results provide a first indication that RBA implementations used in current practice can be designed to become more privacy friendly. However, there are still challenges that have not been resolved in research to date. An important question is, e.g., how the IP address feature can be replaced with more privacy preserving alternatives. On the one hand, we assume that the IP address is very relevant for re-identification attacks~\cite{europol_sirius_2019}. Discarding it from the RBA login history can therefore increase privacy protection. On the other hand, the IP address is % a feature providing strong security~\cite{wiefling_whats_2021}. Future research must carefully identify and analyze such trade-offs, so that RBA's user acceptance does not drop with the first data breach. % % % % % \bibliographystyle{IEEEtranS} %
\section{Introduction} \label{sec:intro} The great availability of surveys and marketing researches help sellers to predict the interest of costumers in different products, which opens up the possibility to apply user specific pricing processes. While this helps customers in purchase decisions, it makes the pricing process even more challenging for sellers. In this context, some simple economic rules are straightforward: low prices typically attract more customers but have a small revenue per item, while high prices generate a greater revenue per item but attract less customers. As sellers aim at maintaining customers' satisfaction while achieving high revenue, the need for effective pricing strategies is increasing. We consider combinatorial markets, in which a set of indivisible items is to be distributed among a set of agents. Each agent has a valuation for each subset of items that measures how much receiving the bundle would be worth to the agent. An allocation assigns a subset of items to each agent so that every item is assigned to at most one of them. In a posted price mechanism, the seller can set the prices of the items individually, and the utility of an agent for a given bundle of items is the agent's value for the bundle minus the total price of all contained items -- the utility hence measures the agent's happiness when buying all the items of the bundle at the given prices. An allocation is considered to be envy-free if no agent would prefer to be assigned a different bundle of items. In this paper, we study resource allocation problems in a dynamic environment from two perspectives. First, we focus on how to set prices so that a market equilibrium maximizes the overall social welfare, that is, the total sum of the agents' values. Second, we consider how to set prices that the seller's profit is maximized. To the best of our knowledge, the present work is the first one extending the concept of envy-freeness to the dynamic setting. \paragraph{Previous work.} Achieving optimal social welfare through simple mechanisms has been the center of attention for a long time due to its far-reaching applications. In particular, posted price mechanisms became a key approach to allocate resources, hence finding optimal pricing schemes is a fundamental question in combinatorial markets. A pair of pricing and allocation is called a Walrasian equilibrium if all the items are assigned to someone and each agent receives a bundle that maximizes her utility -- the definition automatically implies that the corresponding allocation maximizes social welfare. The idea of Walrasian equilibria was introduced already in the late 1800s~\cite{walras1874lausanne} and the existence of such an equilibria was verified for gross substitutes valuations by Kelso and Crawford~\cite{kelso1982job}. However, it was pointed out by Cohen-Addad et al. \cite{cohen2016invisible} and independently by Hsu et al. \cite{hsu2016prices} that the existence of Walrasian allocations strongly depends on the tie breaking process, usually carried out by a central coordinator. If the agents arrive one after the other and choose an arbitrary bundle of items that maximizes their utility, then the absence of a tie-breaking rule may result in a suboptimal allocation with respect the social welfare. To overcome these difficulties, Cohen-Addad et al. \cite{cohen2016invisible} introduced the notion of dynamic prices that proved to be a powerful tool in designing markets without a central tie-breaking coordinator. In the proposed model, agents arrive in an unspecified sequential order and the item prices can be updated before the arrival of the next agent. Their main result is a polynomial time dynamic pricing scheme that achieves optimal social welfare in unit-demand markets. This work initiated the study of dynamic pricing schemes, and the existence of optimal dynamic prices was settled for three agents with multi-demand valuations by Berger, Eden and Feldman~\cite{berger2020power}, for bi-demand valuations by B\'erczi, B\'erczi-Kov\'acs and Sz\"ogi~\cite{berczi2021dual}, for two agents with certain matroid rank valuations by B\'erczi, Kakimura and Kobayashi~\cite{berczi2021market}, and recently for four agents with multi-demand valuations by Pashkovich and Xie~\cite{pashkovich2022two}. The market clearing condition can lead to Walrasian equilibrium with low revenue for the seller, even if prices are as high as possible. In the seminal work of Guruswami et al.~\cite{guruswami2005profit}, envy-free pricing was introduced as a relaxation of Walrasian equilibrium by dropping the requirement on the clearance of the market, but keeping the same fairness condition. In their model, the goal is to maximize the revenue when each agent has a demand and valuation for each bundle of items and each item has limited supply. The authors showed that maximizing the revenue is APX-hard already for unit-demand markets, and provided logarithmic approximations in the number of customers for the unit-demand and single-parameter cases. A similar hardness was proved independently by Aggarawal et al.~\cite{aggarwal2004algorithms}. Subsequently several versions of the problem have been shown to have poly-logarithmic inapproximability, see e.g. the works of Briest~\cite{briest2008uniform} and Chalmersook, Laekhanukit and Nanogkai~\cite{chalermsook2013independent}. Bansal et al. \cite{bansal2010dynamic} adapted the concept of envy-freeness to a pricing over time scheme. In their model, there is a single item with unlimited supply, and each agent is associated with a time interval over which she will consider buying a copy of the item, together with a maximum value the agent is willing to pay for it. The seller's goal is to set the prices at every time unit so as to maximize revenue from the sale of copies of the item over the time period. \paragraph{Our results.} The original motivation behind dynamic pricing schemes was to shift the tie-breaking process from the central coordinator to the customers, as in reality customers choose bundles of items without caring about social optimum. As it is shown by the above mentioned results, the dynamic setting is indeed capable of maximizing social welfare without the need for a central coordinator. On the other hand, this approach has an implication on the fairness of the final allocation that is usually not emphasized. The model assumes that the customers' sole objective is to pick a bundle of items maximizing their utility with respect to the prices available at their arrival, and they are not concerned with prices at earlier and/or later times. This means that envy-freeness is ensured only locally, and the final allocation together with the prices at which the items were bought do not necessarily form an envy-free solution over all time horizon. Our first contribution is initiating the study of dynamic pricing schemes under global fairness constraints. We extend the concept of envy-freeness to the dynamic setting in unit-demand markets, proposing four possible notions of different strength depending on whether the agents are concerned about the prices throughout entire time horizon, only in the past, only in the future, or only at their arrival. Note that the last case corresponds to the standard setting of dynamic pricing problems. We prove that, while ensuring envy-freeness for the entire time horizon basically brings the problem back to the case of static prices, the optimum social welfare can be achieved through envy-free dynamic prices in the remaining cases. When it comes to revenue maximization, the results on the poly-logarithmic inapproximability of the optimal profit call for new approaches. Based on the success of dynamic pricing schemes in social welfare maximization, a natural idea is to combine the dynamic model with revenue maximization. The work of Bansal et al.~\cite{bansal2010dynamic} proposes a setup that resembles this idea. However, their model has a single item having unlimited supply, and agents are sold the item at the minimum price during their bid interval, which results in an allocation that is, again, envy-free only locally. Our second contribution is the analysis of the revenue maximization problem in a dynamic setting where fairness is defined using one of the above mentioned four possibilities. We show that, in contrast to welfare maximization, the flexibility of dynamic prices does not help in this case, and hence most of the problems are APX-hard. Most of previous work on dynamic pricing schemes assumed that the customers arrive one after the other in an unspecified order. Apart from this standard case, we also consider two further options in all the above mentioned scenarios: when the customers arrive in a predetermined order, and when the seller has the opportunity to determine their order. \paragraph{Practical motivation.} Each notion of envy-freeness considered in his paper represents a natural concept of fairness that appears in everyday life. In certain markets, agents who arrive late do not perceive unfairness for prices that were posed earlier. In such situations, the seller tries to ensure that agents are not penalised by arriving too early. In other cases, discounting prices over time is a common strategy to guarantee clearance of the market. In such markets, agents are more inclined to accept that prices are low when the overall stock is low, and hence not to perceive an unfair pricing procedure. These are reasonable assumptions on customer behaviour and are resembled by our notion of envy-freeness when agents are concerned about prices only in the future and past, respectively. In various market scenarios customers are obliged to register their arrival and interest in certain items. These cases can be further differentiated depending on whether buyers register to free time slots or they are assigned by the seller. Accordingly, the proposed assumptions on the arrival of agents is a realistic problem that sellers are facing. \medskip The rest of the paper is organized as follows. Basic notation and definitions are given in Section~\ref{sec:preliminaries}. Social welfare maximization is considered in Section~\ref{sec:welfare}. The main results of the paper are presented in Sections~\ref{sec:ex-post_welfare} and~\ref{sec:ex-ante_welfare}, where we give polynomial-time algorithms for social welfare maximization using ex-post and ex-ante envy-free dynamic prices, respectively. Results on revenue maximization are discussed in Section~\ref{sec:revenue}. Finally, in Section~\ref{sec:conclusions} we summarize the paper and list open problems that are subject of future research. \section{Preliminaries} \label{sec:preliminaries} \paragraph{Basic notation.} We denote sets of \emph{real} and \emph{non-negative real numbers} by $\mathbb{R}$ and $\mathbb{R}_+$, respectively. For a positive integer $t$, we use $[t]$ to denote the set $\{1,\dots,t\}$. Let $\setIt$ be a ground set. For two subsets $X,Y\subseteq\setIt$, their \emph{symmetric difference} is $X\triangle Y\coloneqq (X\setminus Y)\cup(Y\setminus X)$. When $Y$ consists of a single element $y$, then the \emph{difference} $X\setminus \{y\}$ and \emph{union} $X\cup\{y\}$ are abbreviated by $X-y$ and $X+y$, respectively. For a function $f\colon \setIt\to\mathbb{R}$, the total sum of its values over $X$ is denoted by $f(X)\coloneqq \sum_{s\in X} f(s)$. For $X=\emptyset$, we define $f(\emptyset)=0$. \paragraph{Graphs.} We denote a \emph{bipartite graph} by $G =(\setIt,\setPl;E)$, where $\setIt$ and $\setPl$ are the vertex classes and $E$ is the set of edges. By \emph{edge-weights}, we mean a function $w\colon E \to \mathbb{R}_{+}$. For a subset $X\subseteq\setIt\cup\setPl$, the \emph{subgraph of $G$ induced by $X$} is the graph obtained from $G$ by deleting all the vertices not contained in $X$, together with edges incident to them. We denote an edge of the graph going between $a\in\setPl$ and $i\in\setIt$ by $ai$. By orienting the edges of a bipartite graph, we get a \emph{directed graph} $D=(\setIt,\setPl;F)$, where $F$ is the set of arcs. A directed graph is called \emph{strongly connected} if every vertex is reachable from every other vertex through a directed path. A \emph{strongly connected component} of a directed graph is a subgraph that is strongly connected and is maximal with respect this property. By contracting each strongly connected component of a directed graph to a single vertex, one obtains an acyclic directed graph. Therefore, the strongly connected components have a so-called \emph{topological ordering} in which every arc going between components goes from an earlier component to a later one. \paragraph{Market model.} A combinatorial market consists of a set $\setIt$ of \emph{indivisible items} and a set $\setPl$ of \emph{agents}. Throughout the paper, we denote by $\nIt\coloneqq|\setIt|$ and $\nPl\coloneqq|\setPl|$ the numbers of items and agents, respectively. An \emph{allocation} $\mathbf{X}$ assigns each agent $a$ a subset $X_a$ of items so that each item is assigned to at most one agent. In a \emph{unit-demand market}, each agent $\player \in \setPl$ has a valuation $v_{\player}\colon\setIt\to \mathbb{R}_+$ over individual items and she desires only a single good, that is, we consider allocations $\mathbf{X}$ with $|X_a|\leq 1$ for $a\in\setPl$ -- in such cases we denote the item obtained by agent $a$ by $x_a$. We always assume that the agents' valuations are known in advance. Furthermore, we assume that $v_a(\emptyset) = 0$ for all agents $a \in \setPl$. Given prices $p(i)$ for each item $i\in\setIt$, the \emph{utility} of agent $a$ for item $i$ is $u_a(i)\coloneqq v_a(i)-p(i)$. Then the \emph{social welfare} corresponding to the allocation is $\sum_{a\in\setPl} v_a(x_a)$, while the \emph{revenue} of the seller is $\sum_{a\in\setPl}p(x_a)$. In a \emph{static pricing scheme}, the seller sets the price $p(i)$ of each item $i\in\setIt$ in advance. Two fundamental problems in combinatorial markets are to find a pair of pricing vector $p\colon\setIt\to\mathbb{R}_+$ and allocation $\mathbf{X}$ such that the social welfare or the revenue is maximized. In contrast, in a \emph{dynamic pricing scheme} the agents arrive one after the other, and the seller can update the prices between their arrivals based on the remaining sets of items and agents. The order in which agents arrive is represented by a bijection $\sigma\colon\setPl\to[\nPl]$. The sets of agents, items and prices available before the arrival of the $t$th agent are denoted by $\setPl_t$, $\setIt_t$ and $p_t$, respectively. The utility of agent $\player$ for item $i$ at time step $t$ is then defined as $u_{\player,t}(i)\coloneqq v_{\player}(i) - p_t(i)$. The next agent always chooses an item that maximizes her utility. After the last buyer has left, the pricing scheme terminates and results in pricing vectors $\mathbf{p}=(p_1, \ldots, p_\nPl)$ and an allocation $\mathbf{X}=(x_1,\ldots, x_\nPl)$, where $p_t$ is the price vector available at the arrival of the $t$th agent and $x_t$ is the item allocated to her. Note that $x_t$ might be an empty set if the utility of the agent is non-positive for each item in $\setIt_t$. We call a dynamic pricing scheme \emph{optimal} if the final allocation maximizes the objective, that is, the social welfare or the revenue, irrespective of the order in which the agents arrived. In what follows, we define different variants of the model. Depending on whether ties between items are broken by the seller or the agents, we distinguish two cases: \begin{itemize}\itemsep0em \item[(C1)] \emph{Seller-chooses.} If there are several items maximizing the utility of the current agent, then the seller decides which one to allocate to her. \item[(C2)] \emph{Agent-chooses.} If there are several items maximizing the utility of the current agent, then she decides which one to take. \end{itemize} In terms of finding an optimal pricing, problem (C1) is easier. Indeed, given an optimal pricing for (C2), the seller can always decide to allocate the item that was chosen by the agent. Previous works generally assumed that agents arrive in an unspecified order. Besides this, we consider two further variants based on the control and information of the arrival process: \begin{itemize}\itemsep0em \item[(O1)] \emph{Unspecified.} The agents arrive in a fixed order that the seller has no information on. \item[(O2)] \emph{Predetermined.} The agents arrive in a fixed order that the seller knows in advance. \item[(O3)] \emph{Alterable.} The order of the agents is determined by the seller. \end{itemize} Our model differs from earlier ones mainly in that we are seeking for optimal pricing schemes under fairness constraints. In the static setting, a pair of pricing $p$ and allocation $\mathbf{x}$ is \emph{envy-free} if $x_a\in\argmax\{u_a(i)\mid i\in\setIt\}$ holds for each agent $a\in\setPl$. The dynamic setting naturally suggests variants in which envy-freeness is defined over a subset of time steps. Let $T_a\subseteq [\nPl]$ be a subset of time steps for each agent $a\in\setPl$. Then price vectors $\mathbf{p}=(p_1, \ldots, p_\nPl)$ and allocation $\mathbf{X}=(x_1,\ldots, x_\nPl)$ form an envy-free allocation if $x_{a} \in \argmax\{u_{a,t}(i)\mid t\in T_a, i\in \setIt_t\}$ for each agent $\player\in\setPl$. We propose four possible notions of envy-freeness of different strength depending on the time period over which agents compare themselves to others: \begin{itemize}\itemsep0em \item[(F1)] \emph{Strong envy-freeness.} Agents consider prices for the whole time horizon, that is, $T_a=\{1,\dots,\nPl\}$ for $a\in\setPl$. \item[(F2)] \emph{Ex-post envy-freeness.} Agents consider prices available after and at their arrival, that is, $T_a=\{\sigma(a),\dots,\nPl\}$ for $a\in\setPl$. \item[(F3)] \emph{Ex-ante envy-freeness.} Agents consider prices available before and at their arrival, that is, $T_a=\{1,\dots,\sigma(a)\}$ for $a\in\setPl$. \item[(F4)] \emph{Weak envy-freeness.} Agents consider prices at their arrival, that is, $T_a=\{\sigma(a)\}$ for $a\in\setPl$. \end{itemize} Using this terminology, optimal dynamic pricing schemes discussed in \cite{cohen2016invisible,berger2020power,berczi2021dual,berczi2021market,pashkovich2022two} provide weakly envy-free solutions. It is worth mentioning that, though at first sight they might seem to be symmetric, the ex-post and ex-ante cases turns out to behave quite differently. As for the \emph{objective function}, we either consider the \emph{social welfare} $W(\mathbf{X})=\sum_{a\in\setPl} v_a(x_a)$ or the \emph{revenue} of all sold items $R(\mathbf{p},\mathbf{X}) = \sum_{a\in\setPl} p_{\sigma(a)}(x_a)$. These variants and the results presented in the paper are summarized in Table~\ref{table:results}. The results are split horizontally by the type of envy-freeness considered, while the columns are indexed by the type of the ordering of the agents. Algorithmic results hold irrespective of how agents break ties, while hardness results hold even if ties are broken by the seller. It is worth noting that the $O(\log(n))$-approximation algorithm of Guruswami et al.~\cite{guruswami2005profit} extends to all of variants of envy-free pricing where the objective is to maximize the revenue. \begin{table}[t!] \scriptsize \centering \renewcommand*{\arraystretch}{1.3} \setlength{\tabcolsep}{3pt} \newcommand{\tableentrybase}[2]{\colorbox{#1}{\parbox[c][3.5em][c]{18mm}{\centering\scriptsize #2}}} \newcommand{\tableentrybasee}[2]{\colorbox{#1}{\parbox[c][1.5em][c]{18mm}{\centering\scriptsize #2}}} \newcommand{\tableentrybaseee}[2]{\colorbox{#1}{\parbox[c][3.5em][c]{19mm}{\centering\scriptsize #2}}} \newcommand{\tableentrybaseeee}[2]{\colorbox{#1}{\parbox[c][1.5em][c]{10mm}{\centering\scriptsize #2}}} \newcommand{\tableentrybaseeeee}[2]{\colorbox{#1}{\parbox[c][3.5em][c]{10mm}{\centering\scriptsize #2}}} \caption{Complexity landscape of social welfare and revenue maximization under fairness constraints in unit-demand markets. Algorithmic results (green cells) hold even in the agent-chooses setting, while hardness results (red cells) hold already for the seller-chooses case. In each row, complexities of cells with light shade are implied by cells with darker shade. \label{table:results}} \begin{tabular}{cc|ccc|ccc} & & \multicolumn{3}{c}{Welfare maximization} & \multicolumn{3}{c}{Revenue maximization}\\ & Ties & Unspecified & Predetermined & Alterable & Unspecified & Predetermined & Alterable\\ \cmidrule(lr){1-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}\cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7}\cmidrule(lr){8-8}\\[-1em] \rotatebox[origin=c]{90}{Strong} & \tableentrybaseeeee{ACMRed!0}{\tableentrybaseeee{ACMRed!0}{Agents} \linebreak \tableentrybaseeee{ACMRed!0}{Seller}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!20}{Not exists}\linebreak \tableentrybasee{ACMGreen!50}{P \linebreak \cite{walras1874lausanne,kelso1982job}}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!20}{Not exists}\linebreak \tableentrybasee{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!50}{Not exists \linebreak Rem. \ref{rem:strong_welfare}}\linebreak \tableentrybasee{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!20}{Not exists}\linebreak \tableentrybasee{ACMRed!20}{APX-hard}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!20}{Not exists}\linebreak \tableentrybasee{ACMRed!20}{APX-hard}} & \tableentrybaseee{ACMRed!0}{\tableentrybasee{ACMRed!50}{Not exists \linebreak Rem. \ref{rem:strong_welfare}}\linebreak \tableentrybasee{ACMRed!50}{APX-hard \linebreak Thm. \ref{thm:strong_revenue}}} \\ [2em] \rotatebox[origin=c]{90}{Ex-post} & & \tableentrybaseee{ACMGreen!0}{\tableentrybase{ACMGreen!50}{P \linebreak Thm.~\ref{thm:ex-post_welfare}}} & \tableentrybaseee{ACMGreen!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMGreen!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMRed!20}{APX-hard}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMRed!50}{APX-hard \linebreak Thm.~\ref{thm:ex_revenue_hard}}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!50}{P \linebreak Thm.~\ref{thm:ex-post_revenue_p}}}\\ [2em] \rotatebox[origin=c]{90}{Ex-ante} & & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!50}{P \linebreak Thm.~\ref{thm:ex-ante_welfare}}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMRed!20}{APX-hard}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMRed!50}{APX-hard \linebreak Thm.~\ref{thm:ex_revenue_hard}}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!50}{P \linebreak Thm.~\ref{thm:ex-ante_revenue_p}}}\\ [2em] \rotatebox[origin=c]{90}{Weak} & & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!50}{P \linebreak \cite[Thm. 3.1]{cohen2016invisible}}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!20}{P}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMRed!0}{Open}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!50}{P \linebreak Thm.~\ref{thm:weak_revenue}}} & \tableentrybaseee{ACMRed!0}{\tableentrybase{ACMGreen!20}{P}} \end{tabular} \end{table} \begin{rem}\label{rem:strong_welfare} In strongly envy-free pricing models, optimizing with respect to social welfare or revenue may lead to non-deterministic solutions when ties are broken by agents. In such cases, `optimality' of a pricing scheme is not well-defined. This is well-illustrated by the classic example of Cohen-Addad et al. \cite{cohen2016invisible} with three items $i_1,i_2,i_3$ and three agents $a_1,a_2,a_3$ having valuations $v_{a_j}(i_{j})=v_{a_j}(i_{j+1})=1$ $v_{a_j}(i_{j+2})=0$ for $j\in[3]$, where indices are meant in a cyclic order. Since each item has the same value for two of the agents, strong envy-freeness implies that the seller should set the prices uniformly and cannot update them. Assume that $p(i_1) = p(i_2) = p(i_3) = 1$ and that agent $j_3$ arrives first who chooses item $i_3$. If $j_1$ arrives next, she is indifferent between $i_1$ and $i_2$, but the achieved social welfare or revenue heavily depends on her decision. To overcome these difficulties, one could consider different objective function, such as worst-case or average social welfare or revenue. However, this lies beyond the scope of this paper and we postpone them as subjects of future research. \end{rem} \paragraph{Weighted coverings.} A unit-demand combinatorial market can be represented by a complete edge-weighted bipartite graph $G=(\setIt,\setPl;E)$, where vertex classes $\setIt$ and $\setPl$ correspond to the sets of items and agents, respectively. For any item $i\in\setIt$ and agent $a\in\setPl$, the weight of the edge $ai$ is $w(ia)\coloneqq v_{a}(i)$. Then there is a one-to-one correspondence between allocations maximizing social welfare and maximum weight matchings of $G$. Even more, the maximum weight of a matching is clearly an upper bound on the maximum revenue achievable through any pricing mechanism. These observations motivate to investigate dynamic pricing schemes through the lenses of maximum weight matchings. Let us denote the vertex set of $G$ by $V\coloneqq \setIt\cup\setPl$. A function $\pi\colon V \to \mathbb{R}$ is a \emph{weighted covering} if $\pi(i)+\pi(a) \geq w(ia)$ holds for every edge $ia \in E$. The \emph{total value} of the covering is $\pi(V)=\sum_{v \in V} \pi(v)$. A weighted covering of minimum total value is called \emph{optimal}. A cornerstone result of graph optimization is due to Egerváry~\cite{egervary1931matrixok} who provided a min-max characterization for the maximum weight of a matching in a bipartite graph. \begin{theorem}[Egerv{\'a}ry~\cite{egervary1931matrixok}]\label{thm:egervary} Let $G=( \setIt,\setPl ;E)$ be a bipartite graph and $w\colon E \to \mathbb{R}$ be a weight function on the set of edges. Then the maximum weight of a matching is equal to the minimum total value of a non-negative weighted covering $\pi$ of $w$. \end{theorem} Given a weighted covering $\pi$, item $i\in\setIt$ and agent $a\in\setPl$, the edge $ai$ is called \emph{tight with respect to $\pi$} if $\pi(i)+\pi(a)=w(ia)$. The \emph{subgraph of tight edges} is then denoted by $G_\pi = ( \setIt, \setPl ;E_\pi)$. We call an edge $ia\in E$ \emph{legal} if there exists a maximum weight matching containing it, and in such a case we say that $i$ is \emph{legal} for $a$. It is known that legal edges are always tight with respect to any optimal weighted covering, while the converse does not always hold, that is, a tight edge is not necessarily legal. However,~\cite[Lemma 5]{berczi2021dual} showed that a careful choice of $\pi$ ensures the sets of tight and legal edges to coincide. \begin{lemma}[Bérczi, Bérczi-Kovács and Szögi~\cite{berczi2021dual}]\label{lemma:dual2} The optimal $\pi$ attaining the minimum in Theorem~\ref{thm:egervary} can be chosen such that \begin{itemize} \item[(a)] an edge $ai$ is tight with respect to $\pi$ if and only if it is legal, and \item[(b)] $\pi(v)=0$ for some $v\in V$ if and only if there exists a maximum weight matching $M$ with $d_M = 0$. \end{itemize} Furthermore, such a $\pi$ can be determined in polynomial time. \end{lemma} Finally, we will use the following technical lemma, see~\cite[Lemma 1]{berczi2021dual}. \begin{lemma}\label{lem:all} Given a bipartite graph $G=(\setIt,\setPl;E)$ corresponding to unit-demand combinatorial market, we may assume that all items are covered by every maximum weight matching of $G$. \end{lemma} \section{Maximizing the social welfare} \label{sec:welfare} Since a Walrasian equilibrium maximizes social welfare and ensures envy-freeness at the same time, the existence of optimal dynamic pricing schemes under fairness constraints is settled when ties are broken by the seller. The seminal paper of Cohen-Addad et al.~\cite{cohen2016invisible} initiated the study of the agent-chooses case, and provided an algorithm for determining a weakly envy-free solution in unit-demand markets. A different proof of the same result was later given by Bérczi, Bérczi-Kovács and Szögi~\cite{berczi2021dual}. Their algorithm starts with a minimum weighted covering provided by Lemma~\ref{lemma:dual2} in the edge-weighted bipartite graph representing the market, and sets the initial prices according to the covering values. As a result, the first agent $a$ chooses an item $i$ such that $ai$ is tight, hence $i$ is legal for $a$. Based on this, it may seem that, keeping the same prices throughout, the resulting allocation will eventually be a maximum weight matching. However, after item $i$ is taken, an edge that was legal before might become non-legal. To overcome this, the weighted covering needs to be updated in the remaining graph at each time step, which causes the price of an item fluctuating over time. For that reason, the algorithm does not extend to the ex-post and ex-ante envy-free cases. To prevent the fluctuation of prices, we do not recompute the weighted covering at each time step from scratch. Instead, we fix a single weighted covering at the very beginning, and then we always slightly modify it to control the agents' choices in such a way that \begin{enumerate}[label=(\Alph*)]\itemsep0em \item\label{it:a} no matter which agent arrives next, if she is covered by every maximum weight matching in the current graph then she picks an item that is legal for her, otherwise she either picks an item that is legal for her or does not take an item at all, and \item\label{it:b} the price-changes from time step $t-1$ to $t$ are limited to non-increases in the ex-post and to non-decreases in the ex-ante case. \end{enumerate} The first property implies that the final allocation corresponds to a maximum weight matching of $G$, hence it maximizes social welfare. The second property ensures that the resulting allocation meets the requirements of ex-post or ex-ante envy-freeness. \subsection{Preparations} \label{sec:preparartion} Consider the edge-weighted bipartite graph $G=(\setIt,\setPl;E)$ representing the market. By Lemma~\ref{lem:all}, we may assume that all items are covered by every maximum weight matching of $G$. Take a weighted covering $\pi$ provided by Lemma~\ref{lemma:dual2}. Throughout this section, tightness of an edge is always meant with respect to $\pi$. Recall that $G_\pi$ denotes the subgraph of tight edges. At time step $t$, the sets of remaining agents and items are denoted by $\setPl_t$ and $\setIt_t$, respectively. We denote the subgraph of $G_\pi$ induced by vertices $\setIt_t\cup\setPl_t$ by $G_t=(V_t,E_t)$. For a maximum weight matching $M_t$ of $G_t$, let $x^t_a$ denote the item to which $a$ is matched in $M_t$ if such an item exists, otherwise define $x^t_a$ to be the empty set. Note that the edges $ax^t_a$ are obviously legal in $G_t$. Given such a matching $M_t$, we construct a directed graph $D_t$ as follows. We add another copy of every edge in $M_t$ to $G_t$ that we refer to as dummy edges. Then we orient the original copies in $M_t$ from $\setIt_t$ to $\setPl_t$, and orient all the remaining edges -- including the dummy ones -- from $\setPl_t$ to $\setIt_t$. We denote the strongly connected components of the resulting directed graph by $C^t_1,\dots,C^t_{q_t}$ indexed according to a topological ordering, see Figure~\ref{fig:ex} for an example. \begin{figure}[t!] \centering \begin{subfigure}[t]{0.32\textwidth} \centering \includegraphics[width=.8\linewidth]{ex-post1.pdf} \caption{$G_t$ with edge-weights and weighted covering values.} \label{fig:ex-post1} \end{subfigure}\hfill \begin{subfigure}[t]{0.32\textwidth} \centering \includegraphics[width=.8\linewidth]{ex-post2.pdf} \caption{Definition of the set $S_t$ in the proof of Theorem~\ref{thm:ex-post_revenue_p}.} \label{fig:ex-post2} \end{subfigure}\hfill \begin{subfigure}[t]{0.32\textwidth} \centering \includegraphics[width=.8\linewidth]{ex-post3.pdf} \caption{Definition of the set $S_t$ in the proof of Theorem~\ref{thm:ex-ante_revenue_p}.} \label{fig:ex-post3} \end{subfigure} \caption{Illustration of the constructions for the ex-post and ex-ante cases. Circles and squares correspond to agents and items, respectively. Thick edges denote a maximum weight matching $M_t$, while $C^t_1,\dots,C^t_5$ are the strongly connected components of the directed graph $D_t$.} \label{fig:ex} \end{figure} The following technical claims will be used later. \begin{claim}\label{cl:legal} Let $a\in\setPl_t$ and $i\in\setIt_t$ be such that they are in the same strongly connected component of $D_t$ and $ai$ is tight. Then $i$ is legal for $a$ in $G_t$. \end{claim} \begin{proof} If the edge is oriented from $i$ to $a$, then $ia\in M_t$ and the statement clearly holds. Otherwise, the edge is oriented from $a$ to $i$. Since every arc of a strongly connected digraph is contained in a directed cycle, it suffices to show that any directed cycle $C$ consists only of legal edges. This follows from the fact that all the edges of $G_t$ are tight, hence $M_t\triangle C$ is also a maximum weight matching of $G_t$, implying that it consists of legal edges. \end{proof} In both the ex-post and ex-ante cases, our proof builds on the following idea. It is not difficult to check that if one sets the price of each item to its $\pi$ value, then agents strictly prefer items to which they are connected through a tight edge over items for which the corresponding edge is not tight, see Lemma~\ref{cl:prefer}. However, as time passes, a tight edge is no longer necessarily legal. In order to prevent the next agent to choose such an edge, we will slightly change the prices in a case-specific way. To do this, let $\delta>0$ be a constant for which \[\delta<\frac{1}{2}\min\bigl\{\min\{\pi(a)+\pi(i)-v_a(i)\mid ia\in E\ \text{is not tight}\},\ \min\{\pi(i)\mid i\in \setIt\}\bigr\}.\] Note that such a $\delta$ exists by Lemmas~\ref{lemma:dual2}(b) and~\ref{lem:all}. We also choose a small constant $0<\varepsilon< \delta/(\nPl2^\nPl)$ that will be used later on. The next claim shows that tight edges lead to greater utility than non tight ones. \begin{claim}\label{cl:prefer} Let $a\in\setPl_t$ and $i,i'\in\setIt_t$ be such that $ai$ is tight, $ai'$ is not tight. If $p_t(i)\leq \pi(i)+\delta$ and $p_t(i')\geq \pi(i')-\delta$, then $a$ strictly prefers $i$ over $i'$. \end{claim} \begin{proof} Assume that $p_t(i)\leq \pi(i)+\delta$ and $p_t(i')\geq \pi(i')-\delta$. Since $ai$ is tight and $ai'$ is not tight, we have $v_a(i)=\pi(a)+\pi(i)$ and $v_a(i')+2\delta<\pi(a)+\pi(i')$ by the definition of $\delta$. Thus we get \begin{align*} u_{a,t}(i') {}&{}\leq v_a(i')-(\pi(i')-\delta)\\ {}&{}< \pi(a)-\delta\\ {}&{}= v_{a}(i)-(\pi(i)+\delta)\\ {}&{}\leq u_{a,t}(i). \end{align*} Hence the utility of $a$ for item $i$ is strictly larger than for item $i'$, concluding the proof. \end{proof} Finally, the following two technical claim follows easily from the definitions. \begin{claim}\label{cl:nottightut} Let $a\in\setPl_t$ and $i\in\setIt_t$ be such that $ai$ is not tight. If $p_t(i)\geq \pi(i)-\delta$, then $u_{a,t}(i)<\pi(a)$. \end{claim} \begin{proof} As $ai$ is not tight, the definition of $\delta$ implies $u_{a,t}(i)=v_a(i)-p_t(i)< (\pi(a)+\pi(i)-\delta)-(\pi(i)-\delta)=\pi(a)$ as stated. \end{proof} \begin{claim}\label{cl:tightut} Let $a\in\setPl_t$ and $i\in\setIt_t$ be such that $ai$ is tight. If $p_t(i)=\pi(i)+\omega$ for some real number $\omega$, then $u_{a,t}(i)=\pi(a)-\omega$. \end{claim} \begin{proof} As $ai$ is tight, we get $u_{a,t}(i)=v_a(i)-p_t(i)=(\pi(a)+\pi(i))-(\pi(i)+\omega)=\pi(a)-\omega$ as stated. \end{proof} The set of agents not matched in $M_t$ is denoted by $R_t\coloneqq\{a\in\setPl_t\mid x^t_a=\emptyset\}$. Note that $\pi(a)=0$ for each $a\in R_1$ by Lemma~\ref{lemma:dual2}(b). In fact, we will maintain this property for each set $R_t$ throughout the pricing process. From this point, we discuss the ex-post and ex-ante cases separately as their proofs differ in that prices must be set differently. \subsection{Ex-post envy-free pricing} \label{sec:ex-post_welfare} The algorithm in \cite{berczi2021dual} for the unit-demand case updates the prices at each time step using an arbitrary weighted covering in the remaining graph. In order to adapt a similar idea for the ex-post case, we do this in a controlled manner which ensures that prices do not increase over time. \begin{theorem}\label{thm:ex-post_welfare} There exists a welfare-maximizing dynamic pricing scheme for the unit-demand ex-post envy-free pricing problem even if ties are broken by the agents. Furthermore, the optimal prices can be determined in polynomial time. \end{theorem} \begin{proof} Throughout the algorithm, we maintain a maximum weight matching $M_t$ in the graph $G_t$ of remaining agents and items. Recall that $R_t$ denotes the set of agents not covered by the matching $M_t$. Initially, $\pi(a)=0$ for $a\in R_1$ by Lemma~\ref{lemma:dual2}(b), and we will maintain this property for each $a\in R_t$ throughout. We describe a general phase $t\in[\nPl]$ of the pricing process. We define the set \[S_t\coloneqq\{v\in V_t\mid \text{there exists a directed path to $v$ from an agent $a\in R_t$}\},\] see Figure~\ref{fig:ex-post2} for an example. In particular, $R_t\subseteq S_t$. Note that either $C^t_j\subseteq S_t$ or $C^t_j\cap S_t=\emptyset$ for each strongly connected component $C^t_j$ of $D_t$. The prices are then updated as follows: \begin{equation*} p_t(i)=\begin{cases} \pi(i)+\delta/2^t+j\varepsilon & \text{if $i\in C^t_j$ such that $C^t_j\subseteq S_t$},\\ \pi(i)-\delta(1-1/2^t)+j\varepsilon & \text{if $i\in C^t_j$ such that $C^t_j\cap S_t=\emptyset$}. \end{cases} \end{equation*} By the choice of $\delta$ and $\varepsilon$, the prices are non-negative. Let $a\in\setPl_t$ denote the agent who arrives at time step $t$. The next three claims together show that the prices satisfy property \ref{it:a}. \begin{claim}\label{cl:postnormal1} If $a\in V_t\setminus S_t$, or $a\in S_t\setminus R_t$ and $\pi(a)>0$, then she chooses an item that is legal for her in $G_t$. \end{claim} \begin{proof} Since $a\in V_t\setminus R_t$, the matching $M_t$ covers $a$ and hence $x_a$ is non-empty. Let $i\in\setIt_t$ be an arbitrary item distinct from $x_a$. If $ai$ is not tight, then the agent strictly prefers $x_a$ over $i$ by Claim~\ref{cl:prefer}. If $ai$ is tight but $i$ is in a different strongly connected component than $a$, then the index of the component of $i$ is strictly larger than that of $a$. Furthermore, by the definition of the set $S_t$, either both of them are in $S_t$ or $a\notin S_t$ and $i\in S_t$. These together imply that $p_t(x_a)-\pi(x_a)<p_t(i)-\pi(i)$, hence the agent strictly prefers $x_a$ over $i$ by Claim~\ref{cl:tightut}. Finally, if $ai$ is tight and $i$ is in the same strongly connected component as $a$, then $ai$ is legal by Claim~\ref{cl:legal}. The utility of $a$ is non-negative for such items by the choice of $\delta$ and the assumptions on $a$, hence the claim follows. \end{proof} \begin{claim}\label{cl:postnormal2} If $a\in S_t\setminus R_t$ and $\pi(a)=0$, then she takes no item at all and there exists a maximum weight matching in $G_t$ that does not cover $a$. \end{claim} \begin{proof} Let $i\in\setIt_t$ be an arbitrary item. If $ai$ is not tight, then the utility of $a$ for $i$ is negative by Claim~\ref{cl:nottightut}. If $ai$ is tight, then $i\in S_t$ by the definition of the set $S_t$. This implies $p_t(i)>\pi(i)$ by the definition of the prices, hence the utility of $a$ for $i$ is negative by Claim~\ref{cl:tightut}. However, in such cases there exists a directed path $P$ to $a$ from an agent $a'\in R_t$. The fact that $P$ consist of tight edges together with $\pi(a)=\pi(a')=0$ imply that $M_t\triangle P$ is also a maximum weight matching in $G_t$. \end{proof} \begin{claim}\label{cl:postnone} If $a\in R_t$, then she takes no item at all. \end{claim} \begin{proof} By assumption, we have $\pi(a)=0$. Let $i\in\setIt_t$ be an arbitrary item. If $ai$ is not tight, then the utility of $a$ for $i$ is negative by Claim~\ref{cl:nottightut}. If $ai$ is tight, then $i\in S_t$ by the definition of the set $S_t$. This implies $p_t(i)>\pi(i)$ by the definition of the prices, hence the utility of $a$ for $i$ is negative by Claim~\ref{cl:tightut}. \end{proof} The matching $M_t$, and implicitly the set $R_t$, is updated as follows. If $a\in V_t\setminus S_t$, or $a\in S_t\setminus R_t$ and $\pi(a)>0$, then $a$ takes an item $i$ from her strongly connected component. If $ai\in M_t$, then set $M_{t+1}\coloneqq M_t\setminus\{ai\}$. Otherwise, let $C$ be a directed cycle of $D_t$ containing the arc $ai$, and set $M_{t+1}\coloneqq (M_t\triangle C)\setminus\{ai\}$. In this case, we have $R_{t+1}=R_t$. If $a\in S_t$ and $\pi(a)=0$, then consider the directed path $P$ to $a$ from an agent $a'\in R_t$, and set $M_{t+1}\coloneqq (M_t\triangle P)\setminus\{ai\}$, implying $R_{t+1}=R_t\setminus\{a'\}$. Finally, if $a\in R_t$, then $M_{t+1}\coloneqq M_t$, hence $R_{t+1}=R_t$. It remains to verify that the pricing scheme satisfies property \ref{it:b}, which is done by the following statement. \begin{claim}\label{cl:decrease} The price of any item does not increase over time. \end{claim} \begin{proof} At each phase of the algorithm, the price of an item $i$ is obtained by shifting its original weighted covering value. Though the structure of the directed graph $D_t$ and therefore the index of the strongly connected component containing $i$ might change from phase to phase, the choice of $\varepsilon$ ensures that $\pi(i)+\delta/2^t>\pi(i)+\delta/2^{t+1}+n\varepsilon$ and $\pi(i)-\delta(1-1/2^t)>\pi(i)-\delta(1-1/2^{t+1})+n\varepsilon$. Hence, in order to verify the claim, it suffices to show that $S_{t+1}\subseteq S_t$. Note that $M_{t+1}$ is chosen in such a way that no arc of $D_{t+1}$ leaves the set $S_t\cap\setIt_{t+1}$. Indeed, $D_{t+1}$ is obtained from $D_t$ by possibly reorienting a directed cycle or a directed path that lies completely in $S_t$, and then deleting an agent and possibly an item. These steps do not result in a directed arc leaving $S_t\cap\setIt_{t+1}$, implying $S_{t+1}\subseteq S_t$. \end{proof} By Claims~\ref{cl:postnormal1}-\ref{cl:postnone}, if the next agent is covered by the matching $M_t$ then she either chooses an item that is legal for her, or $M_{t+1}$ is also a maximum weight matching of $G_t$. Otherwise, she does not take any of the items. This implies that the resulting allocation corresponds to a maximum weight matching of $G$ and hence maximizes social welfare. By Claim~\ref{cl:decrease}, the prices do not increase over time. This implies that the solution is ex-post envy-free, concluding the proof of the theorem. \end{proof} \subsection{Ex-ante envy-free pricing} \label{sec:ex-ante_welfare} To give an algorithm for the ex-ante case, we adopt the proof of Theorem~\ref{thm:ex-post_welfare}. However, to ensure that the final prices and allocation form an ex-ante envy-free solution, prices have to be updated differently. \begin{theorem}\label{thm:ex-ante_welfare} There exists a welfare-maximizing dynamic pricing scheme for the unit-demand ex-ante envy-free pricing problem even if ties are broken by the agents. Furthermore, the optimal prices can be determined in polynomial time. \end{theorem} \begin{proof} Similarly to the ex-post case, we maintain a maximum weight matching $M_t$ in the graph $G_t$ of remaining agents and items, and denote by $R_t$ the set of agents not covered by the matching $M_t$. Initially, $\pi(a)=0$ for $a\in R_1$ by Lemma~\ref{lemma:dual2}(b), and we will maintain this property for each $a\in R_t$ throughout. We describe a general phase $t\in[\nPl]$ of the pricing process. We define the set \[S_t\coloneqq\{v\in V_t\mid \text{there exists a directed path from $v$ to an agent $a\in\setPl_t\setminus R_t$ with $\pi(a)=0$}\},\]see Figure~\ref{fig:ex-post3} for an example. Note that either $C^t_j\subseteq S_t$ or $C^t_j\cap S_t=\emptyset$ for each strongly connected component $C^t_j$ of $D_t$. The prices are then updated as follows: \begin{equation*} p_t(i)=\begin{cases} \pi(i)-\delta/2^t+j\varepsilon & \text{if $i\in C^t_j$ such that $C^t_j\subseteq S_t$},\\ \pi(i)+\delta(1-1/2^t)+j\varepsilon & \text{if $i\in C^t_j$ such that $C^t_j\cap S_t=\emptyset$}. \end{cases} \end{equation*} By the choice of $\delta$ and $\varepsilon$, the prices are non-negative. Let $a\in\setPl_t$ denote the agent who arrives at time step $t$. The next three claims together show that the prices satisfy property \ref{it:a}. \begin{claim}\label{cl:normal} If $a\in V_t\setminus R_t$, then she chooses an item that is legal for her in $G_t$. \end{claim} \begin{proof} Since $a\in V_t\setminus R_t$, the matching $M_t$ covers $a$ and hence $x_a$ is non-empty. Let $i\in\setIt_t$ be an arbitrary item distinct from $x_a$. If $ai$ is not tight, then the agent strictly prefers $x_a$ over $i$ by Claim~\ref{cl:prefer}. If $ai$ is tight but $i$ is in a different strongly connected component than $a$, then the index of the component of $i$ is strictly larger than that of $a$. Furthermore, by the definition of the set $S_t$, either both or none of them are contained in $S_t$. These together imply that $p_t(x_a)-\pi(x_a)<p_t(i)-\pi(i)$, hence the agent strictly prefers $x_a$ over $i$ by Claim~\ref{cl:tightut}. Finally, if $ai$ is tight and $i$ is in the same strongly connected component as $a$, then $ai$ is legal by Claim~\ref{cl:legal}. The utility of $a$ is non-negative for such items by the choice of $\delta$, hence the claim follows. \end{proof} \begin{claim}\label{cl:none} If $a\in R_t\setminus S_t$, then she takes no item at all. \end{claim} \begin{proof} By assumption, we have $\pi(a)=0$. Let $i\in\setIt_t$ be an arbitrary item. If $ai$ is not tight, then the utility of $a$ for $i$ is negative by Claim~\ref{cl:nottightut}. If $ai$ is tight, then $i\notin S_t$ by the definition of the set $S_t$. This implies $p_t(i)>\pi(i)$ by the definition of the prices, hence the utility of $a$ for $i$ is negative by Claim~\ref{cl:tightut}. \end{proof} \begin{claim}\label{cl:path} If $a\in R_t\cap S_t$, then she either chooses an item that is legal for her in $G_t$, or takes no item at all. \end{claim} \begin{proof} By assumption, we have $\pi(a)=0$. Let $i\in\setIt_t$ be an arbitrary item. If $ai$ is not tight, then the utility of $a$ for $i$ is negative by Claim~\ref{cl:nottightut}. If $ai$ is tight but $i\notin S_t$, then $p_t(i)>\pi(i)$ by the definition of the prices, hence the utility of $a$ for $i$ is negative by Claim~\ref{cl:tightut}. If $ai$ is tight and $i\in S_t$, then there exists a directed path $P$ from $a$ to an agent $a'$ in $D_t$ which is covered by $M_t$ and $\pi(a')=0$. The fact that $P$ consists of tight edges together with $\pi(a)=\pi(a')=0$ imply that $M_t\triangle P$ is also a maximum weight matching in $G_t$, there fore $i$ is legal for $a$. \end{proof} The matching $M_t$, and implicitly the set $R_t$, is updated as follows. If $a\in V_t\setminus R_t$, then $a$ takes an item $i$ from her strongly connected component. If $ai\in M_t$, then set $M_{t+1}\coloneqq M_t\setminus\{ai\}$. Otherwise, let $C$ be a directed cycle of $D_t$ containing the arc $ai$, and set $M_{t+1}\coloneqq (M_t\triangle C)\setminus\{ai\}$. In this case, we have $R_{t+1}=R_t$. If $a\in R_t\setminus S_t$ or $a\in R_t\cap S_t$ but $a$ takes no item, then set $M_{t+1}\coloneqq M_t$, implying $R_{t+1}=R_t\setminus\{a\}$. Finally, if $a\in R_t\cap S_t$ and $a$ takes an item $i$, then consider the directed path $P$ from $a$ to an agent $a'$ which is covered by $M_t$ and $\pi(a')=0$, and set $M_{t+1}\coloneqq (M_t\triangle P)\setminus\{ai\}$. Since we have $R_{t+1}=R_t\setminus\{a\}\cup\{a'\}$ and $\pi(a)=0$, the property that each agent in $R_{t+1}$ has $\pi$ value $0$ holds. It remains to verify that the pricing scheme satisfies property \ref{it:b}, which is done by the following statement. \begin{claim}\label{cl:increase} The price of any item does not decrease over time. \end{claim} \begin{proof} At each phase of the algorithm, the price of an item $i$ is obtained by shifting its original weighted covering value. Though the structure of the directed graph $D_t$ and therefore the index of the strongly connected component containing $i$ might change from phase to phase, the choice of $\varepsilon$ ensures that $\pi(i)-\delta/2^t+n\varepsilon<\pi(i)-\delta/2^{t+1}$ and $\pi(i)+\delta(1-1/2^t)+n\varepsilon<\pi(i)+\delta(1-1/2^{t+1})$. Hence, in order to verify the claim, it suffices to show that $S_{t+1}\subseteq S_t$. Note that $M_{t+1}$ is chosen in such a way that no arc of $D_{t+1}$ enters the set $S_t\cap\setIt_{t+1}$. Indeed, $D_{t+1}$ is obtained from $D_t$ by possibly reorienting a directed cycle or a directed path that lies completely in $S_t$, and then deleting an agent and possibly an item. These steps do not result in a directed arc entering $S_t\cap\setIt_{t+1}$, implying $S_{t+1}\subseteq S_t$. \end{proof} By Claims~\ref{cl:normal}-\ref{cl:path}, if the next agent is covered by the matching $M_t$ then she chooses an item that is legal for her. Otherwise, she either chooses an item that is legal for her, or does not take any of the items. This implies that the resulting allocation corresponds to a maximum weight matching of $G$ and hence maximizes social welfare. By Claim~\ref{cl:increase}, the prices do not decrease over time. This implies that the solution is ex-ante envy-free, concluding the proof of the theorem. \end{proof} \section{Maximizing the revenue} \label{sec:revenue} When it comes to revenue maximization in the static setting, the problem is not only hard to solve but also to approximate within a reasonable factor, and the difficulty stems from the lack of strong upper bounds. Clearly, the maximum weight of a matching is an upper bound on the total revenue achievable through pricing mechanisms, but the gap between optimal revenue and maximum weight of a matching may be $O(\log(n))$. Indeed, consider a market with items $\setIt=\{i_1,\dots,i_\nPl\}$ and agents $\setPl=\{a_1,\dots,a_\nPl\}$. Let the valuations be defined as $v_{a_j}(i_k) \coloneqq 1/j$ for $1\leq j\leq \nPl$ and $ j\leq k\leq\nIt$ and $0$ otherwise, see Figure~\ref{fig:harm} for an illustration. Then there is a unique maximum weight matching between agents and items that consists of the edges $i_ja_j$ for $1\leq j\leq n$ with total weight $\sum_{j=1}^n 1/j$. For any pair of envy-free static pricing and allocation, if an agent $a_j$ receives an item $i_k$ at some price $p(i_k)$, then the price of all the other items must be at least $p(i_k)$ to ensure that agent $a_j$ is not envious. On the other hand, the price $p(i_k)$ cannot be greater than $1/j$ as otherwise the utility of agent $a_j$ for item $i_k$ is negative. These observations together imply that the price of each item sold is at most $1/j$ where $j$ is the largest index for which agent $a_j$ receives an item. Hence the total revenue is at most $j\cdot1/j=1$, leading to an $O(\log(n))$ gap as stated. \begin{figure}[t!] \centering \begin{subfigure}[t]{0.47\textwidth} \centering \includegraphics[width=.8\linewidth]{harmonic.pdf} \caption{The weight of an edge $a_ji_k$ is $1/j$, while missing edges have weight $0$. Thick edges correspond to the unique maximum weight matching of total weight $\sum_{j=1}^n 1/j$.} \label{fig:harmonic} \end{subfigure}\hfill \begin{subfigure}[t]{0.47\textwidth} \centering \includegraphics[width=.8\linewidth]{harmonicb.pdf} \caption{Values on items and thick edges correspond to a pair of envy-free pricing and allocation, respectively. The revenue is always less than or equal to $1$.} \label{fig:harmonicb} \end{subfigure} \caption{Illustration of $O(\log(n))$ gap between the optimal revenue and maximum weight of a matching in the case of envy-free static pricing.} \label{fig:harm} \end{figure} In what follows, we turn our attention to the revenue maximization problem in a dynamic environment with fairness constraints. \subsection{Hardness results} \label{sec:hardness} When the solution is required to be strongly envy-free, then the dynamic setting does not make a difference compared to the static one, as shown by the following theorem. \begin{theorem}\label{thm:strong_revenue} Maximizing the revenue in the unit-demand strongly envy-free dynamic pricing problem is APX-hard, even if the agents' ordering is chosen and ties are broken by the seller. \end{theorem} \begin{proof} Let $\sigma$ be an ordering of the agents, $p_1,\dots,p_\nPl$ be prices, and $\mathbf{x}$ be an allocation that maximizes the revenue. Recall that $x_a$ denotes the item received by agent $a\in\setPl$ if exists, otherwise $x_a$ is the empty set. We show that there exist static prices and an envy-free allocation resulting in the same revenue. As the reverse always holds, that is, any envy-free allocation with respect a static pricing can be seen as a strongly envy-free solution in the dynamic setting, this proves the theorem. We define a static pricing as follows: for each agent $a\in\setPl$ with $x_a\neq\emptyset$, set $p(x_a)\coloneqq p_{\sigma(a)}(x_a)$, that is, we define the price of an allocated item to be the price at which it was sold. For the remaining items, set the price to $+\infty$. We claim that the allocation $\mathbf{x}$ is envy-free with respect to the static pricing $p$, and hence has the same revenue as the dynamic solution. Indeed, this follows from the definition of strong envy-freeness, as $x_a\in\argmax\{v_{a}(i)-p_t(i)\mid t\in[\nPl],i\in\setIt\}$ and $p(x_a)=p_{\sigma(a)}(x_a)$ imply $x_a\in \argmax\{v_a(i)-p(i)\mid i\in\setIt\}$ for each $a\in\setPl$. \end{proof} Unfortunately, the problem remains hard for weaker notions of envy-freeness. Our proof follows the main idea of the proof of Guruswami et al.~\cite{guruswami2005profit} for the APX-hardness of revenue maximization. \begin{theorem}\label{thm:ex_revenue_hard} Maximizing the revenue in the unit-demand ex-post and ex-ante envy-free dynamic pricing problems are APX-hard, even if the agents' ordering is known in advance and ties are broken by the seller. \end{theorem} \begin{proof} The proof is by reduction from \textsc{Vertex Cover} in 3-regular graphs. Given a $3$-regular graph $G=(V,E)$, \textsc{Vertex Cover} asks for a minimum number of vertices that includes at least one endpoint of every edge of the graph. This problem was shown to be APX-hard in~\cite{fleischner2010maximum}. Let $G=(V,E)$ be a $3$-regular graph with $n$ vertices and $m$ edges. We construct a pricing instance with items set $\setIt$ and agent set $\setPl$ consisting of $4n$ items and $m+n$ agents, respectively. For each vertex $z\in V$, we add four vertex-items $z_1,z_2,z_3,z_4$ to $\setIt$ and one vertex-agent to $\setPl$ that, by abuse of notation, we also denote by $z$. The valuation of the agent is then defined as $v_z(z_i)=2$ for $i\in[4]$ and $0$ for any other item. Furthermore, for each edge $e =zw \in E$, we add an edge-agent $e$ to $\setPl$ with valuation $v_e(z_i)=v_e(w_i) = 1$ for $i\in[4]$ and $0$ for any other item; for an example, see Figure~\ref{fig:vertex}. We first consider the ex-post case. Assume that the ordering of the agents is such that edge-agents arrive first, followed by vertex-agents. We claim that for such an ordering, there exists an ex-post envy-free pricing scheme and allocation that results in a total revenue of $m+2n-k$ if and only if there exists a vertex cover of size $k$ in $G$. Since $m=3n/2$ and the minimum vertex cover has size at least $m/3=n/2$, a constant factor gap in the size of a vertex cover translates into a constant factor gap in the optimal profit for the pricing instance, which yields the desired APX-hardness result. To see the `if' direction, let $C\subseteq V$ be a vertex cover of $G$ of size $k$. For each vertex $z\in V$, let $p_t(z_i)\coloneqq 1$ if $z\in C$ and $p_t(z_i)\coloneqq 2$ otherwise for $i\in[4]$ and $t\in[\nPl]$ -- note that the prices do not change over time, implying that the final solution is ex-post envy-free. According to the ordering, edge-agents arrive first, and each of them takes one of the vertex-items that correspond to one of its endpoints that lies in $C$ for a price of $1$. Then vertex-agents arrive, and take a copy of the vertex-items corresponding to them for a price of $2$. Note that, since the graph is $3$-regular and four vertex-items were added for each vertex, each agent receives an item, and hence the total revenue is $m+2n-k$. To see the `only if' direction, consider dynamic prices $p_1,\dots,p_\nPl$ and an ex-post envy-free allocation $\mathbf{x}$ that maximizes the revenue for the ordering considered. It is not difficult to check that the pricing vectors can be assumed to take values $1$ and $2$ only. Let $e=zw$ be the first edge-agent, if exists, who does not get any item. That is, all the remaining vertex-items from $z_1,\dots,z_4,w_1,\dots,w_4$ are priced at $2$ upon the arrival of $e$. If we reduce the price of one of these items, say $z_i$, then we have to do the same modification for all the remaining vertex-items corresponding to $z$ and for all the remaining time steps to ensure ex-post envy-freeness from the point of view of vertex-agent $z$. This way, we lose a revenue of $1$ coming from vertex-agent $z$, but we gain this back by making a profit of $1$ from edge-agent $e$. By this observation, we may assume that for each vertex $z\in V$ and time step $t\in[\nPl+\nIt]$, either $p_t(z_i)=1$ for $i\in[4]$ or $p_t(z_i)=2$ for $i\in[4]$, and that vertices belonging to the former class form a vertex cover of $G$. This implies that the revenue is at most $m+2n-k$. If the ordering of the agents is such that vertex-agents arrive first, followed by edge-agents, then a similar argument shows the hardness of the ex-ante case. \end{proof} \begin{figure}[t!] \centering \includegraphics[width=.8\linewidth]{vertexb.pdf} \caption{A $3$-regular graph $G$ with $n=4$ and $m=6$, where grey vertices form a minimum vertex-cover of size $k=3$. In the corresponding pricing instance, edges incident to vertex-agents and edge-agents have weights $2$ and $1$, respectively. When edge-agents arrive first, then setting the prices to $1$ on grey elements, $2$ otherwise, and allocating the items according to thick edges results in an ex-post envy-free solution with revenue $11=m+2n-k$.} \label{fig:vertex} \end{figure} \subsection{Algorithms} \label{sec:algorithms} In the previous section, we showed that if the seller has no control over the order in which agents arrive, then even the seemingly more flexible framework of dynamic pricing is not enough for maximizing the revenue in the ex-post and ex-ante envy-free settings. On the positive side, if the ordering can be chosen by the seller, then an optimal pricing scheme can be determined efficiently. In what follows, we give polynomial-time algorithms for determining an ordering of the agents together with the price vectors so that the final allocation is ex-post or ex-ante envy-free and maximizes the revenue irrespective of how ties are broken by the agents. In both cases, we compare the solution to the maximum weight of a matching in the corresponding edge-weighted bipartite graph, which is clearly an upper bound for the revenue. Note that, in the agent-chooses case, an agent can decide not to take an item with utility $0$ for her. For keeping the description of the algorithms simple, we assume that in such cases the agent decides to take the item. In the general case then one an decrease the prices of the items in each step by a small $\varepsilon>0$, thus obtaining a revenue arbitrarily close to the maximum weight of a matching. First we consider the ex-post case. \begin{theorem}\label{thm:ex-post_revenue_p} If the ordering of the agents can be chosen by the seller, then there exists a revenue-maximizing dynamic pricing scheme for the unit-demand ex-post envy-free pricing problem even if ties are broken by the agents. Furthermore, the optimal ordering and prices can be determined in polynomial time. \end{theorem} \begin{proof} Consider the edge-weighted bipartite graph $G=(\setIt,\setPl;E)$ representing the market, where the weight of an edge $ai$ is $v_a(i)$ for $i\in\setIt$, $a\in\setPl$. By Lemma~\ref{lem:all}, we may assume that all the items are covered by every maximum weight matching of $G$. Let $M\subseteq E$ be an arbitrary maximum weight matching, and for each agent $a$, let $x_a$ denote the item to which $a$ is matched in $M$ if such an item exists, otherwise define $x_a$ to be the empty set. Furthermore, take a weighted covering $\pi$ provided by Lemma~\ref{lemma:dual2}. Note that $M$ consists of tight edges. We define the ordering $\sigma$ of the agents as follows: agents not covered by $M$ arrive first, and then the remaining agents arrive in a decreasing order according to their $\pi$ value, where ties are broken arbitrarily. Now we describe how to set the prices at each time step. Define the prices to be $+\infty$ until all the agents not covered by $M$ have left. Then, at each time step, consider the next agent $a$ and set the price of all remaining items to $+\infty$ except for $x_a$, for which we set the price to $v_a(x_a)$. Clearly, the agent will take the item $x_a$, hence the resulting allocation corresponds to $M$ and has total revenue equal to the maximum weight of a matching. It remains to verify that the pricing and the allocation thus obtained provide an ex-post envy-free solution. To see this, consider the arrival of an agent $a\in\setPl$. As all the remaining items has been priced at $+\infty$ so far except for $x_a$ which is priced at $v_a(x_a)$, it is enough to show that $a$ does not envy an item that was taken before her arrival. Those items were also priced at $+\infty$ except for the time step when they were taken by the corresponding agent. So let $a'$ be an agent who arrived before $a$ and took the item $x_{a'}$, that is, $x_{a'}\neq\emptyset$. Since $\pi$ is a weighted covering, $M$ consists of tight edges, and $\pi(a')\geq \pi(a)$, we get \begin{align*} u_{a,\sigma(a')}(x_{a'}) {}&{}= v_{a}(x_{a'})-p_{\sigma(a')}(x_{a'})\\ {}&{}= v_{a}(x_{a'})-v_{a'}(x_{a'})\\ {}&{}\leq (\pi(a)+\pi(x_{a'}))-(\pi(a')+\pi(x_{a'}))\\ {}&{}= \pi(a)-\pi(a')\\ {}&{}\leq 0\\ {}&{}= v_a(x_a)-v_a(x_a)\\ {}&{}= u_{a,\sigma(a)}(x_a), \end{align*} which means that agent $a$ does not envy the item $x_{a'}$. \end{proof} A similar proof works for the ex-ante setting as well. However, the proof is is slightly more complicated as maintaining ex-ante envy-freeness requires a careful choice of prices. As a result, the revenue of the final allocation is not exactly the maximum weight of a matching in the associated bipartite graph, but can be arbitrarily close to that. For simplicity, we still refer to such a pricing as `optimal' in the statement of the theorem. \begin{theorem}\label{thm:ex-ante_revenue_p} If the ordering of the agents can be chosen by the seller, then there exists a revenue-maximizing dynamic pricing scheme for the unit-demand ex-ante envy-free pricing problem even if ties are broken by the agents. Furthermore, the optimal ordering and prices can be determined in polynomial time. \end{theorem} \begin{proof} Consider the edge-weighted bipartite graph $G=(\setIt,\setPl;E)$, a maximum weight matching $M$, $x_a$ for $a\in\setPl$, and weighted covering $\pi$ as in the proof of Theorem~\ref{thm:ex-post_revenue_p}. Let $0<\delta<\min\bigl\{\min\{\pi(a)+\pi(i)-v_a(i)\mid ia\in E\ \text{is not tight}\},\ \min\{\pi(i)\mid i\in \setIt\}\bigr\}$. Note that, by Lemma~\ref{lemma:dual2} and the assumption that each item is covered by every maximum weight matching of $G$, such a $\delta$ exists. Furthermore, let $0<\varepsilon< \delta/2^\nPl$. We define the ordering $\sigma$ of the agents as follows: agents covered by $M$ arrive first in an increasing order according to their $\pi$ values where ties are broken arbitrarily, followed by the remaining agents. Now we describe how to set the prices at each time step. If an agent $a$ arrives for which $x_a\neq\emptyset$, then for each item $i\in\setIt$ set its price to $\pi(a)+\pi(i)-\delta/2^{\sigma(a)}+\varepsilon$ except for $x_a$, for which we set the price to $\pi(a)+\pi(x_a)-\delta/2^{\sigma(a)}$. If $x_a=\emptyset$, then define the prices to be $+\infty$. By the definition of the ordering and the values $\delta$ and $\varepsilon$, the prices remain non-negative and do not decrease over time, hence the resulting allocation is automatically ex-ante envy-free. It suffices to show that each agent $a$ chooses $x_a$ upon arrival. Indeed, if this holds, then that results in a profit of $\pi(a)+\pi(x_a)-\delta/2^{\sigma(a)}\geq v_a(x_a)-\delta$, where we used the fact that the edge $x_aa$ is tight by Lemma~\ref{lemma:dual2}(a). By choosing $\delta$ small enough, the total revenue of the final allocation can be arbitrarily close to the weight of $M$. Consider any remaining item $i$ distinct from $x_a$. As $\pi$ is a weighted covering and $x_aa$ is tight, we get \begin{align*} u_{a,\sigma(a)}(i) {}&{}= v_{a}(i)-p_{\sigma(a)}(i)\\ {}&{}= v_{a}(i)-(\pi(a)+\pi(i)-\delta/2^{\sigma(a)}+\varepsilon)\\ {}&{}< \delta/2^{\sigma(a)}\\ {}&{}= v_a(x_a)-(\pi(a)+\pi(x_a)-\delta/2^{\sigma(a)})\\ {}&{}= u_{a,\sigma(a)}(x_a). \end{align*} This means that $x_a$ is the unique maximizer of the utility of $a$ at time step $\sigma(a)$ and has positive utility for $a$, hence agent $a$ takes $x_a$ as stated. \end{proof} Finally, we settle the existence of weakly envy-free solutions when the ordering of the agents is fixed but known in advance. \begin{theorem}\label{thm:weak_revenue} If the ordering of the agents is known in advance, then there exists a revenue-maximizing dynamic pricing scheme for the unit-demand weakly envy-free pricing problem even if ties are broken by the agents. Furthermore, the optimal prices can be determined in polynomial time. \end{theorem} \begin{proof} Let $\sigma$ denote the fixed ordering of the agents. Define an edge-weighted bipartite graph $G=(\setIt,\setPl;E)$, maximum weight matching $M\subseteq E$, and $x_a$ for $a\in\setPl$ as in the proof of Theorem~\ref{thm:ex-post_revenue_p}. At the arrival of agent $a$, set the price of all remaining items to $+\infty$ except for $x_a$, for which we set the price to $v_a(x_a)$. The agent clearly takes $x_a$ at the maximum possible price, hence the resulting allocation and pricing are optimal. \end{proof} \section{Conclusions} \label{sec:conclusions} In this paper, we studied the existence of optimal dynamic prices under fairness constraints in unit-demand markets. We proposed four possible notions of envy-freeness depending on the time period over which agents compare themselves to others, and settled the existence of optimal dynamic prices in various settings. We close the paper with mentioning a few open problems. While we concentrated on social welfare and revenue maximization problems, a natural question is to consider alternative objective functions such as the average or the max-min social welfare and revenue. Besides being interesting on their own, such functions may be used to overcome the difficulties mentioned in Remark~\ref{rem:strong_welfare}. A recently line of research investigated the problem of balancing fairness and efficiency in markets, see e.g.~\cite{garg2021approximating}. It would be interesting to see how dynamic envy-free pricing behaves under such objective functions. Finally, the complexity of weak envy-free revenue maximization with unspecified order remains open. This variant is of special interest, since it naturally connects revenue maximization with the recent popular strain of research on dynamic pricing schemes. \paragraph{Acknowledgement.} The work was supported by DAAD with funds of the Bundesministerium f{\"u}r Bildung und Forschung (BMBF), the Lend\"ulet Programme of the Hungarian Academy of Sciences -- grant number LP2021-1/2021 and by the Hungarian National Research, Development and Innovation Office -- NKFIH, grant number FK128673. \bibliographystyle{abbrv}
\section{Introduction} In this work, we consider the $\boldsymbol{H}(\mathrm{curl})$-elliptic problems as follows: find the electric or magnetic field $\boldsymbol{u}$ satisfy \begin{eqnarray} \label{Equ:1.1} \boldsymbol{curl}(\alpha \mathrm{curl}~\boldsymbol{u}) + \beta\boldsymbol{u}=\boldsymbol{f}, &&\ \mbox{in}\ \Omega,\\ \label{Equ:1.2} \boldsymbol{u}\cdot\boldsymbol{t} =0, && \mbox{on}\ \partial \Omega, \end{eqnarray} where $\Omega\subset \mathbb{R}^2$ be a simply connected bounded Lipschitz polygon with boundary $\partial\Omega$ and is partitioned into non-overlapping subdomains $\Omega_i$, $1\leq i \leq m$, $\boldsymbol{f}$ is a given vector field depending on a given external source field, $\boldsymbol{t}$ is the unit tangent on $\partial\Omega$ oriented counter-clockwisely, $\alpha\geq\alpha_0>0$ and $\beta\geq\beta_0>0$ are piecewise constants in $\Omega_i$, $\alpha_0$ and $\beta_0$ are constans. We recall that, $\mathrm{curl}\ \boldsymbol{v}={\partial v_2}/{\partial x}-{\partial v_1}/{\partial y}$ for a vector field $\boldsymbol{v}=(v_1, v_2)$, while $\boldsymbol{curl}\ \phi =({\partial \phi}/{\partial y}, -{\partial \phi}/{\partial x})$ for a scalar function $\phi$. Our numerical scheme and the a posteriori error analysis are based on a mixed formulation of \eqref{Equ:1.1}-\eqref{Equ:1.2}, which is obtained by introducing an auxiliary variable $p = \mathrm{curl}~\boldsymbol{u}$ \begin{eqnarray} \label{Eqn:hhcurl} \boldsymbol{curl}~(\alpha p) + \beta\boldsymbol{u} = \boldsymbol{f},&& \mbox{in}\ \Omega, \\ \label{Eqn:hq} p - \mathrm{curl}~\boldsymbol{u} = 0, && \mbox{in}\ \Omega, \\ \label{Eqn:hboundary} \boldsymbol{u} \cdot \boldsymbol{t} = 0,&& \mbox{on}\ \partial\Omega. \end{eqnarray} Discontinuous Galerkin (DG) finite element method is one of popular methods for numerical solution of partial differential equations. Compared with the traditional conforming finite element method, the DG finite element method has advantages as follows: to allow incompatible with suspension point grid, to deal with complex boundary and interface problems easily, and to implement partial encryption and each unit of polynomial independent selection easily. One of the key features of the DG method is that the discontinuous approximation at element interfaces naturally allows jump discontinuities in the solution if element boundaries are placed along them \cite{KoprivaGassner21:1}. DG method has been developed to solve many equations, such as elliptic problems \cite{BrezziManzini00:365}, parabolic equations \cite{Riviere08Book}, advection-diffusion-reaction problems \cite{HoustonSchwab02:2133}. The DG methods include locally DG(LDG) method \cite{Castillo02:524}, interior penalty DG(IPDG) method \cite{Arnold82:742}. The discontinuous finite element method for $\boldsymbol{H}(\mathrm{curl})-$elliptic problems is still in its infancy. Chung and Kim \cite{ChungKim14:1} proposed an improved Feti-DP algorithm and convergence analysis for the mixed interleaved discontinuous finite element method for the two-dimensional $\boldsymbol{H}(\mathrm{curl})-$elliptic problems. On the other hand, in practical engineering applications and scientific calculations, there are many factors that may cause strong singularities in the propagation of electromagnetic fields. For example, the material coefficient of the medium in the electromagnetic wave propagation area is discontinuous, or the source term of the generated electromagnetic field is not smooth \cite{CostabelDauge00:221,CostabelDauge03:807}. Although these singularities can be overcomed by uniformly densifying the grid when performing numerical solutions, consistent densification can lead to a sharp increase in computational cost. Hence, adaptive finite element emerges as the times require. In the past few decades, adaptive finite element method have been proven to be a useful and effective tool in scientific computing. The standard adaptative process is as follows $ \text { SOLVE } \rightarrow \text { ESTIMATE } \rightarrow \text { MARK } \rightarrow \text { REFINE. } $ The adaptive finite element method is based on a posteriori error estimation. It automatically refines and optimizes mesh generation according to the local posteriori error indicator on the element. It is a numerical calculation method with high reliability and efficiency. Most of the work on the convergence of the adaptive method for the $\boldsymbol{H}(\mathrm{curl})$-elliptic equations focuses on the edge finite element. For example, using the so-called interior node property and oscillation marker as technical assumptions, the convergence of the lowest order edge elements of the N\'{e}d\'{e}lec's first family of adaptive for two-dimensional and three-dimensional eddy current equations are proved in [4,14 , respectively. Chen, Xu and Zou \cite{ChenJQXuYF09:2950} proved that an adaptive method for three dimensional static Maxwell equations without additional marking of oscillation terms and gives corresponding proof of convergence with the lowest order edge elements of N\'{e}d\'{e}lec's first family. Zhong, Shu, Chen and Xu \cite{Zhong10AEFEM} proved that the three-dimensional $\boldsymbol{H}(\mathrm{curl})$-elliptic problem with variable coefficients is convergent by using high order and the two family of N\'{e}d\'{e}lec edge elements. There are also some studies on the posteriori error estimator of the adaptive DG finite element method for $\boldsymbol{H}(\mathrm{curl})$-elliptic problem \cite{HoustonPerugia07:122,Xingzhong12:18Eng}. Houston, Perugia and Schotzau \cite{HoustonPerugia07:122} gave the residual-type posteriori error estimator and proved the reliability and efficiency of the error estimator. Xing and Zhong \cite{Xingzhong12:18Eng} gave a simplified posteriori error indicator and proved corresponding upper bound. Recently, Zhong, Chen and Xing \cite{ZhongLQChengTEng16:92} proved the convergence of the adaptive interior penalty DG methods. Meanwhile, there are many successful works of solving the Maxwell's equations by the mixed finite element method, e.g. [18,19,21,15]. However, For adaptive mixed finite element method solving Maxwell's equations, there are only few research results for a posterior error estimator. For example, Carstensen, Hoppe, Sharma and Warburton \cite{CarstensenHoppepe11:13} studied a posteriori error estimation of the hybridized finite element method and proved the reliability of the estimator up to a consistency error. Chung, Yuen and Zhong \cite{ChungYuen14:613} studied a posteriori error estimation of the staggered discontinuous Galerkin method for time-harmonic Maxwell's equations and proved that residual based a posteriori error indicator is both reliable and efficient. As far as we know, there are not any published literatures on the posteriori error estimation of the adaptive mixed finite element method for $\boldsymbol{H}(\mathrm{curl})-$elliptic problems \eqref{Equ:1.1}-\eqref{Equ:1.2}. The main idea of the manuscript comes from \cite{ChungYuen14:613}. However, one of main tool, a Cl\'{e}ment-type quasi-interpolation operator given by \cite{Schoberl08:633}, can not be used for 2D finite element space. Here, we use the Helmholtz decomposition and operators in articles \cite{ScottZhang90:483,CarstensenHoppe05:19} for estimation. Here is some notation used throughout the paper. The following shorthand notation will be used to avoid the repeated constants, following \cite{XuJC92:581}, $x\lesssim y$ and $x\approx y$ means $x \leq C_1y$ and $C_2x\leq y\leq C_3x$, where $C_1$, $C_2$ and $C_3$ are generic positive constants. The rest of the article is organized as follows. In Section \ref{sec:2}, we introduce some basic notations, present the variational form of the model problem \eqref{Equ:1.1}-\eqref{Equ:1.2}, and design a residual type a posteriori error estimator. In Section \ref{sec:4} and Section \ref{sec:5}, we show that this indicator is reliable and effective, respectively. In Section \ref{sec:6}, we report some numerical results in support of theoretical results. \section{Mixed IPDG method and a posteriori error indicator}\label{sec:2} In this section, we give the continuous variational problem, the discrete variational problem of mixed IPDG method, and the definition of the a posteriori error indicator. \subsection{Continuous variational problem} For any domain $D \subset \mathbb{R}^{2}$, we use standard definitions for the Sobolev spaces $H^{s}(D)$ and $\boldsymbol{H}^{s}(D)$ of scalar and vector-valued square integrable functions with inner products $(\cdot,\cdot)_{s,D}$ and associated norms $\|\cdot\|_{s, D}$ for $s \geq 0$, respectively. We refer to $L^{2}(D)$ and $\mathbf{L}^{2}(D)$ as the Hilbert spaces of scalar and vector-valued square integrable functions with inner products $(\cdot, \cdot)_{0, D}$ and associated norms $\|\cdot\|_{0, D}$, respectively. For simplicity, we drop the subscript when $G = D$. Then, the spaces are defined by \begin{eqnarray*} &\boldsymbol{H}(\mathrm{curl}, \Omega):=\left\{\boldsymbol{v}: \boldsymbol{v} \in\boldsymbol{L}^{2}(\Omega), \mathrm{curl}~ \boldsymbol{v} \in L^{2}(\Omega)\right\},\\ & \boldsymbol{H}_0(\mathrm{curl}, \Omega) := \left\{\boldsymbol{v}: \boldsymbol{v} \in\boldsymbol{H}(\mathrm{curl},\Omega), \boldsymbol{v}\cdot\boldsymbol{t} = 0~on~\partial\Omega \right\}. \end{eqnarray*} The space $\boldsymbol{H}(\mathrm{curl},\Omega)$ is equipped with norm $\|\boldsymbol{v}\|^2_{\mathrm{curl},\Omega} := \|\boldsymbol{v}\|^2_{0,\Omega} + \|\mathrm{curl}~\boldsymbol{v}\|^2_{0,\Omega}$ for any $\boldsymbol{v}\in \boldsymbol{H}(\mathrm{curl},\Omega)$. We simplify the symbols $\boldsymbol{H}_0(\mathrm{curl},\Omega)$ and $L^2(\Omega)$ to $\boldsymbol{U}$ and $\mathbb{Q}$, respectively. In this manuscript, we assume that $\boldsymbol{f}\in\boldsymbol{H}(\operatorname{div}, \Omega)=\{\boldsymbol{v}: \boldsymbol{v} \in \boldsymbol{L}^{2}(\Omega), \nabla \cdot \boldsymbol{v} \in L^{2}(\Omega)\}$. The variational form for \eqref{Eqn:hhcurl}-\eqref{Eqn:hboundary} is to find $(\boldsymbol{u},p)\in \boldsymbol{U}\times\mathbb{Q}$ such that \begin{eqnarray} &&a({p}, {q})-b(\boldsymbol{u}, {q})=\ell_{1}({q}), ~~\forall {q} \in \mathbb{Q},\label{Eqn:weak_1} \\ &&d(\boldsymbol{v}, {p})+c(\boldsymbol{u}, \boldsymbol{v})=\ell_{2}(\boldsymbol{v}),~ \forall \boldsymbol{v} \in \boldsymbol{U},\label{Eqn:weak_2} \end{eqnarray} where the four bilinear forms given by \begin{eqnarray} &&a({p}, {q}):=({p}, {q}), \label{Eqn:a}\\ &&b(\boldsymbol{u}, {q}):=(\mathrm{curl}~ \boldsymbol{u}, {q}), \label{Eqn:b}\\ &&c(\boldsymbol{u}, \boldsymbol{v}):=(\beta\boldsymbol{u}, \boldsymbol{v}), \label{Eqn:c}\\ &&d(\boldsymbol{v}, {p}) := (\mathrm{curl}~\boldsymbol{v}, \alpha{p}),\label{Eqn:d} \end{eqnarray} and two linear functionals $\ell_{1}(\cdot) \in \mathbb{Q}^{*}$, $\ell_{2}(\cdot) \in \boldsymbol{U}^{*}$, where $\mathbb{Q}^{*}$ and $\boldsymbol{U}^{*}$ are the dual spaces of $\mathbb{Q}$ and $\boldsymbol{U}$, respectively, as follows \begin{eqnarray} &&\ell_{1}({q}):=0, \label{Eqn:l_1}\\ &&\ell_{2}(\boldsymbol{v}):=(\boldsymbol{f}, \boldsymbol{v}).\label{Eqn:l_2} \end{eqnarray} In order to prove the well-posedness of continuous variational problem \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and the reliability of a posteriori error indicator(see Lemma \ref{Lem:leqell_1ell_2}). We also define the operator $\mathcal{A}:(\boldsymbol{U}\times\mathbb{Q} ) \mapsto(\boldsymbol{U}\times\mathbb{Q} )^{*}$ by $$ (\mathcal{A}( \boldsymbol{u},p))(\boldsymbol{v},q):=a(p, q)-b(\boldsymbol{u}, q)+d(\boldsymbol{v}, p)+c(\boldsymbol{u}, \boldsymbol{v}), \ \ \text {for all } \boldsymbol{u}, \boldsymbol{v} \in \boldsymbol{U}, p, q \in \mathbb{Q}. $$ Thus, the operator form of the equations \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} is obtained \begin{equation}\label{Eqn:Al} (\mathcal{A}(\boldsymbol{u},{p}))(\boldsymbol{v},{q} )=\ell(\boldsymbol{v},{q}), \end{equation} where $\ell(\boldsymbol{v},{q})=\ell_{2}(\boldsymbol{v})+\ell_{1}({q})$. The following lemma provides the existence and uniqueness of solutions to the variational problem \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2}. \begin{lemma}[\cite{ChungYuen14:613}, Lemma 2.1]\label{WVP} Let $\Omega$ be a bounded Lipschitz polygon with connected boundary $\partial\Omega$. Then $\mathcal{A}$ is a continuous and bijective linear operator. Moreover, for any $\left(\ell_{1}, \ell_{2}\right) \in \mathbb{Q}^{*} \times \boldsymbol{U}^{*}$ given by \eqref{Eqn:dweak_1} and \eqref{Eqn:dweak_2}, respectively, then the system \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} has a unique solution $(\boldsymbol{u},{p}) \in \boldsymbol{U}\times\mathbb{Q}$ such that \begin{equation} \|(\boldsymbol{u}, {p})\|_{\boldsymbol{U} \times \mathbb{Q}}:=\left(\|\boldsymbol{u}\|_{ {\boldsymbol{U}}}^{2}+\|{p}\|_{\mathbb{Q}}^{2}\right)^{1 / 2} \lesssim \|\ell_{1}\|_{\mathbb{Q}^{*}} + \|\ell_{2}\|_{\boldsymbol{U}^{*}}\label{Eqn:up}, \end{equation} where $\|\cdot\|_{\mathbb{Q}^*}$ and $\|\cdot\|_{\boldsymbol{U}^*}$ are dual norms in $\mathbb{Q}^*$ and $\boldsymbol{U}^*$, respectively. \end{lemma} \subsection{Discrete variational problem} Before presenting the discrete variational problem, we introduce some preliminaries. Given a shape-regular triangulation $\mathcal{T}_h$ for $\Omega$. For $\tau\in\mathcal{T}_h$, we write $h_{\tau} = |\tau|^{1/2} $ to denote the local mesh size of the element $\tau$, where $|\tau|$ is the Lebesgue measure of $\tau$. Let $h=\max_{\tau\in\mathcal{T}_h} h_{\tau}$. Let $\mathcal{E}_h$ be the set of all the edges, $\mathcal{E}_h^0=\mathcal{E}_h\backslash \partial \Omega$ be the set of all the interior edges, and $\mathcal{E}_h^{\partial}=\mathcal{E}_h\cap \partial \Omega$ be the set of all the boundary edges, then $\mathcal{E}_h=\mathcal{E}_h^0\bigcup\mathcal{E}_h^{\partial}$. For $\mathcal{T}^{\prime}_h\subseteq \mathcal{T}_h$ and $\mathcal{E}_h^{\prime}\subseteq \mathcal{E}_h$,the discrete $L^2$ inner product and norm are given by \begin{eqnarray*} & \displaystyle (\boldsymbol{v}, \boldsymbol{w})_{\mathcal{T}^{\prime}_h} =\sum\limits_{\tau \in \mathcal{T}^{\prime}_h}(\boldsymbol{v}, \boldsymbol{w})_{\tau} =\sum\limits_{\tau\in \mathcal{T}^{\prime}_h} \int_{\tau} \boldsymbol{v}\cdot \boldsymbol{w} \mathrm{d} x, \quad\|\boldsymbol{v}\|_{\mathcal{T}^{\prime}_h}^{2} =(\boldsymbol{v}, \boldsymbol{v})_{\mathcal{T}^{\prime}_h}, \\ & \displaystyle \langle \boldsymbol{v}, \boldsymbol{w} \rangle_{\mathcal{E}_h^{\prime}} =\sum\limits_{e \in \mathcal{E}_h^{\prime}} \langle \boldsymbol{v}, \boldsymbol{w} \rangle_{e} =\sum\limits_{e \in \mathcal{E}_h^{\prime}} \int_{e} \boldsymbol{v}\cdot \boldsymbol{w}\mathrm{d} s, \quad \|\boldsymbol{v}\|_{\mathcal{E}_h^{\prime}}^{2} =\langle \boldsymbol{v}, \boldsymbol{v} \rangle_{\mathcal{E}_h^{\prime}}. \end{eqnarray*} For any $e\in\mathcal{E}_h^{0}$ with $e = \partial\tau_1\cap\partial\tau_2$, we define the average, tangential jump and normal jump for a vector function $\boldsymbol{w}$ by \begin{eqnarray*} & \{\{\boldsymbol{w}\}\}_e = (\boldsymbol{w}|_{\tau_1} + \boldsymbol{w}|_{\tau_2})/{2}, \\ & [[ \boldsymbol{w}]]_e= \boldsymbol{w}|_{\tau_1}\cdot\boldsymbol{t}_1 + \boldsymbol{w}|_{\tau_2}\cdot\boldsymbol{t}_2, \\ &\ [\boldsymbol{w}]_e = \boldsymbol{w}|_{\tau_1}\cdot \boldsymbol{n}_1 + \boldsymbol{w}|_{\tau_2}\cdot \boldsymbol{n}_2, \end{eqnarray*} where $\boldsymbol{w}|_{\tau_i}$ denotes the value of $\boldsymbol{w}$ on $\tau_i$, $\boldsymbol{t}_i$ and $\boldsymbol{n}_i$ are the unit tangential vectors and the outward unit normal vectors on $e$ for $\tau_i$ ($i=1,2$), respectively. Similarly, we define the average and the tangential jump on $e$ for a scalar function $\phi$ as \begin{equation*} \{\{\phi\}\}_{e}=(\left.\phi\right|_{\tau_{1}}+\left.\phi\right|_{\tau_{2}}) / 2, ~[[\phi]]_{e}=\left.\phi\right|_{\tau_{1}} \boldsymbol{t}_{1}+\left.\phi\right|_{\tau_{2}} \boldsymbol{t}_{2}, \end{equation*} where $\phi|_{\tau_i}$ denotes the value of $\phi$ on $\tau_i$, $i=1,2$. For any $e\in\mathcal{E}_h^{\partial}$, there is a element $\tau\in\mathcal{T}_h$ such that $e\in\partial\tau \cap\partial\Omega$, we define the average, tangential jump and normal jump for a vector function $\boldsymbol{w}$ are defined as \begin{eqnarray*} \{\{ \boldsymbol{w}\}\}_e=\boldsymbol{w}|_{\tau}, \ [[ \boldsymbol{w}]]_e=\boldsymbol{w}|_\tau\cdot\boldsymbol{t},\ [\boldsymbol{w}]_e = \boldsymbol{w}|_{\tau}\cdot\boldsymbol{n} \end{eqnarray*} where $\boldsymbol{w}|_{\tau}$ denotes the value of $\boldsymbol{w}$ on $\tau$ and $\boldsymbol{n}$ denotes the outward unit normal vectors on $e$ for $\tau$. For a scalar function $\phi$, its average and tangential jump on $e$ are defined as \begin{equation*} \{\{\phi\}\}_{e}=\phi|_\tau, ~[[\phi]]_{e}=\phi|_{\tau} \boldsymbol{t}, \end{equation*} where $\phi|_{\tau}$ denote the value of $\phi$ on $\tau$. The DG methods are based on the approximation of the vector field $\boldsymbol{u}$ and $p$ by elementwise polynomials, thus giving rise to the finite dimensional function spaces \begin{eqnarray*} &&\boldsymbol{U}_{h}:=\left\{\boldsymbol{v}_{h} \in \mathbf{L}^{2}(\Omega)\left|~\boldsymbol{v}_{h}\right|_{\tau} \in \mathcal{R}_{1}(\tau),~\boldsymbol{v}_h|_e = 0, \forall \tau \in \mathcal{T}_{h}\right\}, \\ &&\mathbb{Q}_{h}:=\left\{{q}_{h} \in {L}^{2}(\Omega)\left|~{q}_{h}\right|_{\tau} \in P_0(\tau), \forall \tau \in \mathcal{T}_{h}\right\}, \end{eqnarray*} where $\mathcal{R}_{1}(\tau)=\left\{\exists \boldsymbol{\alpha} \in \mathbb{R}^{2}, \exists \beta \in \mathbb{R}, \forall \boldsymbol{x}=\left(x_{1}, x_{2}\right) \in \tau: \boldsymbol{q}(\boldsymbol{x})=\boldsymbol{\alpha}+\beta\left(-x_{2}, x_{1}\right)\right\}$, and $P_{0}(\tau)$ denotes the constant in $\tau$. Now, we present the mixed interior penalty discontinuous Galerkin(MIPDG) finite element method for the system \eqref{Eqn:hhcurl}-\eqref{Eqn:hq}: find $(\boldsymbol{u}_h,p_h)\in \boldsymbol{U}_h\times\mathbb{Q}_h$ such that \begin{eqnarray} a_h({p}_h, {q}_h)-b_h(\boldsymbol{u}_h, {q}_h) &=& \ell_{1,h}({q}_h)+d_{1,h}(\boldsymbol{u}_h,q_h), \quad \forall {q}_h \in \mathbb{Q}_h,\label{Eqn:dweak_1} \\ d_h(\boldsymbol{v}_h, {p}_h)+c_h(\boldsymbol{u}_h, \boldsymbol{v}_h) &=& \ell_{2,h}(\boldsymbol{v}_h)+d_{2,h}(\boldsymbol{u}_h,\boldsymbol{v}_h), \quad \forall \boldsymbol{v}_h \in \boldsymbol{U}_h,\label{Eqn:dweak_2} \end{eqnarray} where \begin{eqnarray} &&a_h({p}_h, {q}_h):=({p}_h, {q}_h)_{\mathcal{T}_h}, \label{Eqn:da}\\ &&b_h(\boldsymbol{u}_h,{q}_h):=(\mathrm{curl}_h~ \boldsymbol{u}_h,{q}_h)_{\mathcal{T}_h}, \label{Eqn:db}\\ &&c_h(\boldsymbol{u}_h, \boldsymbol{v}_h):=(\beta\boldsymbol{u}_h, \boldsymbol{v}_h)_{\mathcal{T}_h}, \label{Eqn:dc}\\ &&d_h(\boldsymbol{v}_h,p_h):=(\mathrm{curl}_h\boldsymbol~\boldsymbol{v}_h,\alpha p_h)_{\mathcal{T}_h}, \label{Eqn:dd}\\ &&\ell_{1,h}({q}_h):=0, \label{Eqn:dl_1}\\ &&\ell_{2,h}(\boldsymbol{v}_h):=(\boldsymbol{f}, \boldsymbol{v}_h)_{\mathcal{T}_h},\label{Eqn:dl_2} \\ && d_{1,h}\left(\boldsymbol{u}_{h}, {q}_{h}\right):=-<\{\{{q}_{h}\}\},[[\boldsymbol{u}_{h}]]>_{\mathcal{E}_{h}}, \\ &&d_{2,h}\left(\boldsymbol{u}_{h}, \boldsymbol{v}_{h}\right):=<\{\{\alpha\mathrm{curl}_h~ \boldsymbol{u}_{h}\}\}-\kappa h^{-1}_e[[\boldsymbol{u}_{h}]],[[\boldsymbol{v}_{h}]]>_{\mathcal{E}_{h}}, \end{eqnarray} with $\kappa>0$ is a penalty parameter and should be taken large enough. \begin{remark}\label{Rem:1} \begin{itemize} \item Comparing with the continuous variational problem \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and the discrete variational problem \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, the definitions of the bilinear terms, which without including $\mathrm{curl}_h$, are the same. In order to be consistent with other symbols, we add the subscript $h$ to the bilinear terms in the discrete variational form. \item The calculation of $\mathrm{curl}_h$ in the bilinear terms of the discrete variational problem is piecewise derivation. \item Compared with the continuous variational form, the discrete variational form adds two terms $d_{1,h}$ and $d_{2,h}$. \end{itemize} \end{remark} In order to give the well-posedness of the discrete variational problems, we need to introduce the suitable IPDG form of the $\boldsymbol{H}(\mathrm{curl})-$elliptic problems: find $\boldsymbol{u}_h\in\boldsymbol{U}_h$, such that \begin{equation}\label{DVP:IPDG} a_{I P}\left(\boldsymbol{u}_{h}, \boldsymbol{v}_{h}\right) =\left(\boldsymbol{f}, \boldsymbol{v}_{h}\right)_{\mathcal{T}_{h}}, \end{equation} where \begin{eqnarray}\nonumber a_{I P}\left(\boldsymbol{u}_{h}, \boldsymbol{v}_{h}\right) &=& \left(\beta\boldsymbol{u}_{h}, \boldsymbol{v}_{h}\right)_{\mathcal{T}_{h}} +\left(\alpha\mathrm{curl}~ \boldsymbol{u}_{h}, \mathrm{curl}~ \boldsymbol{v}_{h}\right)_{\mathcal{T}_{h}} -<\{\{\mathrm{curl}~ \boldsymbol{v}_{h}\}\} ,[[\alpha\boldsymbol{u}_{h}]]>_{\mathcal{E}_{h}} \\ \label{Def:Bilinear:aIP} && - <\{\{\alpha\mathrm{curl}~ \boldsymbol{u}_{h}\}\} ,[[\boldsymbol{v}_{h}]]>_{\mathcal{E}_{h}} + \kappa<h_e^{-1}[[\boldsymbol{u}_{h}]] ,[[\boldsymbol{v}_{h}]]>_{\mathcal{E}_{h}}. \end{eqnarray} \begin{remark} Let $q_h=\alpha\mathrm{curl}~\boldsymbol{v}_h$ in \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, and subtract \eqref{Eqn:dweak_1} from \eqref{Eqn:dweak_2} then lead to \eqref{DVP:IPDG}. \end{remark} To provide the existence and uniqueness of solutions to the variational problem \eqref{DVP:IPDG}, we need to introduce the following norm. \begin{eqnarray*}\label{Eqn:fs_h1} |||\boldsymbol{v}_h|||_{h}^2=\|\mathrm{curl}~ \boldsymbol{v}_h\|^2_{\mathcal{T}_h}+\|\boldsymbol{v}_h\|^2_{\mathcal{T}_h}+\kappa\|h_e^{-\frac{1}{2}}[[ \boldsymbol{v}_h]] \|_{\mathcal{E}_h}^2,\quad \forall \boldsymbol{v}_h\in ( H^{1}\left(\mathcal{T}_{h}\right))^2, \kappa>0. \end{eqnarray*} Similar to \cite{BonitoNochetto10:734}, by using the Cauchy-Schwarz inequality, trace inequality and inverse inequality, it is easy to verify that $a_h(\cdot,\cdot)$ is bounded by $\||\cdot|\|_h$, i.e., \begin{equation}\label{Eqn:bb} a_{h}\left(\boldsymbol{w}_{h}, \boldsymbol{v}_{h}\right) \leqslant C\||\boldsymbol{w}_{h}|\|_{h}\||\boldsymbol{v}_{h}|\|_{h}, \quad \forall \boldsymbol{w}_{h}, \boldsymbol{v}_{h} \in \mathbb{V}_{h}. \end{equation} Furthermore, for the coercivity of the bilinear forms $a_h(\cdot.\cdot)$ on $\mathbb{V}_h$, we have \begin{equation}\label{Eqn:cc} a_{h}\left(\boldsymbol{v}_{h}, \boldsymbol{v}_{h}\right) \geqslant C\||\boldsymbol{v}_{h}|\|_{h}^{2}, \quad \forall \boldsymbol{v}_{h} \in \mathbb{V}_{h}. \end{equation} Combining \eqref{Eqn:bb} and \eqref{Eqn:cc}, we obtain the well-posedness of the discrete variational problem \eqref{DVP:IPDG}. Furthermore, Lemma \ref{Lem:solveeq} shows that the variational problem \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2} and the variational problem \eqref{DVP:IPDG} have equivalent form. The proof use similar arguments in \cite{CarstensenHoppe09:27} and is skipped here. \begin{lemma}\label{Lem:solveeq} If $\left(\boldsymbol{u}_{h},{p}_{h} \right) \in\left(\boldsymbol{U}_{h}, \mathbb{Q}_{h}\right)$ is the solution of equation \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, then $\boldsymbol{u}_{h} \in \boldsymbol{U}_{h}$ is the solution of the variational problem \eqref{DVP:IPDG}. On the contrary, if $\boldsymbol{u}_{{h}} \in \boldsymbol{U}_{h}$ is the solution of the variational problem \eqref{DVP:IPDG}, then there is a corresponding ${p}_{h} \in \mathbb{Q}_{h}$ makes $\left(\boldsymbol{u}_{{h}},{p}_{h}\right) \in\left(\boldsymbol{U}_{h}, \mathbb{Q}_{h}\right)$ is the solution of \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}. \end{lemma} \subsection{A posteriori error indicator} For any $\tau\in \mathcal{T}_h$, $e\in \mathcal{E}_h$ and $\left(\boldsymbol{v}_{h}, {q}_{h}\right) \in \mathbb{Q}_{h} \times \boldsymbol{U}_{h}$, we introduce the following element-wise residuals and edge-wise jump residuals as $$ \begin{array}{l} R_{1}\left(\boldsymbol{v}_{h}, {q}_{h}\right)|_{\tau} := {q}_{h}|_{\tau}-\mathrm{curl}_h\boldsymbol{v}_{h}|_{\tau}, \\ R_{2}\left(\boldsymbol{v}_{h}, {q}_{h}\right)|_{\tau} := \boldsymbol{f}|_{\tau}-\left(\boldsymbol{curl}_h~\alpha {q}_{h}+\beta\boldsymbol{v}_{h}\right)|_{\tau}, \\ R_{3}\left(\boldsymbol{v}_{h}\right)|_{\tau} := \nabla \cdot\left(\boldsymbol{f}-\beta\boldsymbol{v}_{h}\right)|_{\tau}, \\ J_{1}\left({q}_{h}\right)|_{e} := [[\alpha{q}_{h}]]_e, \\ J_{2}\left(\boldsymbol{v}_{h}\right)|_{e}:=[\boldsymbol{f}-\beta\boldsymbol{v}_{h}]_e,\\ J_{3}\left(\boldsymbol{v}_{h}\right)|_{e}:=[[\boldsymbol{v}_h]]_e. \end{array} $$ The local error estimator on $\tau\in \mathcal{T}_h$ is defined as $$ \begin{aligned} \eta^{2}\left(\boldsymbol{v}_{h}, {q}_{h} ; \tau\right) :=& \|R_{1}\left(\boldsymbol{v}_{h}, {q}_{h}\right)\|_{0,\tau}^{2} + h_{\tau}^{2}\left(\|R_{2}\left(\boldsymbol{v}_{h}, {q}_{h}\right)\|_{0,\tau}^{2} + \|R_{3}\left(\boldsymbol{v}_{h}\right)\|_{0,\tau}^{2}\right) \\ &+ \sum_{e \in \partial \tau} h_{e}\left(\|J_{1}\left({q}_{h}\right)\|_{0,e}^{2} + \|J_{2}\left(\boldsymbol{v}_{h}\right)\|_{0,e}^{2}\right) + \kappa\sum_{e\in\partial\tau}h^{-1}_e\left\|J_3(\boldsymbol{v}_h)\right\|^2_{0, e}, \end{aligned} $$ where $h_{\tau}$ denotes the diameter of the element $\tau$. The mesh $\mathcal{T}_h$ is shape-regular which implies that $h_{\tau} \approx h_{e}$. Then the global error estimator on $ \mathcal{T}_h$ is defined as \begin{equation}\label{eta} \eta^{2}\left(\boldsymbol{v}_{h}, {q}_{h} ; \mathcal{T}_{h}\right)=\sum_{\tau \in \mathcal{T}_{h}} \eta^{2}\left(\boldsymbol{v}_{h}, {q}_{h} ; \tau\right). \end{equation} \section{Reliability analysis}\label{sec:4} For any $(\boldsymbol{v},q)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{v}_h,q_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$, we define the following error \begin{eqnarray}\nonumber \| (\boldsymbol{v},q)-(\boldsymbol{v}_h,q_h) \|^2_{DG} &:=& \|{q-q_h}\|_{0,\Omega}^{2} + \|\boldsymbol{v}-\boldsymbol{v}_{h}\|_{0,\Omega}^{2} +\|\mathrm{curl}_h~(\boldsymbol{v}-\boldsymbol{v}_{h})\|_{0,\Omega}^{2} \\ \label{Eqn:DG} &&+ \kappa\sum\limits_{e\in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{v}_{h}]]\|_{0,e}^{2}. \end{eqnarray} \begin{remark} Here we use $[[ \boldsymbol{v}_h ]]_{e}$ instead of $[[\boldsymbol{v}-\boldsymbol{v}_{h}]]_{e}$, since $[[\boldsymbol{v}]]_{e}=0$ for $\boldsymbol{v} \in$ $\boldsymbol{U}$. \end{remark} Next, we focus on proving the reliability of the error indicator defined in \eqref{eta}. The key of our argument is to use the space decomposition technique: decompose the DG finite element solution $\boldsymbol{u}_h$ into two parts: one is conforming part $\boldsymbol{u}_h^{conf}\in\boldsymbol{U}_h^{conf}:=\boldsymbol{U}_h\cap\boldsymbol{U}$ and the other is its $L^2$ orthogonal part $\boldsymbol{u}_h^{\bot}\in\boldsymbol{U}_h^{\bot}$. Therefore, we need to take care of continuous error $\|(\boldsymbol{u},p)-(\boldsymbol{u}_h^{conf},p_h)\|_{DG}$ instead of $\|(\boldsymbol{u},p)-(\boldsymbol{u}_h,p_h)\|_{DG}$. The main analysis tools for continuous error are Helmholtz decomposition and the two interpolations. We prove the reliability of the error indicator. The following lemmas provide some estimates related to the continuous error. \begin{lemma}\label{Lem:leqell_1ell_2} Let $( \boldsymbol{u},{p}) \in \boldsymbol{U}\times\mathbb{Q}$ be solution of system \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2}, then for any $(\boldsymbol{v}_h^{conf}, {p}_{h})\in \boldsymbol{U}^{conf}_h \times \mathbb{Q}_h$, we have \begin{equation}\label{Eqn:errconf} \|(\boldsymbol{u}-\boldsymbol{v}^{conf}_h, {p}-{p}_{h})\|_{\boldsymbol{U} \times \mathbb{Q}} \lesssim\|\tilde{\ell}_{1}\|_{\mathbb{Q}^{*}}+\|\tilde{\ell}_{2}\|_{\boldsymbol{U}^{*}}, \end{equation} where \begin{eqnarray} &&\tilde{\ell}_{1}({q})=-a\left({p}_{h}, {q}\right)+b(\boldsymbol{v}^{conf}_h, {q}), \forall q \in \mathbb{Q},\label{Eqn:ell_1} \\ &&\tilde{\ell}_{2}(\boldsymbol{v})=\ell_{2}(\boldsymbol{v})-d\left(\boldsymbol{v}, {p}_{h}\right)-c(\boldsymbol{v}^{conf}_h, \boldsymbol{v}), \forall \boldsymbol{v} \in \boldsymbol{U}. \label{Eqn:ell_2} \end{eqnarray} \end{lemma} \begin{proof} For the operator $\mathcal{A}$ given by \eqref{Eqn:Al}, it is easy to obtain the linearity, namely, for any $q_1,~q_2,~q\in\mathbb{Q}$ and $\boldsymbol{v}_1,~\boldsymbol{v}_2,~\boldsymbol{v}\in\boldsymbol{U}$, we have \begin{eqnarray*} \left(\mathcal{A} \left({q}_{1}+{q}_{2},\boldsymbol{v}_{1}+\boldsymbol{v}_{2} \right)\right)({q},\boldsymbol{v}) =\left(\mathcal{A}\left({q}_{1},\boldsymbol{v}_{1} \right)\right)({q},\boldsymbol{v} )+\left(\mathcal{A}\left({q}_{2},\boldsymbol{v}_{2} \right)\right)({q},\boldsymbol{v}). \end{eqnarray*} Hence, we have \begin{eqnarray*} \lefteqn{(\mathcal{A}({p}-{p}_{h},\boldsymbol{u}-\boldsymbol{v}^{conf}_h ))({q},\boldsymbol{v})} \\ &=& (\mathcal{A}({p},\boldsymbol{u} ))({q},\boldsymbol{v} ) - (\mathcal{A}({p}_{h},\boldsymbol{v}^{conf}_h ))({q},\boldsymbol{v}) \\ &=& \ell_{2}(\boldsymbol{v})-(a({p}_{h}, {q})-b(\boldsymbol{v}^{conf}_h, {q}) + d(\boldsymbol{v}, {p}_{h}) + c(\boldsymbol{v}^{conf}_h,\boldsymbol{v})) \\ &:=&\tilde{\ell}_{1}({q}) + \tilde{\ell}_{2}(\boldsymbol{v}). \end{eqnarray*} At last, noting that $(\boldsymbol{u}-\boldsymbol{v}^{conf}_h,{p}-{p}_{h} ) \in \boldsymbol{U}\times\mathbb{Q}$ and using the definition of the operator norm, this completes the proof. \end{proof} In the following lemmas, our purpose is to obtian upper bounds for $\|\tilde{\ell}_{1}\|_{Q^{*}}$ and $\|\tilde{\ell}_{2}\|_{U^{*}}$ in Lemmas \ref{Lem:tildeell_1} and \ref{Eqn:tildeell_2}, respectively. \begin{lemma}\label{Lem:tildeell_1} Let $\left(\boldsymbol{u}_{h},{p}_{h} \right) \in \boldsymbol{U}_{h}\times\mathbb{Q}_{h}$ be solution of \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}. For any $\boldsymbol{v}_h^{conf}\in\boldsymbol{U}^{conf}_h$, we have $$ \|\tilde{\ell}_{1}\|_{\mathbb{Q}^{*}} \lesssim \left(\sum_{\tau \in \mathcal{T}_h}\|R_{1}\left(\boldsymbol{u}_{h}, {p}_{h}\right)\|_{0,\tau}^{2}\right)^{1 / 2} + \left(\sum_{\tau \in \mathcal{T}_h}\|\mathrm{curl}_h(\boldsymbol{v}_h^{conf}-\boldsymbol{u}_{h})\|_{0,\tau}^{2}\right)^{1 / 2}. $$ \end{lemma} \begin{proof} For any $q\in \mathbb{Q}$, by using \eqref{Eqn:ell_1}, \eqref{Eqn:a} and \eqref{Eqn:b}, we have \begin{eqnarray*} \tilde{\ell}_{1}(q) &=& -a\left({p}_{h}, {q}\right)+b(\boldsymbol{v}^{conf}_h, {q}) \\ &=& -\left(p_{h}, q\right)+(\mathrm{curl}~\boldsymbol{v}_h^{conf}, q) \\ &=& \left({\mathrm{curl}_h~ \boldsymbol{u}}_{h}-p_{h}, q\right)_{\mathcal{T}_h} + (\mathrm{curl}_h(\boldsymbol{v}_h^{conf}-\boldsymbol{u}_{h}), q)_{\mathcal{T}_h}. \end{eqnarray*} Applying H\"older inequality and Cauchy-Schwarz inequality leads to \begin{eqnarray*} \lefteqn{ |\tilde{\ell}_{1}(q)| \leq \sum_{\tau \in \mathcal{T}_h}\left\|\mathrm{curl}_h~ \boldsymbol{u}_{h}-{p}_{h}\right\|_{0,\tau}\|{q}\|_{0,\tau} + \sum_{\tau \in \mathcal{T}_h}\|\mathrm{curl}_h(\boldsymbol{v}^{conf}_{h}-\boldsymbol{u}_{h})\|_{0,\tau}\|{q}\|_{0,\tau} } \\ &&\leq 2 \left(\left(\sum_{\tau \in \mathcal{T}_h}\|R_{1}\left( \boldsymbol{u}_{h},p_{h}\right)\|_{0,\tau}^{2}\right)^{1 / 2} + \left(\sum_{\tau \in \mathcal{T}_h}\|\mathrm{curl}_h(\boldsymbol{u}_{h}-\boldsymbol{v}_h^{conf})\|_{0,\tau}^{2}\right)^{1 / 2}\right)\|q\|_{0,\Omega}. \end{eqnarray*} The proof is completed. \end{proof} In order to estimate the term $\|\tilde{\ell}_{2}\|_{\boldsymbol{U}^{*}}$ in Lemma \ref{Eqn:tildeell_2}, we shall use the following two interpolation operators with the corresponding approximations. \begin{itemize} \item[(1)] Scott-Zhang quasi-interpolation $S_h:H_0^1(\Omega)\rightarrow \{v\in C(\Omega)|\ v|_\tau \in{P}_1(\tau),~v|_{\partial\Omega}=0,~\forall \tau\in\mathcal{T}_h\}$, where ${P}_1(\tau)$ represents a linear polynomial space. The definition and approximation properties of Scott-Zhang quasi-interpolation interpolation were first proposed in \cite{ScottZhang90:483}. For $\psi\in H^1_0(\Omega)$, there hold \begin{eqnarray} \|\nabla S_h\psi\|_{0,\tau} \lesssim \|\nabla\psi\|_{0,\omega_\tau}, && \forall \tau\in\mathcal{T}_h, \label{Ppsi} \\ \|\psi-S_h\psi\|_{0,\tau} \lesssim h_\tau \|\nabla \psi\|_{0,\omega_\tau}, && \forall \tau\in\mathcal{T}_h, \label{psitau}\\ \|\psi-S_h\psi\|_{0,e} \lesssim h_e^{\frac{1}{2}} \|\nabla \psi\|_{0,\omega_e},&& \forall e\in\mathcal{E}_h, \label{psie} \end{eqnarray} where $\omega_{\tau}:=\bigcup\limits_{\tau^{\prime} \cap \tau \neq \emptyset} \tau^{\prime}$ and $\omega_{e}:=\bigcup\limits_{\tau \cap e \neq \emptyset} \tau$. \item[(2)] Vector-Valued operator $ \boldsymbol{P}_{h}: \boldsymbol{H}^{1}(\Omega) \cap \boldsymbol{U} \rightarrow \boldsymbol{U}_h^{conf} $. The definition and approximation properties of Vector-Valued operator were proposed in \cite{CarstensenHoppe05:19}. For $q\in \boldsymbol{H}^1(\Omega)\cap\boldsymbol{U}$, there hold \begin{eqnarray} \|\boldsymbol{P}_h\boldsymbol{q}\|_{0,\tau} \lesssim \|\boldsymbol{q}\|_{1,\tilde{\omega}_\tau}, && \forall \tau\in\mathcal{T}_h, \label{Pq}\\ \|\boldsymbol{q}-\boldsymbol{P}_h\boldsymbol{q}\|_{0,\tau} \lesssim h_\tau \|\boldsymbol{q}\|_{1,\tilde{\omega}_\tau}, && \forall \tau\in\mathcal{T}_h, \label{qtau} \\ \|\boldsymbol{q}-\boldsymbol{P}_h\boldsymbol{q}\|_{0,e} \lesssim h_e^{\frac{1}{2}} \|\boldsymbol{q}\|_{1,\tilde{\omega}_e}, && \forall e\in\mathcal{E}_h, \label{qe} \end{eqnarray} where $\tilde{\omega}_{e}:=\bigcup\left\{\tau \in \mathcal{T}_{h}(\Omega) \mid e \in \mathcal{E}_{h}(T)\right\}$ and $\tilde{\omega}_{\tau}:=\bigcup\left\{\omega_{e} \mid e \in \mathcal{E}_{h}(T)\right\}$. \end{itemize} \begin{lemma}\label{Eqn:tildeell_2} Let $\left(\boldsymbol{u}_{h},{p}_{h}\right) \in \boldsymbol{U}_{h}\times\mathbb{Q}_{h} $ be solution of system \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}. For any $\boldsymbol{v}^{conf}_h\in\boldsymbol{U}^{conf}_h$, then there exists a constant $C_{1}>0$ depending only on $\|\beta\|_{0,\infty}$, we have \begin{eqnarray*} \|\tilde{\ell}_{2}\|_{\boldsymbol{U}^{*}} &\leq& C_{1} \left(\sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\left(\|R_{2}\left(\boldsymbol{u}_{h}, {p}_{h}\right)\|_{0,\tau}^{2} + \|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau}^{2}\right)\right.\\ &&\left.+\sum_{e \in \mathcal{E}_h} h_{e}\left(\|J_{1}\left({p}_{h}\right)\|_{0,e}^{2} + \|J_{2}\left(\boldsymbol{u}_{h}\right)\|_{0,e}^{2}\right) + \sum_{\tau \in \mathcal{T}_h}\|\boldsymbol{u}_{h}-\boldsymbol{v}_h^{conf}\|_{0,\tau}^{2}\right)^{1 / 2}. \end{eqnarray*} \end{lemma} \begin{proof} For any $\boldsymbol{v}\in\boldsymbol{U}$, we use Helmholtz decomposition $\boldsymbol{v}$ as follows (see the Theorem 2.1 of \cite{CarstensenHoppe05:19}) \begin{equation}\label{wdec} \boldsymbol{v}:= \boldsymbol{v}^0 + \boldsymbol{v}^{\bot}, \end{equation} and \begin{equation} \|\boldsymbol{v}^{0}\|^2_{0,\Omega} + \|\boldsymbol{v}^{\bot}\|^2_{0,\Omega} = \|\boldsymbol{v}\|^2_{0,\Omega}, \end{equation} where $\boldsymbol{v}^0 \in \boldsymbol{H}_0(\mathrm{curl}0,\Omega): =\{\boldsymbol{v}:\boldsymbol{v}\in \boldsymbol{H}_0(\mathrm{curl}, \Omega), \mathrm{curl}\ \boldsymbol{v}=0 \}$ and $\boldsymbol{v}^{\bot}\in \boldsymbol{H}^{\bot}(\mathrm{curl},\Omega): =\{\boldsymbol{v}:\boldsymbol{v}\in \boldsymbol{H}_0(\mathrm{curl}, \Omega), (\boldsymbol{v},\boldsymbol{v}^0)=0,\ \boldsymbol{v}^0\in \boldsymbol{H}_0(\mathrm{curl}0,\Omega)\}$. We make use of the representation $\boldsymbol{H}_0(\mathrm{curl}0,\Omega) = \boldsymbol{grad}\ {H}^1_0(\Omega)$, hence, we have $\boldsymbol{v}^0=\nabla \psi$ for some $\psi\in H_0^1(\Omega)$. Applying the definition of $\tilde{\ell}_2$ \eqref{Eqn:ell_2}, we have \begin{eqnarray}\nonumber \tilde{\ell}_2(\boldsymbol{v}) &=& \tilde{\ell}_2(\boldsymbol{v}^0+\boldsymbol{v}^{\bot}) = \tilde{\ell}_2(\nabla\psi+\boldsymbol{v}^{\bot}) \\ \label{Eqn:ell_dec} &=& \tilde{\ell}_2(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}) + \tilde{\ell}_2(\nabla\psi+\boldsymbol{v}^{\bot}-\nabla S_h\psi-\boldsymbol{P}_h\boldsymbol{v}^{\bot}). \end{eqnarray} We first analyze the first item on the right hand side of \eqref{Eqn:ell_dec}. According to the definition of $\tilde{\ell}_2$ \eqref{Eqn:ell_2}, we have \begin{eqnarray}\label{Eqn:S} \lefteqn{\tilde{\ell}_{2}\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) } \nonumber\\ &=& \ell_{2}\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) - d\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}, {p}_{h}\right) - c(\boldsymbol{v}^{conf}_h, \nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}) \nonumber\\ &=& \ell_{2}\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) - d\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}, {p}_{h}\right) - c\left(\boldsymbol{u}_h,\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot} \right) \nonumber \\ && + c(\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h, \nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}). \end{eqnarray} By using Remark \ref{Rem:1}, for any $e\in\mathcal{E}_h$, noting that $[[\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}]]_e=0$ since $\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\subset \boldsymbol{U}$, and choosing $\boldsymbol{v}_h=\boldsymbol{P}_h\boldsymbol{v}^{\bot}+\nabla S_h\psi$ in \eqref{Eqn:dweak_2}, we have \begin{equation}\label{Eqn:0} \ell_{2}\left(\boldsymbol{P}_h\boldsymbol{v}^{\bot}+\nabla S_h\psi\right)-d\left(\boldsymbol{P}_h\boldsymbol{v}^{\bot}+\nabla S_h\psi, {p}_{h}\right)-c\left(\boldsymbol{u}_{h}, \boldsymbol{P}_h\boldsymbol{v}^{\bot}+\nabla S_h\psi\right)=0. \end{equation} Combining \eqref{Eqn:S} and \eqref{Eqn:0}, we have \begin{eqnarray*} \tilde{\ell}_{2}\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) &=& c(\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h, \nabla S_h\psi + \boldsymbol{P}_h\boldsymbol{v}^{\bot}). \end{eqnarray*} Applying Cauchy-Schwarz inequality, \eqref{Ppsi}, \eqref{Pq} and $\boldsymbol{H}_0^{\bot}(\mathrm{curl},\Omega)$ is continuously imbedded in $\boldsymbol{H}^1(\Omega)\cap\boldsymbol{H}_0(\mathrm{curl},\Omega)$(see \cite{CarstensenHoppe05:19}), we deduce \begin{eqnarray}\label{Eqn:ell_2Pi} \tilde{\ell}_{2}\left(\nabla S_h\psi+\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) &\lesssim& C_1\|\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h\|_{0,\Omega} (\|\nabla S_h\psi\|_{0,\Omega} + \|\boldsymbol{P}_h\boldsymbol{v}^{\bot}\|_{0,\Omega}) \nonumber\\ &\lesssim& C_1\|\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h\|_{0,\Omega} (\|\nabla\psi\|_{0,\Omega} + \| \boldsymbol{v}^{\bot}\|_{0,\Omega}) \nonumber\\ &\lesssim& C_1\|\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h\|_{0,\Omega} (\|\nabla\psi\|_{0,\Omega} + \| \mathrm{curl}~ \boldsymbol{v}^{\bot}\|_{0,\Omega}) \nonumber\\ &\lesssim& C_1\|\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h\|_{0,\Omega}\|\boldsymbol{v}\|_{\mathrm{curl},\Omega}, \end{eqnarray} where $C_{1}>0$ depends only on $\|\beta\|_{0,\infty}$. Next, we analyze the second item on the right hand side of \eqref{Eqn:ell_dec}, using the definition of $\tilde{\ell}_2$ \eqref{Eqn:ell_2}, the fact $(\mathrm{curl}_h(\nabla\psi - \nabla S_h\psi),\alpha p_h)_{\mathcal{T}_h}=0$ and Green formula, we have \begin{eqnarray}\label{Eqn:ell_2dec} \lefteqn{\tilde{\ell}_{2}\left( \nabla\psi+\boldsymbol{v}^{\bot}-\nabla S_h\psi-\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right)} \nonumber\\ &=& \tilde{\ell}_{2}\left( \nabla\psi-\nabla S_h\psi\right) + \tilde{\ell}_{2}\left( \boldsymbol{v}^{\bot}-\boldsymbol{P}_h\boldsymbol{v}^{\bot}\right) \nonumber\\ &=& (\boldsymbol{f},\nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} - (\mathrm{curl}_h(\nabla\psi - \nabla S_h\psi),\alpha p_h)_{\mathcal{T}_h} - (\beta \boldsymbol{v}^{conf}_h,\nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} \nonumber\\ && + (\boldsymbol{f},\boldsymbol{v}^{\bot} -\boldsymbol{P}_h\boldsymbol{v}^{\bot})_{\mathcal{T}_h} - (\mathrm{curl}_h(\boldsymbol{v}^{\bot} -\boldsymbol{P}_h\boldsymbol{v}^{\bot}),\alpha p_h)_{\mathcal{T}_h} - (\beta\boldsymbol{v}^{conf}_h,\boldsymbol{v}^{\bot} - \boldsymbol{P}_h\boldsymbol{v}^{\bot})_{\mathcal{T}_h} \nonumber\\ &=& (\boldsymbol{f}, \nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} - (\beta \boldsymbol{u}_h,\nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} + (\beta(\boldsymbol{u}_h-\boldsymbol{v}^{conf}_h), \nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} \nonumber \\ &&+(\boldsymbol{f},\boldsymbol{v}^{\bot} - \boldsymbol{P}_h\boldsymbol{v}^{\bot})_{\mathcal{T}_h} - (\mathrm{curl}_h(\boldsymbol{v}^{\bot}-\boldsymbol{P}_h\boldsymbol{v}^{\bot}), \alpha p_h)_{\mathcal{T}_h} - (\beta \boldsymbol{u}_h,\boldsymbol{v}^{\bot} - \boldsymbol{P}_h\boldsymbol{v}^{\bot})_{\mathcal{T}_h} \nonumber\\ &&+ (\beta (\boldsymbol{u}_h-\boldsymbol{v}^{conf}_h),\boldsymbol{v}^{\bot} - \boldsymbol{P}_h\boldsymbol{v}^{\bot})_{\mathcal{T}_h} \nonumber \\ &=& -\left(\nabla \cdot \left(\boldsymbol{f}-\beta \boldsymbol{u}_h\right), \psi- S_h\psi \right)_{\mathcal{T}_h} + \left\langle [\boldsymbol{f}-\beta\boldsymbol{u}_h ]_e, \psi- S_h\psi \right\rangle_{\mathcal{E}_h} \nonumber\\ &&+ (\beta (\boldsymbol{u}_h-\boldsymbol{v}^{conf}_h), \nabla\psi - \nabla S_h\psi)_{\mathcal{T}_h} + \left(\boldsymbol{f}-\mathbf{curl}_h~\alpha p_h-\beta\boldsymbol{u}_h, \boldsymbol{v}^{\bot} - \boldsymbol{P}_h \boldsymbol{v}^{\bot} \right)_{\mathcal{T}_h} \nonumber \\ && - \left\langle [[\alpha p_h]]_e, \boldsymbol{v}^{\bot} - \boldsymbol{P}_h \boldsymbol{v}^{\bot} \right\rangle_{\mathcal{E}_h} + (\beta(\boldsymbol{u}_h-\boldsymbol{v}^{conf}_h), \boldsymbol{v}^{\bot} - \boldsymbol{P}_h \boldsymbol{v}^{\bot} )_{\mathcal{T}_h}. \end{eqnarray} Applying Cauchy-Schwarz inequality, \eqref{psitau}-\eqref{qe} and $\boldsymbol{H}_0^{\bot}(\mathrm{curl},\Omega)$ is continuously imbedded in $\boldsymbol{H}^1(\Omega)\cap\boldsymbol{H}_0(\mathrm{curl},\Omega)$, we deduce \begin{eqnarray*} \lefteqn{ |\tilde{\ell}_{2}(\boldsymbol{v})| \lesssim C_1 \left(\sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\left(\|R_{2}\left(\boldsymbol{u}_{h}, {p}_{h}\right)\|_{0,\tau}^{2} + \left\|R_{3}(\boldsymbol{u}_{h}\right)\|_{0,\tau}^{2}\right)\right. } \\ && \left. \ \ \ +\sum_{e \in \mathcal{E}_h} h_{e}\left(\|J_{1}\left({p}_{h}\right)\|_{0,e}^{2} + \|J_{2}\left(\boldsymbol{u}_{h}\right)\|_{0,e}^{2}\right) + \sum_{\tau \in \mathcal{T}}\|\boldsymbol{u}_{h}-\boldsymbol{v}^{conf}_h\|_{0,\tau}^{2}\right)^{1 / 2}\|\boldsymbol{v}\|_{\mathrm{curl},\Omega}, \end{eqnarray*} which complete the proof. \end{proof} In the end of this section, we give the upper bound of the error estimator. \begin{theorem}\label{The:Upper} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then there exists a constant $C_{1}>0$ depending only on $\|\beta\|_{\infty,\Omega}$ and the grid shape regularity, we have \begin{equation*} \| (\boldsymbol{u},p) - (\boldsymbol{u}_h,p_h) \|^2_{DG} \lesssim C_{1}\eta^2(\boldsymbol{u}_h,p_h;\mathcal{T}_h). \end{equation*} \end{theorem} \begin{proof} For any $\boldsymbol{v}^{conf}_h\in \boldsymbol{U}_h^{conf}$, using the definition of $\|\cdot\|_{DG}$ in \eqref{Eqn:DG}, triangle inequality, we get \begin{eqnarray} \lefteqn{\|(\boldsymbol{u}, {p})-\left(\boldsymbol{u}_{h}, {p}_{h}\right)\|_{D G}^{2}} \nonumber \\ &&=\|{p}-{p}_{h}\|_{0,\Omega}^{2} +\|\boldsymbol{u}-\boldsymbol{u}_{h}\|_{0,\Omega}^{2} +\|\mathrm{curl}~\boldsymbol{u}-\mathrm{curl}_h~\boldsymbol{u}_{h}\|_{0,\Omega}^{2} + \kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2} \nonumber\\ &&=|{p}-{p}_{h}\|_{0,\Omega}^{2} +\|\boldsymbol{u}-\boldsymbol{u}_{h}\|_{\mathrm{curl},\Omega}^{2} +\kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2} \nonumber\\ &&\leq \|p-{p}_{h}\|_{0,\Omega}^{2}+\|\boldsymbol{u}-\boldsymbol{v}_h^{conf}\|_{\mathrm{curl},\Omega}^{2} + \|\boldsymbol{v}^{conf}_h-\boldsymbol{u}_{h}\|_{\mathrm{curl},\Omega}^{2} +\kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2} \nonumber\\ &&= \|(\boldsymbol{u}-\boldsymbol{v}^{conf}_h, {p}-{p}_{h})\|_{\boldsymbol{U} \times \mathbb{Q}} + \|\boldsymbol{v}^{conf}_h-\boldsymbol{u}_{h}\|_{\mathrm{curl},\Omega}^{2} +\kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2}.\label{Eqn:up-uhph} \end{eqnarray} For $\boldsymbol{u}_h\in \boldsymbol{U}_h$, there exists $\boldsymbol{u}^{conf}_{h} \in \boldsymbol{U}_h^{conf}$, $\boldsymbol{u}^{\bot}_{h} \in \boldsymbol{U}_h^{\bot}$ satisfing (see Proposition 4.10 of \cite{LohrengelNicaise07:27}) \begin{equation*}\label{u_h} \boldsymbol{u}_h=\boldsymbol{u}^{conf}_{h}+\boldsymbol{u}^{\bot}_{h}, \end{equation*} and \begin{eqnarray}\label{Eqn:v_c2} h^2_\tau\|\mathrm{curl}_h(\boldsymbol{u}_{h}-\boldsymbol{u}^{conf}_{h})\|^2_{0,\Omega} + \|\boldsymbol{u}_h-\boldsymbol{u}^{conf}_{h}\| ^2_{0,\Omega} \lesssim h^2_\tau\sum\limits_{e\in \mathcal{E}_h}h^{-1}_e \left\| [[ \boldsymbol{u}_{h}]] _e\right\|^2_{0, e}. \end{eqnarray} At last, choosing $\boldsymbol{v}_h^{conf} = \boldsymbol{u}_h^{conf}$ in \eqref{Eqn:up-uhph} and using Lemmas \ref{Lem:leqell_1ell_2}, \ref{Lem:tildeell_1}, \ref{Eqn:tildeell_2} and \eqref{Eqn:v_c2}, we have \begin{eqnarray*} \lefteqn{\|(\boldsymbol{u}, {p})-\left(\boldsymbol{u}_{h}, {p}_{h}\right)\|_{D G}^{2}} \\ &\leq&\|(\boldsymbol{u}-\boldsymbol{u}^{conf}_h, {p}-{p}_{h})\|_{\boldsymbol{U} \times \mathbb{Q}} + \|\boldsymbol{u}^{conf}_h-\boldsymbol{u}_{h}\|_{\mathrm{curl},\Omega}^{2} +\kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2}\\ &\lesssim& \|\tilde{\ell}_{1}\|_{\mathbb{Q}^{*}}^{2}+\|\tilde{\ell}_{2}\|_{\boldsymbol{U}^{*}}^{2} + \|\boldsymbol{u}^{conf}_h-\boldsymbol{u}_{h}\|_{\mathrm{curl},\Omega}^{2} + \kappa\sum\limits_{e \in \mathcal{E}_{h}} h_{e}^{-1}\|[[\boldsymbol{u}_{h}]]\|_{0,e}^{2}\\ &\lesssim& C_{1}\eta^2(\boldsymbol{v}_h,p_h;\mathcal{T}_h), \end{eqnarray*} which completes the proof. \end{proof} \section{Efficiency analysis}\label{sec:5} In this section, we will prove that the error estimator is efficient. In the Section \ref{sec:4}, we have already proved that the error estimator is reliable. Hence, the error estimator is a good indicator of energy error, that is \begin{equation}\label{Eqn:goodind} \eta^{2}\left(\boldsymbol{u}_{h},p_{h} ; \mathcal{T}_h\right) \approx \|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}^{2}. \end{equation} We fitst introduce the following theorem, which is the efficiency of the error estimator. \begin{theorem}\label{The:eff} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. The space of all piecewise polynomial of arbitrary order on $\mathcal{T}_h$ is denoted by $P(\mathcal{T}_h)$. Then for any $\boldsymbol{f}_{h} \in \mathcal{S}_{h}^{\text {conf }}:=P(\mathcal{T}_h) \cap \boldsymbol{H}(\operatorname{div} ; \Omega)$, we have $$ \eta^{2}\left(\boldsymbol{u}_{h} ,p_{h} ; \mathcal{T}_h\right) \lesssim C_2\Big( \|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}^{2} + \|\boldsymbol{f}-\boldsymbol{f}_{h}\|_{0,\Omega}^{2} + \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau}^{2} \Big), $$ where $C_2$ is a constant depending on $\|\alpha\|_{0,\infty}$ and $\|\beta\|_{0,\infty}$. \end{theorem} \begin{remark} We assume $\boldsymbol{f} \in \boldsymbol{H}(\operatorname{div} ; \Omega)$ to show the proof of the Theorem \ref{The:eff}. While, we should note that the conditional $\boldsymbol{f}_{h} \in \mathcal{S}_{h}^{\text {conf }}$ is only required in the Lemma \ref{lem:J2} ( See \eqref{f-f_h}). \end{remark} For any $\tau \in \mathcal{T}_{h}$, $e \in \mathcal{E}_{h}$, let $b_{\tau}$ and $b_{e}$ be standard the interior bubble functions and edge bubble functions, respectively. We introduce the following two lemmas which are used in later proofs. \begin{lemma}[\cite{HoustonPerugia07:122}, Lemma 5.1]\label{Lem:3.4} Let $\chi$ be a scalar polynomial function on $\tau$, then \begin{eqnarray} & \|b_\tau \chi\|_{0,\tau} \lesssim \|\chi\|_{0,\tau},\label{Eqn:3.23} \\ & \| \chi\|_{0,\tau} \lesssim \|b_\tau^{\frac{1}{2}}\chi\|_{0,\tau}, \label{Eqn:3.24}\\ & \|\nabla \left(b_{\tau}\chi\right) \|_{0,\tau} \lesssim h_\tau^{-1}\|\chi\|_{0,\tau}. \label{Eqn:3.25} \end{eqnarray} Moreover, let $e$ be an edge shared by two triangles $\tau_1$ and $\tau_2$, let $\phi$ be a scalar polynomial function on $e$, the \begin{equation}\label{Eqn:3.26} \|\phi\|_{0,e} \lesssim \|b_e^{\frac{1}{2}} \phi \|_{0,e} . \end{equation} In addition, there exists an extension of $b_e\phi$ as $\tilde{\phi}_{b} \in H_{0}^{1}\left(\left(\overline{\tau}_1 \cup \overline{\tau}_2\right)^{\circ}\right)$ such that $ \tilde{\phi}_{b}|_e=b_e\phi$ and \begin{eqnarray}\label{Eqn:3.27} & \|\tilde{\phi}_{b}\|_{0,\tau} \lesssim h_e^{\frac{1}{2}}\|\phi\|_{0,e}, \quad\quad \forall \tau\in \omega_e, \\ \label{Eqn:3.28} & \|\nabla \tilde{\phi}_{b}\|_{0,\tau} \lesssim h_e^{-\frac{1}{2}}\|\phi\|_{0,e}, \quad \forall \tau \in \omega_e. \end{eqnarray} \end{lemma} \begin{lemma}[\cite{HoustonPerugia07:122}, Lemma 5.2]\label{Lem:3.5} Let $\boldsymbol{w}$ be a vector-valued polynomial function on $\tau$, then \begin{eqnarray} & \|b_\tau \boldsymbol{w}\|_{0,\tau} \lesssim\|\boldsymbol{w}\|_{0,\tau},\label{Eqn:3.29} \\ & \| \boldsymbol{w}\|_{0,\tau}\lesssim \|b_\tau^{\frac{1}{2}} \boldsymbol{w}\|_{0,\tau}, \label{Eqn:3.30} \\ & \|\mathrm{curl}\left(b_\tau \boldsymbol{w}\right)\|_{0,\tau} \lesssim h_\tau^{-1}\|\boldsymbol{w}\|_{0,\tau}.\label{Eqn:3.31} \end{eqnarray} Moreover, let $e$ be an edge shared by two triangles on $\tau_1$ and $\tau_2$, and let $\boldsymbol{w}$ be a vector-valued polynomial function on $e$, then \begin{equation}\label{Eqn:3.32} \|\boldsymbol{w}\|_{0,e} \lesssim \|b_e^{\frac{1}{2}} \boldsymbol{w} \|_{0,e}. \end{equation} In addition, there exists an extension of $b_e\boldsymbol{w}$ as $\tilde{\boldsymbol{w}}_{b} \in \left(H_{0}^{1}\left(\left(\overline{\tau}_1 \cup \overline{\tau}_2\right)^{\circ}\right)\right)^{2}$, such that $\left.\tilde{\boldsymbol{w}}_{b}\right|_e=b_e\boldsymbol{w}$, and \begin{eqnarray}\label{Eqn:3.33} & \|\tilde{\boldsymbol{w}}_{b}c\|_{0,\tau} \lesssim h_e^{\frac{1}{2}}\|\boldsymbol{w}\|_{0,e}, \quad \quad\forall \tau \in \omega_e, \\ \label{Eqn:3.34} & \|\mathrm{curl}~\tilde{\boldsymbol{w}}_{b}\|_{0,\tau} \lesssim h_e^{-\frac{1}{2}}\|\boldsymbol{w}\|_{0,e}, \quad \forall \tau \in \omega_e. \end{eqnarray} \end{lemma} Next, we estimate each term of the error indicator $\eta(u_h,p_h;\mathcal{T}_h)$ given by \eqref{eta}, separately. We first estimate the first term $R_{1}$ of the error estimator. \begin{lemma}\label{Lemm:R1} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then we obtain \begin{equation}\label{eqn:R1} \sum_{\tau \in \mathcal{T}_h}\|R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2} \leqslant \|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}^{2}. \end{equation} \end{lemma} \begin{proof} We can observe that $R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)=p_{h}-\mathrm{curl}_h \boldsymbol{u}_{h} \in \mathbb{Q}_h\subset\mathbb{Q}$, and taking $q=R_{1}\left( \boldsymbol{u}_{h},p_{h} \right)$ in \eqref{Eqn:weak_1}, we have \begin{equation}\label{Eqn:qh-curluh} \left(p-\operatorname{curl} \boldsymbol{u}, R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)\right)_{\mathcal{T}_h}=0. \end{equation} Thus, by \eqref{Eqn:qh-curluh} and Cauchy-Schwarz inequality, we obtain \begin{eqnarray*} \sum_{\tau \in \mathcal{T}_h}\|R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2} &=& \left(p_{h}-\mathrm{curl}_h~\boldsymbol{u}_{h}, R_{1}\left( \boldsymbol{u}_{h},p_{h}\right)\right)_{\mathcal{T}_h}\\ &=& \left(p_{h}-p-\mathrm{curl}_h\left(\boldsymbol{u}_{h}-\boldsymbol{u}\right), R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)\right)_{\mathcal{T}_h} \\ &\leqslant& \left(\|p_{h}-p\|_{0,\Omega}+\|\mathrm{curl}_h\left(\boldsymbol{u}_{h}-\boldsymbol{u}\right)\|_{0,\Omega}\right)\|R_{1}\left( \boldsymbol{u}_{h},p_{h}\right)\|_{0,\Omega}, \end{eqnarray*} which implies \eqref{eqn:R1}. \end{proof} We estimate the second term $R_2$ of the error estimator $\eta(u_h,p_h;\mathcal{T}_h)$. \begin{lemma}\label{Lemm:R2} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then we have \begin{equation*} \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\|R_{2}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2} \lesssim C_2\Big( \left\| (\boldsymbol{u},p)-(\boldsymbol{u}_{h},p_h)\right\|_{\mathrm{DG}}^{2} + \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\tau}^{2} \Big), \end{equation*} where $C_2$ is a constant depending on $\|\alpha\|_{0,\infty}$ and $\|\beta\|_{0,\infty}$. \end{lemma} \begin{proof} Let $\boldsymbol{f}_{h} \in \mathcal{S}_{h}^{\mathrm{conf }}$ and let $\boldsymbol{w}:=\boldsymbol{f}_{h}-\boldsymbol{curl}_h~ \alpha p_{h} - \beta\boldsymbol{u}_{h}$. Hence $\boldsymbol{w}$ is also a polynomial on $\tau$. Let $\boldsymbol{w}_{b}=b_{\tau} \boldsymbol{w}$, we can observe that $\boldsymbol{w}_{b} \in \boldsymbol{H}_{0}^{1}(\tau) \subset \boldsymbol{H}_{0}^{1}(\Omega) \subset \boldsymbol{U}$. Setting $\boldsymbol{v}=\boldsymbol{w}_{b}$ in \eqref{Eqn:weak_2} and using Green's formula, we get \begin{equation}\label{Eqn:fh-curlaph-uh} \left(\boldsymbol{f} -\boldsymbol{curl}~ \alpha p - \beta\boldsymbol{u}, \boldsymbol{w}_{b}\right)_\tau=0. \end{equation} Then by using \eqref{Eqn:3.30}, the definitons of $\boldsymbol{w}$ and $\boldsymbol{w}_b$, \eqref{Eqn:fh-curlaph-uh} and Cauchy-Schwarz inequality, we have \begin{eqnarray}\label{R2_v} \|\boldsymbol{w}\|_{0,\tau}^{2} &\lesssim& \|b_{\tau}^{1 / 2} \boldsymbol{w}\|_{0,\tau}^{2} = (\boldsymbol{w},b_\tau\boldsymbol{w})_\tau \nonumber\\ &=& (\left(\boldsymbol{f}_{h}-\boldsymbol{curl}_h~\alpha p_{h} - \beta\boldsymbol{u}_{h}\right) , \boldsymbol{w}_{b})_\tau \nonumber\\ &=& \left(\left(\boldsymbol{f}_{h}-\boldsymbol{f}\right) - \boldsymbol{curl}_h~\alpha\left(p_{h}-p\right) - \beta\left(\boldsymbol{u}_{h}-\boldsymbol{u}\right), \boldsymbol{w}_{b}\right)_\tau \nonumber\\ &\lesssim& \left(\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \|\beta\|_{0,\infty}\left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}\right)\|\boldsymbol{w}_b\|_{0,\tau} \nonumber\\ && - \left(\boldsymbol{curl}_h~\alpha\left(p_{h}-p\right) , \boldsymbol{w}_{b}\right)_\tau. \end{eqnarray} According to the last term of right hand side \eqref{R2_v}, using Green's formula with the fact $\boldsymbol{w}_b=0$ on $\partial \tau$, Cauchy-Schwarz inequality and \eqref{Eqn:3.31}, we have \begin{eqnarray}\label{Eqn:vl2_curlp} \lefteqn{\left(\boldsymbol{curl}_h~\alpha\left(p_{h}-p\right) , \boldsymbol{w}_{b}\right)_\tau = \left(\alpha (p_{h}-p),\mathrm{curl}_h~ \boldsymbol{w}_{b}\right)_\tau} \nonumber\\ &\leqslant& \|\alpha\|_{0,\infty} \left\|p_{h}-p\right\|_{0,\tau}\left\|\mathrm{curl}_h~\boldsymbol{w}_{b}\right\|_{0,\tau} \lesssim h_{\tau}^{-1}\|\alpha\|_{0,\infty}\left\|p_{h}-p\right\|_{0,\tau}\|\boldsymbol{w}\|_{0,\tau}. \end{eqnarray} Using \eqref{R2_v} and \eqref{Eqn:vl2_curlp}, we get \begin{equation}\label{v_0} \|\boldsymbol{w}\|_{0,\tau} \lesssim \left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \|\beta\|_{0,\infty}\left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau} + h_{\tau}^{-1}\|\alpha\|_{0,\infty}\left\|p_{h}-p\right\|_{0,\tau}. \end{equation} By the definition of $R_{2}\left( \boldsymbol{u}_{h},p_{h}\right)$ and \eqref{v_0}, we obtain \begin{eqnarray*} \|R_{2}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau} &\leqslant& \|\boldsymbol{w}\|_{0,\tau} + \left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} \\ &\lesssim& C_2\Big( \left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}+h_{\tau}^{-1}\left\|p_{h}-p\right\|_{0,\tau} \Big), \end{eqnarray*} which implies \begin{eqnarray*} \lefteqn{ \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\|R_{2}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2}} \\ && \lesssim C_2\Big( \sum_{\tau \in \mathcal{T}_h}\left(h_{\tau}^{2}\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau}^{2} + h_{\tau}^{2}\left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}^{2} + \left\|p_{h}-p\right\|_{0,\tau}^{2}\right) \Big) \\ && \lesssim C_2\Big( \left\| (\boldsymbol{u},p)-(\boldsymbol{u}_{h},p_h)\right\|_{\mathrm{DG}}^{2} + \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau}^{2} \Big). \end{eqnarray*} \end{proof} In the following, we turn to estimate the third term $R_{3}$ of the error estimator. \begin{lemma}\label{Lemm:R3} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then we have \begin{equation}\label{h2R_3} \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau}^{2} \lesssim C_1\Big( \left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0,\Omega}^{2}+\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\Omega}^{2}+\sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2}\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau}^{2} \Big), \end{equation} where $C_1$ is a constant depending on $\|\beta\|_{0,\infty}$. \end{lemma} \begin{proof} Let $\boldsymbol{f}_{h} \in \mathcal{S}_{h}^{\text {conf }}$, $\chi:=\nabla \cdot\left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right)$ and $\chi_{b}=b_{\tau} \chi$, where $\chi$ is a polynomial on each $\tau \in \mathcal{T}$ and $\chi_{b} \in H_{0}^{1}(\tau) \subset H_{0}^{1}(\Omega)$. Setting $\boldsymbol{v}=\nabla \chi_{b} \in \boldsymbol{U}$ in \eqref{Eqn:weak_2} and with the fact $\chi_b|_{\partial\tau}=0$, we get \begin{equation}\label{Eqn:f-beta} \left(\boldsymbol{f} -\beta \boldsymbol{u}, \nabla \chi_{b}\right)_{\tau}=0. \end{equation} Then, using \eqref{Eqn:3.24}, the Green's formula and \eqref{Eqn:f-beta}, we obtain \begin{eqnarray*} \|\chi\|_{0,\tau}^{2} &\lesssim& \|b_{\tau}^{1 / 2} \chi\|_{0,\tau}^{2} = (\chi,b_\tau\chi) = (\nabla \cdot\left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right) ,\chi_{b})_\tau\\ &=& -(\left(\boldsymbol{f}_{h} -\beta \boldsymbol{u}_{h}\right), \nabla \chi_{b})_\tau = \left(\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)-\beta\left(\boldsymbol{u}-\boldsymbol{u}_{h}\right) ,\nabla \chi_{b}\right)_\tau. \end{eqnarray*} According to the inverse inequalities, there holds \begin{eqnarray*} \|\chi\|_{0,\tau}^{2} &\leqslant& \left(\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \|\beta\|_{0,\infty}\left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}\right)\left\|\nabla \chi_{b}\right\|_{0,\tau}\\ &\lesssim& C_1h_{\tau}^{-1}\left(\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}\right)\|\chi\|_{0,\tau}, \end{eqnarray*} which imples \begin{equation}\label{h_tau} h_\tau\|\chi\|\lesssim C_1\left(\left\|\boldsymbol{f}_{h}-\boldsymbol{f}\right\|_{0,\tau} + \left\|\boldsymbol{u}_{h}-\boldsymbol{u}\right\|_{0,\tau}\right). \end{equation} Then combing the definition of $R_3(\boldsymbol{u}_h)$, triangle inequality and \eqref{h_tau}, we get \begin{eqnarray*} h_\tau\|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau} &\leqslant& h_\tau\|\chi\|_{0,\tau} + h_\tau\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau} \\ &\lesssim& C_1\left(\|\boldsymbol{f}_{h}-\boldsymbol{f}\|_{0,\tau}+\|\boldsymbol{u}_{h}-\boldsymbol{u}\|_{0,\tau}\right) + h_\tau\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau}. \end{eqnarray*} Summing over all elements $\tau \in \mathcal{T}$, the result \eqref{h2R_3} follows directly. \end{proof} Next, we turn to bound the fourth term $J_{1}$ of the error estimator. \begin{lemma}\label{Lemm:J1} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then we have \begin{eqnarray*} \lefteqn{ \sum_{e \in \mathcal{E}_h} h_{e}\|J_{1}\left(p_{h}\right)\|_{0,e}^{2}} \\ &&\lesssim C_2\Big( \sum_{\tau \in \mathcal{T}_h} \|R_{1}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2} + \sum_{\tau \in \mathcal{T}_h} h_{e}^{2}\|R_{2}\left(\boldsymbol{u}_{h},p_{h} \right)\|_{0,\tau}^{2} + \left\| (\boldsymbol{u},p)-(\boldsymbol{u}_{h},p_h)\right\|_{\mathrm{DG}}^{2} \Big), \end{eqnarray*} where $C_2$ is a constant depending on $\|\alpha\|_{0,\infty}$ and $\|\beta\|_{0,\infty}$. \end{lemma} \begin{proof} Without loss of generality, let $e\in \mathcal{E}_h$ be the common edge of $\tau_1\in \mathcal{T}_h$ and $\tau_2\in \mathcal{T}_h$, we give the following definition \begin{equation}\label{Eqn:3-3-e} \boldsymbol{w}_{h} = [[\alpha{p}_{h}]]_{e}, \quad \tilde{\boldsymbol{w}}_{b}=b_e \boldsymbol{w}_{h} \in H^1_0(\tau_{1}\cup\tau_2). \end{equation} Applying \eqref{Eqn:3-3-e}, $[[\alpha\mathrm{curl}~\boldsymbol{u}]]_{e}=\boldsymbol{0}$, Green's fromula, \eqref{Eqn:weak_1} and \eqref{Eqn:weak_2}, we get \begin{eqnarray} \nonumber \lefteqn{\|b_e^{\frac{1}{2}} \boldsymbol{w}_h\|^2_{0, e} =\left\langle \boldsymbol{w}_h, b_e\boldsymbol{w}_h\right\rangle_e }\\ \nonumber &=& \left\langle [[ \alpha{p}_{h}]]_e, \tilde{\boldsymbol{w}}_{b}\right\rangle_e \\ \nonumber &=& \left\langle [[ \alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}) ]]_{e}, \tilde{\boldsymbol{w}}_{b}\right\rangle_e \\ \nonumber &=& \sum\limits_{\tau\in \omega_e}\left[\left( \boldsymbol{curl}\left( \alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}) \right), \tilde{\boldsymbol{w}}_{b} \right)_\tau - \left( \alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}), \mathrm{curl}~\tilde{\boldsymbol{w}}_{b} \right)_\tau\right] \\ \nonumber &=& \sum\limits_{\tau\in \omega_e}\left[\left( \boldsymbol{curl}~ \alpha p_{h}-\boldsymbol{curl}~\alpha\mathrm{curl}~\boldsymbol{u} + \boldsymbol{f}-\boldsymbol{f} + \beta\boldsymbol{u}-\beta\boldsymbol{u} + \beta\boldsymbol{u}_h-\beta\boldsymbol{u}_h, \tilde{\boldsymbol{w}}_{b}\right)_\tau \right. \\ \nonumber && \left. -\left(\alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}), \mathrm{curl}~\tilde{\boldsymbol{w}}_{b}\right)_\tau\right] \\ \nonumber &=& \sum\limits_{\tau\in \omega_e}\left[ \left( \boldsymbol{curl}~\alpha p_h + \beta\boldsymbol{u}_h - \boldsymbol{f}, \tilde{\boldsymbol{w}}_{b}\right)_\tau + \left(\beta\boldsymbol{u}-\beta\boldsymbol{u}_h, \tilde{\boldsymbol{w}}_{b}\right)_\tau \right. \\ \label{Eqn:3.3.13h} && \left. -\left(\alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}), \mathrm{curl} ~\tilde{\boldsymbol{w}}_{b}\right)_\tau\right]. \end{eqnarray} Using \eqref{Eqn:3.32}, \eqref{Eqn:3.3.13h}, Cauchy-Schwarz inequality, \eqref{Eqn:3.33} and \eqref{Eqn:3.34}, there holds \begin{eqnarray*} \lefteqn{\|\boldsymbol{w}_h\|^2_{0, e}\lesssim\|b_e^{\frac{1}{2}} \boldsymbol{w}_h\|^2_{0, e} } \\ &\lesssim& \sum\limits_{\tau\in \omega_e}\left[ \left( \boldsymbol{curl}~\alpha p_{h} + \beta\boldsymbol{u}_h - \boldsymbol{f}, \tilde{\boldsymbol{w}}_{b}\right)_\tau + \left(\beta\boldsymbol{u}-\beta\boldsymbol{u}_h, \tilde{\boldsymbol{w}}_{b}\right)_\tau \right. \\ && \left. -\left(\alpha (p_{h}-\mathrm{curl}~\boldsymbol{u}), \mathrm{curl}~ \tilde{\boldsymbol{w}}_{b}\right)_\tau\right] \\ &\lesssim& \sum\limits_{\tau\in \omega_e}\left( \left\|\boldsymbol{curl}~\alpha p_{h} + \beta\boldsymbol{u}_h - \boldsymbol{f}\right\|_{0, \tau}\cdot\left\|\tilde{\boldsymbol{w}}_{b}\right\|_{0, \tau} + \|\beta\|_{0,\infty}\left\|\boldsymbol{u}-\boldsymbol{u}_h\right\|_{0, \tau}\cdot\left\|\tilde{\boldsymbol{w}}_{b}\right\|_{0, \tau} \right. \\ && \left. +\|\alpha\|_{0,\infty}\left\|p_{h}-\mathrm{curl}~\boldsymbol{u}\right\|_{0, \tau}\cdot\left\|\mathrm{curl}~ \tilde{\boldsymbol{w}}_{b}\right\|_{0, \tau}\right) \\ &\lesssim& C_2\sum\limits_{\tau\in \omega_e}\left( \left\|\boldsymbol{curl}~\alpha p_{h} + \beta\boldsymbol{u}_h - \boldsymbol{f}\right\|_{0, \tau}\cdot h^{\frac{1}{2}}_e\left\|\boldsymbol{w}_{h}\right\|_{0, e} \right. \\ && \left. +\left\|\boldsymbol{u}-\boldsymbol{u}_h\right\|_{0, \tau}\cdot h^{\frac{1}{2}}_e\left\|\boldsymbol{w}_{h}\right\|_{0, e} + \left\|p_{h}-\mathrm{curl}~\boldsymbol{u}\right\|_{0, \tau}\cdot h^{-\frac{1}{2}}_e\left\|\boldsymbol{w}_{h}\right\|_{0, e}\right) \\ &\lesssim& C_2\sum\limits_{\tau\in \omega_e}\left( h^{\frac{1}{2}}_e \left\|\boldsymbol{curl}~\alpha p_{h} + \beta\boldsymbol{u}_h - \boldsymbol{f}\right\|_{0, \tau}+h^{\frac{1}{2}}_e \left\|\boldsymbol{u}-\boldsymbol{u}_h\right\|_{0, \tau} \right. \\ && \left. +h^{-\frac{1}{2}}_e\left\|p_{h}-\mathrm{curl}_h~\boldsymbol{u}_h\right\|_{0, \tau} +h^{-\frac{1}{2}}_e\left\|\mathrm{curl}~\boldsymbol{u}-\mathrm{curl}_h~\boldsymbol{u}_h\right\|_{0, \tau} \right)\cdot \left\|\boldsymbol{w}_{h}\right\|_{0, e}, \end{eqnarray*} which imples \begin{eqnarray} \nonumber \left\|\boldsymbol{w}_h\right\|_{0, e} &\lesssim& C_2\sum\limits_{\tau\in \omega_e}\left( h^{\frac{1}{2}}_e \left\|\boldsymbol{f}-\boldsymbol{curl}~\alpha p_h-\beta\boldsymbol{u}_h\right\|_{0, \tau} + h^{\frac{1}{2}}_e \left\|\boldsymbol{u}-\boldsymbol{u}_h\right\|_{0, \tau} \right. \\ \label{Eqn:3.41} && \left. +h^{-\frac{1}{2}}_e\left\|p_{h}-\mathrm{curl}_h~\boldsymbol{u}_h\right\|_{0, \tau} +h^{-\frac{1}{2}}_e\left\|\mathrm{curl}~\boldsymbol{u}-\mathrm{curl}_h~\boldsymbol{u}_h\right\|_{0, \tau}\right). \end{eqnarray} Applying \eqref{Eqn:3-3-e} and \eqref{Eqn:3.41} results in \begin{eqnarray*} \lefteqn{h_e\|J_1( p_h)\|^2_{0, e} = h_e\|[[\alpha p_h]]_\tau\|^2_{0, e} = h_e\left\|\boldsymbol{w}_h\right\|^2_{0, e} } \\ && \lesssim C_2\Big( \sum\limits_{\tau\in \omega_e}\left( \| R_1(\boldsymbol{u}_h,p_h) \|_{0, \tau} + h_e^2\| R_2(\boldsymbol{u}_h,p_h) \|_{0, \tau} \right) + \|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}^{2} \Big). \end{eqnarray*} \end{proof} At last, we turn to bound the fifth term $J_{2}$ of the error estimator. \begin{lemma}\label{lem:J2} Let $(\boldsymbol{u},p)\in\boldsymbol{U}\times\mathbb{Q}$ and $(\boldsymbol{u}_h,p_h)\in\boldsymbol{U}_h\times\mathbb{Q}_h$ be the solutions of \eqref{Eqn:weak_1}-\eqref{Eqn:weak_2} and \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2}, respectively. Then we have \begin{equation*} \sum_{e \in \mathcal{E}_h} h_{e}\|J_{2}\left(\boldsymbol{u}_{h}\right)\|_{0,e}^{2} \lesssim C_2\Big( \|\boldsymbol{u}-\boldsymbol{u}_{h}\|_{0,\Omega}^{2} + \|\boldsymbol{f}-\boldsymbol{f}_{h}\|_{0,\Omega}^{2} + \sum_{\tau \in \mathcal{T}_h} h_{\tau}^{2} \|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\Omega}^{2} \Big), \end{equation*} where $C_1$ is a constant depending on $\|\beta\|_{0,\infty}$. \end{lemma} \begin{proof} Without loss of generality, let $e \in \mathcal{E}_h$ be the common edge of $\tau_{1}$ and $\tau_{2}$. Setting $\phi=[(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h})]_e$ and $\tilde{\phi}_{b}=b_{e} \phi$, then according to \eqref{Eqn:3.26}, there holds \begin{eqnarray}\label{f_h-betauh} \|\phi\|_{0,e}^{2} &\lesssim& \|b_{e}^{1 / 2} \phi\|_{0,e}^{2} = (\phi,b_e\phi) = \langle [ \left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right)]_e, \tilde{\phi}_{b} \rangle_e \nonumber \\ &=& \sum_{i=1,2}\left( ( \nabla \cdot\left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right), \tilde{\phi}_{b})_{\tau_{i}} + (\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}, \nabla \tilde{\phi}_{b})_{\tau_{i}} \right), \end{eqnarray} where we have used the fact that $\tilde{\phi}_{b} \in H_{0}^{1}\left(\tau_{1} \cup \tau_{2}\right)$. Applying the definition of $R_{3}\left(\boldsymbol{u}_{h}\right)$ and \eqref{Eqn:3.27} to the first term $( \nabla \cdot\left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right), \tilde{\phi}_{b})_{\tau_{i}}$ of \eqref{f_h-betauh} gives \begin{eqnarray} (\nabla \cdot\left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h}\right), \tilde{\phi}_{b})_{\tau_{i}} &=& (R_{3}\left(\boldsymbol{u}_{h}\right), \tilde{\phi}_{b})_{\tau_{i}} + (\nabla \cdot\left(\boldsymbol{f}_{h}-\boldsymbol{f}\right), \tilde{\phi}_{b} )_{\tau_{i}} \nonumber\\ &\leqslant& \left(\|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau_{i}}+\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau_{i}}\right) \cdot\|\tilde{\phi}_{b}\|_{0,\tau_{i}} \nonumber\\ &\lesssim& h_{e}^{\frac{1}{2}}\left(\|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau_{i}} + \|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau_{i}}\right) \cdot\|\phi\|_{0,e}. \end{eqnarray} Using the Cauchy-Schwarz inequality and \eqref{Eqn:3.28} to the second term of \eqref{f_h-betauh} gives \begin{eqnarray} \lefteqn{\sum_{i=1,2} \left(\boldsymbol{f}_{h}-\beta \boldsymbol{u}_{h} , \nabla \tilde{\phi}_{b} \right)_{\tau_{i}} = \sum_{i=1,2} \left(\boldsymbol{f}_{h}-\boldsymbol{f}-\beta\left(\boldsymbol{u}_{h}-\boldsymbol{u}\right) , \nabla \tilde{\phi}_{b}\right)_{\tau_{i}}} \nonumber\\ &\lesssim& C_1\sum_{i=1,2}\left(\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\tau_{i}}+\left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0,\tau_{i}}\right)\cdot\|\nabla \tilde{\phi}_{b}\|_{0,\tau_{i}}\nonumber\\ &\lesssim& C_1\sum_{i=1,2} h_{e}^{-1 / 2}\left(\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\tau_{i}}+\left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0,\tau_{i}}\right) \cdot\|\phi\|_{0,e}, \end{eqnarray} where we have used $ \left(\boldsymbol{f}-\beta \boldsymbol{u}, \nabla \tilde{\phi}_{b}\right)_{\tau_{1} \cup \tau_{2}}=0$ when we set $\boldsymbol{v}=\nabla \tilde{\phi}_{b} \in \boldsymbol{U}$ in \eqref{Eqn:weak_2}. According to the assumptions $\boldsymbol{f} \in \boldsymbol{H}(\operatorname{div}, \Omega)$ and $\boldsymbol{f}_{h} \in \mathcal{S}_{h}^{\text {conf }} $, there holds \begin{equation}\label{f-f_h} [\boldsymbol{f}-\boldsymbol{f}_{h}]_{e}=0. \end{equation} Due to the definition of $J_{2}\left(\boldsymbol{u}_{h}\right)$ and \eqref{f_h-betauh}-\eqref{f-f_h}, we arrive at \begin{eqnarray*} \|J_{2}\left(\boldsymbol{u}_{h}\right)\|_{0,e} &=& \|\phi\|_{0,e}+\|[\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)]_e\|_{0,e} \\ &\lesssim& C_1\sum_{i=1,2} \Big( h_{e}^{1 / 2}\left(\|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau_{i}} + \|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau_{i}}\right) \Big. \\ &&\Big.+ h_{e}^{-1 / 2}\left(\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\tau_{i}} + \left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0,\tau_{i}}\right) \Big). \end{eqnarray*} Hence, combining Lemma \ref{Lemm:R3}, we have \begin{eqnarray*} \sum_{e} h_{e}\|J_{2} \left(\boldsymbol{u}_{h}\right)\|_{0,e}^{2} &\lesssim& C_1\sum_{\tau}\left(h_{\tau_{i}}^{2}\left( \|R_{3}\left(\boldsymbol{u}_{h}\right)\|_{0,\tau_{i}}^2 + \|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\tau_{i}}^2\right) \right.\\ &&\left.+\left\|\boldsymbol{f}-\boldsymbol{f}_{h}\right\|_{0,\tau_{i}}^2 + \left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0,\tau_{i}}^2\right) \\ &\lesssim& C_1\Big( \|\boldsymbol{u}-\boldsymbol{u}_{h}\|_{0,\Omega}^{2} +\|\boldsymbol{f}-\boldsymbol{f}_{h}\|_{0,\Omega}^{2}+h^2_\tau\|\nabla \cdot\left(\boldsymbol{f}-\boldsymbol{f}_{h}\right)\|_{0,\Omega}^{2} \Big). \end{eqnarray*} \end{proof} Next, we present the proof of Theorem \ref{The:eff}. \begin{proof}[Proof of Theorem \ref{The:eff}.]\ The following result follows immediately by a direct application of Lemmas \ref{Lemm:R1}-\ref{lem:J2}, \begin{equation*} \kappa\sum_{e\in\mathcal{T}_h}\sum_{e\in\partial\tau}h^{-1}_e\left\|J_3(\boldsymbol{u}_h)\right\|^2_{0, e} \lesssim \|(\boldsymbol{u},p)-(\boldsymbol{u}_h,p_h)\|_{DG}. \end{equation*} \end{proof} \section{Numerical experiment}\label{sec:6} In this section, we report some experiments to show the performance of the error indicator and the adaptive algorithm AMIPDG. We carry out these numerical experiments by using the MATLAB software package iFEM \cite{ChenLiFEM}. In Experiments \ref{Exa:ex1} and \ref{Exa:ex3}, we take $p=\mathrm{curl}~\boldsymbol{u}$. In Example \ref{Exa:ex1}, we discuss the influence of the penalty parameter $\kappa$ on the error both in $L^2$ and $\|\cdot\|_{DG}$ norms, and observe the dependency of the condition number of stiffness matrix on $\kappa$. At last, we verify the reliability and efficiency of the constructed error indicator \eqref{eta}. \begin{example}\label{Exa:ex1} Let $\Omega:=[-1,1] \times[-1,1]$, we construct the following analytical solution of the model \eqref{Equ:1.1}-\eqref{Equ:1.2}: $$ \boldsymbol{u}=\left(\begin{array}{c} \cos (\pi x) \sin (\pi y) \\ -\cos (\pi y) \sin (\pi x) \end{array}\right) $$ with coefficients $$ \alpha=1, \quad \beta=1, $$ which corresponds to a right hand source term $$ \boldsymbol{f}(x, y)=\left(\begin{array}{c} \left(2 \pi^{2}-1\right) \cos (\pi x) \sin (\pi y) \\ -\left(2 \pi^{2}-1\right) \cos (\pi y) \sin (\pi x) \end{array}\right). $$ It is easy to see that the solution $\boldsymbol{u}$ satisfies the boundary condition $\boldsymbol{u} \cdot \boldsymbol{t}=0$ on $\partial \Omega$. \end{example} In this example, we get an uniform meshes by partitioning the $x-$ and $y-$ into equally distributed $M(M\geq 2)$ subintervals, and then dividing one square into two triangles. Let $h=1/M$ be mesh sizes for different triangular meshes. Firstly, we fixed mesh with $h=1/32$ and report the error estimates in both $L^2$ and $\|\cdot\|_{DG}$ norm for different penalty parameters $ \kappa = 1, 50, 100, 150$ and $200$ in Table \ref{Tab_111}. We note that $\left\|\boldsymbol{u}-\boldsymbol{u}_{h}\right\|_{0}$ increases slightly as the penalty parameter $\kappa$ increases. On the contrary, $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ decreases slightly as $\kappa$ increases. \begin{table}[ht] \centering\caption{The errors in both $L^2$ and $\|\cdot\|_{DG}$ norms with $h=1/32$.}\label{Tab_111} \begin{tabular}{ccc} \hline $\kappa $ & $\|\boldsymbol{u}-\boldsymbol{u}_h\|_0$ & $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ \\ \hline 1 & 2.00399e-02 & 1.51333e-01 \\ 50 & 2.00391e-02 & 1.46739e-01 \\ 100 & 2.00397e-02 & 1.46733e-01 \\ 150 & 2.00400e-02 & 1.46732e-01 \\ 200 & 2.00401e-02 & 1.46732e-01 \\ \hline \end{tabular} \end{table} Next, we also use fixed mesh with $h=1/32$, and observe the influence of different $\kappa$ on the condition numbers of stiffness matrices in Table \ref{Tab_2}. It is easy to see that the condition numbers of stiffness matrices increase with the increase of penalty parameters $\kappa$. \begin{table}[ht] \centering\caption{Condition number of stiffness matrices with different $\kappa$.}\label{Tab_2} \begin{tabular}{ccccccc} \hline $\kappa$ & 1 & 50 & 100 & 150 & 200 \\\hline Cond &3.40461e+05 & 1.11946e+07 & 2.42288e+07& 3.73104e+07 & 5.04046e+07\\ \hline \end{tabular} \end{table} As a way to balance, in the following numerical tests, we always choose $\kappa=50$. Now, we verify the reliability and efficiency of the error estimate by comparing $\eta\left(\boldsymbol{u}_{h}, {p}_{h} ; \mathcal{T}_{h}\right)$ with $\|(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h})\|_{\mathrm{DG}}$. The numerical results are given in Table \ref{Tab:eta} which also provide the values for the effectivity index $\sigma=\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}/\eta\left(\boldsymbol{u}_{h}, {p}_{h} ; \mathcal{T}_{h}\right)$. We observe that the convergence rate of $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ is first order and the effectivity index $\sigma \approx$ 0.286. This shows that the error indicator is effective and reliable, which is \eqref{Eqn:goodind}. \noindent \begin{table}[ht] \centering\caption{Rate of convergence of the $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ and $\eta\left(\boldsymbol{u}_{h}, {p}_{h} ; \mathcal{T}_{h}\right)$ on uniform triangular meshes. }\label{Tab:eta} \label{table-2}\vskip 0.1cm \begin{tabular}{{p{1cm}p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}}}\hline \multirow{2}{*} {$h$}& \multicolumn{2}{c}{$\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$} & \multicolumn{2}{c}{$\eta\left(\boldsymbol{u}_{h}, {p}_{h} ; \mathcal{T}_{h}\right)$} & \multicolumn{1}{c}{index } \\\cline { 2 - 3 } \cline { 4 - 5 } & \multicolumn{1}{c}{Error} & \multicolumn{1}{c}{order} & \multicolumn{1}{c}{Error} &\multicolumn{1}{c}{order} & \multicolumn{1}{c}{$\sigma$} \\ \hline 1/16 & \multicolumn{1}{c}{2.93259E-01} & \multicolumn{1}{c}{N/A} & \multicolumn{1}{c}{1.02621E-00} & \multicolumn{1}{c}{N/A} & \multicolumn{1}{c}{0.286}\\ 1/32 & \multicolumn{1}{c}{1.46739E-01} & \multicolumn{1}{c}{0.9989} & \multicolumn{1}{c}{5.13690E-01} & \multicolumn{1}{c}{0.9984} & \multicolumn{1}{c}{0.286}\\ 1/64 & \multicolumn{1}{c}{7.33830E-02} & \multicolumn{1}{c}{0.9997} & \multicolumn{1}{c}{2.56920E-01} & \multicolumn{1}{c}{0.9996} & \multicolumn{1}{c}{0.286}\\ 1/128 & \multicolumn{1}{c}{3.66932E-02} & \multicolumn{1}{c}{0.9999} & \multicolumn{1}{c}{1.28470E-02} & \multicolumn{1}{c}{0.9999} & \multicolumn{1}{c}{0.286}\\ 1/256 & \multicolumn{1}{c}{1.83468E-02} & \multicolumn{1}{c}{1.0000} & \multicolumn{1}{c}{6.42365E-02} & \multicolumn{1}{c}{1.0000} & \multicolumn{1}{c}{0.286} \\ \hline \end{tabular} \end{table} Noting that we only consider uniform meshes and the constant coefficients in Example \ref{Exa:ex1}. Next we test adaptive meshes and the jump coefficients. Our adaptive cycle can be implemented by the following algorithm: \begin{algorithm} \caption{An adaptive mixed interior penalty discontinuous method (AMIPDG) cycle} \label{ALG1} \begin{algorithmic} \STATE { \textbf{Input} initial triangulation $\mathcal{T}_0$; data $\boldsymbol{f}$; tolerance tol; marking parameter $\theta\in(0,1)$.} \STATE{ \textbf{Output} a triangulation $\mathcal{T}_J$; MIPDG solution $(\boldsymbol{u}_J,p_J)$.} \STATE{ $\eta=1;k=0;$} \STATE{\textbf{while} $\eta\geq tol$} \STATE{ ~~~~\textbf{SOLVE} solve discrete varational problem \eqref{Eqn:dweak_1}-\eqref{Eqn:dweak_2} on $\mathcal{T}_k$ to get the solution $(\boldsymbol{u}_k,p_k)$;} \STATE{ ~~~~\textbf{ESTIMATE} compute the posterior error estimator $\eta=\eta(\boldsymbol{u}_k,p_k,\mathcal{T}_k)$ by using \eqref{eta};} \STATE{ ~~~~\textbf{MARK} seek a minimum cardinality $\mathcal{M}_{k} \subset \mathcal{T}_{k}$ such that \begin{equation*}\label{mark} \eta^{2}\left(\boldsymbol{u}_{k},p_k, \mathcal{M}_{k}\right) \geq \theta \eta^{2}\left(\boldsymbol{u}_{k},p_k, \mathcal{T}_{k}\right); \end{equation*}} \STATE{ ~~~~\textbf{REFINE} Bisect elements in $\mathcal{M}_k$ and the neighboring elements to form a conforming $\mathcal{T}_{k+1}$;} \STATE{ ~~~~$k=k+1$; } \STATE{\textbf{end}} \STATE{$u_J=u_k;~p_J=p_k;~\mathcal{T}_J=\mathcal{T}_k;$} \end{algorithmic} \end{algorithm} \begin{example}\label{Exa:ex3} Let $\Omega:=[-1,1] \times[-1,1]$, we construct the following analytical solution of the model \eqref{Equ:1.1}-\eqref{Equ:1.2} $$ \boldsymbol{u}=\left(\begin{array}{c} \frac{y\left(x^{2}-1\right)\left(y^{2}-1\right)}{x^{2}+y^{2}+0.02} \\ \frac{-x\left(x^{2}-1\right)\left(y^{2}-1\right)}{x^{2}+y^{2}+0.02} \end{array}\right), $$ with the jump coefficients $$ \begin{array}{ll} \alpha=1.0, \beta=1.0, & \text { on } \Omega_{1}, \\ \alpha=1.0, \beta=100, & \text { on } \Omega \backslash \Omega_{1}, \end{array} $$ where $\Omega_{1}=(-0.5,0.5)^{2}$(see the left of Figure \ref{fig:ex3_mesh_figure}). Note that the solution $\boldsymbol{u}$ satisfies the condition $ \boldsymbol{u}\cdot\boldsymbol{t}=0$ on $\partial \Omega$. \end{example} Here, we can observe that $\boldsymbol{u}$ has a relatively large change at $(0,0)$. Figure \ref{fig:ex3_figure} shows the contours of the exact solution. \begin{figure}[ht] \begin{minipage}[t]{0.48\linewidth} \centering \includegraphics[height=5.2cm,width=6.8cm]{Figures/ex2_u1.png} \end{minipage} \begin{minipage}[t]{0.48\linewidth} \centering \includegraphics[height=5.2cm,width=6.8cm]{Figures/ex2_u2.png} \end{minipage} \caption{Left: the first component of the analytical solution. Right: the second component of the analytical solution.}\label{fig:ex3_figure} \end{figure} We get an initial mesh $\mathcal{T}_0$ by partitioning the $x$- and $y$-axes into equally distributed eight subintervals and then dividing one square into two triangles, see the middle of Figure \ref{fig:ex3_mesh_figure}. The right of Figure \ref{fig:ex3_mesh_figure} shows an adaptively refined mesh with marking parameter $\theta=0.5$ after $k=8$, and we can see that the grid is locally refined near both the origin and at $\partial\Omega_1$. \begin{figure}[ht] \subfigure{} \begin{minipage}[t]{4cm} \centering \includegraphics[height=3cm,width=3.4cm]{Figures/discon.png} \end{minipage} \subfigure{} \begin{minipage}[t]{4cm} \centering \includegraphics[height=3cm,width=4.0cm]{Figures/ini.png} \end{minipage} \subfigure{} \begin{minipage}[t]{4cm} \centering \includegraphics[height=3cm,width=4.0cm]{Figures/051.png} \end{minipage} \caption{Left: regional diagram. Middle: the initial mesh with 512 DoFs. Right: the adaptive mesh($\theta=0.5$) with 20416 DoFs after 8 refinements.}\label{fig:ex3_mesh_figure} \end{figure} Figure \ref{fig:ex3_res} shows the curves of $\ln N-\ln\|(p-p_k,\boldsymbol{u}-\boldsymbol{u}_k)\|_{DG}$ for different marking parameters $\theta=0.3, 0.5$ and $0.7$, where $N$ is the number of degrees of freedom. The curves indicate the convergence and the quasi-optimality of the adaptive algorithm AMIPDG of the energy error $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$, i.e. \begin{equation*} \|(p-p_k,\boldsymbol{u}-\boldsymbol{u}_k)\|_{DG}\lesssim N^{-1/2}. \end{equation*} From these curves, it seems that the convergence rate are robust for $\theta$ changing from $0.3$ to $0.7$. \begin{figure}[ht] \centering \includegraphics[height=8cm,width=10cm]{Figures/z_eta.png} \caption{Quasi optimality of the AMIPDG of the error $\|\left(p-p_{h}, \boldsymbol{u}-\boldsymbol{u}_{h}\right)\|_{\mathrm{DG}}$ with different marking parameters $\theta$.}\label{fig:ex3_res} \end{figure} The examples above are considered convex domain and the jump coefficients. Finally we consider variable coefficients, `L-shaped' domain and unknown exact solution. \begin{example}\label{Exa:ex2} Let domain $\Omega=(-1,1)^{2}/([0,1)\times[0,1))$ and let the variable coefficients $$ \alpha=\frac{1}{1+x^{2}+y^{2}}, \quad \beta=\left(\begin{array}{cc} 1+x^{2} & x y \\ x y & 1+y^{2} \end{array}\right). $$ We set the homogeneous Dirichlet boundary condition $\boldsymbol{u}\cdot\boldsymbol{t}=0$ on $\partial\Omega$, the source $f=(\frac{1}{x^2+y^2+0.01},\frac{1}{x^2+y^2+0.01})$. \end{example} We get an initial mesh $\mathcal{T}_0$ by partitioning the $x$- and $y$-axes into equally distributed eight subintervals and then dividing one square into two triangles, see the left of Figure \ref{fig:ex2_mesh_figure}. The right of Figure \ref{fig:ex2_mesh_figure} shows an adaptively refined mesh with marking parameter- $\theta=0.5$ after $k=8$. The grid is locally refined near the origin. \begin{figure}[h] \begin{minipage}[t]{0.48\linewidth} \centering \includegraphics[height=5cm,width=6cm]{Figures/init_L.png} \end{minipage} \begin{minipage}[t]{0.48\linewidth} \centering \includegraphics[height=5cm,width=6cm]{Figures/ini_3.png} \end{minipage} \caption{Left: the initial mesh with 384 DoFs. Right: the adaptive mesh($\theta=0.5$) with 16032 DoFs after 8 refinements.}\label{fig:ex2_mesh_figure} \end{figure} The Figure \ref{fig:ex2_res} shows the curves of $\ln N -\ln\eta\left(\boldsymbol{u}_{k}, {p}_{k} ; \mathcal{T}_{k}\right)$ for parameters $\theta=0.3,0.5,0.7$. The curves indicate the convergence and the quasi-optimality of the adaptive algorithm AMIPDG of $\eta\left(\boldsymbol{u}_{k}, {p}_{k} ; \mathcal{T}_{k}\right)$. \begin{figure}[ht] \centering \includegraphics[height=8cm,width=10cm]{Figures/yita_3_2.png} \caption{Quasi optimality of the AMIPDG of the error $\eta\left(\boldsymbol{u}_{k}, {p}_{k} ; \mathcal{T}_{k}\right)$ with different marking parameters $\theta$.}\label{fig:ex2_res} \end{figure} \section*{Acknowledgments} The authors are supported by the National Natural Science Foundation of China (Grant No. 12071160). The second author is also supported by the National Natural Science Foundation of China (Grant No. 11901212).
\section{Introduction} Core-collapse supernovae (CCSNe) of prior generations of stars are thought to be a major source of elements heavier than iron in our Solar System~\cite{burbidge_etal_1957}. Hence, understanding their explosion mechanism is key to understanding the evolution of our Galaxy eventually supporting life on Earth. In this paper, we describe a concept for a new balloon-borne high-energy X-ray telescope and potential future satellite mission that will, among other science goals, provide new experimental insights into the inner workings of the CCSN engine. Supernovae as a source of heavy elements are supported both by theoretical considerations and experimental evidence. Since $^{56}$Fe\xspace is the nucleus with the lowest mass per nucleon, fusion of heavier elements cannot serve as a source of energy in stellar cores. Instead, heavier elements are formed via slow (\textit{s}-process) or rapid neutron capture (\textit{r}-process). Some of the earliest and strongest experimental evidence for nucleosynthesis in CCSNe comes from the detection of \SI{847}{keV} and \SI{1238}{keV} gamma-rays associated with the decay of $^{56}\text{Co}$ to $^{56}$Fe\xspace in SN~1987A~\cite{matz_etal_1988}. Direct evidence for the fact that our Solar System is indeed made of reprocessed stellar ejecta comes from the analysis of presolar grains in meteoritic material and interplanetary dust, whose isotopic composition is representative of the seed material of the Solar System.\cite{choi_etal_1998} In fact, recent simulations show that $15M_\odot$ CCSNe are capable of producing many of the isotopic anomalies found in certain presolar SiC grains~\cite{schulte_etal_2021}, which have long been argued to condense in supernovae~\cite{amari_etal_1992}. An important conclusion from the observations of high-energy X-ray and gamma-ray emission from SN~1987A soon after the explosion was that mixing of material from the different shells of the progenitor star must occur very early on in the explosion~\cite{herant_benz_1992}. This mixing moves radioactive nickel outward from the innermost parts of the ejecta, which then drives the X-ray emission. However, the details of this mixing and the underlying mechanism are still poorly understood and depend on the local conditions of the early shock, such as peak temperature and density. Due to these convective instabilities, anisotropies are expected in supernovae and their remnants. The structure of young supernova remnants (SNR) reflects the conditions of the explosion. Since many galactic SNR are spatially resolvable in X-rays and gamma-rays, these remnants are an excellent site to study supernova explosion physics. Regions where explosive Si burning occurs can be observed via the K line emission from $^{56}$Fe\xspace, which is a decay product of $^{56}$Ni\xspace produced during Si burning with relatively little dependence on local conditions. The observations, however, come with the caveats that the X-ray emission depends on the heating of the material in the shock, and that some of the iron may actually be interstellar material swept up in the shock rather than supernova ejecta. The production of $^{44}$Ti\xspace in the same regions, on the other hand, is very sensitive to the local conditions. This isotope with a half-life of \SI{58.9+-0.3}{yr}~\cite{ahmad_etal_2006} is in principle observable in galactic supernova remnants up to a few hundred years old. It decays via $^{44}\text{Ti} \to {}^{44}\text{Sc} \to {}^{44}\text{Ca}$, emitting gamma-rays with energies of \SIlist{1157;78.32;67.87}{keV} with branching ratios between \SI{93}{\percent} and \SI{99.9}{\percent}~\cite{chen_etal_2011}. These gamma-rays directly trace the distribution of $^{44}$Ti\xspace decays. Because of these properties, observations of $^{44}$Ti\xspace are a particularly powerful tool to test supernova models, which has been noted as early as 1969~\cite{clayton_etal_1969}. Here, we discuss a concept for a new balloon-borne high-energy X-ray telescope called \textit{ASCENT}\xspace (A SuperConducting ENergetic x-ray Telescope), which had been proposed to NASA's Astrophysics Pioneers program, and which could form the basis of a future \textit{NuSTAR}\xspace follow-up mission. \textit{ASCENT}\xspace consists of a novel transition edge sensor (TES) microcalorimeter gamma-ray detector array in the focal plane of a multi-layer coated Wolter-type focusing X-ray mirror. Transition edge sensors utilize the rapid change in conductivity with temperature of a superconductor at its superconducting transition temperature $T_c$ for calorimetric energy measurements~\cite{ullom_bennett_2015}. A gamma-ray spectrometer is constructed by coupling the TES to a thick absorbing structure, commonly made of Sn, which increases the quantum efficiency for the detection of \SIrange{10}{100}{keV} photons. Recently, an array consisting of 512 detectors with a spectral resolution of \SI{55}{eV} FWHM at \SI{97}{keV} has been demonstrated~\cite{mates_etal_2017}, and individual detectors have achieved a resolution as precise as~\SI{22}{eV}. Using these detectors, \textit{ASCENT}\xspace's spectral resolution will be about 15 times better than \textit{NuSTAR}\xspace in the \SIrange{60}{85}{keV} energy range (\SI{900}{eV} at \SI{60}{keV}).\cite{harrison_etal_2013} Additionally, \textit{ASCENT}\xspace will use a new Ni/C multilayer structure on its X-ray optics. The energy bandpass of \textit{NuSTAR}\xspace was limited by the platinum K edge at \SI{78.395}{keV} of its Pt/C multilayer, which prevents it from observing the blue-shifted \SI{78}{keV} $^{44}$Ti\xspace line. The use of a Ni/C multilayer will extend \textit{ASCENT}\xspace's bandpass to \SI{85}{keV} and beyond. Furthermore, its multilayer structure will be optimized for the \SIrange{55}{85}{keV} range, in order to maximize its effective area for observations of $^{44}$Ti\xspace. While the baseline angular resolution of the \textit{ASCENT}\xspace optics of \ang{;2;} will be slightly worse than \textit{NuSTAR}\xspace, it will still allow resolution of the most prominent $^{44}$Ti\xspace emission regions in Cas~A\xspace. Observations of the supernova remnant Cas~A\xspace with \textit{ASCENT}\xspace will test if asymmetries of the ejecta can completely account for compact remnant ``kicks''. Furthermore, they will allow us to determine the dominant pathway for the production of $^{44}$Ti\xspace. So far, $^{44}$Ti\xspace has only been firmly detected from two objects: SN~1987A~\cite{boggs_etal_2015,grebenev_etal_2012} and Cas~A\xspace~\cite{iyudin_etal_1994, vink_etal_2001,grefenstette_etal_2014}. Tentative detections from Vela~Jr.~\cite{iyudin_etal_1998} and Tycho's SNR~\cite{troja_etal_2014} have so far not been confirmed~\cite{tsygankov_etal_2016,lopez_etal_2015}. However, the Compton Spectrometer and Imager (\textit{COSI}\xspace) will map the Galaxy with unprecedented spectral and spatial resolution and may find additional sources of $^{44}$Ti\xspace emission~\cite{tomsick_etal_2021}. While \textit{COSI}\xspace is an excellent tool to discover $^{44}$Ti\xspace emission from additional SNR, its spatial and spectral resolution are not sufficient to map individual objects. A more sensitive space mission based on the \textit{ASCENT}\xspace design could follow up on these detections and provide detailed maps of additional SNR. This would answer the question whether features observed in Cas~A\xspace are universal or whether there is wide variation in the underlying engine depending on properties of the progenitor star. Furthermore, a detection of $^{44}$Ti\xspace from a remnant associated with a type Ia supernova, such as Tycho's SNR, would be a major breakthrough. Ordinarily, SNIa are not expected to produce much $^{44}$Ti\xspace. However, some models predict a potential detonation below the Chandrasekhar mass limit (see \textit{e.g.,}\xspace Woosley and Weaver, 1994~\cite{woosley_weaver_1994}), in which case a large amount of $^{44}$Ti\xspace may be produced. Such explosions are thought to be one of the candidates for the origin of Galactic positrons~\cite{crocker_etal_2017}. Thus, such an observation would not only constrain the SNIa explosion mechanism but also provide new insights into the origin of Galactic positrons. Launched on a stratospheric balloon from Kiruna, Sweden, \textit{ASCENT}\xspace will float westward at an altitude of about \SI{125000}{ft} to northern Canada. Typical flight times are 5--7 days, allowing for up to \SI{560}{ksec} of observation time of Cas~A\xspace. A Southern Hemisphere flight from McMurdo Station, Antarctica, will circle the South Pole at least once for a typical flight time of two weeks. Such a flight will allow deep observations of SN\,1987A. In Section~\ref{sec:objectives} we discuss the scientific questions addressed by the \textit{ASCENT}\xspace balloon mission, the technical aspects of which we describe in detail in Section~\ref{sec:implementation}. In Section~\ref{sec:sensitivity}, we present results of Geant4 Monte Carlo simulations of the expected performance of \textit{ASCENT}\xspace and the resulting sensitivity of the instrument to address its science goals. Finally, in Section~\ref{sec:summary}, we summarize the results and give an outlook towards a space-based mission based on the \textit{ASCENT}\xspace technology. \section{Scientific objectives}\label{sec:objectives} \textit{ASCENT}\xspace's improved spectral resolution will allow it to address some key questions brought up by the recent \textit{NuSTAR}\xspace observations of Cas~A\xspace: what is the source of compact remnant "kicks" and what are the conditions of $^{44}$Ti\xspace production in the Cas~A\xspace supernova remnant? The high yield of $^{44}$Ti\xspace detected in Cas~A\xspace~\cite{iyudin_etal_1994, vink_etal_2001, renaud_etal_2006,grefenstette_etal_2014,siegert_etal_2015} is seen as strong support for the expected anisotropies~\cite{young_etal_2006}. A \SI{2.4}{Ms} observation with the \textit{NuSTAR}\xspace satellite was used to obtain the first 3-D map of the $^{44}$Ti\xspace ejecta~\cite{grefenstette_etal_2014,grefenstette_etal_2017}, which confirmed these high yields and, furthermore, found that the $^{44}$Ti\xspace lies in clumpy structures. Because much of the $^{44}$Ti\xspace was found to lie in unshocked regions, its observation provides a pristine measurement of the asymmetries in the supernova engine, and this \textit{NuSTAR}\xspace data decisively showed that Cas~A\xspace was produced from an explosion with multiple outflows (as expected from the convective engine) and not a jet. However, the \textit{NuSTAR}\xspace observations left many questions unanswered and raised a series of new problems with our understanding of Cas~A\xspace, which \textit{ASCENT}\xspace will address. Along with $^{56}$Ni, $^{44}$Ti\xspace is produced in the innermost supernova ejecta. In contrast to $^{56}$Ni production, $^{44}$Ti\xspace production is extremely sensitive to the temperature and density evolution of the ejecta~\cite{magkotsios_etal_2010} and, hence, the nature of the explosion. Within \numrange{1}{2} years of a supernova explosion, $^{56}$Ni decays to stable iron. This iron produces emission lines when heated by the reverse shock as the supernova ejecta plows through the circumstellar medium and depends on the distribution of the circumstellar medium as well as the explosion, making its interpretation complicated. The innermost iron in the remnant is also difficult to measure accurately, since it is inside of the reverse shock and therefore cold. Although attempts have been made at detecting this iron in the infrared in Cas~A\xspace,\cite{koo_etal_2018} the unbiased nature of the $^{44}$Ti\xspace observations and their sensitivity to the explosion characteristics have led to $^{44}$Ti\xspace's important role in shaping our understanding of the core-collapse explosion. \subsection{The core collapse engine of Cas~A\xspace}% A key to understanding the core collapse supernova engine is understanding the production and mixing of $^{44}$Ti\xspace during the explosion, which will identify the dominant pathways of $^{44}$Ti\xspace production in supernovae. The processes that produce Ti are quasi-statistical or statistical equilibrium processes. They produce an equilibrium distribution of nuclei based on the nuclear chemical potentials at a given temperature, density, and electron fraction~\cite{magkotsios_etal_2010}. The local ratio between $^{44}$Ti\xspace and $^{56}$Ni\xspace strongly constrains the thermodynamic initial conditions, allowing a fairly precise determination of the final distribution of all nuclei. The remaining uncertainty can then be attributed to the thermodynamic history, which determines the details of freezeout. Observations of additional nuclear species will provide additional constraints and reduce residual uncertainties. Combining \textit{ASCENT}\xspace's $^{44}$Ti\xspace observations with observations of Cas~A\xspace's Si and Fe lines from JAXA's and NASA's \textsl{XRISM} mission (to be launched in 2023) will allow us to perform an improved reconstruction of the Si, Fe, and Ti configurations at the current time and at the time of the supernova explosion. \textit{ASCENT}\xspace will improve the spectral resolution of the $^{44}$Ti\xspace emission over \textit{NuSTAR}\xspace, allowing us to construct a more detailed map of the clumpy structures in Cas~A\xspace, enabling a more detailed comparison to numerical models and helping to disentangle multiple structures along a line of sight and the properties of these structures. These comparisons provide direct constraints on the engine. \begin{figure} \centering \includegraphics[width=.5\linewidth]{casa} \caption{X-ray image of emission lines in Cassiopeia~A: iron (red), silicon/magnesium (green), titanium (blue), and continuum emission (yellow)~\cite{grefenstette_etal_2014}. Two parts of the remnant of particular interest are highlighted. \textsl{Region~1} is the only region in which \textit{NuSTAR}\xspace detected significantly blue-shifted $^{44}$Ti\xspace ejecta. \textsl{Region~2} is of interest due to the highly blue-shifted almost pure iron ejecta. Composite Chandra/NuSTAR image credit NASA/JPL-Caltech/CXC/SAO.} \label{fig:casa} \end{figure} \textit{NuSTAR}\xspace's results indicate that most of the ejecta are moving away from us with a velocity of \SIrange{1000}{5000}{\km\per\s} but that some $^{44}$Ti\xspace regions (\textsl{Region~1} in Fig.~\ref{fig:casa}, \textit{i.e.,}\xspace Region 20 of Grefenstette et al., 2017\cite{grefenstette_etal_2017}) move towards us with \SI{7500}{\km\per\s}. The combination of \textit{ASCENT}\xspace's \SI{67}{eV} energy resolution with its effective area extending to \SI{>85}{keV} will enable an analysis with much smaller systematic errors than that of the \textit{NuSTAR}\xspace analysis. If confirmed, these high velocity ejecta would challenge current supernova theory and provide a strong constraint on models. Most current models that lead to a high yield of $^{44}$Ti\xspace do not result in velocities \SI{>4500}{\kilo\meter\per\second}~\cite{hammer_etal_2010,ono_etal_2013}, and the highest velocity found in the models by Vance et al.~\cite{vance_etal_2020} is \SI{\sim 5500}{\kilo\meter\per\second}. The detailed velocity measurement can also be used to understand $^{44}$Ti\xspace production. Nucleosynthesis calculations predict different $^{44}$Ti\xspace yields depending on the ejecta velocity~\cite{vance_etal_2020}. We can use the ejecta velocities to constrain the trajectories (temperature and density evolution) of the ejecta, allowing us to test both our explosion and nucleosynthesis models. These ejecta velocities can be tied to more fundamental properties like the electron fraction and nuclear cross sections. Because we expect $^{44}$Ti\xspace to be produced at some level whenever $^{56}$Ni is produced, we expect to see $^{44}$Ti\xspace lines wherever iron is observed. This raises the question why there are large iron ejecta with no evident detection of $^{44}$Ti\xspace in Cas~A\xspace. The \textit{NuSTAR}\xspace observations could not detect $^{44}$Ti\xspace in the iron-rich southeastern region of Cas~A\xspace (\textsl{Region 2} in Fig.~\ref{fig:casa}). Is it because that iron is produced directly (not the decay product of $^{56}$Ni), or was there a large amount of $^{56}$Ni produced with $^{44}$Ti\xspace mass fractions below the \textit{NuSTAR}\xspace detection limit? The \textit{NuSTAR}\xspace upper limit in this region of the SNR is not very constraining,\cite{grefenstette_etal_2017} and the iron-rich ejecta are blue-shifted with a velocity up to \SI{3000}{\kilo\meter\per\second}~\cite{willingale_etal_2002, delaney_etal_2010}. Therefore, \textit{ASCENT}\xspace may be able to detect the $^{44}$Ti\xspace in this region due to its sensitivity to the blue-shifted \SI{78}{keV} line, or significantly improve on the \textit{NuSTAR}\xspace upper limit. \subsection{Compact Remnant Kicks} Observations of pulsar proper motions and the existence of specific peculiar binary systems suggest that momentum is imparted onto compact remnants during their formation~(for a review, see Fryer and Kusenko, 2006\cite{2006ApJS..163..335F}). A diverse set of models have been proposed to create these kicks, but these models can be separated into two categories: asymmetries in the ejecta and asymmetries in the neutrino emission. Under the convection-enhanced supernova engine paradigm~\cite{1994ApJ...435..339H}, low-mode convection produces asymmetric explosions with a nonzero net momentum in the ejecta~\cite{1995PhR...256..117H}. These asymmetries impart a net momentum to the compact remnant, and a \SI{1}{\percent} asymmetry in the ejecta produces the high observed kick velocities. Although simulations have struggled to produce some of the highest observed kicks, ejecta asymmetries remains one of the strongest candidate mechanisms for explaining pulsar proper motions. Alternatively, asymmetries in the neutrino emission (typically requiring strong magnetic fields -- albeit not necessarily strong bipolar magnetic fields) also carries away a net momentum, imparting an equally strong kick onto the compact remnant.\cite{socrates_etal_2005} The different mechanisms proposed in the ejecta and neutrino mechanisms make a variety of predictions on the relation of the compact remnant kicks with relation to angular momentum, dipole magnetic-field strength, final remnant mass, and the formation of a black hole versus a neutron star. Many of these predictions are indirect, and it is difficult to place strong constraints on the mechanism with existing observations. However, \textit{NuSTAR}\xspace observations opened up the potential for a more direct observational constraint with detailed maps of the $^{44}$Ti\xspace to compare the asymmetries in the explosion to the remnant velocities. Because $^{44}$Ti\xspace is produced in the innermost ejecta, it is an ideal probe of these explosion asymmetries. However, to truly compare the explosion asymmetries with the compact remnant kick, we need detailed 3-dimensional ejecta information. Although the current \textit{NuSTAR}\xspace data hinted at a correlation between the explosion asymmetries and the compact remnant kick supporting the ejecta kick mechanism~\cite{grefenstette_etal_2017}, the higher-fidelity \textit{ASCENT}\xspace observations will allow a more quantitative test of the ejecta kick mechanism. \subsection{Validating the convective SN engine} The convective nature of the supernova engine in Cas~A\xspace has been established quite firmly. However, there are only two SNR with confirmed detections of $^{44}$Ti\xspace, and Cas~A\xspace is the only SNR in which $^{44}$Ti\xspace emission has been spatially resolved. This raises the question whether the SN engine of Cas~A\xspace is unique, which \textit{ASCENT}\xspace can address through observations of SN\,1987A.\cite{boggs_etal_2015} While \textit{ASCENT}\xspace cannot spatially resolve SN\,1987A, a precise measurement of the $^{44}$Ti\xspace line shapes can be used to quantify asymmetries in the Ti distribution. Figure~\ref{fig:losvelocity} shows the velocity distributions along three lines of sight for two different supernova explosions. These velocity distributions are derived from 3-dimensional smooth particle hydrodynamics simulations of asymmetrically-driven supernova explosions.\cite{ellinger_etal_2012} One explosion is bimodal (either produced by a mild ``jet'' or low-mode convection model with rotation) and the other is more representative of a low-rotation, low-mode convectively-driven explosion (``Asym''). For the velocity distributions in this figure, we chose 3 different lines-of-site and measured the velocities of the ejecta along these lines-of-site (to determine the red- and blue-shifted features). The \textit{ASCENT}\xspace observations will not only be able to easily differentiate between these models, but also enable us to further constrain the specific features of the convective engine. \begin{figure} \centering \includegraphics[width=.7\linewidth]{vdistti} \caption{% Velocity distribution of the $^{44}$Ti\xspace ejecta for two different supernova explosions: a bipolar explosion where the ejecta is fastest along the axis (jet) and an explosion with multiple strong outflows mimicking the predictions of the convective supernova engine (asym).\cite{ellinger_etal_2012} The structure in the line of sight velocity distribution can be tied to the structure of the supernova engine (\textit{i.e.,}\xspace the bipolar explosion has a very different profile than the asymmetric explosion). The bars at the top of the graph illustrate the line-of-sight velocity resolution of \textit{NuSTAR}\xspace and \textit{ASCENT}\xspace. Thanks to \textit{ASCENT}\xspace's energy resolution, we will be able to measure these differences.% } \label{fig:losvelocity} \end{figure} \section{Technical implementation}\label{sec:implementation} \subsection{Overview} The \textit{ASCENT}\xspace experiment (Figure \ref{fig:telescope}) uses a \SI{12}{m} optical bench with a \SI{45}{cm}-diameter, $F = \SI{12}{m}$ multilayer X-ray mirror at the front end and a cryogenically cooled microcalorimeter detector assembly at the rear end. A balloon gondola holds a two-frame gimbal, pointing the optical bench in the direction of the observed astrophysical sources with the help of the Wallops Arc Second Pointer (WASP) system~\cite{stuchlik_2015}. The microcalorimetric detector array is cooled by an Adiabatic Demagnetization Refrigerator (ADR) inside a \SI{65}{L} liquid He dewar. Table~\ref{tab:summary} summarizes key characteristics of the \textit{ASCENT}\xspace observatory and its expected performance. In the remainder of this section, we describe the design of each of the main components. \begin{table*} \centering \caption{% Key \textit{ASCENT}\xspace payload characteristics and expected performance. Details of the performance estimates are provided in Section~\ref{sec:sensitivity}.% } \begin{tabular}{lp{.4\linewidth}p{.35\linewidth}} \toprule Component & Description & Performance \\ \midrule Truss & Carbon fiber tubes and aluminum joints & Focal spot movement \SI{<3}{mm}, alignment knowledge \SI{0.5}{mm} (\ang{;;9}) \\ Pointing system & Pitch-yaw articulated & Pointing precision 1.0--\ang{;;3.6} ($3\sigma$) on source \\ Star camera & \SI{100}{mm}, f/1.5 short-wave infrared lens & Pointing knowledge ${<}\ang{;;15}$ ($3\sigma$) \\ X-ray mirror & Wolter I, \SI{12}{m} focal length, diameter \SI{40}{cm}, 110 Ni/C-coated and 100 Pt/C-coated shells & Effective area \SI{190}{cm^2} at \SI{70}{keV}, Angular resolution \ang{;2;} HPD, Field of view \ang{;5;} FWHM \\ Cryostat & LHe-backed adiabatic demagnetization refrigerator & Base temperature \SI{70}{mK} \\ Detector & Two-layer gamma-ray TES array, 256 pixels each, \SI{1.4x1.4x0.59}{mm} absorbers ($\ang{;;30}\times\ang{;;30}$ at \SI{12}{m}), microwave multiplexed readout & Bandpass: \SIrange{2}{100}{keV}, energy resolution $\Delta E(\SI{80}{keV}) = \SI{67}{eV}$ FWHM \\ Power & Detectors, cryostat, heaters & \SI{\sim 350}{W} \\ Mass & Mass under balloon rotator & \SI{\sim 1700}{kg} \\ \midrule Signal rate & 1 Crab source at \ang{45} elevation & \SI{.5}{Hz} at \SIrange{60}{80}{keV} \\ Background rate & BGO shield veto applied & \SI{0.02}{Hz} at \SIrange{60}{80}{keV} \\ \bottomrule \end{tabular} \label{tab:summary} \end{table*} The telescope will be carried by a \SI{1.1e6}{\cubic\meter} He-filled balloon to an altitude of about \SI{38}{km}. When launched from Esrange in Kiruna, Sweden, it will partially circle the North Pole, reaching Northern Canada after a typically \numrange{5}{7}-day flight. On this trajectory, the telescope will be able to continuously observe Cas~A\xspace with an elevation angle of about $36 - \ang{82}$. Additional, longer, flights from McMurdo Station (Antarctica) will circle the South Pole, enabling deep observations SN~1987A. \begin{figure} \centering \includegraphics[width=.75\linewidth]{telescope} \caption{CAD rendering of the \textit{ASCENT}\xspace telescope. Key components are labeled in the Figure and described in Section~\ref{sec:implementation}. The gondola and truss design are almost identical to \textit{XL-Calibur}\xspace, maximizing flight heritage.} \label{fig:telescope} \end{figure} \subsection{Focal plane instrumentation} \subsubsection{Transition Edge Sensor array} Microcalorimeter technology has shown great promise for transforming X-ray astrophysics. For example, the \textsl{Hitomi} mission used a 36-pixel Si thermistor microcalorimeter array for its Soft X-ray Spectrometer (SXS)~\cite{aharonian_etal_2016}. The \textsl{Athena} mission (to be launched in 2032) will use a \num{4000}-pixel microcalorimeter array for its X-ray Integrated Field Unit (X-IFU)~\cite{smith_etal_2016,barcons_etal_2017}. Over the last 15 years, transition-edge sensor (TES) microcalorimeter spectrometers have been developed as cutting-edge tools in the fields of nuclear materials analysis~\cite{bennett_etal_2012,winkler_etal_2015,hoover_etal_2015,mates_etal_2017} and the X-ray sciences~\cite{uhlig_etal_2013,miaja_avila_etal_2016,palosaari_etal_2016,okada_etal_2016,oneil_etal_2017,doriese_etal_2017,titus_etal_2017}. TES microcalorimeters are detectors that measure the energy of individual photons through the temperature change of a superconducting thin film thermometer (see Fig.~\ref{fig:tes-principle}). The TES thermometer is coupled to a photon absorber composed of a high-Z element such as bismuth or tin, enabling high quantum efficiency for x-rays up to \SI{100}{keV}. The fundamental energy resolution of a calorimeter is \begin{equation}\label{eq:tes_resolution} \Delta E \propto \sqrt{k_B T^2 C}, \end{equation} where $T$ and $C$ are the sensor temperature and heat capacity~\cite{irwin_hilton_2005,ullom_bennett_2015}, allowing these devices to achieve extraordinary energy resolution by operating at cryogenic temperatures of about~\SI{\sim 100}{mK}. \begin{figure*} \centering \includegraphics[width=\textwidth]{tes-principle} \caption{(a) Calorimetric spectroscopy of x-rays. An incident photon deposits its energy into a target with a weak thermal link to a cold isothermal bath. (b) A typical pulse-response curve with a decay time determined by the properties of the calorimeter element and its coupling to the isothermal bath. The filtered pulse height is an extremely precise measure of the photon's energy. (c) Thermometry is performed with a thin-film superconducting transition-edge sensor. The extreme precision results from the sharp temperature dependence of the electrical resistance of the thin film operated close to its superconducting transition temperature. } \label{fig:tes-principle} \end{figure*} A prototype detector array called ``Spectrometer to Leverage Extensive Development of Gamma-ray TESs for Huge Arrays using Microwave Multiplexed Enabled Readout'' (\textit{SLEDGEHAMMER}\xspace, see Fig.~\ref{fig:sledgehammer} and Mates et al., 2017\cite{mates_etal_2017}) has achieved a full-width at half maximum (FWHM) resolution of \SI{55}{eV} at \SI{97}{keV}. A resolution as low as \SI{22}{eV} has been demonstrated with individual detectors~\cite{bacrania_etal_2009, bennett_etal_2012, mates_etal_2017}. The \SI{100}{keV} energy resolution of \SI{55}{eV} FWHM of \textit{SLEDGEHAMMER}\xspace is $10\times$ better than that of cryogenically cooled High Purity Germanium spectrometers (HPGe) and ${\sim}20\times$ better than room-temperature CdZnTe detectors. \begin{figure*} \centering \includegraphics[width=\textwidth]{sledgehammer} \caption{\emph{Left:} Photograph of the fully assembled \textit{SLEDGEHAMMER}\xspace detector package. The package contains eight TES microcalorimeter chips with 32 sensors each (center), eight microwave multiplexer chips with 32 channel readout (outer vertical columns), and eight chips each for detector bias, Nyquist filtering, and signal routing. The TES signals are read out by two pairs of coaxial cables attached to the box by SMA connectors on the top and bottom of the box, each recording the signals for 128 sensors. \textit{ASCENT}\xspace will use similar architecture to minimize risk, but with two monolithic detector chips stacked on top of each other, to minimize inter-pixel dead space and maximize collection efficiency. \emph{Right:} A combined $^{153}$Gd spectrum from 89 active TESs measured simultaneously using microwave SQUID multiplexing readout. The inset shows a zoomed region around the \SI{97}{keV} $\gamma$-ray peak (blue) with a Gaussian fit FWHM resolution of \SI{55}{eV} (red). The energy resolution achievable with TES microcalorimeters is ~15 times better than that achieved by \textit{NuSTAR}\xspace, achieving \SI{270}{km/s} accuracy in measurements of the velocity of $^{44}$Ti ejecta. Reprinted from Mates et al.\ (2017)\cite{mates_etal_2017} with the permission of AIP Publishing. } \label{fig:sledgehammer} \end{figure*} \textit{ASCENT}\xspace will use detectors similar to those of the \textit{SLEDGEHAMMER}\xspace hard X-ray/$\gamma$-ray spectrometer~\cite{mates_etal_2017}. A photograph of a \textit{SLEDGEHAMMER}\xspace detector is shown in Fig.~\ref{fig:tes-image}. These sensors use polycrystalline tin absorbers to absorb photons. Tin is chosen because it combines a relatively high stopping power for $\gamma$-rays in the energy range of interest with a low specific heat at cryogenic temperatures. In \textit{SLEDGEHAMMER}\xspace, these absorbers are \SI[product-units=repeat]{1.45 x 1.45}{mm} in area and \SI{0.38}{mm} thick. For \textit{ASCENT}\xspace we plan on using \SI{0.59}{mm} thick absorbers to increase quantum efficiency to \SI{87}{\percent} at \SI{68}{keV} and \SI{75}{\percent} at \SI{78}{keV}. The \SI{55}{\percent} increase in absorber volume results in a corresponding increase of the heat capacity, and a \SI{25}{\percent} increased energy resolution based on Eq.~\eqref{eq:tes_resolution}. The expected energy resolution of the detectors, thus, increases to~\SI{68}{eV}. The absorbers are glued to epoxy posts, which are connected to the TES element by copper traces of equal length to ensure a uniform thermal path to the sensor (Fig.~\ref{fig:tes-image}). The TES element is a \SI[product-units=repeat]{400 x 400}{\micro\meter} bilayer of superconducting material and normal metal, lithographically deposited on a $\text{Si}_3\text{N}_4$ membrane. The transition temperature $T_c$ is set to ${\sim}\SI{120}{mK}$ by the superconducting proximity effect in thin-film bilayers. This $T_c$ includes enough margin above the base temperature of an Adiabatic Demagnetization Refrigerator (ADR) to allow for stable operation. Options for bilayer materials include MoCu, as in \textit{SLEDGEHAMMER}\xspace, as well as MoAu TES using NIST's patented hasTES process.\cite{weber_2020} \begin{figure*} \centering \includegraphics[width=.8\textwidth]{tes-image} \caption{% (a) Photograph of a TES gamma-ray microcalorimeter pixel before the Sn absorber is attached, showing the $\text{Si}_3\text{N}_4$ membrane (darker area), the Mo-Cu TES in the middle, and 20 SU8 epoxy posts connected to the TES by the Cu legs. (b) A portion of the detector chip with some of the Sn absorbers attached. The Sn absorbers are \SI[product-units=repeat]{1.45 x 1.45 x 0.38}{mm} thick, placed on a \SI{1.75}{mm} pitch. (c) Each \textit{ASCENT}\xspace detector die uses a central array of 256 of these $\gamma$-ray sensors (within the black inner circle) surrounded by an octagonal pattern of eight sets of 32-channel bias chips (blue), Nyquist filtering chips (red) and microwave SQUID multiplexer chips (purple). For scale, the outer black circle is \SI{80}{mm} in diameter, and the overlay indicates a projection of the Cas~A\xspace $^{44}$Ti\xspace distribution measured by \textit{NuSTAR}\xspace. Each die will be fabricated monolithically from a \SI{75}{mm} Si wafer to minimize space between pixels. Figures (a) and (b) reprinted from Bennett et al.\ (2012)\cite{bennett_etal_2012} with the permission of AIP Publishing. } \label{fig:tes-image} \end{figure*} Current fabrication methods require manual placement of the absorbers on the TES array using mechanical tweezers. This constrains the minimum size and spacing of the absorbers to dimensions close to those of \textit{SLEDGEHAMMER}\xspace, resulting in a \SI{1.75}{mm} pixel pitch and an array fill fraction of about~\SI{65}{\percent}. At \SI{12}{m} focal length, this pixel pitch corresponds to an angular separation of~\ang{;;30}. The low array fill fraction correspondingly reduces the overall photon collection efficiency of the array. To alleviate these issues, the instrument detector package will consist of 512 detectors, in the form of two dies each containing 256 detectors. The dies will be stacked on top of each other and offset so that the detectors in the lower die will lie directly underneath the gaps between detectors in the upper die. This will result in a total detection efficiency for photons striking the array of \SI{80}{\percent} at \SI{68}{keV} and \SI{70}{\percent} at \SI{80}{keV}. The layout and design of each die is conceptually similar to the proven design of the \textit{SLEDGEHAMMER}\xspace microcalorimeter array. The central array of 256 TES detectors in each die (Fig.~\ref{fig:tes-image}(c)) is fabricated from a single \SI{75}{mm} Si wafer, with wiring to carry the TES signals to bond pads for connection to the rest of the readout circuitry arranged in an octagon around the outside of the TES array. At \SI{12}{m} focal length, a point spread function with the half power diameter (HPD) of \textit{ASCENT}\xspace corresponds to \SI{3.5}{mm}, which is Nyquist sampled by each of the two detector dies. Combining the two offset detector dies allows a sampling of the PSF with an effective detector pitch of \SI{\sim 1.2}{mm}. The distance between the two dies will be less than \SI{1}{cm}. Assuming the focal plane of the X-ray optics is placed directly between the two dies, the HPD of the point spread function will increase by only \SI{\sim 2}{\percent}. The array diameter corresponds to an angular scale of about \ang{;8.8;}, significantly larger than the field of view of the X-ray optics, which eases the requirements on alignment stability as long as alignment knowledge can be maintained. \subsubsection{Sensor readout} TES arrays use multiplexing to minimize the thermal load and cryogenic complexity of wire connections to room temperature. The development of the Microwave SQUID Multiplexer, which reads out array of microcalorimeters using microwave techniques~\cite{mates_etal_2011,mates_etal_2017}, increases the available measurement bandwidth from ${\sim}\SI{30}{MHz}$ (the intrinsic limit in previous multiplexing architectures) to the several \si{GHz} of bandwidth available on a single coaxial cable. \begin{figure*} \centering \includegraphics[width=\textwidth]{umuxschematicandphotos_v4} \caption{ (a) Circuit schematic showing three channels of a microwave SQUID multiplexing circuit with TES microcalorimeters. (b) A photograph of a 33-channel microwave SQUID multiplexer chip used in the \textit{SLEDGEHAMMER}\xspace instrument. (c) A close-up photograph showing quarter-wave microwave resonators capacitively coupled to a feedline. The resonators are terminated by inductively coupled rf-SQUIDs (left). The microwave SQUID multiplexer takes advantage of the large bandwidth provided by coaxial cables to significantly reduce the thermal load and design complexity of reading out large-format arrays of TES microcalorimeters, such as those used in \textit{ASCENT}\xspace. Reprinted from Mates et al.\ (2017)\cite{mates_etal_2017} with the permission of AIP Publishing. } \label{fig:squid-multiplexing} \end{figure*} In the Microwave SQUID Multiplexer~\cite{mates_2008}, each sensor is coupled to a high-Q, thin-film resonant circuit by an rf-SQUID that transduces current changes at the sensor to changes in inductive load on the resonator (Fig.~\ref{fig:squid-multiplexing}). Multiple resonators, each with a unique frequency, are coupled to a single microwave feedline. A sum of microwave tones (sine waves) is supplied to the feedline, each tone matched to the frequency of one resonator. Changes in the current through a sensor will shift the center frequency of its resonator and thus change the amplitude and phase of the tone that propagates through the feedline. All tones are amplified by a single shared cryogenic low-noise amplifier before returning to room temperature, where they are analyzed to extract the detector signals. Signals from different sensors can easily be separated because they appear in modulation sidebands of their respective tones. The first microcalorimeter array with microwave readout, \textit{SLEDGEHAMMER}\xspace, demonstrated multiplexing factors of \num{128} with negligible resolution degradation, yielding a co-added resolution of \SI{55}{eV} at the \SI{97}{keV} gamma-ray peak (Figs.~\ref{fig:sledgehammer} and~\ref{fig:tes-image}). \textit{ASCENT}\xspace will use the same 33-resonator microwave SQUID multiplexing chip designs used for \textit{SLEDGEHAMMER}\xspace, shown in Fig.~\ref{fig:squid-multiplexing}(b). Each resonator has a FWHM bandwidth of $\sim$\SI{300}{kHz}, and the resonances are spaced \SI{3}{MHz} apart. Variations to the design place 32 resonators into each of eight \SI{125}{MHz} bands between \SI{5}{GHz} and \SI{6}{GHz}, yielding a total density of 256 detectors per GHz of available bandwidth. To read out the 512 detectors used in \textit{ASCENT}\xspace, we will use 2 parallel pairs of coaxial cables, each reading out a separate set of resonators in the \SIrange{5}{6}{GHz} range. The signals will be analyzed by four commercially available \textsl{ROACH2} Field Programmable Gate Array (FPGA) systems designed by the \textsl{CASPER} radio astronomy consortium~\cite{hickish_etal_2016}, each covering a bandwidth of \SI{512}{MHz} using commercially available DAC and ADC daughter boards. \subsubsection{Calibration} Achieving the best possible spectroscopic performance requires constant monitoring of the detector calibration, in order to be able to correct for calibration drift. \textit{ASCENT}\xspace will carry a calibration source housed inside a tungsten enclosure outside a dedicated window in the cryostat, illuminating the detector array from behind. The calibration of gamma-ray TESs drifts on timescales of minutes to hours. Experience shows that the dominant contribution to short-term drift is correlated with the baseline and can be corrected for. Therefore, it is necessary to obtain calibration spectra about once per hour to keep the systematic uncertainty due to residual drift below \SI{10}{eV}. By collecting about 100 photons per calibration line, we can keep the statistical uncertainty of the calibration negligible. Two approaches to calibration are still under consideration: continuous illumination with a weak source or use of a strong source behind a shutter periodically illuminating the array for a brief period of time. The advantage of continuous illumination is that no shutter mechanism is required and that no artificial dead-time is introduced. This reduces mission complexity and, thus, risk. However, care must be taken in the selection of calibration isotope or combination of isotopes. Calibration lines should be close to the energy range of interest, but lines within the energy range of interest, including escape peaks, will cause unacceptable background. Furthermore, emission lines above the energy range of interest will cause a background continuum due to Compton scattering in the detectors. A preliminary Geant4~\cite{agostinelli_etal_2003,allison_etal_2006,allison_etal_2016} simulation study of calibration spectra obtained with a selection of viable sources revealed $^{155}$Eu with sufficiently strong lines at \SI{60}{keV} and \SI{86}{keV} as a candidate. A sufficiently strong source behind a shutter will allow us to acquire calibration spectra at regular intervals over a short period of time. Because calibration data are acquired at known time intervals during which science data collection will be suspended, it is possible to use calibration lines in the energy range of interest. This has the advantage of mitigating the impact of non-linearities in the detector response. The approach also reduces the continuum background due to high-energy lines from the calibration source, assuming sufficient shielding is possible. The downside of this approach is that a mechanical shutter is required, adding complexity. While details still need to be optimized, a preliminary estimate shows that a \SI{1}{min} calibration window every hour will be sufficient. A possible calibration isotope is $^{227}$Ac which emits a large number of X-ray and gamma-ray lines in the energy range of interest. This calibration method would result in an additional dead-time of~\SI{<2}{\percent}. \subsubsection{Anti-coincidence detector} In order to reduce the background, the cryostat section containing the focal plane instrumentation will almost entirely be enclosed in a ${\sim}$\SIrange{2}{3}{cm}-thick active bismuth-germanate (BGO) anti-coincidence shield. Scintillation light due to particles interacting in the anti-coincidence shield will be detected by photomultiplier tubes (PMTs) or Silicon Photomultipliers (SiPMs). Signals in these PMTs or SiPMs will produce a flag vetoing any triggers in the TES detector readout, significantly reducing the residual background, in addition to the passive shielding provided by the absorption of particles in the BGO. The design will maximize the solid angle covered by the active shield. The conservative solution is to place the active shield components at the outside of the cryostat, avoiding the difficulties associated with bringing the scintillator crystal and detectors from ambient temperatures and pressure to liquid helium temperatures and near vacuum. In this case, passive tungsten shielding will be used inside the cryostat for the small solid angle portions not covered by the active shield outside the cryostat. We are evaluating solutions with active shielding inside the cryostat which would result in a smaller shield and thus reduced cross sections for interactions with the background, and a reduced shield mass. In both cases, the veto flag will be fed to the data acquisition and will be digitized along with the TES signals. \subsection{X-ray optics} \textit{ASCENT}\xspace achieves a large effective area in the \SIrange{65}{85}{keV} energy range using a dedicated multilayer-coated grazing incidence X-ray mirror. The mirror consists of 213 nested shells in two reflection stages with a diameter of \SI{40}{cm}. The innermost 110 shells will be coated with approximately 500 Ni/C layer pairs, while the remaining shells will be coated with roughly 200 Pt/C layer pairs. Given the focal length of \SI{12}{m}, the design will limit incidence angles to $<\ang{0.23}$. Reflectivity over a broad bandwidth at high X-ray energies is achieved by coating the shells with alternating layers of high-Z and low-Z material. The \textit{ASCENT}\xspace optics are expected to achieve an angular resolution of \ang{;2;} half-power diameter (HPD). The field of view of \ang{;5;} FWHM exceeds the angular size of Cas~A\xspace of \ang{;4;}. Most X-ray telescopes are designed to achieve a high collection area over a broad energy range. The broadband design necessitates the deposition of a multilayer stack for soft X-rays on top of the stack for hard X-rays. However, the thick soft X-ray layers absorb some of the higher-energy photons. For \textit{ASCENT}\xspace, the multilayer design will be optimized for energies above \SI{60}{keV}, achieving there substantially higher reflectivities than a broadband X-ray multilayer coating. Figure \ref{fig:mirror_area} shows the comparison of the collection areas of the \textit{ASCENT}\xspace and the two \textit{NuSTAR}\xspace mirrors. The platinum K absorption edge at \SI{78.395}{keV} limits the effective area at higher energies, preventing a purely Pt/C multilayer mirror from properly observing the $^{44}$Ti\xspace line at \SI{78.36}{keV}, especially when that line is blueshifted. Therefore, in addition to an optimized multilayer structure, the \textit{ASCENT}\xspace optics will use Ni/C coatings on the innermost 110 out of 213 nested shells. The Ni/C design requires about 500 layer pairs, while the Pt/C design requires about 200 layer pairs, which limits the number of foils that can be fabricated with this method within the project timeline. A surface roughness of \SIrange{4}{6}{\angstrom} of the multilayer coatings is expected. The \textit{ASCENT}\xspace mirror achieves collection areas of \SI{>100}{cm^2} in the \SIrange{65}{80}{keV} band. Due to the optimization of the layer structure for $^{44}$Ti\xspace observations, the effective area between \SI{\sim 30}{keV} and \SI{55}{keV} is very small. The low-energy reflectivity is not due to Bragg reflection on the multilayer, but due to total external reflection on the surface. The Ni/C multilayer combination has been studied by several groups in the past (\textit{e.g.,}\xspace Spiga et al., 2004\cite{spiga_etal_2004}) and is considered a top candidate material for future missions, such as \textit{HEX-P}\xspace, to extend their energy band out to~\SI{200}{keV}~\cite{madsen_etal_2018}. \begin{figure} \centering \includegraphics[width=.7\linewidth]{EffectiveArea} \caption{Comparison of the effective areas of mirror designs for \textit{ASCENT}\xspace and the two \textit{NuSTAR}\xspace mirrors combined~\cite{harrison_etal_2013}. The \textit{ASCENT}\xspace design uses a combination of Ni/C multilayer coatings on the inner 110 shells and Pt/C on the outer shells. An alternative design using Pt/C layers on all shells is shown for comparison. The shaded region indicates the expected range of the surface roughness between $\sigma = \SI{6}{\angstrom}$ (worst case) and \SI{4}{\angstrom} (best case). The dashed and dotted red lines indicate the contribution of the Pt/C and Ni/C shells in the $\sigma = \SI{4}{\angstrom}$ case, respectively. } \label{fig:mirror_area} \end{figure} \subsection{Cryostat} \begin{figure} \centering \includegraphics[width=.6\linewidth]{ascent_cryo_labeled_v2_cropped} \caption{Conceptual design of the \textit{ASCENT}\xspace cryostat, which provides a \SI{70}{mK} base temperature for the detectors. The detectors are housed in a protruding snout to minimize the mass of the shielding.} \label{fig:cryo} \end{figure} The \textit{ASCENT}\xspace cryogenic system cools the detector assembly to a nominal base temperature of \SI{70}{mK}. Our baseline design foresees to use the cryostat architecture of Fig.~\ref{fig:cryo} that uses a commercial adiabatic demagnetization refrigerator (ADR) coupled to a closed-cycle \SI{300}{mK} refrigerator and a liquid helium bath. The~\SI{65}{L} tank is designed to cool the detectors for up to 14 days, more than sufficient for the expect duration of the balloon flights from Sweden to Northern Canada. An absolute pressure regulator maintains the tank near atmospheric pressure to provide a~\SI{4}{K} thermal bath, and internal baffles minimize sloshing to prevent resonances with the pointing system. Counterweights on the pointing system maintain payload balance as the motion of the liquid during elevation changes and cryogen boil-off shift the center of mass. The main liquid helium tank is insulated by two vapor-cooled shields. As cold gas boils away from the liquid helium reservoir, it flows through stainless steel pipes connected to the shields through low-impedance heat exchangers. Since the helium boil off rate is proportional to the thermal load, negative feedback enforces temperature stability within the cryostat. G-10 trusses mechanically support each stage while maintaining sufficient thermal insulation. Liquid nitrogen cooling was considered as an alternative for the vapor-cooled shields, but would have led to a heavier and more complex design due to the additional cryogen tank. A~\SI{300}{mK} temperature stage is provided by a multi-stage closed-cycle He-4/He-3 sorption refrigerator coupled to the cryostat's liquid helium tank. This serves as the launching point for the ADR, allowing a lower magnetic field strength and thus lower power consumption than launching directly from~\SI{4}{K}. The~\SI{300}{mK} stage also intercepts the parasitic load from the wiring and mechanical support structures to reduce the cooling power requirement on the lowest temperature stage. Similar refrigerators have been successfully used by many different balloon-borne cryogenic systems (\textit{e.g.,}\xspace~SPIDER\cite{gudmundsson_etal_2015}, EBEX\cite{EBEX_cryo}, BLAST-Pol\cite{blast_cryo}, and BOOMERANG\cite{boomerang_crill}). The detector assembly is maintained at a base temperature of \SI{70}{mK} by a commercially available ADR using a single ferric ammonium alum (FAA) salt pill~\cite{ADR_FAA_ref} launched from the~\SI{300}{mK} stage to provide~\SI{1}{\micro\watt} of cooling power with~\SI{120}{mJ} cooling capacity. A~3-hour regeneration cycle will be performed once every 24 hours, providing roughly~\SI{90}{\percent} observing efficiency. For optimal operation, the TES detectors and SQUID multiplexer chips must be protected from external magnetic fields. The entire detector package assembly containing both detector dies and all SQUID multiplexer chips will therefore be enclosed in a two-layer magnetic shield, incorporated within the cryostat and maintained at cryogenic temperatures. These reduce the magnetic flux in the SQUIDs due to Earth's magnetic field by about two orders of magnitude. As an alternative cooling option, we are currently evaluating the performance of a mini Dilution Refrigerator.\cite{chase_dilutor} First measurements in the lab indicate that the mini Dilution Refrigerator is well suited for this application, offering continuous cooling to \SI{80}{mK} temperatures. The cooling power does not change significantly for elevation changes of $\pm\ang{30}$, enabling its use for \textit{ASCENT}\xspace. \subsection{Optical bench and gondola} X-ray optics and cryostat will be supported by a \SI{12}{m}-long optical bench pointed by NASA's Wallops Arc-Second Pointer (WASP) system. The optical bench consists of three sections made of carbon fiber tubes glued to Aluminum joints. The design results in an extremely stiff truss and is similar to previous balloon-borne telescopes \textit{X-Calibur}\xspace and \textit{XL-Calibur}\xspace~\cite{kislat_etal_2017, abarr_etal_2020b}. For example, the \SI{8}{m} long truss of \textit{X-Calibur}\xspace achieved a stability of \SI{<1.5}{mm} of the focal point during most of the flight~\cite{abarr_etal_2021}. The X-ray mirror, star tracker, and fiber-optic gyro of the WASP will be mounted to an Al honeycomb panel at the front end of the truss, and the focal plane instrumentation will be attached to an Al honeycomb panel at the rear end of the truss. The stiffness of the optical bench fulfills two requirements. First, the WASP pointing system requires that the lowest-frequency vibration mode of the pointed body exceeds~\SI{10}{Hz}. Second, we require a motion of the focal spot \SI{<3}{mm} in order to ensure the entire image is always contained in the detector array. A focal spot motion of \SI{3}{mm} corresponds to \ang{;;50} pointing error. In order to reduce the resulting degradation of the point spread function, \textit{ASCENT}\xspace will use an alignment monitoring system similar to \textit{X-Calibur}\xspace\cite{abarr_etal_2021}. The system uses an optical camera mounted in the central bore of the X-ray optics observing a pattern of LEDs mounted to the entrance window of the detector. On a \SI{12}{m} truss, it measures the alignment with a precision of \SI{0.15}{mm} or \ang{;;2.5}, negligible compared to the point spread function of the optics. An aluminum gondola suspended from the balloon supports the truss pointed by the WASP. The WASP points the truss in pitch and within a limited yaw range with respect to the gondola. Coarse pointing in yaw is achieved using a standard NASA balloon rotator coupling the gondola to the balloon. Absolute pointing information is provided by a star tracker system specially developed for balloon flight applications. This system achieves a pointing stability of~${<}\ang{;;1}$ and an absolute pointing accuracy of~${\sim}\ang{;;15}$. \section{Expected performance}\label{sec:sensitivity} During a balloon flight from Kiruna, Sweden, \textit{ASCENT}\xspace will observe Cas~A\xspace for approximately \SI{500}{ksec} at an elevation of about \num{36}--\ang{82}. We envision multiple northern hemisphere flights in order to attain longer total observation times. In order to estimate \textit{ASCENT}\xspace's sensitivity, we simulated the detector in Geant4 as two stacked arrays of Sn absorbers with the layout as shown in Fig.~\ref{fig:tes-image}c and a thickness of \SI{0.59}{mm}. Input spectra were folded with the mirror effective area based on the Ni/C multilayer mirror shown in Fig.~\ref{fig:mirror_area} and energy-dependent atmospheric absorption at a balloon altitude of \SI{125000}{ft} corresponding to an overburden of \SI{2.9}{\g\per\square\cm}. Photons were distributed according to the mirror point spread function (PSF) of ASTRO-H HXT\cite{matsumoto_etal_2016}, which is similar to the expected \textit{ASCENT}\xspace PSF. We estimate the background using measurements made during the Antarctic flight of \textit{X-Calibur}\xspace~\cite{abarr_etal_2021} and taking into account improvements to the anticoincidence shield, which will reduce this background by a factor of \num{\sim 10}~\cite{abarr_etal_2020b}. To account for the difference in detector size we scale with area and square root of thickness. This results in a background rate of \SI{\sim 1.7e-6}{\per\s\per\keV} per TES detector at \SI{68}{keV}. In the future, this estimate can be refined using data from an upcoming test flight of a small TES array scheduled for the fall of 2023, as well as with the help of detailed Monte Carlo simulations.\cite{shirazi_etal_2022} In the sensitivity calculation, we weighted events in each detector by the expected signal-to-background ratio for a point-like source according to Ref.~\cite{barlow_1987}. Figure~\ref{fig:narrow-line-sensitivity} shows the expected narrow line sensitivity of \textit{ASCENT}\xspace. NuSTAR detected lines with fluxes ranging from \SI{6e-7}{\per\square\centi\meter\per\second} to \SI{1.7e-6}{\per\square\centi\meter\per\second}. \textit{ASCENT}\xspace's energy resolution of \SI{67}{eV} FWHM will allow us to determine the velocity of $^{44}$Ti\xspace ejecta with a FWHM accuracy of \SI{270}{\km\per\s}, compared to \textit{NuSTAR}\xspace's FWHM accuracy of \SI[group-separator={,}]{3600}{\km\per\second}. \begin{figure} \centering% \includegraphics[width=.6\textwidth]{sensitivity+nustar}% \caption{% \textit{ASCENT}\xspace narrow line sensitivity as a function of energy, demonstrating \textit{ASCENT}\xspace's ability to detect $^{44}$Ti\xspace in various regions of Cas~A\xspace with a single \SI{500}{ksec} flight. The vertical yellow bands indicate energy ranges of interest and the horizontal black bars are the flux levels measured by \textit{NuSTAR}\xspace.\cite{grefenstette_etal_2017} } \label{fig:narrow-line-sensitivity} \end{figure} From each flight we expect highly significant detections of the $^{44}$Ti\xspace emission from Cas~A\xspace of $11\,\sigma$ and $6.5\,\sigma$ of the \SI{67.9}{keV} and \SI{78.4}{keV} lines, respectively, when summing over all bright spots. Particularly interesting will be the energy spectrum from \textit{Region~1} in Fig.~\ref{fig:casa}, which we expect to detect with $5\,\sigma$ at \SI{67.9}{keV} and with $3\,\sigma$ at \SI{78.4}{keV}. The advantage of \textit{ASCENT}\xspace is greatest in regions where the width of the $^{44}$Ti\xspace lines is small compared to \textit{NuSTAR}\xspace's energy resolution. A single \SI{500}{ksec} observation with \textit{ASCENT}\xspace will improve measurements in all regions where \textit{NuSTAR}\xspace detected $^{44}$Ti\xspace, except two where the lines are broadened and very weak. We estimate that \textit{ASCENT}\xspace will improve the line centroid and width measurements compared to previous results by a factor of \numrange{2}{20} and \numrange{2}{10}, respectively (Fig.~\ref{fig:linemeasurements}). These measurements will significantly improve the 3D localization of the $^{44}$Ti\xspace ejecta and result in much tighter constraints on the local $^{56}$Ni\xspace/$^{44}$Ti\xspace ratio. These improvements in constraining the local ratio will greatly increase our knowledge of the nuclear production pathways in the supernova explosion. \begin{figure} \centering% \includegraphics[width=.6\textwidth]{linemeasurements}% \caption{% Expected \textit{ASCENT}\xspace results for the measurements of $^{44}$Ti\xspace emission lines in the 8 $^{44}$Ti\xspace-bright regions analyzed in Ref.~\cite{grefenstette_etal_2017} compared to the \textit{NuSTAR}\xspace results. Simulations assume the Gaussian line parameters measured by \textit{NuSTAR}\xspace. In regions where \textit{NuSTAR}\xspace only set an upper limit on the line width, a smaller value is assumed. The inset shows two lines with assumed widths of \SI{150}{eV} and \SI{100}{eV}, respectively. The \textit{ASCENT}\xspace centroid and line width uncertainties are a factor \numrange{2}{10} smaller than \textit{NuSTAR}\xspace's.} \label{fig:linemeasurements} \end{figure} \section{Summary and Outlook}\label{sec:summary} Core collapse supernovae are considered to be a significant source of mid-Z elements in the Galaxy. Despite significant theoretical and observational progress in the last few decades, many details of the explosion are still poorly understood. One observational approach to gaining new insights is to study the distribution of elements in supernova remnants. The isotope $^{44}$Ti\xspace is of particular interest because it is produced in the innermost regions of the supernova engine, and it is radioactive with a half-life long enough to be observable in historic supernova remnants. In this paper we present a concept for a balloon-borne hard X-ray telescope called \textit{ASCENT}\xspace designed to study the nuclear emission lines from Cas~A\xspace and SN~1987A, as well as potentially other remnants that may be discovered by \textit{COSI}\xspace. \textit{ASCENT}\xspace uses an array of transition edge sensor (TES) microcalorimeter detectors as its focal plane instrument, improving spectral resolution by more than an order of magnitude over existing semiconductor detectors at gamma-ray energies. Observations with \textit{ASCENT}\xspace will significantly improve 3D maps of $^{44}$Ti\xspace in Cas~A\xspace, and can deliver detailed spectra of $^{44}$Ti\xspace from SN~1987A. \textit{ASCENT}\xspace will also demonstrate the viability of hard X-ray TES technology for a future space mission. The energy resolution of an \textit{ASCENT}\xspace-type mission would benefit all spectral studies of a \textit{NuSTAR}\xspace follow-up, \textit{e.g.,}\xspace broadband observations of Active Galactic Nuclei (AGN) covering the lines of the soft excess emission, the Fe K$\alpha$ emission, and the Compton hump emission. The broadband results obtained for a sample of ${\sim}100$ of AGNs can be used to calibrate the spin measurements of ESA's \textsl{ATHENA} mission~\cite{smith_etal_2016,barcons_etal_2017} and the proposed NASA \textsl{Lynx} mission~\cite{gaskin_etal_2015,bandler_etal_2016, lynx}. The \textit{ASCENT}\xspace detector technology could be used for example as the focal plane detector of the \textit{HEX-P}\xspace mission.\cite{madsen_etal_2018} While \textit{ASCENT}\xspace has not been selected when first proposed, the team continues to pursue the project and is planning to repropose the mission after maturing detector, cryostat, and X-ray optics technologies. \section*{Acknowledgments} FK is grateful for support by the Faculty Development Grant program of UNH. The work by CLF is supported by the US Department of Energy through the Los Alamos National Laboratory. Los Alamos National Laboratory is operated by Triad National Security, LLC, for the National Nuclear Security Administration of the U.S.\ Department of Energy (Contract No.\ 89233218CNA000001). HK and JN acknowledge NASA support under grant 80NSSC21K1817. HK acknowledges NASA support under grants 80NSSC18K0264, 80NSSC22K1291, and NNX16AC42G.
\subsection{Elevator Dispatching Algorithm} \textbf{The Cyber-Physical System:} Figure \ref{fig:casestudy} shows an overview of the CPS. A system of elevators is a complex CPS, whose goal is to transport passengers from one floor to another safely while trying to provide the highest comfort as possible. In this system, a passenger registers a call in a floor by pushing a call button. This information is transferred to the traffic master through a Controller Area Network (CAN) bus. The traffic master, after collecting other CPS information (e.g., position of each elevator, elevator occupancy), assigns one of the available elevators to each active call. This assignation can be carried out through different objectives (e.g., reducing the passengers' waiting times, reducing energy consumption). When the call is assigned, the elevator attends the passenger. \begin{figure}[ht] \centering \includegraphics[width=0.5\textwidth]{Figures/SUT_image.pdf} \caption{Overview of our industrial case study} \label{fig:casestudy} \end{figure} \textbf{The System Under Test (SUT):} Our SUT is the traffic dispatching algorithm (i.e., dispatcher), which is an important module inside the traffic master. To deal with different functionalities and priorities, the dispatcher is highly configurable through parameters. Different traffic dispatching algorithms exist in Orona, and each of them encompasses one configuration file. The number of potential configurations of each dispatcher is over trillions. \textbf{Test Executions:} Three different phases are undertaken when testing the dispatching algorithm~\cite{ayerdi2020towards,gartziandiamachine}: the Software-in-the-Loop (SiL), the Hardware-in-the-Loop (HiL) and Operation. Our algorithm is designed for the first phase, i.e., the SiL test level. At this stage, a domain-specific simulator, i.e., Elevate\footnote{https://peters-research.com/index.php/elevate/}, takes as input (1) the dispatching algorithm's executable, (2) the building installation, (3) the configuration file and (4) the passenger file. The passenger file is considered the test input, and it involves a set of passengers traveling through different floors in a building. Each passenger has different attributes, such as, its arrival time (i.e., time at which the passenger arrives to the floor and pushes the button), arrival floor (i.e., floor at which the passenger arrives), destination floor (i.e., floor at which the passenger is traveling to), passenger weight, etc. When a test is executed, Elevate returns a file with the results of the simulation (e.g., waiting time required by each passenger, their traveling time, energy consumption, distance traveled by each elevator). This information is parsed and the necessary test oracles are employed to assess the quality of the execution of the test. \textbf{Functional performance requirements:} When executing test cases, besides considering certain functional requirements, we focus on \textit{``functional performance requirements''}. Functional performance is defined as \textit{``the properties derived indirectly from the output of the system, rather than the system's efficient usage of the computational resources''}~\cite{gartziandiamachine}. These properties are directly employed for evaluating the functional performance requirements of Orona's dispatching algorithms. The properties involve metrics from the elevator traffic domain, such as the Average Waiting Time (AWT) of passengers, the Average Transit Time (ATT) of passengers, Longest Waiting Time (LWT), Longest Transit Time (LTT), number of engine starts, traveled distance by each elevator or consumed energy. Note that configuration changes affect functional performance requirements, whereas functional requirements (e.g., ensuring that reverse journeys do not take place) are, in principle, not affected by such changes. \textbf{Why misconfigurations occur and how they are handled:} The dispatcher has different parameters to accommodate different functionalities that have a direct impact on the CPS performance. However, it is noteworthy that a configuration may perform well in one installation of elevators, while not well in another one, causing a misconfiguration. This is because the performance of a system of elevators largely depends on (1) the type of building and its composition and (2) how its traffic flow is. Regarding the former, the performance can vary depending on aspects like number of elevators in a building, the number of floors the building has, whether all elevators attend all floors or not, etc. For some types of buildings, some configurations are more appropriate than others. As for the latter, the traffic is also different depending on the type of buildings. For instance, the traffic flow is completely different in a hospital and in a residential building. While in a hospital inter-floor travels are common, in a residential building most of the calls are from the base floor to the floor where the apartment is and vice-versa. When a system of elevators shows a poor performance, its traffic flow is reproduced at the SiL test level to debug and try to improve its performance through changing parameters. If a new set of parameters improves the system performance, then, the original configuration is considered a misconfiguration. It is important to note that in our industrial case study, a misconfiguration might not be detected nor foreseen before the system is in operation due to the CPS exposition to uncertainty \cite{han2022uncertainty,han2022elevator}. \subsection{Experimental Setup} \subsubsection{System Under Test and Building} We used Orona's Conventional Group Control (CGC) traffic dispatching algorithm~\cite{barney2015elevator}, which has also been used in other studies~\cite{ayerdi2020qos,ayerdi2021generating,ayerdi2022performance,han2022elevator,han2022uncertainty}. Furthermore, we used a real installation to assess our approach. The installation involved a total of three elevators and 12 floors. We used this installation because it was a real case where Orona had to manually intervene to resolve the misconfiguration. Furthermore, the manual misconfiguration process taken by the engineers was well documented. In addition, we also had access to the operational data obtained from the conflicting installation to be used as failing test inputs. In total, we used three failure-inducing test inputs, involving 16 hours of passenger flow each, and between 3,105 and 3,769 passengers in total. The version of the algorithm we used involved a total of 43 parameters. The total number of potential configurations ascends to over $9.3\times10^{92}$, which makes the search space too large to employ brute force \subsubsection{Test oracles} By carefully analyzing the internal document Orona used to give solution to the conflicting installation, we defined six oracles based on the metrics they were aiming to optimize. Below we explain the selected functional performance metrics: \begin{itemize} \item Average Waiting Time (AWT): It measures the average waiting time of all passengers. The waiting time refers to the time since a passenger registers a call until an elevator arrives to attend her. \item Longest Waiting Time (LWT): It measures the longest waiting time experienced by the passengers. \item \% of passengers with Waiting Time (WT) above 55 seconds: It measures the percentage of passengers who had to wait more than 55 seconds. \item Average Transit Time (ATT): It measures the average transit time of all passengers. The transit time refers to the time since a passenger enters a lift until it arrives to its destination. \item Longest Transit Time (LTT): It measures the longest transit time of all passengers. \item \% of passengers with Transit Time (TT) above 70 seconds: It measures the percentage of passengers who had a transit time above 70 seconds. \end{itemize} When repairing this misconfiguration, the domain experts aimed at improving as much as possible the functional performance metrics listed above. Therefore, in the context of this study, we opted for being aggressive with the thresholds. Therefore, all thresholds were set to 0. We acknowledge that these values are unfeasible to obtain. However, this way the comparison with the manual approach is fairer. Furthermore, we also wanted to assess the patch that the DM selected. \subsubsection{Execution platform} Elevate version 8.19 was used as simulator for executing the tests. The experiments were carried out using a PC with a Windows 10 operating system, with a CPU Intel Core i5 7th generation, and a 16 Gb RAM. \subsubsection{Baseline algorithm and state of the practice comparison} As baseline algorithm, we developed an unguided version of our repairing algorithm. Two core differences exists between the unguided version and the repair algorithm proposed in this paper: (1) the unguided version saves all configurations in the archive and (2) the parameters to be mutated are considered all to have the same suspiciousness score (i.e., the suspiciousness is not measured in this version). It is noteworthy that this baseline is stronger than a pure Random Search (RS), which is the usual baseline algorithm used to assess search-based software engineering problems~\cite{wang2015cost,arrieta2019pareto,arrieta2019search,arrieta2017employing,mcminn2011search,di2007search}. This is because, RS would take the initial failing configuration and propose some patches based on our patch generation approach (Algorithm~\ref{alg:GeneratePatch2b}). However, with RS, these generated patches would not evolve anymore. Conversely, with our unguided approach, we give the option of evolving patches in the archive, leading to higher probabilities of finding a patch. As for the comparison with the state of the practice, for the building installation used, we had data from engineers from Orona. Specifically, when the issue was raised, engineers from Orona proposed different potential patches (i.e., different configurations of the dispatcher). We compared the results obtained by our algorithm with the patches proposed by the domain experts. Six different patches were provided by Orona's engineers. \subsubsection{Evaluation Metrics} As our algorithm is Pareto-compliant, we had to assess all the solutions in the archive as a whole. Because of this, and based on related guidelines~\cite{wang2016practical,li2022evaluate}, we used the \textit{Hypervolume (HV)} quality indicator. The \textit{HV} is one of the most widely employed metrics to assess Pareto-based search algorithms~\cite{wang2016practical,li2022evaluate,shang2020survey}. The \textit{HV} measures the volume in the objective space of a search algorithm, and has many advantages~\cite{shang2020survey}, such as, (1) being Pareto compliant, (2) being able to evaluate convergence and the diversity of a solution set simultaneously and (3) only requiring one reference point. Besides the \textit{HV} quality indicator, as we designed a DM, we also compared each of the six objective functions used as performance metrics in the test oracles for the solutions proposed by the DM after the search budget was exceeded. \subsubsection{Statistical tests} Since the employed algorithms are non-deterministic, we run each algorithm 10 times. We could not afford more runs given that the search budget was selected to be 12 hours. Therefore, in total we employed 10 (runs) $\times$ 12 (hours) $\times$ 2 (baseline and repair algorithms) = 240 hours for executing the experiments. To assess the statistical significance, we employed the Wilcoxon rank sum test. We considered that there was statistical significance between both algorithms when the p-value was lower than 0.05. In addition, we employed the Vargha and Delaney \^{A}$_{12}$ value, which measures the probability of a technique being better than the other one. \subsubsection{Algorithm configuration} We gave 12 hours of time budget to both, our algorithm and the baseline algorithm. Similar to \cite{abdessalem2020automated}, the maximum number of solutions in the archive was set to 12 (i.e., 6 objective function $\times$ 2). We also set the parameter $N_{susp} = 5$, which means that the suspiciousness of a parameter is neutral (i.e., suspiciousness score of 0.5) until it is mutated 5 times \subsection{Analysis and Discussion of the Results} \subsubsection{RQ1 -- Sanity check} Figure \ref{fig:results_HV} shows the average \textit{HV} score of the 10 runs for both, the repair algorithm proposed in this paper and the baseline algorithm, which is the unguided version of the repair algorithm. As it can be appreciated, the repair approach showed a higher average \textit{HV} than the baseline after the second execution hour. By the time the search budget was expired, the repair algorithm showed a 29\% average improvement over the baseline in terms of the \textit{HV} quality indicator. It is noteworthy that the \textit{HV} values are quite low. The reasons for this is that the \textit{HV} favors knee points of a solution set in a Pareto-frontier~\cite{li2022evaluate}. As explained before, in our case, the specified threshold values were 0 (i.e., the repair algorithm aims at optimizing as much as possible all the functional performance metrics). Achieving such value was not realistic, and therefore we did not have knee values. Besides, 6 different oracles (i.e., fitness functions) were employed to guide the search towards providing patches. Nevertheless, a low \textit{HV} value makes not unfair the comparison between both techniques, which is the goal of the first RQ. \begin{figure}[h] \centering \includegraphics[trim = 0 0 0 0, width=0.35\textwidth]{Figures/Hypervolume_Manual.jpg} \caption{Average value of the 10 runs for the hypervolume quality indicator when comparing the repair and unguided algorithms} \label{fig:results_HV} \end{figure} These results were further corroborated by means of statistical tests. Table \ref{tab:RQ1_statisticaltests} shows the \^{A}$_{12}$ as well as p-values (computed by employing the Wilcoxon rank sum test) for each of the 12 hours when comparing the repair algorithm with the baseline. The \^{A}$_{12}$ shows the probability of the repair algorithm being better than its unguided version. As suggested by Romano et al.~\cite{romano2006exploring}, we categorized the difference existing between the repair algorithm and its baseline as \textit{negligible} if $d<0.147$, as \textit{small} if $d<0.33$, as \textit{medium} if $d<0.474$ and as \textit{large} if $d>=0.474$, where $d=2|$\^{A}$_{12}-0.5|$. According to this categorization, the difference was negligible during the first execution hour, small between the second and third execution hours and medium during the fourth execution hour. In these first four execution hours, there was no statistical significance between the repair algorithm and the baseline. Conversely, after the fifth hour, there was statistical significance (i.e., p-value $<$ 0.05) with large effect sizes based on the related categorization~\cite{romano2006exploring}, all of them in favor of our approach. \begin{table}[h] \centering \caption{RQ1 -- Summary of the statistical tests when comparing the repair algorithm with its unguided version for the \textit{HV} quality indicator over the execution of 12 hours. An \^{A}$_{12}$ value higher than 0.5 means that the results are in favor of the repair algorithm. Statistical significance is set as~\textit{p-val$<$0.05}} \begin{tabular}{rrr} \hline \multicolumn{1}{l}{\textbf{Hour}} & \multicolumn{1}{l}{\textbf{\^{A}$_{12}$}} & \multicolumn{1}{l}{\textbf{p-val}} \\ \hline 1 & 0.51 & 0.9698 \\ 2 & 0.61 & 0.4273 \\ 3 & 0.65 & 0.2730 \\ 4 & 0.71 & 0.1212 \\ 5 & 0.80 & 0.0256 \\ 6 & 0.86 & 0.0081 \\ 7 & 0.89 & 0.0040 \\ 8 & 0.82 & 0.0172 \\ 9 & 0.85 & 0.0090 \\ 10 & 0.85 & 0.0090 \\ 11 & 0.90 & 0.0028 \\ 12 & 0.92 & 0.0017 \\ \hline \end{tabular} \label{tab:RQ1_statisticaltests} \end{table} Besides the \textit{HV}, we also analyzed the individual patches provided by the decision maker (DM). In this case, the aim of the algorithm was to reduce such metrics. Therefore, an \^{A}$_{12}$ lower than 0.5 means that the repair algorithm performed better. Table \ref{tab:Indiv_objs2} summarizes the statistical tests for the ten runs and each individual objective function. There was statistical significance in half of the objective functions (i.e., LWT, ATT and LTT). For such cases, the effect sizes were large (i.e., \^{A}$_{12}$ between 0.18 to 0.2). For the remaining objectives, where there was no statistical significance, in the case of the AWT and \%WT$>$55, the effect sizes showed a negligible difference, whereas for the case of \%TT$>$70, the difference was small \begin{table}[h] \centering \caption{Summary of the statistical test results when comparing the patches provided by the DM when employing repair algorithm against the baseline and manual repair approaches} \begin{tabular}{lrrrr} \cline{2-5} & \multicolumn{2}{l}{\textbf{vs. Baseline}} & \multicolumn{2}{l}{\textbf{vs. Manual}} \\ \cline{2-5} & \multicolumn{1}{l}{\textbf{\^{A}$_{12}$}} & \multicolumn{1}{l}{\textbf{p-val}} & \multicolumn{1}{l}{\textbf{\^{A}$_{12}$}} & \multicolumn{1}{l}{\textbf{p-val}} \\ \hline \multicolumn{1}{l}{AWT} & \multicolumn{1}{r}{0.52} & 0.9097 & \multicolumn{1}{r}{0.10} & 0.0014 \\ \multicolumn{1}{l}{LWT} & \multicolumn{1}{r}{0.18} & 0.0165 & \multicolumn{1}{r}{0.20} & 0.0161 \\ \multicolumn{1}{l}{\%WT\textgreater{}55s} & \multicolumn{1}{r}{0.47} & 0.8788 & \multicolumn{1}{r}{0.00} & \textless{}0.0001 \\ \multicolumn{1}{l}{ATT} & \multicolumn{1}{r}{0.20} & 0.0312 & \multicolumn{1}{r}{0.40} & 0.4429 \\ \multicolumn{1}{l}{LTT} & \multicolumn{1}{r}{0.20} & 0.010 & \multicolumn{1}{r}{0.00} & \textless{}0.0001 \\ \multicolumn{1}{l}{\%TT\textgreater{}70s} & \multicolumn{1}{r}{0.37} & 0.3438 & \multicolumn{1}{r}{0.00} & \textless{}0.0001 \\ \hline \end{tabular} \label{tab:Indiv_objs2} \end{table} Table \ref{tab:averages} show the average value of each of the functional performance metrics used by the oracles for the 10 runs and the patches provided by the DMs. These results were somehow consistent with those from Table \ref{tab:Indiv_objs2}. As it can be appreciated, the most striking difference relates to the LWT and the LTT functional performance metrics. On the contrary, for the AWT, \%WT$>$55, ATT and \%TT$>$70, the differences were not that large. This could be due to the nature of the DM. Note that for those metrics, the DM accepts values that are below certain thresholds (e.g., AWT $<$ 25 seconds), whereas for LWT and LTT, the DM selects those patches with lowest values. However, in all metrics except the AWT, our algorithm showed lower average values. \begin{table}[ht] \caption{Comparison between the misconfigured configuration file, the patch provided by the DM with the manual repair, the average values of the patches returned by the DM for the baseline algorithm and the average values of the patches returned by the DM for the repair algorithm} \begin{tabular}{lrrrr} \cline{2-5} & \multicolumn{1}{c}{\textbf{Misconf}} & \multicolumn{1}{l}{\textbf{Manual}} & \multicolumn{1}{l}{\textbf{Baseline DM}} & \multicolumn{1}{l}{\textbf{Repair DM}} \\ \hline AWT & 25.99 & 23.10 & 22.66 & 22.77 \\ LWT & 435.70 & 223.00 & 241.55 & 213.72 \\ \%WT \textgreater{}55s & 12.78 & 11.99 & 9.93 & 9.92 \\ ATT & 42.01 & 41.60 & 41.77 & 41.58 \\ LTT & 209.80 & 220.60 & 206.24 & 195.56 \\ \%TT\textgreater{}70s & 10.24 & 10.02 & 9.64 & 9.45 \\ \hline \end{tabular} \label{tab:averages} \end{table} In conclusion, the first RQ can be answered as follows: \vspace{0.25cm} \fbox{\begin{minipage}{23 em} \textbf{Answer to the first RQ: }\textit{The repair algorithm outperformed the baseline algorithm. The average improvement extent of the repair algorithm with respect to the baseline was around 29\% when considering the \textit{HV} quality indicator. Furthermore, there was statistical significance with large effect sizes when comparing individual patches proposed by the DM for half of the objective functions, all of them in favor of the repair algorithm. All this suggests that the problem of repairing CPSs misconfigurations is non-trivial, and therefore, automated and scalable repair techniques are necessary.} \end{minipage}} \vspace{0.25cm} \subsubsection{RQ2 -- Comparison with manual repair} With the second RQ, we aimed at comparing the proposed repairing algorithm with the manual process of repairing the misconfiguration by domain experts. Specifically, these domain experts provided a total of 6 patches. With those patches, and by applying the six oracles in our algorithm, we derived the \textit{HV} metric. As can be seen in Figure \ref{fig:results_HV}, the \textit{HV} was quite low. This was because only four patches were non-dominated, whereas our archive is capable of handling up to twelve patches. Therefore, those four patches were not able to cover a large volume in the objective space. Furthermore, it is important to note that the time was not considered here, because we do not have such information. In terms of the HV, the average improvement extent of our repair algorithm over the manually derived patches was up to 77.5\%. For this case, we also employed the DM to select one of the non-dominated patches. Table \ref{tab:Indiv_objs2} shows the statistical tests carried out when comparing the patches provided by the DM after executing the repair algorithm with the patch proposed by the DM after processing the four non-dominated solutions. As it can be appreciated, in five out of six metrics there was statistical significance, where the effect size showed a large difference according to the categorization proposed by Romano et al.~\cite{romano2006exploring}. All these effect sizes were in favor of the repair algorithm. On the other hand, for the case where there was no statistical significance, i.e., for the case of the ATT metric, the difference was small in terms of the \^{A}$_{12}$ value, but in favor of the repair algorithm. The improvement extent for each functional performance metric obtained by the patches provided by the DM (over 10 runs) with respect to the manual approach can be appreciated in Table \ref{tab:averages}. These results are consistent with the statistical tests, where it can be appreciated a similar average value in the case of the ATT. In this case, the improvement extent is higher in the cases of the AWT, \% WT $>$ 55, LTT and \%WT$>$70 when compared to the baseline algorithm. However, in relation to the LWT, the improvement was only of 10 seconds on average, unlike with the baseline, where the improvement was of nearly 29 seconds on average. In summary, the second RQ can be answered as follows: \vspace{0.25cm} \fbox{\begin{minipage}{23 em} \textbf{Answer to the second RQ: }\textit{The repair algorithm outperformed the manual repair process. The average improvement extent of the repair algorithm with respect to the patches provided by the domain experts was around 77.5\% when considering the \textit{HV} quality indicator. Furthermore, there was statistical significance with large effect sizes when comparing individual patches proposed by the DM in five out of six objective functions. In addition, our approach provides a fully automated approach, which can therefore increase the productivity of engineers from Orona when dealing with misconfigurations of the traffic dispatching algorithm.} \end{minipage}} \vspace{0.25cm} \subsection{Threats to Validity} We now summarize the threats to validity of our study and the measures taken to mitigate them. An \textit{internal validity threat} in our evaluation could be related to the parameters used in the algorithms, which were not changed. Three main parameters need to be configured (1) the time budget, which was set to 12 hours; (2) the number of time a parameter needs to be selected to start computing its suspiciousness score (i.e., $N_{susp}$), which is set to 5; and (3) the number of solutions in the archive. The first two parameters were selected based on preliminary evaluations. Coversely, the maximum number of solutions in the archive was the same as other repair approaches targeting CPSs~\cite{abdessalem2020automated}. As in any search-based software engineering problem, a \textit{conclusion validity threat} involves the stochastic nature of the algorithms used. To mitigate such issue, we run each algorithm 10 times. It is important to note that our technique needs a long time to converge because the simulations employed to assess potential patches are exhaustive, therefore, we could not afford a large number of runs. Furthermore, we applied statistical tests to analyze the results, as recommended by Arcuri and Briand~\cite{arcuri2011practical}. As in any study involving humans, our evaluation is also subject to \textit{external validity threats}. One such threats refers to the patches proposed by engineers from Orona. It is noteworthy, however, that these engineers have broad experience and domain expertise, and that the patches they proposed were the ones that were later deployed in the real CPS. The generalizability of the results is also another \textit{external validity threat} of our study; note, however, that we used an industrial case study with a real installation and data obtained from operation. We plan to mitigate such threat in the future by (1) using other case studies from a different domain and (2) using other real installations where misconfigurations occured. Lastly, \textit{construct validity threats} arise when the measures used are not comparable across algorithms. This was mitigated by giving the same search budget to both algorithms (i.e., the repair and the unguided algorithm). \subsection{Contributions} Our main contributions can be highlighted as follows: \begin{enumerate} \item We propose a scalable and automated approach to repair misconfigurations in CPSs. \item We integrate the approach with an industrial case study from Orona, one of the largest elevator companies in Europe. The case study involves the traffic dispatching algorithm, a highly configurable software system. \item We empirically evaluate our approach by using a real scenario in which Orona's engineers had to manually intervene in the misconfiguration repair process. Our repairing technique not only outperforms a baseline algorithm, but also the manually derived repairing patches by Orona's domain experts. \item We extract key lessons learned from the application of our approach in an industrial case study, and provide applicability guidelines in order our approach to be adopted by other CPS developers. \end{enumerate} The rest of the paper is structured as follows: Section~\ref{sec:casestudies} explains our industrial case study, how the testing is carried out and why misconfigurations occur. In Section~\ref{sec:approach} we present our approach to repair misconfigurations in our industrial context. Section~\ref{sec:eval} presents how we evaluated our approach. We extract key lessons learned and we explain the required changes in our approach to be applied in other CPSs in Section~\ref{sec:lessons}. We position our work with relevant studies in Section~\ref{sec:relatedwork}. We conclude and present future work in Section~\ref{sec:conclusion}. \subsection{Lessons Learned} \textbf{Lesson 1 -- Reduction of personnel cost:} The current state of the practice when repairing misconfigurations is purely manual. This requires significant personnel cost since domain experts are required in the process. Our fully automated repairing approach not only outperforms the state of the practice in terms of providing a better patch to repair the misconfiguration, but also reduces significantly the personnel costs that are required behind a manual repair process. \textbf{Lesson 2 -- Scalable technique:} Scalability is one of the main concerns when testing and debugging CPSs, mainly due to the need of considering properties involving physical devices with continuous dynamics and complex concurrent interactions between the system and its environment (e.g., people)~\cite{briand2016testing}. We saw that our search-based repair algorithm converges after around 10 hours, which is affordable for our industrial partner as engineers can launch the automated misconfiguration repair tool nightly. \textbf{Lesson 3 -- Surrogate models are, in principle, not appropriate:} Despite we did not carefully assess this, while we developed the algorithm, we intended to integrate surrogate models to accelerate the repair process. However, we saw that this technique required too much time to build reliable surrogate models. This time was similar to the time budget that our repair algorithm required to converge. Although we assessed different types of surrogate models, we still need to more carefully analyze this, which remains a future work. \textbf{Lesson 4 -- Challenging conflicting installation:} After applying our experiments and showing the results to Orona's engineers, we noted that the conflicting installation we selected was challenging. Indeed, the traffic was abnormal, with many unforeseen situations (e.g., having too many calls in a short time window) and therefore, repairing the misconfiguration in such installation was, according to domain experts, more difficult than other installations. \subsection{Applicability} The context at which we have applied our repairing approach is the elevator dispatching algorithm of Orona. However, we believe that the three key challenges that we tackle (i.e., expensive execution of tests, large configuration space and multiple functional performance requirements) are common in all types of configurable CPSs. As we involved domain experts when developing the repair approach, several domain-specific design choices were considered, which would require adaptions when applying our approach in another domain. Below we explain different alternatives and the changes required for the adoption of our method in another domain. \textit{\textbf{Test execution process: }}One of the first changes our method would require is the test execution. As explained in Section \ref{sec:testexec}, we use a domain-specific simulator to execute test cases and measure how close the algorithm is from repairing the misconfiguration. This process would need to be substituted by the simulator being used to execute the tests within other CPSs. In addition, we employ a parallel test execution, which was possible in our context. However, other simulators (e.g., autonomous vehicles) could require more computing resources. For instance, testing autonomous vehicles often requires rendering driving scenes in virtual scenarios using high-fidelity simulators~\cite{haq2022efficient}, which may require the execution of test cases to be sequential. Lastly, test oracles would need to be defined. When using Simulink models to execute the tests, which is a predominant CPS testing tool~\cite{matinnejad2018test}, an option could be to use SOCRaTEs~\cite{menghi2019generating}, a DSL-based test oracle specification and generation tool for Simulink. Specifically, SOCRaTEs~\cite{menghi2019generating} provides a quantitative measure of the degree of violation of a requirement, similar to what we need in our algorithm to guide the misconfiguration repair process. \textit{\textbf{Removing solutions from the archive: }}As explained in Section \ref{sec:archive}, the archive may increase in size, which may have a direct implication in the convergence of the repairing algorithm. Therefore, when the archive exceeds a predefined number of solutions, one of the solutions needs to be removed. Our algorithm removes the solution with longest AWT, given that this is the most widely employed metric when testing dispatching algorithms~\cite{barney2015elevator}. In another domain, two alternatives can be considered. The first one, employing one of the most important metrics. If all metrics have a similar importance, the second alternative could be to randomly remove one of the solutions from the archive or use a crowding distance to remove solutions that are too close from each other. \textit{\textbf{Decision maker: }}The decision maker is another component that we developed ad-hoc for the traffic dispatching algorithm by following the advise of domain experts. We recommend to analyze priorities of the specific CPS to make a decision. In case there are no clear priorities, a solution could be to employ a weighted approach giving the same importance to all objectives. \textit{\textbf{Patch confirmation: }}We only employed a failing test suite to guide the repair process. The core reason was the high test execution time. Eventually, it could happen that a proposed patch makes a test case from the passing test suite fail. Because of this, we implemented a patch confirmation process by following a traditionally employed regression test method~\cite{gartziandiamachine} combined with a newly incorporated metamorphic testing approach by Orona~\cite{ayerdi2020qos,ayerdi2022performance}. The patch confirmation module should follow the internally standardized testing approach, which can vary from a company to another. \subsection{Patch generation} \label{sec:patchgen} A patch in our context refers to a mutation of at least one parameter. Algorithm~\ref{alg:GeneratePatch2b} shows our algorithm for proposing a potential patch. As input, it receives (1) a parent configuration, which corresponds to one configuration in the archive of the algorithm and (2) the suspiciousness ranking of all parameters. First, a parameter to be mutated is selected (Line 4) based on the suspiciousness of each parameter (see Section ~\ref{sec:suspicmeas} for more details on how to compute the suspiciousness score). The higher the suspiciousness, the higher the probability of being selected. The parameter to be mutated is obtained by employing Algorithm~\ref{alg:selectSuspiciousParam}. The selected parameter is mutated (Line 5) by giving a random value within its ranges. After this, it is decided whether a new parameter is mutated (Line 8). The probability of mutating a new parameter decreases as the number of mutated parameters in the new patch increases. We ensure that one parameter is not mutated more than once. \begin{algorithm}[ht] \caption{Patch generation algorithm}\label{alg:GeneratePatch2b} \KwIn{Parent //\textit{Faulty Configuration} \\ SuspRanking //\textit{Suspiciousness Ranking}} \KwOut{Patch //\textit{Mutated Configuration} \\} numOfMutParams $\leftarrow$ 0;\\ Patch $\leftarrow$ Parent;\\ \Do{$p < 0.5^{numOfMutatedParams}$}{ varToMutate $\leftarrow$ selectParam(SuspRanking);\\ Patch $\leftarrow$ mutate(Patch,varToMutate);\\ numOfMutParams $\leftarrow$ numOfMutParams +1; \\ p $\leftarrow$ rand(); //\textit{returns random value 0 to 1}\\ } \Return Patch; \end{algorithm} \begin{algorithm}[ht] \caption{Suspiciousness-based parameter selection algorithm}\label{alg:selectSuspiciousParam} \KwIn{SuspScore = $\{ss_1, ss_2, ..., ss_N\}$ } \KwOut{selected //\textit{Index of the selected parameter} \\} total $\leftarrow$ $\sum_{i=1}^{N}(ss_i);$\\ iterativeSum$\leftarrow$0; \\ prob $\leftarrow$ []; \\ \For{i $\leftarrow$ 1 \KwTo nPop}{ prob[i] $\leftarrow$ iterativeSum + SuspScore[i]/total; \\ iterativeSum$\leftarrow$prob[i];\\ } prob$\leftarrow$orderAscending(prob);\\ r$\leftarrow$rand();//\textit{Returns random number 0 to 1}\\ j$\leftarrow$0;\\ selected=N;\\%size(prob);\\ \While {j$<$N and selected==N}{ \uIf{r$<$prob[j]}{ selected$\leftarrow$j;\\ } j$\leftarrow$j+1;\\ } \Return parameter(selected); //\textit{translates index of selected to parameter ID} \end{algorithm} \subsection{Test suite execution} \label{sec:testexec} After the patch is generated, this needs to be assessed. We assess each patch by re-executing all test cases in the test suite that have failed. We do not execute the passing test cases because executing such test cases would significantly increase the computational time of our approach. Furthermore, for the sake of increasing the efficiency of our repair algorithm, the process of executing test cases is parallelized. When executing the test suite, test oracles assess the performance of the system. In our context, similar to other approaches~\cite{abdessalem2018testing,abdessalem2018testingVision,abdessalem2020automated,menghi2019generating,menghi2020approximation,humeniuk2022search,arrieta2022automating}, test oracles not only provide a boolean verdict (i.e., \textit{Pass} or \textit{Fail}), but also a confidence value. The lower the value, the lower the performance of the CPS in terms of the assessed property by such test oracle. These oracles' confidence values are used as search objectives to guide the repair algorithm towards finding effective patches. For repairing a CPS, a total of $k$ test oracles may exist. Each of these $k$ oracles acts as an individual objective function in the repair algorithm. For each test case ($tc$) in the failing test suite ($TS$), each of these $k$ oracles returns its confidence value, i.e., $Conf(tc, o_i) \in [-1,0]$, where $o_i$ is the $i$-th oracle. -1 means that the severity of the failure is the highest contemplated one, whereas 0 means that the oracle has passed. The repair algorithm aims at maximizing that confidence value. Therefore, after executing all test cases in $TS$, similar to Abdessalemm et al.,~\cite{abdessalem2020automated}, we obtain the minimum value for each of the test oracles (i.e., the most severe value), converting the repair problem in a many-objective optimization problem that gives priority to the most severe failures, such that: \begin{equation} \label{eq:Objectives} \left\{ \begin{array}{ll} \max Oracle_1(Patch) = \min\limits_{tc \in TS } \{Conf(tc, o_1)\} \\ ...\\ \max Oracle_k(Patch) = \min\limits_{tc \in TS } \{Conf(tc, o_k)\} \end{array} \right. \end{equation} As previously explained, executing a test in the context of CPSs is time consuming. Previous studies using compute-intensive CPSs have leveraged surrogate models to accelerate the generation of test cases~\cite{abdessalem2018testing,haq2022efficient,humeniuk2022search,menghi2020approximation}. That is, after a set of test executions, a model is trained with test results, and this model is employed as a substitute of the simulation-based test execution. This permits accelerating the generation of test cases. While we considered to use surrogate models to accelerate the repair process, we noticed that too many simulations were required to obtain a reliable surrogate model. Unlike previous approaches~\cite{abdessalem2018testing,haq2022efficient,humeniuk2022search,menghi2020approximation}, which only use the dimension of the test input, configurable CPSs also need to consider the dimension of parameters, which makes it harder to train a surrogate model. After carrying out a preliminary evaluation with our industrial case study, we noticed that the required time to obtain data for building a reliable surrogate model was similar or even higher than the time required by our repair algorithm to converge. Therefore, the option of using a surrogate model to accelerate the repair process was discarded. \subsection{Measuring parameter suspiciousness} \label{sec:suspicmeas} Based on analyzing the behavior of our industrial case study, and by interviewing domain experts, we noticed that some parameters have a higher influence than others on the system performance. Therefore, we implement a mechanism to measure the suspiciousness of each parameter in $C$. The suspiciousness provides a score between 0 and 1, where the higher the suspiciousness, the higher the likelihood of the parameter having an influence in the system performance. The ultimate goal of this strategy is to give a higher probability of being mutated to those parameters having an influence in the system performance All configurable parameters start with the same suspiciousness score, which is 0.5. This suspiciousness remains unchanged until the parameter is mutated by the Patch generation algorithm for $N_{susp}$ times (we employed $N_{susp}$ = 5 in our experiments). This permits the algorithm to focus on the exploration phase at the beginning of the search process, while focusing on the exploitation as the search process evolves. Every time a parameter is mutated by the Patch generation algorithm, after assessing the patch, we extract whether the parameter had (1) a positive impact on the performance of the system, (2) a negative impact on the performance of the system or (3) no impact at all. A positive impact of a parameter $p_i$ is considered when the patch is non-dominated by any other patch in the system based on the test results. A negative impact of a parameter $p_i$ is considered when the patch is dominated by the solutions in the archive (i.e., including its original parent). The patch does not have any impact for a parameter $p_i$ when the result of the test shows the same performance as its original parent. After a parameter $p_i$ is selected $N_{susp}$ times, its suspiciousness starts to be computed as follows: \begin{equation} susp(p_i) = \dfrac{P_{p_i}+N_{p_i}}{P_{p_i}+N_{p_i}+S_{p_i}} \end{equation} \noindent where $P_{p_i}$ is the number of times that parameter $p_i$ had a positive impact, $N_{p_i}$ is the number of times that the parameter $p_i$ had a negative impact and $S_{p_i}$ is the number of times that the parameter $p_i$ had no impact at all. Notice that either the positive or the negative impact increase the suspiciousness of a particular parameter. This is because the patch is proposed by mutating the value of a parameter by another random value within its ranges. Therefore, another value in a parameter that previously had a negative impact may have a positive impact on the CPS performance Based on our analysis, the suspiciousness of the parameters in the context of CPSs is, in principle, unknown, even with domain expertise. This is, to a large extent, because CPSs highly depend on the context at which they operate. For instance, in the case of our industrial case study, a parameter can have a large impact on the performance of the CPS depending on the type of building (e.g., parameters may behave differently in a residential building with 2 elevators or in a hospital building with 4 elevators). For this reason, we assume there is no prior knowledge of the impact a parameter may have in the context of a CPS. However, our approach for measuring the suspiciousness of parameters can easily be extended to other strategies (e.g., providing the algorithm with an initial suspiciousness score for each of the parameters in the configuration). \subsection{Updating the Archive} \label{sec:archive} Our algorithm uses an archive encompassing non-dominated solutions that are generated by including patches. The first configuration file being updated in the archive is the misconfiguration provoking the failure. After assessing a patch ($Patch_1$) by executing the failing test suite, the archive needs to be updated. Such patch is compared with the rest of solutions in the archive. The comparison is based on the notion of dominance, and similar to other studies~\cite{abdessalem2020automated}, the archive is updated as follows: \begin{enumerate} \item If $Patch_1$ dominates at least one solution in the archive, $Patch_1$ is included in the archive, and the dominated solutions are removed. \item If no element in the archive dominates $Patch_1$, but $Patch_1$ is neither dominated by any solution in the archive, $Patch_1$ is included in the archive. \item The archive remains unchanged if $Patch_1$ is dominated by at least one solution in the archive. \end{enumerate} By following this strategy, there is some risk that the archive increases in size. This would lead the algorithm to need much more time to converge. To overcome this problem, if the archive exceeds certain size, we remove solutions from it. Same as Abdessalem et al.,~\cite{abdessalem2020automated}, the maximum size of our archive is limited to $2 \times k $, $k$ being the number of oracles. However, unlike~\cite{abdessalem2020automated}, instead of randomly removing the solution from the archive, we removed the solution which had the longest Average Waiting Time (AWT). This decision was taken because in the elevation domain, this is the main metric used to assess the performance of a dispatching algorithm~\cite{barney2015elevator}. If two or more solutions encompassed the same highest AWT, the choice is random among those two solutions \subsection{Stopping criteria} The repair process stops given two criteria: (1) all test cases in $TS$ pass, i.e., all oracles in all test cases return the $0$ value; or (2) the search budget is exceeded (i.e., repairing time was exceeded). If the latter happens, it might be the case where the test cases are too demanding. Therefore, the repair process would be converted into a parameter optimization problem. For instance, by analyzing our industrial case study with the elevator dispatching algorithm, we noticed that some test inputs may encompass too many passenger calls in a short time window. In such cases, the CPS may enter in a saturation state, where the only solution would be to include additional elevators to better attend calls, something that is out of the scope of the dispatching algorithm's competence. \subsection{Decision maker} When the repairing algorithm stops due to the search budget being exceeded, there might be a high probability that more than one solution exists in the Archive. In such a case, a decision maker (DM) with certain rules would need to select one of the solutions and propose it as a patch. This decision maker is, in our case, domain-specific. The DM was a rule-based algorithm that was designed by involving domain experts in the process. The specified thresholds are configurable because some thresholds may be valid in certain buildings but not in others. The algorithm follows the next procedure to decide which patch to propose: \begin{enumerate} \item It first selects all patches where the AWT is less than 25 seconds. This is the threshold that an international standard considers as a good performance of a system of elevators~\cite{cibse2010transportation}. Since the AWT is the most widely employed metric to assess the quality of a system of elevators~\cite{barney2015elevator}, we gave first priority to this metric. If there is no solution meeting that requirement, we select the patch that exhibits the lowest AWT. \item If more than one patch remains, the DM prioritizes patches whose test execution showed a lower number of passengers waiting above 55 seconds. That threshold is specified to be below 10\%, which was considered an affordable number. Domain experts considered that waiting nearly a minute is an anti-pattern, therefore, they decided to give priority to those solutions that exhibited a low number of passengers waiting more than 55 seconds. \item In a third stage, if more than one patch exists in the set of candidate solutions, priority is given to the ATT metric. The DM selects those solutions that have a lower ATT than 45 seconds. If there are no solution meeting that requirement, we select the patch that exhibits the lowest ATT. \item If multiple patch candidates keep existing, the DM selects those solution whose test execution showed a lower number of passengers having a transit time above 70 seconds. That threshold was specified to be below 10\%, as it was considered an affordable number. \item After that, in the event that more than one candidate patch existed, the DM selected the patch with lowest LWT, which was considered of higher importance than the LTT. If more than a patch existed, the patch with lowest LTT was chosen. Although the possibilities are remote, it is still possible to have more than one solution. In such a case, the similarity of the configuration files of the candidate patches is compared with the original configuration file through the well-known hamming distance metric. The one which has more similarity is chosen. The reasons are two-fold. On the one hand, engineers are not usually eager to change too many parameters from the original configuration file. This is because, what it is good for certain passenger flows, it may not be good for others. On the other hand, we conjecture that the higher the number of parameters that have been changed, the higher the probability that the solution is overfitted to the failing test suite. Therefore, by means of this mechanism, we aim at reducing the probability for our plausible patch to be overfitted. \end{enumerate} \subsection{Patch confirmation} Since we only use a failing test suite to repair the misconfiguration, the patch needs to be retested. This way, we ensure that the patch is not overfitted to the failing test suite, which is a core problem of automated program repair~\cite{goues2019automated,martinez2017automatic,nilizadeh2021exploring,smith2015cure}. This can be carried out following any kind of state-of-the-art technique. In our case, we use a regression test oracle~\cite{gartziandiamachine} and execute synthetic test inputs (i.e., test inputs based on templates for full-day theoretical passenger profiles~\cite{siikonen2001passenger} and up and down-peak profiles suggested by international elevator standards~\cite{cibse2010transportation}). We ensure that the new patch does not perform worse than the original patch. Besides, we test its functionality by employing metamorphic testing with shorter test cases, as proposed by Ayerdi et al.~\cite{ayerdi2020qos,ayerdi2022performance} \section{Introduction}\label{sec:introduction} \input{Introduction} \section{Industrial Case Study}\label{sec:casestudies} \input{CaseStudies} \section{CPS Misconfiguration Repair Method}\label{sec:method} \input{RepairTechnique} \section{Evaluation}\label{sec:eval} \input{Evaluation} \section{Lessons Learned and Applicability} \input{Lessons} \section{Related Work}\label{sec:relatedwork} \input{RelatedWork} \section{Conclusion and Future Work} \label{sec:conclusion} Real-world CPSs, such as elevators, involve many parameters. The performance of CPSs is tightly linked to such parameters, and therefore, misconfigurations may occur. On the one hand, manually dealing with such misconfigurations might not always be feasible. On the other hand, automated solutions require dealing with certain challenges, such as, expensive simulations to execute test cases. In this paper we propose an automated and scalable solution based on meta-heuristic search to repair misconfigurations in CPSs. Our approach was integrated with an industrial case study provided by Orona, one of the largest elevator manufacturers in Europe. The evaluation was carried out with a real installation in which domain experts from Orona had to manually intervene in repairing a misconfiguration. The results suggest that, besides automating a process that before was purely manual, our algorithm provides better patches than those provided by domain experts. Specifically, in five out of the six quality indicators employed by domain experts to assess the quality of a patch, our algorithm outperformed with statistical significance the patch provided by domain experts In the future, we would like to extend our approach from different perspectives. In terms of the applicability, we would like to integrate our algorithm with other CPSs in which configurations have been found to be problematic (e.g., unmanned aerial vehicles~\cite{han2022control}). Furthermore, we would like to explore solutions to prevent potential overfitting issues before proposing a plausible patch. This has been one of the core challenges identified in automated program repair~\cite{goues2019automated,martinez2017automatic,nilizadeh2021exploring,smith2015cure}, and therefore, we should be aware of it. In terms of internal applicability within Orona, we would like to evaluate our approach in other installations where misconfigurations occurred. Furthermore, we would also like to transfer the repair algorithm beyond the traffic team and within other departments. Lastly, we would like to further study whether other strategies exist to better train and integrate surrogate models in the repair process \ifCLASSOPTIONcompsoc \section*{Acknowledgments} \else \section*{Acknowledgment} \fi Project supported by a 2021 Leonardo Grant for Researchers and Cultural Creators, BBVA Foundation. The BBVA Foundation is not responsible for the opinions, comments and contents included in the project and/or the results derived from it, which are the total and absolute responsibility of their authors. Aitor Arrieta is part of the Software and Systems Engineering research group of Mondragon Unibertsitatea (IT1519-22), supported by the Department of Education, Universities and Research of the Basque Country. \bibliographystyle{IEEEtran} \input{biblography.tex} \ifCLASSOPTIONcaptionsoff \newpage \fi \end{document}
\section{Introduction} \begin{figure*}[t] \centerline{\includegraphics[width=18cm]{fig1.pdf}} \caption{LTE-V2X RFF extraction and identification system framework and RFF model at the transmitter.} \label{figmodel} \end{figure*} Vehicular-to-everything (V2X) has become a promising technique for intelligent transportation and autonomous driving. In particular, the cellular-V2X (C-V2X) has been widely acknowledged as a key V2X communication standard due to its superior performance \cite{9217500}, \cite{8891313}. Since V2X relies on wireless transmission, the information is easy to be eavesdropped, forged or tampered with, which imposes great challenges on the safety of vehicles, pedestrians and road infrastructures in the V2X communication network \cite{9258954}. To deal with the security threats faced by wireless communications, there are usually two widely used authentication strategies: key-based cryptographic authentication and physical layer security-based non-cryptographic authentication \cite{9083673}. The cryptographic authentication technology needs to distribute and manage abundant communication keys, which occupies computing resources and leads to additional overhead and delays. Moreover, with the rapid development of computing capability of the computers, especially the emergence of quantum computers, traditional cryptography technologies are more vulnerable to brute-force attacks \cite{8490169}. On the contrary, the physical layer security based authentication has lower complexity and network overhead with lower latency compared to traditional cryptography-based authentication methods, and can achieve non-perceptual authentication without third-party facilities. One typical example is the radio frequency fingerprint (RFF) based authentication, which fully exploits the hardware differences between any two devices. Since the hardware characteristic of each device is unique and difficult to clone, the RFF based authentication can better resist the identity attacks and spoofing \cite{5601959}. In literature, a variety of RFF extraction and identification methods have been advocated. Early works mainly focus on the characteristics of transient signals, such as instantaneous amplitude, frequency, and phase responses \cite{7960417}. Concerning the steady-state signal, such as preamble signals, researchers consider extracting the RFF features including I/Q offset\cite{5961627}, power spectral density \cite{4698196}, differential constellation trace figure \cite{8360937}. Furthermore, some universal RFF extraction methods which are independent of data, channel or modulation modes have also been studied. Concretely, Shen \textit{et al.} \cite{9715147} constructed channel independent spectrogram and utilized data augmentation for RFF extraction and identification of Lora devices, which achieves good performance under different channel conditions. Alternatively, Yang \textit{et al.} \cite{9519652} used random data segments to extract the tap coefficients of the least mean square (LMS) adaptive filter as data independent RFF. Sun \textit{et al.} \cite{9721428} verified the locality and inhomogeneity of the RFF distribution with the analysis in the cepstral domain, which yields modulation mode independent RFF. The aforementioned works mainly consider the RFF extraction for low mobility and narrowband systems. However, for the V2X system, the channel typically varies fast due to the high mobility vehicles. In addition, the V2X signal usually has a large bandwidth which is more vulnerable to multipath environment. Therefore, the current RFF extraction methods for narrowband systems such as ZigBee and Lora cannot be directly applied for the V2X system because they do not take into account the impact of multipath and time-varying channels. In this work, we propose a channel estimation based RFF extraction method for Long Term Evolution-V2X (LTE-V2X) systems, which, to the best of our knowledge, has not been investigated in existing works. Specifically, we first estimate the experienced wireless channel using an improved least square (LS) channel estimation method. Then, we perform channel equalization based on the channel estimate to obtain channel dependent RFF. The RFF quality is further enhanced via conducting time-domain denoising. It is worthwhile noting that the developed method eliminates the effect of the channel and the noise on the RFF with low implementation complexity, and can be extended to various broadband multi-carrier wireless communication systems. This paper is organized as follows. Section II introduces the system model and signal preprocessing. Section III presents the details of the proposed RFF extraction methodology based on wireless channel estimation. Section IV evaluates the performance of the proposed RFF extraction method through simulations and experiments. Section V concludes this work. \section{System Model and Signal Preprocessing} \subsection{System Model} Fig. \ref{figmodel} demonstrates the framework of the considered LTE-V2X RFF extraction and identification system together with the RFF model at the transmitter. More concretely, one V2X terminal, e.g., on board unit (OBU) or road side unit (RSU), first transmits data to other devices, where the transmitted signal includes the RFF of the transmitter. Then, the receiver preprocesses the received signal which consists of converting the RF signal to the baseband signal and performing time-frequency synchronization. Subsequently, the RFF features are extracted based on the synchronized signal, where the effects of the wireless channel and the noise on the RFF need to be mitigated. Finally, the device identification is performed using the extracted RFF features. It is necessary to note that the considered RFF refers to all the characteristics of the circuits at the transmitter, which, as shown in Fig. 1, include the I/Q DC offsets of the digital-to-analog converter (DAC), the frequency response deviation of the filter, the gain imbalance and the carrier phase quadrature deviation of the mixer, and the non-linearity of the power amplifier \cite{Wang2016Wireless}. \begin{figure}[t] \centerline{\includegraphics[width=9cm]{fig2.pdf}} \caption{LTE-V2X PSBCH format.} \label{fig1} \end{figure} \subsection{LTE-V2X PSBCH} We adopt the physical sidelink broadcast channel (PSBCH) in LTE-V2X systems for RFF extraction. According to \cite{b5}, PSBCH is transmitted every 160 ms occupying the central 6 resource blocks (RBs), i.e., 72 subcarriers and 14 single-carrier frequency division multiple access (SC-FDMA) symbols. The detailed format of PSBCH is shown in Fig. \ref{fig1}, where primary sidelink synchronization signal (PSSS), secondary sidelink synchronization signal (SSSS), and demodulation reference signal (DMRS) all depend on the currently used sidelink synchronization signal (SLSS) ID. Since the SLSS ID can be estimated \cite{b5}, we can readily obtain ideal PSSS, SSSS, and DMRS at the receiver which are used for extracting transmitter RFF. \subsection{Signal Preprocessing} In order to ensure the stability of the extracted RFF, the signal preprocessing procedure includes time synchronization and carrier frequency offset (CFO) estimation and compensation after the received signal is down-converted from the RF band to the baseband. The time synchronization is realized by utilizing two identical training symbols, e.g., two repeated PSSS or SSSS symbols in LTE-V2X PSBCH, and the cross-correlation between the received signal $r(n)$ and the training signal $x(n)$ as \begin{equation} P(d)\!=\!\sum\limits_{n=0}^{N\!-\!1}\!\left|{r(n\!+\!d)x^*(n)}\right|^2\!+\!\sum\limits_{n=0}^{N\!-\!1}\!\left|{r(n\!+\!d\!+\!N\!+\!N_{C\!P})x^*(n)}\right|^2, \label{eq21} \end{equation} where $N\!\!=\!\!2048$ for LTE-V2X systems and $N_{C\!P}$ denotes the length of the cyclic prefix (CP). When $P(d)$ exceeds a given threshold $P_{T\!H}$ and reaches the maximum, we obtain the estimated starting position of the training symbol \cite{1997Robust}, which is expressed by \begin{equation} \hat{d}=\arg\max_{d\in \{ d|P(d)>P_{T\!H}\}}P(d). \label{eq22} \end{equation} Afterwards, the CFO is estimated by performing auto-correlation between adjacent two identical PSSS symbols and two identical SSSS symbols \cite{1997ML}, which is expressed as \begin{equation} \begin{aligned} \hat{\varepsilon}=\frac{1}{2\pi(N\!+\!N_{C\!P})}\mathrm{angle} \left\{ \sum\limits_{n=0}^{N-1}\!{[r(n\!+\!\hat d){r^*(n\!+\!\hat d\!+\!N\!+\!N_{C\!P})]}}\right. \\ \left. +\sum\limits_{n=0}^{N-1}\!{[r(n\!+\!\Delta n\!+\!\hat d){r^*(n\!+\!\Delta n\!+\!\hat d\!+\!N\!+\!N_{C\!P})]}}\right\}, \label{eq23} \end{aligned} \end{equation} where $\mathrm{angle}\{\cdot \}$ returns the phase angle of the input complex number and $\Delta n$ represents the number of the sampling points between the first PSSS and the first SSSS. Accordingly, we obtain the CFO compensated signal by \begin{equation} y(n)=\tilde r(n){e}^{-j2\pi n\hat{\varepsilon}}, \label{eq24} \end{equation} where $\tilde r(n)$ denotes the time synchronized signal. \section{Proposed RFF Extraction Method} In this section, we propose a novel PSBCH based RFF extraction method for LTE-V2X systems, which mainly includes channel estimation, channel equalization, and RFF denoising. \iffalse \begin{figure}[t] \centering \subcaptionbox{the initial time domain channel estimation $h(n)$\label{fig3_1}} {\includegraphics[width=0.49\linewidth]{hn.eps}} \hfill \subcaptionbox{the window $w(n)$\label{fig3_2}} {\includegraphics[width=0.49\linewidth]{w.eps}} \caption{The initial time domain channel estimation $h(n)$ of the DMRS symbol in a PSBCH frame.} \label{fig3} \end{figure} \fi \begin{figure}[t] \begin{minipage}[b]{0.49\linewidth} \centering \subfloat[][initial time domain channel estimate $h_5(n)$]{\label{fig3_1}\includegraphics[width=1\linewidth]{hn.pdf}} \end{minipage} \medskip \begin{minipage}[b]{0.49\linewidth} \centering \subfloat[][windowed time domain channel estimate $\hat h_5(n)$]{\label{fig3_2}\includegraphics[width=1\linewidth]{hhatn.pdf}} \end{minipage} \caption{The initial and windowed time domain channel estimates of the DMRS symbol.} \label{fig3} \end{figure} \subsection{Channel Estimation} We adopt the improved LS algorithm \cite{Beek1995} for channel estimation. The main idea of the algorithm is to obtain the initial frequency domain channel estimate through the LS algorithm, which is then transformed into the time domain via inverse discrete Fourier transform (IDFT). Afterwards, we perform time-domain windowing to exclude the noise and the RFF. The resultant signal is finally transformed into the frequency domain via discrete Fourier transform (DFT). The detailed steps of channel estimation for the PSBCH subframe are described as follows. Denote the $i$-th time-domain SC-FDMA symbol of the received PSBCH after preprocessing and CP removal by $y_i(n)$, which carries RFF information and channel information. Then, we transform the time-domain received signals corresponding to the PSSS, the SSSS, and the DMRS symbols into the frequency domain by performing DFT, which is expressed as \begin{equation} Y_i(k)=\text{DFT}_N\{{y_i(n)}\},0\le k\le N-1, \label{eq1} \end{equation} where $\text{DFT}_N\{ \cdot \}$ denotes the $N$-point DFT and $i=2,3,5,7,$ $10,12,13$. Denote the frequency domain received signal corresponding to the effective bandwidth occupied by the PSSS, the SSSS, and the DMRS as $\wideparen Y_i(k)$. Then, the initial frequency domain channel estimate of the $i$-th symbol $\hat H_i(k)$ containing the RFF and the noise is calculated by \begin{equation} \hat H_i(k)=\frac{\wideparen Y_i(k)}{\wideparen X_i(k)}, k \in \mathbb N_i, \label{eq2} \end{equation} where $\wideparen X_i(k)$ denotes the PSSS, the SSSS, or the DMRS, and $\mathbb N_i$ is defined by \begin{equation} \begin{aligned} \mathbb N_i=\!\left\{ \begin{aligned} &[5,66],i=2,3,12,13\\ &[0,71],i=5,7,10 \end{aligned} \right. . \label{eq3} \end{aligned} \end{equation} Subsequently, based on $\hat H_i(k)$, we obtain the initial time domain channel estimate by \begin{equation} \hat h_i(n)=\text{IDFT}_{N_i}\{{\hat H_i(k)}\}, n \in \mathbb N_i, \label{eq4} \end{equation} where $\text{IDFT}_{N_i}\{{\cdot}\}$ denotes the $N_i$-point IDFT and $N_i$ is defined by \begin{equation} \begin{aligned} N_i=\!\left\{ \begin{aligned} &62,i=2,3,12,13\\ &72,i=5,7,10 \end{aligned} \right. . \label{eq3_1} \end{aligned} \end{equation} \begin{table*}[t] \caption{RFF Parameters of 10 Simulated LTE-V2X Terminals} \renewcommand\arraystretch{1.2} \begin{center} \begin{tabular}{c c c c c c} \hline Terminal index&DC offset&Filter coefficients&Gain imbalance&Phase deviation&Power amplifier coefficient\\ \hline 1&$D_I$=0, $D_Q$=0&$h_I$=[1 0], $h_Q$=[1 0]&0.1&0.1&[1 0 0] \\ 2&$D_I$=0.01, $D_Q$=0&$h_I$=[1 0], $h_Q$=[1 0]&0.01&0.01&[1 0 0] \\ 3&$D_I$=0, $D_Q$=-0.01&$h_I$=[1 0], $h_Q$=[1 0]&0&0&[1 0 0] \\ 4&$D_I$=-0.005, $D_Q$=0.005&$h_I$=[1 0], $h_Q$=[1 0]&0.01&0.01&[1 0 0] \\ 5&$D_I$=0.005, $D_Q$=-0.005&$h_I$=[1 0], $h_Q$=[1 0]&0&0&[1 0 0] \\ 6&$D_I$=0, $D_Q$=0&$h_I$=[1 0], $h_Q$=[1 0]&0.05&0&[0.9+0.15j 0.1 0.1-0.15j] \\ 7&$D_I$=0, $D_Q$=0&$h_I$=[1 0], $h_Q$=[1 0]&0&0.05&[1.15 -0.2 0] \\ 8&$D_I$=0, $D_Q$=0&$h_I$=[0.825 0], $h_Q$=[1.175 0]&0&0&[1 0 0] \\ 9&$D_I$=0, $D_Q$=0&$h_I$=[1 0.175], $h_Q$=[1 -0.175]&0&0&[1 0 0] \\ 10&$D_I$=0.005, $D_Q$=0&$h_I$=[0.95 0], $h_Q$=[1 0.05]&0.05&0.05&[0.95-0.05j 0 0] \\ \hline \end{tabular} \label{simulate} \end{center} \end{table*} Since the channel impulse response is concentrated in a few time domain samples while the noise and the RFF are distributed over the entire time domain, we can apply an appropriate window on $\hat h_i(n)$ to obtain an improved time domain channel estimate by \begin{equation} \breve{h}_i(n)=\hat h_i(n)w_i(n), n \in \mathbb N_i, \label{eq5} \end{equation} where $w_i(n)$ denotes the window function. Fig. \ref{fig3} illustrates the windowing operation, where a rectangular window is used. Since most noises and RFFs are removed by the windowing operation, the resultant channel estimate becomes more accurate. After obtaining $\breve{h}_i(n)$, we further acquire the corresponding frequency domain channel estimate as \begin{equation} \breve{H}_i(k)=\text{DFT}_{N_i}\{{\breve h_i(n)}\},k \in \mathbb N_i, \label{eq8} \end{equation} Considering the fact that the channels experienced by adjacent symbols are approximately identical, especially when the vehicle speed is not very high, we can further average adjacent $\breve{H}_i(k)$'s to suppress the noise, thus improving the channel estimation accuracy. For instance, if the channel variation in one subframe is negligible, the ultimate frequency domain channel estimate can be calculated by \begin{equation} \tilde{H}(k)\!=\!\left\{ \begin{aligned} & \frac{{{{\breve{H}}}_{P\!S\!S\!S}}(k)+{{{\breve{H}}}_{D\!M\!R\!S}}(k)+{{{\breve{H}}}_{S\!S\!S\!S}}(k)}{7},5\le k\le 66 \\ & \frac{{{{\breve{H}}}_{D\!M\!R\!S}}(k)}{3},0\le k\le 71 \\ \end{aligned} \right. , \label{eq9} \end{equation} where \begin{equation} {{{\breve{H}}}_{P\!S\!S\!S}}(k)={{{\breve{H}}}_{2}}(k)+{{{\breve{H}}}_{3}}(k), \label{eq9_1} \end{equation} \begin{equation} {{{\breve{H}}}_{D\!M\!R\!S}}(k)={{{\breve{H}}}_{5}}(k)+{{{\breve{H}}}_{7}}(k)+{{{\breve{H}}}_{10}}(k), \label{eq9_2} \end{equation} \begin{equation} {{{\breve{H}}}_{S\!S\!S\!S}}(k)={{{\breve{H}}}_{12}}(k)+{{{\breve{H}}}_{13}}(k). \label{eq9_3} \end{equation} \subsection{Channel Equalization} After acquiring the channel estimate $\tilde H(k)$, we can perform channel equalization to remove the channel information and achieve the initial RFF features $R_i(k)$ by \begin{equation} R_i(k)=\frac{\wideparen Y_i(k)}{\tilde{H}(k)}, k \in \mathbb N_i. \label{eq7} \end{equation} Note that the above channel equalization will not lead to a loss of RFF information since most RFFs have been removed by the windowing operation during the channel estimation stage. \subsection{RFF Denoising} According to \eqref{eq7}, the initial RFF feature is still affected by the noise in $\wideparen Y_i(k)$. To alleviate the impact of noise on the extracted RFF, we further average the initial RFFs corresponding to the same data sequence. Specifically, the denoised RFFs for the PSSS, the DMRS, and the SSSS are given by \begin{equation} R_{P\!S\!S\!S}(k)=\frac{R_2(k)+R_3(k)}{2},5\le k\le 66, \label{eq10} \end{equation} \begin{equation} \begin{aligned} R_{D\!M\!R\!S}(k)\!=\!\left\{ \begin{aligned} &\frac{ {{R}_{5}}(k)+{{R}_{7}}(k)+{{R}_{10}}(k) }{3},N_{I\!D}^{S\!L}\bmod 2\!=\!0\\ &\frac{{{R}_{5}}(k)+{{R}_{10}}(k) }{2},\ \ \ \ \ \ \ \ \ \ \ N_{I\!D}^{S\!L}\bmod 2\!=\!1 \end{aligned} \right. ,\\0\le k\le 71, \label{eq11} \end{aligned} \end{equation} \begin{equation} R_{S\!S\!S\!S}(k)=\frac{R_{12}(k)+R_{13}(k)}{2},5\le k\le 66. \label{eq12} \end{equation} Note that the DMRS sequence on the 7th symbol differs from those on the 5th and 10th symbols when the SLSS ID $N_{I\!D}^{S\!L}$ is odd. Hence, for this case, we only calculate the mean of ${{R}_{5}}(k)$ and ${{R}_{10}}(k)$ which have the same data sequence. Finally, we obtain ultimate RFF features $\mathbf R(k)$ as \begin{equation} \begin{aligned} \mathbf R(k)=\left\{ \begin{aligned} R_{D\!M\!R\!S}(k),\ \ \ \ \ \ \ \ \ \ \ \ 0\le k\le 4,67\le k\le 71\\ \left[ R_{P\!S\!S\!S}(k),R_{D\!M\!R\!S}(k),R_{S\!S\!S\!S}(k) \right],5\le k\le 66 \end{aligned} \right. . \label{eq13} \end{aligned} \end{equation} \section{Simulation and Experiment Results} In the experiment, we employ 10 simulated LTE-V2X terminals with different RFF parameters and 6 actual LTE-V2X modules to generate PSBCH subframes, respectively, and evaluate the classification performance of different devices based on our proposed RFF extraction scheme. \subsection{Simulation Verification} For the simulation, we set different RFF parameters for 10 terminals, including the I/Q DC offsets, the baseband low-pass filter coefficients, the gain imbalance, the phase quadrature deviation, and the RF front-end power amplifier coefficients, which are specifically shown in Table \ref{simulate}, to ensure the modulation domain error vector magnitude (EVM) is within 17.5\% \cite{std36101}. Next, the PSBCH signals carrying the RFFs generated by the 10 terminals pass through the simulated extended typical urban (ETU) multipath channel \cite{std36104}, where the vehicle speed ranges from 0 to 120 km/h. Moreover, the SNR ranges from 0 to 30 dB. \begin{figure}[t] \centerline{\includegraphics[width=9cm]{acc1.pdf}} \caption{Identification accuracy of 10 simulated LTE-V2X terminals based on the proposed RFF extraction method under different SNRs and different vehicle speeds.} \label{acc1} \end{figure} \begin{figure}[t] \centerline{\includegraphics[width=9cm]{acc2.pdf}} \caption{Comparison of the identification accuracy of 10 simulated LTE-V2X terminals with and without channel equalization (SNR = 30 dB).} \label{acc2} \end{figure} Then, we conduct classification experiments on 10 terminals using random forest algorithm. The 700 received PSBCH subframes of each terminal constitute the training set, where the SNR is 30 dB and the vehicle speed is 30 km/h. The test set consists of 300 other subframes from each terminal. The identification accuracy of the 10 terminals under different SNRs and different vehicle speeds is depicted in Fig. \ref{acc1}. It can be found that the vehicle speed has little effect on the RFF identification accuracy rate. When the SNR exceeds 10 dB, the accuracy always remains above 97\% regardless of the speed, while the accuracy decreases significantly when the SNR drops below 10 dB mainly because we only use one PSBCH subframe for RFF extraction. It reveals that the proposed RFF extraction method has excellent classification performance under medium and high SNRs. Fig. \ref{acc2} compares the RFF identification performances of the methods with and without channel equalization, where the SNR is 30 dB. When the speed increases from 0 to 120 km/h, there is no obvious loss in the accuracy rate for the channel equalization based method, which always remains over 99\%, while the identification accuracy without channel equalization falls rapidly especially at high speeds, which indicates that our proposed method based on channel estimation can effectively mitigate the impact of wireless channels on the RFF extraction. \subsection{Experiment Verification} \begin{figure}[t] \centerline{\includegraphics[width=9cm]{lab2.pdf}} \caption{Experiment setup: (a) receiving device (USRP B205); (b) transmitting device (LTE-V2X module).} \label{lab} \end{figure} \begin{table}[t] \caption{RFF Identification Accuracy of 6 LTE-V2X Modules Under Different Speeds} \renewcommand\arraystretch{1.2} \begin{center} \setlength{\tabcolsep}{2mm} \begin{tabular}{c c c c c} \hline \diagbox[dir=SE]{Device}{Accuracy}{Speed}&0 km/h&10 km/h&20 km/h&30 km/h\\ \hline Module 1&92\%&93\%&90\%&91\%\\ Module 2&69\%&71\%&69\%&68\%\\ Module 3&92\%&90\%&93\%&93\%\\ Module 4&100\%&100\%&100\%&97\%\\ Module 5&100\%&100\%&100\%&100\%\\ Module 6&100\%&100\%&100\%&100\%\\ Average&92.2\%&92.3\%&92\%&91.5\%\\ \hline \end{tabular} \label{experiment} \end{center} \end{table} For the experiment, we use 6 LTE-V2X modules to transmit PSBCH subframes and utilize USRP B205 to receive the signals. The experiment setup is shown in Fig. \ref{lab}. First, we collect 400 PSBCH subframes for each module as training set under static state and low-speed moving state. Subsequently, 100 other subframes are captured from each module as test set, where the speed ranges from 10 to 30 km/h. The classification accuracy of the 6 LTE-V2X modules are shown in Table \ref{experiment}. It can be seen that the average accuracy exceeds 90\%. Moreover, the accuracy rate does not drop significantly after the speed increases. Note that modules 1 to 4 belong to the same type with very similar RFF features. Hence, the corresponding classification accuracy is relatively low. \section{Conclusion} In this paper, we proposed a novel RFF extraction method for LTE-V2X systems. Focusing on the PSSS, the SSSS, and the DMRS of PSBCH, we successfully obtained highly distinguishable RFF features by performing channel estimation, channel equalization, and RFF denoising. As verified via both simulations and experiments, our method displays robust performance under challenging time-varying and multipath channels. The proposed method can also be applied to any broadband multi-carrier communication systems that have fixed sequences. In the future work, more terminals can be tested in practical high mobility channel environments to further verify the effectiveness of this method.
\section{\protect\bigskip Introductions and Preliminaries} \bigskip Corrado Segre \cite{seg} introduced bicomplex numbers in 1892. The set of bicomplex numbers \cite{alp}, \cite{sai} is defined as \begin{equation*} \mathbb{ \mathbb{C} }=\{w=w_{1}+\mathbf{j}w_{2}:w_{1},w_{2}\in \mathbb{C} (\mathbf{i})\}, \end{equation* where $\mathbf{i}$ and $\mathbf{j}$ are imaginary units such that $\mathbf{i }=\mathbf{ji},~\mathbf{i}^{2}=\mathbf{j}^{2}=-1$ and $\mathbb \mathbb{C} }(\mathbf{i})$ is the set of complex numbers with imaginary unit $\mathbf{i . $ Also $\mathbb \mathbb{C} }(\mathbf{j})$ is the set of complex numbers with imaginary unit\textbf{\ } \mathbf{j}.$ Throughout this paper we take \mathbb{R} ,\mathbb \mathbb{C} }$ to be fields of real and complex numbers respectively and $\mathbb{N}$ to be the set of natural numbers. Note that basically the three sets $\mathbb \mathbb{C} },\mathbb \mathbb{C} }(\mathbf{i}),\mathbb \mathbb{C} }(\mathbf{j})$ are same. As $\mathbb \mathbb{C} }$ consists of two copies of \mathbb{R} ,$ called the real and imaginary line, $\mathbb{ \mathbb{C} }$ also consists of two copies of $\mathbb \mathbb{C} }$, called $\mathbb \mathbb{C} }(\mathbf{i})$ and $\mathbb \mathbb{C} }(\mathbf{j}).$ The set $\mathbb{ \mathbb{C} }$ forms a commutative ring with unity and with zero divisors under the usual addition and multiplication of bicomplex numbers. The product of imaginary units $\mathbf{i}$ and $\mathbf{j}$ defines a hyperbolic unit \mathbf{k}$ such that $\mathbf{k}^{2}=1.$ The three units satisf \begin{equation*} \mathbf{ij}=\mathbf{ji}=\mathbf{k},~\mathbf{ik}=\mathbf{ki}=-\mathbf{j}\text{ and }\mathbf{jk}=\mathbf{kj}=-\mathbf{i}. \end{equation*} Along with two complex planes $\mathbb \mathbb{C} }(\mathbf{i})$ and $\mathbb \mathbb{C} }(\mathbf{j})$, $\mathbb{ \mathbb{C} }$ contains a third interesting plane called the hyperbolic plane. The elements of the hyperbolic plane are the bicomplex numbers like $\mathbb \alpha =}a_{1}+\mathbf{k}a_{2}$ where $a_{1},a_{2}\in \mathbb \mathbb{R} }$. The set of hyperbolic numbers is denoted by $\mathbb{D}$ i.e. \begin{equation*} \mathbb{D=\{\alpha =}a_{1}+\mathbf{k}a_{2}:a_{1},a_{2}\in \mathbb \mathbb{R} \}}. \end{equation* Note that $\mathbb{D}$\ is a commutative ring with unity and with zero divisors under the usual addition and multiplication of $\mathbb{ \mathbb{C} }$. The two zero divisors \begin{equation*} \mathbf{e}_{1}=\frac{1+\mathbf{k}}{2}\text{ and }\mathbf{e}_{2}=\frac{1 \mathbf{k}}{2} \end{equation* form an idempotent basis in $\mathbb{ \mathbb{C} }.$ If $\mathbb{\alpha =}a_{1}+\mathbf{k}a_{2}\in \mathbb{D},$ then the idempotent representation of $\mathbb{\alpha }$ i \begin{equation*} \mathbb{\alpha =(}a_{1}+a_{2})\mathbf{e}_{1}+\mathbb{(}a_{1}-a_{2})\mathbf{e _{2}. \end{equation*} Sum and the product of two hyperbolic numbers can be defined pointwise with the idempotent basis. There exists a bijection between the Euclidean plane \mathbb{R} ^{2}$ and $\mathbb{D},$ in which every hyperbolic number $\mathbb{\alpha = \alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}$ is mapped to $(\alpha _{1},\alpha _{2})\in \mathbb{R} ^{2}$ and vice versa. Also we have the two projection maps $p_{1},p_{2}:\mathbb{D\rightarrow \mathbb{R} ,$ given b \begin{equation*} p_{i}(\mathbb{\alpha })=\alpha _{i},\text{ where }\mathbb{\alpha =}\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2},~i=1,2. \end{equation*} We say that a hyperbolic number $\mathbb{\alpha =}\alpha _{1}\mathbf{e _{1}+\alpha _{2}\mathbf{e}_{2}\in \mathbb{D}$ is a positive hyperbolic number if $\alpha _{1},\alpha _{2}>0.$ Thus the set of positive hyperbolic numbers $\mathbb{D}^{+}$ is given b \begin{equation*} \mathbb{D}^{+}\mathbb{=\{\alpha =}\alpha _{1}\mathbf{e}_{1}+\alpha _{2 \mathbf{e}_{2}:\alpha _{1},\alpha _{2}>0\mathbb{\}}, \end{equation* and we denote the set of all zero divisors in $\mathbb{D}$ by $\mathbb{O}.$ Set $\mathbb{O}_{0}=\mathbb{O}\cup \{0\}.$\ And we use the notation $\mathbb D}_{0}^{+}=\mathbb{D}^{+}\cup \mathbb{O}_{0}.$ For $\alpha ,\beta \in \mathbb{D},~$define~a relation $\preceq $ on \bigskip $\mathbb{D}$~\cite{ku}$\ $by $\alpha \preceq \beta $ whenever $\beta -\alpha \in \mathbb{D}_{0}^{+}.$ This relation is reflexive, anti-symmetric as well as transitive and hence defines a partial order on $\mathbb{D}.$ If we write the hyperbolic numbers $\alpha ,\beta $ in idempotent representation as \mathbb{\alpha =}\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}$ and \mathbb{\beta =\beta }_{1}\mathbf{e}_{1}+\mathbb{\beta }_{2}\mathbf{e}_{2},$ then $\alpha \preceq \beta $ implies that $\alpha _{1}\leq \beta _{1}$ and \alpha _{2}\leq \beta _{2}.$ And by $\alpha \prec \beta $ we mean $\alpha _{1}<\beta _{1}$ and $\alpha _{2}<\beta _{2}.$ For $A\subset \mathbb{D},$ define \cite{tell} \begin{eqnarray*} A_{\mathbf{e}_{1}} &=&\{x\in \mathbb{R} :\exists y\in \mathbb{R} \text{ such that }x\mathbf{e}_{1}+y\mathbf{e}_{2}\in A\}, \\ A_{\mathbf{e}_{2}} &=&\{y\in \mathbb{R} :\exists x\in \mathbb{R} \text{ such that }x\mathbf{e}_{1}+y\mathbf{e}_{2}\in A\}. \end{eqnarray* and we will consider the supremum and infimum of $A$ defined as follow \begin{eqnarray*} \sup A &=&\sup A_{\mathbf{e}_{1}}\mathbf{e}_{1}+\sup A_{\mathbf{e}_{2} \mathbf{e}_{2}, \\ \inf A &=&\inf A_{\mathbf{e}_{1}}\mathbf{e}_{1}+\inf A_{\mathbf{e}_{2} \mathbf{e}_{2}. \end{eqnarray*} \bigskip Moreover, any bicomplex number $w=w_{1}+jw_{2}$ can also be written as \begin{equation*} w=z_{1}\mathbf{e}_{1}+z_{2}\mathbf{e}_{2}\text{ where }z_{1}=w_{1}-\mathbf{i w_{2},~z_{2}=w_{1}+\mathbf{i}w_{2}\in \mathbb{C} (\mathbf{i}). \end{equation*} The hyperbolic modulus of a bicomplex number is defined b \begin{equation*} \left\vert w\right\vert _{k}=\left\vert z_{1}\mathbf{e}_{1}+z_{2}\mathbf{e _{2}\right\vert _{k}=\left\vert z_{1}\right\vert \mathbf{e}_{1}+\left\vert z_{2}\right\vert \mathbf{e}_{2}\in \mathbb{D}_{0}^{+} \end{equation* where $\left\vert .\right\vert $ is the real modulus of a complex number$.$ In this paper our main aim is to develop some basic properties of hyperbolic valued metric spaces. We also establish the hyperbolic version of Banach contraction principle. Further we construct a hyperbolic valued metric on the space of all hyperbolic valued continuous functions and prove some results. \section{Basic definitions and lemmas} In this section we give some basic definitions and lemmas. We rename some definitions already known. \begin{definition}[$\protect\cite{ku}$] Let $X$ be a nonempty set. A function $d_{\mathbb{D}}:X\times X\longrightarrow \mathbb{D}_{0}^{+}$ satisfying the following: $(i)$ $d_{\mathbb{D}}(x,y)\succeq 0$ for all $x,y\in X$ and $d_{\mathbb{D }(x,y)=0$ if and only if $x=y,$ $(ii)$ $d_{\mathbb{D}}(x,y)=d_{\mathbb{D}}(y,x)$ for all $x,y\in X,$ $(iii)$ $d_{\mathbb{D}}(x,y)\preceq d_{\mathbb{D}}(x,z)+d_{\mathbb{D}}(z,y)$ for all $x,y,z\in X,$ is defined to be a hyperbolic valued metric or $\mathbb{D}$-metric on $X$ and $(X,d_{\mathbb{D}})$ is called a hyperbolic valued metric space or \mathbb{D}$-metric space. \end{definition} Observe that a $\mathbb{D}$-metric $d_{\mathbb{D}}$ on $X$ can be decomposed as $d_{\mathbb{D}}(x,y)=d_{1}(x,y)\mathbf{e}_{1}+d_{2}(x,y)\mathbf{e}_{2}$ where $d_{1}(x,y)$\textbf{\ }and\textbf{\ }$d_{2}(x,y)$ are two real metrices on $X.$ \begin{definition} Let $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces. A $\mathbb{D}$-isometry between $(X,d_{\mathbb{D}})$ to (Y,\rho _{\mathbb{D}})$ is a bijection $i_{\mathbb{D}}:X\longrightarrow Y$ such that $d_{\mathbb{D}}(x,y)=\rho _{\mathbb{D}}(i_{\mathbb{D}}(x),i_ \mathbb{D}}(y))$ for all $x,y\in X.$ We say that $(X,d_{\mathbb{D}})$ and (Y,\rho _{\mathbb{D}})$ are $\mathbb{D}$-isometric if there exists an isometry from $(X,d_{\mathbb{D}})$ to $(Y,\rho _{\mathbb{D}}).$ \end{definition} We may think that two hyperbolic valued metric spaces as the same if they are $\mathbb{D}$-isometric. Note that if $i_{\mathbb{D}}$ is a $\mathbb{D} -isometry from $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}}),$ then the inverse $i_{\mathbb{D}}^{-1}$ is also a $\mathbb{D}$-isometry from $(Y,\rho _{\mathbb{D}})$ to $(X,d_{\mathbb{D}}),$ and hence being $\mathbb{D} -isometric is a symmetric relation. \begin{definition} Let $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces. An embedding of $(X,d_{\mathbb{D}})$ into $(Y,\rho _{\mathbb D}})$ is an injection $i_{\mathbb{D}}:X\longrightarrow Y$ such that $d_ \mathbb{D}}(x,y)=\rho _{\mathbb{D}}(i_{\mathbb{D}}(x),i_{\mathbb{D}}(y))$ for all $x,y\in X.$ \end{definition} Note that an embedding $i_{\mathbb{D}}$ can be regarded as a $\mathbb{D} -isometry between $X$ and its image $i_{\mathbb{D}}(X).$ \begin{definition}[$\protect\cite{sai}$] Let $(X,d_{\mathbb{D}})$ be a $\mathbb{D}$-metric space. A sequence \{x_{n}\}$ in $X$ converges to a point $\alpha $ if for every $\epsilon _ \mathbb{D}}\in \mathbb{D}^{+}~$there exists an $N\in \mathbb{N} $ such that $d_{\mathbb{D}}(x_{n},\alpha )\prec \epsilon _{\mathbb{D}}$ for all $n\geq N.$ We write $\lim\limits_{n\rightarrow \infty }x_{n}=\alpha $ or $x_{n}\rightarrow \alpha $ and $\{x_{n}\}$ is called $\mathbb{D}$-convergent sequence. \end{definition} The following lemma can be easily proved and can be considered as an alternative definition of $\mathbb{D}$-convergene: \begin{lemma} A sequence $\{x_{n}\}$ in a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ converges to $\alpha $ if and only if $\lim\limits_{n\rightarrow \infty }d_ \mathbb{D}}(x_{n},\alpha )=0.$ \end{lemma} \begin{definition} Let $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces. A function $f:X\longrightarrow Y$ is $\mathbb{D}$-continuous at a point $\alpha \in X$ if for every $\epsilon _{\mathbb{D}}\in \mathbb{D ^{+}$ there exists a $\delta _{\mathbb{D}}\in \mathbb{D}^{+}$ such that \rho _{\mathbb{D}}(f(x),f(y))\prec \epsilon _{\mathbb{D}}$ whenever $d_ \mathbb{D}}(x,\alpha )\prec \delta _{\mathbb{D}}.$ The function $f$ is called $\mathbb{D}$-continuous on $X$ if it is $\mathbb{D}$-continuous at all points in $X.$ \end{definition} The following lemma is easy to prove: \begin{lemma} Let $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces and $f:X\longrightarrow Y$. Then the following are equivalent: $i)$ $f$ is $\mathbb{D}$-continuous at a point $\alpha \in X.$ $ii)$ For every sequence $\{x_{n}\}$ in the $\mathbb{D}$-metric space $(X,d_ \mathbb{D}})$ converging to $\alpha \in X,~$the sequence $\{f\left( x_{n}\right) \}$ in the $\mathbb{D}$-metric space $(Y,\rho _{\mathbb{D}})$ converges to $f(\alpha ).$ \end{lemma} \begin{definition}[$\protect\cite{sai}$] Let $a$ be a point in a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}}),$ and assume that $r\in \mathbb{D}^{+}.$ The open $\mathbb{D}$-ball centered at $a$ with hyperbolic radius $r$ is the set \begin{equation*} B_{\mathbb{D}}(a;r)=\{x\in X:d_{\mathbb{D}}(x,a)\prec r\}. \end{equation*} The closed $\mathbb{D}$-ball centered at $a$ with hyperbolic radius $r$ is the se \begin{equation*} \overline{B_{\mathbb{D}}(a;r)}=\{x\in X:d_{\mathbb{D}}(x,a)\preceq r\}. \end{equation*} And the $\mathbb{D}$-sphere centered at $a$ with hyperbolic radius $r$ is the se \begin{equation*} S_{\mathbb{D}}(a;r)=\{x\in X:d_{\mathbb{D}}(x,a)=r\}. \end{equation*} \end{definition} \begin{remark} Let $\alpha ,\beta \in \mathbb{D}$, with $\alpha =\alpha _{1}\mathbf{e _{1}+\alpha _{2}\mathbf{e}_{2}$ and $\beta =\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}$ be their idempotent representation.~Also let $\alpha \prec \beta .$ Then the open $\mathbb{D}$-interval $\left( \alpha ,\beta \right) _{\mathbb{ }}$ is defined b \begin{equation*} \left( \alpha ,\beta \right) _{\mathbb{D}}=\{x:\alpha \prec x\prec \beta \} \end{equation* and the closed $\mathbb{D}$-interval $\left[ \alpha ,\beta \right] _{\mathbb D}}$ is defined b \begin{equation*} \left[ \alpha ,\beta \right] _{\mathbb{D}}=\{x:\alpha \preceq x\preceq \beta \}. \end{equation*} \end{remark} Note that, if $\gamma ,\delta \in \left( \alpha ,\beta \right) _{\mathbb{D}}$ or $\gamma ,\delta \in \left[ \alpha ,\beta \right] _{\mathbb{D}}$ that does not necessarily mean $\gamma \preceq \delta $ or $\gamma \succeq \delta .$ \begin{definition}[$\protect\cite{sai}$] Let $(X,d_{\mathbb{D}})$ be a $\mathbb{D}$-metric space and $A\subset X~(A\neq \phi ).~$Then $i)$\ a point $\alpha \in A$ is said to be a $\mathbb{D}$-interior point of A$ if there exists a$~B_{\mathbb{D}}(\alpha ;r)~$for some $r\in \mathbb{D ^{+}$ such that $B_{\mathbb{D}}(\alpha ;r)\subset A.$ $ii)$\ a point $\alpha \in X$ is said to be a $\mathbb{D}$-limit point of $A$ if for all$~B_{\mathbb{D}}(\alpha ;r)~($ i.e. for all $r\in \mathbb{D}^{+}), ~ $A\cap \left( B_{\mathbb{D}}(\alpha ;r)-\{\alpha \}\right) \neq \phi .$ \end{definition} The set of all $\mathbb{D}$-interior points of $A$ is denoted by $A_{\mathbb D}}^{0}$ and the set of all $\mathbb{D}$-limit points of $A$ is denoted by A_{\mathbb{D}}^{\prime }.$ \begin{definition}[$\protect\cite{sai}$] Let $(X,d_{\mathbb{D}})$ be a $\mathbb{D}$-metric space and $A\subset X~(A\neq \phi ).~$Then $i)$\ $A$ is said to be $\mathbb{D}$-open subset of $X$ if $A=A_{\mathbb{D }^{0}.$ $ii)$\ $A$ is said to be $\mathbb{D}$-closed subset of $X$ if $A\supset A_ \mathbb{D}}^{\prime }.$ \end{definition} \begin{definition}[$\protect\cite{sai}$] A sequence $\{x_{n}\}$ in a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is a $\mathbb{D}$-Cauchy sequence if for each $\epsilon _{\mathbb{D}}\succ 0$ there exists an $N\in \mathbb{N} $ such that $d_{\mathbb{D}}(x_{n},x_{m})\prec \epsilon _{\mathbb{D}}$ whenever $n,m\geq N.$ \end{definition} \begin{remark} \label{R2.3.1} If we write $d_{\mathbb{D}}(x,y)=d_{1}(x,y)\mathbf{e _{1}+d_{2}(x,y)\mathbf{e}_{2},$ for all $x,y\in X,$ then the sequence \{x_{n}\}$ in a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is a $\mathbb D}$-Cauchy sequence iff $\{x_{n}\}$ is Cauchy sequence in the real metric spaces $(X,d_{p})$ for $p=1,2.$ \end{remark} \begin{definition}[$\protect\cite{sai}$] A $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is called $\mathbb{D} -complete if every $\mathbb{D}$-Cauchy sequence converges to a point in (X,d_{\mathbb{D}})$. \end{definition} \begin{definition} A subset $K$ of a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is called a $\mathbb{D}$-compact set if for every sequence in $K$ has a subsequence converging to a point in $K.$ The space $(X,d_{\mathbb{D}})$ is $\mathbb{D} -compact if $X$ is $\mathbb{D}$-compact set, i.e., if each sequence in $X$ has a $\mathbb{D}$-convergent subsequence. \end{definition} \begin{definition} A subset $A$ of a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is $\mathbb D}$-bounded if there is a number $M\in \mathbb{D}$ such that $d_{\mathbb{D }(a,b)\preceq M$ for all $a,b\in A.$ \end{definition} \begin{definition} A subset $A$ of a $\mathbb{D}$-metric space $X$ is called totally $\mathbb{D} $-bounded if for each $\epsilon _{\mathbb{D}}\in \mathbb{D}^{+}$ there exists finite number of open $\mathbb{D}$-balls $B_{\mathbb{D }(a_{1},\epsilon _{\mathbb{D}}),$ $B_{\mathbb{D}}(a_{2},\epsilon _{\mathbb{D }),$ $\ldots ,$ $B_{\mathbb{D}}(a_{n},\epsilon _{\mathbb{D}})$ with centers in $A$ and hyperbolic radius $\epsilon _{\mathbb{D}}$ that cover $A$ i.e., \begin{equation*} A\subseteq B_{\mathbb{D}}(a_{1},\epsilon _{\mathbb{D}})\cup B_{\mathbb{D }(a_{2},\epsilon _{\mathbb{D}})\cup ...\cup B_{\mathbb{D}}(a_{n},\epsilon _ \mathbb{D}}). \end{equation*} \end{definition} Now we give an alternative description of $\mathbb{D}$-compactness which is some time more useful if we want to extend the concept of $\mathbb{D} -compactness to even more general spaces where sequences are not always an efficient tool, and it is better to have a description of $\mathbb{D} -compactness in terms of covering by $\mathbb{D}$-open sets which will be called $\mathbb{D}$-open cover. \begin{definition} A subset $K$ of a $\mathbb{D}$-metric space $(X,d_{\mathbb{D}})$ is called a $\mathbb{D}$-compact set if for every $\mathbb{D}$-open covering $\mathcal{O} $ of $K,$ i.e., \begin{equation*} K\subset \cup \{O:O\in \mathcal{O}\} \end{equation* where $\mathcal{O}$ is (finite or infinite) collection of $\mathbb{D}$-open sets of $(X,d_{\mathbb{D}}),~$there exists finite number of $\mathbb{D} -open sets $O_{1},O_{2},\ldots ,O_{n}\in \mathcal{O}$ such tha \begin{equation*} K\subset O_{1}\cup O_{2}\cup \ldots \cup O_{n}. \end{equation*} \end{definition} \begin{definition} Let $(X,d_{\mathbb{D}})$ be $\mathbb{D}$-metric space. A mapping T:X\rightarrow X$ is said to be $\mathbb{D}$-Lipschitzian if there exists a constant $k\in \mathbb{D}^{+}$ such that for all $x,y\in X \begin{equation*} d_{\mathbb{D}}(Tx,Ty)\preceq kd_{\mathbb{D}}(x,y). \end{equation*} \end{definition} The smallest number $k$ satisfying the above is called $\mathbb{D} -Lipschitz constant of $T.$ \begin{definition} A $\mathbb{D}$-Lipschitzian mapping $T:X\rightarrow X$ with $\mathbb{D} -Lipschitz constant $0\prec k\prec 1$ is said to be a $\mathbb{D} -contraction mapping. \end{definition} \begin{remark} \label{R2.4.1} Clearly every $\mathbb{D}$-Lipschitzian mapping on $\mathbb{D} $-metric space $(X,d_{\mathbb{D}})$ is $\mathbb{D}$-continuous. \end{remark} \begin{definition} A mapping $T:X\rightarrow X$ is said to be $\mathbb{D}$-contractive if \begin{equation*} d_{\mathbb{D}}(T(x),T(y))\prec d_{\mathbb{D}}(x,y). \end{equation*} \end{definition} \section{Main results} In this section we prove our main results. We check the validity of some of the results by examples given in the next section. \begin{proposition} \label{P1} Assume that $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D}$-metric spaces and $f:X\longrightarrow Y$. For a point \alpha \in X,$ the following two conditions are equivalent: i)\ $f$ is $\mathbb{D}$-continuous at $\alpha .~$\ ii)\ For all $B_{\mathbb{D}}(f(\alpha );r)\subset Y~(r\in \mathbb{D}^{+}),$ there exists a $B_{\mathbb{D}}(\alpha ;r^{\prime })\subset X~(r^{\prime }\in \mathbb{D}^{+})$ such that $f\left( B_{\mathbb{D}}(\alpha ;r^{\prime })\right) \subset B_{\mathbb{D}}(f(\alpha );r).$ \end{proposition} \begin{proof} i)$\Longrightarrow $ii):\ Assume that $f$ is $\mathbb{D}$-continuous at \alpha .$ Clearly, $B_{\mathbb{D}}(f(\alpha );r)$ is an open $\mathbb{D} -ball centered at $f(\alpha )$ in $(Y,\rho _{\mathbb{D}}).$ Since $f$ is \mathbb{D}$-continuous at $\alpha ,$ there is an $r^{\prime }\succ 0$ such that \begin{equation*} \rho _{\mathbb{D}}(f(x),f(\alpha ))\prec r\text{ whenever }d_{\mathbb{D }(x,\alpha )\prec r^{\prime }. \end{equation* This means that $f\left( B_{\mathbb{D}}(\alpha ;r^{\prime })\right) \subseteq B_{\mathbb{D}}(f(\alpha );r).$ ii)$\Longrightarrow $i):\ Now $B_{\mathbb{D}}(f(\alpha );\epsilon _{\mathbb{ }})$ $(\epsilon _{\mathbb{D}}\in \mathbb{D}^{+})$ is an open $\mathbb{D} -ball centered at $f(\alpha ),$ then by ii), there exists an open $\mathbb{D} $-ball $B_{\mathbb{D}}(\alpha ;\delta _{\mathbb{D}})\subset X~(\delta _ \mathbb{D}}\in \mathbb{D}^{+})$ such that \begin{equation*} f\left( B_{\mathbb{D}}(\alpha ;\delta _{\mathbb{D}})\right) \subset B_ \mathbb{D}}(f(\alpha );\epsilon _{\mathbb{D}}) \end{equation* which implies that $\rho _{\mathbb{D}}(f(x),f(\alpha ))\prec \epsilon _ \mathbb{D}}$ whenever $d_{\mathbb{D}}(x,\alpha )\prec \delta _{\mathbb{D}}.$ So $f$ is $\mathbb{D}$-continuous at $\alpha .$ \end{proof} \begin{proposition} Assume that $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two \mathbb{D}$-metric spaces and $f:X\longrightarrow Y$. Then the following two conditions are equivalent: i)\ $f$ is $\mathbb{D}$-continuous$.$ ii)\ Whenever $V$ is a $\mathbb{D}$-open subset of $Y,$ the inverse image f^{-1}(V)$ is a $\mathbb{D}$-open set in $X.$ \begin{proof} i)$\Longrightarrow $ii): Assume that $f$ is $\mathbb{D}$-continuous and V\subset Y$ is $\mathbb{D}$-open. We prove that $f^{-1}(V)$ is $\mathbb{D} -open. For any $\alpha \in $ $f^{-1}(V),$ $f(\alpha )\in V,$ and we know that there is a $\mathbb{D}$-open ball $U$ centered at $\alpha $ such that f(U)\subset V.$ So $U\subset f^{-1}(V),$ and since $\alpha \ $\ is arbitrary, all the points of $f^{-1}(V)$ are interior points. Hence, f^{-1}(V)$ is $\mathbb{D}$-open. ii)$\Longrightarrow $i):\ Assume that the inverse images of $\mathbb{D} -open sets are $\mathbb{D}$-open. To prove that $f$ is $\mathbb{D} -continuous at an arbitrary point $\alpha ,$ Proposition \ref{P1} tells us that it suffices to show that for any $\mathbb{D}$-open ball $B_{\mathbb{D }(f(\alpha );r)\subset Y~(r\in \mathbb{D}^{+}),$ there is a $\mathbb{D} -open ball $B_{\mathbb{D}}(\alpha ;r^{\prime })\subset X~(r^{\prime }\in \mathbb{D}^{+})$ such that $f\left( B_{\mathbb{D}}(\alpha ;r^{\prime })\right) \subset B_{\mathbb{D}}(f(\alpha );r).$ But this is easy: Since the inverse image of an open set is open, we can simply choose $U=f^{-1}(B_ \mathbb{D}}(f(\alpha );r)).$ \end{proof} \end{proposition} Note that, the above proposition still holds if we replace $\mathbb{D}$-open sets by $\mathbb{D}$-closed subsets, since the inverse image commutes with complements and the $\mathbb{D}$-closed sets are the complements of $\mathbb D}$-open sets. \begin{proposition} \label{P2.3.1}Let $\{x_{n}\}$ be a sequence in a $\mathbb{D}$-metric space (X,d_{\mathbb{D}})$ for whic \begin{equation*} \sum\limits_{i=1}^{\infty }d_{\mathbb{D}}(x_{i},x_{i+1})\prec \infty _ \mathbb{D}}, \end{equation*} where $\infty _{\mathbb{D}}=\infty \mathbf{e}_{1}+\infty \mathbf{e}_{2}$ \cite{gh}. Then $\{x_{n}\}$ is a $\mathbb{D}$-Cauchy sequence in $(X,d_ \mathbb{D}})$. \begin{proof} We write, $d_{\mathbb{D}}(x,y)=d_{1}(x,y)\mathbf{e}_{1}+d_{2}(x,y)\mathbf{e _{2},$ then $d_{1}(x,y)$ and $d_{2}(x,y)$ are real metrices on $X.$. Now $\sum\limits_{i=1}^{\infty }d_{\mathbb{D}}(x_{i},x_{i+1})\prec \infty _ \mathbb{D}}\Longrightarrow \sum\limits_{i=1}^{\infty }d_{1}(x_{i},x_{i+1})<\infty $ and $\sum\limits_{i=1}^{\infty }d_{2}(x_{i},x_{i+1})<\infty .$ Then $\{x_{n}\}$ is Cauchy sequence in the real metric space $(X,d_{p})$ for $p=1,2$ [\cite{kh}, Exercise 2.14] and hence by Remark \ref{R2.3.1}, \{x_{n}\}$ is $\mathbb{D}$-Cauchy sequence in $(X,d_{\mathbb{D}}).$ \end{proof} \end{proposition} \begin{proposition} \label{p cplt} Assume that $A$ be a subset of a $\mathbb{D}$-complete metric space $(X,d_{\mathbb{D}}).$ Then the subspace $(A,d_{\mathbb{D}}|A\times A)$ is $\mathbb{D}$-complete if and only if $A$ is $\mathbb{D}$-closed subset of $X.$ \end{proposition} \begin{proof} Proof is along the similar lines as in [ \cite{lin}, Theorem $3.4.4$] \end{proof} \begin{proposition} Let $K$ be a $\mathbb{D}$-compact subset of a $\mathbb{D}$-metric space (X,d_{\mathbb{D}}).$ Then $K$ is a totally $\mathbb{D}$-bounded. \begin{proof} Assume that $K$ is not totally $\mathbb{D}$-bounded. There is an $\epsilon _{\mathbb{D}}\in \mathbb{D}^{+}$\ such that no finite collection of~$\mathbb{D}$-open balls with hyperbolic radius $\epsilon _ \mathbb{D}}$ covers $K.$ Now we construct a sequence $\{x_{n}\}$ in $K$ that does not have a $\mathbb D}$-convergent subsequence. Choose an arbitrary elements $x_{1}\in K.$ Since $B_{\mathbb{D }(x_{1},\epsilon _{\mathbb{D}})$ does not cover $K,$ we can choose $x_{2}\in K-B_{\mathbb{D}}(x_{1},\epsilon _{\mathbb{D}}).$ Again since $B_{\mathbb{D}}(x_{1},\epsilon _{\mathbb{D}})$ and $B_{\mathbb{D }(x_{2},\epsilon _{\mathbb{D}})$ do not cover $K,$ we can choose $x_{2}\in K-\left( B_{\mathbb{D}}(x_{1},\epsilon _{\mathbb{D}})\cup B_{\mathbb{D }(x_{2},\epsilon _{\mathbb{D}})\right) .$ Continuing this way, we get a sequence $\{x_{n}\}$ such tha \begin{equation*} x_{n}\in K-\left( B_{\mathbb{D}}(x_{1},\epsilon _{\mathbb{D}})\cup B_ \mathbb{D}}(x_{2},\epsilon _{\mathbb{D}})\cup \cdots \cup B_{\mathbb{D }(x_{n-1},\epsilon _{\mathbb{D}})\right) . \end{equation*} This means that $d_{\mathbb{D}}(x_{n},x_{m})\succeq \epsilon _{\mathbb{D}}$ for all $n,m\in \mathbb{N} ,n\neq m,$ and hence $\{x_{n}\}$ has no $\mathbb{D}$-convergent subsequence. \end{proof} \end{proposition} \begin{theorem}[Extreme Value Theorem] \label{t evt} Let $K$ be a nonempty $\mathbb{D}$-compact subset of $(X,d_ \mathbb{D}})$~and $f:K\rightarrow \mathbb{D}$ be a $\mathbb{D}$-continuous function. Let $\sup f(K)=M=M_{1}\mathbf{e}_{1}+M_{2}\mathbf{e}_{2}$ and \inf f(K)=m=m_{1}\mathbf{e}_{1}+m_{2}\mathbf{e}_{2},$ then there exist a,b,c,d\in K$ such that p_{1}(f(a))=M_{1},~p_{2}(f(b))=M_{2},~p_{1}(f(c))=m_{1},~p_{2}(f(d))=m_{2}.$ \begin{proof} Since we have $\sup f(K)=\sup f(K)_{\mathbf{e}_{1}}\mathbf{e}_{1}+\sup f(K)_ \mathbf{e}_{2}}\mathbf{e}_{2}=M_{1}\mathbf{e}_{1}+M_{2}\mathbf{e}_{2},$ we have $M_{1}=\sup f(K)_{\mathbf{e}_{1}},$ where \begin{equation*} f(K)_{\mathbf{e}_{1}}=\{x\in \mathbb{R} :~\text{there exists }y\in \mathbb{R} ~\text{such that }x\mathbf{e}_{1}+y\mathbf{e}_{2}\in f(K)\}. \end{equation*} Thus, there exists a sequence $\{x_{n}\}~\ $in $f(K)_{\mathbf{e}_{1}}$ which converges to $M_{1}.$ Again for each $x_{n}~\ $in $f(K)_{\mathbf{e}_{1}}~$there exists $y_{n}\in f(K)_{\mathbf{e}_{2}}$ such that $x_{n}\mathbf{e}_{1}+y_{n}\mathbf{e}_{2}\in f(K),~$for all $n\in \mathbb{N}.$ Again since $f(K)$ is a $\mathbb{D}$-continuous image of a $\mathbb{D} -compact set, $f(K)$ is $\mathbb{D}$-compact. Thus the sequence $\{x_{n}\mathbf{e}_{1}+y_{n}\mathbf{e}_{2}\}$ in $f(K)$ has a $\mathbb{D}$-convergent subsquence, say $\{x_{n_{k}}\mathbf{e _{1}+y_{n_{k}}\mathbf{e}_{2}\}$~converging to $M_{1}\mathbf{e}_{1}+Y\mathbf{ }_{2}$ (say)$.$ Now, let $\alpha _{n_{k}}\in K$ be such that $f(\alpha _{n_{k}})=x_{n_{k} \mathbf{e}_{1}+y_{n_{k}}\mathbf{e}_{2},~~$for all $n.$ Then also $\{\alpha _{n_{k}}\}$ has a $\mathbb{D}$-convergent subsquence, say $\{\alpha _{n_{j}}\},$ since $K$ is $\mathbb{D}$-compact. Let $\{\alpha _{n_{j}}\}$ converges to $a.$ Thus, $f(a)=M_{1}\mathbf{e}_{1}+Y\mathbf{e}_{2}.$ Which implies $p_{1}(f(a))=M_{1}.$ Again since, $M_{2}=\sup f(K)_{\mathbf{e}_{2}},$ where \begin{equation*} f(K)_{\mathbf{e}_{2}}=\{y^{\prime }\in \mathbb{R} :\text{there exists}~x^{\prime }\in \mathbb{R} ~\text{such that }x^{\prime }\mathbf{e}_{1}+y^{\prime }\mathbf{e}_{2}\in f(K)\}. \end{equation*} Thus, there exists a sequence $\{y_{n}^{\prime }\}~\ $in $f(K)_{\mathbf{e _{2}}$ which converges to $M_{2}.$ Again for each $y_{n}^{\prime }~\ $in $f(K)_{\mathbf{e}_{2}}~$there exists$\ x_{n}^{\prime }\in f(K)_{\mathbf{e}_{1}}$ such that $x_{n}^{\prime }\mathbf{ }_{1}+y_{n}^{\prime }\mathbf{e}_{2}\in f(K),~\forall n.$ Again since $f(K)$ is a $\mathbb{D}$-continuous image of a $\mathbb{D} -compact set, $f(K)$ is $\mathbb{D}$-compact. Thus the sequence $\{x_{n}^{\prime }\mathbf{e}_{1}+y_{n}^{\prime }\mathbf{e _{2}\}$ in $f(K)$ has a $\mathbb{D}$-convergent subsquence, say \{x_{n_{k}}^{\prime }\mathbf{e}_{1}+y_{n_{k}}^{\prime }\mathbf{e}_{2}\} ~converging to $X\mathbf{e}_{1}+M_{2}\mathbf{e}_{2}$ (say)$.$ Now, let $b_{n_{k}}\in K$ be such that $f(b_{n_{k}})=x_{n_{k}}^{\prime \mathbf{e}_{1}+y_{n_{k}}^{\prime }\mathbf{e}_{2},~\forall n.$ Then also $\{b_{n_{k}}\}$ has a $\mathbb{D}$-convergent subsquence, say \{b_{n_{j}}\},$ since $K$ is $\mathbb{D}$-compact. Let $\{b_{n_{j}}\}$ converges to $b.$ Thus, $f(b)=X\mathbf{e}_{1}+M_{2}\mathbf{e}_{2}.$ Which implies $p_{1}(f(b))=M_{2}.$ Similarly, we can find $c,d\in K$ such that $p_{1}(f(c))=m_{1}$ and ~p_{2}(f(d))=m_{2}.$ This completes the proof. \end{proof} \end{theorem} \begin{remark} Note that, in the above theorem, we may not be able to find points $a,b\in K$ such that $f(a)=\sup f(K)$ and $f(b)=\inf f(K).$ For example, take $K=\left[ 0,1\right] _{\mathbb{D}}\subset \mathbb{D}$ equipped with $\mathbb{D}$-metric as in Example \ref{Example 1}. Take $f \left[ 0,1\right] _{\mathbb{D}}\rightarrow \mathbb{D},$ given by $f(z)=z_{1 \mathbf{e}_{1}+(1-z_{1})\mathbf{e}_{2},$ where $z=z_{1}\mathbf{e}_{1}+z_{2 \mathbf{e}_{2}.$ Then, clearly $f$ is $\mathbb{D}$-continuous and $K$ be a $\mathbb{D} -compact subset. Now, $\sup f(K)=\mathbf{e}_{1}+\mathbf{e}_{2}=1$ and $\inf f(K)=0.\mathbf{e _{1}+0.\mathbf{e}_{2}=0,$ but there do not exists $a,b\in \left[ 0,1\right] _{\mathbb{D}}$ such that $f(a)=1$ and $f(b)=0.$ \end{remark} \begin{theorem}[Banach's Contraction Mapping Principle] Let $(X,d_{\mathbb{D}})$ be $\mathbb{D}$-complete metric space and T:X\rightarrow X$ be a $\mathbb{D}$-contraction mapping having $\mathbb{D} -Lipschitz constant $k~(0\prec k\prec 1).$ Then $T$ has a unique fixed point $x_{0}$, i.e. $T\left( x_{0}\right) =x_{0},$ and for each $x\in X,$ \lim\limits_{n\rightarrow \infty }T^{n}(x)=x_{0}.$ Moreove \begin{equation*} d_{\mathbb{D}}(T^{n}(x),x_{0})\preceq \frac{k^{n}}{1-k}d_{\mathbb{D }(x,T(x)). \end{equation*} \begin{proof} Since $T$ has $\mathbb{D}$-Lipschitz constant $k,$ for each $x\in X, \begin{equation*} d_{\mathbb{D}}(T(x),T^{2}(x))\preceq kd_{\mathbb{D}}(x,T(x)). \end{equation*} Adding $d_{\mathbb{D}}(x,T(x))$ to both sides of the above give \begin{equation*} d_{\mathbb{D}}(x,T(x))+d_{\mathbb{D}}(T(x),T^{2}(x))\preceq d_{\mathbb{D }(x,T(x))+kd_{\mathbb{D}}(x,T(x)). \end{equation*} Then we have \begin{equation*} d_{\mathbb{D}}(x,T(x))\preceq \frac{1}{1-k}\left( d_{\mathbb{D}}(x,T(x))-d_ \mathbb{D}}(T(x),T^{2}(x))\right) . \end{equation*} Now define the function $\phi _{\mathbb{D}}:X-\mathbb{D}^{+}$ by setting \phi _{\mathbb{D}}(x)=\frac{1}{1-k}d_{\mathbb{D}}(x,T(x))$ for $x\in X.$ Thus \begin{equation*} d_{\mathbb{D}}(x,T(x))\preceq \phi _{\mathbb{D}}(x)-\phi _{\mathbb{D}}(T(x)) \text{ }x\in X. \end{equation*} Therefore if $x\in X$ and $m,n\in \mathbb{N} $ with $n<m, \begin{equation*} d_{\mathbb{D}}(T^{n}(x),T^{m+1}(x))\preceq \sum\limits_{i=n}^{m}d_{\mathbb{D }(T^{i}(x),T^{i+1}(x))\preceq \phi _{\mathbb{D}}(T^{n}(x))-\phi _{\mathbb{D }(T^{m+1}(x)). \end{equation*} In particular taking $n=1$ and letting $m\rightarrow \infty $ we hav \begin{equation*} \sum\limits_{i=1}^{\infty }d_{\mathbb{D}}(T^{i}(x),T^{i+1}(x))\preceq \phi _ \mathbb{D}}(T(x))\prec \infty _{\mathbb{D}}. \end{equation*} By proposition(\ref{P2.3.1}), $\{T^{n}(x)\}$ is a $\mathbb{D}$-cauchy sequence. Since $X$ is $\mathbb{D}$-complete, there exists $x_{0}\in X$ such that \begin{equation*} \lim_{n\rightarrow \infty }T^{n}(x)=x_{0}. \end{equation*} Now using remark(\ref{R2.4.1}), we hav \begin{equation*} x_{0}=\lim_{n\rightarrow \infty }T^{n}(x)=\lim_{n\rightarrow \infty }T^{n+1}(x)=T(x_{0}). \end{equation*} Thus $x_{0}$ is a fixed point of $T.$ In order to prove the uniqueness, let y$ be another fixed point of $T.$ Then from the previous result we hav \begin{equation*} x_{0}=\lim_{n\rightarrow \infty }T^{n}(y)=y. \end{equation*} Now we hav \begin{equation*} d_{\mathbb{D}}(T^{n}(x),T^{m+1}(x))\preceq \phi _{\mathbb{D}}(T^{n}(x))-\phi _{\mathbb{D}}(T^{m+1}(x)), \end{equation*} letting $m\rightarrow \infty ,$ we ge \begin{equation*} d_{\mathbb{D}}(T^{n}(x),x_{0})\preceq \phi _{\mathbb{D}}(T^{n}(x))=\frac{1} 1-k}d_{\mathbb{D}}(T^{n}(x),T^{n+1}(x)). \end{equation*} Since \begin{equation*} \frac{1}{1-k}d_{\mathbb{D}}(T^{n}(x),T^{n+1}(x))\preceq \frac{k^{n}}{1-k}d_ \mathbb{D}}(x,T(x)), \end{equation*} we hav \begin{equation*} d_{\mathbb{D}}(T^{n}(x),x_{0})\preceq \frac{k^{n}}{1-k}d_{\mathbb{D }(x,T(x)). \end{equation*} \end{proof} \end{theorem} Now a natural question arises from the previous theorem. If we replaces the sequence $\{T^{n}(x)\}$ with $\{y_{n}\}$ where $y_{0}=x$ and $y_{n+1}$ is approximately $T(y_{n}),$ then under what condition it still be the case that $\lim\limits_{n\rightarrow \infty }y_{n}=x_{0}?$ The answer of this question is given in the next theorem. We only give the statement of the theorem as it can be proved using the idempotent decomposition of hyperbolic number in the same lines as in [ \cite{kh}, Theorem $3.2$] \begin{theorem} Let $(X,d_{\mathbb{D}})$ be $\mathbb{D}$-complete metric space, let T:X\rightarrow X$ be a $\mathbb{D}$-contraction mapping with $\mathbb{D} -Lipschitz constant $k$ and suppose $x_{0}\in X$ is the fixed point of $T.$ Let $\{\epsilon _{\mathbb{D}n}\}$ be a sequence in $\mathbb{D}^{+}$ for which $\lim\limits_{n\rightarrow \infty }\epsilon _{\mathbb{D}n}=0,$ let y_{0}\in X$ and suppose $\{y_{n}\}\subseteq X$ satisfying $d_{\mathbb{D }(y_{n+1},T(y_{n}))\preceq \epsilon _{\mathbb{D}n}.$ Then \begin{equation*} \lim\limits_{n\rightarrow \infty }y_{n}=x_{0}. \end{equation*} \end{theorem} \begin{theorem} Suppose $(X,d_{\mathbb{D}})$ be $\mathbb{D}$-complete metric space and T:X\rightarrow X$ be a mapping for which $T^{N}$ is a $\mathbb{D} -contraction mapping for some positive integer $N.$ Then $T$ has a unique fixed point. \begin{proof} Proof is along the similar lines as in [ \cite{kh}, Theorem $3.3$] \end{proof} \end{theorem} The next result shows that a $\mathbb{D}$-contractive mapping can also have a fixed point in a $\mathbb{D}$-compact subspace of $\mathbb{D}$, induced with $\mathbb{D}$-metric $d_{\mathbb{D}}$ as in Example \ref{Example 1}. \begin{theorem} Let $(X,d_{\mathbb{D}})$ be a $\mathbb{D}$-compact metric space such that X\subseteq \mathbb{D}$ and $T:X\rightarrow X$ be a $\mathbb{D}$-contractive mapping. Then $T$ has a unique fixed point $x_{0},$ and moreover, for each x\in X,$ $\lim\limits_{n\rightarrow \infty }T^{n}(x)=x_{0}.$ \begin{proof} Let us consider the mapping $\psi _{\mathbb{D}}:X\rightarrow \mathbb{D}^{+}$ given b \begin{equation*} \psi _{\mathbb{D}}(x)=d_{\mathbb{D}}(x,T(x)),\text{ }x\in X. \end{equation*} Let $\psi _{\mathbb{D}}(x)=\psi _{1}(x)\mathbf{e}_{1}+\psi _{2}(x)\mathbf{e _{2}.$ Then $\psi _{i}:X\rightarrow R^{+}$ and $\psi _{i}(x)=d_{i}(x,T(x)),$ $x\in X,$ for every $i=1,2.$ Since $d_{\mathbb{D}}=d_{1}\mathbf{e}_{1}+d_{2}\mathbf{e}_{2}$ is $\mathbb{D} $-contractive, each $d_{i}$ is contractive mapping on $X.$ Now for each $i=1,2,$ $\psi _{i}$ is continuous and bounded below, so $\psi _{i}$ assumes its minimum value at some point $y_{i0}\in X.$ Since y_{i0}\neq T(y_{i0})$ implie \begin{equation*} \psi _{i}(T(y_{i0}))=d_{i}(T(y_{i0}),T^{2}(y_{i0}))<d_{i}(y_{i0}T(y_{i0}))=\psi _{i}(y_{i0}), \end{equation* which is a contradiction. Hence $y_{i0}=T(y_{i0})$ and so $y_{i0}$ is a solution of $\psi _{i}(x)=0.$ Tak \begin{equation*} x_{i0}=\min \{p_{i}(x):\psi _{i}(x)=0\},\text{ }i=1,2. \end{equation*} Now putting $x_{0}=x_{10}\mathbf{e}_{1}+x_{20}\mathbf{e}_{2},$ we get $\psi _{\mathbb{D}}(x_{0})=0.$ Hence $T(x_{0})=x_{0}.$ Let $y_{0}$ be another fixed point of $T.$ Then $T(y_{0})=y_{0}.$ Hence \begin{equation*} d_{\mathbb{D}}(x_{0},y_{0})=d_{\mathbb{D}}(T(x_{0}),T(y_{0}))\prec d_ \mathbb{D}}(x_{0},y_{0}), \end{equation* which is a contradiction. Hence $T$ has unique fixed point. Now let $x\in X$ and consider the sequence $\{d_{\mathbb{D }(T^{n}(x),x_{0})\}.$ If $T^{n}(x)\neq x_{0}, \begin{equation*} d_{\mathbb{D}}(T^{n+1}(x),x_{0})=d_{\mathbb{D}}(T^{n+1}(x),T(x_{0}))\prec d_ \mathbb{D}}(T^{n}(x),x_{0}), \end{equation*} so $\{d_{\mathbb{D}}(T^{n}(x),x_{0})\}$ is strictly decreasing. Consequently the limi \begin{equation*} r=\lim\limits_{n\rightarrow \infty }d_{\mathbb{D}}(T^{n}(x),x_{0}) \end{equation*} exists and $r\in \mathbb{D}^{+}.$ Also since $X$ is compact, the sequence \{T^{n}(x)\}$ has a $\mathbb{D}$-convergent subsequence $\{T^{n_{k}}(x)\},$ say $\lim\limits_{k\rightarrow \infty }T^{n_{k}}(x)=z\in X.$ Since \{T^{n}(x)\}$ is decreasing \begin{equation*} r=d_{\mathbb{D}}(z,x_{0})=\lim\limits_{k\rightarrow \infty }d_{\mathbb{D }(T^{n_{k}}(x),x_{0})=\lim\limits_{k\rightarrow \infty }d_{\mathbb{D }(T^{n_{k}+1}(x),x_{0})=\lim\limits_{k\rightarrow \infty }d_{\mathbb{D }(T(z),x_{0}). \end{equation*} But if $z\neq x_{0},$ then $d_{\mathbb{D}}(T(z),x_{0})=d_{\mathbb{D }(T(z),T(x_{0}))\prec d_{\mathbb{D}}(z,x_{0}).$ This proves that any \mathbb{D}$-convergent subsequence of $\{T^{n}(x)\}$ $\mathbb{D}$-converges to $x_{0},$ so it must be the case that $\lim\limits_{n\rightarrow \infty }T^{n}(x)=x_{0}.$ \end{proof} \end{theorem} Our next task is to construct a $\mathbb{D}$-metric on the space of $\mathbb D}$-continuous functions. To proceed further, first we consider the space of $\mathbb{D}$-bounded functions. Let $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces. A function $f:X\rightarrow Y$ is $\mathbb{D}$-bounded if the range set $f(X)=\{f(x):x\in X\}\subset Y$ is $\mathbb{D}$-bounded with respect to the $\mathbb{D}$-metric $\rho _{\mathbb{D}},$ i.e. for all u,v\in X,$ there exists $M\in \mathbb{D}^{+},$ such that $\rho _{\mathbb{D }(f(u),f(v))\preceq M.$ Le \begin{equation*} B_{\mathbb{D}}(X,Y)=\{f:X\rightarrow Y~|~f\text{ is }\mathbb{D}-\text{bounde }\} \end{equation* be the collection of all $\mathbb{D}$-bounded functions from $X$ to $Y.$ We shall turn $B_{\mathbb{D}}(X,Y)$ into a $\mathbb{D}$-metric space by introducing a $\mathbb{D}$-metric $\sigma _{\mathbb{D}}.$ \begin{proposition} Let$~(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces. Then \begin{equation*} \sigma _{\mathbb{D}}(f,g)=\sup \{\rho _{\mathbb{D}}(f(x),g(x))~|~x\in X\} \end{equation* defines a $\mathbb{D}$-metric $\sigma _{\mathbb{D}}$ on $B_{\mathbb{D }(X,Y). $ \begin{proof} It is clear form the definition $\sigma _{\mathbb{D}}(f,g)\succeq 0$ and \sigma _{\mathbb{D}}(f,g)=0$ if and only if $f=g.$ Also $\sigma _{\mathbb{D}}(f,g)=\sigma _{\mathbb{D}}(g,f),$ for all $f,g\in B_{\mathbb{D}}(X,Y)$ Again for all $x\in X, \begin{equation*} \rho _{\mathbb{D}}(f(x),g(x))\preceq \rho _{\mathbb{D}}(f(x),h(x))+\rho _ \mathbb{D}}(h(x),g(x))\preceq \sigma _{\mathbb{D}}(f,h)+\sigma _{\mathbb{D }(h,g), \end{equation* and taking supremum over all $x\in X,$ we ge \begin{equation*} \sigma _{\mathbb{D}}(f,g)\preceq \sigma _{\mathbb{D}}(f,h)+\sigma _{\mathbb{ }}(h,g). \end{equation*} Thus, $\sigma _{\mathbb{D}}$ defines a $\mathbb{D}$-metric on $B_{\mathbb{D }(X,Y).$\bigskip \end{proof} \end{proposition} \begin{theorem} \label{t comp} Let$\ (X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D}$-metric spaces and assume that $(Y,\rho _{\mathbb{D}})$ is \mathbb{D}$-complete. Then $\left( B_{\mathbb{D}}(X,Y),\sigma _{\mathbb{D }\right) $ is also $\mathbb{D}$-complete. \end{theorem} \begin{proof} Proof is along the similar lines as in [ \cite{lin}, Theorem $4.5.3$] \end{proof} Now we shall turn to the spaces of $\mathbb{D}$-continuous functions. As before we assume that $(X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D}$-metric spaces. We define \begin{equation*} Cb_{\mathbb{D}}(X,Y)=\{f:X\rightarrow Y~|~f\text{ is }\mathbb{D}\text -continuous and }\mathbb{D}\text{-bounded}\} \end{equation* to be the collection of all $\mathbb{D}$-bounded $\mathbb{D}$-continuous functions from $X$ to $Y.$ Since $Cb_{\mathbb{D}}(X,Y)$ is a subset of $B_{\mathbb{D}}(X,Y),$ the metri \begin{equation*} \sigma _{\mathbb{D}}(f,g)=\sup \{\rho _{\mathbb{D}}(f(x),g(x))~|~x\in X\} \end{equation* that we introduced on $B_{\mathbb{D}}(X,Y)$ is also a $\mathbb{D}$-metric on $Cb_{\mathbb{D}}(X,Y).$ \begin{proposition} $Cb_{\mathbb{D}}(X,Y)$ is a $\mathbb{D}$-closed subset of $B_{\mathbb{D }(X,Y).$ \begin{proof} It suffices to show that if $\{f_{n}\}$ is a sequence in $Cb_{\mathbb{D }(X,Y)$ that $\mathbb{D}$-converges to an element $f\in B(X,Y),$ then $f\in Cb_{\mathbb{D}}(X,Y).$ By the definition of the $\mathbb{D}$-metric $\sigma _{\mathbb{D}},$ it is clear that $\{f_{n}\}$ $\mathbb{D}$-converges uniformly to $f.$ Again since f_{n}$ is $\mathbb{D}$-bounded $\mathbb{D}$-continuous for all $n\in \mathbb{N} ,$ it can be shown that $f$ is also $\mathbb{D}$-bounded $\mathbb{D} -continuous and hence $f\in Cb_{\mathbb{D}}(X,Y).$ \end{proof} \end{proposition} \begin{theorem} Let$\ (X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces and assume that $(Y,\rho _{\mathbb{D}})$ is $\mathbb{D} -complete. Then $(Cb_{\mathbb{D}}(X,Y),\sigma _{\mathbb{D}})$ is also \mathbb{D}$-complete. \begin{proof} Recall from Proposition \ref{p cplt} that a $\mathbb{D}$-closed subspace of a $\mathbb{D}$-complete space is itself $\mathbb{D}$-complete. Since $B_ \mathbb{D}}(X,Y)$ is $\mathbb{D}$-complete by Theorem \ref{t comp}, and $Cb_ \mathbb{D}}(X,Y)$ is $\mathbb{D}$-closed subset of $B_{\mathbb{D}}(X,Y)$ by the above proposition, it follows that $Cb_{\mathbb{D}}(X,Y)$ is $\mathbb{D} -complete. \end{proof} \end{theorem} \begin{proposition} Let$\ (X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces and assume that $X$ is $\mathbb{D}$-compact. Then all \mathbb{D}$-continuous functions from $X$ to $Y$ are $\mathbb{D}$-bounded. \begin{proof} Assume that $f:X\longrightarrow Y$ is $\mathbb{D}$-continuous, and pick a point $a\in X.$ It suffices to prove that the function \begin{equation*} h(x)=\rho _{\mathbb{D}}(f(x),f(a)) \end{equation* is $\mathbb{D}$-bounded, and this will follow from the Extreme Value Theorem \ref{t evt} if we can show that it is $\mathbb{D}$-continuous. Sinc \begin{equation*} \delta _{\mathbb{D}}\left( h(x),h(y)\right) =\delta _{\mathbb{D}}\left( \rho _{\mathbb{D}}(f(x),f(a)),\rho _{\mathbb{D}}(f(y),f(a))\right) \preceq \rho _ \mathbb{D}}(f(x),f(y)), \end{equation* $($where $\delta _{\mathbb{D}}$ is the $\mathbb{D}$-metric on $\mathbb{D)}$ And since $f$ is $\mathbb{D}$-continuous, so is $h$. \end{proof} \end{proposition} Now if we defin \begin{equation*} C_{\mathbb{D}}(X,Y)=\{f:X\rightarrow Y~|~f\text{ is }\mathbb{D}-\text continuous}\} \end{equation* where $X$ is $\mathbb{D}$-compact, the above proposition tells us that $Cb_ \mathbb{D}}(X,Y)~$and\ $C_{\mathbb{D}}(X,Y)$ coincide. The following theorem sums up the results above for $X$ $\mathbb{D}$-compact. \begin{theorem} Let$\ (X,d_{\mathbb{D}})$ and $(Y,\rho _{\mathbb{D}})$ be two $\mathbb{D} -metric spaces and assume that $X$ is $\mathbb{D}$-compact, the \begin{equation*} \sigma _{\mathbb{D}}(f,g)=\sup \{\rho _{\mathbb{D}}(f(x),g(x))~|~x\in X\} \end{equation* defines a $\mathbb{D}$-metric $\sigma _{\mathbb{D}}$ on $C_{\mathbb{D }(X,Y).~$Also if $(Y,\rho _{\mathbb{D}})$ is $\mathbb{D}$-complete, so is \left( C_{\mathbb{D}}(X,Y),\sigma _{\mathbb{D}}\right) .$ \end{theorem} \section{Examples} In this section we give some examples supporting our results. \begin{example} \label{Example 1} Let $X=\mathbb{D}~\,$and $d_{\mathbb{D}}:\mathbb{D}\times \mathbb{D}\longrightarrow \mathbb{D}_{0}^{+}$ be given by \begin{equation*} d_{\mathbb{D}}(\alpha ,\beta )=\left\vert \alpha _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\beta _{2}\right\vert \mathbf{e}_{2}, \end{equation* where $\alpha =\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2},~\beta =\beta _{1}\mathbf{e}_{1}+\beta _{2}\mathbf{e}_{2}\in \mathbb{D}$ and \left\vert .\right\vert $ is the real modulus. Then clearly $\left\vert \alpha _{1}-\beta _{1}\right\vert ,\left\vert \alpha _{2}-\beta _{2}\right\vert \geq 0$ and thus $d_{\mathbb{D}}(\alpha ,\beta )\succeq 0\,,\ \forall \alpha ,\beta \in \mathbb{D}.$ Also \begin{equation*} d_{\mathbb{D}}(\alpha ,\beta )=0\Longleftrightarrow \left\vert \alpha _{1}-\beta _{1}\right\vert =0=\left\vert \alpha _{2}-\beta _{2}\right\vert \Longleftrightarrow \alpha _{1}=\beta _{1}\text{ and }\alpha _{2}=\beta _{2}\Longleftrightarrow \alpha =\beta . \end{equation*} Again, it is clear from the definition \begin{equation*} d_{\mathbb{D}}(\alpha ,\beta )=d_{\mathbb{D}}(\beta ,\alpha ),\ \forall \alpha ,\beta \in \mathbb{D}. \end{equation*} Next let $\alpha =\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2},~\beta =\beta _{1}\mathbf{e}_{1}+\beta _{2}\mathbf{e}_{2},\gamma =\gamma _{1 \mathbf{e}_{1}+\gamma _{2}\mathbf{e}_{2}\in \mathbb{D}$. Then, \begin{eqnarray*} d_{\mathbb{D}}(\alpha ,\beta ) &=&\left\vert \alpha _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\beta _{2}\right\vert \mathbf{e}_{2} \\ &=&\left\vert (\alpha _{1}-\gamma _{1})+(\gamma _{1}-\beta _{1})\right\vert \mathbf{e}_{1}+\left\vert (\alpha _{2}-\gamma _{2})+(\gamma _{2}-\beta _{2})\right\vert \mathbf{e}_{2} \\ &\preceq &\left\vert \alpha _{1}-\gamma _{1}\right\vert \mathbf{e _{1}+\left\vert \gamma _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\gamma _{2}\right\vert \mathbf{e}_{2}+\left\vert \gamma _{2}-\beta _{2}\right\vert \mathbf{e}_{2} \\ &=&\left\vert \alpha _{1}-\gamma _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\gamma _{2}\right\vert \mathbf{e}_{2}+\left\vert \gamma _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\gamma _{2}\right\vert \mathbf{e}_{2}+\left\vert \gamma _{2}-\beta _{2}\right\vert \mathbf{e}_{2} \\ &=&d_{\mathbb{D}}(\alpha ,\gamma )+d_{\mathbb{D}}(\gamma ,\alpha ). \end{eqnarray*} Thus $d_{\mathbb{D}}(\alpha ,\beta )=\left\vert \alpha _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\beta _{2}\right\vert \mathbf{e}_{2}$ is a hyperbolic valued metric on $\mathbb{D}$. Further $\left( \mathbb{D},d_{\mathbb{D}}\right) $ ia $\mathbb{D}$-complete and every $\mathbb{D}$-closed and $\mathbb{D}$-bounded subset of $\mathbb{D}$ is $\mathbb{D}$-compact. Now let $\alpha =\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}\in \mathbb{D}$ and$~r=r_{1}\mathbf{e}_{1}+r_{2}\mathbf{e}_{2}\in \mathbb{D}^{+} . The \begin{eqnarray*} B_{\mathbb{D}}(\alpha ;r) &=&\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-x_{2}\right\vert \mathbf{e}_{2}\prec r_{1}\mathbf{e}_{1}+r_{2 \mathbf{e}_{2}\} \\ &=&\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert <r_{1},\left\vert \alpha _{2}-x_{2}\right\vert <r_{2}\}, \end{eqnarray* which is a open square with vertices at $\left( \alpha _{1}+r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2},$ $\left( \alpha _{1}+r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e}_{2},$ $\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2}$ and $\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e _{2}; \begin{eqnarray*} \overline{B_{\mathbb{D}}}(\alpha ;r) &=&\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert \mathbf{e _{1}+\left\vert \alpha _{2}-x_{2}\right\vert \mathbf{e}_{2}\preceq r_{1 \mathbf{e}_{1}+r_{2}\mathbf{e}_{2}\} \\ &=&\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert \leq r_{1},\left\vert \alpha _{2}-x_{2}\right\vert \leq r_{2}\}, \end{eqnarray* which is a closed square with vertices at $\left( \alpha _{1}+r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2},$ $\left( \alpha _{1}+r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e}_{2},$ $\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2}$ and $\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e _{2};$ and \begin{align*} S_{\mathbb{D}}(\alpha ;r)& =\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-x_{2}\right\vert \mathbf{e}_{2}=r_{1}\mathbf{e}_{1}+r_{2}\mathbf e}_{2}\} \\ & =\{x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2}\in \mathbb{D}:\left\vert \alpha _{1}-x_{1}\right\vert =r_{1},\left\vert \alpha _{2}-x_{2}\right\vert =r_{2}\}. \\ & =\{\left( \alpha _{1}+r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2},\left( \alpha _{1}+r_{1}\right) \mathbf{e _{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e}_{2},\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1} \\ & +\left( \alpha _{2}+r_{2}\right) \mathbf{e}_{2},\left( \alpha _{1}-r_{1}\right) \mathbf{e}_{1}+\left( \alpha _{2}-r_{2}\right) \mathbf{e _{2}\} \end{align* which consist of only four points. So, in this situation, unlike \mathbb{R} ^{2}$ equipped with usual metric \begin{equation*} \overline{B_{\mathbb{D}}(a;r)}-B_{\mathbb{D}}(\alpha ;r)\neq S_{\mathbb{D }(\alpha ;r). \end{equation*} \end{example} \begin{example} Let $X=\mathbb{ \mathbb{C} },\,$and $d_{\mathbb{D}}:\mathbb{ \mathbb{C} }\times \mathbb{ \mathbb{C} }\longrightarrow \mathbb{D}_{0}^{+}$ be given by $d_{\mathbb{D}}(\alpha ,\beta )=\left\vert \alpha -\beta \right\vert _{k},~$where $\alpha ,~\beta \in \mathbb{ \mathbb{C} ~}$and $\left\vert .\right\vert _{k}$ is the hyperbolic valued modulus on bicomplex number. Here we shall show the triangle Inequality for $d_{\mathbb{D}}.$ Let $\alpha ,\beta ,\gamma \in \mathbb{ \mathbb{C} }$ with$~ \begin{eqnarray*} \alpha &=&\alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}=(\alpha _{11}+i.\alpha _{12})\mathbf{e}_{1}+(\alpha _{21}+i.\alpha _{22})\mathbf{e _{2}, \\ ~\beta &=&\beta _{1}\mathbf{e}_{1}+\beta _{2}\mathbf{e}_{2}=(\beta _{11}+i.\beta _{12})\mathbf{e}_{1}+(\beta _{21}+i.\beta _{22})\mathbf{e}_{2}, \\ \gamma &=&\gamma _{1}\mathbf{e}_{1}+\gamma _{2}\mathbf{e}_{2}=(\gamma _{11}+i.\gamma _{12})\mathbf{e}_{1}+(\gamma _{21}+i.\gamma _{22})\mathbf{e _{2}. \end{eqnarray* be their idempotent representation. The \begin{align*} d_{\mathbb{D}}(\alpha ,\gamma )+d_{\mathbb{D}}(\gamma ,\beta )& =\left\vert \alpha -\gamma \right\vert _{k}+\left\vert \gamma -\beta \right\vert _{k} \\ & =\left\vert \alpha _{1}\mathbf{e}_{1}+\alpha _{2}\mathbf{e}_{2}-\gamma _{1 \mathbf{e}_{1}-\gamma _{2}\mathbf{e}_{2}\right\vert _{k}+\left\vert \gamma _{1}\mathbf{e}_{1}+\gamma _{2}\mathbf{e}_{2}-\beta _{1}e_{1}-\beta _{2 \mathbf{e}_{2}\right\vert _{k} \\ & =\left\vert (\alpha _{1}-\gamma _{1})\mathbf{e}_{1}+(\alpha _{2}-\gamma _{2})\mathbf{e}_{2}\right\vert _{k}+\left\vert (\gamma _{1}-\beta _{1} \mathbf{e}_{1}+(\gamma _{2}-\beta _{2})\mathbf{e}_{2}\right\vert _{k} \\ & =\left\vert \alpha _{1}-\gamma _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\gamma _{2}\right\vert \mathbf{e}_{2}+\left\vert \gamma _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \gamma _{2}-\beta _{2}\right\vert \mathbf{e}_{2},\text{ } \\ & \text{where }\left\vert .\right\vert \text{ is modulus over }\mathbb \mathbb{C} }(\mathbf{i}) \\ & =\left( \left\vert \alpha _{1}-\gamma _{1}\right\vert +\left\vert \gamma _{1}-\beta _{1}\right\vert \right) \mathbf{e}_{1}+\left( \left\vert \alpha _{2}-\gamma _{2}\right\vert +\left\vert \gamma _{2}-\beta _{2}\right\vert \right) \mathbf{e}_{2} \\ & =\left( \sqrt{\left( \alpha _{11}-\gamma _{11}\right) ^{2}+\left( \alpha _{12}-\gamma _{12}\right) ^{2}}+\sqrt{\left( \gamma _{11}-\beta _{11}\right) ^{2}+\left( \gamma _{12}-\beta _{12}\right) ^{2}}\right) \mathbf{e}_{1} \\ & +\left( \sqrt{\left( \alpha _{21}-\gamma _{21}\right) ^{2}+\left( \alpha _{22}-\gamma _{22}\right) ^{2}}+\sqrt{\left( \gamma _{21}-\beta _{21}\right) ^{2}+\left( \gamma _{22}-\beta _{22}\right) ^{2}}\right) \mathbf{e}_{2} \\ & \preceq \left( \sqrt{\left( \alpha _{11}-\beta _{11}\right) ^{2}+\left( \alpha _{12}-\beta _{12}\right) ^{2}}\right) \mathbf{e}_{1}+\left( \sqrt \left( \alpha _{21}-\beta _{21}\right) ^{2}+\left( \alpha _{22}-\beta _{22}\right) ^{2}}\right) \mathbf{e}_{2} \\ & =\left\vert \alpha _{1}-\beta _{1}\right\vert \mathbf{e}_{1}+\left\vert \alpha _{2}-\beta _{2}\right\vert \mathbf{e}_{2} \\ & =\left\vert \alpha -\beta \right\vert _{k} \\ & =d_{\mathbb{D}}(\alpha ,\beta ) \end{align* which shows the triangle inequality. So $d_{\mathbb{D}}(\alpha ,\beta )=\left\vert \alpha -\beta \right\vert _{k}$ is a hyperbolic valued metric on $\mathbb{ \mathbb{C} }.$ \end{example} \begin{example} Let $d_{1},~d_{2}:$ $\mathbb \mathbb{C} }\times \mathbb \mathbb{C} }\rightarrow \lbrack 0,\infty )~$be two real valued metrices on $\mathbb \mathbb{C} }.$ Take, $d_{\mathbb{D}}:\mathbb{ \mathbb{C} }\times \mathbb{ \mathbb{C} }\longrightarrow \mathbb{D}_{0}^{+}$ given b \begin{equation*} d_{\mathbb{D}}(x,y)=d_{1}(x_{1},y_{1})\mathbf{e}_{1}+d_{2}(x_{2},y_{2} \mathbf{e}_{2}, \end{equation* where $x=x_{1}\mathbf{e}_{1}+x_{2}\mathbf{e}_{2},~y=y_{1}\mathbf{e}_{1}+y_{2 \mathbf{e}_{2}\in \mathbb{D},~$then $d_{\mathbb{D}}$ is a hyperbolic valued metric on $\mathbb{ \mathbb{C} }$.. \end{example}
\section*{Abstract} {\bf Experiments on periodically driven quantum systems have effectively realized quasi-Hamiltonians, in the sense of Floquet theory, that are otherwise inaccessible in static condensed matter systems. Although the Floquet quasi-Hamiltonians are time-independent, however, these continuously driven systems can still suffer from heating due to a secular growth in the expectation value of the time-dependent physical Hamiltonian. Here we use an exact space-time mapping to construct a class of many-body systems with rapid periodic driving which we nonetheless prove to be completely free of heating, by mapping them exactly onto time-independent systems. The absence of heating despite the periodic driving occurs in these cases of harmonically trapped dilute Bose gas because the driving is a certain periodic but anharmonic modulation of the gas's two-body contact interaction, at a particular frequency. Although we prove that the absence of heating is exact within full quantum many-body theory, we then use mean-field theory to simulate 'Floquet heating spectroscopy' and compute the heating rate when the driving frequency is varied away from the critical value for zero heating. In both weakly and strongly non-linear regimes, the heating rate as a function of driving frequency appears to show a number of Fano resonances, suggesting that the exactly proven absence of heating at the critical frequency may be explained in terms of destructive interferences between excitation modes. } \vspace{10pt} \noindent\rule{\textwidth}{1pt} \tableofcontents\thispagestyle{fancy} \noindent\rule{\textwidth}{1pt} \vspace{10pt} \section{Introduction} If a quantum Hamiltonian depends on time periodically, then the system possesses a discrete time translation symmetry, analogous to the discrete spatial translation symmetry of a lattice potential. Analogous to Bloch waves, the periodically driven system allows a complete set of solutions to the time-dependent Schr\"odinger equation, which have the form of a quasi-energy phase factor times a time-periodic wave function. The Fourier series components of the periodic wave function obey time-independent Schr\"odinger equations, and in this sense periodic driving can effectively realize new time-independent Hamiltonians \cite{Review Polkovnikov-Silva, Eisert-Gogolin,Review Bukov-d'Alessio}. The growing subject of \textit{Floquet engineering} \cite{Higashikawa2018,ChaoMa, BukovThesis, 1, 2,Basov2017,Oka2019} seeks to exploit this possibility to simulate exotic many-body dynamics that is not found in static condensed matter systems \cite{Mgn1,Mgn2,Choi2017}, in order to answer fundamental questions or develop technological applications. Floquet engineering is now a widespread tool in the realm of ultracold quantum gases \cite{Bloch1,Bloch2,Esslinger1,Esslinger2,Sengstock1,Sengstock2, Ketterle2019}. Among many other utilizations, it may allow achieving the Mott-insulator-to-superfluid transition of two-species hardcore bosons\cite{Wang2020}. The initial states that can actually be prepared in a driven system, however, may be limited by the actual time-dependent Hamiltonian rather than by the corresponding Floquet effective Hamiltonian, because it is still the time-dependent Hamiltonian which actually determines the system's time evolution. Measurable observables likewise evolve under the actual time-dependent Hamiltonian. Even though the Floquet effective Hamiltonian is time-independent, therefore, it is a generic problem for Floquet engineering that a continuously driven system typically suffers from heating\cite{GenskeThesis,Knap2017,Schneider2017,Ketterle2,Ketterle2019,Rubio2020}. For initial quantum states that can be prepared in experiments, the physical energy of the system, \textit{i.e.} the expectation value of the actual time-dependent Hamiltonian, may not merely be periodic and bounded, but may grow secularly over long times. This long-term heating may mask the more interesting phenomena which are the target of Floquet engineering. In a Fermi-Hubbard system \cite{HeatingRegimes}, deviations from the expected behavior in the effective Hamiltonian may clearly arise for long modulation times when heating processes dominate. For quantum critical systems described at low energy by a conformal field theory, multiple dynamical regimes clearly occur depending on the drive frequency. For slow driving and long times, the system becomes unstable and heats up to infinite temperature. In the limit where the driving frequency is much faster than any natural frequencies of the problem, one can use the Magnus expansion to find an appropriate Floquet Hamiltonian which is robust against heating \cite{Review Bukov-d'Alessio}. In some cases interference effects have also been shown to limit heating \cite{3,Schneider2017}. Further examples showing ways to avoid heating by periodic driving are, however, of interest. One technique, which has yielded exact results in many-body theory, is the use of space-time mappings to relate non-trivial systems to simpler ones. This approach has been applied to quantum gases in various special regimes of inter-particle interaction or dimensions \cite{40,41,42}. In these cases the mappings have been performed by constructing exact nontrivial time-dependent many-body wave functions from simpler wave functions that were previously known, by appropriately transforming space and time coordinates. In general the previous use of space-time mappings in many-body theory has been restricted to looking for exact solutions in special cases. In a recent work, however, we showed that beyond the use of space-time mappings for exact solution, a much more general kind of exact mapping turns out to be possible between pairs of many-body time evolutions~\cite{WPA1}. Even though the exact solutions may no longer be available for either evolution, the mapping between the two potentially very different evolutions remains exact. And in Ref~\cite{WP1}, it was shown that that this intriguing mapping between many-body quantum systems can even be extended to open systems. In the present paper, we apply our mapping to address the heating problem of Floquet engineering in quantum many-body systems. The structure of the paper is as follows: Section~\ref{sec2} reviews the quantum field mapping scheme for dilute quantum gases and uses it to construct a class of periodic modulations of the interaction strength, which must have exactly zero heating, because they can be mapped onto a time-independent system. Such a class is discussed in section~\ref{sec3} with a detailed example, where the evolution of a quantum gas with periodically driven interactions in a static harmonic trap is mapped onto the evolution of the gas with un-driven interaction in a (different) static harmonic trap. Our main results begin in section~\ref{sec4}, where we shift attention away from the exact mapping to investigate \textit{why} heating vanishes in this special case, by examining a larger class of periodic modulations which includes our special zero-heating case, but should otherwise exhibit heating. In particular we consider a quasi-one-dimensional Bose gas in a harmonic trap, with contact interactions of periodically modulated strength; since exact solutions of the full quantum problem are unavailable, we fall back on Gross-Pitaevskii mean-field theory. Mean-field theory reproduces the exact quantum many-body result of zero heating at a critical modulation frequency (double the trap frequency), but also allows us to compute heating rates for a range of different driving frequencies, in different regimes of both driving amplitude and interaction strength. We find Fano-like resonances in the heating rate, suggesting a generic mechanism for heating suppression in Floquet systems. In Section~\ref{sec5} we then apply our mapping to the cases with heating, mapping experiments with modulated interactions in static traps onto experiments with constant interactions in modulated traps. Here our results are more cautionary: plausible arguments based on the modulated-trap version of the experiments may predict dramatic `Bose fireworks' heating in cases where it does \textit{not} in fact occur, at least in mean-field theory. Section~\ref{Concl} concludes the work and draws some perspectives. \section{Mapping and driving}\label{sec2} In this section we review the exact mapping identities of \cite{WPA1} and \cite{WP1} and use them to construct a rapidly driven system which has zero heating because it is only a spacetime transformation of an undriven system. Although the mapping is also applicable for general two-particle interactions \cite{WPA1}, we focus here on systems of dilute Bose gas with contact interactions. \subsection{Mapping identities} Consider a quantum gas in $D$ dimensions with particles of mass $M$ subject to contact two-body interactions. Evolution of the gas is described in the Heisenberg picture of quantum dynamics by a time-dependent quantum field operator $\hat{\psi}(\mathbf{r},t)$ that satisfies the Heisenberg equation of motion \begin{eqnarray}\label{HE0} i\hbar\frac{\partial}{\partial t}\hat{\psi} = -\frac{\hbar^{2}}{2M}\nabla^{2}\hat{\psi} + V(\mathbf{r},t)\hat{\psi} + g(t)\hat{\psi}^{\dagger} \hat{\psi} ^2\;, \end{eqnarray} where $V(\mathbf{r},t)$ denotes the trapping potential, and $g(t)$ stands for the two-particle interaction strength. Highly controllable time-dependent interactions are routinely achieved in current quantum gas laboratories, for example via Feshbach resonance management \cite{Hulet2009,Feshbach,Zwierlein2005,Cornell2013,Wang2015}. Experiments with time-dependent interactions are currently of high interest in investigating non-equilibrium many-body evolutions \cite{Naegerl2010,Schneider2015,Pollack2010}. Our spacetime mapping identities is the following. If $\hat{\psi}_A(\mathbf{r},t)$ is a solution to (\ref{HE0}) for potential $V=V_A(\mathbf{r},t)$ and interaction strength $g(t)=g_A(t)$, then the following $\hat{\psi}_B(\mathbf{r},t)$ is a solution for the following $V=V_B$ and $g=g_B$: \begin{eqnarray}\label{dual0} \hat{\psi}_B(\mathbf{r},t) = e^{-\frac{iM}{2\hbar}\frac{\dot{\lambda}}{\lambda}r^{2}}\lambda^{D/2}\hat{\psi}_A(\lambda \mathbf{r},\tau(t)) \nonumber \\ % V_B(\mathbf{r},t) = \lambda^{2} V_A(\lambda\mathbf{r},\tau(t)) \nonumber +\frac{M r^{2}}{2}\lambda^{3}\left(\frac{1}{\lambda^{2}}\frac{d}{dt}\right)^{2}\lambda \nonumber\\ % g_A(t) \mapsto g_B(t) = \lambda(t)^{2-D} g_A(\tau(t))\nonumber\\ \tau(t) = \int_{0}^{t}\lambda(t')^{2} dt'\;, \end{eqnarray} where $\lambda = \lambda(t)$ is an arbitrary function subject only to the constraints $\lambda(0)=1$, $\dot{\lambda}(0)=0$, for $\dot{\lambda}(t)\equiv d\lambda/dt$. If we impose the Heisenberg-picture initial condition $\psi_A(\mathbf{r},0)=\psi_B(\mathbf{r},0)$ then the two time-dependent field operators $\hat{\psi}_{A,B}$ describe two different experiments on a dilute Bose gas prepared in the same initial state. Since $V_A$ and $V_B$ as well as $g_A$ and $g_B$ can easily be quite different, the A and B experiments can involve very different manipulations of the gas sample. Nonetheless the two second-quantized destruction fields are exactly related by this simple mapping, which involves a time- and space-dependent phase factor and a rescaling of space, and which relates the two experiments at different times, such that $t_A = \tau(t_B)$. Any possible experimental observables can be represented as expectation values of $N$-point functions of the second-quantized field operators, \begin{eqnarray}\label{NptFunctions} F_{\text{ex}}(\mathbf{R},\mathbf{R'},t) = \left\langle \prod_{j=1}^N \hat{\psi}_{\text{ex}}^\dagger(\mathbf{r}_j',t) \; \prod_{j=1}^N \hat{\psi}_{\text{ex}}(\mathbf{r}_j,t) \right\rangle, \end{eqnarray} where the subscript ex refers to any of the experiments A and B. The mapping between the quantum fields relates the $N$-point functions to each other as follows: \begin{eqnarray}\label{MappedNptFunctions} F_B(\mathbf{R},\mathbf{R'},t) = \lambda^{ND} e^{-\frac{iM}{2\hbar}\frac{\dot{\lambda}}{\lambda}\sum \limits _{j=1}^N (r_j^2-r_j'^2)} F_A(\lambda \mathbf{R},\lambda \mathbf{R'},\tau(t)), \end{eqnarray} where $t \equiv t_B$, $\tau(t) \equiv t_A$. Thus the mapping truly implies that either of the two experiments is a perfect analog simulation of the other one, with any measurements at any times in one experiment corresponding, according to (\ref{MappedNptFunctions}), to measurements at corresponding (different!) times in the other experiment. The mapping identities for field operators, trapping potentials, interaction strengths and $N$-point functions hold for any initial state of the system, pure or mixed and no matter how far from equilibrium it is, as long as the initial state is the same in both experiments A and B. One practical application of the mapping, as indicated in \cite{WPA1}, is to use it to simulate a more difficult experiment B exactly by mapping to it from a technically more feasible experiment A. An example given in \cite{WPA1} was a mapping between an A in which the harmonic trap is simply turned off (a ballistic expansion experiment) and a B in which the contact interaction strength is ramped to infinity. The mapping is valid, however, for \emph{arbitrary} $\lambda(t)$. With periodic $\lambda(t)$, therefore, one can effectively achieve more complex periodically driven experiments, for instance with periodic modulation of the interaction strength, by performing only simpler ones, in which for example only the trapping potential is varied. In this paper we will begin with the most trivial limit of this application: the effective realization of a periodically driven experiment B from a \emph{time-independent} experiment A. The point of this especially simple mapping is not just that a time-independent experiment is easier than a time-dependent one: it is that in a time-independent experiment there can be no secular heating, and so therefore any experiment which can be mapped exactly onto a time-independent one according to (\ref{dual0}) must also avoid secular heating, even if it includes driving. \subsection{Driving without heating} Any particular mapping between two experiments A and B is defined by the arbitrary function $\lambda(t)$ of Eqs.~\eqref{dual0}. A concrete example, which as we will see will map an undriven evolution in A onto an experiment B with periodic driving in the contact interaction strength $g_B(t)$, is% \begin{equation}\label{ldat} \lambda(t)= \frac{1}{\sqrt{\frac{1-\gamma^2}{2}\cos(2\omega t) +\frac{1+\gamma^2}{2}}}, \end{equation} where $\omega$ and $\gamma$ are arbitrary constants, taken as positive without loss of generality. This $\lambda(t)$ is periodic in time, with $\lambda(n\pi/\omega) = 1$, $\dot{\lambda}(n\pi/\omega)=0$ for all integer $n$. The general mapping (\ref{dual0}) thus implies that \begin{equation} \hat{\psi}_A\big(\mathbf{r},\tau(\frac{n\pi}{\omega})\big) = \hat{\psi}_B(\mathbf{r},\frac{n\pi}{\omega})\;, \end{equation} so that all possible observables in experiment A at times $t_A=\tau(n\pi/\omega)=\gamma^{-1}n\pi/\omega$ will exactly coincide with those in experiment B at times $t_B=n\pi/\omega$. If there is no secular heating in experiment A, therefore, there cannot be any secular heating in experiment B. To ensure that there is no secular heating in experiment A, we simply choose \begin{align} V_A &= \gamma^2\frac{M\omega^2 |\mathbf{r}|^2}{2} \end{align} for the same arbitrary $\gamma$ and $\omega$ that appear in $\lambda(t)$, and select any \emph{time-independent} contact interaction strength $g_A=g_0$. This makes the Hamiltonian for the gas in experiment A completely time-independent. The mapping (\ref{dual0}), however, yields \begin{align}\label{mappedinteractions} V_B &= \frac{M\omega^2|\mathbf{r}|^2}{2}\\ g_B(t) &= g_A\lambda(t)^{2-D}\;. \end{align} Experiment B thus also has a static harmonic trap with frequency $\omega_B = \omega$, generally different (since $\gamma$ can be anything) from the trap frequency $\omega_A = \gamma\omega$ in experiment A. In experiment B, however, the contact interaction strength $g_B(t)$ is time-dependent whenever $\gamma\not=1$ and the effective dimensionality of the trapped gas is $D\not=2$. In particular $g_B(t)$ is anharmonically modulated (except for the degenerate case $\gamma =1$) with frequency $2\omega=2\omega_B$ and with an amplitude that depends on $\gamma$, as illustrated for the case $\gamma = 1.5$ in Fig.~\ref{SketchFloquet}. For a quasi-1D Bose gas ($D=1$) we have simply $g_B(t)=g_0\lambda(t)$ when $g_A=g_0$ is constant; the time average of the interaction strength felt by the atoms in experiment B is \begin{align} \langle g_B\rangle =\frac{\omega_B}{\pi} \int_0^{\pi/\omega_B} g_A\lambda(t) \, dt = \frac{2}{\pi}g_A\mathrm{K}(1-\gamma^2), \end{align} where $\mathrm{K}$ denotes the complete elliptic integral of the first kind. The interaction strength $g_B(t)$ oscillates in time around $\langle g_B\rangle$, as in Fig.~\ref{SketchFloquet}(b). This specific time dependence of $g_B(t)$ is naturally an experimental challenge to realize precisely but the experimental technology to achieve it for trapped ultracold gases certainly exists. \begin{figure}[t!] \centering \includegraphics[width=3.5in]{SketchFloquetIntPot} \caption{Sketch of (a) trapping potentials $V_B = M\omega_B^2 x^2/2$ and $V_A = M\gamma^2\omega_B^2 x^2/2$ over space $x$, and (b) interaction strengths in both experiments A and B over time $t$ according to Eq.~\eqref{mappedinteractions}. The time is measured in the trap units of Experiment B. Experiment A is a static evolution as both the trap and interaction strengths are kept constant in time. In experiment B, while the harmonic trap is static, the scattering length is periodically driven in time in such a way that the interaction strength is modulated with driving frequency $2\omega_B$. We used $\gamma=1.5$ and $g_A=1$, which yields $\langle g_B\rangle \approx 0.8$. }\label{SketchFloquet} \end{figure} In spite of this possibly (depending on $\gamma$) strong modulation of $g_B(t)$, however, the exact quantum field mapping of (\ref{dual0}) ensures that all observables in experiments A and B are always related, at the different times $t_B=t$ and $t_A =\tau(t)$, by the simple scaling relation (\ref{MappedNptFunctions}), which in particular reduces to identity after every driving period. If the shared initial state of the two experiments is time-independent in A, then the time-dependent state in B will simply oscillate forever periodically. Regardless of the initial state, the evolution in A will obviously conserve energy, and since the mapping between the two systems is periodic, there can never be any secular growth in the energy in B. The particular form of $\lambda(t)$ chosen in (\ref{ldat}) is a convenient example because according to (\ref{dual0}) it yields a time-independent $V_B$, so that only the interaction is modulated in experiment B. With a generic periodic $\lambda(t)$ the time-independent experiment A would be mapped onto a class of B experiments with arbitrary periodic driving in $g_B(t)$, but with a simultaneous modulation of $V_B(t)$ that has to be synchronized non-trivially with $g_B(t)$, in accordance with (\ref{dual0}). Our mapped B experiments with exactly no heating are thus always quite special cases of periodic driving; we continue with (\ref{ldat}) and its static $V_B$ for the rest of this paper simply because the cases with time-dependent $V_B$ are equally special and more complicated to describe. \subsection{Mapping of times} We will describe our evolutions in the time $t=t_B$ of experiment B, but it is straightforward to derive the corresponding time in experiment A. From Eqs.~\eqref{dual0}, we find% \begin{eqnarray}\label{time} t_A &=&\frac{\tan^{-1}[\gamma\tan(\omega_B t_B)]+n_B\pi}{\gamma \omega_B}, \end{eqnarray} where $n_B=\left\lfloor \frac{2\omega_B t_B+\pi}{2\pi}\right\rfloor$, with $\lfloor ...\rfloor$ denoting the $\mathrm{floor}$ function. Inversely, then we also have \begin{eqnarray}\label{time2} t_B &=&\frac{\arctan[\gamma^{-1}\tan(\omega_A t_A)]+n_A\pi}{\gamma^{-1} \omega_A}, \end{eqnarray} where $n_A=\left\lfloor \frac{2\omega_A t_A+\pi}{2\pi}\right\rfloor.$ Inserting \eqref{time2} into \eqref{ldat}, we can express the factor $\lambda(t)$ in terms of the time in experiment B as $\lambda(t(\tau))=:\tilde{\lambda}(\tau) \equiv \tilde{\lambda}(t_A)$ \begin{eqnarray}\label{ldaA} \tilde{\lambda}(t_A) &=& \sqrt{\frac{1-\gamma^{-2}}{2}\cos(2\omega_A t_A) +\frac{1+\gamma^{-2}}{2}}. \end{eqnarray} The reciprocal relationship between $\lambda$ in (\ref{ldat}) and $\tilde{\lambda}$ in (\ref{ldaA}) is generic for the spacetime mapping (\ref{dual0}): the inverse mapping from B back to A is always simply the mapping with $\lambda\to 1/\lambda$ and $t_A$ and $t_B$ exchanged. \subsection{Why the absence of heating?} Our mapping has thus already shown the existence of a class of special cases of periodically driven quantum many-body systems with exactly no secular heating. Our further goal in this paper is to shed light on the mechanism by which these special cases avoid heating, since this mechanism will likely operate to some degree in a much broader range of cases of driving and is therefore of general interest. Since we cannot actually solve the full quantum many body problem, however, we will proceed to investigate dynamical mechanisms for avoidance of heating within Gross-Pitaevskii mean-field theory for the quasi-one-dimensional (quasi-)condensed Bose gas with weak contact interactions. It is straightforward to show \cite{WPA1} that the mapping (\ref{dual0}), which is exact in the Heisenberg picture of the full quantum theory, is also valid in the corresponding mean-field theory. \section{Mapping and driving in mean-field theory}\label{sec3} We illustrate concretely how the mapping between the time-independent and periodically driven experiments works within 1D mean-field theory for condensed bosons. \subsection{Numerical experiments with a pair of evolutions} We consider as a sample quantum gas a cigar-shaped (to the point of being quasi-one-dimensional) Bose-Einstein condensate that is described with a $c$-number field $\psi(x,t)$, the condensate wave function, governed by a Gross-Pitaevskii (GP) equation which is the mean-field counterpart of the Heisenberg equation~\eqref{HE0}, \begin{equation}\label{GP} i\hbar\frac{\partial}{\partial t}{\psi} = -\frac{\hbar^{2}}{2M}\frac{\partial^2}{\partial x^2}{\psi} + \frac{M[\omega(t)]^2 x^2}{2}{\psi} + g(t)|{\psi}|^2{\psi} \;. \end{equation} The interparticle interaction is constant and the gas is confined in a harmonic trap with trap frequency $\omega(t)$ as sketched in Fig.~\ref{SketchFloquet}(a). In order to solve the GP equation numerically, we prepare the initial state within the Thomas-Fermi regime using imaginary time relaxation. The same initial state will be used for both experiments A and B. In experiment A the un-driven system will simply remain in its initial ground state forever, while in experiment B the interaction strength is periodically modulated according to Eq.~\eqref{mappedinteractions}; as one could anticipate the gas density profile will not remain constant in B, since in B the Hamiltonian is periodically time-dependent. The implication of our mapping, however, is that all that will happen in B is a collective breathing mode, of which the amplitude will remain constant forever with zero secular growth. Without invoking our mapping, but simply numerically solving the Gross-Pitaevskii equation for B with the initial state as in A, we indeed obtain just such a breathing: see Fig.~\ref{FloquetDens}(b). \begin{figure}[htb!] \centering \includegraphics[width=3.5in]{FloquetA} \includegraphics[width=3.5in]{FloquetB} \caption{Density evolution in space and time $|\psi(x,t)|^{2}$ in two different experiments, namely (a) a static problem A and, (b) a Floquet problem B. In experiment A, we used the trapping frequency $\omega_A = 1.5\omega$ and the interaction strength $g_A = g_0 = 1.0$. In experiment B, the trapping frequency is $\omega_B = \omega$ and the interaction strength $g_B(t) = g_0\lambda(t)$ for $\lambda(t)$ given by (\ref{ldat}) with $\gamma = 1.5$. The time is measured in units of $1/\omega$ and position in units of the corresponding trap length.}\label{FloquetDens} \end{figure} \subsection{Mapping the two numerical experiments} We now directly confirm that experiments A and B as shown in Fig.~\ref{FloquetDens} are mapped onto each other by (\ref{dual0}) with the operator fields $\hat{\psi}_{A,B}$ replaced by the c-number order parameters $\psi_{A,B}$. Figure \ref{mappedfigs} shows the correspondingly obtained densities $|\psi_B(x,t)|^{2}_{\text{map}}$ and $|\psi_A(x,t)|^{2}_{\text{map}}$ obtained by mapping the densities $|\psi_A(x,t)|^{2}$ and $|\psi_B(x,t)|^{2}$ given by the Gross-Pitaevskii evolution that were displayed in panels (a) and (b) of Fig.~\ref{FloquetDens}. Comparing Figs.~\ref{FloquetDens}~and~\ref{mappedfigs}, it is impossible to tell that the plots have not just been swapped for each other. The mapping is exact. The mapping is however not trivial. The space and time axes in both plots, along with the density scales, have been transformed according to~\eqref{dual0} and its inverse. Note in particular the difference of the time spans in panels (a) and (b). At the end of the displayed experiments, we have $t_A \equiv 50$ and $t_B \equiv 75$ in the same trap-B-based natural units, as is readily obtained from Eq.~\eqref{time}. \begin{figure}[tbh!] \centering \includegraphics[width=3.5in]{mapFloquetBfromFloquetA} \includegraphics[width=3.5in]{mapFloquetAfromFloquetB} \caption{Space-time evolution of the densities (a) $|\psi_B(x,t)|^{2}_{\text{map}}$ and (b) $|\psi_A(x,t)|^{2}_{\text{map}}$, obtained by mapping the densities obtained in experiments A and B, respectively, using the relation~\eqref{dual0} and its inverse. There are no differences between these plots and those of Fig.~\ref{FloquetDens}, confirming that our quantum field mapping is also exact in mean-field theory.}\label{mappedfigs} \end{figure} \subsection{How is heating avoided?} The complete absence of heating in this special one-parameter family of periodic driving experiments, with the interaction strength modulated at exactly twice the static trap frequency and with a very particular $\gamma$-dependent anharmonic time dependence, makes this special case interesting. It shows by example that secular heating can be avoided. In itself it is a mere curiosity, though. The more generally interesting phenomenon which this special case may reveal is the dynamical mechanism of heating avoidance, since this mechanism can be expected to operate, with greater or lesser effect, in a wide range of cases. We therefore expand our attention now to a wider range of periodically driven experiments, beyond those which lack heating because they map onto undriven experiments. In particular we consider experiments of the same form as our previous experiment B for $D=1$ as above, and in which the temporal modulation of $g(t)$ has the same anharmonic form (\ref{ldat},\ref{mappedinteractions}) as in our mapped B experiments, but now with an arbitrary driving frequency: \begin{equation}\label{goft} g(t) = g_0 \left(\frac{1+\gamma^2}{2}+\frac{1-\gamma^2}{2}\cos(\nu\omega t)\right)^{-1/2} \end{equation} for arbitrary real $\gamma$, $g_0$, and $\nu$. Our mapping results so far show that there will be no heating for $\nu = 2$. What happens away from $\nu=2$? \section{Heating rate and suppression}\label{sec4} In this our main section we first face the basic question of how driving-induced heating can be quantified from numerical computations within mean-field theory. We show how the heating rate can be computed numerically. We then employ this method to see how heating rate in our driven 1D (quasi-)condensate varies with driving frequency $\nu\omega$ and interaction strength $g$. We will find that the heating rate shows troughs and peaks of a particular form that suggests, by analogy with other dynamical systems, that heating avoidance occurs through destructive interference of competing collective modes. \subsection{Numerical method for estimating heating} The secular heating rate is defined here as the average rate of change of the instantaneous energy of the system at long times; we express the heating rate dimensionlessly in terms of trap units $\hbar\omega^2$. In order to compute this heating rate, we first compute the instantaneous energy and then determine its long-term average. As a trivial simplification we subtract the initial energy and compute $\Delta E(t) = E(t) - E(0)$. Within Gross-Pitaevskii mean-field theory for the (quasi-)condensed 1D Bose gas, the instantaneous energy is \begin{align}\label{EGPt} E(t) \to E_{\text{GP}}(t) = \int dx \Big[ \frac{\hbar^2}{2M}\left\vert \frac{\partial\psi}{\partial x} \right\vert^2 + V(x)\vert\psi \vert^2 +\frac{g(t)}{2} \vert \psi \vert^4 \Big]. \end{align} The energy difference $\Delta E(t)$ is in general not constant and may have complicated temporal behavior. It exhibits multiple time scales, including a driving period and a beat period, as well as some longer time scales. At large enough times, however, we find numerically that $\Delta E(t)$ becomes dominated by a linear growth with a well-defined slope. We identify this slope as the heating rate. It is straightforward to detect the emergence of the linear energy growth because it continues steadily until it dominates clearly. We therefore simply evolve numerically under the Gross-Pitaevskii nonlinear Schr\"odinger equation (\ref{GP}) over a total time $\tau$ (many trap periods), recording the energy $\Delta E(t)$ at a discrete set of evenly spaced $t_n$ which are all whole-number multiples of the driving period $2\pi/(\nu\omega)$. On this sequence of $\Delta E(t_n)$ we then perform a linear regression analysis, fitting it to the linear model \begin{eqnarray} \Delta E(t) \approx \mathcal{E} + \beta_\tau t, \; \text{ with } t \in [0, t_{\text{max}}]. \end{eqnarray} See Fig.~\ref{power}(a). While the intercept fitting parameter $\mathcal{E}$ is of no particular importance in our problem, the slope or gradient fitting parameter $\beta_\tau$ represents the secular power gain rate of the system, due to the driving, over the time scale $\tau$. By comparing $\beta_\tau$ for different large values of $\tau$ (up to thousands of trap periods) we find that although there is an initial transient regime in which $\beta_\tau$ varies significantly with $\tau$, at large enough $\tau$ the heating rate approaches a constant (see (Fig.~\ref{power}(b)), which we then identify as the heating rate $\Gamma :=\beta_\infty$. \begin{figure}[tbh!] \centering \includegraphics[height=2.5in,width=3.5in]{figB1c2} \includegraphics[height=3.0in,width=3.5in]{Fig13} \caption{(a) Time evolution of the energy difference $\Delta E$ along with the fitting model (red straight line). (b) Instantaneous power $\beta_\tau$ received by the gas from the drive for two different driving frequencies $\nu = 0.7$ and $2.5$; we used the interaction strength in the form~\eqref{mappedinteractions} with $g_0 = 1.0$ and modulation amplitude parameter $\gamma = 1.5$. The power is measured in trap units of $\hbar\omega^2$. The time when the power stops changing considerably allows us to determine the long-time regime, which is roughly $t\in [600,\infty[$ and $[1000,\infty[$ for the frequencies $\nu=0.7$ and $2.5$, respectively. To obtain the power $\beta_\tau$, we considered $\Delta E(t)$ at times $t=2(n+n_0)\pi/(\nu\omega)\equiv t_n$, for $n=0, 1, \cdots, N$ and $t_N\leq t_{\text{max}}$. Then we obtained $\beta_\tau$ through a linear fit of the data in the set $\{\Delta E(t_0), \cdots,\Delta E(\tau) \}$ for $\tau\in \{t_1,\cdots,t_N\}$. We used $n_0=4$. }\label{power} \end{figure} \subsection{Heating rate for different interaction strengths} Thanks to sophisticated Feshbach techniques available in present-day quantum gas laboratories, numerous experiments have been achieved with variable interaction strengths~\cite{Hulet2009,Cornell2013,Feshbach,Zwierlein2005,Wang2015}. We therefore pause briefly here to investigate how the heating of our 1D mean-field gas is affected by the interaction strength prefactor $g_0$. This serves as a generic check on our method for determining heating; we must expect that heating is generally weaker for weakly interacting systems that are periodically driven, since driven harmonic oscillators reach constant-amplitude steady states, except exactly on resonance. Since the only driving in our system is in the interaction we can have no heating at all for $g_0\to 0$, but we can confirm the reasonable behavior of our numerical heating rates by seeing how they tend to increase with $g_0$, as shown in Fig.~\ref{interactionspectrum}. Globally, the heating rate increases with the interaction strength for all driving frequencies $\nu\omega$. The average rate of heating rate increase with $g_0$ itself increases with the driving frequency. In agreement with the results in our earlier sections, the heating rate remains zero for all $g_0$ in the special non-heating case $\nu = 2$ that can be mapped onto the time-independent system by the space-time rescaling (\ref{dual0}). \begin{figure}[t!] \centering \includegraphics[width=3.7in]{Fig12b_neue2} \caption{Heating rate as a function of interaction strength at small driving frequencies and at the heating trough frequency. The frequencies are given by $\nu = 0.5$, $0.7$, $1.20$, $1.40$, $1.5$ (less than the sharp resonance frequency $\nu\approx 1.9$) and $2.0$ (heating zero); we used the runtime $t_{\text{max}} = 1125$ and driving strength parameter $\gamma = 1.5$.}\label{interactionspectrum} \end{figure} \subsection{Heating rate for different driving frequencies: heating avoidance and hidden adiabaticity} We now proceed to consider the effect on heating of the driving frequency $\nu\omega$; this is the core of our paper, and the heating spectrum shown in Fig.~\ref{frequencyspectrum} is our main numerical result. Our results shown for $t_{\text{max}} = 2500$ are not discernibly different from those with $t_{\text{max}} = 1125$, confirming that we are analyzing the asymptotic long-time regime of secular heating. For $\nu=0$ heating must vanish exactly, since the system is static, and for sufficiently low $\nu$ the system should still avoid heating, because it should adapt to the slowly modulated Hamiltonian adiabatically. We do not see this in Fig.~6, however, because in fact the lowest $\nu$ that we computed was $\nu=0.05$, which is evidently not slow enough for the system to remain adiabatic over very long times. For $\nu < 2$ we do see the heating increasing slightly with drive frequency, as we noted in Fig.~5 above. Over the extended range $2<\nu< 10$, however, this increasing trend does not continue and instead the background heating rate remains nearly constant. Heating should again decrease trivially at very high frequencies, as the system responds only to the static time-averaged potential, but our one-dimensional Gross-Pitaevskii system has many high-frequency collective modes, and it is a nonlinear system with finite-amplitude driving; the time-averaged high-frequency limit is clearly well above $\nu=10$. Against the essentially flat background heating in Fig.~6, two dramatic features are seen: sharp dips and spikes in the heating rate at a number of particular driving frequencies. \begin{figure}[tbh!] \centering \includegraphics[width=3.60in]{Fig6_neue}\\ \includegraphics[width=1.65in]{Fig6_neueZoom} \includegraphics[width=1.68in]{Fig6Fano2} \caption{Heating rate as a function of driving frequency $\nu\omega$ for runtimes taken in the long-time regime; we used the interaction strength $g_0 = 1.0$ and driving strength parameter $\gamma = 1.5$. The horizontal axis does not really begin at $\nu=0$, but at $\nu=0.05$ (the lowest value we simulated), and so the quasi-static limit of very small $\nu$ does not appear in the plot. Dotted lines correspond to Bogoliubov -- de Gennes excitation frequencies while dash-dotted and dashed lines correspond to the 1/3 and 1/2 of these frequencies, respectively. (a) Heating rate in the frequency spectrum in the semilog plot; (b) A zoom of the range of smaller frequencies where subharmonics are excited; (c) The heating rate to the power $1/3$ is fitted to a Fano resonance peak around the exact heating zero at $\nu=2$.}\label{frequencyspectrum} \end{figure} \paragraph*{Heating spikes.} Many heating spikes can be seen in the heating spectrum. They appear close to frequencies that are associated with parametric resonances \cite{paramres1,paramres2,paramres3,paramres4}. In general parametric resonance can be excited whenever the driving frequency $\nu\omega =2\Omega_n/m$, where $\Omega_n$ is an eigenfrequency of the system and $m$ any positive integer. For vanishing interactions the eigenfrequencies in our dimensionless trap units are $\Omega_n = n\omega$, with $n$ being any positive integer. With $g_0=1$ the collective mode frequencies as given by Bogoliubov-de Gennes linearization of the Gross-Pitaevskii equation (\ref{GP}) around our initial ground state are slightly shifted from the non-interacting frequencies; they are shown as dotted vertical lines in Fig.~\ref{frequencyspectrum}. In the Thomas-Fermi limit where there is an infinitely large interaction strength, we anticipate that the heating spikes would appear close to the eigenfrequencies $ \Omega_n^{\text{TF}}=\sqrt{n(n+1)/2}\omega$. It is clear that most of our heating spikes are appearing very close to these collective mode resonances. The reflection symmetry of our trapping potential and initial state means that only even-parity collective modes can be excited by our driving. Heating spikes at odd-parity Bogoliubov-de Gennes frequencies, or in between frequencies, are due to subharmonic excitation with $m>1$. With $\gamma = 1.5$ our periodic driving is significantly but not extremely anharmonic, so that subharmonics with large $m$ or of higher modes do not seem to cause significant heating, but subharmonics with $m=2$ or $m=3$ are clearly visible for some of the lower modes, as seen in Fig.~\ref{frequencyspectrum}(b). The moderate driving amplitude of $\gamma=1.5$ is also evidently sufficient to produce slight nonlinear shifting of the resonance peaks away from the linear Bogoliubov-de Gennes resonances. We realize that the heating spikes lower and broaden as the frequency is getting higher. In addition the heating rate slowly softens on average as one would naturally expect when the frequency increases. \paragraph*{Heating trough.} As noted above, there must be a trivial heating minimum around $\omega=0$ , because for very slow modulation of $g$ the system will react adiabatically; this trough is not seen in Fig.~6 because we do not actually show results below $\nu=0.05$. Our focus is not on the adiabatic limit, but rather on the non-trivial heating minima such as the one at $\nu=2$, which is the zero-heating case that was identified above by our mapping. From the zoomed-in Fig.~6c) it is clear that this zero-heating case is not a unique point, but rather the bottom of a finite heating trough of low heating rates. \paragraph*{Fano resonances.}Very close to this heating trough, furthermore, there is a huge heating spike which may suggest the existence of a hidden compensation mechanism leading to the heating suppression. In the low heating region, the system evidently responds to the drive in a nearly adiabatic way. Even though adiabatic following is normally observed only for slow external driving, the heating trough thus reveals a kind of hidden adiabaticity in a rapidly driven many-body system. The appearance of the heating trough close to a heating spike, forming a distinctly asymmetric trough-peak pattern, reminds us of the so-called \textit{Fano resonance} that occurs in nanoscale structures \cite{Fano, Miroshnichenko}. Even though very mild oscillations of the actual heating curve $\Gamma(\nu)$ can be seen during the sharp resonance and heating trough, the curve is fit quite well by the Fano function, which in this case is given by \begin{equation} \Gamma^{1/3} =1.55\, \sigma \frac{(\nu-2)^2}{\sigma^2+(\nu-2-\delta)^2}, \end{equation} where the dimensionless width is $\sigma=1/105$ and the asymmetry is due to $\delta=-0.027$. This Fano profile is shown in Fig.~\ref{frequencyspectrum}(c). Fano resonances are the result of an interference between an excitation of a single mode and an excitation of a broad spectrum of modes~\cite{Miroshnichenko}. Such a process occurs for example in atomic physics, in the excitation of an electronic configuration that has an energy higher than that needed to ionize the atom. Fano resonances generally appear in the context of single-particle systems where Floquet theory is applicable to the linear equations that describe the system~\cite{Eggert2016,Eggert2017}. In those systems, Fano resonances at dynamically created bound states in the continuum may lead to points of zero transmission where the so-called quantum resonance catastrophe occurs. In this work, however, similar resonances happen in the realm of many-body physics where interactions between the atoms are normally expected to yield a more complex behavior. A deeper investigation of such resonances would require elaborate methods that are beyond the scope of this paper but may be addressed in future work; here we simply observe that our numerical mean-field results seem to suggest their existence in periodically driven interacting Bose gases. \section{Mapping interaction modulation to trap modulation}\label{sec5} The `heating rate spectroscopy' of section~\ref{sec4} has identified Fano-like resonances in the heating rate as a function of the frequency with which the contact interaction strength of a dilute Bose gas is modulated, while the gas remains trapped in static harmonic potential of trap frequency $\omega$. The resonances appear near collective mode frequencies and their subharmonics; close beside these resonance peaks are narrow minima (troughs) in the heating rate. At the special heating trough at drive frequency $\omega_\mathrm{drive}/\omega=\nu=2$, the heating rate falls all the way to zero, as the exact mapping described in section~\ref{sec3} demands. While it is only this single special heating trough that is mapped exactly onto a static experiment, we can still ask whether the mapping may shed further light on heating in many-body Floquet systems, by mapping experiments with $\nu\not=2$ onto other experiments which might be easier to analyze. \subsection{Mapping to experiments with constant interaction strength} We therefore now consider the evolutions of section~\ref{sec4} as A experiments, with constant trap frequency $\omega_A=\omega$ and modulated interaction strength $g_A(t)=g(t)$ as given by (\ref{goft}), with arbitrary overall interaction strength $g_0$, modulation amplitude $\gamma$, and drive frequency $\nu\omega$. The exact mapping (\ref{dual0}) with \begin{align}\label{ldat2} \lambda(t)=\sqrt{\frac{1-\gamma^2}{2}\cos(\nu\omega \tau(t)) +\frac{1+\gamma^2}{2}} \Longrightarrow \tan\left(\frac{\gamma\nu\omega}{2}t\right) = \gamma \tan\left(\frac{\nu\omega}{2}\tau\right) \end{align} then yields a B experiment for every value of $\nu$ in which the interaction strength has been mapped to the \emph{time-independent} $g_B=g_A(\tau)/\lambda(t) \equiv g_0$ but, except for $\nu=2$, the trap frequency $\omega_B(t)$ is now a periodic function: \begin{align}\label{dual1} \omega^2_B(t) = \omega^2\lambda^4 + \lambda^3 \frac{d^2\lambda}{d\tau^2} = \omega^2\left(\frac{1-\frac{\nu^2}{4}}{\left(\frac{1+\gamma^{-2}}{2}+\frac{1-\gamma^{-2}}{2}\cos(\gamma\nu\omega t)\right)^2}+\frac{\nu^2\gamma^2}{4}\right)\;. \end{align} In the case $\nu=2$ we thus recover the entirely static experiment with trap frequency $\gamma\omega$, from which we constructed the heating-free driven experiment in the first place, via the inverse of this mapping. For $\nu\not=2$ we now have a class of experiments with constant interactions and modulated trapping frequencies, which are mapped exactly as quantum many-body problems onto the experiments that we analyzed in mean-field theory in section~\ref{sec4}. We still cannot solve these new evolution problems exactly, and solving them in mean-field theory will only yield the image under the mapping of our results from section~\ref{sec4} above. It might be possible, however, to obtain some insight or intuition about our heating peaks and troughs by considering these physically quite different experiments which are exactly mapped versions of the previous ones. \subsection{Mapping the mean-field energy} We can establish that a B experiment will show long-term heating if and only if the corresponding A experiment shows long-term heating. This is intuitive but not quite obvious, because it is straightforward to show that the mapping (\ref{dual0}) transforms the Gross-Pitaevskii mean-field energy (\ref{EGPt}) as \begin{align} E_B(t_B)&=\lambda^2 E_A(t_A)+ \frac{M}{4}\left(\frac{d^2\lambda^2}{dt_A^2}\right)\int\!dx\,x^2|\psi_A(x,t_A)|^2\nonumber\\ & -\frac{M}{4}\left(\frac{d\lambda^2}{dt_A}\right)\frac{d}{d t_A}\int\!dx\,x^2|\psi_A(x,t_A)|^2 \end{align} for $t_A=\tau(t_B)$. Thus the energies in the two experiments are not simply the same. Suppose, however, that $E_A$ does not show secular growth. In this case $\int\!dx\,x^2|\psi_A|^2$ cannot show secular growth, either, because $E_A$ is a sum of positive definite terms, one of which is proportional to $\int\!dx\,x^2|\psi_A|^2$, so that if $\int\!dx\,x^2|\psi_A|^2$ grew secularly then $E_A$ would have to grow secularly as well. Thus if $E_A$ does not show secular growth, then neither can $E_B$, because it consists only of non-growing terms multiplied by periodic functions. Suppose now that $E_B$ does not show secular growth. As we observed above, it is straightforward to confirm from our mapping definition (\ref{dual0}) that the inverse transformation which maps from B to A is simply the mapping with $\lambda\to 1/\lambda$. Hence we also have \begin{align} E_A(t_A)&=\lambda^{-2} E_B(t_B)+ \frac{M}{4}\left(\frac{d^2\lambda^{-2}}{dt_B^2}\right)\int\!dx\,x^2|\psi_B(x,t_B)|^2\nonumber\\ & -\frac{M}{4}\left(\frac{d\lambda^{-2}}{dt_B}\right)\frac{d}{d t_B}\int\!dx\,x^2|\psi_B(x,t_B)|^2\;. \end{align} Hence by the same argument that we have just made above, if $E_B$ does not show secular growth then neither can $E_A$. Thus it is impossible for $E_A$ to grow secularly without $E_B$ also growing secularly. The questions of secular heating in A and B experiments are therefore really both the same question. Whatever mechanisms cause or suppress heating in one kind of experiment will be the images, under our mapping, of the mechanisms that cause or suppress heating in the other kind of experiment. Unfortunately, however, this does not necessarily mean that the mechanisms are obvious in either case. To illustrate the kind of subtle problem that can occur even in the comparatively simple B experiments, in which only the trap potential is modulated, we will propose an argument for explosive heating in some A experiments, which should seem plausible but has in fact already been disproven by our results in section~\ref{sec4} above. \subsection{Absence of Bose fireworks from intermittent anti-trapping} \paragraph*{Repulsive potentials.} For $\gamma \not= 1$ and $\nu$ above a $\gamma$-dependent threshold $\nu_-(\gamma)$, $\omega^2_B(t)$ as given by (\ref{dual1}) can become negative within certain time intervals. The threshold $\nu$ above which $\omega_B^2<0$ is \begin{equation}\label{numin} \nu > \nu_{-}(\gamma)=\left\{\begin{matrix}\frac{1}{\sqrt{1-\gamma^2}} &,& \gamma<1\\ \frac{\gamma}{\sqrt{\gamma^2-1}}&,&\gamma>1\;.\end{matrix} \right.\end{equation} There are no values of $\gamma$ and $\nu$ for which the trapping strength $\omega_B^2$ becomes negative for all $t$, but for $\nu$ above a higher threshold $\nu_c(\gamma)$ the \emph{average} trap strength over a driving period does become negative: \begin{align} \langle\omega^2_B\rangle &= \frac{\gamma\omega\nu}{\pi} \oint\omega_B^2(\tau) d\tau = \frac{\gamma\omega^2}{2}\left(1+\gamma^2 -\frac{\nu^2}{4}(1-\gamma)^2\right)\nonumber\\ \Longrightarrow \nu_c(\gamma) &= 2\frac{\sqrt{1+\gamma^2}}{|1-\gamma|} \equiv \nu_c(1/\gamma)\;. \end{align} \paragraph*{Bose fireworks?} It seems plausible that heating should increase in some significant way when $\nu>\nu_-(\gamma)$, since then the quasi-one-dimensional gas is being repeatedly subjected to a repulsive potential instead of a trap. And it seems plausible that heating should become quite strong indeed for $\nu>\nu_c(\gamma)$, since then the gas is actually being anti-trapped, rather than trapped, for most of the time. Moreover the thresholds $\nu>\nu_-$ for $\omega_B^2(t)<0$ and $\nu>\nu_c$ for $\langle\omega_B^2\rangle<0$ have nothing to do with the mean-field approximation; they are facts about the time-dependent potential strength $\omega_B^2(t)$ which remain true in the full quantum many-body problem. It may therefore not seem too much to expect that our mapped B experiments are here predicting something like the so-called `Bose fireworks' that have been seen in A-like experiments with modulated interaction strength \cite{ChengChin2017,ChengChin2018}. \paragraph*{No.} In fact, however, Fig.~\ref{frequencyspectrum} has already shown that there is no substantial increase in the heating rate for either $\nu>\nu_-$ or $\nu>\nu_c$. Whether or not this is counter-intuitive, the particular form of modulated potential (\ref{dual1}) simply does not cause any fireworks-like heating. The slow, linear heating that we have seen in section~\ref{sec4} above does occur, as long as $g_0\not=0$, $\gamma\not=1$, and $\nu\not=2$. In the B experiments this heating is produced by the modulated trapping potential alone, with the interaction strength $g_B=g_0$ constant. The fact that this form of potential modulation does not generate abundant heat by itself, however, can be seen by considering the non-interacting case $g_0=0$. One might expect the modulating potential to heat the non-interacting gas, but for $g_0=0$ the A experiment to which all the B experiments can be mapped has time-independent trap strength $\omega^2$ and also $g_A=0$. There is therefore no heating at all for $g_0=0$ in either A or B experiments, for any values of $\nu$ or $\gamma$. We must therefore recognize that neither $\omega_B^2(t)<0$ nor even $\langle\omega_B^2\rangle<0$ has to imply dramatic heating. Evidently in the intervals of positive $\omega_B^2$ the trap can be strong enough to pull the gas back together again after it has been dispersed during the anti-trapping intervals of negative $\omega^2_B$. The analogy between our A experiments with modulated interaction and the actual `Bose fireworks' experiments is also evidently not as close as it might at first seem. First of all in \cite{ChengChin2017,ChengChin2018} the interaction strength $g(t)$ was much more strongly modulated than our $g(t)$ from (\ref{goft}) can allow for any $\gamma$: the real experiments had $g(t)$ oscillating between positive and negative values, with an amplitude some twelve times greater than the mean value of $g(t)$. With large $\gamma$ we can achieve arbitrarily large amplitude in $g(t)$ but our (\ref{goft}) does not allow $g(t)$ to change sign. Secondly the real experiments used a trapping potential of finite depth, and for highly excited atoms this is qualitatively different from our parabolic potential extending to infinity. \section{Conclusion and outlook}\label{Concl} Periodically driven many-body quantum systems are a useful experimental tool for understanding non-equilibrium physics, but one phenomenon of non-equilibrium physics which they cannot in general avoid is the problematic phenomenon of secular heating. Our exact spacetime mapping between quantum fields provides a limited range of results for such problems, but in the special cases that the mapping provides, it is exact, and so it can supply us with instructive examples. We have used it to identify a special form of periodic modulation of the strength of the contact interaction in a dilute Bose gas: a special case in which there is no heating at all. This shows the possibility of a kind of hidden adiabaticity in rapidly driven interacting quantum systems. We have further explored this phenomenon with numerical calculations for quasi-one-dimensional Bose-Einstein condensates in Gross-Pitaevskii mean-field theory, showing that the heating rate in this kind of system can show Fano-like resonances as a function of driving frequency. The exact zero-heating case found by our mapping appears to be one of these resonances, but many similarly narrow, deep troughs in the heating rate can also appear. From our failed speculations about dramatic heating in section~\ref{sec5}, the cautionary lesson must be drawn that the exact mapping may not always be able to simplify complex experiments by mapping them onto simple ones. Sometimes it will instead reveal that the seemingly simple experiments are not really as simple as they seemed. This is also learning something, however. Further applications of the exact spacetime mapping of quantum fields \cite{WPA1,WP1} to periodically driven quantum many-body systems will be well worth pursuing. \section*{Acknowledgements} The authors would like to thank Sebastian Eggert and Christoph Dauer for discussions. \paragraph{Funding information} EW acknowledges financial support from the Abdus Salam International Center for Theoretical Physics, through a Simons Associateship, and from the Alexander von Humboldt Foundation under the grant number 3.4-KAM/1159208 STP. The work is also funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under the project number 277625399 - TRR 185.
\section{Introduction} Consumer-grade cameras usually have a rolling shutter (RS) mechanism which causes consecutive rows of an image to be captured with an inter-line delay. RS cameras are widely used in smartphones \cite{huaiMobileARSensor2019}, mixed reality products \cite{kerlDense2015}, and autonomous driving cars \cite{sunScalability2020}. Thanks to the RS feature, these cameras have been used to measure distances \cite{kimObject2020}, to estimate motion at a high frequency \cite{bapatRolling2018}, and to identify modulated flickering LEDs \cite{zhuangSurvey2018}. On the other hand, RS introduces image distortion when there is relative motion between the camera and the scene. For better performance, this distortion needs to be considered in applications sensitive to motion. In response, methods tailored to RS cameras have been proposed for video stablization \cite{ringabyEfficient2012}, camera calibration \cite{othRolling2013}, structure from motion \cite{imAccurate2019}, vision-aided odometry \cite{liVisionaidedInertialNavigation2014}, dense mapping \cite{kerlDense2015}, \etc. For applications like vision-aided odometry and dense mapping, a camera is usually rigidly attached to other sensors, \eg, depth cameras, lidars, IMUs, to provide complementary data. One important step of these applications is the spatiotemporal calibration of these sensors. Existing calibration methods usually assume that the camera uses a global shutter (GS), \eg, \cite{rehderExtending2016}. For specific sensor assemblies, \eg, a lidar-camera rig, a RGB-D sensor, it is possible to estimate the extrinsic parameters using standstill data, \eg, \cite{kangAutomatic2020}. But for a lidar-camera rig, many recent algorithms require motion between the sensor system and the scene for fast calibration \cite{parkSpatiotemporal2020,nowickiSpatiotemporal2020} and hence these methods were only validated with GS cameras. For camera-IMU systems, the extrinsic calibration always requires egomotion where the RS skew comes into play. But there has been limited spatiotemporal calibration methods for RS cameras. Consequently, it has been unclear how the RS affects the extrinsic calibration. Taking the camera-IMU system as an example, this paper looks into the effect of RS on spatiotemporal calibration. We formulate the calibration problem with continuous-time B-splines \cite{furgaleContinuoustime2012} which allow interpolating a unique camera pose for each observation in a RS image, precisely handling the RS effect. By differentiating the B-splines, it is straightforward to accommodate the IMU data. This formulation has been shown to improve simultaneous localization and mapping (SLAM) with a RGB-D camera \cite{kerlDense2015}, and spatiotemporal calibration of combinations of a GS camera, an IMU, and a laser range finder \cite{rehderGeneralApproachSpatiotemporal2016}. In this regard, our work extends the existing calibration methods to deal with the RS effect. The proposed method was evaluated with simulated data generated from four sets of public calibration data, and with real data captured by two industrial camera-IMU systems. The simulation and real data tests showed that considering the RS effect in spatiotemporal calibration often improved relative orientation by 1$^\circ$ and relative location by 2 cm from results of a GS-based calibration approach. The contributions of this paper are as follows. \setlist{nolistsep} \begin{enumerate}[noitemsep] \item We propose a continuous-time B-spline-based approach for spatiotemporal calibration of systems composed of a RS camera and an IMU. Our novelty lies in considering the RS effect in continuous-time spatiotemporal calibration (Section~\ref{sec:method}). \item We quantify the RS effect on extrinsic and temporal calibration with simulation and real data, answering questions about the necessity of accounting for the RS effect (Section~\ref{sec:experiments}). \item As a byproduct, the proposed approach also provides accurate estimates for the line delay (Section~\ref{subsubsec:bluefox}). \end{enumerate} \begin{figure}[t] \centering \includegraphics[width=0.7\linewidth]{figures/setup/ueye_artemis_20210314} \\ \includegraphics[width=0.7\linewidth]{figures/setup/bluefox_artemis_2020} \caption{Sensor calibration setups: (top) an IDS uEye 3241LE-M-GL camera and a SparkFun OpenLog Artemis IMU board, (bottom) a Bluefox MLC202dG camera and the Artemis board. Also inset in each picture are the coordinate frames for the camera $\{C\}$, the IMU $\{I\}$, and the calibration target $\{W\}$. } \label{fig:ueye-artemis-20210314} \end{figure} \section{Related work} The wide application range of RS cameras has drawn much research about its effect on a variety of vision-based tasks. In general, modeling the RS effect leads to better performance with RS cameras. This improvement has been validated for video stabilization \cite{ringabyEfficient2012}, structure from motion \cite{hedborgRolling2012, saurerSparse2016, ovrenTrajectory2019, daiRolling2016}, dense mapping \cite{kerlDense2015}, vision-aided odometry \cite{liVisionaidedInertialNavigation2014, patron-perezSplinebased2015, schubertRollingshutter2019}. Though many sensor systems use RS cameras, \eg, Kinect Azure, camera-IMU systems on smartphones, few research has been conducted on the spatiotemporal calibration of a RS camera. Many existing extrinsic calibration studies either deal with GS cameras or assume that the data are captured when the sensor system is held still. Spatiotemporal calibration for a GS camera-IMU system or a GS camera-lidar system is achieved by continuous-time B-splines in \cite{rehderGeneralApproachSpatiotemporal2016}. Calibration methods for a GS camera-lidar system with motion relative to the scene have been presented in \cite{parkSpatiotemporal2020, nowickiSpatiotemporal2020}. A camera-lidar system was calibrated with data collected by holding the device at different poses in \cite{kangAutomatic2020}. Basso \etal \cite{bassoRobust2018} estimated the extrinsic parameters of a RGB-D system using synchronized data at standstills. To calibrate the line delay of a RS camera, a continuous-time optimization method based on B-splines was proposed in \cite{othRolling2013}. Driven by the question of how the RS affects the spatiotemporal calibration, we develop a calibration approach for the camera-IMU system and quantify the RS effect on sensor assemblies with precise reference values. Cumulative cubic B-splines were used in \cite{patron-perezSplinebased2015} for visual inertial SLAM with a RS camera. They showed that the SLAM system could improve the scale estimation by considering the RS effect. A study close to ours \cite{leeCalibration2018} presents a discrete-time optimization approach to calibrate the spatiotemporal parameters of a RS camera-IMU system. The approach assumes constant IMU biases and linearly interpolates poses for rolling shutter observations from poses at discrete times. Due to varying time offset in iterations of the nonlinear refinement, the IMU factors have to be integrated repeatedly, adding to the computation. A bit surprisingly, their tests showed that their approach and the GS camera-IMU calibration tool in Kalibr achieved similar spatiotemporal calibration results. \section{Continuous-time rolling-shutter-camera-IMU calibration} \label{sec:method} This section presents our spatiotemporal calibration method for the combined device of a RS camera and an IMU. The inputs are images of a calibration target, \eg, an Aprilgrid, and the corresponding gyroscope and accelerometer data. Observations extracted from this data are used in a least-squares solver for estimating the spatiotemporal parameters and the device motion. Since landmark observations in an image are exposed at different times due to the RS effect, we have to interpolate the camera pose at these observations by fitting motion with sparse poses. Early studies considering the RS effect often linearly interpolated the camera pose with the constant velocity assumption. An alternative approach is to use continuous-time basis splines, \eg, \cite{furgaleContinuoustime2012, patron-perezSplinebased2015}, which has better fitting capacity and flexibility with high-order curves. Our method uses the continuous-time vector-valued B-splines \cite{furgaleContinuoustime2012} to accommodate landmark observations at different times. In the following, we first briefly review the vector-valued B-splines for representing poses, and then describe the observation models used in calibration. \subsection{Continuous-time B-splines} With B-splines of order $k$, a state variable $\mathbf{v}\in\mathcal{R}^D$ is interpolated by weighting $N$ control points $\mathbf{v}_i \in \mathcal{R}^D$, $i = \begin{bmatrix} 0 & 1 & \cdots & N-1 \end{bmatrix}$, \begin{equation} \mathbf{v}(t) = \sum_{j=0}^{N-1} \mathbf{v}_j B_{j,k}(t). \end{equation} The weights $B_{j,k}(t)$ of these control points are computed with basis splines which are analytical functions of time defined recursively \cite{qinGeneral26}, \begin{subequations}\label{eq:Bspline} \begin{align} B_{i,1}(t)&=\begin{cases} 1, t\in[t_i, t_{i+1})\\ 0, t\notin[t_i, t_{i+1}) \end{cases}\\ B_{j,k}(t)&=\frac{t-t_j}{t_{j+k-1}-t_j}B_{j,k-1}(t)+\frac{t_{j+k}-t}{t_{j+k}-t_{j+1}}B_{j+1,k-1}(t). \end{align} \end{subequations} where the epochs denoted by $\{t_i\}$ are also known as knots. A spline takes nonzero values in only $k$ time intervals. Thus, the vector variable $\mathbf{v}(t)$ fitted by B-splines of order $k$ is determined by $k$ control points, $\mathbf{v}_j, \mathbf{v}_{j+1}, \dots, \mathbf{v}_{j+k-1} \in \mathcal{R}^D$, that contribute to its value at time $t \in [t_j, t_{j+1})$: \begin{equation} \mathbf{v}(t) = \sum_{i=j}^{j+k-1}\mathbf{v}_i B_{i,k}(t). \end{equation} Defining $u = (t - t_j) / (t_{j+1} - t_j)$, $\mathbf{v}(t)$ can be written in matrix form \cite{qinGeneral26}, which facilitates efficient value and derivative evaluation, \begin{equation} \mathbf{v}(t) = \begin{bmatrix} \mathbf{v}_j & \mathbf{v}_{j+1} & \cdots & \mathbf{v}_{j+k-1} \end{bmatrix} M^{(k)} \mathbf{u} \end{equation} where $\mathbf{u} = \begin{bmatrix}1 & u & \cdots & u^{k-1} \end{bmatrix}^\intercal$. The entries of $k\times k$ matrix $M^{(k)}$ can be found in \cite{qinGeneral26}. For uniform B-splines of evenly spaced knots, its entries $m_{i,j}$ can be computed analytically by \begin{equation} m_{i, j} = \frac{C_{k-1}^j}{(k-1)!} \sum_{s=i}^{k-1}(-1)^{s-i} C_k^{s-i} \cdot (k-1-s)^{k-1-j} \end{equation} with $i, j \in \begin{bmatrix} 0 & 1 & \cdots & k-1 \end{bmatrix}$ and the binomial coefficient $C_n^i = n! / (i!(n-i)!)$. To fit motion with vector-valued B-splines, the device pose $\mathbf{T}_{WI} = \begin{bmatrix} \mathbf{R}_{WI} & \mathbf{p}_{WI} \end{bmatrix}$ relative to the $\{W\}$ frame on the calibration target is expressed by the angle-axis representation $\boldsymbol{\phi} \in \mathcal{R}^3$ for $\mathbf{R}_{WI}$ and the translation component $\mathbf{p}_{WI}(t)$. Thus, the motion spline with $N$ control points is given by \begin{equation} \begin{bmatrix} \boldsymbol{\phi}(t) \\ \mathbf{p}(t) \end{bmatrix} = \sum_{j=0}^{N-1} \begin{bmatrix} \boldsymbol{\phi}_j \\ \mathbf{p}_j \end{bmatrix} B_{j,k}(t) \label{eq:pose_spline} \end{equation} where $\boldsymbol{\phi}_j$ and $\mathbf{p}_j$ are the control points for rotation and translation, respectively. The above describes the vector-valued B-splines for which the control points are in a vector space. It is also possible to define cumulative B-splines on Lie groups, \eg, SO(3) \cite{sommerEfficient2020}. The cumulative B-splines on SO(3) are free of rotation singularity, but are more complex when dealing with unevenly spaced knots. We choose to use the vector-valued B-splines, partly for fair comparison to existing methods. To deal with potential angle jumps (axis flips) at 2$k\pi$, $k=[1, 2, \cdots]$, in the angle-axis representation, the approach described in \cite{othRolling2013} is used to ensure consecutive angle-axis values are close. To model the time-varying IMU biases $\mathbf{b}(t)$, we fit them by B-splines with $M$ control points $\mathbf{b}_j$, $j = [0, 1, \cdots, M-1]$, \begin{equation} \mathbf{b}(t) = [\mathbf{b}_g^\intercal(t) \enskip \mathbf{b}_a^\intercal(t)]^\intercal = \sum_{j=0}^{M-1} \mathbf{b}_{j} B_{j,k}(t) \end{equation} where $\mathbf{b}_g$ and $\mathbf{b}_a$ are gyroscope and accelerometer biases, respectively. \subsection{Observations} \label{subsec:observations} For the camera-IMU system, the camera provides images from which landmark observations are detected and the IMU provides angular velocity and linear acceleration measurements. The landmark observations are modeled with the classic reprojection model. For a landmark $k$ of homogeneous coordinates $\mathbf{l}_k^W$, its reprojection error in image $j$ of timestamp $t_j$ per the camera clock is \begin{equation} \label{eq:reprojection} \mathbf{r}_{jk} = \mathbf{h}(\mathbf{T}_{CI}[\mathbf{T}_{WI}(t_{j} + t_{IC} + vd)]^{-1} \mathbf{l}_k^W) - \mathbf{z}_{jk} + \mathbf{n}_c, \end{equation} where $\mathbf{h}(\cdot)$ is the camera projection model with the intrinsic parameters $\boldsymbol{\theta}$, the camera extrinsic parameters are in $\mathbf{T}_{CI}$, the observation is $\mathbf{z}_{jk} = [u, v]^\intercal$, and the observation time $t_j + t_{IC} + vd$ accounts for the camera time offset $t_{IC}$ relative to the IMU and line delay $d$. The noise $\mathbf{n}_c$ affecting image observations is assumed to be 2D white Gaussian with magnitude $\sigma_c$ in each dimension. We adopt two IMU models presented in \cite{rehderExtending2016}, the calibrated model with bias terms, and the scale-misalignment model considering scale and misalignment effects besides biases. Recall that the accelerometer triad measures the acceleration in the IMU frame, $\mathbf{a}_s^I$, due to specific forces, \begin{equation} \mathbf{a}_s^I = \mathbf{R}_{WI}^\intercal (\ddot{\mathbf{p}}_{WI} - \mathbf{g}^W). \end{equation} The gyroscope measures angular velocity of the device in $\{I\}$ frame, $\boldsymbol{\omega}_{WI}^I$. Both $\mathbf{a}_s^I$ and $\boldsymbol{\omega}_{WI}^I$ can be expressed with the pose B-spline \eqref{eq:pose_spline} \cite{rehderExtending2016}. In the calibrated model, the IMU measurements $\mathbf{a}_m$ and $\boldsymbol{\omega}_m$ are affected by accelerometer and gyroscope biases, $\mathbf{b}_a$ and $\mathbf{b}_g$, and Gaussian white noise processes, $\boldsymbol{\nu}_{a}$ and $\boldsymbol{\nu}_{g}$, \begin{equation} \begin{split} \mathbf{a}_m &= \mathbf{a}_s^I + \mathbf{b}_a + \boldsymbol{\nu}_a \\ \boldsymbol{\omega}_m &= \boldsymbol{\omega}_{WI}^I + \mathbf{b}_g + \boldsymbol{\nu}_g \end{split} \label{eq:calibrated_model} \end{equation} The biases are usually assumed to be driven by Gaussian white noise processes, $\boldsymbol{\nu}_{ba}$ and $\boldsymbol{\nu}_{bg}$, \begin{equation} \dot{\mathbf{b}}_a = \boldsymbol{\nu}_{ba} \quad \dot{\mathbf{b}}_g = \boldsymbol{\nu}_{bg}. \end{equation} The power spectral densities of $\boldsymbol{\nu}_{a}$, $\boldsymbol{\nu}_{g}$, $\boldsymbol{\nu}_{ba}$, and $\boldsymbol{\nu}_{bg}$, are usually assumed to be $\sigma^2_a\mathbf{I}_3$, $\sigma^2_g \mathbf{I}_3$, $\sigma^2_{ba}\mathbf{I}_3$, and $\sigma^2_{bg}\mathbf{I}_3$, respectively. For the scale-misalignment model, the accelerometer measurement $\mathbf{a}_m$ is corrupted by systematic errors encoded in a lower triangular $3\times 3$ matrix $\mathbf{M}_a$, $\mathbf{b}_a$, and $\boldsymbol{\nu}_a$, \begin{equation} \mathbf{a}_m = \mathbf{M}_a \mathbf{a}_s^I + \mathbf{b}_a + \boldsymbol{\nu}_a. \label{eq:accel_scale_misalign} \end{equation} The 6 nonzero entries of $\mathbf{M}_a$ encompass 3-DOF scale factor error and 3-DOF misalignment. The gyroscope measurement $\boldsymbol{\omega}_m$ is corrupted by systematic errors encoded in a $3\times 3$ matrix $\mathbf{M}_g$ and the $g$-sensitivity effect encoded in a $3\times 3$ matrix $\mathbf{M}_s$, $\mathbf{b}_g$, and $\boldsymbol{\nu}_g$, \begin{equation} \boldsymbol{\omega}_m = \mathbf{M}_g \boldsymbol{\omega}_{WI}^I + \mathbf{M}_s \mathbf{a}_s^I + \mathbf{b}_g + \boldsymbol{\nu}_g \label{eq:gyro_scale_miaslign} \end{equation} The 9 entries of $\mathbf{M}_g$ encompass 3-DOF scale factor error, 3-DOF misalignment, and 3-DOF relative orientation between the gyroscope input axes and the $\{I\}$ frame defined by the accelerometer input axes. In summary, variables to be estimated and known parameters in our optimization-based calibration are listed in Table~\ref{tab:variables}. \input{tables/variables} \section{Experiments} \label{sec:experiments} To study the RS effect on spatiotemporal calibration of a camera-IMU system and validate the proposed calibration method, we conducted simulation with four public calibration datasets and tests on real data captured by two industrial camera-IMU units. The proposed calibration approach was implemented on top of Kalibr \cite{rehderExtending2016}. For the following tests, both poses and IMU biases were fitted by sixth-order B-splines which are piece-wise fifth-degree polynomials, accommodating the required diverse motion to render the extrinsic parameters observable. Knots were placed at 100 Hz for pose B-splines, and at 50 Hz for bias B-splines. Both simulation and calibration adhered to image noise $\sigma_c$ = 1 pixel and pinhole camera model with equidistant distortion. The equidistant distortion model encoded by four parameters was chosen for its fitness to a wide range of lenses \cite{kannalaGeneric2006} and its high precision \cite{usenkoDouble2018}. The camera intrinsic parameters required by the spatiotemporal calibration were obtained with the camera calibration tool in Kalibr \cite{mayeSelfsupervised2013} when necessary. To evaluate calibration results, differences between reference values and estimated parameters are computed. For the extrinsic parameter $\mathbf{T}_{CI} = \begin{bmatrix} \mathbf{R} & \mathbf{p} \end{bmatrix}$, deviation of its estimated value $\bar{\mathbf{T}}_{CI} = \begin{bmatrix} \bar{\mathbf{R}} & \bar{\mathbf{p}} \end{bmatrix}$ is computed by \begin{equation} \Delta \mathbf{R} = \mathbf{R}^\intercal \bar{\mathbf{R}} \quad \Delta \mathbf p = \mathbf{R}^\intercal (\bar{\mathbf{p}} - \mathbf p). \end{equation} And its estimation error is quantified by the angle of the angle-axis representation of $\Delta \mathbf{R}$, $\norm{\angle(\Delta \mathbf{R})}$, and $\norm{\Delta \mathbf{p}}$. \subsection{Simulation} To quantify how RS affects the spatiotemporal parameters of a camera-IMU system, we simulated RS camera and IMU data based on four public calibration datasets, and then estimated these parameters with the proposed method. The four public datasets include the camera-IMU calibration sample provided by Kalibr, and the calibration data of the EuRoC, TUM-VI, and UZH datasets. The four calibration datasets are summarized here \footnote{\url{https://github.com/VladyslavUsenko/basalt-mirror/blob/master/doc/Calibration.md}}. To create simulated data, for every dataset, we first ran the GS-camera-IMU calibration tool in Kalibr and saved the fitted pose B-splines. Then from the B-splines, noisy RS camera observations of the target and IMU measurements spanning 50 seconds were simulated using reference camera and IMU parameters for the dataset. These reference parameters were obtained by simply rounding the calibrated precise values for easy interpretation. For all datasets, the IMU noise parameters in simulating IMU data and in the subsequent calibration were identical to those for ADIS16448 found in the Kalibr sample dataset, \ie, accelerometer noise density $\sigma_a$ = 1.0$\cdot10^{-2}$ $m/s^2/\sqrt{Hz}$, accelerometer random walk $\sigma_{ba}$ = 2.0$\cdot10^{-4}$ $m/s^3/\sqrt{Hz}$, gyroscope noise density $\sigma_g=5.0\cdot10^{-3}$ $rad/s/\sqrt{Hz}$, gyroscope random walk $\sigma_{bg}=4.0\cdot10^{-6}$ $rad/s^2/\sqrt{Hz}$. The RS image observations were simulated at four line delays, 137.5, 82.5, 51.563, and 41.25 ms, which correspond to pixel clocks, 12, 20, 32, and 40 MHz, of a Matrix Vision Bluefox MLC202dG camera with a line length 1650 pixels. To avert a bias in the camera time offset when a GS-camera-IMU calibration method processes the simulated RS camera data, a simulated RS image was assigned timestamp of its central row. \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{figures/sim/e_trans} \\ \includegraphics[width=0.82\linewidth]{figures/sim/e_rot} \caption{Translation (top) and rotation (bottom) errors of the Kalibr camera-IMU calibration method (denoted by GS) and the proposed method for RS cameras (denoted by RS) with simulated data from four public calibration datasets, EuRoC, UZH, TUM-VI, and Kalibr. The simulation used four line delays, 137.5, 82.5, 51.563, and 41.25 $\mu s$. } \label{fig:sim_error_pose} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.82\linewidth]{figures/sim/e_timeoffset} \\ (a) \\ \includegraphics[width=0.8\linewidth]{figures/sim/e_linedelay} \\ (b) \caption{Top: Camera time offset errors of the Kalibr camera-IMU calibration method (denoted by GS) and the proposed method for RS cameras (denoted by RS) on the simulated data. Bottom: Line delay errors of the proposed method on the simulated data. The data were simulated from four public calibration datasets, EuRoC, UZH, TUM-VI, and Kalibr, with four line delays, 137.5, 82.5, 51.563, and 41.25 $\mu s$. } \label{fig:sim_error_time} \end{figure} In the end, the simulated data were processed by our RS camera-IMU calibration method and the camera-IMU calibration tool in Kalibr \cite{rehderExtending2016}. For both methods, the calibrated IMU model \eqref{eq:calibrated_model} is used. The errors in $\mathbf{T}_{CI}$, $t_{IC}$ and $d$, are visualized in Figs. \ref{fig:sim_error_pose}, \ref{fig:sim_error_time}, respectively. From Fig.~\ref{fig:sim_error_pose}, we see that longer line delays led to greater extrinsic errors for the GS-camera-IMU calibration method, while our method maintained small extrinsic errors across varying line delays and datasets. The GS-camera-based method often had errors more than 0.5$^\circ$ in orientation and 2 cm in translation. Fig.~\ref{fig:sim_error_time} shows that ignoring the RS effect often led to time offset errors greater than 4 ms. And Fig.~\ref{fig:sim_error_time}(b) shows that line delay could usually be accurately estimated within 1 $\mu$s. Overall, the simulation shows that the RS effect can noticeably deteriorate the spatiotemporal calibration of a camera-IMU system if ignored, and our method can accurately estimate the RS line delay and remove the adverse effect. \subsection{Real data tests} We also tested the proposed method on two RS camera-IMU systems built with industrial cameras of delicate RS control. One device combined an IDS uEye 3241LE-M-GL camera fitted with a Lensagon BM4018S118 lens of 126$^\circ$ diagonal FOV and a SparkFun OpenLog Artemis IMU board. The other was composed of a Matrix Vision Bluefox MLC202dG camera fitted with a E1M3518 lens of 90$^\circ$ diagonal FOV and an OpenLog Artemis IMU board. The uEye camera allows switching between RS mode and GS mode in operation. Thus, the extrinsic calibration result with data captured in GS mode can serve as an accurate reference for $\mathbf{T}_{CI}$. The Artemis board carries an InvenSense ICM-20948 IMU (cost less than \$4), and is able to capture the inertial data at about 230 Hz. The Bluefox camera only supports RS mode, but it has precise pixel clocks and a known line length for determining the reference line delays. In data acquisition, the exposure time of the two cameras was set to 5 ms to reduce motion blur; the focus distance of both lenses was about 1.5 meters and remained fixed. For every device, the data collection began with capturing the camera intrinsic calibration data. For the uEye camera, a video was captured while the camera in GS mode was moved in front of the static target. For the Bluefox camera, an image sequence was captured by holding the RS camera at 100 different poses. Afterwards, the RS camera-IMU data were collected while the device was moved in front of the static target. For every device, a set of five one-minute RS sessions was captured at each of four pixel clocks, 12, 20, 32, and 40 MHz. The IMU noise parameters were estimated by Allan variance analysis as detailed in the supplementary material. For the accelerometer and gyroscope noise density, the Allan analysis obtained values reasonably close to those on the ICM-20948 datasheet. The noise values read from Allan analysis were obtained for three accelerometers and three gyroscopes, and then plugged in the compared calibration methods without inflation. Specifically, accelerometer noise density $\sigma_a$ = 2.3$\cdot10^{-3}$ $m/s^2/\sqrt{Hz}$, accelerometer random walk $\sigma_{ba}$ = 6.5$\cdot10^{-5}$ $m/s^3/\sqrt{Hz}$, gyroscope noise density $\sigma_g=2.6\cdot10^{-4}$ $rad/s/\sqrt{Hz}$, gyroscope random walk $\sigma_{bg}=4.1\cdot10^{-6}$ $rad/s^2/\sqrt{Hz}$. It is a bit counter-intuitive that the InvenSense IMU has smaller noise parameters than the more expensive ADIS16448. One possible reason is that the latter's noise values in the Kalibr sample data had been inflated. In a preliminary test about whether to inflate the noise parameters, we inflated the noise density and random walk parameters by scalars $\alpha$ and $\beta$, respectively, ran the proposed calibration method, and iterated the two steps. The two scalars were grid-searched for the minimum total cost. In the end, we found that inflating the IMU noise parameters led to smaller reprojection errors but larger accelerometer and gyroscope errors; and extraordinary inflation caused difficulty in convergence of the optimization-based method. Thus, we chose to use the original noise parameters obtained by the principled method. For all RS camera and IMU data captured by the two devices, we processed them by the proposed method and the GS-camera-IMU calibration tool in Kalibr. Each method has two variants, one with the calibrated IMU model, and the other with the scale-misalignment IMU model (Section~\ref{subsec:observations}). The two variants aim to tease apart the scale and misalignment effect commonly found in a consumer-grade IMU from the extrinsic calibration. Overall, we have four calibration methods of shorthand names: GS calibrated IMU, GS scale-misalign IMU, RS calibrated IMU, RS scale-misalign IMU. \begin{figure}[] \centering \includegraphics[width=0.7\linewidth]{figures/ueye/e_trans} \\(a)\\ \includegraphics[width=0.7\linewidth]{figures/ueye/e_rot} \\(b)\\ \includegraphics[width=0.7\linewidth]{figures/ueye/e_reproj} \\ (c) \caption{ Translation (a) and rotation (b) errors, and median reprojection errors (c) of the proposed method (denoted by RS) and the Kalibr camera-IMU calibration tool (denoted by GS) with both calibrated and scale-misalignment IMU model, on the uEye-Artemis data. } \label{fig:ueye-pose-reproj} \end{figure} \subsubsection{uEye-Artemis} \label{subsubsec:ueye} For the uEye camera and Artemis IMU assembly, to obtain the camera intrinsic parameters, the video captured in GS mode were down-sampled in frame rate and then processed by the intrinsic calibration tool in Kalibr \cite{mayeSelfsupervised2013}. The intrinsic parameters were used by all the compared calibration methods. To obtain the reference extrinsic parameters, we used a one-minute camera-IMU session captured with the uEye camera in GS mode at the pixel clock 40 MHz. The session was then processed by the Kalibr camera-IMU calibration tool with the scale-misalignment IMU model, attaining the reference extrinsic parameters $\mathbf{T}_{CI}$ which agreed very well with values $\tilde{\mathbf{T}}_{CI}$ measured by ruler, \begin{equation} \label{eq:ueye_T_CI} \begin{split} \mathbf{T}_{CI} &= \begin{bmatrix} -0.999 & -0.032 & 0.014 & -0.015 \\ -0.032 & 0.999 & 0.024 & 0.061 \\ -0.015 & 0.023 & -1.000 & -0.020 \end{bmatrix} \\ \tilde{\mathbf{T}}_{CI} &= \begin{bmatrix} -1 & 0 & 0 & -0.014 \pm 0.003 \\ 0 & 1 & 0 & 0.062 \pm 0.003 \\ 0 & 0 & -1 & -0.024 \pm 0.003 \end{bmatrix} \end{split} \end{equation} where the uncertainty in a measured distance is about 3 mm. The RS camera-IMU data were processed by the aforementioned four calibration methods. The translation, rotation, and reprojection errors are visualized in Fig.~\ref{fig:ueye-pose-reproj}. Similarly to results in simulation, Fig.~\ref{fig:ueye-pose-reproj}(a) and (b) show that extrinsic calibration errors grew with line delays for the GS calibration methods, and that the RS calibration methods kept relatively small errors across pixel clocks. For the RS calibration methods, the scale-misalignment IMU model slightly improved the estimated extrinsic parameters. Overall, the RS calibration methods consistently outstripped the GS-based methods for both IMU models. For instance, at 40 MHz, the GS calibration methods had errors about 0.4$^\circ$ in rotation and 15 mm in translation, whereas the RS calibration method with the scale-misalignment IMU model incurred errors about 0.15$^\circ$ in rotation, and 2 mm in translation. Fig.~\ref{fig:ueye-pose-reproj}(c) shows that the RS effect caused reprojection errors about 5 pixels for GS calibration methods while the RS calibration methods had sub-pixel errors. These results confirm that considering the RS effect could substantially improve the extrinsic estimation. Considering that the line delays for the uEye camera at pixel clocks, 12, 20, 32, 40 MHz, are roughly 107.7, 64.6, 40.4, and 32.3 $\mu$s, the improvements are quite relevant for consumer cameras which often have line delays in range 25 -- 60 $\mu$s \cite{othRolling2013}. \begin{figure}[] \centering \includegraphics[width=0.7\linewidth]{figures/bluefox/e_trans} \\(a)\\ \includegraphics[width=0.7\linewidth]{figures/bluefox/e_rot} \\(b)\\ \includegraphics[width=0.7\linewidth]{figures/bluefox/e_reproj} \\ (c) \caption{ Translation (a), rotation (b) errors, and median reprojection errors (c) of the proposed method (denoted by RS) and the Kalibr camera-IMU calibration tool (denoted by GS) with both calibrated and scale-misalignment IMU model on the Bluefox-Artemis data. Note that the reference extrinsic parameters were measured by hand. } \label{fig:bluefox-pose-reproj} \end{figure} \begin{figure}[] \centering \includegraphics[width=0.7\linewidth]{figures/bluefox/line_delay} \caption{ For the Bluefox-Artemis data, line delays estimated by the proposed method with both the calibrated IMU model (RS calibrated IMU) and the scale-misalignment IMU model (RS scale-misalign IMU), and by the RS camera calibration tool (denoted by RS) \cite{othRolling2013}. The reference values computed from the Bluefox specs, 137.5, 82.5, 51.563, and 41.25 ms, are shown by dashed lines.} \label{fig:bluefox-line-delay} \end{figure} \subsubsection{Bluefox-Artemis} \label{subsubsec:bluefox} For the Bluefox camera and Artemis IMU assembly, the intrinsic parameters were estimated with the aforementioned image sequence by the calibration tool in Kalibr. Since the reference extrinsic parameters were unavailable, the errors in $\mathbf{T}_{CI}$ were computed relative to the values measured by hand, $\tilde{\mathbf{T}}_{CI}$, \begin{equation} \tilde{\mathbf{T}}_{CI} = \begin{bmatrix} 0 & -1 & 0 & 0.000 \pm 0.003 \\ 1 & 0 & 0 & 0.098 \pm 0.003 \\ 0 & 0 & 1 & -0.023 \pm 0.003 \end{bmatrix}. \end{equation} The accurate reference line delay is the ratio of line length $N_l$ = 1650 provided in datasheet and the pixel clock $P$ for the Bluefox camera. The Bluefox-IMU data were processed by the four calibration methods. The errors in $\mathbf{T}_{CI}$ and median reprojection errors are illustrated in Fig.~\ref{fig:bluefox-pose-reproj}. Though the reference extrinsic parameters are inaccurate, from Fig.~\ref{fig:bluefox-pose-reproj}(a) and (b), we see that the RS effect prevented the GS calibration methods from achieving coherent spatial estimation, while the proposed method had much smaller variances in extrinsic parameters. Fig.~\ref{fig:bluefox-pose-reproj}(c) shows that the GS calibration methods had much greater reprojection errors than the RS calibration methods, similarly to Fig.~\ref{fig:ueye-pose-reproj}(c) with the uEye data. The line delay estimates for the Bluefox camera are visualized in Fig.~\ref{fig:bluefox-line-delay}. By comparing to the reference values, we see that the proposed method can accurately estimate line delays. Unsurprisingly, it has better accuracy than the RS camera calibration tool \cite{othRolling2013} probably because the latter uses priors on angular and linear acceleration rather than real IMU measurements to constrain device motion. \section{Conclusions} In summary, to our knowledge, we present the first continuous-time spatiotemporal calibration method for a RS camera-IMU system. The method is also able to estimate the inter-line delay of a RS. By numerous simulation and real data tests with accurate reference values, we showed that RS could degrade the extrinsic calibration results of a GS-based method by a few degrees in orientation and a few centimeters in translation. These tests also validated that our approach achieved accurate and consistent line delay estimation and extrinsic calibration. The future work is to extend the presented method to other sensor modalities, \eg, lidar-camera systems. {\small \bibliographystyle{ieee_fullname} \section*{\LARGE \bf Supplementary Material \\ \enskip}] This supplementary material presents Allan variance analysis results of an OpenLog Artemis board, and extrinsic calibration results of the uEye camera with data captured in global shutter (GS) mode. \section*{A. Allan variance analysis} To characterize noises of the InvenSense ICM-20948 IMU on the OpenLog Artemis board, the Allan variance analysis technique \cite{IEEE2006} was used to analyze its static data. A 17-hour data at about 230Hz were captured from our lab at night while the Artemis board was placed on a table with the $z$-axis of the board roughly along gravity. The median of the temperatures recorded by the IMU was 27.36$^\circ$C, and its standard deviation was 1.36$^\circ$C. The Allan standard deviations were computed for three accelerometers and three gyroscopes, shown in Fig.~\ref{fig:artemis-allan-accel} and Fig.~\ref{fig:artemis-allan-gyro}, respectively. These figures are annotated with the interpreted values for the white noise, bias stability, and bias random walk, whose corresponding slopes are -1/2, 0, and 1/2, respectively, according to the standard \cite{IEEE2006}. \begin{figure}[h] \centering \includegraphics[width=0.9\linewidth]{figures/artemis_allan/accel_x} \\ (a) \\ \includegraphics[width=0.9\linewidth]{figures/artemis_allan/accel_y} \\ (b) \\ \includegraphics[width=0.9\linewidth]{figures/artemis_allan/accel_z} \\ (c) \caption{Allan variance analysis results for the accelerometer on $x$(a), $y$(b), and $z$(c) axis of the Artemis board.} \label{fig:artemis-allan-accel} \end{figure} \begin{figure}[h] \centering \includegraphics[width=0.9\linewidth]{figures/artemis_allan/gyro_x} \\ (a) \\ \includegraphics[width=0.9\linewidth]{figures/artemis_allan/gyro_y} \\ (b) \\ \includegraphics[width=0.9\linewidth]{figures/artemis_allan/gyro_z} \\ (c) \caption{Allan variance analysis results for the gyroscope on $x$(a), $y$(b), and $z$(c) axis of the Artemis board.} \label{fig:artemis-allan-gyro} \end{figure} The noise parameters and their averages are compiled in Table~\ref{tab:artemis-noise-values}. For comparison, the reference noise density values read from the ICM-20948 datasheet are appended. From Table~\ref{tab:artemis-noise-values}, we see that the noise densities from the Allan variance analysis are reasonably close to those from the datasheet. \input{tables/artemis} \section*{B. uEye-Artemis calibration with GS data} To see the variation of spatiotemporal calibration across different settings except the RS effect, we carried out camera-IMU calibration with data captured by the uEye camera in GS mode. These data were in fact captured along with the RS data for the test in Section~\ref{subsubsec:ueye}, including four sets of GS data captured at pixel clocks, 12, 20, 32, and 40 MHz. Each set contained five one-minute sessions. In calibrating the uEye-Artemis system, the same camera intrinsic parameters as in Section~\ref{subsubsec:ueye} were adopted. These 20 sessions were processed with both the calibrated and scale-misalignment IMU models. We computed the translation and rotation errors of the extrinsic parameters relative to the reference value $\mathbf{T}_{CI}$ in \eqref{eq:ueye_T_CI}, shown in Fig.~\ref{fig:ueye-artemis-gs}(a) and (b), respectively. From these figures, we see that the estimated translations and rotations had typically small variances. Especially with the GS scale-misalign IMU calibration method, the translation variations were mostly less than 2 mm, and the rotation variations mostly less than 0.2$^\circ$. These variations arising from different settings in GS mode and different sessions were significantly smaller than the calibration deviations when ignoring the RS effect, which were about 15 mm in translation and 0.4$^\circ$ in rotation even at pixel clock 40 MHz (see Fig.~\ref{fig:ueye-pose-reproj}(a-b)). Boxplots of the median reprojection errors for the two calibration methods, GS calibrated IMU, and GS scale-misalign IMU, are shown in Fig.~\ref{fig:ueye-artemis-gs}(c), which shows that subpixel reprojection errors were attained when the GS data were processed by the GS camera calibration method. This contrasted with the reprojection errors (often greater than 2 pixels) when the RS data were processed by the GS camera calibration method (see Fig.~\ref{fig:ueye-pose-reproj}). Overall, these additional results show that the RS effect is much more pronounced than the calibration uncertainty due to different sessions of data, and the baseline GS camera-IMU calibration methods worked well for GS data. \begin{figure}[h] \centering \includegraphics[width=0.75\linewidth]{figures/ueye_gs/e_trans} \\ (a) \\ \includegraphics[width=0.75\linewidth]{figures/ueye_gs/e_rot} \\ (b) \\ \includegraphics[width=0.75\linewidth]{figures/ueye_gs/e_reprojection} \\ (c) \caption{Extrinsic calibration results of the uEye camera with data captured in global shutter (GS) mode at pixel clocks, 10, 20, 32, and 40 MHz. Deviations in translation (a) and rotation (b) relative to the extrinsic parameters estimated with a session of GS data at pixel clock 40 MHz. (c) The median reprojection errors for calibration with both the calibrated and scale-misalignment IMU models. } \label{fig:ueye-artemis-gs} \end{figure}
\section*{Proofs of Proposition \ref{Prop1} and Theorem \ref{Thm1}} We start this section with the proof of Proposition \ref{Prop1}. \begin{proof}[Proof of Proposition \ref{Prop1}] First, as mentioned in the introduction, $B_{\Omega}:L^{\infty}(\Omega)\to L^{\infty}(\Omega)$ is bounded and $\|B_{\Omega}\|_{L^{\infty}}\leq 1$. Let $C_{\Omega}= \sup\left\{\frac{|K_{\Omega}(w,z)|}{K_{\Omega}(z,z)}:z,w\in \Omega \right\}<\infty$ and $\phi\in L^{\infty}(\Omega)$. Then \begin{align*} |B_{\Omega}\phi(z)| \leq & \int \frac{|K_{\Omega}(w,z)|^2}{K_{\Omega}(z,z)}|\phi(w)| dV(w)\\ \leq & C_{\Omega} \int |K_{\Omega}(w,z)||\phi(w)| dV(w)\\ =& C_{\Omega}P^+_{\Omega}|\phi|(z). \end{align*} Then \[\|B_{\Omega}\phi\|_{L^{p_0}}\leq C_{\Omega}\|P^+_{\Omega}|\phi|\|_{L^{p_0}} \leq C_{\Omega}\|P^+_{\Omega}\|_{L^{p_0}} \|\phi\|_{L^{p_0}}.\] Therefore, using the fact that measurable bounded compactly supported functions are dense in $L^{p_0}(\Omega)$, we conclude that \[\|B_{\Omega}\|_{L^{p_0}}\leq C_{\Omega}\|P^+_{\Omega}\|_{L^{p_0}}.\] Then Riesz-Thorin Interpolation Theorem (see, for instance, \cite[Section 6.5]{FollandBook}) implies that $B_{\Omega}:L^p(\Omega)\to L^p(\Omega)$ is bounded for all $p_0\leq p\leq \infty$. \end{proof} \begin{remark} \label{Rmk1} We note that the Berezin transform is not a self-adjoint operator, in general. Indeed one can compute that \begin{align*} \langle B_{\Omega}\phi,\psi \rangle =& \int \int \phi(w)\frac{|K_{\Omega}(w,z)|^2}{K_{\Omega}(z,z)}\overline{\psi(z)}dV(w)dV(z)\\ =& \int \phi(w)\overline{K_{\Omega}(w,w) \int \frac{|K_{\Omega}(z,w)|^2}{K_{\Omega}(w,w)}\frac{\psi(z)}{K_{\Omega}(z,z)} dV(z)}dV(w)\\ =&\langle \phi,M_{K_{\Omega}}B_{\Omega}M_{\frac{1}{K_{\Omega}}}\psi \rangle \end{align*} for $\phi,\psi\in C^{\infty}_0(\Omega)$ where $M$ denotes the multiplication operator. That is $B_{\Omega}^*= M_{K_{\Omega}}B_{\Omega}M_{\frac{1}{K_{\Omega}}}$. Then, on the unit disc we have $B_{\mathbb{D}} 1=1$ while \[B_{\mathbb{D}}^*1(0) = \int_{\mathbb{D}}\frac{|K_{\mathbb{D}}(0,w)|^2dV(w)}{K_{\mathbb{D}}(w,w)} = \frac{1}{\pi}\int_{\mathbb{D}}(1-|w|^2)^2dV(w)=2\int_0^1(1-r^2)^2rdr= \frac{1}{3}.\] Hence $B_{\mathbb{D}}^* \neq B_{\mathbb{D}}$. We note that, since $B_{\Omega}$ is not necessarily self-adjoint, we cannot use $L^p$ regularity of $B_{\Omega}$ for $p_0\leq p\leq \infty$ in the proof of Proposition \ref{Prop1} to conclude $L^p$ regularity for $1<p<p_0/(p_0-1)$. \end{remark} We will skip the proof of the following lemma as it is simply a consequence of the fact that the Bergman kernel of the product of domains is the product of the Bergman kernel of each factor. \begin{lemma}\label{LemProd} Let $\Omega=\Omega_1\times\cdots\times \Omega_m$ be a product domain such that each $\Omega_j$ is a domain satisfying property BR. Then $\Omega$ satisfies property BR. \end{lemma} \begin{lemma}\label{LemProdP+} Let $\Omega=\Omega_1\times\cdots\times \Omega_m$ be a product domain such that each $P^+_{\Omega_j}:L^p(\Omega_j)\to L^p(\Omega_j)$ is bounded for some $1\leq p<\infty$. Then $P^+_{\Omega}:L^p(\Omega)\to L^p(\Omega)$ is bounded and \[\|P^+_{\Omega}\|_{L^p} = \|P^+_{\Omega_1}\|_{L^p(\Omega_1)} \cdots \|P^+_{\Omega_m}\|_{L^p(\Omega_m)}.\] \end{lemma} \begin{proof} For $1>\varepsilon>0$ we choose $\phi_{j,\varepsilon}\in L^p(\Omega_j)$ such that $\|\phi_j\|_{L^p(\Omega_j)}=1$ and \[\|P^+_{\Omega_j}\phi_{j,\varepsilon}\|_{L^p(\Omega_j)}\geq \|P^+_{\Omega_j}\|_{L^p}-\varepsilon\] for $j=1,\ldots, m$. Then for $\phi_{\varepsilon}=\phi_{1,\varepsilon}\cdots \phi_{m,\varepsilon}$ we have $\|\phi_{\varepsilon}\|_{L^p(\Omega)}=1$ and \begin{align*} (\|P^+_{\Omega_1}\|_{L^p(\Omega_1)} -\varepsilon)\cdots (\|P^+_{\Omega_m}\|_{L^p(\Omega_m)}-\varepsilon) \leq& \|P^+_{\Omega_1}\phi_{1,\varepsilon}\|_{L^p(\Omega_1)} \cdots \|P^+_{\Omega_m}\phi_{m,\varepsilon}\|_{L^p(\Omega_m)} \\ =&\|P^+_{\Omega}\phi_{\varepsilon}\|_{L^p(\Omega)}\\ \leq& \|P^+_{\Omega}\|_{L^p(\Omega)}. \end{align*} Then by letting $\varepsilon\to 0$ we get \[\|P^+_{\Omega_1}\|_{L^p(\Omega_1)} \cdots \|P^+_{\Omega_m}\|_{L^p(\Omega_m)}\leq \|P^+_{\Omega}\|_{L^p(\Omega)}.\] To prove the converse, we first assume that $\Omega=\Omega_1\times \Omega_2$. Let $\phi\in L^p(\Omega)$. Then using Fubini's Theorem below we have \begin{align*} &\|P^+_{\Omega}\phi\|^p_{L^p}\\ &\leq \int_{\Omega_2} \int_{\Omega_1}\left(\int_{\Omega_1} |K_{\Omega_1}(z_1,w_1)|\int_{\Omega_2} |K_{\Omega_2}(z_2,w_2)| |\phi(w_1,w_2)|dV(w_2) dV(w_1)\right)^pdV(z_1) dV(z_2)\\ &\leq \|P^+_{\Omega_1}\|^p_{L^p(\Omega_1)}\int_{\Omega_2} \int_{\Omega_1}\left( \int_{\Omega_2} |K_{\Omega_2}(z_2,w_2)||\phi(z_1,w_2)|dV(w_2)\right)^pdV(z_1) dV(z_2)\\ &= \|P^+_{\Omega_1}\|^p_{L^p(\Omega_1)}\int_{\Omega_1} \int_{\Omega_2}\left( \int_{\Omega_2} |K_{\Omega_2}(z_2,w_2)||\phi(z_1,w_2)|dV(w_2)\right)^pdV(z_2) dV(z_1)\\ &\leq\|P^+_{\Omega_1}\|^p_{L^p(\Omega_1)}\|P^+_{\Omega_2}\|^p_{L^p(\Omega_2)}\int_{\Omega}|\phi(z)|^pdV(z). \end{align*} Hence $\|P^+_{\Omega}\|_{L^p} \leq \|P^+_{\Omega_1}\|_{L^p(\Omega_1)}\|P^+_{\Omega_2}\|_{L^p(\Omega_2)}$. Then we use an induction argument to conclude that $\|P^+_{\Omega}\|_{L^p} \leq \|P^+_{\Omega_1}\|_{L^p(\Omega_1)}\cdots \|P^+_{\Omega_m}\|_{L^p(\Omega_m)}$. \end{proof} The following proposition is an easy consequence of \cite[Proposition 2.4]{KhanhLiuThuc19}. We sketch the proof here for the convenience of the reader. \begin{lemma}\label{LemP+} Let $\Omega$ be a bounded domain in $\mathbb{C}^n$ whose Bergman kernel is of $\mathcal{B}$-type. Then the absolute Bergman projection $P^+_{\Omega}:L^p(\Omega)\to L^p(\Omega)$ is bounded for all $1<p<\infty$. \end{lemma} \begin{proof} Let $\rho(z)$ denote the distance from $z$ to the boundary of $\Omega$. Then \cite[Proposition 2.4]{KhanhLiuThuc19} implies that for $0<\varepsilon<1$ there exists $c_{\varepsilon}$ such that $P^+_{\Omega}\rho^{-\varepsilon}\leq c_{\varepsilon}\rho^{-\varepsilon}$ on $\Omega$. Then a standard argument (see, for instance, \cite[pg 184]{McNealStein94}) using the Schur's test implies that $P^+_{\Omega}:L^p(\Omega)\to L^p(\Omega)$ is bounded for all $1<p<\infty$. \end{proof} Next we prove the fact that domains whose Bergman kernels are of sharp $\mathcal{B}$-type satisfy property BR. \begin{lemma}\label{LemKernelEst} Let $\Omega$ be a bounded domain in $\mathbb{C}^n$ whose Bergman kernel is of sharp $\mathcal{B}$-type. Then $\Omega$ satisfies property BR. \end{lemma} \begin{proof} We use an argument similar to \cite[(2.5)]{KhanhLiuThuc19} to conclude that there exists $0<C<\infty$ such that \[\frac{|K_{\Omega}(w,z)|}{K_{\Omega}(z,z)} \leq \frac{C|r(z)|^2}{(|r(z)|+|r(w)|)^2}\leq C\] for all $z,w\in \Omega$. Therefore, $\sup\left\{\frac{|K_{\Omega}(w,z)|}{K_{\Omega}(z,z)}:z,w\in \Omega \right\}<\infty$. \end{proof} \begin{corollary}\label{CorKernelEst} Let $\Omega=\Omega_1\times\cdots\times \Omega_m$ be a product domain such that each $\Omega_j$ is a bounded domain whose Bergman kernel is of sharp $\mathcal{B}$-type. Then \begin{itemize} \item[i.] $\Omega$ satisfies property BR, \item[ii.] the absolute Bergman projection $P^+_{\Omega}:L^p(\Omega)\to L^p(\Omega)$ is bounded for all $1<p<\infty$ and \begin{align}\label{Eqn3} \|P^+_{\Omega}\|_{L^p} = \|P^+_{\Omega_1}\|_{L^p(\Omega_1)} \cdots \|P^+_{\Omega_m}\|_{L^p(\Omega_m)}. \end{align} \end{itemize} \end{corollary} \begin{proof} To prove i. we use the fact that the Bergman kernel of $\Omega$ is the product of the Bergman kernels of $\Omega_j$s together with Lemma \ref{LemKernelEst} to show that \[\sup\left\{\frac{|K_{\Omega}(w,z)|}{K_{\Omega}(z,z)}:z,w\in \Omega \right\}<\infty.\] Hence, $\Omega$ satisfies property BR. ii. is simply is a consequence of Lemmas \ref{LemProdP+} and \ref{LemP+}. \end{proof} \begin{proof}[Proof of Theorem \ref{Thm1}] The proof is very similar to the proof of Proposition \ref{Prop1} except here we use \eqref{Eqn3} in Corollary \ref{CorKernelEst}. \end{proof} \section*{Proof of Theorem \ref{ThmHartogs}} Before we start the proof of Theorem \ref{ThmHartogs}, we note that $P^+_{\mathbb{H}}$ is $L^p$ regular for $4/3< p< 4$ (see proof of \cite[Theorem 1.2]{EdholmMcNeal16}) and \cite[Corollary 3.5]{EdholmMcNeal16}). However, we will show that the Berezin transform is not $L^2$ regular on the Bergman space on the Hartogs triangle. Therefore, $L^p$-regularity of the absolute Bergman projection is not a sufficient condition for the $L^p$-regularity of the Berezin transform. \begin{proof}[Proof of Theorem \ref{ThmHartogs}] The set $\{z_1^nz_2^m:m\geq 0,n+m\geq -1\}$ forms an orthogonal basis for $A^2(\mathbb{H})$ (see, for example, \cite{ChakrabartiZeytuncu16}). Let $f_{\varepsilon}(w)=|w_1|^{-2+2\varepsilon}$ for $\varepsilon>0$. Then $f_{\varepsilon}\in L^2(\mathbb{H})$ because when $\varepsilon>0$, the following calculation holds \begin{align*} \|f_{\varepsilon}\|^2_{L^2}=4\pi^2\int_0^1\int_0^{r_1}r_1^{-3+4\varepsilon} r_2 dr_2dr_1 =2\pi^2\int_0^1r_1^{-1+4\varepsilon}dr_1=\frac{\pi^2}{2\varepsilon}<\infty, \end{align*} and when $\varepsilon\leq 0$, the integral diverges. We can write the Bergman kernel $K_{\mathbb{H}}$ in series form as follows \[K_{\mathbb{H}}(w_1,w_2,z_1,z_2)=\sum_{m\geq 0,n+m\geq -1} a_{nm} w_1^nw_2^m\overline{z}_1^n\overline{z}_2^m\] where \[a_{nm}=\frac{1}{\|z_1^nz_2^m\|^2_{L^2}} =\frac{1}{4\pi^2 \int_0^1\int_0^{r_1}r_1^{2n+1}r_2^{2m+1}dr_2dr_1} =\frac{(m+1)(n+m+2)}{\pi^2}\] for $m\geq 0$ and $n+m+1\geq 0$. Next we compute \begin{align*} \langle f_{\varepsilon}K_{\mathbb{H}}(.,z),K_{\mathbb{H}}(.,z)\rangle =&\sum_{m\geq 0,n+m\geq -1} |a_{nm}|^2|z_1|^{2n}|z_2|^{2m}4 \pi^2\int_0^1\int_0^{r_1} r_1^{2n-1+2\varepsilon}r_2^{2m+1}dr_2dr_1\\ =&\sum_{m\geq 0,n+m\geq -1} |a_{nm}|^2|z_1|^{2n}|z_2|^{2m} \frac{\pi^2}{(m+1)(n+m+1+\varepsilon)}. \end{align*} Using $k=n+m+1$ in the second equality below we get \begin{align*} B_{\mathbb{H}}f_{\varepsilon}(z)=&\frac{1}{\pi^2K_{\mathbb{H}}(z,z)} \sum_{m\geq 0,n+m\geq -1}|z_1|^{2n}|z_2|^{2m} \frac{(m+1)(n+m+2)^2}{n+m+1+\varepsilon}\\ =&\frac{1}{\pi^2K_{\mathbb{H}}(z,z)} \sum_{m,k=0}^{\infty}|z_1|^{2k-2m-2}|z_2|^{2m} \frac{(m+1)(k+1)^2}{k+\varepsilon}\\ =&\frac{1}{\pi^2|z_1|^2K_{\mathbb{H}}(z,z)} \left(\sum_{m=0}^{\infty}(m+1) \frac{|z_2|^{2m}}{|z_1|^{2m}}\right) \left( \sum_{k=0}^{\infty}\frac{(k+1)^2}{k+\varepsilon}|z_1|^{2k}\right). \end{align*} Next we note that \begin{align}\label{Eqn4} \frac{1}{\pi^2|z_1|^2K_{\mathbb{H}}(z,z)} = \frac{(|z_1|^2-|z_2|^2)^2(1-|z_1|^2)^2}{|z_1|^4} = \left(1-\left|\frac{z_2}{z_1}\right|^2\right)^2(1-|z_1|^2)^2 \end{align} and $\frac{1}{(1-x)^2}=\sum_{m=0}^{\infty}(m+1)x^m$ for $|x|<1$. Therefore, \[B_{\mathbb{H}}f_{\varepsilon}(z)=(1-|z_1|^2)^2\sum_{k=0}^{\infty} \frac{(k+1)^2}{k+\varepsilon}|z_1|^{2k}.\] Then \begin{align*} \|B_{\mathbb{H}}f_{\varepsilon}\|^2_{L^2} = & \int_{\mathbb{H}}|1-|z_1|^2|^4\left|\sum_{k=0}^{\infty} \frac{(k+1)^2}{k+\varepsilon}|z_1|^{2k}\right|^2dV(z)\\ \geq & \frac{1}{\varepsilon^2} \int_{\mathbb{H}}|1-|z_1|^2|^4dV(z). \end{align*} Then, we have $ \|f_{\varepsilon}\|_{L^2} =\pi/\sqrt{2\varepsilon}$ while $\|B_{\mathbb{H}}f_{\varepsilon}\|_{L^2} \geq \varepsilon^{-1}\|(1-|z_1|^2)^2\|_{L^2}$ for $\varepsilon>0$. Hence \[\frac{\|B_{\mathbb{H}}f_{\varepsilon}\|_{L^2}}{\|f_{\varepsilon}\|_{L^2}} \geq \frac{\sqrt{2} \|(1-|z_1|^2)^2\|_{L^2}}{\pi \sqrt{\varepsilon}}\] for $\varepsilon>0$. Therefore, $B_{\mathbb{H}}$ is unbounded on $L^2(\mathbb{H})$. We note that, by interpolation, we also conclude that $B_{\mathbb{H}}$ is unbounded on $L^p(\mathbb{H})$ for $p\leq 2$. \end{proof} \begin{remark} Let $f(z)=z_1^{-1}\in A^2(\mathbb{H})$. Then \[\langle f, k^{\mathbb{H}}_z\rangle=\frac{1}{z_1\sqrt{K_{\mathbb{H}}(z,z)}}.\] Then \eqref{Eqn4}, for $z_1=1/j$ and $z_2=0$, implies that \[|\langle f, k^{\mathbb{H}}_{(1/j,0)}\rangle|=\pi (1-j^{-2})\to \pi \text{ as } j\to\infty.\] Therefore, $\{k^{\mathbb{H}}_{(1/j,0)}\}$ does not converge to 0 weakly. \end{remark} \section*{Acknowledgement} We would like to thank the referee for helpful comments that has improved the paper.
\section{Introduction} The Universe and its evolution has been a great mystery for mankind and in the recent past tremendous work has been done and is going on to unveil the secrets of the early Universe. When we take a look at the stars in the sky, we are actually looking into the past. Many techniques such as EHT, VIRGO, LIGO and many more are used to gather the observational data which is used to explore the gravitational properties in strong fields \cite{ref1,ref2,ref3,ref4}. Ever since humans are amused if they could travel to the  far existing galaxies or if there exists any life far beyond in space-time. For such fantasies there came the concept of traversable wormholes which gained a special attention among the researchers. The idea of wormholes i.e. the supposed connection of the shape of a tube or tunnel between two asymptotically flat regions in space-time was first conceived by Flamm as Schwarschild solutions \cite {ref5}. These are cosmological entities without any singularity or event horizon \cite{ref6} which leads to the study of non-standard matter and the contribution of gravity in its formation. In 1935 Einstein and Rosen gave the concept of Einstein-Rosen bridge that was the extension of the static wormhole \cite{ref7}. In GR and modified gravity theories the solution of field equations gives the geometry of the wormhole as a shortcut between distant Universes \cite{ref8}. Eventually the wormhole solutions imitating the Einstein-Rosen bridge were obtained by connecting two Schwarschild solutions \cite{ref9,ref10}. Later on, a spherically symmetric traversable wormhole was given by Morrice and Thorne \cite {ref11} which were subsequently seen to be in tune with tachyonic massless scalar field \cite{ref12,ref13}. Afterwards, with the help of Yurtsever, Morrice and Thorne put forward the idea of a time machine by exploring the plausible solution of traversable wormholes through which the matter and radiation can pass \cite{ref14,ref15,ref16}.\\ The focus nowadays is on exploring the traversable wormholes without any singularity or horizon . To treat this issue, a presumption can be made on the line element. In addition to this, the conditions can be imposed on the WH throat using Birkhoff theorem \cite{ref11,ref17} so that the radial tension exceeds the mass-energy density. Consequently the NEC's are spoiled at the throat by the energy -momentum tensor \cite{ref18,ref19,ref20,ref21}. This leads to the existence of the phantom fluid or phantom energy which signifies the accelerated expansion of the Universe. To mitigate this problem several theories have been given. But in this regard, either the non-standard fluid can be considered or the modified gravity theories can be taken to explain  the  WH geometry by existence of higher order curvature terms. The traversable wormholes and thin shell wormholes are explored in this regard in $f(R)$ gravity. With the coupling of geometry with matter terms and obtaining various relations of  radial and tangential pressure, the WHs are examined in $f(R,T)$ gravity \cite{ref21a,ref22} where  energy conditions are examined against different shape functions. Many researchers inspected the wormhole solutions in $f(R,T)$ and $R^2$ gravity \cite{ref22a,ref22b,ref22c,ref22d,ref22e,ref22f,ref22g}. The wormhole geometries are examined in teleparallel and other extended gravitational theories \cite{ref23,ref23a,ref23b,ref23c,ref23d}. The teleparallel gravity is considered to be an alternative to GR where Torsion $T$ defines the gravitational interaction \cite{ref24}. Hence, there are several inspirations to investigate speculations beyond the standard definition of gravity.\\ In our present work,  we  examine the wormhole solutions in backdrop of symmetric teleparallel gravity $f(Q)$ proposed by Jimenez et al. \cite{ref27},  where the geometry is torsion and curvature free and the non metricity term $Q$ only defines the gravitational interactions.  An observational analysis of  different forms of $f(Q)$ gravity for the validity of these models has been performed considering several observational probes like Cosmic Microwave Background distance priors, Gamma Ray Bursts, Quasars,  Type Ia Supernovae, the expansion rate data from early-type galaxies and Baryon Acoustic Oscillations data, where the Lagrangian of  $f(Q)$ gravity  is reformulated as an explicit function of the redshift, $f(z)$  \cite{ref28e,ref28f}. A novel model has been proposed in the framework of $f(Q)$ gravity, which is a class of  gravitational modification emerging from the assimilation of non-metricity  \cite{ref28g}. Mandal et al. \cite{ref28h,ref28i} presented a complete test of energy conditions and cosmographical approach  for $f(Q)$  gravity models. Harko et al. \cite{ref28j}  presented an expansion  of  $f(Q)$  gravity, by presenting a new class of theories where $Q$ is coupled non-minimally to the matter Lagrangian, in the context of the metric-affine formalism. Hassan et al. \cite{ref28,ref28a1} have explored the wormhole geometries in the framework of $f(Q)$ gravity. They discussed three types of wormhole geometries for two different function forms, linear and non-linear of $f(Q)$. They obtained wormhole geometries with exotic matter in the throat which instigated us and gave motivation to find a wormhole solution with normal matter. Taking into account that in GR the gravitational and inertial reactions can not be differentiated but by rearranging the frames in teleparallel theory the gravitational theory can be described co-variantly \cite{ref25,ref26}, and the authors introduced $f(Q)$ symmetric teleparallel gravity theory by extending GR as a newer GR \cite{ref27}. Since the presence of exotic matter is supposed to be the unrealistic approach, this problem is the motivation of our work. \\ The formation of this manuscript is as follows: In section (2) we have formulated the $f(Q)$ gravity. The basic constraints for the shape function and conditions required for a traversable wormhole are depicted in section (3). The field equations under $f(Q)$ gravity are also described in this section. We have discussed the energy conditions and their implications in subsection (3.1). In section (4) and its subsections,  the wormhole solutions are obtained under three functional forms of $f(Q)$. The discussion and final remarks are given in section (5). \section{The $f(Q)$ Gravity} The action for symmetric teleparallel gravity as suggested by Jimenez et al. \cite{ref27, ref28a} is given as \begin{equation}\label{eq1} S = \int \left[\frac{1}{2} f\left(Q \right) + {\mathcal{L}_{\mu}} \right] \sqrt{-g}  d^4 x  ,   \end{equation} where, the function of the non-metricity term Q is taken as $f(Q)$ and the Lagrangian density of matter is given by $ \mathcal{L}_{\mu}$. Also the determinant of the metric ${g}_{\eta \zeta}$ is given by $g$. The non-metricity tensor is given by \begin{equation}\label{eq2} {Q}_{\lambda \eta \zeta} = \nabla _{\lambda \eta \zeta},   \end{equation} There are two independent traces of non-metricity tensor, which we signify as \begin{equation}\label{eq3} {Q}_\phi = {Q_\phi} ^{\eta} _{\eta}, \qquad\qquad  \bar{Q}_\phi = Q^{\eta}_{\phi \eta}. \end{equation} The non-metricity conjugate, analogous to super potential of so called New GR \cite{ref27} can be written as, \begin{equation}\label{eq4} {P^\phi}_{\eta \zeta} = \frac{1}{4} \left[ - {Q^\phi}_{\eta \zeta} + 2 {Q ^ \phi}_{\eta _\zeta}  + {Q ^ \phi} {g}_{\eta \zeta} - \bar{Q}^{\phi} {g}_{\eta \zeta}  - {\delta^\phi}_{\left(\eta  Q_\zeta \right)} \right], \end{equation} which is obtained by taking the trace of non-metricity tensor of the form \begin{equation}\label{eq5} Q =  - Q _ {\phi \eta \zeta} P ^{\phi \eta \zeta}. \end{equation} Now, the energy-momentum tensor, explaining the nature of matter filled in the space-time is defined as \begin{equation}\label{eq6} T _ {\eta \zeta} = - \frac{2}{\sqrt{-g}} \frac{ \delta \left(\sqrt{-g} \mathcal{L}_{\mu} \right)}{ \delta g^{\eta \zeta}}. \end{equation} On varying the action (\ref{eq1}) with respect to the metric tensor $g _ {\eta \zeta}$, we get the motion equations given by   \begin{equation}\label{eq7} \frac{2 \nabla _ \chi}{\sqrt{- g }} \left( \sqrt {-g} {f_Q} {P^\chi} _{\eta \zeta} \right) + \frac{1}{2} g_{\eta \zeta} f + {f_Q} \left( P _{\eta \chi \psi} {{Q_\zeta} ^\chi \psi} - 2 {Q}_{\chi \psi \eta}  {{P^\chi \psi} _ \zeta} \right) = - {T} _{\eta \zeta}, \end{equation} where $ {f}_{Q} $ is the total derivative of $f$ with respect to $Q$. One can also obtain following equation, while varying (\ref{eq1}) with respect to the connections, \begin{equation}\label{eq8} {\nabla _ \eta}{\nabla _ \zeta} \left( \sqrt{-g} {f_Q} {P^\chi} _{\eta \zeta} \right) = 0. \end{equation} \section{Wormhole Geometry and Solution of Field Equations in Symmetric Teleparallel Gravity i. e. $f(Q)$ Gravity} To study the wormhole geometry in $f(Q)$ gravity, here we  take the Morris Thorne class general spherically symmetric static geometry given by the line element \begin{equation}\label{eq9} ds^2= -\exp (2 \phi(r)) dt^2 + \left (\frac{r - b \left( r \right)}{ r} \right) ^{-1} d r^2 +{r^2} d {\theta}^2 + {r^2} {\sin}^2 {\theta} d{\phi}^2. \end{equation} Here $\phi (r)$ is said to be the redshift function of the intrusive object in the radial coordinate $r$ where $ 0 < r_0 \leq r \leq \infty$. To prevent from the event horizons or the appearance of any singularity about the throat, the value of redshift function must be finite everywhere and should not vanish at the throat. In our present work we will discuss the wormhole geometry by taking a variable redshift function. The function $b(r)$, prominently known as shape function, ascertains the wormhole shape. Therefore, the shape function $b(r)$ must abide by some constraints to stand with the wormhole geometry. The conditions $0 < 1-\frac{b(r)}{r}$ and $b(r_0)= r_0$ where $r_0 \leq r \leq \infty$  must be satisfied by the shape function.  These conditions are known as throat conditions. Here $r_0$ is the minimum value of $r$ and is the throat radius. The flaring out condition, which signifies the minimum size of the throat is required to maintain the geometry of the wormhole. The flaring out condition can be given as $b'(r_0) <1$. The flaring out condition establishes the traversability through wormhole space time. In addition with above conditions another vital condition for the appropriate shape function is the asymptotically flatness condition i. e. $\frac{b(r)}{r}\rightarrow 0  \qquad as \qquad |r|\rightarrow \infty$ which the shape function must obey. One more crucial criterion for the traversable wormhole is that the proper radial distance given by $x(r)= \pm \int_{r_0}^{r} \frac{dr}{\sqrt{\frac{r - b(r)}{r}}}$ has to be finite corresponding to the radial coordinate. Therefore, it is a decreasing function falling from the upper Universe at  $x = + \infty$ to the throat of the wormhole at $x=0$ and then further going down to $x=- \infty$. Also, the proper radial distance $x(r)$ can not be less the radial coordinate distance i. e. $ r - r_0 \leq |x(r)|$. The wormhole throat connects the upper and lower regions of throat represented by the positive and negative values of $x$ respectively.\\ Here, we consider that the wormhole throat is filled with an anisotropic fluid that accounts for the following stress-energy-momentum tensor \begin{equation}\label{eq10} T_\eta ^\zeta = \left(\rho + p_t\right) {u_\eta} {u^\zeta} - {p_t}{\delta_\eta ^\zeta} + \left(p_r - p_t \right){v_\eta} {v^\zeta}. \end{equation} Here, $v_\eta$ represents the unitary space-like vector which is in radial direction and four velocity is given by $u_\eta$. $\rho$, $p_r$ and $p_t$ are the energy density, radial pressure and the tangential pressure respectively. Within the framework of $f(Q)$  gravity, for the line element (\ref{eq9}), the non-metricity tensor has the trace Q of the form \begin{equation}\label{eq11} Q = - {\frac{2}{r^3}} \left[ r - b(r) \right] \left[ 2.r.{\phi'(r)} + 1\right]. \end{equation} Now solving (\ref{eq7}) with (\ref{eq9}) and (\ref{eq10}), we can get the following values of energy density,  radial pressure and tangential pressure in terms of $r$. \begin{equation}\label{eq12} \rho = \left[ {\frac{1}{r^3}} \left( {r} - r b'(r) - b(r) + 2 r \phi '(r) \left(r - b(r) \right) \right) \right] f_Q + \frac{2}{r^2}\left(r - b(r) \right) f_Q + \frac{f}{2}, \end{equation} \begin{equation}\label{eq13} p_r = - \left[ {\frac{2}{r^3}} \left(r - b(r)\right) \left( 2 r \phi'(r) +1\right) -1 \right] f_Q -\frac{f}{2} , \end{equation} \begin{eqnarray}\label{eq14} p_t &=& - \left[ {\frac{1}{r^3}}\left( \left[r - b(r)\right] \left[ 1 +  r \phi'(r)\left(3 + r \phi'(r)\right) +r^2 \phi''(r)\right] - \frac{1}{2}\left[r b'(r) - b(r) \right]\left[ 1 + r \phi'(r)\right] \right) \right]f_Q \nonumber\\ &-& \frac{1}{r^2}\left[r - b(r)\right]\left[1 + r \phi'(r)\right]f_Q - \frac{f}{2}. \end{eqnarray} By choosing an appropriate value of shape function as $b(r)$, one can investigate the wormhole geometry. \subsection{The Energy conditions} The energy conditions are some necessary constraints that are derived from the Raichaudhuri equations which describe the temporal evolution for the time-like vector $u^\eta$ and the null geodesics $k_\eta$ as \cite{ref29} \begin{equation}\label{15} \frac{d\theta}{d\tau} - \omega _{\eta\zeta}\omega^{\eta\zeta} + \sigma_{\eta\zeta}\sigma^{\eta\zeta} + \frac{1}{3} \theta^2 + R_{\eta\zeta} u^\eta u_\zeta = 0, \end{equation} \begin{equation}\label{16} \frac{d\theta}{d\tau} - \omega _{\eta\zeta}\omega^{\eta\zeta} + \sigma_{\eta\zeta}\sigma^{\eta\zeta} + \frac{1}{2} \theta^2 + R_{\eta\zeta} k^\eta k_\zeta = 0. \end{equation} Here $k^\eta$ represents the vector field while the shear or spatial tensor is expressed as $R_{\eta\zeta} k^\eta k_\zeta$ having  $\sigma^{2}= \sigma_{\eta\zeta}\sigma^{\eta\zeta} \geq 0$ and $\omega_{\eta\zeta}\equiv0$. These constraints or  energy conditions, in terms of energy density,  radial pressure and tangential pressure are accountable for the existence and stability of the traversable wormholes. These conditions give an insight into the nature of matter that is filled in the throat. The Rai Chaudhary conditions comply with the following conditions in case of attractive geometry i.e. for $\theta<0$ \begin{equation}\label{17} R_{\eta\zeta} u^\eta u_\zeta \geq 0, \end{equation} \begin{equation}\label{18} R_{\eta\zeta} k^\eta k_\zeta \geq 0. \end{equation} For the anisotropic fluid, the energy conditions can be given as   \begin{itemize} \item Null energy condition or NEC: This condition implies the non-negativity of principle pressures i.e. $\forall i, \rho(r) + p_{i}\geq 0 \Leftrightarrow$ NEC. In tensor form NEC is given as $T_{\eta\zeta} k^{\eta}k^{\zeta} \geq 0$. \item Weak energy condition or WEC: $\rho(r)\geq 0$ and $\forall i, \rho(r) + p_{i}\geq 0$ or $T_{\eta\zeta} k^{\eta}k^{\zeta} \geq 0$ for a time like vector describes the positivity of energy density locally. \item Strong energy condition or SEC: $ (T_{\eta\zeta}-\frac{T}{2}g_{\eta\zeta}) k^{\eta}k^{\zeta} \geq 0 $ or in terms of principle pressures $ T = -\rho(r) + \sum_{j} p_{j}$ and $\forall j, \rho(r) + p_{j}\geq 0, \rho(r) +\sum_{j} p_{j}\geq 0 $. The violation of strong energy condition is a must to acknowledge the Universe inflation. \item Dominant energy condition or DEC: $ T_{\eta\zeta} k^{\eta}k^{\zeta} \geq 0$ where $T_{\eta\zeta}k^{\eta}$ is not space-like or in terms of $p_r$ and $p_t$, DEC is given as $\rho(r) \geq 0$ and $\forall i, \rho \pm p_{i} \geq0$. The DEC shows that the speed of light is the maximum, which energy transfer can achieve and flow of energy or mass can not exceed the speed of light. \end{itemize} \section{Solution of the Wormhole Models} In our present work, we  explore the wormhole solution for three different $f(Q)$ forms. First we will examine the shape function for the linear function of $Q$, second we will take the non-linear form of $f(Q)$ and in third part we will investigate the wormhole geometry for the general quadratic function of $Q$. For each case we are investigating the logarithmic shape function $b(r)=\frac{r_0 \ln (r+1)}{\ln (r_0 +1)}$ with  $r_0$ being the throat radius \cite{ref28b, ref28c}. As we have already mentioned in the previous section, the redshift function must attain non-zero finite value to avoid any singularity and horizons around the throat. Here in our work, we take variable redshift function $\phi(r)=\ln \left(\frac{r_0}{r}+1\right)$ to validate the asymptotically flatness of wormhole geometry \cite{ref28d}. The equation of state parameter which gives the nature of the matter fluid filled in the throat, can be given in the terms of radial pressure $p_r$ and energy density $p_t$ as \begin{equation}\label{19} p_r = \omega\rho. \end{equation} The EoS plays a crucial part in defining the wormhole geometry by giving a clue about the throat matter. For $ -1<\omega<-1/3$, the associated matter corresponds to the quintessence of dark energy which signifies the acceleration of the expansion of the Universe. $\omega < -1$ for phantom fluid is considered a leading candidate for dark energy which also accelerates the Universe expansion. \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig1} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig2} \caption {Variation of Energy density ($\rho$) and NEC ($\rho + p_r$) for throat radius $r_0 = 1$ } \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig3} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig4} \caption {Variation of NEC ($\rho+p_t$) and  SEC ($\rho + p_r+ 2p_t$) for throat radius $r_0 = 1$.} \end{figure} \subsection{Wormhole solutions for linear form of $f(Q)$ i.e. $f(Q)=\alpha Q$} In this section, we have taken the linear form $f(Q)= \alpha Q$. Here the constant $\alpha$ denotes the teleparallel gravitational term. This form of fetches the symmetric teleparallel equivalent of GR and helps in comparing the wormhole solutions to the fundamental ones. Inducing the above logarithmic shape function $b(r)$ and considering specific variable redshift function $\phi(r)$ within equations  (\ref{eq12}),(\ref{eq13}) and (\ref{eq14}), we obtain the energy density $\rho$, radial pressure $p_r$ and tangential pressure $p_t$  as   \begin{equation}\label{eq20} \rho = {\frac { \left( r \left( r+1 \right)  \left( {r}^{2}+r_{{0}}r+2\,r_{{0}} \right) \ln  \left( r_{{0}}+1 \right) - \left(  \left( r+1 \right)  \left( {r}^{2}+r_{{0}}r+2\,r_{{0}} \right) \ln  \left( r+1 \right) +1/2\,r \left( r_{{0}}+r \right)  \right) r_{{0}} \right) \alpha}{2{r}^{3}\ln  \left( r_{{0}}+1 \right)  \left( r_{{0}}+r \right)  \left( r+1 \right) }} \end{equation}   \begin{equation}\label{eq21} p_r = {\frac {\alpha\, \left( 2\,\ln  \left( r_{{0}}+1 \right) r+\ln \left( r+1 \right)  \left( -r_{{0}}+r \right)  \right) r_{{0}}}{{r}^{ 3}\ln  \left( r_{{0}}+1 \right)  \left( r_{{0}}+r \right) }} \end{equation} \begin{equation}\label{eq22} p_t= -{\frac {\alpha\, \left( r \left( r+1 \right)  \left( {r}^{2}+r_{{0}} \right) \ln  \left( r_{{0}}+1 \right) - \left(  \left( r+1 \right) \left( {r}^{2}-r+r_{{0}} \right) \ln  \left( r+1 \right) +{r}^{2} \right) r_{{0}} \right) }{{r}^{3}\ln  \left( r_{{0}}+1 \right) \left( r_{{0}}+r \right)  \left( r+1 \right) }} \end{equation} To analyze the wormhole geometry for this case, the four energy conditions, as discussed in above, have been plotted in Fig. 1 - 4. The  energy density $\rho$ is plotted against the radial coordinate $r$ and different values of constant $\alpha$ in the Fig. 1(a). As we can see from the figure, energy density is positive throughout the region for positive values of $\alpha$ i. e. for $\alpha = 1, 2$ and negative for the negative values of $\alpha$ i. e. $\alpha = -1,-2$. We see that radial NEC as depicted in Fig. 1(b), is satisfied for positive values of $\alpha$ and  for every values of $r\geq r_0$  and for negative $\alpha$ the $\rho + p_r$ is found negative for everywhere. On the other hand, for positive values of $\alpha$, the tangential NEC in Fig. 2(a) is satisfied at the throat and everywhere for $r_0 \leq r \leq 3.54$  and is violated as $r$ increases from 3.54. Also for negative $\alpha$ tangential NEC is violated for $r_0\leq r \leq 3.54$ and satisfied for $r \geq 3.54$. Hence we can say that null energy conditions are satisfied for positive values of $\alpha$ and for $r_0 \leq r\leq 3.54$. The SEC can be observed from Fig. 2(b) which is obeyed for positive $\alpha$ and $r_0 \leq r \leq 3.37$ and for negative $\alpha$, SEC is violated for this region. One can observe from Fig. 3 that both the DEC's are also satisfied at the throat for positive $\alpha$. As can be seen from Fig. 4(b), The anisotropy parameter is negative throughout the space time for positive values of $\alpha$  while for negative $\alpha$ anisotropy parameter is positive for all $r$. The equation of state parameter gives the nature of fluid in space-time. From Fig. 4(a), it is observed that the value of the EoS parameter $\omega$ is positive hence $\omega >-\frac{1}{3}$ which indicates the presence of only ordinary matter at the throat. \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig5} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig6} \caption {Variation of DECs ($\rho -|p_r|, \,\rho-|p_t|$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig7} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig8} \caption {Variation of EoS parameter ($\omega$) and anisotropy parameter ($p_t-p_r$) for throat radius $r_0 = 1$.} \end{figure} \subsection{Wormhole solutions for non-linear form of $f(Q)$ i.e. $f(Q)=\alpha Q^2 + \beta$} This section comprises the case where we  study the wormhole space time for non-linear function $f(Q) =\alpha Q^2 + \beta$ or the power law form of $f(Q)$  where $\alpha$ and $\beta$ are the constants. The power law model has already approved the radiation and CDM dominated background of the Universe. The shape function and the redshift functions are the same as we have used in the above linear case. Solving the field equations for this case, the components come out to be as follows \begin{eqnarray}\label{eq23} \rho& =&\frac{1}{2{r}^{6} \left( \ln  \left( 2 \right)  \right) ^{2} \left( r+1 \right) ^{2}},\left\lbrace \left( 16\,r-56+8\,{r}^{2}+32\,{r}^{3} \right)  \left( \ln  \left( r+1 \right)  \right) ^{2}-64\, \left( -1+r \right) \left( -1/4\right.\right.\nonumber\\ &+& \left.\left. \left( {r}^{2}+5/4\,r+7/4 \right) \ln  \left( 2 \right) \right) r\ln  \left( r+1 \right) +\ln  \left( 2 \right)  \left( \left(2\,\beta {r}^{5}+32\,{r}^{3}+\beta {r}^{6}+16\,r+\beta {r}^{4}\right.\right.\right.\nonumber\\ &-& \left.\left.\left.56+8\,{r}^{2} \right) \ln  \left( 2 \right) +16-16\,r \right) {r}^{2}\right\rbrace \end{eqnarray} \begin{eqnarray}\label{eq24} p_r &=& \frac{1}{2{r}^{6} \left( \ln  \left( 2 \right)  \right) ^{2} \left( r+1 \right) ^{2} }\left\lbrace -24\, \left( -1+r \right) ^{2} \left( \ln  \left( r+1 \right)  \right) ^{2} +32\,\ln  \left( 2 \right) r \left( -1+r \right)  \left( r-2 \right) \ln  \left( r+1 \right) \right.\nonumber\\ &-& \left. \left( \ln \left( 2 \right)  \right) ^{2}{r}^{2} \left( \beta {r}^{6}+2\,\beta {r}^{5}+\beta {r }^{4}+8\,{r}^{2}-48\,r+40 \right) \right\rbrace \end{eqnarray} \begin{eqnarray}\label{eq25} p_t&=&\frac{1}{2{r}^{6} \left( \ln  \left( 2 \right) \right) ^{2} \left( r+1 \right) ^{3} },\left\lbrace \left( -8\,r+8+8\,{r}^{2}+8\,{r}^{3}-16\,{r}^{4} \right)  \left( \ln  \left( r+1 \right)  \right) ^{2}\right.\nonumber\\ &+& \left. \left( \left( -16\,r+32\,{r}^{5}-16\,{r}^{3} \right) \ln  \left( 2 \right) + 16\,{r}^{2}-16\,{r}^{3} \right) \ln  \left( r+1 \right) -\ln  \left( 2 \right)  \left(  \left( r+1 \right)  \left( \beta {r}^{6}\right. \right.\right.\nonumber\\ &+& \left.\left.\left. 2\,\beta {r}^{5}+\beta {r} ^{4}+16\,{r}^{3}-8\,{r}^{2}-8 \right) \ln  \left( 2 \right) +16\,r-16 \,{r}^{2} \right) {r}^{2}\right\rbrack \end{eqnarray} Here also, various energy conditions are coined for positive as well as negative values of $\alpha$. The character of energy density can be pursued from Fig. 5(a) which comes out to be positive for positive values of $\alpha$. For $\alpha < 0$ energy density is negative throughout the region and approaches zero with $r$ going on. We mainly focus on the solutions of wormholes where the existence of exotic matter can be avoided. For negative $\alpha$ the energy density is negative. Also the NEC is violated for the negative values of $\alpha$ which suggests the presence of non-ordinary matter at the wormhole throat. Now as we are observing from Fig. 5(b) and 6(a), both the NECs are validated for $r \leq 3.54 $ for $\alpha > 0$. The strong energy condition is violated throughout the region for every value of $\alpha$, as can be seen from Fig. 6(b). The radial and tangential both DEC's are devised in Fig. 7(a) and (b). The radial DEC is violated for every $r \geq r_0$ while the tangential DEC is satisfied partially. The anisotropy parameter is positive everywhere for positive values of $\alpha$. Moving away from the throat $r_0 =  1$, the anisotropy parameter tends to zero and then again increases towards the positive side as $r$ increases further. The EoS parameter $\omega$ is drafted in Fig. 8(a) which is negative for every value of $\alpha$ and for all $r \geq r_0$. At throat $r_0 =1$ the value of $\omega$ is -1 also more generally for $r \geq r_0$, $ -1 \leq \omega <- 1/3$ which shows the presence of exotic matter around the throat which in turn also shows the violation of energy conditions at the wormhole throat by some arbitrary values for positive $\alpha$. \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig9} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig10} \caption {Variation of Energy density ($\rho$) and NEC ($\rho + p_r$) for throat radius $r_0 = 1$ } \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig11} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig12} \caption {Variation of NEC ($\rho+p_t$) and  SEC ($\rho + p_r+ 2p_t$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig13} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig14} \caption {Variation of DECs ($\rho -|p_r|, \,\rho-|p_t|$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig15} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig16} \caption {Variation of EoS parameter ($\omega$) and anisotropy parameter ($p_t-p_r$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig17} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig18} \caption {Variation of Energy density ($\rho$) and NEC ($\rho + p_r$) for throat radius $r_0 = 1$ } \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig19} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig20} \caption {Variation of NEC ($\rho+p_t$) and  SEC ($\rho + p_r+ 2p_t$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig21} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig22} \caption {Variation of DECs ($\rho -|p_r|, \,\rho-|p_t|$) for throat radius $r_0 = 1$.} \end{figure} \begin{figure} (a)\includegraphics[width=8cm, height=8cm, angle=0]{fig23} (b)\includegraphics[width=8cm, height=8cm, angle=0]{fig24} \caption {Variation of EoS parameter ($\omega$) and anisotropy parameter ($p_t-p_r$) for throat radius $r_0 = 1$.} \end{figure} \subsection{Wormhole solutions for quadratic form of $f(Q)$ i.e. $f(Q)=\alpha Q^2 + \beta Q + \gamma$} Here in this section, we take a more general quadratic form of function $f(Q)$. The above two cases of linear and non -linear $f(Q)$  have been examined with different shape functions for possible wormhole geometry \cite{ref28}. But we  try to get an insight into the wormhole geometry for this quadratic gravity $f(Q)$. As we have already mentioned, the shape function $b(r)$ and the redshift function  $\phi(r)$ are same as the previous cases. Using this quadratic model, the field equations (\ref{eq12}), (\ref{eq13}) and (\ref{eq14}) can be developed to give the stress energy components as \begin{eqnarray}\label{eq26} \rho&=& \frac{1}{2 r^6 (r+1) (r+{r_0})^2}\left\lbrace-4 \alpha  (r+1) {r_0}^2 \left(4 r^3-3 r^2+2 r {r_0} (3-2 {r_0})-3 {r_0}^2\right) \log ^2\left(\frac{r+1}{{r_0}+1}\right)\right.\nonumber\\ &-& \left. 4 r {r_0} \log \left(\frac{r+1}{{r_0}+1}\right) \left(\beta  r^6+2 \beta  r^5 {r_0}+r^4 \left(\beta  \left({r_0}^2+2 {r_0}-1\right)-8 \alpha \right)-2 r^3 \left(\alpha -\beta  {r_0}^2\right)\right.\right.\nonumber\\ &+& \left.\left. r^2 \left(2 \alpha  \left(4 {r_0}^2-7 {r_0}+3\right)+\beta  {r_0}^2\right)+2 \alpha  r {r_0} (7 {r_0}-6)+2 \alpha  {r_0}^2 ({r_0}+3)\right)\right.\nonumber\\ &+& \left. r^2 \left(\gamma  r^7+r^6 (4 \beta +\gamma +2 \gamma  {r_0})+r^5 {r_0} (8 \beta +\gamma  ({r_0}+2))+r^4 \left(-16 \alpha +2 \beta  \left(2 {r_0}^2+5 {r_0}-2\right)+\gamma  {r_0}^2\right)\right.\right.\nonumber\\ &-& \left.\left. 4 r^3 \left(\alpha -3 \beta  {r_0}^2\right)+2 r^2 \left(2 \alpha  \left(4 {r_0}^2-8 {r_0}+3\right)+\beta  ({r_0}+2) {r_0}^2\right)+4 \alpha  r {r_0} (7 {r_0}-6)\right.\right.\nonumber\\ &+& \left.\left. 4 \alpha  {r_0}^2 (2 {r_0}+3)\right)\right\rbrace, \end{eqnarray} \begin{eqnarray}\label{eq27} p_r &=& \frac{1}{2 r^6 (r+{r_0})^2}\left\lbrace2 r {r_0} (r-{r_0}) \log \left(\frac{r+1}{{r_0}+1}\right) \left(\beta  r^3+\beta  r^2 {r_0}-8 \alpha  r+16 \alpha  {r_0}\right)\right.\nonumber\\ &-& \left. r^2 \left(\gamma  r^6+2 \gamma  r^5 {r_0}+\gamma  r^4 {r_0}^2-4 \beta  r^3 {r_0}-4 r^2 \left(\alpha +\beta  {r_0}^2\right)+24 \alpha  r {r_0}-20 \alpha  {r_0}^2\right)\right.\nonumber\\ &+& \left. 12 \alpha  {r_0}^2 (r-{r_0})^2 \log ^2\left(\frac{r+1}{{r_0}+1}\right)\right\rbrace, \end{eqnarray} \begin{eqnarray}\label{eq28} p_t&=& \frac{1}{2 r^6 (r+1) (r+{r_0})^2}\left\lbrace-4 \alpha  (r+1) {r_0}^2 \left(r^7-r^6 {r_0}-2 r^3+r^2 (2 {r_0}-1)+{r_0}^2\right) \log ^2\left(\frac{r+1}{{r_0}+1}\right)\right.\nonumber\\ &+& \left. r^2 \left(\beta  r^9 {r_0}+\beta  r^8 {r_0}^2-r^7 (\gamma +4 \alpha  {r_0})+r^6 \left(-2 \beta -\gamma +4 \alpha  {r_0}^2-2 \gamma  {r_0}\right)-r^5 (2 \beta  ({r_0}+1)\right.\right.\nonumber\\ &+& \left.\left.\gamma  {r_0} ({r_0}+2))+r^4 (8 \alpha -{r_0} (4 \beta +\gamma  {r_0}))-2 r^3 (\alpha  (4 {r_0}-6)+\beta  {r_0} ({r_0}+1))\right.\right.\nonumber\\ &-& \left.\left. 2 r^2 \left(\beta  {r_0}^2+\alpha  (4 {r_0}-2)\right)-4 \alpha  r {r_0}^2-4 \alpha  {r_0}^2\right)+r {r_0} \log \left(\frac{r+1}{{r_0}+1}\right) \left(-\beta  r^{10}-\beta  r^9 ({r_0}+1)\right.\right.\nonumber\\ &+& \left.\left. r^8 (4 \alpha -\beta  {r_0})+4 \alpha  r^7+r^6 \left(2 \beta -4 \alpha  {r_0}^2-4 \alpha  {r_0}\right)+2 \beta  r^5 ({r_0}+1)+4 r^4 (\beta  {r_0}-4 \alpha )\right.\right.\nonumber\\ &+& \left.\left. 2 r^3 (4 \alpha  (2 {r_0}-3)+\beta  {r_0} ({r_0}+1))+2 r^2 \left(\beta  {r_0}^2+\alpha  (8 {r_0}-4)\right)+8 \alpha  r {r_0}^2+8 \alpha  {r_0}^2\right)\right\rbrace. \end{eqnarray} Fig. 9(a) depicts the energy density $\rho$ against both negative and positive values of constant $\alpha$. As we can interpret from the figure, energy density is positive at the throat and everywhere for $r\geq r_0$. Here we have fixed the values of other constants as $\beta=1$ and $\gamma=1$. It is very interesting to see in Figs. 9(b) and 10(a), that both the NEC's are satisfied at the throat and beyond as $r$ increases. The tangential NEC, however, is not satisfied for $r > 3.53$. This validation implies that for around the throat the WEC is authenticated for all values of $\alpha$. From Fig. 10(b) it is clear that SEC is validated at the throat and in a small region  beyond the throat for $r \geq r_0$. The radial and tangential DECs are plotted  in Fig. 11(a) and (b). It is gathered from the figure that the radial DEC is satisfied everywhere for $r \geq r_0$ while the tangential DEC is validated at the throat and beyond for $r \leq 3.53 $ and violates as $r$ increases further. As far as the anisotropy parameter is concerned, it is drawn in Fig. 12(b) and is negative everywhere for $r \geq r_0$ except for some values of $r$ where it reaches to zero and again becomes negative for larger values of $r$. This negative value of the anisotropy parameter shows that the geometry around the throat has a repulsive nature. The presence of ordinary or non-exotic matter near the throat is found in Fig. 12(a) i.e. $\omega >-1/3$ for all values of $\alpha$. But it is also suggesting the existence of quintessence $-1 <\omega<-1/3$ as $r$ goes higher i.e. at the region away from the throat. \section{Discussion and Conclusion} The solutions of wormholes in GR are restricted to the violation of averaged NEC which is an inevitable consequence in GR which leads to the presence of exotic matter. However in modified gravity it is tried to avoid the exotic form of matter by  considering the higher order terms which support the wormhole  geometry. In our  present work, our main objective is to explore the wormhole solution with standard fluid.  We have examined the spherically symmetric and static traversable WH in the backdrop of $f(Q)$ gravity i. e. the symmetric tele-parallel gravity where the term $Q$ is the non-metricity term describing the gravitational interactions. Many researchers are nowadays interested in exploring the cosmological aspects and  wormhole solutions in the framework of $f(Q)$ gravity. As stated earlier in this section, in GR to have a traversable wormhole, the violation of NEC is a must which signifies the exotic matter in the wormhole throat. To avoid this situation and to find a more realistic solution, We have taken three functional forms of $f(Q)$. The motivation of our work came from  in which Hassan et al. \cite{ref28}  have explored the wormhole solutions taking linear form $f(Q)=\alpha Q$ and the non-linear form $f(Q)=\alpha Q^2 + \beta$. However, they found  an appropriate solution for traversable wormhole geometry in $f(Q)$ which violates the NEC at the throat and indicates the presence of exotic matter. Though they measured the quantity of exotic matter to be small. In this work, we have examined the shape function  $b(r)={\frac{r_{0}\ln(r+1)}{\ln({r_0}+1)}}$ for all the three cases and have considered the same variable redshift function $\phi(r)=\ln  \left( {\frac {r_{{0}}}{r}}+1 \right) $ throughout the study. This shape function is already examined for the possible solution in other modified gravities such as $f(R)$ and 4-D EGB theory \cite{ref21a,ref31}, hence, it has already been proved there to have satisfied all the necessary conditions of shape function.\\ First, the possibility of a traversable wormhole for a linear form of $f(Q)$ is examined by studying all the energy conditions against the radial coordinate $r$ and for negative as well as positive values of $\alpha$. The radius of the throat is $r_0  = 1$. We can collect from the figures that for positive values of $\alpha$, the NEC and WEC are satisfied near the throat which implies the presence of normal matter in the throat. Both the DEC's  are also satisfied here. If we look at the values of the EoS parameter $\omega$, it is clear that there is no presence of exotic matter as its value is greater than $-1/3$. These outcomes imply that the wormhole solutions obtained here are justifiable in the $f(Q)$ gravity.\\ In the second case, the wormhole geometries are discussed in the backdrop of a non-linear Lagrangian $f(Q)$. To explore the possibility of a non exotic traversable wormhole, all the energy conditions are examined. As in the case of linear $f(Q)$, For positive $\alpha$ the NEC profiles are validated in the vicinity of the throat. The radial DEC is satisfied throughout while the lateral DEC is satisfied in the neighborhood of the throat for $r \geq r_0=1$ and then as $r$ increases it becomes negative. These profiles also suggest the existence of wormhole solutions with non-exotic matter. Although the EoS parameter in this case gives an indication towards the presence of exotic matter near the throat. Though it has been shown in previous works within the framework of other modified gravity that the presence of exotic matter can be minimized in the throat \cite{ref17}.\\ The third case we have considered is the case of a more general quadratic form of $f(Q)$ with constants $\alpha$ and $\gamma$. Again the same shape function is tried for a plausible solution of wormholes. If we go through the various energy conditions, we are amazed to see that this quadratic Lagrangian  has very interesting results. As we can see the NEC and WEC are satisfied for all values of alpha near the throat which gives an attractive nature of fluid in the throat. Both the DEC's are also justified around the throat. The energy conditions are also consistent with the EoS parameter $\omega$ since at the throat the value of $\omega >-1/3$ which shows that at the throat only normal matter is present. Hence this case gives a feasible solution of traversable wormhole without need of exotic matter.\\ Hence, we can conclude that with an appropriate shape function and redshift function, we can find plausible solutions which support the traversable wormhole geometry within the framework of $f(Q)$ gravity. Also with particular forms of $f(Q)$ the existence of exotic matter can be minimized and even can be avoided completely in some cases. 
\section{Spacetime algebraicism} Is spacetime a substance? One reason for answering yes is that the curvature of spacetime can explain phenomena such as light bending near massive objects according to general relativity. The view that spacetime is a substance independent of the things and processes in it is called \textit{(spacetime) substantivalism}. The structure of spacetime is standardly represented by a smooth manifold equipped with a metric in manifold-based differential geometry. But there are also many reasons for thinking that spacetime does not exist at the fundamental level. For example, \citet{geroch}, among many others, has pointed out that a quantum theory of gravity calls for a ``smearing out'' of spacetime points. There is also a famous argument against substantivalism known as the hole argument, which purports to show that substantivalism is incompatible with even the weakest form of determinism~\citep{EN}. As a result, \citet{geroch} and~\citet{earman} respectively suggest \textit{(spacetime) algebraicism}, the view that physical fields exist fundamentally without an underlying spacetime, as a way to circumvent these difficulties. A similar approach has been taken up by the many works investigating noncommutative approaches to spacetime~\citep{DFR,marcolli}. Here's very roughly how the standard version of algebraicism works. Consider the smooth manifold $M$ that represents our spacetime under substantivalism. Take all the smooth (real-valued or complex-valued) functions on $M$. We can operate on these functions in various ways. For example, we can add or multiply two smooth functions to get another. Now, instead of considering these smooth functions as maps $M \to \R$, we can instead consider them abstractly as elements of an algebraic structure defined by algebraic operations such as addition and multiplication. The observation which launches algebraicism is that a large amount of information about the manifold can be encoded in this algebra of functions~\citep{connes_reconstruction}. In particular, all geometric entities that we need to do physics up to general relativity, including vectors and tensors, can be defined in algebraic terms without any reference to manifolds~\citep{geroch,pessers}. Geroch's proposal amounts to extending such a structure by an algebraic equivalent of the metric, resulting in an ``Einstein algebra'' whenever the Einstein field equations hold. However, there is also bad news for algebraicism. \citet{rynasiewicz} pointed out that the approach of Einstein algebras neither addresses the concern from quantum gravity nor the hole argument. It does not necessarily smear out spacetime points, because points can be reconstructed from the algebraic structure.\footnote{Note that substantivalism is the view that spacetime exists at the fundamental level, which should be distinguished from the position that spacetime points can be constructed from the fundamental structures. It is also worth mentioning that Rynasiewicz's conclusion is contended by~\citet{bain}.} It does not avoid the hole argument because there is an analogous indeterminism among isomorphic algebras. So why should we still care about algebraicism? First, the advantages of Einstein algebras as an alternative approach to spacetime are still underexplored. For example, \citet{menon} connects Einstein algebras with the \textit{dynamic approach} to relativistic theories, according to which the geometry of spacetime is not fundamental and should be understood in terms of dynamic fields (rather than the other way around). The dynamic approach is famously advocated by Harvey Brown among others \citep{brown}. However, the traditional dynamic approach, though it disregards the metric as fundamental, still takes the metrically amorphous manifold as ontologically prior to physical fields. Algebraicism is a more thoroughgoing dynamic approach by getting rid of the underlying manifold---arguably an improvement upon this perfectly respectful approach to physics. Second, algebraicism is much more than the formalism of Einstein algebras, which is merely one implementation of algebraicism. For example, we could have algebraic structures that do not correspond to any geometric structures with points, such as the noncommutative algebras on which noncommutative geometry builds. Such algebraic structures may be helpful in formalizing quantum theories; see e.g.~\citet{bain,HS}. Finally, since algebraicism is claimed to be an alternative to (manifold-theoretic) substantivalism as a foundation that is at least as good, it would be too dogmatic to subscribe to substantivalism without giving due consideration to algebraicism. In this paper, we undertake some foundational work, both conceptually and technically, in exploring the potential of algebraicism as a dynamic approach. In order to take algebraicism realistically, we need to interpret what things fundamentally exist according to algebraicism. In the case of Einstein algebras, the fundamental structure is the algebra of all smooth functions $C^\infty(M)$ on the manifold $M$ that standardly represents our spacetime. Those smooth functions can be understood as the possible configurations of a scalar field, which constitutes the fundamental ontology of Einstein algebras \citep{earman,DHL,bain}. But what is this scalar field? Is it an actual physical field like the Higgs field?\footnote{Technically the answer can be seen to be ``no'', since the Higgs field is $\C^2$-valued rather than merely real-valued or complex-valued. A better candidate would be the hypothetical \emph{inflaton field}, which is indeed thought to be a real-valued scalar field. However, for the purposes of this discussion it does not matter which physical field it is, so let us pretend for the sake of discussion that it could be the Higgs field.} Here we seem to face a dilemma. On the one hand, if it is a physical field such as the Higgs, then we would be privileging one type of physical field ontologically, which seems arbitrary. In particular, following the prescription that all relevant structures are to be defined in terms of the algebra $C^\infty(M)$, non-scalar fields such as the electromagnetic field then would have to be defined in terms of the Higgs field, but it is implausible to think that the electromagnetic field is ontologically dependent on the Higgs field. On the other hand, if the elements of $C^\infty (M)$ are not physical fields, then taking them as fundamental objects amounts to positing fundamental ghost fields that play no role in our best current physical theory. This would violate the empiricist spirit that largely motivates the dynamic approach to physics.\footnote{This would be less of an issue for substantivalists. When \citet{EN} consider algebraicism as a potential solution to the hole argument, they construe it as ``algebraic substantivalism.'' There, the idea is that the algebraic structure is a substitute for the spacetime manifold without necessarily being a physical field of its own. We thank the referee for bringing this point to our attention.} To avoid this dilemma, we need to go beyond the formalism of algebras of scalar-valued functions. The fundamental fields featured in our best physical theory should be ontologically on a par and independent from each other. This posits a nontrivial technical challenge. But it seems to be a necessary step towards building a conceptually perspicuous theory rather than one merely technically adequate. To alleviate this problem, or at least to make some progress on it, we will propose algebraic structures for fundamental physical fields in a way that does not privilege any of them over others. To do so, we will propose a principled strategy for systematically determining fundamental algebraic structures based on the physical field content (although we will not argue that it is the only strategy). The hope is that the resulting dynamical theory is as perspicuous and as parsimonious as possible. From a slightly different perspective, we will advocate the following conceptual shift. Traditionally, physical fields are described by structures defined in terms of some primitive ones. In the standard algebraic approach, the algebra of scalar-valued functions is the primitive structure, with all other objects such as non-scalar fields described in terms of non-primitive derived structures.\footnote{This is analogous to the manifold approach, where the smooth manifold is the primitive structure and all other structures are defined on it.} Schematically, this situation can be depicted like this: \[ \begin{tikzcd} & \text{primitive structures} \ar{d} \\ \text{physical fields} \ar{r}{\subseteq} & \text{derived structures} \end{tikzcd} \] Our goal is to achieve the following picture instead: \[ \begin{tikzcd} & \text{primitive structures} \\ \text{physical fields} \ar{ur}{=} \end{tikzcd} \] Like this, there is no fundamental structure underlying physical fields, which marks a thorough break from the tradition of positing spacetime or its surrogates such as a scalar field (which may not have physical reality). Under this approach, we can confidently affirm that physics can indeed be written ``on thin air alone" without ``the support of various space-time structures" \citep{earman}. Also, the need for considering any derived structures disappears: to do physics, it is enough to work with the primitive structures only. This makes the task of a realistic interpretation easy: we no longer need to worry about interpreting the derived structures, which are not limited to physical fields (for example, see \citet{AD}). Relatedly, the new framework is potentially ontologically more parsimonious than the standard algebraic approach in that there are fewer pieces of structure to quantify over. As a cost, the new framework is less parsimonious in its ideology since all physical fields are described by primitive structures. Such a concession is commonplace in theory choice, and is generally considered worthwhile if the resulting theory is more ontologically perspicuous (for example, consider the nominalist projects about numbers). Of course, it still is a cost, and we aim to keep this cost minimal by only positing primitive structures that seem necessary, natural and joint-carving in light of our best physical theories. \section{Spacetime algebraicism based on a scalar field} In this section, we provide some background by outlining our perspective on the algebraic approach to spacetime proposed by \citet{geroch,heller}, in which spacetime is characterized by its algebra of scalar-valued functions without explicit reference to spacetime points. While similar ideas also feature prominently in noncommutative geometry and its applications to physics~\citep{connes,marcolli}, our emphasis here is motivated by the closer proximity of Geroch's Einstein algebras to our proposal for non-scalar fields presented in the following sections. As alluded to previously, the basic idea is to start with $C^\infty(M)$, the set of real-valued smooth functions on a manifold $M$, and to carefully analyze the following two questions: \begin{enumerate}[label=(\arabic*)] \item\label{which_algebraic} Which algebraic structures does $C^\infty(M)$ carry at all? \item\label{which_physics} Which of these structures on $C^\infty(M)$ are relevant for formulating the kind of physics we want to consider? \end{enumerate} Both of these questions are important, and the rest of this paper will present some considerations on how to approach similar questions for non-scalar fields. Here we discuss them in the scalar field case, with Geroch's intended application to general relativity in mind. Starting with \ref{which_algebraic}, we had already alluded to the fact that scalar-valued functions $M \to \R$ can be added and multiplied. They also possess an operation of scalar multiplication by real numbers. Taken together, these operations make $C^\infty(M)$ into a \emph{commutative algebra over $\R$}, and it is therefore natural to expect this to constitute a viable answer to \ref{which_algebraic}. This is indeed the approach adopted by Geroch and Heller, as well as the starting point of noncommutative geometry\footnote{With two technically relevant caveats: \begin{enumerate}[label=(\roman*)] \item One usually considers complex-valued scalar functions rather than real-valued ones. \item The algebras of smooth functions in noncommutative geometry are typically equipped with additional \emph{analytic} structure, again modelled after that of $C^\infty(M)$. \end{enumerate} Neither of these differences affects our conceptual discussion. We will not entertain analytic structures further in this paper, so suffice it to mention that this structure in particular serves as a stand-in for the additional algebraic structure considered in the next paragraph.}. Note that defining these operations does not require the introduction of coordinates on $M$, and therefore they are diffeomorphism-invariant. However, this does not yet need to be the final answer, as there is some additional algebraic structure on $C^\infty(M)$ not captured by it being a commutative algebra over $\R$. Indeed if $g : \R \to \R$ is any smooth function, then we have an additional unary algebraic operation given by \[ C^\infty(M) \longrightarrow C^\infty(M), \qquad f \longmapsto g(f). \] More generally, every $g : \R^n \to \R$ defines an $n$-ary operation given by \[ \underbrace{C^\infty(M) \times \ldots \times C^\infty(M)}_{n \textrm{ factors}} \longrightarrow C^\infty(M), \qquad (f_1,\ldots,f_n) \longmapsto g(f_1,\ldots,f_n). \] In particular, this recovers the ring structure of $C^\infty(M)$ upon taking the map $g : \R^2 \to \R$ to be given by the addition or multiplication of two real numbers. Now if we consider the elements of $C^\infty(\R^n)$ as the $n$-ary operations in this way, then plugging these functions into each other results in an infinite system of equations satisfied by these operations. This results in an algebraic theory of which we can then consider arbitrary models: these are sets coming with $n$-ary operations indexed by all smooth functions $\R^n \to \R$ and satisfying the relevant equations; these algebraic structures are the \emph{$C^\infty$-rings}~\citep{MR}. As their name suggests, every $C^\infty$-ring is in particular a ring, obtained by forgetting all algebraic structures apart from addition and multiplication; and for every manifold $M$, the smooth real-valued functions on $M$ form a $C^\infty$-ring $C^\infty(M)$ in a coordinate-independent way. We thus have two distinct but closely related answers to \ref{which_algebraic}: one which is very much in the spirit of abstract algebra and algebraic geometry by involving only finitely many operations and equations between these; and a more principled one closer to analysis, involving infinitely many defining operations. For the sake of physics, there is no need to prematurely settle on either of these options. Although we will focus on technically developing the second type of approach only, we would prefer to maintain some flexibility and keep in mind that there may yet be further options with other nuances.\footnote{It seems plausible that such open-ended methodology can help explain the low standards of mathematical precision commonly encountered in physics, but we will not dwell on this point.} We now consider the question \ref{which_physics}. For concreteness, let us assume that we want to formulate general relativity algebraically. Central to general relativity are Einstein's field equations, which govern how the curvature of spacetime is determined by the distribution of stress-energy density. These are standardly expressed in the following form, with coordinate indices $\mu,\nu = 0,\ldots,3$ for the temporal and spatial dimensions:\footnote{For convenience, we use units in which the speed of light is $1$ and the gravitational constant is $1/8\pi$, as is common practice. We also pretend that the cosmological constant is zero for simplicity, but this will not affect our discussion.}\textsuperscript{,}\footnote{We refer to \citet{BD} for an intuitive explanation of the field equations and their phenomenological significance.} \beq \label{efe} R_{\mu\nu}-\frac{1}{2} R g_{\mu\nu} =T_{\mu\nu}. \eeq In this expression, $R_{\mu\nu}$ is the Ricci tensor, which measures the dynamically relevant spacetime curvature generated by the metric tensor $g_{\mu\nu}$. $R$ is the Ricci scalar---the contraction of the Ricci tensor to a scalar---and $T_{\mu\nu}$ is the stress-energy tensor that encodes the distribution of matter in spacetime. To formulate the field equations, Geroch considered algebraic definitions of the technical notions appearing in the field equation~\Cref{efe}, including tensor calculus, metric tensors, the Levi-Civita connection and the Ricci tensor. The relevant structure of $C^\infty(M)$ can be considered to be the minimal one which lets us define these notions. As presented in detail in~\citet{pessers}, they can be defined for any commutative ring satisfying a suitable regularity condition (that its module of derivations has a dual together with which it forms a dual pair). Hence we can interpret the field equations~\Cref{efe} in any such ring, and following Geroch's convention, we can call an \emph{Einstein algebra} any such ring together with a solution to the field equations. Note that the fact that the algebraic approach starts from manifolds and is adequate for doing physics does not mean that it is necessarily equivalent to the manifold approach. For example, \citet{MR} proposed models for synthetic calculus\footnote{This synthetic calculus is called \emph{smooth infinitesimal analysis}. It is a foundation for calculus alternative to standard analysis and has infinitesimals that square to zero~\citep{MR,bell}.} which are built on the category of $C^\infty$-rings of a certain sort. Objects in this category include quotient rings of $C^\infty(M)$ (with respect to ideals of a certain sort), which includes the ring of dual numbers $C^\infty(\R)/\langle x^2\rangle$. We can interpret this category geometrically by considering its dual category, which is like the category of smooth manifolds but has extra objects. For example, $C^\infty(\R)/\langle x^2\rangle$ does not correspond to a smooth manifold but to an infinitesimal object in the dual category. This infinitesimal object behaves like a tangent space, but it can be embedded into other objects that are manifolds and therefore can be seen as an infinitesimal part of space (see \citet{sdg_paper} for more details).\footnote{Note that if we wanted to exclude rings like $C^\infty(\R) / \langle x^2 \rangle$ from the category of $C^\infty$-rings, so that the dual category does not have infinitesimal objects, then we would need to impose unnatural restrictions on $C^\infty$-rings. See \citet{RBW} for such a restriction and \citet{sdg_paper} for further comments.} But according to the manifold approach, a manifold does not have infinitesimal parts. In this sense, the algebraic approach is not equivalent but more expressive than the manifold approach. We now pose the conceptual problems which will motivate the developments proposed in the upcoming sections. Granting that the formalism of Einstein algebras is technically adequate for doing physics up to general relativity, an immediate question is how we should interpret the fundamental algebraic structure of a commutative ring or $C^\infty$-ring. The elements of $C^\infty(M)$ are typically interpreted as the possible field configurations of a scalar field. However, such an algebraic ontology is unmotivated: if the scalar fields are actual physical fields, then it is arbitrary for one such scalar field to be ontologically privileged, as opposed to other non-scalar physical fields like the electromagnetic field. On the other hand, if the elements of the ring under consideration do not play the role of configurations of any actual physical fields, then they would be strange platonic structures at the fundamental level. We now turn to the question of how to improve on this situation. Finally, let us comment on the relation between questions \ref{which_algebraic} and \ref{which_physics}. Our main interest is in answering question \ref{which_physics}, but answering \ref{which_algebraic} is an important step for making progress on \ref{which_physics}. For how else would we have come up with the idea of using a structure like commutative rings in the first place? Considering the second question separately also helps with weeding out the redundant structures. As it will become clear later, many derived notions involved in Geroch's approach are not necessary. \section{Spacetime algebraicism based on physical fields} Having arrived at the conclusion that spacetime algebraicism based on scalar-valued functions is problematic, we now discuss how one can develop versions of algebraicism in which all physical fields feature among the primitive structures. This constitutes both a conceptual and a technical development, with the latter leveraging definitions and constructions which are known in the mathematical literature. Thus consider a physical field, say the electromagnetic field, or more generally a collection of physical fields, say the electromagnetic field together with a spinor field. (We will speak in the singular in the following, and leave the straightforward extension to the case of multiple fields largely to the examples.) Given this field, we consider the following questions as constituting a good methodology for determining the algebraic approach to the physics of the field without reference to spacetime points. They extend and generalize the two questions considered in the previous section. \begin{enumerate}[label=(\arabic*')] \setcounter{enumi}{-1} \item\label{which_structure2} What manifold-theoretic structures are relevant for formulating the physical field? \item\label{which_algebraic2} Which algebraic structures can be defined on the field so formulated? \item\label{which_physics2} Which of these algebraic structures are relevant for formulating the physics of the field, and what does a purely algebraic formulation of the physics look like? \end{enumerate} Again, \ref{which_physics2} is our main interest and where we move away from the manifold context, while we consider \ref{which_structure2} and \ref{which_algebraic2} as important steps towards answering \ref{which_physics2}. Note that in the case of a single scalar field, the answer to \ref{which_structure2} is clear: the relevant manifold-theoretic structure is the scalar-valued functions over the manifold. This is why we did not consider this question in the previous section. It also shows that in the scalar field case, question \ref{which_algebraic2} reproduces question \ref{which_algebraic} from the previous section, and similarly \ref{which_physics2} reproduces \ref{which_physics}. Hence the above questions directly generalize the ones we had addressed in the scalar field case. Note that sorting out the manifold-theoretic structures in answering question \ref{which_structure2} does not commit us to manifolds ontologically. It is only a methodological starting point. The manifold-theoretic structures will be reconceptualized by algebraic ones in answering question \ref{which_physics2}. We will examine these general questions in turn in the following sections and discuss methods for how to answer them. These will be illustrated with a few running examples including the electromagnetic field and a Weyl spinor field. \section{A general manifold-theoretic formulation of physical fields} \label{geom_structures} In the case of a scalar field, it was clear that its algebraic description would have to be based on the scalar-valued functions. For other types of fields, it is far less clear what the most appropriate mathematical structure is in response to question \ref{which_structure2}. For example for the electromagnetic field, there are many different kinds of manifold-theoretic structures which have been entertained to describe it: \begin{itemize} \item In the non-relativistic context, the electric and magnetic field are described separately, each formalized by a vector field on space.\footnote{More precisely, with the electric field a vector field and the magnetic field a \emph{pseudovector} field.} \item In the relativistic setting, these two vector fields become unified to the antisymmetric \emph{field strength tensor} $F_{\mu\nu}$, or equivalently to a \emph{differential $2$-form} $F$, on spacetime. \item Taking the gauge theory perspective, the electromagnetic field is described by the \emph{four-potential} $A_\mu$, or equivalently by a \emph{differential $1$-form} $A$, modulo gauge transformations.\footnote{Technically this $1$-form takes values in the Lie algebra $\mathfrak{u}(1)$, but since this Lie algebra is canonically isomorphic to $\R$, we consider it as an ordinary $1$-form for simplicity.} \item In more abstract geometric terms, a field configuration is given by a connection on a \emph{principal bundle} with gauge group $U(1)$.\footnote{Note that on topologically nontrivial spacetimes, these formalisms are not equivalent, with the final one usually considered to be more physically correct; see e.g.~\citep[Section~10.5]{nakahara}.} \end{itemize} The technical details in these descriptions are secondary to our point, which is to illustrate the apparent malleability of the identification between physical fields and various manifold-theoretic structures. The situation with general relativity is even worse than this: there are a plethora of reformulations, many of which do not even involve a metric tensor~\citep{krasnov}. So how do we answer the question about the proper manifold-theoretic structure describing a physical field then? Should any of the above prescriptions be given priority over the others? Our inclination is to pursue a more general manifold-theoretic formulation of fields, one which does not require one to choose between the various descriptions presented above. (See \Cref{pure_electro1} for more details.) To motivate the upcoming definition, it is useful to recall an important principle often invoked by physicists: \begin{center}\smallskip \emph{A field is characterized by how it transforms under changes of coordinates.}\smallskip \end{center} In order to avoid unnecessary talk about coordinates, we find it advantageous to move from considering the transformation behavior under passive coordinate changes to considering the transformation behavior under active diffeomorphisms. And in fact, for many types of fields it is possible and useful to consider their transformation behavior under more general maps, such as \emph{local diffeomorphisms}, which include (among other things) the coordinate charts of any manifold $M$, in the form of inclusion maps of open subsets of $\R^d$ into $M$. We prescribe the following: \begin{itemize} \item There is a class of manifolds\footnote{As will become clear in the upcoming discussion, we will focus on manifolds of a fixed spacetime dimension $d$, which will turn out to be necessary for our treatment of Lagrangian densities.} \!\!\textsuperscript{,}\!\! \footnote{Note that many types of fields considered in physics are not defined on plain manifolds, but rather on manifolds equipped with a certain \emph{background field}, for example a metric. In cases like this, the class of manifolds needs to be chosen so as to take this into account, and consist for example of the \emph{Lorentzian} manifolds. Similarly, the class of designated maps in the second item must be defined so as to consist of those maps which preserve the background fields. (However, see \Cref{lagrangian_preserving} for a counterpoint.)} (or other structures playing an analogous role, such as formal duals of commutative algebras), such that for every manifold $M$ in this class we have a set of field configurations $\ff(M)$. \item There is a class of designated maps between these manifolds, playing the role of active transformations, such that for every map $f : M \to N$ in this class, we have a designated function $\ff(f) : \ff(N) \to \ff(M)$, which specifies the transformation behavior of the field by mapping field configurations on $N$ to field configurations on $M$. This class is closed under composition and containing all identity maps. \end{itemize} The consistency of field transformations requires that these prescriptions make $\ff$ into a \emph{functor}: it must be compatible with composing active transformations by satisfying the equations \beq \label{f_functoriality} \ff(g \circ f) = \ff(f) \circ \ff(g), \qquad \ff(\id) = \id. \eeq Since every diffeomorphism can be used in place of $f$, the functor $\ff$ in particular specifies how the field transforms under diffeomorphisms. Our discussion thus far has been concerned with the \emph{kinematical} aspects of a field by focusing on the possible field configurations and how these transform. But certainly the specification of a physical field must also involve some \emph{dynamical} information. The dynamical information about the field is usually taken to come in the form of its \emph{Lagrangian density},\footnote{This is the case at least for \emph{local} interactions, which we restrict ourselves to in this paper.} both in classical as well as in quantum field theory. But before we formalize this, we need to consider what a \emph{density} is in general. A density $\omega$ on a $d$-dimensional manifold $M$ assigns to every family of tangent vectors $v_1,\ldots,v_d \in T_x M$ at any point $x \in M$ a number $\omega(v_1,\ldots,v_d)$, to be interpreted as the volume of the infinitesimal parallelepiped spanned by $v_1, \ldots, v_d$, such that suitable linearity and smoothness conditions hold which formalize this intended interpretation~\citep{nicolaescu}. Let us write $\df(M)$ for the set of all densities on the manifold $M$. If $M$ and $N$ are manifolds of the same dimension $d$ and $f : M \to N$ is any smooth map, then a density on $N$ can be pulled back along $f$ to a density on $M$, by declaring the volume of an infinitesimal parallelepiped to be the volume of its image in $N$. In this way, we obtain a map $\df(f) : \df(N) \to \df(M)$, making the functoriality equations \eqref{f_functoriality} hold for $\df$ as well. In other words, between manifolds of the same dimension, densities display the same transformation behavior as a physical field. A Lagrangian density $\LD$ now assigns to every field configuration $\phi \in \ff(M)$ on every manifold $M$ a density $\LD(\phi) \in \df(M)$. In other words, the dynamical content of the field is encoded in a \emph{transformation} $\LD : \ff \to \df$, by which we mean a family of maps $(\LD_M)$ having components of the form \[ \LD_M : \ff(M) \to \df(M) \] for all manifolds $M$ of fixed dimension $d$. The standard postulate that the Lagrangian density should be coordinate-independent now translates into the requirement that for every map $f : M \to N$ in the designated class, the diagram \beq \label{LDnatural} \begin{tikzcd} \ff(N) \ar{r}{\LD_N} \ar{d}[swap]{\ff(f)} & \df(N) \ar{d}{\df(f)} \\ \ff(M) \ar{r}{\LD_M} & \df(M) \end{tikzcd} \eeq commutes: applying the transformation first and then evaluating the Lagrangian density must be the same as evaluating the Lagrangian density first and then transforming the resulting density. This amounts to the requirement that the map $f$ is not only a map with respect to which the field under consideration has definite transformation behavior, but that it actually is a \emph{physical symmetry}\footnote{Note that a ``symmetry'' in this sense does not need to be invertible (\Cref{lagrangian_preserving}).} preserving the Lagrangian. It is worth emphasizing that the current references to manifolds is a methodological step towards formulating algebraic structures of fields. In our proposal in \Cref{sec_natural,sec_physics}, it will be clear that we do not posit manifolds in our ontology. In Geroch's approach, the reference to manifolds appears in exactly the same form: it motivates the consideration of commutative rings in general by noting that $C^\infty(M)$ is a commutative ring for every manifold $M$. By putting these pieces together, we propose the following definition of a field. \begin{defn} \label{field_defn} Let $\ST$ be a category of (conceivable) spacetimes of fixed dimension $d$, with maps with respect to which the field in question has definite transformation behavior. Then we identify a field with a pair $(\ff,\LD)$ consisting of the following: \begin{enumerate} \item A \emph{field functor}\footnote{The superscript ``$\mathsf{op}$'' here indicates that the functor is \emph{contravariant}, by which one means that it reverses the order of composition of maps, as indicated in the functoriality equation~\eqref{f_functoriality}.} \[ \ff : \ST^\op \to \Set, \] assigning to every spacetime the set of field configurations on it, and to every map of spacetimes the field's transformation behavior. \item A natural transformation $\LD : \ff \to \df$, meaning a map \[ \LD_M : \ff(M) \to \df(M) \] for every $M \in \ST$ assigning to every field configuration its Lagrangian density, such that the diagram~\eqref{LDnatural} commutes for every map $f$ in $\ST$. \end{enumerate} \end{defn} As we will illustrate in \Cref{spinor_electro1}, this definition can also deal with two or more physical fields at the same time, by considering them jointly as a single field. Note that this definition is schematic, in the sense that we have not specified the technical details of how the category $\ST$ can or should be defined. A more precise prescription to arrive at a canonical choice is discussed as follows. \begin{rem} \label{lagrangian_preserving} As a first example, consider the case where the category $\ST$ only contains Minkowski spacetime as its single object and (active) Lorentz transformations as the morphisms. Then, a physical field according to our definition must have definite transformation behavior with respect to Lorentz transformations, and its Lagrangian density must be Lorentz invariant. \Cref{field_defn} generalizes this to the case where the field may be defined on an entire class of spacetimes, and the allowed transformations no longer need to be invertible, although one may still think of them as physical symmetries. In this way, our definition is more general and expressive than ordinary Lorentz invariance. For a particular physical field such as the electromagnetic field, there may be some ambiguity in how to construct the relevant category $\ST$. But there is a canonical choice given as follows. The collection of all $d$-dimensional manifolds, equipped with all the background fields needed to define the Lagrangian density, forms a category together with \emph{all} the maps with respect to which the given field has any definite transformation behavior at all. Let us denote it $\ST_{\max}$, to indicate that the class of maps is now (informally) the maximal category on which the field functor can be defined. Then in general, the naturality square~\eqref{LDnatural} does not commute, since having definite transformation behavior under a map $f$ does not imply that this transformation preserves the field's Lagrangian density. A physical symmetry $f$, or we could call it a \emph{Lagrangian-preserving map} $f$, is then defined to be a map in $\ST_{\max}$ for which the naturality square~\eqref{LDnatural} \emph{does} commute. It is easy to see that the Lagrangian-preserving maps are also closed under composition and contain all identities. We thus propose to define $\ST$ as the subcategory of Lagrangian-preserving maps. The commutativity of \eqref{LDnatural} on $\ST$ then holds by definition. One of the consequences of this proposal is that a field theory is generally covariant if and only if every map in $\ST_{\max}$ is already Lagrangian-preserving, so that $\ST = \ST_{\max}$. As we will see in the following examples, the Lagrangian-preserving maps are typically, but not always, those which preserve all the ``background fields'' which appear in the Lagrangian, and this concept generalizes the usual notion of physical symmetries to not necessarily invertible maps. \end{rem} \begin{scalar_ex} \label{pure_scalar1} For a real-valued scalar field, the set of field configurations on a manifold $M$ is precisely the set of real-valued smooth functions on $M$, so that $\ff(M) = C^\infty(M)$. This has in principle well-defined transformation behavior with respect to \emph{any} smooth map between manifolds $f : M \to N$. Indeed a scalar field configuration $\phi \in C^\infty(N)$ can be pulled back along a smooth map $f : M \to N$, simply by composing $f$ with $\phi : N \to \R$ to $\phi \circ f : M \to \R$, regardless of whether $M$ and $N$ have the same dimension. So at the purely kinematical level, we could work with the category consisting of all smooth manifolds and smooth maps between them. On this category, our field functor is $\ff = C^\infty$, for which $C^\infty(f) : C^\infty(N) \to C^\infty(M)$ is given by composition with $f$. To take the dynamics into account, let us consider massless\footnote{All of our considerations apply likewise in the presence of a mass term, so the masslessness assumption merely serves to simplify the appearance of our equations.} $\phi^4$ theory as a basic example. Its Lagrangian density transformation is given by $\LD^{\mathrm{scalar}}$ with components \beq \label{Lscalar} \LD^{\mathrm{scalar}}_M(\phi) = \left( \frac{1}{2} g^{\mu \nu} \, (\partial_\mu \phi) \, (\partial_\nu \phi) - \frac{\lambda}{4!} \phi^4 \right) \sqrt{|\det g|}, \eeq where $(g^{\mu\nu})$ is the metric tensor on the spacetime manifold $M$---typically assumed to be of Lorentzian signature---the coupling constant $\lambda$ is an arbitrary (but fixed) parameter of the theory, and $\sqrt{|\det g|}$ is the usual density associated with the metric $g$. So then let us determine the Lagrangian-preserving maps. To begin with, the objects of $\ST_{\max}$ need to be $d$-dimensional \emph{Lorentzian} manifolds which are each equipped with a metric tensor $(g^{\mu\nu})$ of Lorentzian signature (which, as we will explain in \cref{gr1}, could also be construed as a physical field in our setting). Since the transformation behavior of the field is independent of the Lagrangian density, we can still consider the maps in $\ST_{\max}$ to be all smooth maps, regardless of whether they are compatible with the given metrics. Now if $(M,g)$ and $(N,h)$ are arbitrary Lorentzian manifolds and $f : M \to N$ is an arbitrary smooth map, then the commutativity of the naturality diagram~\eqref{LDnatural} becomes the requirement that \begin{align*} \bigg( \frac{1}{2} g^{\alpha\beta} \left[ \frac{\partial \phi}{\partial y^\mu}(f(x)) \frac{\partial f^\mu}{\partial x^\alpha}(x) \right] & \left[ \frac{\partial \phi}{\partial y^\nu}(f(x)) \frac{\partial f^\mu}{\partial x^\beta} (x) \right] - \frac{\lambda}{4!} \phi^4(f(x)) \bigg) \sqrt{|\det g(x)|} \\[4pt] & = \bigg( \frac{1}{2} h^{\mu\nu} \left[ \frac{\partial \phi}{\partial y^\mu} (f(x)) \right] \left[ \frac{\partial \phi}{\partial y^\nu}(f(x)) \right] - \frac{\lambda}{4!} \phi^4(f(x)) \bigg) \sqrt{|\det h(f(x))|} \end{align*} for all $\phi \in C^\infty(N)$ and all $x \in M$. One can check that $f$ is therefore Lagrangian-preserving if and only if it preserves the metric, in the sense that $g = f^*(h)$ with metrics pulling back along $f$ as usual (and as explained in the upcoming \Cref{gr1}). This implies in particular that $f$ must be a local diffeomorphism. So for example when both $(M,g)$ and $(N,h)$ are given by Minkowski spacetime, then the Lagrangian-preserving maps are precisely the Lorentz transformations, since these are well-known to be precisely the special-relativistic physical symmetries of massless $\phi^4$-theory. So to summarize, for massless $\phi^4$ theory in $d$ dimensions, a reasonable choice is to take the category $\ST$ to have $d$-dimensional Lorentzian manifolds as objects and metric-preserving local diffeomorphisms as morphisms, the field functor is $\ff = C^\infty$, and the Lagrangian density transformation is given by~\eqref{Lscalar}, which indeed maps every $\phi \in C^\infty(M)$ to some density $\LD(\phi) \in \df(M)$ for every Lorentzian manifold $(M,g)$ and the naturality condition holds by construction. \end{scalar_ex} \begin{electro_ex} \label{pure_electro1} Consider pure electrodynamics as the second example. Then one can use either of the four standard formulations of the electromagnetic field outlined at the beginning of this section in order to define the field configurations on any manifold $M$, and thereby the field functor $\ff$. As long as one includes only contractible manifolds in $\ST$, then these formulations result in isomorphic field functors, which shows that these formulations are equivalent (at least on topologically trivial manifolds). It is in this sense that the notion of field functor is more general than those standard formulations, and does not require us to choose between them. For the sake of concreteness, we take the field configurations to correspond to the differential $1$-forms, and suppose that we ignore gauge equivalence for the moment. Then we have \[ \ff(M) \, = \, \Omega^1(M). \] If $M$ and $N$ are manifolds and $f : M \to N$ is any smooth map, then any $1$-form $A$ on $N$, representing a configuration of the electromagnetic field on $N$, can be pulled back along $f$ to a $1$-form $f^*(A)$ on $M$, representing a configuration of the electromagnetic field on $M$. This specifies the transformation behavior of the electromagnetic potential, or in other words the action of the field functor $\ff$ on morphisms. In pure electrodynamics, the usual Lagrangian density on a spacetime manifold $(M,g)$ is given by \beq \label{Lem} \LD^{\mathrm{em}}_M(A) = - \frac{1}{4} g^{\alpha\mu} g^{\beta\nu} F_{\alpha\beta} F_{\mu\nu} \sqrt{|\det g|} \qquad\quad (\textrm{with } F_{\mu\nu} = \partial_\mu A_\nu - \partial_\nu A_\mu), \eeq which is more commonly written as $-\frac{1}{4} F_{\alpha\beta} F^{\alpha\beta} \sqrt{|\det g|}$ or in terms of differential form notation and the Hodge star operator simply as\footnote{However, it should be noted that the expression $-\frac{1}{4} F \wedge \star F$ is not entirely equivalent to \eqref{Lem}, since it requires an identification of densities with volume forms via an orientation, which is assumed in most standard treatments of Lagrangian field theory but requires one to be working with oriented Lorentzian manifolds instead of mere Lorentzian manifolds.} $-\frac{1}{4} F \wedge \star F$. In our \eqref{Lem}, we have written out the raising of the indices via the metric in order to make the dependence on the metric completely explicit. It follows that, just as in \Cref{pure_scalar1}, the objects of our category should again be $d$-dimensional Lorentzian manifolds, and we can consider $\ST_{\max}$ to contain all smooth maps between these, since differential $1$-forms then have definite transformation behavior. The Lagrangian-preserving maps can now be determined either by a messy coordinate calculation, or alternatively by a more abstract argument along the following lines. Up to the constant factor of $-\frac{1}{4}$, the Lagrangian density~\eqref{Lem} is given by the scalar-function-valued inner product of the field strength tensor $F = dA$ with itself times $\sqrt{|\det g|}$, where the inner product on $2$-forms is the one induced from the inner product of vectors. Since the exterior derivative commutes with pullback $f^*$ of differential forms, it follows that a smooth map $f : M \to N$ between Lorentzian manifolds $(M,g)$ and $(N,h)$ is Lagrangian-preserving if and only if the equation \[ \langle f^*(dA), f^*(dA) \rangle_M(x) \, \sqrt{|\det g(x)|} \, = \, \langle dA, dA \rangle_N(x) \, \sqrt{|\det h(f(x))|} \] holds for all $A \in \Omega^1(N)$ and $x \in M$. In $d = 4$ spacetime dimensions, it can then be shown that $f$ is Lagrangian-preserving if and only if it is \emph{conformal}, which means that there exists a scalar function $c \in C^\infty(M)$ such that $f^*(h) = c \hspace{1pt} g$. This recovers the well-known conformal invariance of electrodynamics~\citep{CO}. Thus one sensible choice for the category $\ST$ would have four-dimensional Lorentzian manifolds as objects and \emph{conformal} maps between these as morphisms, where the field functor is the functor of differential $1$-forms $\Omega^1$. The Lagrangian density \eqref{Lem} specifies a natural transformation $\LD^{\mathrm{em}} : \Omega^1 \to \df$, and therefore defines the electromagnetic field in the setting of \Cref{field_defn}, so far without gauge equivalence. To take gauge equivalence into account, we need to consider equivalent any two field configurations $A \in \Omega^1(M)$ and $A' \in \Omega^1(M)$ for which there is a scalar function $\lambda \in \Omega^0(M)$ such that \[ A' = A + d\lambda. \] In other words, the set of \emph{physical} field configurations is then given by the quotient vector space \[ \ff(M) \, = \, \Omega^1(M) / d \Omega^0(M), \] where $d \Omega^0(M)$ denotes the vector space of all $1$-forms which are differentials of scalar functions on $M$. The transformation behavior $\ff(f) : \ff(N) \to \ff(M)$ is still the same as above, meaning that an equivalence class $[A] \in \ff(N)$ represented by some $A \in \Omega^1(N)$ gets mapped to the equivalence class $[f^*(A)] \in \ff(M)$, which is well-defined for any smooth map $f$ since the exterior derivative $d$ and the pullback of differential forms $f^*$ commute, $f^*(d\lambda) = df^*(\lambda)$. Since the Lagrangian density~\eqref{Lem} is gauge invariant, it still defines a transformation $\LD : \ff \to \df$ which is natural precisely with respect to the conformal maps (assuming four spacetime dimensions). Note that taking gauge invariance into account only modifies the field functor, while $\ST$ and the Lagrangian density transformation remain unchanged. \end{electro_ex} \begin{gr_ex} \label{gr1} For general relativity in $d$ spacetime dimensions, one may again consider all $d$-dimensional manifolds as the a priori conceivable spacetimes making up the objects of the category $\ST$. Now we want to consider a metric of Lorentzian signature together with the Einstein-Hilbert Lagrangian as our physical field. Therefore $\ff(M)$ should be the set of all Lorentzian metrics on any given $d$-dimensional manifold $M$.\footnote{Note that there are manifolds $M$ which do not admit any Lorentzian metric, in which case $\ff(M)$ is the empty set.} The metric tensor can be pulled back under local diffeomorphisms, but not under general smooth maps (due to the non-degeneracy requirement\footnote{Alternatively, one could consider a modification of general relativity which allows for the metric to be degenerate, and perhaps even of arbitrary signature. Indeed it has been argued that allowing degeneracies is even preferable over the standard formulation by allowing the possibility to include singularities in spacetime \citep{stoica}. In this case, the metric would have well-defined transformation behavior with respect to all smooth maps, which is what had happened also in the previous two examples.}). It is thus natural to include only local diffeomorphisms as the morphisms in $\ST$. Like this, we obtain a field functor $\ff : \ST^\op \to \Set$ in a similar way as before. The Lagrangian density is the one corresponding to the Einstein-Hilbert action as usual, \[ \LD^{\mathrm{GR}}_M = (R - 2 \Lambda) \sqrt{|\det g|}, \] where $R$ is the Ricci curvature scalar (depending on $g$) and $\Lambda$ the cosmological constant. Note that in this case, the distinction between general maps with respect to which the field transforms and the more specific Lagrangian-preserving maps is not needed, since the Lagrangian preservation is automatic. This property captures the general covariance of general relativity. \end{gr_ex} \begin{spinor_ex} \label{pure_spinor1} Let us consider the field theory of a (necessarily massless) Weyl spinor in four spacetime dimensions. This means that the conceivable spacetimes are the four-dimensional Lorentzian manifolds $(M,g)$, where now the metric already enters into the definition of the set of field configurations, through the construction of the Clifford bundle associated to $M$ via the metric $g$ and its associated spinor bundles~\citep{LM}. Strictly speaking, a spinor field configuration consists of a spin structure \emph{plus} a section of the corresponding spinor bundle. In this case, finding the maximal class of maps with respect to which the field has definite transformation behavior is a surprisingly subtle problem, where contradictory statements have coexisted in the literature for decades~\citep{pitts}. Hence the general methodology of restricting to the Lagrangian-preserving maps (\Cref{lagrangian_preserving}) encounters limitations. Nevertheless, it is clear that defining $\ST$ to consist of Lorentzian manifolds together with metric-preserving maps is a reasonable choice, and makes the Weyl Lagrangian density \[ \LD^{\mathrm{Weyl}}_M(\psi) := i \overline{\psi} D \psi, \] where $D := \sigma^\mu \partial_\mu$ is the Dirac operator on the spinor bundle on which $\psi$ is defined, into a natural transformation. Note that we suppress the spin structure as part of the specification of the field configuration, although it technically also needs to be treated as part of it. \end{spinor_ex} When considering several physical fields at the same time, we can either deal with a corresponding number of field functors at once, or consider them jointly as a single field functor as follows. \begin{spinor_electro_ex} \label{spinor_electro1} Combining the electrodynamics and Weyl spinor examples, let us consider \emph{Weyl spinor electrodynamics}, which contains both of those fields coupled together. We thus have two field functors, where $\ST$ again consists of Lorentzian manifolds and smooth maps between them, given by $\ff_1 = \Omega^1$ and $\ff_2$ the Weyl spinor field functor, with their separate Lagrangian densities. We now explain how these two fields can be jointly regarded as a \emph{single} field, in the sense of \Cref{field_defn}, while taking gauge equivalence into account. To begin, recall that a gauge transformation for these fields on a spacetime manifold $M$ is determined by some real-valued scalar function $\lambda \in C^\infty(M)$. Denoting the electromagnetic field by $A$ and the spinor field by $\psi$, the transformation is \[ A' := A + d\lambda, \qquad \psi' := e^{i\lambda} \psi. \] This suggests that these two fields should actually be considered as separate components or aspects of a single field, with sets of field configurations given by \beq \label{gauge_joint} \ff(M) \, := \, \left[ \ff_1(M) \times \ff_2(M) \right] \,/\, \left[ \textrm{modulo gauge equivalence} \right]. \eeq This definition indeed has well-defined transformation behavior under every map $f : M \to N$ in $\ST$, since this holds for both components fields and these transformations respect gauge equivalence. Therefore $\ff$ is indeed a field functor describing the kinematics of both fields jointly in a unified way. The Lagrangian $\LD^{\mathrm{tot}} : \ff \to \df$ is then the sum of the individual Lagrangians, where the Dirac operator acting on the Weyl spinor needs to be gauged as usual in order to achieve gauge invariance. Formally, on every Lorentzian manifold $(M,g)$ we have \[ \LD^{\mathrm{tot}}_M(A,\psi) := \left( - \frac{1}{4} g^{\alpha\mu} g^{\beta\nu} F_{\alpha\beta} F_{\mu\nu} + i \overline{\psi} D_{\mathrm{\scriptscriptstyle{gauged}}} \psi \right) \sqrt{|\det g|}, \] where the Dirac operator now takes the form \[ D_{\mathrm{\scriptscriptstyle{gauged}}} := \sigma^\mu \left( \partial_\mu - i A_\mu \right), \] and the gauge invariance is a standard computation. Due to this gauge invariance, we indeed obtain a map $\LD^{\mathrm{tot}}_M : \ff(M) \to \df(M)$ as desired, and the naturality~\eqref{LDnatural} holds for all metric-preserving maps. \end{spinor_electro_ex} Finally, we shall remark that our definition of fields does not axiomatize all properties which are typically satisfied by physical fields (and doing so is not relevant for our purposes). In particular, it does not account for the strong kind of \emph{locality} often displayed by those field functors which describe physical fields, where a field configuration can be ``pieced together'' from a family of configurations on local patches. We refer to the notion of \emph{bundle functor} for a stronger definition which incorporates such locality properties more stringently~\citep[Definition~14.1]{KMS}, and note that imposing suitable \emph{sheaf conditions} on the field functor would have a similar effect, although care must be taken with the treatment of gauge invariance. \section{Algebraic structure from natural operations} \label{sec_natural} We now turn to question \ref{which_algebraic2}, which algebraic structures can be defined on a physical field formulated manifold-theoretically? In light of the previous section, the question becomes this: which algebraic structure does a field in the sense of \Cref{field_defn} carry? More precisely: what is the richest algebraic structure that can be defined on the field configurations in a way which respects the symmetries? The following technical developments will address this question, considering algebraic operations of finite arity.\footnote{A technically distinct but closely related answer could be given based on the \emph{codensity monads} of category theory~\citep{leinster}, in which operations of infinite arity are allowed. See \href{https://golem.ph.utexas.edu/category/2020/01/codensity_monads.html\#c057683}{https://golem.ph.utexas.edu/category/2020/01/codensity\_monads.html\#c057683} for some discussion on the scalar field case.} Our goal in \Cref{sec_physics} will then be to reaxiomatize a field (or multiple fields) as an algebraic structure of that type, no longer referring to any spacetime manifold. \subsection{Natural operations} Algebraic structures are defined in terms of \emph{algebraic operations}, which are ways of combining elements of a set such as to obtain another element. In our context, one can add or multiply two scalar-valued functions on a manifold so as to obtain a third; one can add two differential $1$-forms so as to obtain a third; or in a multi-sorted setting where both of these structures appear, one can take the derivative of a scalar-valued function so as to obtain a differential $1$-form. The characteristic feature of these type of operations is that they are coordinate-independent.\footnote{Note that a coordinate-independent construction may still invoke coordinates, as long as its result is independent of the particular choice.} In the previous section, we have generalized the notion of coordinate independence to that of definite transformation behavior under a specified class of maps, which typically includes local diffeomorphisms. We consider it more elegant to work in this setting. For example, for the addition of scalar-valued functions, the fact that it has the relevant invariance properties then amounts to the fact that for every smooth map $f : M \to N$ between manifolds, the diagram \[ \begin{tikzcd} C^\infty(N) \times C^\infty(N) \ar{r}{+} \ar[swap]{d}{C^\infty(f) \times C^\infty(f)} & C^\infty(N) \ar{d}{C^\infty(f)} \\ C^\infty(M) \times C^\infty(M) \ar{r}{+} & C^\infty(M) \end{tikzcd} \] commutes: if we add to smooth functions on $N$ and then pull the result back to $M$, that gives the same function as first pulling them back individually. It is clear that this specializes to ordinary diffeomorphism covariance in the case where $f : M \to N$ is a diffeomorphism. The general theory behind this type of operation is that of \emph{natural operations} of differential geometry~\citep{KMS}. We next state a simplified variant of the definition used in~\citep{KMS}. For $n \in \N$ and a field functor $\ff : \ST^\op \to \Set$, we can consider the field functor $\ff^{\times n} : \ST^\op \to \Set$ which associates to every manifold $M$ the $n$-fold Cartesian product set \[ \ff(M) \times \cdots \times \ff(M), \] where the operation of pulling back tuples is defined componentwise. For example, the $n$-fold product of the real scalar field functor $M \mapsto C^\infty(M)$ is isomorphic to the functor which assigns to every manifold $M$ the set of $n$-tuples of smooth functions $M \to \R$, or equivalently the set of smooth functions $M \to \R^n$. \begin{defn} Let $\ff : \ST^\op \to \Set$ be a field functor and $n \in \N$. A \emph{natural operation} of arity $n$ on $\ff$ is a natural transformation $\ff^{\times n} \to \ff$. \end{defn} More explicitly, a natural operation $\Phi$ thus consists of maps \[ \Phi_M \: : \: \underbrace{\ff(M) \times \cdots \times \ff(M)}_{n \textrm{ times}} \longrightarrow \ff(M) \] defined for every manifold $M \in \ST$, such that the diagram \beq \label{naturality} \begin{tikzcd} \ff(N) \times \cdots \times \ff(N) \ar{r}{\Phi_N} \ar[swap]{d}{\ff(f)^{\times n}} & \ff(N) \ar{d}{\ff(f)} \\ \ff(M) \times \cdots \times \ff(M) \ar{r}{\Phi_M} & \ff(M) \end{tikzcd} \eeq commutes for every morphism $f : M \to N$ with respect to which the field has definite transformation behavior. The natural operations have been classified completely for some manifold-theoretic structures, a fact that one can try to exploit in order to give more concrete descriptions of the algebraic structures that will arise as field algebra. To illustrate the notion mathematically, let us temporarily (only in the following example) relax the requirement in \Cref{field_defn} that the spacetime dimension is fixed and focus just on the kinematic aspect of a scalar field. \begin{scalar_fun_ex} \label{scalar_fun1} Let $\Mfd$ be the category of manifolds of \emph{all} dimensions, and $C^\infty : \Mfd^\op \to \Set$ the functor which assigns to every manifold the set of real-valued scalar functions on it. This example is illustrative since the natural operations on $C^\infty$ can be completely classified. We claim that there is a canonical bijection between the natural operations of arity $n$ and the set $C^\infty(\R^n)$, the smooth functions on Euclidean space $\R^n$. This will be obvious and known to readers who have encountered natural operations before, but we nevertheless present the argument here. Indeed in one direction, any $s \in C^\infty(\R^n)$ defines a natural operation given by \beq \label{Cinfty_natural} C^\infty(M) \times \cdots \times C^\infty(M) \longrightarrow C^\infty(M), \qquad (\phi_1,\ldots,\phi_n) \longmapsto s \circ (\phi_1,\ldots,\phi_n). \eeq In words, this simply means that we obtain a new smooth function from given smooth functions $\phi_1,\ldots,\phi_n$ by plugging in their values into the $n$-variable smooth function $s$. It is straightforward to see that this makes the relevant diagram~\Cref{naturality} commute. In the other direction, suppose that we are given a natural operation $\Phi$ for $C^\infty$. Then we can in particular consider its component at the manifold $M = \R^n$ and apply it to the $n$-tuple of functions given by the $n$ coordinate projections $p_1,\ldots,p_n : \R^n \to \R$, which results in the desired smooth function $\Phi_{\R^n}(p_1,\ldots,p_n) \in C^\infty(\R^n)$. It remains to be shown that these two constructions are inverses of each other, for which we sketch the argument in the following paragraph. If we start with the smooth function $s$ and construct the associated natural operation, then it is clear that applying it to $p_1,\ldots,p_n$ recovers exactly $s$. Conversely if $\Phi$ is any natural operation, we now show that each one of its components is given exactly by composition with the function $\Phi_{\R^n}(p_1,\ldots,p_n)$. This somewhat surprising fact essentially follows from the \emph{Yoneda lemma} of category theory.\footnote{For any manifold $M$, we can consider given functions $\phi_1,\ldots,\phi_n \in C^\infty(M)$ as the $n$ components of a smooth map $\phi : M \to \R^n$, so that $\phi_i = p_i \circ \phi$. Instantiating the naturality diagram~\Cref{naturality} on $f = \phi$ then gives the commutative diagram \[ \begin{tikzcd}[ampersand replacement=\&] C^\infty(\R^n) \times \cdots \times C^\infty(\R^n) \ar{r}{\Phi_{\R^n}} \ar{d}{C^\infty(\phi)^{\times n}} \& C^\infty(\R^n) \ar{d}{C^\infty(\phi)} \\ C^\infty(M) \times \cdots \times C^\infty(M) \ar{r}{\Phi_M} \& C^\infty(M) \end{tikzcd} \] Starting with the $n$-tuple $(p_1,\ldots,p_n)$ in the upper left gives $(\phi_1,\ldots,\phi_n)$ in the lower left, and then $\Phi_M(\phi_1,\ldots,\phi_n)$ in the lower right. Going the other way results in $\Phi_{\R^n}(p_1,\ldots,p_n)$ in the upper right and then $\Phi_{\R^n}(p_1,\ldots,p_n) \circ \phi$ in the lower right. The commutativity of the diagram thus proves the desired equality \[ \Phi_M(\phi_1,\ldots,\phi_n) = \Phi_{\R^n}(p_1,\ldots,p_n) \circ (\phi_1,\ldots,\phi_n), \] since $\phi$ is exactly equal to its list of components $(\phi_1,\ldots,\phi_n)$.} \end{scalar_fun_ex} \begin{scalar_ex} \label{pure_scalar2} Consider massless scalar $\phi^4$-theory in $d$ dimensions as introduced before in \Cref{pure_scalar1}. To recall, $\ST$ consists of all $d$-dimensional Lorentzian manifolds, with the designated maps between $(M,g)$ and $(N,h)$ being precisely those smooth maps $f : M \to N$ with $g = f^*(h)$, which are necessarily local diffeomorphisms. It is obvious that all the operations of the form~\eqref{Cinfty_natural} are still natural operations in the present setting. But there are also a number of additional natural operations relative to those of \Cref{scalar_fun1}, and we do not know how to determine them all. For example, applying the d'Alembertian to a scalar function gives a natural operation of arity one, \begin{align} \begin{split} \label{scalar_dalembertian} C^\infty & \longrightarrow C^\infty \\ \phi & \longmapsto \Box \hspace{1pt} \phi := g^{\mu\nu} \, \partial_\mu \partial_\nu \phi, \end{split} \end{align} and there is a related natural operation of arity two corresponding to the kinetic term in the Lagrangian,\footnote{Perhaps in contrast to what our notation $\langle d-,d-\rangle$ suggests, this is a primitive operation in this context not built out of separate operations $d$ and $\langle -,- \rangle$.} \begin{align} \begin{split} \label{1form_scalar_product} C^\infty \times C^\infty & \longrightarrow C^\infty \\ (\phi,\psi) & \longmapsto \langle d \phi, d\psi \rangle := g^{\mu\nu} \, (\partial_\mu \phi) \, (\partial_\nu \psi). \end{split} \end{align} Furthermore, the curvature scalar $R$ defines a natural operation of arity zero, since it produces a coordinate-independent scalar function from no arguments, and likewise for other scalar curvature invariants~\citep{CBCR}. Thus there now is a substantial number of natural operations which encode geometric information about the manifolds under consideration. Moreover, another new feature over the case of \Cref{scalar_fun1} is that the set of natural operations now depends on the spacetime dimension $d$, since for example the curvature scalar is distinct from the zero natural operation only for $d \ge 2$. We are not aware of any (even conjectural) description of \emph{all} natural operations in this context, neither for any fixed dimension $d \ge 2$ nor in the ``stable'' range $d \gg 1$~\citep{markl}. \end{scalar_ex} \newcommand{\tinyspace}{\hspace{0.7pt}} \begin{electro_ex} \label{pure_electro2} Continuing on from \Cref{pure_electro1}, consider first the natural operations on the field functor $\ff = \Omega^1$, corresponding to electrodynamics without taking gauge equivalence into account. Then for any coefficients $c_1,\ldots,c_n$, we obtain a natural operation of arity $n$, given by taking the corresponding linear combination of differential $1$-forms, \[ (\alpha_1,\ldots,\alpha_n) \longmapsto \sum_{i=1}^n c_i \alpha_i. \] In fact, it is known that these are all the natural operations on $\Omega^1$ when considered as a functor $\Mfd^\op \to \Set$ defined on all manifolds and all smooth maps between them~\citep{NS}, in the style of \Cref{scalar_fun1}. Now in $d = 4$ spacetime dimensions, we have seen that the natural choice for $\ST$ contains all the conformal maps as morphisms. With this choice, we have not been able to find any additional natural operations besides the above linear combination operations either.\footnote{As we will see in \Cref{spinor_electro2}, we would obtain a large number of further natural operations if we restricted to metric-preserving maps, and it is possible that some of them can be combined in a way which results in the stronger property of conformal invariance, although we have not found any way of doing so.} Upon taking gauge equivalence into account, the field functor becomes $\ff = \Omega^1 / d \Omega^0$. Again, taking linear combinations defines natural operations, and we have not been able to find any other ones. \end{electro_ex} \begin{spinor_ex} \label{pure_spinor2} Consider the theory of a Weyl spinor in four spacetime dimensions from \Cref{pure_spinor1}. It is obvious that taking linear combinations of spinors again results in a family of natural operations of all arities, where now arbitrary complex coefficients are allowed. We also have the application of the Dirac operator, which is a natural operation of arity one, \[ \psi \longmapsto D \psi, \] as well as a ternary natural operation given by forming the inner product of a spinor with an adjoint spinor, and acting by the resulting scalar on a third spinor, \beq \label{spinor_ip} (\psi, \phi, \chi) \longmapsto (\overline{\psi} \phi) \tinyspace \chi. \eeq A substantial number of additional operations natural with respect to metric-preserving maps arise and are of a similar flavor. For example, the facts that a bilinear construction like $\overline{\psi} \sigma^\mu \phi$ defines a vector field, the inner product of two vector fields is a scalar function, and a scalar function can act on spinors by multiplication shows that there is a natural operation of arity five given by \beq \label{fierz1} (\psi_1, \phi_1, \psi_2, \phi_2, \chi) \longmapsto (\overline{\psi}_1 \sigma^\mu \phi_1) \tinyspace (\overline{\psi}_2 \sigma_\mu \phi_2) \tinyspace \chi, \eeq and similarly \beq \label{fierz2} (\psi_1, \phi_1, \psi_2, \phi_2, \chi) \longmapsto (\overline{\psi}_1 \sigma^\mu \sigma^\nu \phi_1) \tinyspace (\overline{\psi}_2 \sigma_\mu \sigma_\nu \phi_2) \tinyspace \chi. \eeq The natural operations of the last three types are related by certain equations known as \emph{Fierz identities}~\citep{nishi}. There are other ternary operations which now involve differentiation, such as the two given by \begin{align} \begin{split} \label{spinor_more_ternary} (\psi, \phi, \chi) & \longmapsto (\overline{\psi} \sigma^\mu \phi) \tinyspace \partial_\mu \chi, \\ (\psi, \phi, \chi) & \longmapsto (\partial^\mu \overline{\psi}) \tinyspace (\partial_\mu \phi) \tinyspace \chi. \end{split} \end{align} To our knowledge, a complete classification of natural operations again remains to be found. \end{spinor_ex} In situations where several fields play a role at the same time, one can consider natural operations of mixed arity, by which we mean e.g.~transformations with components of the form \[ \Phi_M : \ff_2(M) \times \ff_1(M) \longrightarrow \ff_1(M), \] satisfying the two-sorted or more generally multi-sorted analogue of \eqref{naturality}. These arise in particular in the following example. \begin{spinor_electro_ex} \label{spinor_electro2} Consider now Weyl spinor electrodynamics as in \Cref{spinor_electro1}, with $\ST$ the category of Lorentzian manifolds and metric-preserving maps. Again, first consider the case without gauge invariance. Since the maps are restricted further (relative to \Cref{pure_electro2}) from conformal to metric-preserving, we already obtain a substantial number of additional natural operations on the electromagnetic field functor $\Omega^1$ alone. These are defined in terms of the metric and encode geometric information. Among them are the two unary operations given by \begin{align} \begin{split} \label{ddeltad} \Omega^1 & \longrightarrow \Omega^1, \\ A & \longmapsto \delta \tinyspace d A, \\ A & \longmapsto d \tinyspace \delta A, \end{split} \end{align} where $\delta := -\star d \star$ is the \emph{codifferential}\footnote{Corresponding to the \emph{divergence} of vector calculus~\citep[Example~4.1.45]{nicolaescu}. Note that, since the Hodge star operator appears twice in it, the codifferential does not depend on an orientation and can likewise be defined on non-orientable manifolds.}. Applying the d'Alembertian is a natural operation given by the sum of these two, \beq A \longmapsto \Box A = (d \tinyspace \delta + \delta \tinyspace d) A. \eeq There is also a binary operation given by \begin{align} \begin{split} \label{div_act} \Omega^1 \times \Omega^1 & \longrightarrow \Omega^1 \\ (A,B) & \longmapsto \left( \delta A \right) \tinyspace B \end{split} \end{align} taking $A$ to a real-valued scalar function $\delta A$, which then acts on $B$ by scalar multiplication. There is a binary operation given by converting two given differential $1$-forms into vector fields via the metric, computing their Lie bracket, and then turning the resulting vector field back into a differential $1$-form. Furthermore, we have the ternary operation given by, \begin{align} \begin{split} \label{Omega1sp1} \Omega^1 \times \Omega^1 \times \Omega^1 & \longrightarrow \Omega^1 \\ (A,B,C) & \longmapsto ( g^{\mu\nu} A_\mu B_\nu ) \, C_\alpha, \end{split} \end{align} which forms the scalar function given by the inner product of $A$ and $B$ and makes it act by scalar multiplication on $C$. There is a similar ternary operation involving the exterior derivatives of $A$ and $B$, given by \begin{align} \begin{split} \label{Omega1sp2} \Omega^1 \times \Omega^1 \times \Omega^1 & \longrightarrow \Omega^1 \\ (A,B,C) & \longmapsto g^{\beta\mu} g^{\gamma\nu} (\partial_\beta A_\gamma - \partial_\gamma A_\beta) (\partial_\mu B_\nu - \partial_\nu B_\mu) \, C_\alpha \end{split} \end{align} Note that some of these operations are nonzero only for spacetime dimension $d \ge 2$. Concerning mixed natural operations that combine spinors and differential $1$-forms, we can for example combine two spinors into a vector field, and use the metric to turn the result into a differential $1$-form, \beq \label{mixed_op1} (\psi, \phi) \longmapsto g_{\alpha\beta} \tinyspace ( \overline{\psi} \sigma^\beta \phi ). \eeq We also have a natural operation taking a spinor and a differential $1$-form, combining the two as follows to a new spinor, \beq \label{mixed_op2} (\psi, A) \longmapsto \sigma^\mu A_\mu \psi. \eeq Taking a suitable linear combination of this natural operation with the Dirac operator results in the gauged Dirac operator, which is itself a natural operation taking a spinor and a differential $1$-form and producing a new spinor, \beq \label{gauged_dirac} (\psi, A) \longmapsto \sigma^\mu (\partial_\mu - i A_\mu) \psi. \eeq As in many other cases, obtaining an understanding---even a conjectural one---of all natural operations seems to be a daring endeavor. We refrain from speculating on whether the above natural operations are sufficient to generate all other ones. Upon taking gauge invariance into account, our framework forces us to describe both fields together via a single field functor as in~\Cref{gauge_joint}. This changes the natural operations drastically. For example, we can no longer add two field configurations represented by $(A, \psi)$ and $(B, \phi)$, since the gauge equivalence class of the result $(A + B, \psi + \phi)$ depends on the choice of representatives. But we \emph{can} add the first two components if we replace the spinor component by the zero spinor, \[ \left( (A, \psi), (B, \phi) \right) \longmapsto (A + B, 0), \] since the gauge equivalence class of the result now only depends on the gauge equivalence classes of the pairs $(A,\psi)$ and $(B,\phi)$. Of course, we similarly also have multiplication by any fixed real number in the spinor component as a natural operation. Among the other natural operations that survive gauging is a unary operation given by applying the gauged Dirac operator to the spinor component, \[ (A, \tinyspace \psi) \longmapsto (A, \tinyspace \sigma^\mu (\partial_\mu - i A_\mu) \psi). \] Another one is the binary operation given by \[ \left( (A, \psi), (B, \phi) \right) \longmapsto \left( B, (\overline{\psi} \psi) \tinyspace \phi \right), \] which roughly corresponds to~\eqref{spinor_ip} from the pure spinor case, and the gauge invariance is easily verified. There is a similar analogue of~\eqref{fierz1}, given by the ternary operation \[ \left( (A, \psi), (B, \phi), (C, \chi) \right) \longmapsto \left( C, (\overline{\psi} \sigma^\mu \psi) \tinyspace (\overline{\phi} \sigma_\mu \phi) \tinyspace \chi \right), \] and similarly for~\eqref{fierz2}, which we do not spell out explicitly. All of the natural operations given arise from the ungauged case by noting that they are gauge invariant. It is possible that there are additional natural operations in this context which do not arise like this, but we have not yet found any. \end{spinor_electro_ex} Let us now return to our general question \ref{which_algebraic2} on the algebraic structure carried by a physical field. Our claim now is that we obtain a good candidate description of this algebraic structure by considering all the natural operations carried by the field functor $\ff : \ST^\op \to \Set$ and interpreting them as algebraic operations. To explain what this means, we first note that there is a general class of natural operations which are of relevance to the theory itself, and which we have intentionally left out of the discussion of the examples since they are rather general and only of formal abstract interest. Namely for every $i=1,\ldots,n$, there is a distinguished natural operation which associates to every $n$-tuple of field configurations $(\phi_1,\ldots,\phi_n) \in \ff(M)^{\times n}$ its $i$-th component $\phi_i$. We denote this distinguished natural operation by $\pi_i$, and its component at $M$ by $\pi_{i,M}$. \newcommand{\FieldLawvere}[2]{\mathrm{Nat}_{#1}({#2})} So let us denote the set of natural operations of arity $n$ on $\ff$ by $\FieldLawvere{n}{\ff}$. We now explain how this set itself carries an algebraic structure.\footnote{This algebraic structure is known as a \emph{Lawvere theory}~\citep{hyland_power}.} The idea is that natural operations can be composed: if $\Phi \in \FieldLawvere{n}{F}$ and we have arities $k_i$ and natural operations $\Psi_i \in \FieldLawvere{k_i}{F}$ for $i=1,\ldots,n$, then for every manifold $M \in \ST$ we can form the composite map \[ \begin{tikzcd} \ff(M)^{\sum_{i=1}^n k_i} \ar{rr}{\left(\Psi_1,\ldots,\Psi_n\right)} && \ff(M)^n \ar{rr}{\Phi} && \ff(M). \end{tikzcd} \] This defines a new natural operation of arity $\sum_{i=1}^n k_i$. We denote it by $\Phi \circ (\Psi_1,\ldots,\Psi_n)$. We now explain how natural operations equip, for every $M \in \ST$, the set of field configurations $\ff(M)$ with algebraic structure. By definition, every $n$-ary natural operation $\Phi \in \FieldLawvere{n}{\ff}$ implements a map \[ \begin{tikzcd} \ff(M)^{\times n} \ar{rr}{\Phi_M} && \ff(M). \end{tikzcd} \] The idea now is to consider this map as an algebraic operation on $\ff(M)$ of arity $n$. Moreover, this algebraic structure is such that it respects the composition $\Phi \circ (\Psi_1,\ldots,\Psi_n)$ from the previous paragraph---this holds by definition of the latter. Moreover, the way that the above distinguished natural operation $\pi_i$ acts for $i=1,\ldots,n$ is simply as an actual projection, \[ \begin{tikzcd} \pi_{i,M} \: : \: \ff(M)^{\times n} \longrightarrow \ff(M), \qquad (\phi_1,\ldots,\phi_n) \longmapsto \phi_i. \end{tikzcd} \] Armed with these preparations, we can now axiomatize these operations as an algebraic structure, which will constitute our answer to the question~\ref{which_algebraic2} on the algebraic structure carried by a physical field. \begin{defn} \label{Falgebra} Let $\ff : \ST^\op \to \Set$ be a field functor. An \emph{$\ff$-algebra} $\fa$ is a set together with a map \[ a_\Phi \: : \: \fa^{\times n} \longrightarrow \fa \] for every $n$-ary natural operation $\Phi \in \FieldLawvere{n}{\ff}$, such that the following conditions hold: \begin{enumerate}[label=(\roman*)] \item Compatibility with composition of operations: for every $\Psi_i \in \FieldLawvere{k_i}{\ff}$, \[ a_{\Phi \circ (\Psi_1,\ldots,\Psi_n)} = a_\Phi \circ (a_{\Psi_1}, \ldots, a_{\Psi_n}). \] \item Preservation of projections: for every $i=1,\ldots,n$ and $x_1,\ldots,x_n \in \fa$, \[ a_{\pi_i}(x_1,\ldots,x_n) = x_i. \] \end{enumerate} \end{defn} The first equation means more explicitly that for every family of elements $(x_i^j)_{i=1,\ldots,n}^{j=1,\ldots,k_i}$ in $\fa$, we must have \begin{align*} a_{\Phi \circ (\Psi_1, \ldots, \Psi_n)} & (x_1^1, \ldots, x_1^{k_1}, \ldots, x_n^1, \ldots, x_n^{k_n}) \\ & = a_\Phi \left( a_{\Psi_1}(x_1^1, \ldots, x_1^{k_1}), \ldots, a_{\Psi_n}(x_n^1, \ldots, x_n^{k_n}) \right), \end{align*} or in words: $a_{\Phi \circ (\Psi_1, \ldots, \Psi_n)}$, which describes the action of the composite operation $\Phi \circ (\Psi_1, \ldots, \Psi_n)$, must indeed act as the composite of the operation $a_\Phi$ with the $a_{\Psi_i}$. By the discussion above, the set of field configurations $\ff(M)$ for any manifold $M \in \ST$ is an $\ff$-algebra in a canonical way. Moreover, the definition of $\ff$-algebra in terms of natural operations guarantees that this is the richest algebraic structure that can be defined on every $\ff(M)$ in a way that respects the symmetries of the field. Therefore $\ff$-algebras are our answer to question~\ref{which_algebraic2}. We now spell out the definition of $\ff$-algebra more explicitly for the particular types of fields considered previously. Finding a concrete description of $\ff$-algebras in general can be challenging, depending on what field is being considered, since the natural operations are often tricky to classify. Despite such challenges, these more concrete descriptions will be our starting point in \Cref{sec_physics} for the consideration of the physics of these fields in the absence of a spacetime manifold. \begin{scalar_fun_ex} If we apply \Cref{Falgebra} to \Cref{scalar_fun1}, then we obtain precisely the definition of $C^\infty$-ring \citep{MR}, with the $n$-ary operations given by the smooth functions $\R^n \to \R$, or equivalently smooth functions of $n$ variables. \end{scalar_fun_ex} \begin{scalar_ex} \label{pure_scalar3} For massless $\phi^4$-theory, we have the rich collection of natural operations partially described in \Cref{pure_scalar2}. Since these natural operations include those of the form~\eqref{Cinfty_natural}, it follows that every $\ff$-algebra is in particular a $C^\infty$-ring. The additional natural operations which involve the metric now result in a much richer algebraic structure which encodes geometric information on top of the $C^\infty$-ring structure. We thus call $\ff$-algebras of this type \emph{metric $C^\infty$-rings}. As per \Cref{pure_scalar2}, a metric $C^\infty$-ring $\fa$ in particular comes equipped with a commutative binary operation\footnote{Note that, perhaps in contrast to what this notation suggests, this operation is primitive in our current context.} \[ \langle d -, d - \rangle : \fa \times \fa \longrightarrow \fa, \] and with a unary operation $\Box : \fa \to \fa$. These operations must satisfy equations modelled after those that hold in the manifold case: $\langle d-, d-\rangle$ must be commutative and satisfy the Leibniz rule in the first argument (and by commutativity also the second), \beq \label{leibniz1} \langle d (ab), dc \rangle = a \langle db, dc\rangle + b \langle da, dc\rangle \qquad \forall a,b,c \in \fa, \eeq as well as the second-order Leibniz rule must hold in the form\footnote{In fact, these equations together show that $\langle d-,d-\rangle$ is uniquely determined by $\Box$, and $\Box$ must be a second-order derivation in the sense of~\citet{GKV}.} \beq \label{leibniz2} \Box(a b) = \Box(a) \hspace{1pt} b + 2 \langle d a, d b \rangle + a \hspace{1pt} \Box (b) \qquad \forall a, b \in \fa. \eeq The curvature scalar from \Cref{pure_scalar2} will also amount to an operation of arity zero, meaning a fixed distinguished element $R \in \fa$. This element will need to satisfy suitable identities for which we currently do not have an explicit description. It is possible that metric $C^\infty$-rings also carry additional structure or satisfy additional equations which we have not yet found. So due to a lack of understanding of the natural operations involved and the equations between them, we currently do not have a complete and explicit description of metric $C^\infty$-rings. We nevertheless have a range of concrete examples: the very definition of metric $C^\infty$-ring is built such that for every Lorentzian manifold $M$, the set $C^\infty(M)$ is a metric $C^\infty$-ring in a canonical way. It may be worth noting that having an algebra $\fa$, together with a differential operator acting on it and equipped with an inner product as above, is vaguely reminiscent of the \emph{spectral triples} of noncommutative geometry~\citep{connes,marcolli}. \end{scalar_ex} \begin{electro_ex} \label{pure_electro3} For pure electrodynamics in $d = 4$ dimensions, we saw in \Cref{pure_electro2} that taking linear combinations of the potentials defines a family of natural operations, and we conjectured that there are no other ones, regardless of whether gauge invariance is taken into account or not. If this conjecture is correct, then it follows that the resulting $\ff$-algebras are simply vector spaces, without any additional structure beyond that. \end{electro_ex} \begin{spinor_ex} \label{pure_spinor3} Continuing on with Weyl spinors in four spacetime dimensions from \Cref{pure_spinor2}, the $\ff$-algebras $\fa$ in this case carry a rich algebraic structure as follows. The fact that taking complex linear combinations defines a family of natural operations means that such $\fa$ is in particular a complex vector space. There must be a linear unary operation $D : \fa \to \fa$ corresponding to the Dirac operator. Furthermore, there must be a host of operations of arity three and five, corresponding to the natural operations~\eqref{spinor_ip}--\eqref{spinor_more_ternary}. Each one of these must be multilinear, since so are the original natural operations in the manifold case. They must also satisfy a bunch of equations amounting to the satisfaction of the Fierz identities. But as already in the scalar field case, we are quite far from having a complete and explicit description of these $\ff$-algebras. We can at least note that spinor field configurations on a Lorentzian manifold are among the examples. \end{spinor_ex} \newcommand{\electromagnetic}{\mathrm{em}} \newcommand{\weyl}{\mathrm{W}} \begin{spinor_electro_ex} \label{spinor_electro3} The example of Weyl spinor electrodynamics in four spacetime dimensions (\Cref{spinor_electro2}) is clearly our richest example with the largest supply of natural operations, and correspondingly leads to the most complicated type of algebraic structure. Without taking gauge invariance into account, we have two separate field functors with natural operations of pure and mixed type, and it is therefore most natural to work with the obvious two-sorted analogue of \Cref{Falgebra}. Thus an instance of this type of field algebra structure has two sorts $\fa_{\electromagnetic}$ and $\fa_{\weyl}$, such that $\fa_{\weyl}$ is a type of algebraic structure as described in the previous \Cref{pure_spinor3} and $\fa_{\electromagnetic}$ is analogously an algebraic structure involving operations associated to those discussed in \Cref{spinor_electro2}, such as the d'Alembertian $\Box : \fa_{\electromagnetic} \to \fa_{\electromagnetic}$. There will also be operations mixing the two sorts, corresponding to (among probably others) the mixed natural operations~\eqref{mixed_op1}--\eqref{mixed_op2}, resulting in additional algebraic operations having the types \[ \fa_{\weyl} \times \fa_{\weyl} \longrightarrow \fa_{\electromagnetic}, \qquad \fa_{\electromagnetic} \times \fa_{\weyl} \longrightarrow \fa_{\weyl}. \] Upon taking gauge invariance into account, we had arrived back at a single field functor in \Cref{spinor_electro2}. Correspondingly, in this case the resulting field algebra will also have only one sort, amounting to a sense in which the electromagnetic field gets unified with the spinor field. Due to the examples that we have already given, the reader will have no difficulty with translating the natural operations described in the second half of \Cref{spinor_electro2} into the corresponding $\ff$-algebra structure, although again a complete explicit description remains elusive. \end{spinor_electro_ex} It is worth noting that the difficulty with finding explicit descriptions of the $\ff$-algebra structure is not necessarily an impediment towards working with them mathematically. Indeed the powerful machinery of categorical algebra which applies regardless and provides tools for analyzing algebraic objects even when an explicit description of their algebraic structure is not available~\citep{borceux}. For example, this toolbox allows us to take $\ff$-algebras built out of manifolds and then to perform algebraic constructions on them, such as the formation of quotients. This can result in particular $\ff$-algebras that do not arise from manifolds, but may nevertheless permit a discussion of the physics of the field or fields under consideration, as in the next section. \section{Algebraic structure relevant for a physical field} \label{sec_physics} Finally, we now turn to discussing question~\ref{which_physics2} on how to formulate the physics of a field in purely algebraic terms. By considering general instances of these algebraic structures, we can then lift the physics away entirely from the manifold context. We also consider how to prune the algebraic structure further in a way which still allows for a formulation of the physics, and outline a few instances of these structures in which the physics still makes sense despite there not being any underlying spacetime manifold. On the other hand, it is fair to say that we do currently not have a complete satisfactory answer to~\ref{which_physics2}: our treatment of physics is limited to setting up the field equations, and we neither have a satisfactory theory of their solutions, nor do we have a field-algebraic treatment of Lagrangians and the principle of stationary action. Extending field algebra so as to incorporate these aspects of physics remains an open problem. Based on the previous section, it is natural to try and express the physics of a particular field by using $\ff$-algebras as the relevant algebraic structure. In doing so, one interprets the elements of an $\ff$-algebra as field configurations, which now make sense without any reference to an underlying spacetime. Expressing the physics then means in particular to formulate the field equations in purely algebraic terms. However, the algebraic structures describing physics should be motivated primarily by physical considerations, while the $\ff$-algebras from the previous section are mere mathematical contrivances to begin with. For the purposes of physics, it may therefore be reasonable to relax these algebraic structures a bit to other ones which can be described concretely, such as in Geroch's proposal based on commutative rings (as opposed to $C^\infty$-rings). But the consideration of the $\ff$-algebras can be an important step in practice, based on the idea that the extraction of a suitable algebraic structure from physical considerations can be strongly informed by an understanding of the associated $\ff$-algebras. So our method is basically to use the $\ff$-algebras as a starting point, and to cut down the natural operations and the $\ff$-algebra structure which they define as physical considerations suggest. We illustrate this method with our running examples. \begin{scalar_ex} To formulate the physics of massless scalar $\phi^4$-theory in $d$ dimensions without reference to a spacetime manifold, we use the metric $C^\infty$-rings $\fa$ from \Cref{pure_scalar3} as a starting point, which are $C^\infty$-rings equipped with additional structure in the form of an additional commutative binary operation $\langle d-,d-\rangle$ and a unary operation $\Box$, satisfying in particular the second-order Leibniz rule, as well as further algebraic operations as per the discussion above. We think of the elements of $\fa$ as the possible scalar field configurations, where now an underlying spacetime no longer needs to exist (in whatever form). Now the key point for physics is that the field equation of massless $\phi^4$-theory---which was our starting point in \Cref{pure_scalar1}---can be expressed purely algebraically on every metric $C^\infty$-ring, where it takes the form \beq \label{EL} \Box \hspace{1pt} \phi = \frac{\lambda}{3!} \phi^3. \eeq Here, the d'Alembertian $\Box$ is primitive in the algebraic structure on $\fa$, rather than being defined in terms of a Lorentzian metric on a manifold (neither of which makes sense for a general metric $C^\infty$-ring $\fa$). Now for the consideration of physics such as the field equation, it seems apparent that not all of the metric $C^\infty$-ring structure is needed. In fact, it may be desirable to now make a move similar to Geroch's: we can define a new algebraic structure modelled after metric $C^\infty$-rings and in which the field equation still makes sense, but which is defined in terms of only finitely many algebraic operations and equations. This can indeed now be done: let us say that a \emph{metric algebra} is a commutative $\R$-algebra $A$ together with \begin{itemize} \item A commutative binary operation $\langle d -, d -\rangle : A \times A \to A$, \item A unary operation $\Box : A \to A$, \end{itemize} such that both of these are linear (in each argument), and such that the Leibniz rule holds in the form~\eqref{leibniz1} and~\eqref{leibniz2}. Then the field equation~\eqref{EL} still makes sense for every value of the coupling constant $\lambda$. This simplified definition seems more prudent in various ways.\footnote{There is one interesting counterpoint to this which shows that also the $C^\infty$-operations may be of some use: they can come in handy in constructing the usual plane wave solutions of the wave equation, since this involves the formation of exponentials (or trigonometric functions), which is part of the $C^\infty$-ring structure but not of the ring structure.} One way is that the full $C^\infty$-ring structure builds on the concept of smooth function, the physical relevance of which (at the fundamental level) can be debated. Another is that its more explicit nature allows for a simpler mathematical treatment, and in particular allows one to write down and investigate concrete examples quite easily. Indeed consider the polynomial ring $\fa := \R[\phi]$, whose elements are polynomials in the field $\phi$, which is now considered as a formal variable. If we define the operations $\langle d-, d-\rangle$ and $\Box$ on the basis elements $(\phi^n)_{n \in \N}$ as \[ \langle d(\phi^n), d(\phi^m) \rangle \,:=\, \frac{\lambda}{12} nm \phi^{n+m+2}, \qquad \Box(\phi^n) \,:=\, \frac{\lambda}{12} n(n+1) \phi^{n+2}, \] and extend linearly, then the relevant equations in the form of the Leibniz rules~\eqref{leibniz1} and~\eqref{leibniz2} are easily seen to hold, so that we indeed have a metric ring in our sense. The ring element $\phi \in \fa$ itself now satisfies the field equation~\eqref{EL} by construction, as one can see by taking $n = 1$ in the definition of $\Box$. This example stems from purely technical considerations, and we leave its physical significance open for future work. \end{scalar_ex} \begin{electro_ex} The case of pure electrodynamics does not seem to be an interesting example for our field algebra, assuming that the resulting $\ff$-algebras are indeed merely vector spaces (as suggested in \Cref{pure_electro3}). If this speculation is indeed correct, then also the field equations---which are the vacuum Maxwell equations---cannot be expressed in purely field-algebraic terms. While this may look like an argument against our proposal, we do not view it in this way because the suggested impossibility of doing so for pure electrodynamics may just reflect the fact that the physics of a universe containing pure electrodynamics as the only physical field would be rather impoverished. This also shows that the possibility of expressing field equations is not a given, and this underlines that the possibility of doing so in our other examples is a nontrivial feature. This interestingly contrasts with the fact that purely algebraic versions of electrodynamics have been proposed before. One is due to \citet{wise}, where the consideration of higher $p$-form analogues of electrodynamics has in algebraic structures building on those considered in homological algebra (in the form of chain complexes). Similar comments apply to the algebraic gauge theory developed by \citet{zahariev}. In contrast to our field algebra, both of these approaches have non-minimal ontologies in the sense of containing primitive structures that are not physical fields. \end{electro_ex} \begin{spinor_ex} We treat the Weyl spinor case more concisely, since it is closely parallel to the scalar field case. As per \Cref{pure_spinor3}, an $\ff$-algebra $\fa$ in this case is a complex vector space together with a unary operation $D : \fa \to \fa$ called the \emph{Dirac operator} and additional algebraic operations of higher arity. Thinking of $\fa$ as the set of spinor field configurations without an underlying spacetime, the algebraic structure is obviously rich enough to make sense of the Weyl equation \[ D \psi \,=\, 0, \] which is the field equation for a Weyl spinor. It now seems like an interesting task to prune the $\ff$-algebra structure, in order to try and come up with an interesting definition of abstract spinor field, parallel to the definition of metric ring in the scalar case. It seems natural to base this around the Dirac operator and the additional operations involved in the Fierz identities discussed before, but we have not yet arrived at a definite proposal for this. \end{spinor_ex} \begin{spinor_electro_ex} Let us briefly return to Weyl spinor electrodynamics (without gauge invariance). Then as per \Cref{spinor_electro2}, the resulting $\fa$-algebras involve two sorts $\fa_{\electromagnetic}$ and $\fa_{\weyl}$, corresponding to the sets of electromagnetic and the Weyl spinor field configurations, respectively. The Weyl spinor part $\fa_{\weyl}$ is the same as in the previous example, while $\fa_{\electromagnetic}$ now carries a lot of additional algebraic structure as discussed before. Per~\eqref{gauged_dirac}, this structure permits us to express the field equation for the spinor, \[ D_{\mathrm{\scriptscriptstyle{gauged}}} \psi \,=\, 0, \] as well as field equations for the electromagnetic field: these are Maxwell's equations with the spinor field as a source term, \[ \delta d A_\alpha \,=\, i g_{\alpha \beta} \bar{\psi} \sigma^\beta \psi, \] which can be expressed thanks to the natural operations~\eqref{ddeltad} and~\eqref{mixed_op2}. We expect no conceptual differences for these two fields relative to the scalar field and pure Weyl spinor field cases. \end{spinor_electro_ex} To conclude, we would like to highlight the following philosophical features about our formalism. First, it provides a more thoroughgoing dynamic interpretation of relativistic theories than what is available in the literature, such as \citet{brown}. Like Brown's dynamic approach, we treat the metric field on a par with other matter fields rather than representing the primitive geometry of space. When general relativity is not under consideration, we consider metrical information not as a matter field on its own, but as encoded in the algebraic operations of field algebra (as in \Cref{pure_scalar3,pure_spinor3}). Unlike Brown's approach, we no longer need to posit an underlying metrically amorphous manifold. Physical fields are all we need in our fundamental ontology. Second, unlike the other algebraic approaches such as \citet{geroch}, we no longer rely on a scalar field for encoding information about the spacetime structure. As we have argued, such a field need not be among our actual physical fields, and in any case should not be ontologically privileged over other fields. In our approach, we can discern the rich structure of some physical fields and do physics (to some extent) without involving scalar fields at all. All physical fields are put on equal footing. Relatedly, in standard algebraicism \`a la Geroch there is no clear distinction between physical fields and mere mathematical fields (various field-like entities are constructed without necessarily representing physical fields). In contrast, we have taken care that the fundamental fields we posited are only those that are standardly acknowledged in physics. For example, we do not posit the Lagrangian of a physical field, which is mathematically represented by a density field, as a physical field itself. Instead, we expect the Lagrangian to be encoded purely in the algebraic structure of the physical field, although we have not implemented this idea yet. While many further tasks await before we can do full-blown physics under our formalism, we consider this work a solid start towards establishing a clean ontology of physical fields without spacetime. \newpage \printbibliography \end{document}
\section{Introduction}\label{sec:intro} Through the analysis of spectra and their polarization, we have been able to infer the properties of the solar and stellar atmospheres. To infer the stratification of physical properties as a function of depth, we compare the emergent spectra given by a solar model with observations. By modifying the physical parameters that define the model atmosphere, we can find a specific configuration that resembles the observations and obtain a physical interpretation of the origin of the observed phenomena. This process is commonly known as spectropolarimetric inversion and nowadays is routinely used in solar physics to extract physical information from spectropolarimetric observations. At present, there are different methods for obtaining the most probable atmospheric structure responsible for producing the observed spectra (see \citealt{delToro2016} and \citealt{Jaime2017} for extensive reviews). The traditional way for finding the optimum solution is the use of a gradient search minimization algorithm, normally of second order, such as the Levenberg-Marquardt method (\citealt{Levenberg1944, Marquardt1963}). There are a collection of techniques that use the gradient of the merit function to drive the solution in the direction of the minimum by reducing the difference between the forward calculated spectrum and the observed one. They usually require only a few forward calculations of the synthetic spectra to converge, but the global minimum can only be guaranteed if the merit function is convex. To have complete knowledge of the parameter space (the location of the global minimum if it exists, whether there are degeneracies or multiple solutions that can equally reproduce the observations, and to have a proper estimation of the uncertainty in the solution), the Bayesian framework has to be used. The posterior distribution of the model parameters conditioned on the observations encodes all the relevant information of the inference. Computing this high-dimensional posterior distribution turns out to be complex and one has to rely on efficient stochastic sampling techniques such as Markov Chain Monte Carlo (MCMC; \citealt{Metropolis1953}) and nested sampling \citep{Skilling2004}. These sampling methods have been one of the pillars of Bayesian analysis in solar physics \citep{Asensio2007, Arregui2018} not only to sample complicated posterior distributions for parameter inference but also to compute marginal posterior for model comparison. Even though they are compelling and new algorithms have been developed to obtain the overall shape of the parameter space when multiple solutions exist \citep{DiazBaso2019}, they require many forward calculations and are therefore computationally very costly, which limits their applicability even in relatively simple atmospheric models. Currently, although successful, the use of gradient-based methods has found an obstacle when applied to two-dimensional fields of view with millions of pixels. Inverting such large maps often requires the use of supercomputers running parallelized inversion codes for many hours \citep[e.g.,][]{Dalda2019}. This is especially relevant for inversions in non-local thermodynamic equilibrium (NLTE), for which the forward problem is computationally heavy. The use of artificial neural networks (ANN) to learn the non-linear mapping between the observed Stokes parameters and the stratification of solar physical parameters has shown a large improvement in speed and robustness to noise compared to classic gradient search inversion codes \citep{Carroll2001, Socas2005, Asensio2019, Socas2021}. Given that the inverse problem is often not bijective (there are very similar spectra that emerge from very different physical parameters), traditional neural networks struggle in cases where multiple solutions exist. A solution to this is to use neural networks as emulators which mimic the forward modeling and accelerate standard MCMC posterior sampling methods in Bayesian inversions \citep[e.g.,][]{BayesClumpy2009}. A very promising alternative method for Bayesian inference is variational inference, where the true distribution of the solution is approximated with a simpler analytical distribution \citep{Asensio2017, DiazBaso2019noise}, more convenient to work with. By assuming a distribution instead of a single solution for the physical parameters, we can capture the uncertainties and, for instance, whether several solutions are compatible with the observations. To improve this approximation, mixture models are usually used as a composition of many components of the same or different families. However, they require the evaluation of each component, their optimization is not always stable, and they only work well in cases where the posterior is simple. In this study, we leverage a variational inference method known as normalizing flows \citep{tabak2013, Rippel2013, Dinh2014, Rezende2015} to do Bayesian inference for the physical atmospheric parameters from spectropolarimetric data. Normalizing flows are a set of parametrized transformations that can convert a simple and analytically known distribution (for instance, a standard normal distribution) into a more complex distribution. Normalizing flows use neural networks to represent this complex relation. When these normalizing flows are conditioned on the observations, they can approximate the posterior distribution for every observation very efficiently. They also provide all the tools to rapidly sample from the posterior and compute the ensuing probability of every sample. Given their recent conception and development, there are only a few examples of astrophysical applications, such as estimating continua spectra of quasars \citep{Reiman2020}, constraining distance estimates of nearby stars \citep{Cranmer2019} or inferring physical properties of black holes using gravitational waves \citep{Green2020}. In solar physics, \cite{Osborne2019} showed the use of invertible neural networks, a particular modification of normalizing flows where the inverse and forward models are learned at the same time. The information that is lost during the forward model (which makes the inverse model ill-defined) is re-injected again by using an ad-hoc latent vector. The forward and inverse models are made consistent by imposing a cycle consistency. In our experience, although it is a promising direction, the cycle consistency makes both models somewhat hard to train. In this study, we prefer to approximate both models separately. The inverse problem is treated probabilistically with a normalizing flow, while the forward model is approximated with a standard neural network. We have found this approach to be stable and fast to train. Therefore, we propose to apply normalizing flows to spectro-polarimetric observations to perform Bayesian inference faster than the classical gradient search algorithms with all the added information of the parameter space given by the posterior distribution. We present an automated inference framework based on neural density estimation, where the fundamental task is to estimate a posterior distribution from pre-computed samples from a physical forward model. The paper is organized as follows. We start with a brief introduction to normalizing flows (Sec.~\ref{sec:nflow}), their basic principles, and how we implement the new approach with solar observations. Later we show the application of the normalizing flow for Bayesian inference on two examples with different complexity (Sec.~\ref{sec:ME} \& \ref{sec:NLTE}) and verify the accuracy of this approach (Sec.~\ref{sec:accuracy} \& \ref{sec:fov}). Finally, we provide a brief discussion about the implications of this work and outline potential extensions and improvements (Sec.~\ref{sec:conclusions}). \section{Normalizing flows}\label{sec:nflow} \begin{figure*} \centering \includegraphics[width=\linewidth]{sketchflow5B.pdf} \caption{Comparison between an artificial neural network and a conditional normalizing flow with parameters $\phi$. The output of the classical artificial neural network is an average value over all the solutions $\overline{\theta}$, however the normalizing flow transforms a simple distribution conditioned on the data to obtain the full probability distribution of the target parameter $\theta$.} \label{fig:sketch} \end{figure*} \subsection{Amortized Variational Inference} Bayesian inference relies on calculating the posterior probability distribution function $p(\boldsymbol{\theta}|\mathbf{x})$ of a set of $M$ physical model parameters $\boldsymbol{\theta}$ that are used to describe a given observation $\mathbf{x}$ with $N$ data points. This quantity can be obtained by direct application of the Bayes theorem \citep{Bayes63}: \begin{equation} p(\boldsymbol{\theta}|\mathbf{x}) = \frac{p(\mathbf{x}|\boldsymbol{\theta}) p(\boldsymbol{\theta})}{p(\mathbf{x})}, \end{equation} where $p(\mathbf{x}|\boldsymbol{\theta})$ is the likelihood, which measures the probability that the data $\mathbf{x}$ were obtained (measured) assuming given values for the model parameters $\boldsymbol{\theta}$, while $p(\boldsymbol{\theta})$ is the prior distribution of all possible model parameters. The quantity $p(\mathbf{x})$ is the so-called evidence or marginal posterior, which normalizes the posterior probability distribution. As mentioned, the calculation of the posterior can be complex and one must rely on efficient stochastic sampling techniques, such as MCMCs, which require many model evaluations. On the other hand, variational inference is a faster alternative that tries to approximate the posterior with a simpler parametrized distribution, translating the inference problem into an optimization problem. However, both methods work on a single instance of the problem. This means that when we want to perform inference on a large number of observations, we have to run the same method several times which, at the end, can be significant in terms of computing time. In this way, we are not exploiting the global knowledge about the problem and evaluating many times the same model with different data. Recent advances in deep learning have promoted the development of new algorithms based on amortized neural posterior estimation \citep[ANPE;][]{Kyle2019}, i.e., we can find a function that maps the observed data to the variational parameters of our approximation. Once we have this function, performing inference on a new observation is as simple as evaluating this function and plugging the output into our variational approximation. This function must be flexible enough to learn the global representation of the data and neural networks are good at learning features from the data directly. Thus, neural networks can be optimized to approximate the posterior distribution $p(\boldsymbol{\theta}|\mathbf{x})$ by conditioning the resulting distribution on observations that have been precomputed over our prior parameter space $p(\boldsymbol{\theta})$. After training the density estimator, we can evaluate the posterior of new observations efficiently. The approach presented in this paper belongs to the ANPE framework. \subsection{Normalizing flows} Normalizing flows approximate the posterior distribution ${p}(\boldsymbol{\theta}|\mathbf{x})$ by transforming a simple probability distribution $p_z(\mathbf{z})$ into a complex one by applying an invertible and differentiable transformation $\boldsymbol{\theta} = \mathbf{f}(\mathbf{z})$. In practice, we can construct a flow-based model by implementing $\mathbf{f}=\mathbf{f_\phi}$ with a neural network with parameters $\phi$ and take the base distribution $p_z(\mathbf{z})$ to be simple, typically a multivariate standard normal distribution. This base distribution will act as a latent space of hidden independent variables. If the observed variables are also independent, the transformation will be just a scaling of each of them. On the contrary, if the joint distributions of the observed variables show high complexity (correlations, multiple maxima, etc), the latent variables will be mixed to reproduce such distributions. More precisely, the resulting probability distribution is computed by applying the change of variables formula from probability theory \citep{Rudin2006}: \begin{equation}\label{eq:chng_vrbl} p_\phi(\boldsymbol{\theta}|\mathbf{x})=p_z(\mathbf{z})\left|\det \dfrac{\partial \mathbf{f_\phi}}{\partial \mathbf{z}}\right|^{-1} =p_z(\mathbf{f_\phi^{-1}}(\boldsymbol{\theta}))\left|\det \dfrac{\partial \mathbf{f_\phi}^{-1}}{\partial \boldsymbol{\theta}}\right| \end{equation} where the first factor represents the probability density for the base distribution ($p_z$) evaluated at $\mathbf{f_\phi^{-1}}(\boldsymbol{\theta})$, while the second factor is the absolute value of the Jacobian determinant and accounts for the change in the volume due to the transformation. This factor forces the total integrated probability of the new distribution to be unity. The transformation $\mathbf{f_\phi}$ expands, contracts, deforms and shifts the probability space to morph the initial (base) distribution into the target. A flexible transformation can be obtained by composing several simple transformations, which can produce a very complex distributions. An important property of invertible and differentiable transformations is that if we compose $K$ transforms {$\mathbf{f}=(\mathbf{f}_{1}\circ \mathbf{f}_{2}\circ\cdots\circ \mathbf{f}_{K})$}, their inverse can also be decomposed in the components {$\mathbf{f^{-1}}=(\mathbf{f}^{-1}_{K}\circ\cdots\circ \mathbf{f}^{-1}_{2}\circ \mathbf{f}^{-1}_{1})$} and the Jacobian determinant is the product of the determinant of each component. Therefore the log-probability of the overall transformation is then: \begin{equation} \log p_\phi(\boldsymbol{\theta}|\mathbf{x}) \simeq \log p(\mathbf{z}_K|\mathbf{x}) = \log p_z(\mathbf{z}_0) + \sum^K_{k=1}\log\left|\det\frac{\partial \mathbf{f}^{-1}_k}{\partial {\mathbf{z}_{k-1}}}\right| \label{eq:normalizing_flow} \end{equation} where $\mathbf{z}_k=\mathbf{f}_k(\mathbf{z}_{k-1})$. The term normalizing flow is intimately related to the compositional character described above. The term "flow" refers to the trajectory that a collection of samples follow as they are gradually transformed. The term "normalizing" refers to the inverse trajectory that transforms a collection of samples from a complex distribution and makes them converge towards a prescribed distribution, often taken to be the normal distribution. Figure~\ref{fig:sketch} illustrates the difference between the classical neural-assisted Stokes inversion methods \citep[e.g.][]{Asensio2019} (upper panel) and the probabilistic approach that normalizing flows offer (lower panel). In the classical case, a neural network produces a point estimate of the parameters $\overline{\theta}$ from the observed Stokes parameters. This point estimate is not really representative of any of the potential solutions in degenerate cases. In the probabilistic case, a normalizing flow transforms a standard-normal base distribution together with the observations into a complex target posterior density through several simple transformations. This final distribution properly captures all solutions compatible with the observations, even if they are multimodal. Normalizing flows are trained by minimizing the discrepancy (or divergence) between the posterior distribution and the variational approximation of Eq.~(\ref{eq:normalizing_flow}). The most popular choice is the Kullback-Leibler divergence \citep{KL1951}. Assuming that our dataset has $D$ samples $\{\boldsymbol{\theta_i},\mathbf{x_i}\}$ with physical parameters drawn from the prior $p(\boldsymbol{\theta})$ and observations generated from our physics-based forward model $p(\mathbf{x}|\boldsymbol{\theta})$, minimizing the Kullback-Leibler divergence is equivalent to minimizing the negative log-likelihood: \begin{equation} \mathcal{L_\phi} = -\frac{1}{D}\sum^D_{i=1} \log p_\phi(\boldsymbol{\theta_i}|\mathbf{x_i}) \end{equation} The minimization is carried out using gradient-based optimization methods by calculating the gradient of $\mathcal{L_\phi}$ with respect to the parameters of the normalizing flows, $\phi$. During the training, the normalizing flow will be optimized to map the samples from the unknown distributions to a standard normal distribution. If that is performed successfully, the inverse transformation enables us to sample the posterior by simply extracting values from the normal distribution and applying the learned inverse transformations. From this result, we can already appreciate the power of normalizing flows on density estimation: we do not need to evaluate the likelihood of our data $p(\mathbf{x}|\boldsymbol{\theta})$ (or the model) during training, we only need to provide samples. This is also the goal of simulation-based inference \citep[SBI,][]{Kyle2019}, to perform Bayesian inference when the evaluation of the likelihood is not possible because of mathematical or computational reasons. \subsection{Invertible transformations} A normalizing flow should satisfy several conditions to be of practical application. It should be: 1) invertible, 2) expressive enough to model any desired distribution, and 3) computationally efficient for calculating both forward and inverse transforms and the associated Jacobian determinants. Among the different families of transformations $\mathbf{f_\phi}$, we use a transformation known as coupling neural splines flows \citep{Dinh2014, Muller2018, Durkan2019} which have been demonstrated to be effective at representing complex densities, are fast to train, and fast to evaluate (see \citealt{Papamakarios2019Review} and \citealt{Kobyzev2019Review} for extensive reviews). The idea behind the coupling transform was introduced by \citet{Dinh2014} and consists of dividing the input variable (of dimension $Q$) into two parts and applying an invertible transformation $\mathbf{g}$ to the second half ($\mathbf{z}_{q+1:Q}$), whose parameters are a function of the first half (i.e., $\mathbf{z}_{1:q}$). Such transformations have a lower triangular Jacobian whose determinant is just the product of the diagonal elements, allowing to create faster normalizing flows. The output vector $\mathbf{o}$ of a coupling flow is given by: \begin{align}\label{eq:cplng_lyr} \mathbf{o}_{1:q} &= \mathbf{z}_{1:q} \nonumber \\ \mathbf{o}_{q+1:Q} &= \mathbf{g}_{({\mathbf{z}_{1:q}})}(\mathbf{z}_{q+1:Q}), \end{align} where $\mathbf{g}_{({\mathbf{z}_{1:q}})}$ is an invertible, element-wise transformation whose internal parameters have been computed based on $\mathbf{z}_{1:q}$ and in our case (conditionals flows) also on the observed data $\mathbf{x}$. The final output of the transformation is then $\mathbf{o}=[\mathbf{o}_{1:q}, \mathbf{o}_{q+1:Q}]$. Since coupling layers leave unmodified $\mathbf{z}_{1:q}$, one needs to shuffle the order of the input in each step by using a permutation layer, so these two halves do not remain independent throughout the network. For the coupling transformation $\mathbf{g}$, we have chosen a family of very expressive functions based on monotonically increasing splines \citep{Muller2018, Durkan2019}. They have shown large flexibility when modeling multi-modal or quasi-discontinuous densities. A spline is a piece-wise function that is specified by the value at some key points called knots. The location, value, and derivative of the spline at the knots for each dimension in $\mathbf{o}_{q+1:Q}$ are calculated with a neural network. Since each resulting distribution (and therefore each transformation) will depend on the observed data, the neural network will have the input $[\mathbf{z}_{1:q},\mathbf{x}]$. \begin{figure*} \centering \includegraphics[width=0.91\linewidth]{corner_flow_posterior_5_32_5_b8_.pdf} \caption{Joint (below the diagonal) and marginal (in the diagonal) posterior distributions for the physical parameters involved in the Milne-Eddington model. The label on top of each column provides the median and the uncertainty defined by the percentiles 16 and 84 (equivalent to the standard 1$\sigma$ uncertainty in the Gaussian case). Also, the contours are shown at 1 and 2 sigmas. The original values of the parameters are indicated with gray dots and vertical/horizontal lines.} \label{fig:ME_corner} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.49\linewidth]{posterior_encoding_15_10_128_t9_1e-2g_1e6_11387_05_paper_im_plot_nn.pdf} \includegraphics[width=0.49\linewidth]{posterior_encoding_15_10_128_t9_1e-2g_1e6_17954_05_paper_im_plot_nn.pdf} \caption{Atmospheric stratification inferred by the normalizing flow for two examples. In each column, the orange solution is inferred only using the \ion{Fe}{i} line while the brown solution also uses the \ion{Ca}{ii} profile. The lowest row shows the original intensity values together with the synthetic calculation from the maximum a-posteriori solution.} \label{fig:nlte} \end{figure*} \subsection{Network architecture and training details} We use the implementation of normalizing flows in \texttt{PyTorch} \citep{PyTorch} available in \texttt{nflows} \citep{nflows} which allows for a wide variety of transformations to be used, among them the neural spline flows for coupling transforms. As suggested by \cite{Green2020}, we include invertible linear transforms together with a permutation layer before each coupling transform allowing all of the parameters to interact with each other. In summary, we have used an architecture that is a concatenation of blocks of an invertible linear transformation using the LU-decomposition \citep{Kingma2018} with a rational-quadratic spline transform \citep[RQ,][]{Durkan2019} where a residual network \citep[ResNet,][]{ResNet2015} is used to calculate the parameters of the splines. Our \texttt{PyTorch} implementation can be found in the following repository: \url{https://github.com/cdiazbas/bayesflows}. We have also included a basic example to illustrate the method. For the first simple case, a flow with 5 coupling transformations, 5 residual blocks, and 32 neurons per layer was enough. In the second case, we need at least 15 coupling layers, 10 residual blocks, and 64 neurons per layer. We trained the models for {500} epochs with a batch size of {100}. We have used a learning rate of {$10^{-4}$} and the Adam optimizer \citep{Kingma2014}. During training, we reserved 10\% of our training set for validation. An augmentation scheme based on applying different realizations of Gaussian noise to the data is applied during training, thus increasing the effective size of the training set. \section{Simple case: Milne-Eddington atmosphere}\label{sec:ME} As a first example, we show the capabilities of the normalizing flows in a case where the forward modeling is fast enough to allow comparison with the exact solution obtained with an MCMC method. For this case, we choose the Milne-Eddington \citep{Auer1977} solution of the radiative transfer problem as a baseline. Focusing only on Stokes $I$, $\boldsymbol{\theta}$ is five-dimensional and contains the physical parameters of relevance that describe the intensity profile of a spectral line: the macroscopic velocity $v\rm _{LOS}$, the Doppler width $\Delta v\rm _D$, the line-to-continuum opacity ratio $\eta_0$, and the two parameters of the source function $S_0$ and $S_1$. The normalizing flow is trained using an appropriate training set. To this end, we generate $10^6$ training pairs ($\theta_i,x_i$) by drawing $\theta_i$ using a uniform prior for all the variables in the following ranges: ${v\rm _{LOS}} =[-3.0,3.0]$ \,km\,s$^{-1}$, $\Delta v\rm _D =[0.05,0.2]$ \AA, ${\rm \eta_0} =[0.0,5.0]$, $S_0 =[0.0,1.0]$, $S_1 =[0.0,1.0]$. We have simulated the photospheric \ion{Fe}{i} 6301.5\AA\ line using the Milne-Eddington model\footnote{\url{https://github.com/aasensio/milne}} and assuming Gaussian noise of {$\sigma=8\cdot10^{-3}$} in continuum units. Once the normalizing flow is trained, we can carry out Bayesian inference for arbitrary observations. In order to demonstrate the speed of the inference, we point out that the normalizing flow produces samples of the posterior at a rate of {20000} per second. In the following we show the result for a synthetic profile with input parameters {$v_{\rm LOS}=-1.0$ \,km\,s$^{-1}$, $\Delta v_D = 0.15$ \AA, $\eta_0=2.5$, $S_0=0.35$, and $S_1=0.7$}. This profile was chosen on purpose to highlight the flexibility of the neural network when working with complex distributions and strong degeneracies. To verify the accuracy of the posterior inference we compare the result of the normalizing flow against a Markov Chain Monte Carlo computed with the \texttt{emcee} sampler \citep{emcee2013} using a Gaussian likelihood. The comparison of the posterior distributions generated by the neural network (light orange) and \texttt{emcee} (dark orange) is shown in Fig.~\ref{fig:ME_corner}. The normalizing flow is doing a very good job at approximating the posterior, with both distributions clearly in very close agreement. For strongly degenerate parameters, such as ${\Delta v\rm _D}$ and ${\rm \eta_0}$, we recover a typical joint banana-shaped posterior. For highly correlated parameters, we find ridge-shaped distributions, like between the parameters ${\rm S_0}$ and ${\rm S_1}$. Given these strong degeneracies, a classical inversion method based on artificial neural networks will not perform correctly as there are multiple solutions for the same profile. The upper right panel of the same figure shows the synthetic spectra using samples from the posterior distribution of both methods. This test is known as the posterior predictive check and helps us understand whether the model is appropriate. It is clear from these results that the predictive profiles of each color are almost indistinguishable. They also lie within the uncertainty produced by the noise on the intensity profile we have evaluated. \begin{figure*} \centering \includegraphics[width=0.49\linewidth]{encoding_15_10_128_t9_1e-2g_1e6_11387_5_paper_cov.pdf} \includegraphics[width=0.49\linewidth]{encoding_15_10_128_t9_1e-2g_1e6_17954_5_paper_cov.pdf} \caption{Correlation matrices calculated for the inferred atmospheric stratification for the emission (left) and absorption (right) profiles. Blue/red indicates positive/negative correlations, respectively. The optical depth increases towards the right and downwards, so each pair of physical quantities has the top of the atmosphere in the upper left corner and the bottom in the lower right corner.} \label{fig:cov} \end{figure*} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{error_ME.pdf} \includegraphics[width=1.0\linewidth]{plots_curve_final_network.pdf} \caption{Upper panel: statistical properties of the posterior predictive check for the ME case. The blue curve averages over the full posterior distribution, while the orange curve shows the difference with respect to the mode of the posterior. Lower panel: the same results for the NLTE case. We also display the effect of compressing the model with an autoencoder and applying the resampling strategy.} \label{fig:error} \end{figure} \begin{figure*} \centering \includegraphics[height=0.96\textheight]{output_longsigma.pdf} \caption{Atmospheric structure of the FOV as inferred from the inversion. The left column shows the temperature, the LOS velocity, and the microturbulent velocity at two layers for half of the FOV. The right column shows the associated uncertainty for the same quantities and layers.} \label{fig:fov} \end{figure*} \begin{figure} \centering \includegraphics[width=\linewidth]{chi2_hist.pdf} \caption{Distribution of the error in intensity between the synthetic and the observed profiles for the inversion of the FOV in Fig.~\ref{fig:fov}.} \label{fig:chi2} \end{figure} \section{Complex case: NLTE with stratification}\label{sec:NLTE} Computing the posterior distribution in complex and realistic models turns out to be particularly difficult, for several reasons. First, complex models often require lots of computing power, so the number of samples of any MCMC method will be limited by the available computing time. An example of this is the formation of chromospheric spectral lines under NLTE conditions, which requires the joint solution of the radiative transfer and statistical equilibrium equations for the atoms under consideration. Second, complex models also require more model parameters (such as the whole atmospheric stratification with height), which increases the dimensionality of the posterior distribution. Finally, complex problems often contain non-linear calculations that can lead to very cumbersome posterior distributions, with strong degeneracies and ambiguities. In the case of the NLTE problem, the information encoded in the posterior strongly depends on the specific observed spectral line. Some heights in the atmosphere are constrained by the observations, while other heights remain partially or completely unconstrained. This produces a posterior distribution with very different widths for different parameters of the model. As a showcase for our approach, in this second example, we have simulated a case in which we have simultaneously observed the photospheric \ion{Fe}{i} 6301.5\,\AA\ line and the chromospheric \ion{Ca}{ii} 8542\,\AA\ line. This configuration is commonly used because it facilitates studying events occurring both in the photosphere and the lower chromosphere \citep{2019ApJ...870...88E,2019A&A...627A.101V, Kianfar2020,Diaz2021, Yadav2021}. It is also widespread because it is one of the most common instrumental configurations of the CRISP instrument on the Swedish 1-m Solar Telescope \citep[SST,][]{Scharmer2003, Scharmer2008}. The normalizing flow model needs to be trained for this specific problem. To this end, and to create a diverse set of samples of solar-like stratifications and intensity profiles, we have started from the solar stratifications inferred in \cite{Diaz2021}. These models were inferred from spectropolarimetric observations under some model assumptions. Therefore, the posterior distributions produced by our model will be dependent on this specific a-priori information (more details below). Anyway, we consider that the assumption of a prior is beneficial since it will act as a guide to avoid non-realistic stratifications. The model can always be trained with a different prior extracted, for instance, from state-of-the-art numerical simulations. The stratifications of the training set were extracted at nine equidistant locations from $\log(\tau_{500})=-7.0$ to $\log(\tau_{500})=+1.0$, where $\tau_{500}$ is the optical depth measured at 500 nm. These are the locations at which we infer the posterior distributions. We computed the mean and covariance matrix of the temperature, velocity, and microturbulent velocity obtained from the results of \cite{Diaz2021} at these locations. We created $10^6$ new stratifications by sampling from multivariate normal distributions with the computed means and covariances. Each physical quantity is drawn independently. To increase the diversity of the dataset, we have increased the standard deviation at each $\log(\tau_{500})$ location by a factor 2-6. The samples are then interpolated to 54 depth points using Bezier splines and encapsulated in a model with zero magnetic field. The gas pressure at the upper boundary is assumed to be P$_{\rm top}$= 1 dyn cm$^{-2}$. The density and gas pressure stratifications are computed by assuming hydrostatic equilibrium (HE). The spectra were synthesized using the multi-atom, multi-line, NLTE inversion code STiC \citep{delaCruz2016,delaCruz2019_STiC}. This code is built on top of an optimized version of the RH code \citep{Uitenbroek2001} to solve the atom population densities assuming statistical equilibrium and plane-parallel geometry. The radiative transport equation is solved using cubic Bezier solvers \citep{delaCruz2013} and includes an equation of state extracted from the SME code \citep{Piskunov2017}. We treated the \ion{Ca}{ii} atom in NLTE with the \cair line in complete frequency redistribution (CRD). The \ion{Fe}{i} 6301.5\AA\ line was also modeled in NLTE, hence accounting for a complex atmosphere that could affect its formation. We have then degraded each spectral line to the spectral resolution of the CRISP instrument at the SST telescope and an uncorrelated Gaussian noise with a standard deviation of 10$^{-2}$ in units of the continuum intensity was added. We train two different models to capture the improvement in the inference of the stratification when more spectral lines are included. The first model only uses observations of the \ion{Fe}{i} line, while the second model uses both the \ion{Fe}{i} and \ion{Ca}{ii} lines together. The trained models are used to infer the stratification of physical properties for two different examples: one with strong emission in the chromospheric line produced by an increase in the temperature in this region and another example with the core of both lines in absorption. The results of the inference are shown in Fig.~\ref{fig:nlte}. The left panels refer to the case in emission, while the case in absorption is displayed in the right panels. The top three panels show the stratification with optical depth of the temperature, line-of-sight velocity, and turbulent velocity. Black squares indicate the original stratification used to synthesize the line profiles. The solid orange and dashed brown lines show the median value estimated from the posterior distribution when considering only the photospheric line or both lines, respectively. The shaded regions mark the corresponding 68\% confidence interval. As expected, the inference that considers both lines can recover with high accuracy the whole stratification, whereas using only the \ion{Fe}{i} line yields a model where only the photosphere is recovered, with a large uncertainty towards the upper atmosphere. This result shows that the normalizing flow is able to learn the range of sensitivity of each spectral line just by looking at the examples of the database. This sensitivity is model-dependent and a direct consequence is the presence of a larger uncertainty in the upper atmosphere when the profile is in emission with respect to that found when the profile is in absorption. This difference in the width of the distribution comes from the fact that large temperatures ionize the \ion{Ca}{ii} atoms and the line becomes less sensitive to the local physical conditions in the upper layers where the temperature is large \citep{Diaz2021}. Although the \ion{Fe}{i} line contains very limited information about the upper chromosphere, the inference outputs an increasing temperature and not a completely uncertain posterior. The reason for this is that the posterior is simply recovering the prior we have used, which has larger temperatures towards the upper atmosphere. As in any Bayesian inference, the prior gives an important constraint on how solar-like stratifications are expected, giving low probabilities to unrealistic values where the line contains no information. Although uncertainties are easy to visualize in the marginal posterior distributions at each location, the joint distributions are difficult to visualize for a multidimensional model. Joint distributions give interesting information about how different parameters are correlated in the inference, clearly pointing out the presence of ambiguities. To obtain an approximate insight, the joint distribution can be summarized by showing the correlation matrix. These correlation matrices are shown in Fig.~\ref{fig:cov} for the two examples of Fig.~\ref{fig:nlte}. Non-zero correlation is found both inside the same physical parameter (intra-parameter) and between different parameters (inter-parameter). Part of the intra-parameter correlation is a consequence of the assumed prior, which forces smooth stratifications. The checkerboard pattern found in the temperature indicates that reductions in the temperature at some locations can be compensated by increases in other locations. This oscillatory behavior can appear during the classical inversion process if too many degrees of freedom are used, and regularization is usually used to avoid erratic behavior \citep{delaCruz2019_STiC,delaCruz2019_STiCB}. Arguably the most visible inter-parameter correlation happens between the temperature and the microturbulent velocity. This correlation is different in amplitude and sign between the two examples because it depends on the particular model stratification and the non-linear effect of the physical parameters in the spectra. In this case, the difference comes from the fact that an increase of temperature in the chromosphere when the line profile is in absorption will produce a narrower core and an increase of the microturbulence compensates for this difference (positive correlation). However, an increase in temperature in the emission profile will broaden the profile, and the microturbulence needs to be decreased (negative correlation). The location of this correlation also indicates that the absorption profile displays the response higher in the atmosphere when compared with the emission profile. In summary, the Bayesian inference with normalizing flows allows us to obtain a complete picture of the inferred stratification and the degeneracy between parameters. \section{Validation and performance}\label{sec:accuracy} Normalizing flows have the combined advantages of Bayesian inference and deep learning, by gaining access to the posterior distribution and being able to sample from it very fast. However, it also inherits some of the limitations of the classical MCMC methods. For example, to obtain a sufficiently good representation of the posterior distribution with a standard MCMC method, it is required to densely sample the parameter space around the location of the mode, first to properly find it and then to estimate its shape. The samples from the training set have to be closer or similar to the expected width of the posterior distribution so that the normalizing flow is able to work properly. This is especially critical when the uncertainty in the observations is low because one expects very narrow posteriors. In this case, using a sparse training set leads to an overestimation of the posterior width. We have quantified how the accuracy of our models depends on the size of the training set. To this end, we use the fact that, when the models extracted from the posterior distribution are used to re-synthesize the line profiles, they should be distributed according to the assumed sampling distribution. In our case, this sampling distribution is Gaussian with a standard deviation of 8$\cdot$10$^{-3}$ and 10$^{-2}$ in units of the continuum intensity for the ME and NLTE case, respectively. The upper panel of Fig.~\ref{fig:error} shows these results for the ME case. The blue curve has been calculated as follows: we have produced the corresponding posterior distributions of 1000 different spectra from the database, then for each posterior distribution we have extracted 1000 models and calculated the standard deviation between the original and the synthesized profiles, and finally we have calculated the average between all the standard deviation values. This has been done for each normalizing flow that has been trained with a different training set, producing all blue curve points. The orange curve shows the same quantity but only for the maximum a-posteriori solution (evaluating only the solution with the highest probability). The average error of the normalizing flow model decreases asymptotically with the size of the dataset towards the noise level of the target spectra (shown as a horizontal dashed black line). The speed at which this convergence takes place strongly depends on the complexity of the forward problem. In the Milne-Eddington example, the orange curve reaches the expected error already for a training set of 10$^3$ examples, although this number needs to be much higher when we check for convergence of the full posterior distribution. In the NLTE case, the model requires many more simulated examples to reach a similar error (see lower panel of Fig.~\ref{fig:error}). This behavior can also be witnessed during training: while the validation loss in the ME case saturates, the validation loss in the NLTE starts to worsen after {500} epochs, indicating that the number of samples is probably not large enough to avoid overfitting. This behavior is less noticeable with the largest training dataset indicating we are reaching the right number of samples. This overfitting disappears when a larger standard deviation is used in the Gaussian noise added to the profiles. In this case, the model is able to correctly reproduce the width of the posterior distribution with a smaller amount of training examples. We note that the size of the training set for a normalizing flow model only for \ion{Fe}{i} is similar to that of the ME case. We have considered two possible procedures to reduce the effect of the size of the training set on the results of the model. The first procedure relies on using compression to reduce the dimensionality of the forward model. To this end, we use an autoencoder \citep{Hinton2006} to compress the 27 nodes (9 nodes for three physical variables) into a vector of dimension 20. After trial and error, we have found this value to be the minimum size of the bottleneck layer so that the error in the reconstruction of the stratifications is still smaller than the width of the posterior distributions. This autoencoder consists of an encoder, a bottleneck of dimension 20, and a decoder. Both the encoder and the decoder are fully connected ResNets with 5 residual blocks and 64 neurons per layer. The autoencoder is trained with the physical stratifications of the training set by minimizing the difference between the input and output of the autoencoder. Once trained, we use the encoder to produce compressed representations for the stratifications, which are used to train the normalizing flow. After training the normalizing flow, one can use the decoder of the autoencoder to produce physical stratifications from the samples of the flow. A more compact representation helps the normalizing flow to train faster, also performing better (see orange lines in Fig.~\ref{fig:error}). The second procedure reuses the samples from the normalizing flow and reweights them using importance sampling to produce a better approximation to the posterior distribution. This requires one to have access to the forward modeling, which is time-consuming in complex NLTE cases. One can also use a pre-trained neural network that works as an emulator of the forward modeling and produces much faster synthesis. In such case, the posterior distribution can be further improved by resampling according to the likelihood of the observations, producing the results of the green lines in Fig.~\ref{fig:error}. To this end, we re-weight our posterior samples so that the sampling distribution approaches the correct posterior. The importance sampling weights are, therefore: \begin{equation} w = \frac{p(\boldsymbol{\theta}|\mathbf{x})}{ p_{\phi}(\boldsymbol{\theta}|\mathbf{x})} = \frac{p(\mathbf{x}|\boldsymbol{\theta}) p(\boldsymbol{\theta})}{ p_{\phi}(\boldsymbol{\theta}|\mathbf{x})}, \end{equation} where the likelihood is given by \begin{equation} \log p(\mathbf{x}|\boldsymbol{\theta}) = -\frac{1}{2} \sum_{j=1}^{N_\lambda} \left[ \frac{\left( S(\lambda_j,\boldsymbol{\theta}) - I(\lambda_j) \right)^2}{\sigma_{j}^2} - \frac{1}{2} \log 2 \pi \sigma_{j}^2 \right], \end{equation} where $\sigma_{j}^2$ is the wavelength-dependent noise variance, $S(\lambda,\boldsymbol{\theta})$ is the synthetic line profile for parameters $\boldsymbol{\theta}$, while $I(\lambda)$ is the observed line profile. The number of wavelength points we consider is $N_\lambda$. We point out that this resampling process only works well when the posterior samples from the normalizing flow overlap with those of the real posterior distribution and the sampling of the real posterior is not very sparse. This is almost guaranteed in our case because our normalizing flow tends to overestimate the width of the posterior distribution but not for a large margin. Given that the precision of the normalizing flow model increases with the size of the training set, one should consider this trade-off for a particular problem. For complex problems for which the difficulty of generating a large simulated training set is dominating, one should consider reducing the maximum achievable accuracy by using a larger standard deviation of the noise. This automatically produces broader posteriors. Anyway, we are confident that the normalizing flow model is an improvement over more classical MCMC methods. Any MCMC sampling method would require performing $10^{4}-10^{5}$ synthesis to correctly sample the posterior distribution for any new observation that needs to be analyzed. The amortized character of our model allows it to be applied seamlessly to new observations. \section{Validation on large FOVs}\label{sec:fov} We have also tested the trained normalizing flows on large fields of view. To qualitatively challenge this method on real data, we have chosen the observations analyzed in \citet{Leenaarts2018A&A}. The data was taken at a heliocentric angle $\mu$=1 and its wavelength sampling is the same used in the creation of the training set. This region was observed with the SST on 2016-09-19 at around 09:30 UT using the CRISP instrument. The field of view target is an active region with elongated granulation indicating ongoing flux emergence and enhanced brightness in the core of the chromospheric lines above the flux emergence (see \citealt{Leenaarts2018A&A} for more details). Assuming that our database contains a sufficiently diverse sample of observed profiles, we have applied the neural network to a field of view of approximately 42$\times$42 arcseconds (smaller than the original size for optimal visualization). The normalizing flow was applied pixel by pixel, and to speed up the inference only 50 samples have been obtained; enough to roughly estimate the width of the distribution. Figure~\ref{fig:fov} shows in the left and right columns the mean stratification and standard deviation of the samples at each pixel for each physical magnitude, respectively. The lower half of each panel shows the quantity at $\log(\tau_{500})=-1$ which shows the photosphere, and the upper half at $\log(\tau_{500})=-4$, which provides a view of the chromosphere. In the line-of-sight velocity maps, the blue color represents motions toward the observer while the red color represents motions away from the observer. Overall the model performs well, generating coherent maps and reproducing the patterns previously found in gradient-based inversions \citep{Leenaarts2018A&A, Diaz2021}. We note that since our model does not include a magnetic field, all of the non-thermal broadening is reproduced with a higher value of the microturbulent velocity. The uncertainties tend to increase from the photosphere to the chromosphere, on average 80\,$\xrightarrow{}$500K in the temperature, 0.5\,$\xrightarrow{}$1.2\,km\,s$^{-1}$\ in the LOS velocity, and 0.4\,$\xrightarrow{}1.0$\,km\,s$^{-1}$\ in the microturbulent velocity. At a first glance at the two columns, there seems to be a clear correlation between the magnitudes and their uncertainty. This could be understood from the examples in the previous sections since emission profiles have higher chromospheric temperatures and therefore lower sensitivity in the upper layers. These locations also coincide with regions with high velocities and turbulent motions as a result of the interaction of the flux emergence with the pre-existing magnetic field. There are also exceptions such as the low photospheric velocity field in the umbra with higher uncertainty, probably caused by the difficulty to extract an accurate value from very wide profiles broadened due to the magnetic field. However, a more detailed analysis of each region is beyond the scope of this work. To estimate the performance of the network on these data we re-synthesized the spectral lines from the mean stratification of each pixel. Figure~\ref{fig:chi2} shows a histogram of the average error of each pixel for the FOV. On average, the result is very good, with a peak value around $10^{-2}$, although with an extended tail in the distribution reaching higher values. These points with a higher error are associated with the most complex profiles in the interior of the region. This behavior is to be expected because although the training set has a large diversity of profiles, more complex profiles have stronger gradients in temperature and velocity and therefore would require a finer sampling of heights than the one used here. We want to note that for this particular set we did not find significant differences among the synthetic spectra coming from the mean, median and maximum a-posteriori stratification (MAP). The reason could be the following: the posterior distribution is narrow where the spectral lines are very sensitive and all these values are very close, while for the regions of the atmosphere where the posterior is much wider and asymmetric (so MAP, median, and mean are different) the lines do not show a clear imprint of the solar conditions at those locations. This result cannot be generalized to other multimodal cases such as the magnetic field solutions under the Zeeman or Hanle effects. \section{Summary and conclusions}\label{sec:conclusions} In this study, we have explored the usage of normalizing flows to accurately infer the posterior distribution of a solar model atmosphere (parameters, correlations, and uncertainties) from the interpretation of observed photospheric and chromospheric lines. Once the normalizing flow model is trained, the inference is extremely fast. We have also shown that the quality of the approximate posterior distribution depends on the size of the training set and that applying dimensionality reduction techniques makes the normalizing flow performs better. Rapid parameter estimation is critical if complex forward models are used to analyze a large amount of data that the next generation of telescopes such as the Daniel K. Inouye Solar Telescope \citep[DKIST;][]{DKIST2015} and the European Solar Telescope \citep[EST;][]{EST2016} will produce. Compared with a classical inversion approach, that computes only single-point estimations of the solution, models based on normalizing flows have the ability to estimate uncertainties and multi-modal solutions. The latter is usually the case when a single spectral line is used and its shape can be explained by different combinations of the parameters. It is, therefore, crucial to use multi-line observations and characterize how they can constrain the inferred properties, as we have shown here. There are still many ways in which we could improve the current implementation. First, a natural extension of this work would be to include the four Stokes parameters to infer the magnetic properties of our target of interest, while also setting more constraints in the rest of the physical parameters. Since ambiguous solutions often plague the inference of magnetic properties, the Bayesian framework is ideal for it. Second, our normalizing flow only works with a particular noise level, but it can be easily generalized to arbitrary uncertainties by, for instance, passing it as input in the conditioning of the normalizing flow \citep{2021arXiv210612594D}. An arguably better option would be to let the model infer its value \citep[e.g.,][]{DiazBaso2019}. Third, a more general model can be built by adding metadata such as the spectral resolution or the solar location as additional conditioning, alongside the observation. We are actively working on a version of the model that uses a summary network to condition the normalizing flow. This will enable the use of arbitrary wavelength grids \citep{2021arXiv210809266A}. All of the above together will allow us to create a general Bayesian inference tool for almost any arbitrary observation. Another problem we have shown is the difficulty in generating an appropriate training set. Recently, alternative training methods have been developed that sequentially propose samples from the training set to maximize model performance with a smaller number of samples (see \citealt{Lueckmann2021} for a comparison of different approaches), and that is an idea that we plan to explore in the future. Finally, the ability of normalizing flows to model probability distributions makes this method versatile and other applications such as anomaly detection or learning complex priors for more traditional Bayesian sampling methods \citep{Alsing2021} are also being considered. \begin{acknowledgements} {We would like to thank the anonymous referee for their comments and suggestions.} CJDB thanks Adur Pastor Yabar, Flavio Calvo and Roberta Morosin for their comments. AAR acknowledges financial support from the Spanish Ministerio de Ciencia, Innovaci\'on y Universidades through project PGC2018-102108-B-I00 and FEDER funds. This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (SUNMAG, grant agreement 759548). The Swedish 1-m Solar Telescope is operated on the island of La Palma by the Institute for Solar Physics of Stockholm University in the Spanish Observatorio del Roque de los Muchachos of the Instituto de Astrof\'isica de Canarias. The Institute for Solar Physics is supported by a grant for research infrastructures of national importance from the Swedish Research Council (registration number 2017-00625). We acknowledge the community effort devoted to the development of the following open-source packages that were used in this work: numpy (\url{numpy.org}), matplotlib (\url{matplotlib.org}), scipy (\url{scipy.org}), astropy (\url{astropy.org}) and sunpy (\url{sunpy.org}). This research has made use of NASA's Astrophysics Data System Bibliographic Services. \end{acknowledgements} \bibliographystyle{aa}
\section{Basic Tools from Fourier Analysis on Boolean Hypercube}\label{sec:fourier} We briefly introduce some definitions and facts from Fourier Analysis on Boolean hypercube that are needed in this paper. We refer the interested reader to the text by de Wolf~\cite{Wolf08} for an excellent introduction to this field. For any two functions $f,g: \set{0,1}^{n} \rightarrow \ensuremath{\mathbb{R}}$, we define the \emph{inner product} between $f$ and $g$ as: \[ \inner{f}{g} = \Exp_{x \in \set{0,1}^{n}} \bracket{f(x) \cdot g(x)} = \sum_{x \in \set{0,1}^n} \frac{1}{2^n} \cdot f(x) \cdot g(x). \] For a set $S \subseteq \set{0,1}$, we define the \emph{character} function $\mathcal{X}_S : \set{0,1}^n \rightarrow \set{-1,+1}$ as: \[ \mathcal{X}_S(x) = (-1)^{(\sum_{i \in S} x_i)} = \begin{cases} 1 & \text{if $\oplus_{i \in S}~ x_i = 0$} \\ -1 & \text{if $\oplus_{i \in S}~ x_i = 1$} \end{cases}. \] The \emph{Fourier transform} of $f: \set{0,1}^{n} \rightarrow \ensuremath{\mathbb{R}}$ is a function $\widehat{f} : 2^{[n]} \rightarrow \ensuremath{\mathbb{R}}$ such that: \[ \widehat{f}(S) = \inner{f}{\mathcal{X}_S} = \sum_{x \in \set{0,1}^n} \frac{1}{2^n} \cdot f(x) \cdot \mathcal{X}_S(x). \] We refer to each $\widehat{f}(S)$ as a \emph{Fourier coefficient}. \medskip We use the following \emph{KKL inequality} due to~\cite{KahnKL88}, for bounding sum of \emph{squared} of Fourier coefficients in our proofs. \begin{proposition}[\!\cite{KahnKL88}]\label{prop:kkl} For every function $f \in \set{0,1}^n \rightarrow \set{-1,0,+1}$ and every $\gamma \in (0,1)$ \[ \sum_{S \subseteq [n]} \gamma^{\card{S}} \cdot \widehat{f}(S)^2 \leq \paren{\frac{\supp{f}}{2^n}}^{\frac{2}{1+\gamma}}. \] \end{proposition} \section{Basic Tools From Information Theory}\label{sec:info} We now briefly introduce some definitions and facts from information theory that are needed in this paper. We refer the interested reader to the textbook by Cover and Thomas~\cite{CoverT06} for an excellent introduction to this field. For a random variable $\rv{A}$, we use $\supp{\rv{A}}$ to denote the support of $\rv{A}$ and $\distribution{\rv{A}}$ to denote its distribution. When it is clear from the context, we may abuse the notation and use $\rv{A}$ directly instead of $\distribution{\rv{A}}$, for example, write $A \sim \rv{A}$ to mean $A \sim \distribution{\rv{A}}$, i.e., $A$ is sampled from the distribution of random variable $\rv{A}$. We denote the \emph{Shannon Entropy} of a random variable $\rv{A}$ by $\en{\rv{A}}$, which is defined as: \begin{align} \en{\rv{A}} := \sum_{A \in \supp{\rv{A}}} \Pr\paren{\rv{A} = A} \cdot \log{\paren{1/\Pr\paren{\rv{A} = A}}} \label{eq:entropy} \end{align} \noindent The \emph{conditional entropy} of $\rv{A}$ conditioned on $\rv{B}$ is denoted by $\en{\rv{A} \mid \rv{B}}$ and defined as: \begin{align} \en{\rv{A} \mid \rv{B}} := \Exp_{B \sim \rv{B}} \bracket{\en{\rv{A} \mid \rv{B} = B}}, \label{eq:cond-entropy} \end{align} where $\en{\rv{A} \mid \rv{B} = B}$ is defined in a standard way by using the distribution of $\rv{A}$ conditioned on the event $\rv{B} = B$ in Eq~(\ref{eq:entropy}). The \emph{mutual information} of two random variables $\rv{A}$ and $\rv{B}$ is denoted by $\mi{\rv{A}}{\rv{B}}$ and defined as: \begin{align} \mi{\rv{A}}{\rv{B}} := \en{\rv{A}} - \en{\rv{A} \mid \rv{B}} = \en{\rv{B}} - \en{\rv{B} \mid \rv{A}}. \label{eq:mi} \end{align} \noindent The \emph{conditional mutual information} $\mi{\rv{A}}{\rv{B} \mid \rv{C}}$ is $\en{\rv{A} \mid \rv{C}} - \en{\rv{A} \mid \rv{B},\rv{C}}$ and hence by linearity of expectation: \begin{align} \mi{\rv{A}}{\rv{B} \mid \rv{C}} = \Exp_{C \sim \rv{C}} \bracket{\mi{\rv{A}}{\rv{B} \mid \rv{C} = C}}. \label{eq:cond-mi} \end{align} Finally, we use $H_2$ to denote the \emph{binary Entropy function} where for any real number $ \delta \in (0,1)$, we define: \begin{align} H_2(\delta) = \delta\log{\frac{1}{\delta}} + (1-\delta)\log{\frac{1}{1-\delta}}, \end{align} i.e., the entropy of a Bernoulli random variable with mean $\delta$. \subsection{Useful Properties of Entropy and Mutual Information}\label{sec:prop-en-mi} We use the following basic properties of entropy and mutual information throughout. \begin{fact}[cf.~\cite{CoverT06}]\label{fact:it-facts} Let $\rv{A}$, $\rv{B}$, $\rv{C}$, and $\rv{D}$ be four (possibly correlated) random variables. \begin{enumerate} \item \label{part:uniform} $0 \leq \en{\rv{A}} \leq \log{\card{\supp{\rv{A}}}}$. The right equality holds iff $\distribution{\rv{A}}$ is uniform. \item \label{part:info-zero} $\mi{\rv{A}}{\rv{B}}[\rv{C}] \geq 0$. The equality holds iff $\rv{A}$ and $\rv{B}$ are \emph{independent} conditioned on $\rv{C}$. \item \label{part:cond-reduce} \emph{Conditioning on a random variable reduces entropy}: $\en{\rv{A} \mid \rv{B},\rv{C}} \leq \en{\rv{A} \mid \rv{B}}$. The equality holds iff $\rv{A} \perp \rv{C} \mid \rv{B}$. At the same time, $\en{\rv{A} \mid \rv{B},\rv{C}} \geq \en{\rv{A} \mid \rv{B}} - \en{\rv{C}}$. \item \label{part:sub-additivity} \emph{Subadditivity of entropy}: $\en{\rv{A},\rv{B} \mid \rv{C}} \leq \en{\rv{A} \mid C} + \en{\rv{B} \mid \rv{C}}$. \item \label{part:ent-chain-rule} \emph{Chain rule for entropy}: $\en{\rv{A},\rv{B} \mid \rv{C}} = \en{\rv{A} \mid \rv{C}} + \en{\rv{B} \mid \rv{C},\rv{A}}$. \item \label{part:chain-rule} \emph{Chain rule for mutual information}: $\mi{\rv{A},\rv{B}}{\rv{C} \mid \rv{D}} = \mi{\rv{A}}{\rv{C} \mid \rv{D}} + \mi{\rv{B}}{\rv{C} \mid \rv{A},\rv{D}}$. \item \label{part:data-processing} \emph{Data processing inequality}: for a deterministic function $f(\rv{A})$, $\mi{f(\rv{A})}{\rv{B} \mid \rv{C}} \leq \mi{\rv{A}}{\rv{B} \mid \rv{C}}$. \end{enumerate} \end{fact} \noindent We also use the following two standard propositions, regarding the effect of conditioning on mutual information. \begin{proposition}\label{prop:info-increase} For random variables $\rv{A}, \rv{B}, \rv{C}, \rv{D}$, if $\rv{A} \perp \rv{D} \mid \rv{C}$, then, \[\mi{\rv{A}}{\rv{B} \mid \rv{C}} \leq \mi{\rv{A}}{\rv{B} \mid \rv{C}, \rv{D}}.\] \end{proposition} \begin{proof} Since $\rv{A}$ and $\rv{D}$ are independent conditioned on $\rv{C}$, by \itfacts{cond-reduce}, $\ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}) = \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{D})$ and $\ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{B}) \ge \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{B}, \rv{D})$. We have, \begin{align*} \mi{\rv{A}}{\rv{B} \mid \rv{C}} &= \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{B}) = \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{D}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{B}) \\ &\leq \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{D}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}, \rv{B}, \rv{D}) = \mi{\rv{A}}{\rv{B} \mid \rv{C}, \rv{D}}. \qed \end{align*} \end{proof} \begin{proposition}\label{prop:info-decrease} For random variables $\rv{A}, \rv{B}, \rv{C},\rv{D}$, if $ \rv{A} \perp \rv{D} \mid \rv{B},\rv{C}$, then, \[\mi{\rv{A}}{\rv{B} \mid \rv{C}} \geq \mi{\rv{A}}{\rv{B} \mid \rv{C}, \rv{D}}.\] \end{proposition} \begin{proof} Since $\rv{A} \perp \rv{D} \mid \rv{B},\rv{C}$, by \itfacts{cond-reduce}, $\ensuremath{\mathbb{H}}(\rv{A} \mid \rv{B},\rv{C}) = \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{B},\rv{C},\rv{D})$. Moreover, since conditioning can only reduce the entropy (again by \itfacts{cond-reduce}), \begin{align*} \mi{\rv{A}}{\rv{B} \mid \rv{C}} &= \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{C}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{B},\rv{C}) \geq \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{D},\rv{C}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{B},\rv{C}) \\ &= \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{D},\rv{C}) - \ensuremath{\mathbb{H}}(\rv{A} \mid \rv{B},\rv{C},\rv{D}) = \mi{\rv{A}}{\rv{B} \mid \rv{C},\rv{D}}. \qed \end{align*} \end{proof} \subsection{Measures of Distance Between Distributions}\label{sec:prob-distance} We will use the following two standard measures of distance (or divergence) between distributions. \paragraph{KL-divergence.} For two distributions $\mu$ and $\nu$, the \emph{Kullback-Leibler divergence} between $\mu$ and $\nu$ is denoted by $\kl{\mu}{\nu}$ and defined as: \begin{align} \kl{\mu}{\nu}:= \Exp_{a \sim \mu}\Bracket{\log\frac{\Pr_\mu(a)}{\Pr_{\nu}(a)}}. \label{eq:kl} \end{align} The following states the relation between mutual information and KL-divergence. \begin{fact}\label{fact:kl-info} For random variables $\rv{A},\rv{B},\rv{C}$, \[\mi{\rv{A}}{\rv{B} \mid \rv{C}} = \Exp_{(b,c) \sim {(\rv{B},\rv{C})}}\Bracket{ \kl{\distribution{\rv{A} \mid \rv{B}=b,\rv{C}=c}}{\distribution{\rv{A} \mid \rv{C}=c}}}.\] \end{fact} \paragraph{Total variation distance.} We denote the total variation distance between two distributions $\mu$ and $\nu$ on the same support $\Omega$ by $\tvd{\mu}{\nu}$, defined as: \begin{align} \tvd{\mu}{\nu}:= \max_{\Omega' \subseteq \Omega} \paren{\mu(\Omega')-\nu(\Omega')} = \frac{1}{2} \cdot \sum_{x \in \Omega} \card{\mu(x) - \nu(x)}. \label{eq:tvd} \end{align} \noindent We use the following basic properties of total variation distance. \begin{fact}\label{fact:tvd-small} Suppose $\mu$ and $\nu$ are two distributions for a random variable $\rv{X}$, then, \[ \Exp_{\mu}\bracket{\rv{X}} \leq \Exp_{\nu}\bracket{\rv{X}} + \tvd{\mu}{\nu} \cdot \max_{X_0 \in \supp{\rv{X}}} X_0. \] \end{fact} \begin{fact}\label{fact:tvd-sample} Suppose $\mu$ and $\nu$ are two distributions over the same support $\Omega$; then, given one sample $s$ from either $\mu$ or $\nu$, the probability we can decide whether $s$ came from $\mu$ or $\nu$ is $\frac12 + \frac12\cdot\tvd{\mu}{\nu}$; alternatively, \[ \Exp_{s} \card{\Pr\paren{\mu \mid s} - \Pr\paren{\nu \mid s}} = \tvd{\mu}{\nu}. \] \end{fact} \begin{fact}\label{fact:tvd-chain-rule} Suppose $\mu$ and $\nu$ are two distributions for the tuple $(\rv{X}_1,\ldots,\rv{X}_t)$; then, \[ \tvd{\mu(\rv{X}_1,\ldots,\rv{X}_t)}{\nu(\rv{X}_1,\ldots,\rv{X}_t)} \leq \sum_{i=1}^{n} \Exp_{(X_1,\ldots,X_{i-1}) \sim \mu} \tvd{\mu(\rv{X}_i \mid X_1,\ldots,X_{i-1})}{\nu(\rv{X}_i \mid X_1,\ldots,X_{i-1})}. \] \end{fact} The following Pinsker's inequality bounds the total variation distance between two distributions based on their KL-divergence, \begin{fact}[Pinsker's inequality]\label{fact:pinskers} For any distributions $\mu$ and $\nu$, $ \tvd{\mu}{\nu} \leq \sqrt{\frac{1}{2} \cdot \kl{\mu}{\nu}}. $ \end{fact} \subsection{Some Auxiliary Lemmas} We use the following auxiliary lemmas in our proofs. The first lemma shows one typical way that one can see high entropy random variables as almost-uniform distributions. \begin{lemma}[cf.~\cite{AssadiKL17,AAAK17}]\label{lem:aux1} Suppose $\rv{A}$ is a random variable with $\en{\rv{A}} \geq \log{\card{\supp{\rv{A}}}} - \gamma$ for some $\gamma \geq 1$. Then, for any $\ensuremath{\varepsilon} > \exp(-\gamma)$, we have $\rv{A} = \sum_{l = 0}^{L} p_l \cdot \mu_l$ for $L = O(\gamma/\ensuremath{\varepsilon}^3)$ such that $p_0 = O(\ensuremath{\varepsilon})$ and for every $l \in L \setminus \set{0}$: \begin{itemize} \item $\log{\card{\supp{\mu_l}}} \geq \log{\card{\supp{\rv{A}}}} - \gamma/\ensuremath{\varepsilon}$; \item $\tvd{\mu_l}{{U}_l} = O(\ensuremath{\varepsilon})$, where ${U}_l$ is the uniform distribution on $\supp{\mu_l}$. \end{itemize} \end{lemma} \noindent The next lemma gives a simple of way of showing a distribution is (point wise) close to uniform. \begin{lemma}\label{lem:pair-uniform} Let $\rv{X}$ be any random variable such that for any pairs $X_1,X_2 \in \supp{\rv{X}}$, \[ \frac{1-\ensuremath{\varepsilon}}{2} \leq \Pr\paren{\rv{X} = X_1 \mid \rv{X} \in \set{X_1,X_2}} \leq \frac{1+\ensuremath{\varepsilon}}{2} \] for some $\ensuremath{\varepsilon} \in (0,1/2)$. Then, for every $X \in \supp{\rv{X}}$, \[ \frac{1-2\ensuremath{\varepsilon}}{\card{\supp{\rv{X}}}} \leq \Pr\paren{\rv{X} = X} \leq \frac{1+2\ensuremath{\varepsilon}}{\card{\supp{\rv{X}}}} \] \end{lemma} \begin{proof} Let $t = \card{\supp{\rv{X}}}$. Suppose there exist some $X \in \supp{\rv{X}}$ such that \[ p(X):= \Pr\paren{\rv{X} = X} < \frac{1-\ensuremath{\varepsilon}}{t}. \] This naturally implies that there exist at least one element $Y \in \supp{\rv{X}}$ such that \[ p(Y) := \Pr\paren{\rv{Y} = Y} > \frac{1}{t}, \] as otherwise the total sum of probabilities of atoms in $\supp{\rv{X}}$ will not add up to $1$. We have, \[ \Pr\paren{\rv{X} = X \mid \rv{X} \in \set{X,Y}} = \frac{p(X)}{p(X)+p(Y)} = \frac{1}{1+\frac{p(Y)}{p(X)}} < \frac{1}{1+\frac{1}{1-2\ensuremath{\varepsilon}}} = \frac{1-2\ensuremath{\varepsilon}}{2-2\ensuremath{\varepsilon}} < \frac{1-\ensuremath{\varepsilon}}{2}, \] contradicting the assumption in the lemma statement. The other case can be proven symmetrically, finalizing the proof. \end{proof} \section{A New Communication Game: Hidden-Matching} \label{sec:communication-game} We introduce the main communication game we study in this paper in this section. We start by presenting basic constructs we need to setup our communication game, and then present the game itself together with its underlying hard distribution. \subsection{Encoded-RS Graphs}\label{sec:encoded-rs} We define a simple way of encoding an $(r \times t)$-dimensional matrix inside any arbitrary $(r,t)$-RS graph, to obtain another RS graph with certain properties needed for our proofs. \begin{definition}[\textbf{Encoded-RS Graph}]\label{def:encoded-rs} Let $\ensuremath{G^{\mathsf{RS}}}\xspace=(L,R,\ensuremath{E^{\mathsf{RS}}}\xspace)$ be an $(r,t)$-RS graph with induced matchings $\ensuremath{M^{\mathsf{RS}}}\xspace_1,\ldots,\ensuremath{M^{\mathsf{RS}}}\xspace_t$ and $X \in \set{0,1}^{r \times t}$ be an $(r \times t)$-dimensional binary matrix. We define the \textbf{encoded-RS} graph of $G$ and $X$, denoted by $H:= \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$, as the following graph: \begin{itemize}[leftmargin=10pt] \item For any vertex $v \in V$, we create two vertices $a_v,b_v$ in $H$. We refer to $a_v,b_v$ as \textbf{representatives} of $v$ and denote them together by $\rep{v} := \set{a_v,b_v}$. \item For any induced matching $\ensuremath{M^{\mathsf{RS}}}\xspace_j$ and any edge $e_i = (u_i,v_i)$ of $\ensuremath{M^{\mathsf{RS}}}\xspace_j$: \begin{enumerate}[label=$(\roman*)$] \item if $X_{i,j} = 0$, we add two edges $(a_{u_i},a_{v_i})$ and $(b_{u_i},b_{v_i})$ to $H$; \item if $X_{i,j} = 1$, we add two edges $(a_{u_i},b_{v_i})$ and $(b_{u_i},a_{v_i})$ to $H$. \end{enumerate} We refer to the new matching in $H$ obtained from edges $\ensuremath{M^{\mathsf{RS}}}\xspace_j$ as the \textbf{representative} of $\ensuremath{M^{\mathsf{RS}}}\xspace_j$, and denote it by $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$. \end{itemize} \end{definition} \noindent \Cref{fig:encoded-rs} below gives an illustration. \begin{figure}[h!] \centering \subcaptionbox{\footnotesize A $(3,3)$-RS graph $G$.}% [.45\linewidth]{ \input{figs/fig-rs} } \hspace{0.4cm} \subcaptionbox{\footnotesize The graph $\textnormal{\texttt{Encoded-RS}}\xspace(G,X)$ for the $3 \times 3$ matrix $X:= [ 1 ~ 0 ~ 1 ~ ; ~ 0 ~ 0 ~ 0 ~ ; ~ 1 ~ 1 ~ 0 ]$.}% [.45\linewidth]{ \input{figs/fig-encoded-rs} } \caption{An illustration of RS graphs and encoded-RS graphs.} \label{fig:encoded-rs} \end{figure} \begin{observation}\label{obs:encoded-rs} For any $(2n)$-vertex $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace$ and $(r \times t)$-dimensional matrix $X$, the graph $H:= \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$ is a $(4n)$-vertex $(2r,t)$-RS graph. \end{observation} \begin{proof} For any induced matching $\ensuremath{M^{\mathsf{RS}}}\xspace$ in $\ensuremath{G^{\mathsf{RS}}}\xspace$, the matching $M = \rep{\ensuremath{M^{\mathsf{RS}}}\xspace}$ has size $2r$ in $H$. Moreover, $M$ is induced as each edge $(u,v) \in \ensuremath{M^{\mathsf{RS}}}\xspace$ is translated to a perfect matching between $\rep{u}$ and $\rep{v}$ in $H$; thus any edge violating the induced property of $M$ in $H$ would correspond to an edge violating induced property of $\ensuremath{M^{\mathsf{RS}}}\xspace$ in $\ensuremath{G^{\mathsf{RS}}}\xspace$ as well, which is not possible. \end{proof} \paragraph{Augmenting edges and paths.} A key definition in encoded-RS graphs is the following. \begin{definition}[\textbf{Augmenting Edges/Path}]\label{def:augmenting-edges} Consider any $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace=(L,R,\ensuremath{E^{\mathsf{RS}}}\xspace)$, $(r \times t)$ binary matrix $X$, index $j \in [t]$, and a sequence $\vec{u} = (u_1,\ldots,u_k)$ of $k \geq 2$ distinct vertices in $L(\ensuremath{M^{\mathsf{RS}}}\xspace_j)$. Let $H=\textnormal{\texttt{Encoded-RS}}\xspace(G,X)$ and $v_i := \ensuremath{M^{\mathsf{RS}}}\xspace_j(u_i) \in R(\ensuremath{M^{\mathsf{RS}}}\xspace_j)$ for all $i \in [k]$. \noindent We define the \textbf{augmenting edges}, denoted by $AE := \textnormal{\texttt{Aug-Edges}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\vec{u})$, as the following edges on vertices of $H$ (note that these edges do \underline{not} belong to $H$): \begin{itemize} \item For any $i \in [k-1]$, add the edges $(a_{v_i},a_{u_{i+1}})$ and $(b_{v_i},b_{u_{i+1}})$ to $AE$ (by~\Cref{obs:encoded-rs}, these edges do not belong to $H$). \end{itemize} \noindent We define an \textbf{augmenting path}, denoted by $AP := \textnormal{\texttt{Aug-Paths}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\vec{u})$, as the following path on vertices of $H$ (consisting of edges from $H$ plus augmenting edges): \begin{itemize} \item There is a \underline{unique} path from $a_{u_1}$ to either $a_{v_k}$ or $b_{v_k}$ by alternatively following the edges of $R(\ensuremath{M^{\mathsf{RS}}}\xspace)$ in $H$ and augmenting edges in $AE$. We denote this path by $AP(\vec{u})$ and refer to it as an augmenting path. We further use $\start{AP(\vec{u})} = a_{u_1}$ and $\eend{AP(\vec{u})} \in \set{a_{v_k},b_{v_k}}$ to denote the start and end vertex of the path. \end{itemize} \end{definition} \noindent \Cref{fig:aug-edge} below gives an illustration. \begin{figure}[h!] \centering \input{figs/fig-encoded-rs-2} \caption{An illustration of augmenting edges and paths. Here, $\ensuremath{M^{\mathsf{RS}}}\xspace$ is the left induced matching, thick (red) edges denote the representative matching of $\ensuremath{M^{\mathsf{RS}}}\xspace$ in $H$, and dashed (green) edges are augmenting edges. An augmenting path here starts from a top vertex corresponding to $u_1$ and follows thick (red) and dashed (green) edges alternatively to end up at a unique bottom vertex.} \label{fig:aug-edge} \end{figure} The following observation summarizes the main property of encoded-RS graphs and augmenting paths that we use in our proofs. \begin{observation}\label{obs:aug-path} Consider augmenting paths $AP := \textnormal{\texttt{Aug-Paths}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\vec{u})$. Then, \begin{enumerate}[label=$(\roman*)$] \item if $X_{i_1,j} \oplus \cdots \oplus X_{i_k,j} = 0$, we have $\eend{AP(\vec{u})}={a_{v_{i_k}}}$; \item if $X_{i_1,j} \oplus \cdots \oplus X_{i_k,j} = 1$, we have $\eend{AP(\vec{u})}={b_{v_{i_k}}}$. \end{enumerate} \end{observation} \begin{proof} Consider $AP(\vec{u})$ which starts at $a_{u_{i_1}}$. The next vertex on this path is $a_{v_{i_1}}$ if $X_{i_1,j} = 0$ and $b_{v_{i_1}}$ if $X_{i_1,j} = 1$ (this is by construction of encoded-RS graphs). The vertex after that is $a_{u_{i_2}}$ if we were at $a_{v_{i_1}}$, and $b_{u_{i_2}}$ if we were instead at $b_{v_{i_1}}$ (this is by construction of augmenting paths). Continuing this inductively until the last vertex implies the observation. \end{proof} \subsection{Augmentation Graphs}\label{sec:augmentation-graphs} We now define a new construction that builds on top of encoded-RS graphs. We first need a quick notation. For any set $W \subseteq V$ of vertices, we say a collection $\mathcal{U}$ of $k$-sequences on $W$ is \emph{vertex-disjoint} if it consists of $k$-sequences $\vec{u}_i = (u_{i,1},\ldots,u_{i,k})$ such that the vertices used across these all sequences are distinct. \begin{definition}[\textbf{Augmentation Graph/Vertices}]\label{def:aug-graph} For any $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace=(L,R,\ensuremath{E^{\mathsf{RS}}}\xspace)$, $(r \times t)$ binary matrix $X$, index $j \in [t]$, and a collection $\mathcal{U}$ of vertex-disjoint $k$-sequences on $L(\ensuremath{M^{\mathsf{RS}}}\xspace_j)$, we define the \textbf{augmentation graph}, denoted by $A := \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\mathcal{U})$ as follows: \begin{itemize} \item $A$ is a graph on vertices of $H=\textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$ plus two new sets of vertices $P,Q$; \item $A$ consists of all augmenting edges $AE_i = \textnormal{\texttt{Aug-Edges}}\xspace(G,X,j,\vec{u}_i)$ for $\vec{u}_i \in \mathcal{U}$, plus a perfect matching between $P$ and vertices of $H$ \emph{not} matched by $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$, as well as a perfect matching between $Q$ and vertices of $\start{AP(\vec{u}_i)}$ for $\vec{u}_i$ in $\mathcal{U}$. We use $\bar{H}$ to denote this set of edges. \end{itemize} Finally, we define the following vertices in $A$, referred to collectively as \textbf{augmentation vertices}: \begin{align*} \aug{A} := \set{a_{v_{i,k}} \mid a_{v_{i,k}} = \eend{AP(\vec{u}_i)}}; \quad \baug{A} := \set{a_{v_{i,k}} \mid a_{v_{i,k}} \neq \eend{AP(\vec{u}_i)} }. \end{align*} (in words, $\aug{A}$ are end vertices of augmenting paths that are $a$-vertices, and $\baug{A}$ are those $a$-vertices whose corresponding augmenting paths end in a $b$-vertex instead). \end{definition} \noindent \Cref{fig:aug-graph} below gives an illustration. \begin{figure}[h!] \centering \input{figs/fig-aug-graph}4 \caption{An illustration of an augmentation graph $A$. All edges drawn belong to $A$ and dashed edges are augmenting edges -- these edges collectively form $\bar{H}$. The middle graph is the encoded-RS graph $H$, whose edges are omitted. } \label{fig:aug-graph} \end{figure} \begin{observation}\label{obs:augmentation-graph} For any $(2n)$-vertex $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace$ and collection $\mathcal{U}$ of $\ell$ vertex-disjoint $k$-sequences, the augmentation graph $A = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,*,*,\mathcal{U})$ has $8n-4r+\ell$ vertices. \end{observation} \begin{proof} $H = \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,*)$ has $4n$ vertices by~\Cref{obs:encoded-rs}; the set $P$ has $4 \cdot (n-r)$ vertices, and $Q$ has $\ell$ vertices. \end{proof} In the following lemmas, we establish the key properties of augmentation graphs that we need. \begin{lemma}\label{lem:augmentation-matching} For any $(2n)$-vertex $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace$ and $A = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\mathcal{U})$, there is a matching $M^*$ of size $4n-2r$ in $A$ that does \underline{not} match any of the augmentation vertices in $\aug{A}$. \end{lemma} \begin{proof} We construct the matching $M^*$ as follows: \begin{itemize} \item Add all edges in the perfect matching between $P$ and vertices of $H$ \emph{not} matched by $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ to $M^*$; these amount to $4(n-r)$ edges in total. \item Start with the induced matching $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ in $H$; for every $\vec{u}_i$ in $\mathcal{U}$, the edge of the perfect matching between $Q$ and $\start{AP(\vec{u}_i)}$, as well as the remainder of the path $AP(\vec{u}_i)$ form an \emph{alternating} path for $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ from $Q$ to $\eend{AP(\vec{u}_i)}$ (because length of $AP(\vec{u}_i)$ is always odd and we added one more edge to it). Add the edges obtained \emph{after} applying these alternating paths\footnote{Given that these paths are ``alternating'' and not ``augmenting'' at this point, our choice of the word ``augmenting paths'' in their definition may sound unnatural; however, in the final construction, which includes further addition to the graph, these paths indeed will become augmenting paths, hence the term (one can think of vertices in $\aug{A}$ as ready to be matched ``outside'').} on $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ to $M^*$; these amount to $2r$ edges in total. \end{itemize} It is straightforward to verify that $M^*$ is indeed a matching with size $4n-2r$ since vertices of $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j} \cup Q$ are disjoint from the vertices matched in the first part. Moreover, when we apply each alternating path consisting of the $Q$-edge and $AP(\vec{u}_i)$, the last vertex of the path, namely, $\eend{AP(\vec{u}_i)}$ becomes unmatched in $M^*$ as desired. \end{proof} \begin{lemma}\label{lem:augmentation-vc} For any $(2n)$-vertex $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace$ and $A = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\mathcal{U})$, there is a vertex cover $V^*$ of size $4n-2r$ in $A$ that includes all vertices in $\baug{A}$ and does \underline{not} include any vertex in $\aug{A}$. \end{lemma} \begin{proof} We construct the vertex cover $V^*$ as follows: \begin{itemize} \item Add all vertices of $H$ \emph{not} matched by $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ to $V^*$; these amount to $4(n-r)$ vertices. \item For any augmenting path $AP(\vec{u}_i)$, starting from $\start{AP(\vec{u}_i)}$, add every other alternating vertex on the path to $V^*$. Add the remaining vertices in $R(\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j})$ that were not part of augmenting paths to $V^*$. These vertices amount to $2r$ in total. \end{itemize} We first argue that $V^*$ is a vertex cover. The vertices added in the first part cover all edges except the ones with both endpoints in $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j} \cup Q$. Adding $\start{AP(\vec{u}_i)}$ for $\vec{u}_i \in \mathcal{U}$ also takes care of all edges incident on $Q$. Picking alternating vertices on the paths cover the edges of the paths. The only remaining edges are the ones in $\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j}$ and augmenting edges $AE$ that are not part of augmenting paths. They will all be covered by the inclusion of the very last set of vertices in $R(\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j})$ that are not in augmenting paths. Thus, $V^*$ is a vertex cover with size $4n-2r$. Furthermore, the alternating way of picking vertices in $AP(\vec{u}_i)$ plus the fact that length of these paths are odd, means that $\eend{AP(\vec{u}_i)}$ would not be part of $V^*$. This ensures that $V^*$ does not include any vertex from $\aug{A}$. Finally, since in the last step, we are picking vertices of $R(\rep{\ensuremath{M^{\mathsf{RS}}}\xspace_j})$ that are not in augmenting paths, we will be picking vertices in $\baug{A}$ in $V^*$. This concludes the proof. \end{proof} By duality of matching and vertex cover (\Cref{fact:vc-matching}),~\Cref{lem:augmentation-matching,lem:augmentation-vc} in particular imply that $M^*$ and $V^*$ are maximum matching and minimum vertex cover in $A$ (although we will not use this observation directly and work with the stronger statements in the lemmas). \subsubsection*{A Distribution over Augmentation Graphs} We define the following distribution over augmentation graphs. \begin{definition}[\textbf{Distribution $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace$}]\label{def:dist-aug} Fix an $(r,t)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace$, integer $k \geq 1$, and vector $Y \in \set{0,1}^{\ell}$ for some $\ell$ such that $k \cdot \ell < r$. We define $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace = \ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,Y,k)$ as the following distribution on augmentation graphs $A = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\mathcal{U})$ where $\mathcal{U}$ consists of $\ell$ vertex-disjoint $k$-sequences: \begin{enumerate} \item Sample index $j \in [t]$ uniformly at random; \item Sample matrix $X$ and collection $\mathcal{U}$ uniformly at random from all pairs such that: \begin{enumerate} \item if $Y_i = 0$, then the vertex $\eend{AP(\vec{u}_i)} \in \aug{A}$; \item otherwise, if $Y_i = 1$, then the vertex $\eend{AP(\vec{u}_i)} \in \baug{A}$. \end{enumerate} \item[] (recall that by~\Cref{obs:encoded-rs}, the choice of $\eend{AP(\vec{u}_i)}$ is only a function of $X$ and $\mathcal{U}$ after we conditioned on the choice of $j \in [t]$). \end{enumerate} \end{definition} We list some simple observations about this distribution. \begin{observation}\label{obs:dist-aug} In $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace = \ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,Y,k)$ for graphs $A = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X,j,\mathcal{U})$: \begin{enumerate}[label=$(\roman*)$] \item The choice of $j$ and $X$ are independent (consequently, $j$ and $H=\textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$ are also independent); \item Conditioned on the choice of $j$ and $\mathcal{U}$, the set $\aug{A} \sqcup \baug{A}$ is already fixed -- the partition between the two sets is then solely determined by $X$. \end{enumerate} \end{observation} The proofs are immediate and we omit them here. \subsection{The \textbf{Hidden-Matching} Game}\label{sec:game} We are finally ready to present our communication game. This is a two player communication game between Alice and Bob, called \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace (and follows the same rules described in~\Cref{sec:cc} unless specified otherwise). \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace goes in two \emph{phases} that loosely correspond to the two passes of streaming algorithms. We start with the parameters and input-independent parts. \paragraph{Parameters.} Let $\delta \in (0,1)$ be a fixed constant and $k,n_1 \geq 1$ be integers (think of $n_1$ as \emph{governing} the size of the final graph, and $k$ as a constant or a slow growing function (doubly-logarithmic) in the size of the graph). Consider a fixed $(2n_1)$-vertex $(r_1,t_1)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace_1$ and another $(2n_2)$-vertex $(r_2,t_2)$-RS graph $\ensuremath{G^{\mathsf{RS}}}\xspace_2$ where $r_2 = (k+\delta) \cdot n_1$. We shall emphasize that the parameters $r_1,t_1$ and their connection to $n_1$, as well as $t_2,n_2$ and their connection to $r_2$ are governed by the maximum density of RS graphs we would be able to use in this construction (see~\Cref{cor:stream-lower-RS}). These parameters and graphs are known to both players. \paragraph{Phase I.} The first phase goes as follows (see~\Cref{fig:phase1} for an illustration of this phase): \smallskip \begin{figure}[h!] \centering \input{figs/fig-phase1} \caption{An illustration of a the \textbf{first phase} of the \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace game. The vertices with zero edges given to Alice and Bob are omitted from this figure. The middle graph (red edges) is given to Alice and the outer graphs (blue edges) are given to Bob as input in the first phase.} \label{fig:phase1} \end{figure} \begin{itemize} \item Initially, Alice receives a copy of $\ensuremath{G^{\mathsf{RS}}}\xspace_1$ such that each edge is removed independently with probability $\delta$. We refer to this graph as $G_A$. \item We sample $j_1 \in [t_1]$ uniformly at random and let: \begin{itemize} \item $Y_L$ to be the characteristic vector of $L(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ in $\ensuremath{G^{\mathsf{RS}}}\xspace_1$; \item $Y_R$ to be the characteristic vector of $R(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ in $\ensuremath{G^{\mathsf{RS}}}\xspace_1$. \end{itemize} \item We sample two independent augmentation graphs: \begin{itemize} \item $A_L \sim \ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,Y_L,k)$ such that $A_L = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,X_L,j_{L},\mathcal{U}_L)$, where $A_L$ includes an encoded-RS graph $H_L = \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,X_L)$ and remaining edges $\bar{H}_L$; \item $A_R \sim \ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,Y_R,k)$ such that $A_R = \textnormal{\texttt{Aug-Graph}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,X_R,j_{R},\mathcal{U}_R)$, where $A_R$ includes an encoded-RS graph $H_R = \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,X_R)$ and remaining edges $\bar{H}_R$. \end{itemize} \item Bob receives the edges of $H_L$ and $H_R$ in this phase, referred to as the graph $G_B$. \item At this point, the players run the first round of communication by Alice sending a single message to Bob and Bob responding back with his message. \end{itemize} This concludes the first phase of the game. Note that at this point, some edges of $A_L$ and $A_R$ have not been given to either player. \paragraph{Phase II.} We now present the second phase (see~\Cref{fig:phase2} for an illustration of this phase): \begin{figure}[h!] \centering \input{figs/fig-phase2} \caption{An illustration of a the \textbf{second phase} of the \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace game. The solid (green) edges are the ones presented to both players in the second phase. The dashed (red or blue) edges correspond to induced matchings in first phase that play a critical role in the second phase (corresponding to indices $j_1,j_L,j_R$). The remaining edges from the first phase are omitted in this figure. The hatched part in $A_L$ and $A_R$ correspond to $\aug{A_L}$ and $\aug{A_R}$, respectively, and are connected to the hidden matching with dashed (red) edges in $G_A$. The double-hatched part in $A_L$ and $A_R$ are vertices of $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_L}$ and $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_R}$ that are \underline{not} incident on augmenting edges. } \label{fig:phase2} \end{figure} \begin{itemize} \item Define the following two matchings between vertices of $G_A$ and $H_L$ and $H_R$, respectively: \begin{itemize} \item $M_{L}$: a matching between every $a_i \in \aug{A_L} \cup \baug{A_L}$ and $v_i \in L(G_A)$; \item $M_{R}$: a matching between every $a_i \in \aug{A_R} \cup \baug{A_R}$ and $v_i \in R(G_A)$. \end{itemize} \item We give the matchings $M_L$ and $M_R$, as well as edges $\bar{H}_L$ and $\bar{H}_R$ as input to \emph{both} players, denoted by the graph $G_2$. We also reveal the index $j_1$ \emph{but only} to Bob. \item The players run the second round of the protocol by Alice sending a message to Bob, and Bob outputting the following answer defined below. \item The goal is for Bob to output as many edges as possible from the \textbf{hidden matching} $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ that appear in the graph $G_A$ of Alice, while outputting no edge that does not belong to $G_A$. \end{itemize} This finalizes the second phase and the overall description of the game. \begin{observation}\label{obs:game-size} For any parameters $(n_1,n_2,r_1,r_2)$ of $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$, a graph $G$ sampled from $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ is a $(2n)$-vertex bipartite graph for $n= 8n_2-4r_2+2n_1$. \end{observation} \begin{proof} $A_L$ and $A_R$ each has $8n_2-4r_2+n_1$ vertices by~\Cref{obs:augmentation-graph}, and $G_A$ has $2n_1$ vertices. The bipartition of $G$ into $L$ and $R$ has equal size, thus the bound follows. \end{proof} Finally, we need the following independence property. \begin{observation}\label{obs:game-ind} In $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$, the graphs $G_A$ and $(G_B,G_2)$ are chosen {independently}. \end{observation} \begin{proof} The choice of $G_A$ from $\ensuremath{G^{\mathsf{RS}}}\xspace_1$ is independent of all other variables in the game. \end{proof} \subsubsection*{Cost and Value of Protocols for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$} We conclude with the following definitions on the performance of protocols for \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace. \begin{definition} Let $\pi$ be a protocol for the $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ game. We define: \begin{itemize} \item $\ensuremath{\mathsf{C}}{\pi}$: the \textbf{communication cost} of $\pi$, which is the \underline{worst-case} number of bits communicated by Alice and Bob in $\pi$ on any input to $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. \item $\out{\pi,G}$: the \textbf{output} of $\pi$ on input $G$ sampled from $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$, which is the set of edges output by Bob that belong to the hidden matching. We will denote $\out{\pi,G} = \emptyset$ if Bob outputs an edge that does \underline{not} belong to the input $G_A$ of Alice. \item $\val{\pi}$: The \textbf{value} of $\pi$ is the \underline{expected value} of size of outputs of $\pi$ on inputs sampled from $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$, i.e., \[ \val{\pi} := \Exp_{G} \card{\out{\pi,G}}. \] \end{itemize} \end{definition} Our goal in analyzing $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ is then to understand the tradeoff between the communication cost and the value obtained by protocols for this game. \subsection{Hidden-Matching Game and Streaming Maximum Matching}\label{sec:game-stream} We conclude this section by establishing a connection between best possible performance of protocols for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ and the streaming complexity of maximum matching. This will in turn allows us to prove lower bounds for streaming matching via lower bounding communication cost of protocols for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. Formally, \begin{lemma}\label{lem:game-stream} Consider the parameters $(n_1,n_2,r_1,r_2,\delta)$ of $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. Suppose there exists a two-pass streaming algorithm with space $s(n)$ on $(2n)$-vertex bipartite graphs for $n= 8n_2-4r_2+2n_1$ that with probability at least $2/3$ achieves a $\paren{1-\beta}$-approximation to maximum matching for \[ \beta = \beta(n_1,n_2,r_1,r_2,\delta) = \frac{(1-4\delta) \cdot r_1}{n - (1+2\delta) \cdot r_1}. \] Then, there is a protocol $\pi$ for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ with: \[ \ensuremath{\mathsf{C}}{\pi} = O(s(n)) \qquad \text{and} \qquad \val{\pi} \geq \delta \cdot r_1. \] \end{lemma} \begin{proof} The proof follows the standard simulation of streaming algorithms via communication protocols. Let $\ensuremath{\mbox{\sc alg}}\xspace$ be the given streaming algorithm. Define the stream $\sigma = G_A \circ G_B \circ G_2$. We create the protocol $\pi$ as follows: \begin{tbox} \underline{The protocol $\pi$ for reduction between $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ and streaming maximum matching:} \begin{itemize} \item \textbf{Phase I:} Alice runs $\ensuremath{\mbox{\sc alg}}\xspace$ on $G_A$ and sends the memory content to Bob; Bob then runs $\ensuremath{\mbox{\sc alg}}\xspace$ on $G_B$ and sends back the memory content to Alice. \item \textbf{Phase II:} Alice runs $\ensuremath{\mbox{\sc alg}}\xspace$ on $G_2$; at this point, $\ensuremath{\mbox{\sc alg}}\xspace$ has made one pass over $\sigma$. Then, Alice runs $\ensuremath{\mbox{\sc alg}}\xspace$ again on $G_A$ and sends the memory content to Bob. Bob continues running $\ensuremath{\mbox{\sc alg}}\xspace$ on $G_B \circ G_2$, to finish two passes of $\ensuremath{\mbox{\sc alg}}\xspace$ on $\sigma$. \item \textbf{Answer:} Let $M$ be the matching returned by $\ensuremath{\mbox{\sc alg}}\xspace$ on $\sigma$. Bob outputs all edges of $M$ which belong to $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ in $\ensuremath{G^{\mathsf{RS}}}\xspace_1$; recall that the index $j_1$ is revealed to Bob in the second phase and $\ensuremath{G^{\mathsf{RS}}}\xspace_1$ is known a-priori. \end{itemize} \end{tbox} It is straightforward to verify that $\pi$ is a valid protocol for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. Moreover, as messages of players in $\pi$ corresponds to the memory content of $\ensuremath{\mbox{\sc alg}}\xspace$, we have that $\ensuremath{\mathsf{C}}{\pi} = O(s(n))$. We now analyze the value of this protocol in the following two claims. \begin{claim}\label{clm:game-perfect} W.p. $1-o(1)$, a graph $G \sim \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ has a matching $M^*$ of size $n-(1+2\delta) \cdot r_1$. \end{claim} \begin{proof} We create the matching $M^*$ in the following steps: \begin{enumerate}[label=$(\roman*)$] \item By~\Cref{lem:augmentation-matching}, there are matchings $M^*_L$ and $M^*_R$ in subgraphs $A_L$ and $A_R$ of $G$, respectively, with size $4n_2 - 2r_2$ each. We add these edges to $M^*$. \item By~\Cref{lem:augmentation-matching}, the matching $M^*$ so far leaves augmentation vertices in $\aug{A_L}$ and $\aug{A_R}$ unmatched. We additionally match these augmentation vertices to $n_1-r_1$ vertices of $L(\ensuremath{G^{\mathsf{RS}}}\xspace_1) \setminus L(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ and $R(\ensuremath{G^{\mathsf{RS}}}\xspace_1) \setminus R(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$, respectively, using the edges in $M_L$ and $M_R$. \item At this point, the only unmatched vertices in $M^*$ are vertices of $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$; we can match these to each other using the edges of $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ that appear in $G_A$. Since each edge is deleted independently with probability $\delta$, and by Chernoff bound ($r_1 \gg \delta^{-1}$ as the latter is constant), w.p. $1-o(1)$, we can match at least $(1-2\delta) \cdot r_1$ edges here as well. This concludes the construction of $M^*$. \end{enumerate} The size of $M^*$ is now: \[ \card{M^*} = 2 \cdot (4n_2 - 2r_2) + 2 \cdot (n_1 - r_1) + (1-2\delta) \cdot r_1 = n - (1+2\delta) \cdot r_1, \] w.p. $1-o(1)$, as desired. \Qed{clm:game-perfect} \end{proof} \begin{claim}\label{clm:game-alg} For any graph $G \sim \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$, size of any matching in $G$ that does not use edges of the hidden matching, i.e., size of maximum matching in $G \setminus \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$, is at most $n-2r_1$. \end{claim} \begin{proof} Define $\ensuremath{\widehat{G}} := G \setminus \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$. We prove that the minimum vertex cover size in $\ensuremath{\widehat{G}}$ is of size $n-2r_1$, which immediately proves the lemma by the duality of maximum matching and minimum vertex cover (\Cref{fact:vc-matching}). We create this vertex cover $V^*$ (of $\ensuremath{\widehat{G}}$) as follows: \begin{enumerate}[label=$(\roman*)$] \item By~\Cref{lem:augmentation-vc}, there are vertex covers $V^*_L$ and $V^*_R$ for subgraphs $A_L$ and $A_R$ of $\ensuremath{\widehat{G}}$, respectively, with size $4n_2 - 2r_2$ each. We add these to $V^*$ \item Again by~\Cref{lem:augmentation-vc}, the vertex cover $V^*$ currently includes all vertices in $\baug{A_L}$ and $\baug{A_R}$. Recall that these vertices are connected by matchings $M_L$ and $M_R$ to vertices of $L(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ and $R(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$. Thus, these subset of edges of $M_L$ and $M_R$ are also already covered. \item We further add vertices in $L(\ensuremath{G^{\mathsf{RS}}}\xspace_1) \setminus L(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ and $R(\ensuremath{G^{\mathsf{RS}}}\xspace_1) \setminus R(\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1})$ to $V^*$. This will cover all remaining edges of $M_L$ and $M_R$, as well as any edge in $G_A$ which does not belong to $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$. As such $V^*$ at this point is a vertex cover of $\ensuremath{\widehat{G}}$. \end{enumerate} The size of $V^*$ is now: \[ \card{V^*} = 2 \cdot (4n_2 - 2r_2) + 2 \cdot (n_1 - r_1) = n-2r_1, \] as desired. \Qed{clm:game-alg} \end{proof} We continue with the proof of~\Cref{lem:game-stream}. Conditioned on the event of~\Cref{clm:game-perfect} and that $\ensuremath{\mbox{\sc alg}}\xspace$ outputs a $(1-\beta)$-approximation (which happens w.p. $2/3$), we have that with probability $2/3 - o(1) > 1/2$, $\ensuremath{\mbox{\sc alg}}\xspace$ outputs a matching of size at least \[ (1-\beta) \cdot \paren{n-(1+2\delta) \cdot r_1} = (1-\frac{(1-4\delta) \cdot r_1}{n - (1+2\delta) \cdot r_1}) \cdot \paren{n-(1+2\delta) \cdot r_1} = n-2r_1 + 2\delta \cdot r_1. \] Combining this with~\Cref{clm:game-alg}, we have that, with probability at least $1/2$, the matching output by $\ensuremath{\mbox{\sc alg}}\xspace$ contains $2\delta \cdot r_1$ edges from $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ that belong to $G_A$ (and no edge that does not belong to $G$ as $\ensuremath{\mbox{\sc alg}}\xspace$ does not err in this case). Given that $\Pi$ will output all these edges in this case, we have, \[ \val{\Pi} = \Exp_{G} \card{\out{\Pi,G}} \geq \frac{1}{2} \cdot 2\delta \cdot r_1 = \delta \cdot r_1. \] This concludes the proof of~\Cref{lem:game-stream}. \Qed{lem:game-stream} \end{proof} \section{Introduction}\label{sec:intro} The semi-streaming model of computation, introduced in~\cite{FeigenbaumKMSZ05}, has been at the forefront of research on processing massive graphs. In this model, the edges of an $n$-vertex graph $G=(V,E)$ are arriving one by one in a stream; the algorithm can only make one or a small number of passes over the stream and use a limited space of $O(n \cdot \mbox{\rm poly}\!\log{(n)})$ to solve a given problem on the input graph, say find a spanning tree of $G$. In this paper, we focus on the \emph{maximum matching} problem in the semi-streaming model. The maximum matching problem has been a cornerstone of research on semi-streaming algorithms and been studied from numerous angles: single-pass algorithms~\cite{FeigenbaumKMSZ05,GoelKK12,Kapralov13,Kapralov21}, two-pass algorithms~\cite{KonradMM12,EsfandiariHM16,KaleT17,Konrad18}, $(1-\ensuremath{\varepsilon})$-approximation algorithms~\cite{McGregor05,AhnG11,EggertKMS12,AhnG18,Tirodkar18,GamlathKMS19,AssadiLT21,FischerMU21,AssadiJJST21}, random-order streams~\cite{KonradMM12,Konrad18,AssadiBBMS19,GamlathKMS19,FarhadiHMRR20,Bernstein20,AssadiB21}, dynamic streams~\cite{Konrad15,ChitnisCHM15,AssadiKLY16,ChitnisCEHMMV16, AssadiKL17,DarkK20}, weighted matchings~\cite{FeigenbaumKMSZ05,CrouchS14,PazS17,BernsteinDL21}, submodular matchings~\cite{ChakrabartiK14,ChekuriGQ15,LevinW21}, estimating size~\cite{KapralovKS14,EsfandiariHLMO15,BuryS15,McGregorV16,CormodeJMM17,McGregorV18,AssadiKL17,KapralovMNT20,AssadiKSY20,AssadiN21}, and exact algorithms and lower bounds~\cite{FeigenbaumKMSZ05,GuruswamiO13,AssadiR20,LiuSZ20,ChenKPSSY21,AssadiJJST21}, among others (this is by no means a comprehensive summary of prior results). In this paper, we focus on \textbf{proving lower bounds for constant-factor approximation} of the maximum matching problem via semi-streaming algorithms. A brief note on the history of this problem is in order. Alongside the introduction of semi-streaming model in~\cite{FeigenbaumKMSZ05}, the authors posed the problem of understanding approximation ratio of multi-pass algorithms for matchings. On the upper bound front, numerous results have since been shown for this problem, see, e.g.~\cite{McGregor05,AhnG11,KonradMM12,EggertKMS12,KaleT17,AhnG18,Konrad18,AssadiLT21,FischerMU21,Kapralov21,AssadiJJST21} and references therein. On the lower bound front however, the first result appeared almost a decade later in~\cite{GoelKK12} who showed that single-pass semi-streaming algorithms cannot achieve a better than $(\nicefrac23)$-approximation; this ratio was soon improved to $(1-\nicefrac{1}{e})$-approximation by~\cite{Kapralov13} and very recently to $(\frac{1}{1+\ln{2}})$ in~\cite{Kapralov21}. Yet, almost another decade since~\cite{GoelKK12}, we still lack \emph{any} lower bounds for (constant-factor) approximation of the matching problem even in two passes!\footnote{We note that lower bounds for computing \emph{exact} matching up to (almost) $\log{n}$ passes are proven in~\cite{GuruswamiO13}; see also~\cite{AssadiR20,ChenKPSSY21}. These lower bounds however at best can only rule out $(1-\frac{1}{n^{o(1)}})$-approximation algorithms even in a single pass.} \subsection{Our Contribution}\label{sec:results} We prove the first lower bound on the space complexity of \textbf{two-pass} semi-streaming algorithms that \textbf{approximate} the maximum matching problem. Our lower bound is parameterized by the density of \emph{\rs (RS) graphs} -- these are graphs whose edges can be partitioned into \emph{induced} matchings of size $\Theta(n)$ (see~\Cref{sec:rs}). We prove the following result: \begin{result}[\Cref{cor:stream-lower-RS}]\label{res:main} Any two-pass semi-streaming algorithm for maximum matching (even on bipartite graphs) has approximation ratio at least $1 - \Omega(\frac{\log{ \textnormal{\textsf{RS}}(n)}}{\log{ n}})$, where $\textnormal{\textsf{RS}}(n)$ denotes the maximum number of disjoint induced matchings of size $\Theta(n)$ in any $n$-vertex graph. \end{result} \noindent Let us put this result in some context. \smallskip \noindent Currently, it is known that \[ n^{\Omega(1/\!\log\log{n})} \Leq{\cite{FischerLNRRS02}} \textnormal{\textsf{RS}}(n) \Leq{\cite{FoxHS15}} \frac{n}{2^{O(\logstar{\!(n)})}}, \] and closing this (large) gap between upper and lower bounds has remained a notoriously difficult problem in combinatorics~\cite{FoxHS15} (see also~\cite{Gowers01,ConlonF13}). With this in mind, we can think of our main result in one of the following two ways: \begin{itemize} \item \emph{Conditional lower bound}: Under the plausible hypothesis that $\textnormal{\textsf{RS}}(n)$ can be $n^{\beta}$ for some \emph{constant} $\beta \in (0,1)$, our result would rule out certain {small-constant factor} approximation of maximum matching in two passes of the semi-streaming model; for instance, {assuming} $\textnormal{\textsf{RS}}(n) = n^{1-o(1)}$ (close to the current upper bounds), our lower bound states that no two-pass semi-streaming algorithm can achieve an approximation ratio of $0.98$ for the maximum matching problem (see~\Cref{cor:stream-lower-RS} for the details). For comparison, the best known approximation ratio of two-pass semi-streaming algorithms is the $(2-\sqrt{2}) \approx 0.585$-approximation of~\cite{Konrad18} (see also~\cite{EsfandiariHM16}) for bipartite graphs and~$0.53$-approximation of~\cite{KaleT17} for non-bipartite ones. \item \emph{Barrier result}: alternatively, our result can be interpreted that any sufficiently small constant factor approximation to matching in two-passes of semi-streaming model -- in particular, a $(1-\ensuremath{\varepsilon})$-approximation algorithm -- needs to (at the very least) improve the upper bound on $\textnormal{\textsf{RS}}{(n)}$ from current bounds all the way to $n^{o(1)}$; this puts such a semi-streaming algorithm (seemingly) beyond the reach of current techniques. For comparison, current $(1-\ensuremath{\varepsilon})$-approximation semi-streaming algorithms require $O(\ensuremath{\varepsilon}^{-1} \cdot \log{n})$ passes for bipartite graphs~\cite{AssadiJJST21} and non-bipartite ones~\cite{AhnG18}, or $O(\ensuremath{\varepsilon}^{-2})$ passes~\cite{AhnG11,AssadiLT21} for bipartite and $O(\mbox{\rm poly}(\ensuremath{\varepsilon}^{-1}))$ for non-bipartite ones~\cite{FischerMU21}. \end{itemize} Finally, we shall note that, starting from~\cite{GoelKK12}, all previous single- and multi-pass lower bounds for semi-streaming matching problem in~\cite{GoelKK12,Kapralov13,AssadiKL17,AssadiR20,Kapralov21,ChenKPSSY21} were based on RS graphs -- the only exception is the lower bound result of~\cite{GuruswamiO13} that only holds for exact algorithms (and is improved upon by~\cite{AssadiR20,ChenKPSSY21}). Nevertheless, for previous multi-pass lower bounds, even if one assumes $\textnormal{\textsf{RS}}{(n)}$ to be as large as the current best upper bounds, the best approximation ratio ruled out is still $(1-\frac{1}{\text{polylog}{(n)}})$ proven by~\cite{ChenKPSSY21} (which would hold for (almost) $\log{n}$ passes under such an assumption on $\textnormal{\textsf{RS}}{(n)}$). \paragraph{Why \underline{two-pass} algorithms?}Traditionally, two-pass semi-streaming algorithms have been studied extensively as a way of breaking the lower bounds or barriers for single-pass algorithms. For instance,~\cite{KonradMM12,EsfandiariHM16,KaleT17,Konrad18} developed two-pass algorithms for matching with approximation ratio that breaks the notorious ``$(\nicefrac12)$-approximation barrier'' for current single-pass algorithms. Going beyond the matching problem, it is now a established phenomenon that two-pass algorithms can be surprisingly more powerful than single-pass ones; for instance,~\cite{AssadiD21} (building on~\cite{RubinsteinSW18,GhaffariNT20}), gave an $O(n)$ space algorithm for finding an exact minimum cut in two passes, while it is known that single-pass algorithms require $\Omega(n^2)$ space for this problem~\cite{Zelke11}; similar separations are also known for the triangle counting problem~\cite{BulteauFKP16,CormodeJ17}, among others. More recently, there has been a growing interest in proving lower bounds tailored specifically to two-pass streaming algorithms~\cite{AssadiR20,ChenKPS0Y21} (see also~\cite{GargRT19} for an example beyond graph streams). This line of work is motivated by both further understanding of two-pass algorithms as the ``second best option'' after single-pass algorithms, as well as a stepping stone for proving stronger multi-pass lower bounds; for instance, many of the ideas developed in the two-pass lower bound of~\cite{AssadiR20} (for reachability and exact matching) were used subsequently in the work of~\cite{ChenKPSSY21} that improved the lower bound to $\Omega(\sqrt{\log{n}})$-pass algorithms. Indeed, there are several technical difficulties in proving multi-pass lower bounds compared to single-pass ones which are already manifested when allowing two passes over the input; we elaborate on these challenges when going over our techniques in the subsequent section. \subsection{Our Techniques and Comparison with Prior Work}\label{sec:techniques} Our paper builds on and extend several lines of work on proving streaming lower bounds for single- and multi-pass algorithms: $(i)$ the single-pass RS-graph based lower bound approaches of~\cite{GoelKK12,Kapralov13,Kapralov21}, $(ii)$ the two-pass lower bound framework of~\cite{AssadiR20}, $(iii)$ the ``XOR gadgets'' approaches of~\cite{AssadiB21,ChenKPS0Y21}, and finally $(iv)$ streaming ``XOR Lemmas'' for proving lower bounds for XOR gadgets~\cite{AssadiN21,ChenKPS0Y21}. We now elaborate on each of these. \paragraph{$(i)$ Single-pass RS-graph based lower bound approaches of~\cite{GoelKK12,Kapralov13,Kapralov21}.} The idea behind the single-pass lower bound of~\cite{GoelKK12} is as follows. The first part of the stream consists of an RS graph with induced matchings of size $\Theta(n)$ (known a-priori) whose $o(1)$-fraction of its edges have been dropped randomly to increase its entropy to almost $\Omega(n \cdot \textnormal{\textsf{RS}}{(n)})$. The second part of the stream is created by sampling a random induced matching in the RS graph, and presenting a perfect matching from a new set of vertices to vertices of the RS graph \emph{not} participating in this induced matching. See~\Cref{fig:1-way} below. \begin{figure}[h!] \centering \input{figs/fig-1-way} \caption{An illustration of approach of~\cite{GoelKK12}. The RS graph, whose edges are dropped w.p. $o(1)$, appears first. The figure only draws edges of second part (solid blue) and the special induced matching of first part (dashed red).} \label{fig:1-way} \end{figure} This graph has a near perfect matching but all of its ``large enough'' matchings require using the edges of the special induced matching of the RS graph. At the same time, since the algorithm was oblivious to the identity of this special induced matching in the first part, assuming its memory was $o(n \cdot \textnormal{\textsf{RS}}{(n)})$, it would reduce the entropy of edges of this induced matching by $o(n)$. This only allows the algorithm to output $o(1)$ fraction of edges of the special induced matching at the end without the risk of outputting an edge which is dropped from the graph. The follow up work in~\cite{Kapralov13,Kapralov21} then extend this idea by considering multiple parts in the stream and keeping the identity of a large induced matching hidden until the end. Nevertheless, it can be seen that this lower bound is inherently tailored to single-pass algorithms: a two-pass algorithm would \emph{reveal} the identity of the special induced matching in the first pass and so in the next pass, the algorithm can simply store only these edges of the RS graph in $O(n)$ space. This is the first challenge we need to overcome in our work. \paragraph{$(ii)$ Two-pass lower bound framework of~\cite{AssadiR20}.} The work of~\cite{AssadiR20} developed a framework for proving two-pass lower bounds for several problems including \emph{exact} maximum matching. This framework also used RS graphs but \emph{in an entirely different way}, in particular, for ``hiding'' the information revealed to the second pass of the algorithm. In~\cite{AssadiR20}, the input graph consists of a random bipartite graph and two ``gadget RS graphs'' that each \emph{choose a single vertex} from this random graph, with the following property: the input has a perfect matching iff there is an edge between the chosen vertices. See~\Cref{fig:2-pass} for an illustration. \begin{figure}[h!] \centering \input{figs/fig-2-pass} \caption{An illustration of the framework of~\cite{AssadiR20}. The first part of the stream consists of a random graph, while the second part identify two vertices of this random graph as special using RS gadgets.} \label{fig:2-pass} \end{figure} Beyond going into exact details, we mention that the RS gadget has the following property that a single-pass streaming algorithm is not able to identify the special vertex chosen for the gadget. As such, even after the first pass of the stream, the identity of which edge of the random graph is important to ``remember'' is not known to the algorithm, thus the algorithm needs to remember essentially all edges of the random graph in the second pass in order to solve the problem. This lower bound is specifically tailored to the perfect matching problem: the RS gadget can only ``hide'' a single vertex, which is not suitable for lower bounds for approximation algorithms. Thus, the second challenge is to work with RS gadgets that allow for hiding more than vertices. \paragraph{$(iii)$ the ``XOR gadgets'' approaches of~\cite{AssadiB21,ChenKPS0Y21}.} The work of~\cite{AssadiB21} gave a lower bound of $(1-\Theta(\frac{1}{\log{n}}))$-approximation for semi-streaming algorithms of the matching problem in \emph{random-order} streams. The idea of the lower bound is to follow the approach of~\cite{GoelKK12} described in part $(i)$ above, but \emph{hide} the identity of the induced matching (in a random-order stream, revealing the first $O(n\log{n})$ edges of lower bound of~\cite{GoelKK12} reveals which of the induced matchings in the RS graph is special). This is done by replacing each of the edges of the perfect matching to vertices not in the special induced matching, by a path of length $\Theta(\log{n})$ that has an ``ON-OFF switch'': ``ON'' means we should leave the last vertex unmatched, and ``OFF'' means we should match it \emph{inside} the gadget. These paths are then put together in a way that only vertices of a random induced matching of the RS graph are ON and other vertices are OFF. See~\Cref{fig:part-3} below. \begin{figure}[h!] \centering \input{figs/fig-part-3} \caption{An illustration of the lower bound~\cite{AssadiB21}. The paths with their switch ON choose a special matching of the middle RS graph, whose edges should be used in every large matching of the input graph.} \label{fig:part-3} \end{figure} These paths, constructed using properties of the XOR function, have the property that even if one knows all but one edge of the path, it is still not clear whether the path is ON or OFF. Thus, in a random-order stream, with high probability, one edge from each of these paths (of length $\Theta(\log{n})$) are missing by the mid-point of the stream, forcing the algorithm to have to remember almost all of the edges of the RS graph visited so far. Concurrently to~\cite{AssadiB21},~\cite{ChenKPS0Y21} used a similar approach of using some type of XOR gadgets, combined with the framework of~\cite{AssadiR20} to hide more than one vertices of the graph from a single-pass algorithm. By an intricate combination of creating XOR of RS graphs, the authors of~\cite{ChenKPS0Y21} create a graph that have the following property: there is a set of $S$ of size $n^{1-o(1)}$ vertices with switches as described earlier, such that any $o(\log{n})$-pass semi-streaming algorithm cannot determine whether or not any of these vertices is ON or OFF. This allows the author to extend the lower bound of~\cite{AssadiR20} to $o(\log{n})$-pass algorithms that can approximate the matching to within a $(1-\frac{1}{n^{o(1)}})$-approximation. We note that while~\cite{ChenKPS0Y21} stops at getting a $(1-\frac{1}{n^{o(1)}})$-approximation, there is a natural way of combining their work and the approach of~\cite{GoelKK12} in part $(i)$ as in~\cite{AssadiB21}, so that the hidden set $S$ can determine which induced matching of the middle RS graph is special. See~\Cref{fig:part-4}. \begin{figure}[h!] \centering \input{figs/fig-part-4} \caption{An illustration of the lower bound~\cite{ChenKPS0Y21} if combined with the RS graph lower bound of~\cite{GoelKK12}. \label{fig:part-4} \end{figure} Nevertheless, the approach of~\cite{ChenKPS0Y21} requires plugging in $\Omega(\log{n})$ ``XOR of RS graphs'' gadgets together to get their lower bound, thus even with the above approach, the best lower bound would be $(1-\frac{1}{\Theta(\log{n})})$-approximation (even if we assume $\textnormal{\textsf{RS}}{(n)} = n^{1-o(1)}$). \paragraph{$(iv)$ ``XOR Lemmas'' for proving lower bounds for XOR gadgets~\cite{AssadiN21,ChenKPS0Y21}.} Finally, let us also mention how previous work proved lower bounds for XOR gadgets. Suppose we have a streaming problem $P$ from $\set{0,1}^n \rightarrow \set{0,1}$ such that solving $P(x)$ for $x$ sampled from some distribution $\mu$ with probability of success, say, $2/3$, requires $p$-passes and $s$-space. Then, how well can we solve $P(x_1) \oplus P(x_2) \oplus \ldots \oplus P(x_k)$ for $k$ \emph{independent} choices of $x_1,\ldots,x_k \sim \mu^k$ via streaming algorithms? Such questions are generally referred to as XOR lemmas (in-spirit-of Yao's celebrated XOR Lemma~\cite{Yao82a}), and are the key in proving streaming lower bounds for different ``XOR gadgets'' in prior work such as~\cite{AssadiN21,ChenKPS0Y21} which require ``low-probability'' lower bounds, i.e., lower bounds that rule out even $1/\mbox{\rm poly}{(n)}$ advantage over random guessing (crucial for ``hiding'' $\Omega(n)$ vertices by union bound/hybrid arguments). In particular, \begin{itemize} \item~\cite{AssadiN21} proves that in the streaming setting, any $p$-pass $s$-space algorithm for $\oplus_{i=1}^{k} P(x_i)$ on the stream $x_1 \circ x_2 \ldots \circ x_k$ can only gain an advantage of $1/2^{\Omega(k)}$ over random guessing (as shown in~\cite{AssadiN21}, this is the strongest form of XOR lemma possible in that setting). \item~\cite{ChenKPS0Y21} proves that in the special case of $P$ being the \emph{Indexing function} from communication complexity, any single-pass $o(k \cdot n^{1-\Omega(1)})$-space algorithm for $\oplus_{i=1}^{k} P(x_i)$ on a certain \emph{interleaved} stream of $(x_1,\ldots,x_k)$ can only gain an advantage of $1/n^{\Omega(k)}$ over random guessing. \end{itemize} The challenge in using either of these approaches for our purpose (say in a framework like~\Cref{fig:part-4}) is that they (naturally) require \emph{independent} input distributions for $x_1,\ldots,x_k$. In the context of the XOR gadget of RS graphs, this would force one to use \emph{multiple} RS graphs in the construction of the gadget. This in turn reduces the ratio of the number of edges in the hidden induced matching, to the total matching size of the graph, thus significantly reducing the bounds we can prove on the approximation ratio in the lower bounds. \subsubsection*{Our Approach} \vspace{-0.2cm} In brief, we combine the framework of part $(ii)$ with the approach of part $(i)$ to ``hide'' the special induced matching from the first pass of the streaming algorithm. To do the hiding, we use a \emph{new graph product} by plugging in the XOR gadget of part $(iii)$ into a \emph{single} induced matching of an RS graph (instead of using multiple RS graphs as in part $(iii)$). Finally, we prove a XOR lemma for the case that the inputs of XOR gadgets are not independent (coming from different RS graphs) but rather all are imposed on edges of a \emph{single} induced matching in an RS graph (as we will point out below, this requires an inherently different approach than part $(iv)$). See~\Cref{fig:tech} below. \vspace{-0.15cm} \begin{figure}[h!] \centering \input{figs/fig-tech} \caption{An illustration of our lower bound approach. The ``side'' graphs switching $S_1$ and $S_2$ are each a \emph{single} RS graph, where XOR gadgets are imposed as part of a \emph{single} one of their induced matchings.} \label{fig:tech} \end{figure} This way, we can prove that the first pass of the semi-streaming algorithm is not able to identify the switches of sets $S_1$ and $S_2$ in the construction above, thus leaving the identity of the special induced matching hidden. The crucial aspect of this part is that we can achieve such a gadget with size proportional to that of the hidden induced matching. In the second pass, we show that a semi-streaming algorithm that is unaware of the identity of the special induced matching in its second pass will not be able to obtain a sufficiently large approximation to the maximum matching. Several technical challenges need to be addressed in implementing this strategy. Beside the exact details of how to modify an RS graph to encode these gadgets without blowing up their size, and how to adapt the framework of~\cite{AssadiR20} to handle hiding subsets of vertices as opposed to single ones, the main challenge is in proving the required XOR Lemma. On a high level, the situation is as follows: each of the side RS graphs contain (roughly) $\textnormal{\textsf{RS}}{(n)}$ induced matchings of size $\Theta(n)$, \emph{one} of which is imposed by the XOR gadgets. The identity of these induced matchings is originally unknown to the algorithm. So we would like to say that a semi-streaming algorithm is not able to ``solve'' these XOR gadgets in its first pass. The problem with applying the approaches of either of~\cite{AssadiN21,ChenKPS0Y21} (part $(iv)$) is that our underlying XOR problems are \emph{correlated} by the choice of the induced matching they are imposed on. Concretely, while in the work of~\cite{AssadiN21,ChenKPS0Y21} one can prove lower bounds on the advantage of algorithms for any $1/\mbox{\rm poly}{(n)}$ (by modifying the constants), such a bound is simply not true in this setting; consider the algorithm that stores all edges of a random induced matching in the side RS graphs. With probability $\nicefrac1{\textnormal{\textsf{RS}}{(n)}} \geq \nicefrac1n$, such an algorithm has all the information to the underlying XOR gadgets and can solve them exactly! Consequently, there is no hope of following approaches of~\cite{AssadiN21,ChenKPS0Y21} that are oblivious to this challenge. Instead, we combine a simple direct-sum style argument using information theory with a Fourier analysis approach motivated by the classical work of~\cite{GavinskyKKRW07} in communication complexity (which has since been used extensively to prove streaming lower bounds following~\cite{VerbinY11}). In particular, we first show that with constant probability, the entropy of edges of the XOR gadgets is ``high'', and, conditioned on this event, we prove that XOR gadgets can hide their switches using a simple Fourier analysis approach, similar to that of~\cite{GavinskyKKRW07}. \subsection{Recent Related Work}\label{sec:rec-related} Independently and concurrently to our work, Konrad and Naidu~\cite{KonradN21} also studied two-pass semi-streaming algorithms for bipartite matching. They observed that currently all known two-pass streaming algorithms for maximum matching only run the greedy algorithm for maximal matching in their first pass. The goal of~\cite{KonradN21} was then to understand limitation of this particular family of algorithms. They proved that any two-pass semi-streaming algorithm that solely runs the greedy algorithm for maximal matching in its first pass, and then run an arbitrary semi-streaming algorithm in its second pass cannot achieve a better than $(2/3)$-approximation (the paper also presents another way of obtaining a $(2-\sqrt{2})$-approximation two-pass semi-streaming algorithm in addition to the work of~\cite{Konrad18}). The idea behind the proof of~\cite{KonradN21} is as follows. The authors work with the same hard instances of \cite{GoelKK12} that proved a $(2/3)$-approximation lower bound for (general) single-pass semi-streaming algorithms (discussed in part $(i)$ of~\Cref{sec:techniques}). They then ``feed'' a fixed perfect matching of the RS graph in this construction at the beginning of the stream to the greedy algorithm so that it does not pick any edges of the second part of the stream. As a result, the identity of the special induced matching of the RS graph remains hidden even after the first pass of this particular algorithm; thus, at the beginning of the second pass, the algorithm still needs to solve the hard problem of~\cite{GoelKK12} which is not possible in a single pass. We shall emphasize that the instances generated by~\cite{KonradN21} are not hard for arbitrary two-pass semi-streaming algorithms: one can simply ignore the edges of the extra perfect matching at the beginning of the stream and instead pick the edges that identify the special induced matching of the RS graph at the end of the stream; the second pass of the algorithm can then be spent to pick the edges of the special induced matching. This results in an $O(n)$ space algorithm that finds a perfect matching of the input graph. As such, the approach of~\cite{KonradN21} is tailored to the special family of algorithms introduced earlier. In contrast, our lower bound in this paper works for \emph{all} two-pass semi-streaming algorithms. Moreover, in terms of techniques, while our work also builds on the single-pass lower bound of~\cite{GoelKK12}, the bulk of technical work in our paper involves ``hiding'' the special induced matching of these hard instances from the first pass of arbitrary semi-streaming algorithms (which is entirely bypassed in~\cite{KonradN21} when one focuses on greedy algorithm in the first pass). As such, technique-wise, our work and~\cite{KonradN21} are almost entirely disjoint. \subsection{Setup and Notation} \label{sec:lower-1} In the following, we fix a choice of parameters $(k,n_1,n_2,r_1,r_2,\delta)$ for the $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. Let $\pi$ be any protocol for \ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace with $\ensuremath{\mathsf{C}}{\pi}$ as in~\Cref{thm:game}. Since $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ is a distributional game, we can assume without loss of generality by the easy direction of Yao's minimax principle that $\pi$ is deterministic. We shall upper bound $\val{\pi}$ in our proof. We will use the following notation: \begin{itemize}[leftmargin=10pt] \item $\Pi_{A1}$: the message of Alice in phase one -- $\Pi_{A1}$ is a deterministic function of $G_A$; \item $\Pi_{B1}$: the message of Bob in phase one -- $\Pi_{B1}$ is a deterministic function of $\Pi_{A1}$ and $G_B$; \item $Z_A = (\Pi_{A1},\Pi_{B1},G_2)$: the \emph{extra} information known to Alice in the second phase; \item $\Pi_{A2}$: the message of Alice in phase two -- $\Pi_{A2}$ is a deterministic function of $G_A$ and $Z_A$; \item $Z_B = (Z_A, \Pi_{A2}, j_1)$: the \emph{extra} information known to Bob in the second phase; \item $\Pi_{B2}$: the output edges of Bob in phase two -- $\Pi_{B2}$ is a deterministic function of $G_B$ and $Z_B$. \end{itemize} (Recall that sans serif fonts will refer to random variables for above parameters, e.g., $\rv{\Prot}_{A1}$ denote the random variable for $\Pi_{A1}$). \subsubsection*{Conditional Independence Properties} We establish the following conditional independence properties between the random variables above that will be crucial for our proofs. \begin{claim}[``Alice's second message does not depend on the hidden matching'']\label{clm:A2-j1-ZA} \[\rv{\Prot}_{A2} \perp \rv{J}_1 \mid \rv{Z}_A.\] \end{claim} \begin{proof} We have, \begin{align*} \mi{\rv{\Prot}_{A2}}{\rv{J}_1 \mid \rv{Z}_A} &= \mi{\rv{\Prot}_{A2}}{\rv{J}_1 \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2} \tag{by definition of $Z_A$} \\ &\leq \mi{\rv{\Prot}_{A2}}{\rv{G}_B \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2} \tag{by data processing inequality~(\itfacts{data-processing}), as augmentation graphs in $\rv{G}_B \cup \rv{G}_2$ determines $\rv{J}_1$} \\ &\leq \mi{\rv{G}_A}{\rv{G}_B \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2} \tag{by data processing inequality~(\itfacts{data-processing}), as $\rv{G}_A \cup \rv{Z}_A$ determines $\rv{\Prot}_{A2}$} \\ &\leq \mi{\rv{G}_A}{\rv{G}_B \mid \rv{\Prot}_{A1},\rv{G}_2} \tag{by~\Cref{prop:info-decrease} as $\rv{G}_A \perp \rv{\Prot}_{B1} \mid \rv{G}_B,\rv{\Prot}_{A1},\rv{G}_2$ as $\rv{\Prot}_{B1}$ is fixed by $\rv{\Prot}_{A1}$ and $\rv{G}_B$} \\ &\leq \mi{\rv{G}_A}{\rv{G}_B \mid \rv{G}_2} \tag{by~\Cref{prop:info-decrease} as $\rv{G}_B \perp \rv{\Prot}_{A1} \mid \rv{G}_A,\rv{G}_2$ as $\rv{\Prot}_{A1}$ is fixed by $\rv{G}_A$} \\ &= 0 \tag{by~\itfacts{info-zero} as $\rv{G}_A \perp \rv{G}_B \mid \rv{G}_2$ by~\Cref{obs:game-ind}}. \end{align*} The claim now follows from~\itfacts{info-zero}. \end{proof} \begin{claim}[``Alice's second message does not correlate her input with the hidden matching'']\label{clm:GA-j1-ZA-ProtA2} \[\rv{G}_A \perp \rv{J}_1 \mid \rv{Z}_A,\rv{\Prot}_{A2}.\] \end{claim} \begin{proof} We have, \begin{align*} \mi{\rv{G}_A}{\rv{J}_1 \mid \rv{Z}_A,\rv{\Prot}_{A2}} &= \mi{\rv{G}_A}{\rv{J}_1 \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2, \rv{\Prot}_{A2}} \tag{by definition of $Z_A$} \\ &\leq \mi{\rv{G}_A}{\rv{G}_B \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2,\rv{\Prot}_{A2}} \tag{by data processing inequality~(\itfacts{data-processing}), as augmentation graphs in $\rv{G}_B \cup \rv{G}_2$ determines $\rv{J}_1$} \\ &\leq \mi{\rv{G}_A}{\rv{G}_B \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2} \tag{by~\Cref{prop:info-decrease} as $\rv{G}_B \perp \rv{\Prot}_{A2} \mid \rv{G}_A,\rv{\Prot}_{A1},\rv{\Prot}_{B1},\rv{G}_2$ as $\rv{\Prot}_{A2}$ is fixed by $\rv{G}_A$,$\rv{\Prot}_{A1},\rv{\Prot}_{B1}$ and $\rv{G}_2$} \\ &= 0 \tag{as shown in the proof of~\Cref{clm:A2-j1-ZA}}. \end{align*} The claim now follows from~\itfacts{info-zero}. \end{proof} \begin{claim}[``Bob output is independent of hidden matching edges conditioned on his knowledge\footnote{We emphasize that Bob's output is certainly \emph{not} independent of hidden matching edges -- after all, Bob is outputting edges of this matching. However, Bob on his own does not know the hidden matching edges and thus is only ``conveying'' his knowledge (from Alice) about these edges to the output; thus, once we condition on Bob's knowledge, we can expect his output to become independent of the hidden matching edges in particular.}'']\label{clm:GB-GAcapMRSj1-ZB} \[\rv{\Prot}_{B2} \perp \rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B.\] \end{claim} \begin{proof} We have, \begin{align*} \mi{\rv{\Prot}_{B2}}{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B} &\leq \mi{\rv{G}_B}{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B} \tag{by data processing inequality~(\itfacts{data-processing}) as $\rv{\Prot}_{B2}$ is a deterministic function of $\rv{G}_B,\rv{Z}_B$} \\ &=\mi{\rv{G}_B}{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2,\rv{\Prot}_{A2}, \rv{J}_1} \tag{by definition of $Z_B$} \\ &\leq \mi{\rv{G}_B}{\rv{G}_A \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2,\rv{\Prot}_{A2},\rv{J}_1} \tag{by data processing inequality~(\itfacts{data-processing}), as $\rv{G}_A$ determines $\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}$ conditioned on $\rv{J}_1$} \\ &\leq \mi{\rv{G}_B}{\rv{G}_A \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2,\rv{\Prot}_{A2}} \tag{by~\Cref{prop:info-decrease} as $\rv{G}_A \perp \rv{J}_1 \mid \rv{G}_B,\rv{\Prot}_{A1},\rv{\Prot}_{B1}, \rv{G}_2,\rv{\Prot}_{A2}$ as $\rv{J}_1$ is fixed by $\rv{G}_B \cup \rv{G}_2$} \\ &= 0 \tag{as shown in the proof of~\Cref{clm:GA-j1-ZA-ProtA2}}. \end{align*} The claim now follows from~\itfacts{info-zero}. \end{proof} \subsection{Communication in Phase One} \label{sec:lower-2} In this section, we focus on the communication happening in the first phase and its effect on the ``knowledge'' of players given their second-phase inputs. In particular, the following lemma establishes that given the communication happening in the first phase plus the second-phase input \emph{to Alice}, the distribution of the hidden matching does not alter too much for her\footnote{Note that as opposed to Alice, for Bob, the second-phase input directly reveals the identity of the hidden matching.}. \begin{lemma}[``Alice still does not know hidden matching in the second phase'']\label{lem:phase-one} \[ \Exp_{Z_A \sim \rv{Z}_A}\tvd{\distribution{\rv{J}_1 \mid Z_A}}{\distribution{\rv{J}_1}} = o(1). \] \end{lemma} In words,~\Cref{lem:phase-one} states that even at the beginning of the second phase of the game, from the perspective of Alice, the distribution of the hidden matching index, namely, $j_1$, has effectively not changed from its original (uniform) distribution over $[t_1]$. The strategy for the proof of~\Cref{lem:phase-one} is as follows: we show that the messages communicated in the first phase (and in particular Bob's message) are not able to change the distribution of $X_L$ or $X_R$ enough for the distribution of $Y_L$ or $Y_R$, and subsequently $j_1$, to change sufficiently either. The heart of this proof is the following lemma that establishes a key property of augmentation graphs in \emph{hiding} the partitioning of augmentation vertices into $\aug{A} \sqcup \baug{A}$ (for $A \in \set{A_L,A_R}$). \begin{lemma}[``Augmentation graphs hide the partitioning into $\aug{\cdot}$ and $\baug{\cdot}$'']\label{lem:xor-lemma} Let $\ensuremath{G^{\mathsf{RS}}}\xspace$ be an $(r,t)$-RS graph and integers $k,\ell$ be such that $k \cdot \ell = (1-\delta) \cdot r$ for some absolute constant $\delta \in (0,1)$. Suppose we sample $X$ uniformly from $\set{0,1}^{r \times t}$ and let $H := \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$. Additionally, for any vector $Y \in \set{0,1}^{\ell}$, we let $\bar{H}(Y)$ be a graph obtained by sampling an augmentation graph $A$ from $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,Y,k)$ conditioned on encoded-RS graph of $A$ being $H$, and then letting $\bar{H}(Y)$ to be the edges $\bar{H}$ of $A$ outside the encoded-RS graph $H$. Consider any function $\phi :\supp{\rv{H}} \rightarrow \set{0,1}^s$ that encodes each graph $H$ to a message $\phi(H)$ of size $s = o(\delta \cdot t \cdot (\delta r)^{1-2/k})$. Then, w.p. $1-o(1)$ over the choice of encoding $\phi \sim \phi(\rv{H})$ for $\rv{H}$ chosen as above, the following event $\ensuremath{\mathcal{E}}(\phi)$ happens: \begin{itemize}[leftmargin=10pt] \item \textbf{Event $\ensuremath{\mathcal{E}}(\phi)$:} For any pairs of vectors $Y_1 \neq Y_2 \in \set{0,1}^{\ell}$, \[ \tvd{\distribution{\bar{\rv{H}}(Y_1) \mid \phi(\rv{H})=\phi}}{\distribution{\bar{\rv{H}}(Y_2) \mid \phi(\rv{H})=\phi}} = o(1). \] \end{itemize} \end{lemma} Let us parse~\Cref{lem:xor-lemma}: Suppose we are given an encoded-RS graph $H$ from $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace$, and we compress $H$ to a smaller message $\phi(H)$. Then, ``most'' of the times, namely, when the event $\ensuremath{\mathcal{E}}(\phi)$ happens, these encoded messages have the property that they are ``consistent'' with every possible augmentation graph for any choice of vector $Y \in \set{0,1}^{\ell}$; in other words, the distribution of $\bar{H}$ from $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace$ conditioned on either $\rv{Y} = Y_1$ or $ \rv{Y}=Y_2$ for any pairs of $Y_1,Y_2 \in \set{0,1}^{\ell}$ is almost identical. Put another way, given $\phi(H)$ and $\bar{H}$ (and conditioned on the event $\ensuremath{\mathcal{E}}(\phi)$), we will have ``no knowledge'' of partitioning of $\aug{A} \sqcup \baug{A}$ for the underlying augmentation graph $A$; hence, this partitioning is kept ``hidden'' from us. We postpone the proof of~\Cref{lem:xor-lemma} to~\Cref{sec:xor-lemma}. In the following, we show how to use this lemma to conclude the proof of~\Cref{lem:phase-one}. \begin{proof}[Proof of~\Cref{lem:phase-one}] We start with expressing the LHS based on the vectors $Y_L$ and $Y_R$ defined in $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. In particular, recall that by construction, the tuple $(\rv{Y}_L,\rv{Y}_R)$ is a deterministic function of $\rv{J}_1$ and vice versa. Thus, to prove~\Cref{lem:phase-one}, we can alternatively prove the following: \begin{align} \Exp_{Z_A \sim \rv{Z}_A}\tvd{\distribution{\rv{Y}_L,\rv{Y}_R \mid Z_A}}{\distribution{\rv{Y}_L,\rv{Y}_R}} = o(1). \label{eq:we-want-to-prove} \end{align} To do this, we need the following claim. \begin{claim}\label{clm:Y_L-Y_R} With probability $1-o(1)$ over the choice of $(\Pi_{A1},\Pi_{B1}) \sim (\rv{\Prot}_{A1},\rv{\Prot}_{B1})$, for any pairs of $(Y_{L1},Y_{R1})$ and $(Y_{L2},Y_{R2})$ in $\supp{(\rv{Y}_L,\rv{Y}_R)}$, \[ \tvd{\distribution{\rv{G}_2 \mid \rv{Y}_L=Y_{L1},\rv{Y}_{R} = Y_{R1}, \Pi_{A1},\Pi_{B1}}}{\distribution{\rv{G}_2 \mid \rv{Y}_L=Y_{L2},\rv{Y}_{R} = Y_{R2}, \Pi_{A1},\Pi_{B1}}} = o(1). \] \end{claim} \begin{proof} The proof is a combination of a simple hybrid argument plus a ``reduction'' to the compression setting of~\Cref{lem:xor-lemma}. To simplify the notation, in the following, we use $\Pi_1 = (\Pi_{A1},\Pi_{B1})$ to denote the messages communicated in the first phase, and when clear from the context, we only write $\mid Y_{L*}$ instead of $\mid \rv{Y}_L = Y_{L*}$ (similarly for $\rv{Y}_R$) to avoid the clutter in the notation. Firstly, \begin{align} \text{LHS of~\Cref{clm:Y_L-Y_R}} &= \tvd{\distribution{\rv{G}_2 \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R2}, \Pi_{1}}} \notag \\ &\leq \tvd{\distribution{\rv{G}_2 \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R1}, \Pi_{1}}} \notag \\ &\hspace{1cm} + \tvd{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R1}, \Pi_{1}}}{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R2}, \Pi_{1}}}, \label{eq:hybrid-2} \end{align} by triangle inequality. We note that the two hybrids defined in~\Cref{eq:hybrid-2} are not ``standard'' distributions in the context of $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ and will not arise there; we only use them here for the sake of the analysis. In particular, these distributions decorrelate the variables $\rv{Y}_L$ and $\rv{Y}_R$ from each other (while in $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ they are both tied to each other through the choice of $j_1$). We now bound each term in~\Cref{eq:hybrid-2} by $o(1)$. By symmetry, we only focus on the first term; the proof for the second term is identical. Recall that $G_2 = (\bar{H}_L,\bar{H}_R,M_L,M_R)$. We have, \begin{align*} &\tvd{\distribution{\rv{G}_2 \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R1}, \Pi_{1}}} \\ &\hspace{0.25cm} = \tvd{\distribution{\bar{\rv{H}}_L,\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_L,\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R\mid Y_{L2},Y_{R1}, \Pi_{1}}} \\ &\hspace{.25cm} \leq \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2},Y_{R1}, \Pi_{1}}} \\ &\hspace{0.5cm} + \Exp_{\bar{\rv{H}}_L \mid Y_{L1},Y_{R1}, \Pi_{1}} \!\tvd{\distribution{\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R \mid \bar{H}_L,Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R\mid \bar{H}_L,Y_{L2},Y_{R1}, \Pi_{1}}}, \tag{by~\Cref{fact:tvd-chain-rule}} \\ &\hspace{0.25cm} = \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1},\Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2}, \Pi_{1}}}, \end{align*} where the last equality is because of the following: \begin{itemize} \item $\bar{\rv{H}}_L \perp Y_{R1} \mid Y_{L*},\Pi_1$: the choice of $\bar{H}_L$ is part of the choice of $A_L$. Conditioned on $Y_{L*}$, the distribution of $A_L$ is $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,Y_{L*},k)$, independent of all other variables. This continues to be the case even after we condition $\Pi_1$ by the rectangle property of communication protocols as $A_R$ is entirely an input to Bob; this implies that \[ \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2},Y_{R1}, \Pi_{1}}} = \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1},\Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2}, \Pi_{1}}}, \] for the first term. \item $\bar{\rv{H}}_R \perp Y_{L*} \mid \bar{H}_L, Y_{R1},\Pi_1$: by the same exact argument as above; \item $\bar{\rv{M}}_L,\bar{\rv{M}}_R \perp Y_{L*} \mid \bar{H}_L,\bar{H}_R,\Pi_1$: conditioned on $\bar{\rv{H}}_L$ and $\bar{\rv{H}}_R$, these two matchings are deterministically fixed and thus have the same distribution. This and previous item implies that \[ \Exp_{\bar{\rv{H}}_L \mid Y_{L1},Y_{R1}, \Pi_{1}} \!\!\tvd{\distribution{\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R \mid \bar{H}_L,Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_R,\rv{M}_L,\rv{M}_R\mid \bar{H}_L,Y_{L2},Y_{R1}, \Pi_{1}}} = 0, \] for the second term, as the distributions are identical. \end{itemize} Consequently, we can conclude that \[ \tvd{\distribution{\rv{G}_2 \mid Y_{L1},Y_{R1}, \Pi_{1}}}{\distribution{\rv{G}_2 \mid Y_{L2},Y_{R1}, \Pi_{1}}} \leq \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2}, \Pi_{1}}}. \] Now note that RHS of this equation is exactly what is bounded in~\Cref{lem:xor-lemma}. In particular, we can think of $\Pi_1$ as a compression scheme for $H_L$ as follows: \begin{itemize} \item Given an encoded-RS graph $H=\textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace_2,X)$ in~\Cref{lem:xor-lemma}, we can sample the input of Alice and Bob in the first phase of the game from the distribution of the first hybrid in~\Cref{eq:hybrid-2} conditioned on $\rv{H} = H$ and $\rv{Y}_R = Y_{R1}$ always. \item The encoding function $\phi$ then maps $H$ into the message $\Pi_1$ of size $o(\delta \cdot t_2 \cdot (\delta r_2)^{1-2/k})$ by our assumption on $\ensuremath{\mathsf{C}}{\pi}$ (recall that $\delta$ is an absolute constant). \end{itemize} As such, by~\Cref{lem:xor-lemma}, we have that w.p. $1-o(1)$, for every choice of $Y_{L1},Y_{L2}$, \[ \tvd{\distribution{\bar{\rv{H}}_L \mid Y_{L1}, \Pi_{1}}}{\distribution{\bar{\rv{H}}_L \mid Y_{L2}, \Pi_{1}}} = o(1). \] Repeating the same argument for the second term of~\Cref{eq:hybrid-2} and plugging in the bound in the equation concludes the proof. \Qed{clm:Y_L-Y_R} \end{proof} We can now conclude the proof of~\Cref{lem:phase-one} as follows. By~\Cref{clm:Y_L-Y_R}, there is an event $\ensuremath{\mathcal{E}}$ depending of $\Pi_{A1},\Pi_{B1}$ that happens with probability $1-o(1)$, and conditioned on $\ensuremath{\mathcal{E}}$, \[ \tvd{\distribution{\rv{G}_2 \mid \rv{Y}_L=Y_{L1},\rv{Y}_{R} = Y_{R1}, \Pi_{A1},\Pi_{B1}}}{\distribution{\rv{G}_2 \mid \rv{Y}_L=Y_{L2},\rv{Y}_{R} = Y_{R2}, \Pi_{A1},\Pi_{B1}}} = o(1), \] for every pairs of $(Y_{L1},Y_{R1})$ and $(Y_{L2},Y_{R2})$. We condition on this event in the following. By~\Cref{fact:tvd-sample}, this means that given a graph $\rv{G}_2$ from a uniform mixture of $(Y_{L1},Y_{R1})$ and $(Y_{L2},Y_{R2})$ conditioned on $\Pi_{A1},\Pi_{B1}$, the probability that we can detect the origin of the sample is at most $\frac{1}{2} + o(1)$. By using this in~\Cref{lem:pair-uniform}, we obtain that \[ \Exp_{\rv{G}_2 \mid \Pi_{A1},\Pi_{B1}} \Pr\paren{(\rv{Y}_L,\rv{Y}_R)=(Y_L,Y_R) \mid G_2,\Pi_{A1},\Pi_{B1}} = \frac{1 \pm o(1)}{t_1}. \] Given that the original distribution of $(\rv{Y}_L,\rv{Y}_R)$ (with no conditioning) is also uniform over its support of size $t_1$, the above implies that conditioned on $\ensuremath{\mathcal{E}}$, \[ \Exp_{Z_A \sim \rv{Z}_A \mid \ensuremath{\mathcal{E}}}\tvd{\distribution{\rv{Y}_L,\rv{Y}_R \mid Z_A}}{\distribution{\rv{Y}_L,\rv{Y}_R}} = o(1). \] Given that $\ensuremath{\mathcal{E}}$ itself also happens with probability $1-o(1)$ (and TVD is bounded by $1$), we can conclude the proof of~\Cref{eq:we-want-to-prove}. This finalizes the proof of~\Cref{lem:phase-one}. \Qed{lem:phase-one} \end{proof} \subsection{Communication in Phase Two} \label{sec:lower-3} We now switch to the second phase of the game and show that the message communicated by Alice in the second phase is not that helpful to Bob in identifying the edges of the hidden matching. \begin{lemma}[``Bob's does not know the edges of the hidden matching in the second phase'']\label{lem:phase-two} \[ \mi{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}}{\rv{Z}_B} = o(r_1). \] \end{lemma} In words,~\Cref{lem:phase-two} states that the information between second-phase knowledge of Bob, $Z_B$, and the edges of the hidden matching is negligible (compared to the size of the hidden matching). \begin{proof}[Proof of~\Cref{lem:phase-two}] By definition, we can write the mutual information term in the lemma as: \begin{align} \mi{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}}{\rv{Z}_B} = \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}} - \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B}. \label{eq:mutual-info-term} \end{align} The first term above is simply $H_2(\delta) \cdot r_1$ as each of the $r$ edges of $\ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}$ is dropped independently with probability $\delta$. We can thus focus on bounding the second term. We have, \begin{align*} \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B} &= \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_A, \rv{\Prot}_{A2},\rv{J}_1} \tag{by the definition of $\rv{Z}_B$}\\ &= \Exp_{\rv{Z}_A, \rv{\Prot}_{A2},\rv{J}_1} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2},j_1}} \tag{by the definition of conditional entropy}\\ &= \Exp_{\rv{Z}_A, \rv{\Prot}_{A2},\rv{J}_1} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} \tag{by~\Cref{clm:GA-j1-ZA-ProtA2}, $\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \perp \rv{J}_1=j_1 \mid Z_A,\Pi_{A2}$ and so we can drop the conditioning on $j_1$} \\ &= \Exp_{\rv{Z}_A,\rv{\Prot}_{A2}} \Exp_{\rv{J}_1 \mid Z_A,\Pi_{A2}} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} \\ &= \Exp_{\rv{Z}_A,\rv{\Prot}_{A2}} \Exp_{\rv{J}_1 \mid Z_A} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} \tag{by~\Cref{clm:A2-j1-ZA}, $\rv{J}_1 \perp \rv{\Prot}_{A2}=\Pi_{A2} \mid Z_A$ and so we can drop the conditioning on $\Pi_{A2}$} \\ &\leq \Exp_{\rv{Z}_A,\rv{\Prot}_{A2}} \Exp_{\rv{J}_1} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} + \Exp_{Z_A \sim \rv{Z}_A}\tvd{\distribution{\rv{J}_1 \mid Z_A}}{\distribution{\rv{J}_1}} \cdot r_1, \end{align*} where in the last equation, we used~\Cref{fact:tvd-small} to change the distribution of $\rv{J}$ and ``pay'' the difference in the maximum value of the entropy term. By~\Cref{lem:phase-one}, we already have that the second term above is $o(r_1)$, so it remains to bound the first term, which is done in the following claim (we emphasize that in the following claim, $\rv{J}_1$ is chosen independent of $\rv{Z}_A,\rv{\Prot}_{A2}$ from its original distribution, which was uniform over $[t_1]$). \begin{claim}\label{clm:index-lb} $\Exp_{\rv{Z}_A,\rv{\Prot}_{A2}} \Exp_{\rv{J}_1} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} = H_2(\delta) \cdot r_1 - o(r_1).$ \end{claim} \begin{proof} Given that the distribution of $\rv{J}_1$ is uniform over $[t_1]$, and by the definition of $\rv{Z}_A$, we have, \begin{align*} \Exp_{\rv{Z}_A,\rv{\Prot}_{A2}} \Exp_{\rv{J}_1} \bracket{\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid Z_A,\Pi_{A2}}} &= \frac{1}{t_1} \cdot \sum_{j_1 = 1}^{t_1} {\en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1} \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1},\rv{\Prot}_{A2},\rv{G}_2}} \\ &\geq \frac{1}{t_1} \cdot \en{\rv{G}_A \mid \rv{\Prot}_{A1},\rv{\Prot}_{B1},\rv{\Prot}_{A2},\rv{G}_2} \tag{by the sub-additivity of entropy (\itfacts{sub-additivity}) as $\rv{G}_A := (\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{1},\ldots,\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{t_1})$} \\ &\geq \frac{1}{t_1} \cdot \paren{\en{\rv{G}_A \mid \rv{G}_2} - \en{\rv{\Prot}_{A1},\rv{\Prot}_{B1},\rv{\Prot}_{A2}}} \tag{by~\itfacts{cond-reduce}} \\ &= \frac{1}{t_1} \cdot \paren{\en{\rv{G}_A} - \en{\rv{\Prot}_{A1},\rv{\Prot}_{B1},\rv{\Prot}_{A2}}} \tag{as $\rv{G}_A \perp \rv{G}_2$ by~\Cref{obs:game-ind} and so we can apply~\itfacts{cond-reduce}} \\ &\geq \frac{1}{t_1} \cdot \paren{t_1 \cdot H_2(\delta) \cdot r_1 - o(t_1 \cdot r_1)} = H_2(\delta) \cdot r_1 - o(r_1), \end{align*} where in the last inequality, we used the fact that $\rv{G}_A$ consists of $t_1$ induced matchings whose edges are being dropped independently w.p. $\delta$, and that the size of the message communicated by Alice and Bob is at most $o(t_1 \cdot r_1)$. This concludes the proof of the claim. \Qed{clm:index-lb} \end{proof} We can now complete the proof of~\Cref{lem:phase-two}. By~\Cref{eq:mutual-info-term} and the discussion above it, plus~\Cref{clm:index-lb} and the preceding equations, we have, \[ \mi{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}}{\rv{Z}_B} = \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}} - \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B} = H_2(\delta) \cdot r_1 - (H_2(\delta) \cdot r_1 - o(r_1) - o(r_1)) = o(r_1), \] finalizing the proof. \Qed{lem:phase-two} \end{proof} \subsection{Concluding the Proof of~\Cref{thm:game}} \label{sec:lower-4} We are now ready to conclude the proof of~\Cref{thm:game}. For that, we need the following lemma. \begin{lemma}[``The protocol's value is small'']\label{lem:lower-4} \[ \val{\pi} = o(r_1). \] \end{lemma} \begin{proof} Recall that $\Pi_{B2}$ denotes the set of edges from $G_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ that is output by Bob at the end of the game; as such, $\val{\pi} = \Exp\card{\rv{\Prot}_{B2}}$. We focus on upper bounding this expectation term. Firstly, \begin{align} \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{\Prot}_{B2}} \leq H_2(\delta) \cdot (r_1 - \Exp\card{\rv{\Prot}_{B2}}), \label{eq:ent-matching} \end{align} because the edges in $\rv{\Prot}_{B2}$ can no longer be removed from $\ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ when defining the graph $G_A$. We will now lower bound the LHS of~\Cref{eq:ent-matching} to finalize the proof. We have, \begin{align*} \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{\Prot}_{B2}} &\geq \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B,\rv{\Prot}_{B2}} \tag{as conditioning can only reduce the entropy (\itfacts{cond-reduce})} \\ &= \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \mid \rv{Z}_B}, \tag{as $\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1} \perp \rv{\Prot}_{B2} \mid \rv{Z}_B$ by~\Cref{clm:GB-GAcapMRSj1-ZB} so we can apply~\itfacts{cond-reduce}} \\ &= \en{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}} - \mi{\rv{G}_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{\rv{J}_1}}{\rv{Z}_B} \tag{by the definition of mutual information in~\Cref{eq:mi}} \\ &= H_2(\delta) \cdot r_1 - o(r_1) \tag{by the distribution of $G_A \cap \ensuremath{M^{\mathsf{RS}}}\xspace_{j_1}$ for the first term and~\Cref{lem:phase-two} for the second}. \end{align*} Plugging in this bound in~\Cref{eq:ent-matching}, we get that, \[ \val{\pi} = \Exp\card{\rv{\Prot}_{B2}} = o(r_1), \] as desired. \end{proof} \noindent \Cref{thm:game} now follows from~\Cref{lem:lower-4} and our assumption in~\Cref{sec:lower-1} on $\ensuremath{\mathsf{C}}{\pi}$. \section{The Lower Bound for the \textbf{Hidden-Matching} Game}\label{sec:lower} We prove our main lower bound for the $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ in this section. \begin{theorem}\label{thm:game} Any protocol $\pi$ (deterministic or randomized) for $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ with \[ \ensuremath{\mathsf{C}}{\pi} = \min\set{o(t_2 \cdot r_2^{1-2/k}), o(t_1 \cdot r_1)}, \] can only have $\val{\pi} = o(r_1)$. \end{theorem} As a direct corollary of this theorem and~\Cref{lem:game-stream}, we obtain the following result for semi-streaming maximum matching problem. \begin{corollary}\label{cor:stream-lower-RS} Suppose that for infinitely many choices of $N \geq 1$, there exists $(r,t)$-RS $(2N)$-vertex bipartite graphs such that $r = \alpha \cdot N$ and $t=N^{\beta}$ for some parameters $\alpha$ and $\beta$. The parameters $\alpha$ and $\beta$ can depend on $N$ and we only assume that $\alpha = \Omega(1/\log{N})$ and $\beta = \Omega(1/\log\log{N})$ \footnote{Given that there is already an RS graph construction with $\alpha = 1/2 - o(1)$ and $\beta = \Omega(1/\log\log{N})$ by~\cite{GoelKK12}, this assumption is without loss of generality -- this assumption is only made to simplify the calculations in the proof and in general is not needed.}. Then, any two-pass semi-streaming algorithm for the maximum matching problem that outputs a correct answer with probability at least $2/3$ cannot achieve an approximation factor better than \[ 1- \frac{\alpha}{\frac{16}{\alpha \cdot \beta} - \frac{8}{\beta} + 2 - \alpha} \cdot (1-o(1)). \] \end{corollary} \begin{proof} The proof of this corollary is simply by calculating the values of various parameters in $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ and then applying~\Cref{lem:game-stream} to get the semi-streaming lower bound. For our proof, we use $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$ with the following parameters: \begin{align*} &\delta = \text{a vanishingly small {constant}}; \\ &k = \frac{2}{(1-\delta) \cdot \beta}; \\ &n_1 = N, \quad r_1 = \alpha \cdot N, \quad t_1 = N^{\beta}; \\ &n_2 = (k+\delta) \cdot \frac{N}{\alpha}, \quad r_2 = (k+\delta) N, \quad t_2 = ((k+\delta) \cdot \frac{N}{\alpha})^{\beta}; \\ &n = 8n_2-4r_2+2n_1 = \Theta(k \cdot N/\alpha); \end{align*} By the promise of corollary statement on the existence of the prescribed RS graph, and using this graph family as $\ensuremath{G^{\mathsf{RS}}}\xspace_1$ and $\ensuremath{G^{\mathsf{RS}}}\xspace_2$, one can verify that the above parameters match those the construction of $\ensuremath{\textnormal{\textsf{HiddenMatching}}}\xspace$. By~\Cref{thm:game}, any protocol $\pi$ with \[ \ensuremath{\mathsf{C}}{\pi} = n \cdot \mbox{\rm poly}\!\log{(n)} \ll n^{1+\Omega(1/\log\log{n})} \ll o(N^{\beta} \cdot (\alpha \cdot N)^{1-2/k}) = o(t_1 \cdot r_1^{1-2/k}) \] will have $\val{\pi} = o(r_1)$ (note that $t_1 \leq t_2$ and $r_1 \leq r_2$ in the parameters above and so $\ensuremath{\mathsf{C}}{\pi}$ is even smaller than the min-term in~\Cref{thm:game}). Plugging in this bound in~\Cref{lem:game-stream}, implies that the best approximation ratio achievable by any semi-streaming algorithm will be \[ 1-\frac{(1-4\delta) \cdot r_1}{n - (1+2\delta) \cdot r_1} = 1- \frac{r_1}{n-r_1} \cdot (1-o(1)) = 1-\frac{\alpha}{\frac{16}{\alpha \cdot \beta} - \frac{8}{\beta} + 2 - \alpha} \cdot (1-o(1)). \] This concludes the proof. \end{proof} \paragraph{Implications of~\Cref{cor:stream-lower-RS}.} Before we move on, let us instantiate this lower bound for different choices of $\alpha$ and $\beta$, given the state-of-the-art on density of RS graphs. \begin{itemize} \item The \textbf{current best construction} of RS graphs with $\alpha = \Omega(1)$, allows for setting $\beta = \Omega(\frac{1}{\log\log{N}})$. \emph{In case this construction turns out to be the best possible}, then the lower bound in~\Cref{cor:stream-lower-RS} would be $\paren{1-(\frac{\theta}{\log\log{n}})}$-approximation for some absolute constant $\theta \in (0,1)$. \item The \textbf{current best upper bound} on the density of RS graphs for $\alpha = 1/2-o(1)$ forces $\beta$ to be at most $1-\Omega(\frac{\log\log{N}}{\log{N}})$. \emph{In case this upper bound turns out to be the best possible}, then the lower bound in~\Cref{cor:stream-lower-RS} would be (at least) $0.98$-approximation. \item In general, \emph{in case there is any RS graph with both $\alpha,\beta$ being a constant}, then the lower bound in~\Cref{cor:stream-lower-RS} would be $(1-\Omega(1))$-approximation. This can be seen as either: \begin{itemize} \item a \emph{conditional} lower bound that rules out small-constant approximation algorithms for matching under the plausible hypothesis that both $\alpha,\beta$ can be constant; or alternatively, \item a \emph{barrier} result showing that getting (sufficiently) small-constant approximation algorithms to matching, requires (at the very least) improving the current best bounds on density of RS graphs from $O(N^2/\log{N})$ (for $\alpha=1/2-o(1)$ case) and $O(N^2/2^{O(\log^*{N})})$ (for arbitrary constant $\alpha$) all the way to $N^{1+o(1)}$ edges. \end{itemize} \end{itemize} \input{lower-1} \input{lower-2} \input{lower-3} \input{lower-4} \subsection*{Acknowledgement} The author is grateful to Soheil Behnezhad, Michael Kapralov, Raghuvansh Saxena, and Huacheng Yu for illuminating conversations, and to Christian Konrad for helpful discussions on his recent work in~\cite{KonradN21}. The author is also indebted to his collaborators Ran Raz in~\cite{AssadiR20}, Gillat Kol, Raghuvansh Saxena, and Huacheng Yu in~\cite{AssadiKSY20}, Vishvajeet N. in~\cite{AssadiN21}, and Soheil Behnezhad in~\cite{AssadiB21} for their previous collaborations that formed various building blocks and inspirations for this work. \bibliographystyle{alpha} \section{Preliminaries} \paragraph{Notation.} For any integer $t \geq 1$, we use $[t] := \set{1,\ldots,t}$. For any $k$-sequence $X = (X_1,\ldots,X_k)$ and integer $i \in [k]$, we define $X^{<i} := (X_1,\ldots,X_{i-1})$, and $X^{-i} := (X_1,\ldots,X_{i-1},X_{i+1},\ldots,X_k)$. For a graph $G=(V,E)$, and vertices $U \subseteq V$, we use $G[U]$ to denote the induced subgraph of $G$ on $U$. For any vertex $v \in V$, and a matching $M$ in $G$, we use $M(v)$ to denote the matched pair of $v$ ($M(v) = \perp$ if $v$ is unmatched by $M$). We denote bipartite graphs by $G=(L,R,E)$ to specify the bipartition into $L$ and $R$, and for any set $F \subseteq E$, use $L(F)$ and $R(F)$ to denote the endpoints of edges in $F$ in $L$ and $R$, respectively. Throughout the paper, by a \emph{$(2n)$-vertex bipartite graph}, we always mean a bipartite graph with $\card{L}=\card{R} = n$. We also use the following fact about graphs. \begin{fact}\label{fact:vc-matching} In any graph $G$, size of any vertex cover of $G$ is at least as large as any matching in $G$. \end{fact} We use `sans serif' letters to denote random variables (e.g., $\rv{A}$) , and the corresponding normal letters to denote their values (e.g. $A$). To avoid the clutter in notation, in conditioning terms which involve assignments to random variables, we may directly use the value of the random variable (with the same letter), e.g., write $\rv{B} \mid A$ instead of $\rv{B} \mid \rv{A} = A$. For random variables $\rv{A},\rv{B}$, we use $\en{\rv{A}}$ and $\mi{\rv{A}}{\rv{B}}$ to denote the Shannon entropy and mutual information, respectively. Moreover, for two distributions $\mu,\nu$, $\tvd{\mu}{\nu}$ denotes the total variation distance, and $\kl{\mu}{\nu}$ is the KL-divergence. A summary of basic information theory definitions and facts that we use in our proofs appear in~\Cref{sec:info}. For a function $f : \set{0,1}^n \rightarrow \ensuremath{\mathbb{R}}$, we use $\widehat{f} : 2^{[n]} \rightarrow \ensuremath{\mathbb{R}}$ to denote the (discrete) Fourier transform of $f$. For any $S \subseteq [n]$, $\mathcal{X}_S : \set{0,1}^{n} \rightarrow \set{-1,+1}$ denotes the character function on $S$. A summary of basic definitions and tools from Fourier analysis on Boolean hypercube that we use in our proofs appear in~\Cref{sec:fourier}. \subsection{Communication Complexity}\label{sec:cc} We work with the two-party communication model of Yao~\cite{Yao79} (with some slightly non-standard aspects mentioned later on). See the excellent textbooks by Kushilevitz and Nisan~\cite{KushilevitzN97} and Rao and Yehudayoff~\cite{RaoY20} for an overview of communication complexity. Let $P: \mathcal{X} \times \mathcal{Y} \rightarrow \mathcal{Z}$ be a relation. Alice receives an input $X\in \mathcal{X}$ and Bob receives $Y \in \mathcal{Y}$, where $(X,Y)$ are chosen from a distribution $\ensuremath{\mathcal{D}}$ over $\mathcal{X} \times \mathcal{Y}$. We allow players to have access to both public and private randomness. They communicate with each other by exchanging messages according to some \emph{protocol} $\pi$. Each message in $\pi$ depends only on the private input and random bits of the player sending the message, the already communicated messages, and the public randomness. At the end, one of the players outputs an answer $Z$ such that $Z \in P(X,Y)$. For any protocol $\pi$, we use $\Pi := \Pi(X,Y)$ to denote the messages \emph{and} the public randomness used by $\pi$ on the input $(X,Y)$. \subsection{Bipartite \rs Graphs}\label{sec:rs} Let $G=(V,E)$ be an undirected graph, and $M \subseteq E$ be a matching in $G$. We say that $M$ is an \emph{induced matching} iff the subgraph of $G$ induced on the vertices of $M$ is the matching $M$ itself; in other words, there are no other edges between the vertices of this matching. \begin{definition}[\textbf{Bipartite \rs Graphs}]\label{def:rs} For integers $r,t \geq 1$, a bipartite graph $\ensuremath{G^{\mathsf{RS}}}\xspace=(L,R,E)$ is called an \emph{$(r,t)$-\rs graph} (RS graph for short) iff its edge-set $E$ can be partitioned into $t$ \underline{induced} matchings $\ensuremath{M^{\mathsf{RS}}}\xspace_1,\ldots, \ensuremath{M^{\mathsf{RS}}}\xspace_t$, each of size $r$. \end{definition} RS graphs have been extensively studied as they arise naturally in property testing, PCP constructions, additive combinatorics, streaming algorithms, graph sparsification, etc. (see, e.g.,~\cite{BirkLM93,HastadW03,FischerLNRRS02,Alon02,TaoV06,AlonS06,AlonMS12,GoelKK12,FoxHS15,AssadiB19,KapralovKTY21}). In particular, a line of work initiated by Goel, Kapralov, and Khanna~\cite{GoelKK12} have used different constructions of these graphs to prove communication complexity lower bounds for graph streaming algorithms~\cite{GoelKK12,Kapralov13,Konrad15,AssadiKLY16,AssadiKL17,CormodeDK19,AssadiR20,Kapralov21,AssadiB21,ChenKPSSY21}. \paragraph{A Remark on Bipartite vs Non-Bipartite RS Graphs.} In this work, we focus on bipartite RS graphs, while many constructions in the literature are non-bipartite RS graphs. However, any $(r,t)$-RS non-bipartite graph $G$ on $n$ vertices can be turned into a $(2r,t)$-RS bipartite graph on $2n$ vertices by simply taking the bipartite double cover of $G$. As such, throughout this paper, by RS graphs, we always mean \emph{bipartite} RS graphs. \section{The Hiding Property of Augmentation Graphs (\Cref{lem:xor-lemma})}\label{sec:xor-lemma} In this section, we prove~\Cref{lem:xor-lemma} used in~\Cref{sec:lower-1} which was the missing part of the proof of our main lower bound in~\Cref{thm:game}. \begin{lemma*}[Re-statement of~\Cref{lem:xor-lemma}] Let $\ensuremath{G^{\mathsf{RS}}}\xspace$ be an $(r,t)$-RS graph and integers $k,\ell$ be such that $k \cdot \ell = (1-\delta) \cdot r$ for some absolute constant $\delta \in (0,1)$. Suppose we sample $X$ uniformly from $\set{0,1}^{r \times t}$ and let $H := \textnormal{\texttt{Encoded-RS}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,X)$. Additionally, for any vector $Y \in \set{0,1}^{\ell}$, we let $\bar{H}(Y)$ be a graph obtained by sampling an augmentation graph $A$ from $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace(\ensuremath{G^{\mathsf{RS}}}\xspace,Y,k)$ conditioned on encoded-RS graph of $A$ being $H$, and then letting $\bar{H}(Y)$ to be the edges of $A$ outside the encoded-RS graph $H$. Consider any function $\phi :\supp{\rv{H}} \rightarrow \set{0,1}^s$ that encodes each graph $H$ to a message $\phi(H)$ of size $s = o(\delta \cdot t \cdot (\delta r)^{1-2/k})$. Then, w.p. $1-o(1)$ over the choice of encoding $\phi \sim \phi(\rv{H})$ for $\rv{H}$ chosen as above, the following event $\ensuremath{\mathcal{E}}(\phi)$ happens: \begin{itemize}[leftmargin=10pt] \item \textbf{Event $\ensuremath{\mathcal{E}}(\phi)$:} For any pairs of vectors $Y_1 \neq Y_2 \in \set{0,1}^{\ell}$, \[ \tvd{\distribution{\bar{\rv{H}}(Y_1) \mid \phi(\rv{H})=\phi}}{\distribution{\bar{\rv{H}}(Y_2) \mid \phi(\rv{H})=\phi}} = o(1). \] \end{itemize} \end{lemma*} We start the proof of~\Cref{lem:xor-lemma} with the following notation. \paragraph{Notation.} For any $i \in [r]$ (resp. $j \in [t])$, we use $X_i$ (resp. $X^j$) to denote the $i$-th row (resp. $j$-th column) of $X$; similarly, $X^j_i$ denotes the $(i,j)$-entry of the matrix $X$. To avoid confusion, we use $j^{\star} \in [t]$ to denote the index of the random induced matching $\ensuremath{M^{\mathsf{RS}}}\xspace_{j^{\star}}$ in $\ensuremath{\dist_{\textnormal{aug-graph}}}\xspace$. Additionally, for any $\vec{u}_i \in \mathcal{U}$ (chosen in the augmentation graph), we use $X(\vec{u}_i) := (X^{j^{\star}}_{i_1},\ldots,X^{j^{\star}}_{i_k})$ for $(i_1,\ldots,i_k) = \vec{u}_i$ and define $\oplus X(\vec{u}_i) = \oplus_{x \in X(\vec{u}_i)} x$. Similarly, define $\oplus(X(\mathcal{U})) = (\oplus X(\vec{u}_1),\ldots, \oplus X(\vec{u}_\ell))$. We have $Y = \oplus X(\mathcal{U})$ by~\Cref{obs:aug-path}, thus, our goal is to show that $\oplus X(\mathcal{U})$ remains hidden. Finally, given that there is a one-to-one mapping between $X$ and the encoded-RS graph $H$, to avoid clutter, we slightly abuse the notation and write $\phi(X)$ instead of $\phi(H)$ and consider $\phi$ as a mapping from $\set{0,1}^{r \times t} \rightarrow \set{0,1}^s$. We are now ready for the proof. The first step is to show that w.p. $1-o(1)$, the entropy of $X^{j^{\star}}$ is sufficiently large. Formally, \begin{claim}\label{clm:high-entropy-jstar} W.p. $1-o(1)$ over the choice of $(\phi,j^{\star}) \sim (\rv{\Phi},\rv{J}^{\star})$, we have, \[ \en{\rv{X}^{j^{\star}} \mid \rv{\Phi} = \phi, \rv{J}^{\star}=j^{\star}} = r-o(\delta \cdot (\delta r)^{1-2/k}). \] (We denote this event by $\ensuremath{\mathcal{E}}(\phi,j^{\star})$). \end{claim} \begin{proof} The proof is a simple direct-sum style argument as follows: \begin{align*} \mi{\rv{X}^{\rv{J}^{\star}}}{\rv{\Phi} \mid \rv{J}} &= \frac{1}{t} \cdot \sum_{j=1}^{t} \mi{\rv{X}^{j}}{\rv{\Phi} \mid \rv{J}^{\star}=j} \tag{by the uniform choice of distribution of $j^{\star}$} \\ &= \frac{1}{t} \cdot \sum_{j=1}^{t} \mi{\rv{X}^{j}}{\rv{\Phi}} \tag{as $(\rv{X}^j,\rv{\Phi}) \perp \rv{J}^{\star}=j$ since $\rv{X}$ is independently uniform and $\rv{\Phi}$ is a function of $\rv{X}$} \\ &\leq \frac{1}{t} \cdot \sum_{j=1}^{t} \mi{\rv{X}^{j}}{\rv{\Phi} \mid \rv{X}^{<j}} \tag{by~\Cref{prop:info-increase} as $\rv{X}^j \perp \rv{X}^{<j}$} \\ &= \frac{1}{t} \cdot \mi{\rv{X}}{\rv{\Phi}} \tag{by chain rule of mutual information (\itfacts{chain-rule})} \\ &\leq \frac{1}{t} \cdot \en{\rv{\Phi}} = o(\delta \cdot (\delta r)^{1-2/k}). \tag{by~\itfacts{uniform} as the message size is $o(\delta t \cdot (\delta r)^{1-2/k})$ bits} \end{align*} By the definition of mutual information, we have, \[ \en{\rv{X}^{\rv{J}^{\star}} \mid \rv{\Phi},\rv{J}} = \en{\rv{X}^{\rv{J}^{\star}} \mid \rv{J}^{\star}} - \mi{\rv{X}^{\rv{J}^{\star}}}{\rv{\Phi} \mid \rv{J}^{\star}} = r - o(\delta \cdot (\delta r)^{1-2/k}), \] as $\rv{X}^{\rv{J}^{\star}} \mid \rv{J}^{\star}$ is uniformly distributed over $\set{0,1}^{r}$. Given that entropy of $\rv{X}^{\rv{J}^{\star}}$ can never be more than $r$ (as its support has at most $r$ variables), by Markov bound, we have that w.p. $1-o(1)$ over the choice of $(\phi,j^{\star}) \sim (\rv{\Phi} , \rv{J}^{\star})$, $\en{\rv{X}^{j^{\star}} \mid \rv{\Phi} = \phi, \rv{J}^{\star}=j^{\star}} = r-o(\delta \cdot (\delta r)^{1-2/k})$ as desired. \Qed{clm:high-entropy-jstar} \end{proof} We now use the bound on the entropy of $X^{j^{\star}}$ to argue that its distribution is almost a convex combination of a series of near-uniform distributions over ``large'' supports. \begin{claim}\label{clm:near-uniform} Conditioned on the event $\ensuremath{\mathcal{E}}(\phi,j^{\star})$, we have, \[ \distribution{\rv{X}^{j^{\star}} \mid \phi(\rv{X}) = \phi,\rv{J}^{\star}=j^{\star}} = \sum_{l=0}^{L} p_l \cdot \mu_l, \] such that $p_0 = o(1)$ and for every $l \in [L] \setminus \set{0}$: \begin{itemize} \item $\log{\card{\supp{\mu_l}}} \geq r - o(\delta \cdot (\delta \cdot r)^{1-2/k})$; \item $\tvd{\mu_l}{{U}_l} = o(1)$, where ${U}_l$ is the uniform distribution over $\supp{\mu_l}$. \end{itemize} (We further use $\ensuremath{\mathcal{E}}(\phi,j^{\star},l)$ for $l \in [L]$ to denote the combined event of $\ensuremath{\mathcal{E}}(\phi,j^{\star})$ and that $\rv{X}$ is chosen from $\mu_l$ in the given convex combination). \end{claim} \begin{proof} A direct corollary of~\Cref{lem:aux1} by setting $\gamma = o(\delta \cdot (\delta \cdot r)^{1-2/k})$ and $\ensuremath{\varepsilon} = o(1)$. \end{proof} \noindent We can now start bounding the LHS of~\Cref{lem:xor-lemma} whenever $\ensuremath{\mathcal{E}}(\phi,j^{\star},l)$ for some $l \in [L] \setminus \set{0}$ happens. Define: \begin{itemize} \item $\rv{X}^*$ to be a random variable sampled from ${U}_l$ (so, by~\Cref{clm:near-uniform}, we have that distribution of $\rv{X}^{j^{\star}}$ is close to that of $\rv{X}^*$ conditioned on $\ensuremath{\mathcal{E}}(\phi,j^{\star},l)$). \item $\rv{H}^*(Y_1)$ and $\rv{H}^*(Y_2)$ to be the same as $\bar{\rv{H}}(Y_1)$ and $\bar{\rv{H}}(Y_2)$, respectively, with the difference that to sample them, instead of sampling $\rv{X}^{j^{\star}}$ from $\mu_l$ and then defining the corresponding augmentation graph, we sample $X^{j^{\star}}$ from $\rv{X}^*$ and then continue as before. \end{itemize} Given the similarity of distributions $\mu_l$ and ${U}_l$ by~\Cref{clm:near-uniform}, we can use~\Cref{fact:tvd-small} to get, \begin{align} &\tvd{\distribution{\bar{\rv{H}}(Y_1) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{\bar{\rv{H}}(Y_2) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} \notag \\ &\hspace{1cm} \leq \tvd{\distribution{{\rv{H}^*}(Y_1) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{{\rv{H}^*}(Y_2) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} + o(1) \label{eq:change-distribution}. \end{align} \noindent Notice that after conditioning on $j^{\star}$, the only random choice in $\rv{H}^*$ is the choice of $\mathcal{U}$. As such, We can now apply a hybrid argument using~\Cref{fact:tvd-chain-rule} as follows: \begin{align} &\tvd{\distribution{{\rv{H}^*}(Y_1) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{{\rv{H}^*}(Y_2) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} \notag \\ &\hspace{0.5cm} = \tvd{\distribution{\mathcal{U} \mid Y_1,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{\mathcal{U} \mid Y_2, \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} \notag \\ &\hspace{0.5cm} \leq \sum_{i=1}^{\ell} \Exp_{\mathcal{U}^{<i} \mid Y_1,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)} \tvd{\distribution{\vec{\rv{u}}_i \mid \mathcal{U}^{<i},Y_1,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{\vec{\rv{u}}_i \mid \mathcal{U}^{<i},Y_2,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} \tag{by~\Cref{fact:tvd-chain-rule}}\\ &\hspace{0.5cm} \leq \sum_{i=1}^{\ell} \Exp_{\mathcal{U}^{<i} \mid Y_1,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)} \Exp_{\vec{\rv{u}}_i \mid \mathcal{U}^{<i},\ensuremath{\mathcal{E}}(\phi,j^{\star},l)} \notag \\ &\hspace{0.5cm} \card{\Pr\paren{\oplus\rv{X}^*(\vec{u}_i)=Y_{1,i} \mid \vec{u}_i, \oplus\rv{X}^*(\mathcal{U}^{<i})=Y_1^{<i}}-\Pr\paren{\oplus\rv{X}^*(\vec{u}_i)=Y_{2,i} \mid \vec{u}_i, \oplus\rv{X}^*(\mathcal{U}^{<i})=Y_1^{<i}}} \label{eq:hybrid}, \end{align} where the last inequality is by~\Cref{fact:tvd-sample}. In words, the difference between $\rv{H}^*(Y_1)$ and $\rv{H}^*(Y_2)$ can be bounded by \emph{sum} of the following: \begin{itemize} \item What is the difference between the probability of $\oplus \rv{X}^*(\vec{u}_i)$ being $0$ or $1$, in expectation over the choice of $\vec{u}_i$, assuming that $\rv{X}^*$ is chosen such that $\oplus \rv{X}^*(\mathcal{U}^{<i})$ is chosen according to the first $(i-1)$ indices of $Y_1$? \end{itemize} In other words,~\Cref{eq:hybrid} reduces our task of proving the lower bound to bounding the advantage one gets (from the message $\phi$ and other conditioned terms) when focusing only on a single term $\vec{u}_i$ even if we condition on the remaining values of $\mathcal{U}$. This is the content of the following claim. \begin{claim}\label{clm:fourier-xor} Conditioned on $\ensuremath{\mathcal{E}}(\phi,j^{\star},l)$ for any $l \in [L] \setminus \set{0}$, we have that for every $i \in [\ell]$, \begin{align*} &\hspace{5cm} \Exp_{\mathcal{U}^{<i} \mid Y_1,\ensuremath{\mathcal{E}}(\phi,j^{\star},l)} \quad \Exp_{\vec{\rv{u}}_i \mid \mathcal{U}^{<i},\ensuremath{\mathcal{E}}(\phi,j^{\star},l)} \\ &\card{\Pr\paren{\oplus\rv{X}^*(\vec{u}_i)=0 \mid \vec{u}_i, \oplus\rv{X}^*(\mathcal{U}^{<i})=Y_1^{<i}}-\Pr\paren{\oplus\rv{X}^*(\vec{u}_i)=1 \mid \vec{u}_i, \oplus\rv{X}^*(\mathcal{U}^{<i})=Y_1^{<i}}} \\ &\hspace{7cm} = o(1). \end{align*} \end{claim} \begin{proof} We first consider the distribution of $\rv{X}^{*} \mid \oplus\rv{X}^*(\mathcal{U}^{<i})=Y_1^{<i}$. Each $\vec{u}_j \in \mathcal{U}^{<i}$ fixes the value of $X^*$ in $k$ coordinates. As such, after this conditioning, and by re-indexing the unfixed coordinates, we can think of $X^*$ as a subset of $\set{0,1}^{r'}$ for $r' = r - (i-1) \cdot k$. Similarly, the choice of $\vec{u}_i$ will also be a uniform $k$-subset of $[r']$ in this case as each $\vec{u}_j \in \mathcal{U}^{<i}$ ``consumes'' $k$ indices of $[r]$, leaving the indices of $[r']$ untouched. As such, we can use $\rv{z} \in_R \set{0,1}^{r'}$ to denote $X^{*}$ after this transitioning and $\rv{S}=(i_1,\ldots,i_k) \subseteq_R [r']$ to denote $\vec{u}_i$. We now have, \begin{align*} &\text{LHS of~\Cref{clm:fourier-xor}} = \Exp_{\rv{S}}\card{\Pr\paren{\oplus_{i \in S} \rv{z}_i=0} - \Pr\paren{\oplus_{i \in S} \rv{z}_i = 1}}. \end{align*} Fourier analysis now gives us a standard tool to bound the RHS of this equation (see~\Cref{sec:fourier} for an overview of basic definitions of Fourier analysis on Boolean hypercube). Define: \begin{itemize} \item $\ensuremath{\mathrm{bias}}(\rv{z},S) := {\Pr\paren{\oplus_{i \in S} \rv{z}_i = 0} - \Pr\paren{\oplus_{i \in S} \rv{z}_i = 1}}$, as the bias of XOR of $\rv{z}$ on indices of $S$. \item $f :\set{0,1}^{r'} \rightarrow \set{0,1}$ as the characteristic function of $\supp{\rv{z}}$: $f(z) = 1$ iff $z \in \supp{\rv{z}}$; \item $\mathcal{X}_S: \set{0,1}^{r'} \rightarrow \set{0,1}$ as the {character} function over $[r']$ (see~\Cref{sec:fourier}). \end{itemize} \noindent Firstly, by the definition $\ensuremath{\mathrm{bias}}(\rv{z},S)$, we have, \begin{align} &\text{LHS of~\Cref{clm:fourier-xor}} = \Exp_\rv{S} {\card{\ensuremath{\mathrm{bias}}(\rv{z},S)}}. \label{eq:bias} \end{align} Secondly, for any $S \subseteq [r']$, we have, \[ \ensuremath{\mathrm{bias}}(\rv{z},S) = \Exp_{z \sim \rv{z}} \bracket{\mathcal{X}_S(z)} = \frac{1}{\card{\supp{\rv{z}}}} \cdot \sum_{z \in \set{0,1}^{r'}} f(z) \cdot {\mathcal{X}_S(z)} = \frac{2^{r'} \cdot \widehat{f}(S)}{\card{\supp{\rv{z}}}}, \] by the definition of Fourier coefficients. We now use the KKL inequality (\Cref{prop:kkl}) to bound the sum of squared Fourier coefficients and then use this in~\Cref{eq:bias}. In particular, for any $\gamma \in (0,1)$, \begin{align*} \sum_{S} \ensuremath{\mathrm{bias}}(\rv{z},S)^2 &= \frac{2^{2r'}}{\card{\supp{\rv{z}}}^2} \cdot \sum_{S} \widehat{f}(S)^2 \tag{by the previous equation} \\ &\leq \frac{2^{2r'}}{\card{\supp{\rv{z}}}^2} \cdot \gamma^{-k} \cdot \paren{\frac{\supp{\rv{z}}}{2^{r'}}}^{\frac{2}{1+\gamma}} \tag{by KKL inequality in~\Cref{prop:kkl}} \\ &= \gamma^{-k} \cdot \paren{\frac{2^{r'}}{\card{\supp{\rv{z}}}}}^{\frac{2\gamma}{1+\gamma}}. \end{align*} By picking $\gamma = k \cdot (\log{(2^{r'}/\card{\supp{\rv{z}}})})^{-1}$, we have, \begin{align*} \Exp_{\rv{S}} \bracket{\ensuremath{\mathrm{bias}}(\rv{z},S)^2} \leq \frac{1}{{r' \choose k} } \cdot \gamma^{-k} \cdot \paren{\frac{2^{r'}}{\card{\supp{\rv{z}}}}}^{{2\gamma}} = \paren{O(\frac{\log{(2^{r'}/\card{\supp{\rv{z}}})}}{r'})}^{k}. \end{align*} By~\Cref{clm:near-uniform}, we have that \[ \log{(\card{\supp{\rv{z}}})} \geq r' - o(\delta \cdot (\delta r)^{1-2/k}). \] Plugging this bound in the previous equation and noting that $r' \geq \delta r$, we get that \[ \Exp_{S} \bracket{\ensuremath{\mathrm{bias}}(\rv{z},S)^2} = o(\frac{1}{r^2}). \] We now use this to get that, \[ \Exp_{\rv{S}}\card{\Pr\paren{\oplus_{i \in S} \rv{z}_i=0} - \Pr\paren{\oplus_{i \in S} \rv{z}_i = 1}} = \Exp_\rv{S} {\card{\ensuremath{\mathrm{bias}}(\rv{z},S)}} \leq \sqrt{\Exp_{\rv{S}} \bracket{\ensuremath{\mathrm{bias}}(\rv{z},S)^2}} = o(1/r), \] where the first inequality is by~\Cref{eq:bias} and the second is Jensen's inequality for $\sqrt{\cdot}$. Given that $r \geq \ell$, this concludes the proof. \Qed{clm:fourier-xor} \end{proof} We can now conclude the proof of~\Cref{lem:xor-lemma}. With probability $1-o(1)$, we have the event in~\Cref{clm:high-entropy-jstar}. With another probability $1-o(1)$, by choice of $p_0 = o(1)$ in~\Cref{clm:near-uniform}, we can conclude that $\rv{X}$ conditioned on $\phi,j^{\star}$ and the latter event is chosen from a near-uniform distribution, i.e., from $\mu_l$ for $l \in [L] \setminus \set{0}$. Conditioned on these events, by~\Cref{eq:change-distribution} and~\Cref{eq:hybrid} and~\Cref{clm:fourier-xor}, we have that \begin{align*} &\tvd{\distribution{\bar{\rv{H}}(Y_1) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}}{\distribution{\bar{\rv{H}}(Y_2) \mid \ensuremath{\mathcal{E}}(\phi,j^{\star},l)}} = o(1). \end{align*} for any choice of $Y_1,Y_2 \in \set{0,1}^{\ell}$. This concludes the proof of~\Cref{lem:xor-lemma}.
\section{INTRODUCTION} Swarming multi-robot systems (MRS) are gaining increasing amounts of attention as they bring several advantages compared to their centrally controlled MRS counterparts. This includes system flexibility---the ability to operate in dynamic environments, robustness---the ability to cope with individual agent failures, and scalability---the ability to carry out tasks in systems comprised of different number of agents. As such, swarming MRS have been demonstrated to be able to carry out several tasks such as dynamic area monitoring~\citep{Zoss2018}, area mapping~\citep{Kit2019}, and target monitoring~\citep{Coquet2019}. In the field of target tracking, the task of monitoring multiple moving targets is an NP-hard problem and was first formalized in the Cooperative Multi-robot Observation of Multiple Moving Targets (CMOMMT) framework by \cite{Parker1997}. Under this framework, agents position themselves to maximize the amount of time that each target is observed. In this study, the authors developed a basic algorithm where robots switched between a `search' and `track' mode. While in the `search' mode, robots repelled each other to disperse and search for the targets. Upon encountering a target, a robot changed to the `track' mode and autonomously moved to the center of mass of all observed targets and its neighbors using a locally calculated force vector. Later, \cite{Parker2002} assigned weights to the targets, preventing target coverage overlap by reducing the influence of targets already under observation on the force vector. When the number of targets exceeds the number of agents, \cite{Kolling2006} developed a strategy based on the targets' speed and direction of travel. Agents broadcast a `help request' if it predicted that a target was about to move out of detection range. \cite{Esterle2017} studied the implementation of various response models and communications strategies for situations where the number of targets in the search space was known \textit{a priori}. They demonstrated that increasing the level of inter-agent communication served to improve the system-level monitoring performance, regardless of the response model used. However, \cite{Mateo2017} have shown that increasing levels of connectivity causes a reduction in an MRS's capacity to respond to dynamic stimuli. Furthermore, \cite{Mateo2019} established that a swarm must change its level of connectivity to maximize its response, adapting itself according to the speed of evolution of the environment. Applying this concept to the tracking of a single fast-moving non-evasive target, \cite{Kwa2020a} showed that an optimum level of connectivity occurs at which the ideal balance between the amount of exploration and exploitation is carried out, thus maximizing the tracking performance of the system. A similar observation was also made by~\cite{Hamann2018}. In this work, a stick pulling task is carried out by a MRS swarm in which the degree of collaboration among agents is varied by changing an agent's sensor range. The author concluded that the amount of information needs to be moderated to maximize a system's performance. Doing so prevent agents from trying to optimize the problem independently, which occurs at low levels of connectivity, and also prevents all agents from solving the same problem in parallel. In CMOMMT, all proposed strategies are limited to having targets slower than or at the same speed of the individual swarming agents. This is especially the case when evasive targets are being tracked where there is a long-standing assumption that the targets will always be able to evade their pursuers given their superior mobility and maneuverability. This gives a false sense that the problem is impossible for the pursuing swarm~\citep{Parker1997, Parker2002}. However, it has been shown that this is possible in various target capture games where the pursuers have vision of the entire environment~\citep{Janosov2017, Zhang2019}. \cite{Shishika2019} also demonstrated that information sharing between swarming agents aids agents in the process of intercepting and capturing a fast-moving evader. Furthermore, \cite{Ni2011} showed that the networks used to share information among agents must be a dynamic one. This allows connections between agents to be broken and established, maximizing the system's ability to capture evasive targets. Our contribution to this challenging problem is a novel swarm-based strategy for memory-enabled agents. Memory is demonstrated to be critical in allowing an MRS to track evasive targets that move faster than the individual units. Its introduction also gives another parameter that can tune an MRS's exploration and exploitation dynamics (EED), permitting agents to successfully prioritize either exploratory or exploitative actions. In doing so, the system autonomously adapts its collective dynamics to maximize its performance while tracking different target numbers, speeds, and movement profiles. In this problem of dynamic target tracking problem, \cite{Jordehi2014} cited two main challenges which are addressed in this work, namely: (1) the trade-off between exploration and exploitation carried out by a swarm, and (2) problems associated with outdated system memory. As such, we also thoroughly explore the intricate interplay between these two factors that give rise to the optimum amount of system engagement necessary to maximize the system's tracking performance. The rest of this paper is structured as follows. We first present the MRS search and tracking strategy. We then describe the operating conditions of the search environment in which we deploy our MRS, as well as introduce a metric that allows for the quantification of a swarm's EED. This novel approach is thoroughly analyzed through simulations, and also validated experimentally using a testbed comprising six decentralized miniature robots. \section{Methods} \subsection{Search and Tracking Strategy} The strategy used by \cite{Kwa2020a} was composed of two regulated behavioral patterns: (1) promotion of agent aggregation around a point of attraction (exploitation), and (2) an adaptive inter-agent repulsion behavior (exploration). These behaviors, inspired by the Charged Particle Swarm Optimization algorithm (CPSO)~\citep{Blackwell2002} and the Social-Only PSO~\citep{Engelbrecht2010}, generated two velocity vectors at each time-step that were combined to give a final agent velocity vector: \begin{equation} \mathbf{v}_i[t] = \mathbf{v}_{i,\text{att}}[t] + \mathbf{v}_{i,\text{rep}}[t], \label{eqn:movement} \end{equation} where $\mathbf{v}_{i,\text{att}}[t]$ and and $\mathbf{v}_{i,\text{rep}}[t]$ are the velocity vectors generated by the attractive component and the repulsion component respectively. Selecting the degree, $k$, of the inter-connecting $k$-nearest neighbor communications network controlled the amount of social interaction between the swarming agents, and hence the overall EED of the swarm. The overall strategy employed in the system is detailed in Algorithm~\ref{alg:strategy}. The individual components of this algorithm will be explained in the following sections. \begin{algorithm} \caption{: Dynamic $k$-Nearest Network Search and Tracking Strategy} \label{alg:strategy} \begin{algorithmic}[1] \STATE Set $t = 0$, $k \in [2, N-1]$, $\omega=1$, and $ c=0.5$ \WHILE{System active} \FOR{All agents $i \in [1, N]$} \STATE Set $\mathbf{p}$ using Algorithm~\ref{alg:set_p} \STATE Calculate $\mathbf{v}_{\text{att},i}$ using Eq.~\eqref{eqn:vel_update} \STATE Calculate $\mathbf{v}_{\text{rep},i}$ using Algorithm~\ref{alg:adaptive_repulsion} \STATE $\mathbf{v}_i[t] \gets \mathbf{v}_{\text{att},i}[t] + \mathbf{v}_{\text{rep},i}[t]$ \STATE $\mathbf{v}_i[t] \gets (v_{\text{max}}/v_i[t]) \cdot \mathbf{v}_i[t]$ \STATE $\mathbf{x}_i[t+1] \gets \mathbf{x}_i[t] + \mathbf{v}_i[t]$ \ENDFOR \STATE $t \gets t+1$ \ENDWHILE \end{algorithmic} \end{algorithm} \subsubsection{Agent Aggregation} The aggregation component of the strategy was used to generate a point of attraction for the agents, encouraging exploitative actions. Each agent keeps track of the position at which a target was found and the time at which it was detected. Each agent also receives a set of target positions and encounter times from its $k$-nearest neighbors. These received values are compared to an agent's own values and the most recent target position is used as a point of attraction, $\mathbf{p}$ (see Algorithm~\ref{alg:set_p}). Therefore, agents can exploit both information that is directly sensed from the environment and those coming from its neighbors. Note that a neighborhood is understood in the network sense; an agent $i$ has as many neighbors as its degree $k$. Given that time-varying network topologies are considered, the neighborhoods of each individual agent change over time. Using an agent's previous velocity and location relative to $\mathbf{p}$, an agent's velocity is updated according to: \begin{align} \mathbf{v}_{i, \text{att}}[t+1] &= \omega \mathbf{v}_i[t] + c r \big(\mathbf{p}[t+1] - \mathbf{x}_i[t+1]\big). \label{eqn:vel_update} \end{align} This equation is similar to that used in the social-only PSO model~\citep{Engelbrecht2010}, where $\omega$ is the velocity inertial weight, set at $\omega=2$, $c$ is the social weight, set at $c=2$, and $r$ is a number randomly drawn from the unit interval. In computational optimization, this is the main driver of a the system's exploitative behavior. Here, it is used to drive the MRS towards the target. It should be noted that the targets will never overlap each other and that agents do not assign unique identifiers to tracked targets. Crucial to the system's ability to track an evasive target is the implementation of agent-based memory. It was previously determined that the use of memory was counterproductive as its usage resulted in the exploitation of outdated information, causing swarm aggregation in a location at which the target is no longer present~\citep{Coquet2019, Kwa2020a}. Despite these disadvantages, memory usage has been shown to encourage the aggregation of agents around high quality target patches in static non-destructive foraging tasks~\citep{Falcon-Cortes2019, Nauta2020b}. In the pursuit of an evasive target that moves faster than any individual agent, the use of agent-based memory gives the swarm a longer lasting point of attraction. This increases the amount of exploitation carried out by the MRS, allowing it to close in on a target even though agents are unable to detect the presence of the target. As such, each agent is given a memory, $M$, with a duration of $t_\text{mem}$. \begin{algorithm} \caption{: Point of Attraction Update Algorithm} \label{alg:set_p} \begin{algorithmic} \STATE Initialize $M = t_\text{mem}$ \IF{Agent detects target} \STATE $\mathbf{p}_{\text{self}} \gets$ Target's position \STATE $t_{\text{best}} \gets t$ \ENDIF \STATE Determine $\mathcal{N}_i = \{j \in [1, N]$ s.t. agent $j$ is a topological \textit{k}-nearest neighbor of agent $i$\} \STATE Get list of all neighbors' $\mathbf{p}$ and $t_{\text{best}}$ \STATE $\mathbf{p}_{\text{neigh}} \gets \text{Most recent entry in all neighbors' } \mathbf{p}$ \STATE $t_{\text{neigh}} \gets \text{Most recent entry in all neighbors' } t_{\text{best}}$ \STATE \IfThen{$t_{\text{best}} + M < t$}{$\mathbf{p}_{\text{self}} \gets \emptyset$} \STATE \IfThen{$t_{\text{neigh}} + M < t$}{$\mathbf{p}_{\text{neigh}} \gets \emptyset$} \STATE \IfThen{$\mathbf{p}_{\text{self}} = \emptyset \textbf{ and } \mathbf{p}_{\text{neigh}} = \emptyset$}{$\mathbf{p}[t] \gets \mathbf{x}_i[t]$} \STATE \ElifThen{$t_{\text{best}} > t_{\text{neigh}}$}{$\mathbf{p}[t] \gets \mathbf{p}_{\text{self}}$} \STATE \Else{$\mathbf{p}[t] \gets \mathbf{p}_{\text{neigh}}$} \end{algorithmic} \end{algorithm} \subsubsection{Adaptive Repulsion} \label{sec:adaptive_repulsion} The implemented adaptive repulsion behavior was used to prevent the agents from flocking within a small area and promote area exploration. From a practical robotics standpoint, this behavior also offers an anti-collision measure as a direct byproduct of this mechanism. This behavior was first introduced in \cite{Kwa2020a} and is summarized in Algorithm~\ref{alg:adaptive_repulsion}. Each agent, $i$, with a set of topological neighbors, $j$, calculates its velocity vector as follows: \begin{equation} \mathbf{v}_{\text{rep},i}[t] = - \sum_{j\in \mathcal{N}_i}\left( \frac{a_R[t]}{r_{ij}[t]}\right)^d \frac{{\mathbf{r}_{ij}[t]}}{r_{ij}[t]}, \label{eqn:rep} \end{equation} where $\mathbf{r}_{ij}[t]$ is the vector from agent $i$ to agent $j$ at time-step $t$. The level of inter-agent repulsion is controlled by two factors: (1) the dynamic repulsion strength, $a_R[t]$, controlling agent separation when the system is in equilibrium and, (2) the exponential term $d$ in the pre-factor term $(a_R/r_{ij})$. The key aspect of this repulsion scheme is the ability of each agent to tailor its repulsion strength, $a_R[t]$, based on information gathered through direct measurements taken from the environment and from communications with its neighbors. Here, we introduce the concept of an agent's tracking state, $S_i[t]$. When an agent has information of a target's location, it is assigned a tracking state of 1, moves towards the target location, and reduces its $a_R[t]$ value until a minimum value is reached. When an agent has no target information, it enters an exploratory state, assigns itself a tracking state of 0, and increases its $a_R[t]$ value until a maximum value is attained. Formally, the tracking state is assigned by considering $S_i(\mathbf{x}_i[t],t)=0$ if $\mathbf{p}_i[t] = \emptyset$, and $1$ otherwise. \begin{algorithm} \caption{: Adaptive Repulsion} \label{alg:adaptive_repulsion} \begin{algorithmic} \STATE Set $a_{R,\text{min}} = 2$, $a_{R,\text{max}} = 12$, $d=6$, $\delta_{\text{explore}}=0.1$ and $\delta_{\text{track}}=0.75$ \WHILE{System active} \STATE \IfThen{$a_R > a_{R, \text{min}}$ \AND $S_i[t] = 1$}{$a_R \gets a_R - \delta_{\text{track}}$} \STATE \algorithmicelse \algorithmicif{ $a_R< a_{R, \text{max}}$ \AND $S_i[t] = 0$} \algorithmicthen \STATE \hspace{\algorithmicindent} $a_R \gets a_R + \delta_{\text{explore}}$ \STATE Calculate $\mathbf{v}_{\text{rep},i}$ using \eqref{eqn:rep} \ENDWHILE \end{algorithmic} \end{algorithm} \subsubsection{Swarm Communications Network} \label{sec:network} The swarm communication network regulates the EED of the MRS. Adjustment of the level of connectivity, also known as the degree connectivity, of an MRS can have considerable effects on the collective dynamics of the swarm~\citep{Mateo2017,Mateo2019}. \cite{Kwa2020a, Kwa2020b} also established that in the tracking of fast-moving targets that lower degrees of connectivity favor exploration of the domain while higher degrees of connectivity favor domain exploitation. \subsection{Target Representation} \label{sec:target_rep} In this work, the targets do not emit a gradient field; agents are either able to detect a target if they are within a target's radius or are completely unable to do so should they be positioned otherwise. The absence of a gradient field makes the tracking problem more challenging by eliminating the possibility of using gradient-descent methods. This conservative approach represents one of the most challenging cases with a near-zero-range sensor tracking a target faster than the agent themselves. It is only through the deployment of an MRS in such challenging scenarios that it is able to fully make use of its swarm intelligence. The targets move according to `non-evasive' and `evasive' policies. Using the non-evasive policy, the targets move towards random waypoints within the search space. Using the evasive policy, the targets initially follow the non-evasive policy until it makes contact with an agent. Upon contact with an agent (i.e. when an agent falls within the target's radius), the target calculates its velocity using the repulsion equation presented in~\eqref{eqn:rep}, with all agents within its radius used as repulsion neighbors. After encountering agents for $t_{\text{limit}}$ consecutive iterations, the target travels in a straight line for $t_{\text{evade}}$ time-steps to attempt to outrun its pursuers. \subsection{Problem Statement} In this work, a set of tracking agents ${A=\{a_1, a_2, \ldots, a_N\}}$ and a set of targets ${O=\{o_1, o_2, \ldots, o_M\}}$ move within a bounded two-dimensional square search space of dimensions $L \times L$ devoid of any obstacles. Both agents and targets have an $x$ and $y$ position, ${\mathbf{x}_i = (x_i, y_i)}$, and maximum velocities of $\mathbf{v}_{a, \text{max}}$ and $\mathbf{v}_{o, \text{max}}$ respectively, where ${\mathbf{v}_{a, \text{max}} \leq \mathbf{v}_{o, \text{max}}}$. The targets are modeled using disc-shaped binary objective functions with fixed radii of ${\rho = L/25}$. A target is considered to be tracked if an agent lies within its radius. Formally: \begin{equation} \label{eqn:coverage} \text{cov}(o_m, t)= \begin{cases} 1 & \exists i \in A \text{ s.t. } \|\mathbf{x}_i - \mathbf{x}_m\| \leq \rho, \\ 0 & \text{otherwise.} \end{cases} \end{equation} The goal of the system is to maximize its tracking performance of the targets within the environment, given by the reward function: \begin{equation} \label{eqn:cost_fn} \Xi = \frac{1}{T J} \sum^T_{t=1}\sum^M_{m=1}\text{cov}(o_m, t), \end{equation} where $T$ it the total time period of interest and $M$ is the total number of targets within the search space. In the simulations performed, the agents are tasked with tracking the targets in an environment free from obstacles and are assumed to have perfect information about the target's location once within the target's radius. \subsection{Exploration and Exploitation Dynamics} In addition to the tracking performance of the swarm, the collective dynamics of a swarm can be studied through the quantification of the EED of the system. Previously, this was performed by finding the correlation between an agent's direction of travel and bearing to the target~\citep{Kwa2020a,Kwa2020b}. However, a new metric needs to be considered since multiple targets are being studied. As such, a swarm's \textit{engagement ratio} is used to quantify its EED. An agent is considered to be engaged with a target if it has entered the `tracking' state and $S_i(\mathbf{x}_i[t], t) = 1$. Therefore, the overall engagement ratio of the swarm is calculated as follows: \begin{equation} \label{eqn:engagement} \Theta = \frac{1}{NT}\sum^T_{t=1}\sum^N_{i=1} S_i[t], \end{equation} where $N$ is the total number of agents within the swarm. With this metric, a higher engagement ratio will indicate that agents are spending a larger proportion of time attempting to track a target, and hence higher levels of exploitation. Conversely, at lower engagement ratios, agents spend a lower proportion of time attempting to track a target, which is characteristic of higher levels of exploration. \section{Simulation Results} A homogeneous swarm of $N=50$ agents with a maximum speed of $0.1$ arbitrary-distance-units per time-step was initialized in a $L\times L$ square operating environment, with $L=25$. The agents are tasked with tracking $J$ targets following either an evasive or non-evasive motion policy, where $J \in \{ 1, 2, 3 \}$. By fixing the agents' maximum speed at $v_{a_,\text{max}} = 0.1$ we studied the effects of changing the maximum speed of the targets relative to the agents. All simulations were also carried out over a period of 100,000 iterations, resulting in low variability between runs with different random seeds (below 1\% for both tracking performance and system engagement). \subsection{Impact of Varying Degree of Connectivity} \subsubsection{Single Target Tracking} While tracking both evasive and non-evasive targets, increases in target velocity caused a decrease in the system's tracking performance as seen in Fig.~\ref{fig:single_evasive_k}. This was expected since the swarming agents' velocities were not increased to match that of the target and increasing a target's velocity allows it to more easily outrun its pursuers. Unsurprisingly, a reduction in tracking performance was also seen when targets used an evasive movement policy instead of the non-evasive one as it gave the targets the ability to better avoid its pursuing agents. \begin{figure}[htbp] \centering \includegraphics[width=0.45\textwidth]{SingleTargetEvasiveK.pdf} \vspace{-3ex} \caption{Non-evasive target (solid line) and evasive target (dashed line) tracking performance with different $v_{o,\text{max}}/v_{a,\text{max}}$ ratios (maximum agent's velocity $v_{a,\text{max}}=0.1$ and memory length of $t_{\text{mem}}=20$).} \label{fig:single_evasive_k} \end{figure} From Fig.~\ref{fig:single_evasive_k}, it can also be observed that there exists an optimal degree of connectivity, $k=k^*$, at which the tracking performance is maximized and is also consistent with our previous work \citep{Kwa2020a, Kwa2020b} as well as the work carried out by \cite{Hamann2018}. However, this optimum only appears when the target travels faster than the individual agents. This is because at low target velocities, the swarm need not regulate its level of exploration and exploitation to effectively track the target; the swarm can track the target through performing purely exploitative actions. In contrast, when the target travels faster than the agents, the swarm needs to engage in more exploratory actions within the search space to reacquire the target's location after being outrun. \cite{Kwa2020a, Kwa2020b} have shown that a swarm tends to favor exploitation at high levels of connectivity and exploration at lower connectivity levels. This is confirmed by Fig.~\ref{fig:single_evasive_k_engage} that shows higher system engagement at higher levels of connectivity. As such, when operating at the optimal degree of network connectivity, it can be said that the system is able to carry out a good balance of both exploratory and exploitative actions, improving its target tracking capabilities. The presence of an optimal $k$ is also apparent in non-evasive target tracking. However, $k^*$ for non-evasive target tracking tends to be higher than that for evasive target tracking. This is because an evasive target makes its movements to avoid contact with a pursuing agent, thereby requiring more exploration from the MRS to track the target. Exploration is favored at lower degrees of connectivity, resulting in a lower $k^*$ and associating evasive target tracking with a different exploration and exploitation balance. \begin{figure}[htbp] \centering \includegraphics[width=0.45\textwidth]{SingleTargetEvasiveKEngagement.pdf} \vspace{-3ex} \caption{Swarm system engagement with a single evasive target traveling at different speeds (maximum agent's velocity $v_{a,\text{max}}=0.1$ and memory length of $t_{\text{mem}}=20$).} \label{fig:single_evasive_k_engage} \end{figure} Figure~\ref{fig:single_evasive_k_engage} also reveals an upper limit in the engagement ratio of the system in both evasive and non-evasive targets tracking. At higher levels of connectivity, the swarm loses track of the target easily due to a high portion of agents aggregating around and exploiting the target's location. Eventually, when the agents are outrun by the target, they have to expand and explore the environment again to relocate the target. This suggests that the amount of exploitation that can be performed by the swarm is being limited by the lack of information gathered by the swarm about the target's location, further stressing the critical need to balance the amount of exploration and exploitation carried out by the swarm. \subsubsection{Multiple Target Tracking} Similar to single target tracking, the swarm has a lower $k^*$ when tracking evasive targets compared to when tracking non-evasive targets (see Fig.~\ref{fig:multiple_k}). Again, this is due to the swarm requiring higher levels of exploration when pursuing evasive targets. \begin{figure}[htbp] \centering \includegraphics[width=0.45\textwidth]{MultitargetK.pdf} \vspace{-3ex} \caption{Multiple non-evasive (solid lines) and evasive (dashed lines) target tracking performance (maximum agent's velocity $v_{a,\text{max}}=0.1$, memory length of $t_{\text{mem}}=20$, and maximum targets' velocity $v_{o,\text{max}}=0.2$).} \label{fig:multiple_k} \end{figure} Also seen in Fig.~\ref{fig:multiple_k} is a reduction in $k^*$ when tracking multiple targets. This holds true for both evasive and non-evasive targets and is because more exploration is required to acquire information about the different targets' location. These higher levels of exploration are achieved at lower levels of connectivity. It is also harder to track multiple targets simultaneously. Therefore, increasing the number of targets present in the search space lowers the tracking performance of the swarm. \label{sec:sim_mem} \begin{figure}[ht!] \centering \includegraphics[width=0.45\textwidth]{MemoryComparison.pdf} \caption{Single evasive and non-evasive target tracking performance with different implemented agent-based memory lengths (target speed $v_{o,\text{max}}=0.2$). Tracking agents are connected in a dynamic $k=20$ network.} \label{fig:memory_comparison} \end{figure} \subsection{Impact of Varying Agent-Based Memory} It has previously been assumed that the addition of agent-based memory will cause the swarm to exploit outdated information, reducing the system's overall tracking performance. However, as seen in Fig.~\ref{fig:memory_comparison}, the addition of moderate amounts of agent-based memory to the system only results in a small decrease an MRS's non-evasive target tracking performance. In contrast, when tracking an evasive target, memory plays a major role in a swarm's ability to track the target. Without its use, the swarm is unable to track the target effectively. As demonstrated in Fig.~\ref{fig:memory_comparison}, the tracking performance rapidly improves when memory is introduced until an optimum memory length is reached before slowly degrading again. This is because the use of agent-based memory generates a persistent point of attraction based on a target's last known position, giving the agents the ability to aggregate at that point. While the swarm may periodically encounter the target without the use of memory, its agents will tend to expand until they reach their static equilibrium positions and will be unable to close in on the target due to the target's evasive maneuvers. This is illustrated in Fig.~\ref{fig:evasive_memory_engagement} where it can be seen that the swarm is unable to engage with the target with very low agent-based memory lengths. \begin{figure}[ht!] \centering \includegraphics[width=0.45\textwidth]{EvasiveTargetMemoryEngagement.pdf} \caption{Evasive target system engagement with varying memory lengths. Target moved at a speed of $v_{o,\text{max}}=0.2$. Agents were connected in a dynamic $k=20$ network.} \label{fig:evasive_memory_engagement} \includegraphics[width=0.45\textwidth]{SingleTargetMemoryK.pdf} \caption{Single non-evasive (solid line) and an evasive (dashed line) target tracking performance while varying the length of the implemented agent-based memory and degree of network connectivity.} \label{fig:memory_optimal_k} \vspace{-2ex} \end{figure} \subsection{Balancing Network Connectivity and Memory} When comparing Figs.~\ref{fig:single_evasive_k}~and~\ref{fig:memory_comparison}, it can be seen that after the optimal memory length has been attained, changing the degree of connectivity impacts the MRS's tracking performance more compared to the effects attained by altering the memory length. However, Fig.~\ref{fig:memory_optimal_k} shows that changing the length of the memory present in each agent also affects the optimal degree of connectivity required to maximize the tracking performance. It can be seen that increasing agents' memory length tends to decrease the optimal degree of connectivity, $k^*$. This is caused by the swarm's tendency to perform higher amounts of exploitation with longer memory lengths. This is congruent with the findings by \cite{Nauta2020a}, who showed that stronger memory effects favor more exploitative actions in a foraging scenario. Therefore, to maximize its tracking performance while using increased memory lengths, the swarm needs to compensate for this increase in exploitation by performing more exploratory actions, effectively resulting in a reduced $k^*$ value. \begin{figure}[h] \centering \includegraphics[width=0.49\textwidth]{EngagementTracking.pdf} \vspace{-2ex} \caption{Engagement-Tracking plots of a swarm with different $t_\text{mem}$ and $k$ tracking an evasive~(top) and a non-evasive~(bottom) target. Darker shaded points indicate swarms using networks with higher values of $k$.} \label{fig:engagement_tracking} \end{figure} The results obtained point to an optimal balance between exploration and exploitation carried out by the swarm to maximize its tracking response. This is demonstrated in Fig.~\ref{fig:engagement_tracking}, which shows a clear optimum level of engagement that maximizes the MRS's tracking performance. The plots also show that the ideal engagement ratio maximizing evasive target tracking performance is lower than that for a non-evasive target. Not only do these results highlight the presence of the optimal balance between exploration and exploitation, but they also reveal the important fact that this optimum varies based on the task presented to the swarm. Furthermore, Fig.~\ref{fig:engagement_tracking} shows that excessive memory lengths ($M = 2000$) degrade the tracking performance of the swarm when pursuing both evasive and non-evasive targets. The plot also highlights the necessity of the inclusion of agent-based memory when tracking evasive targets as the system without memory is outperformed by all the other systems. \section{Swarm Robotic Experiments} \begin{figure*}[htbp] \centering \includegraphics[width=0.75\textwidth]{Experiment_collage_v4_compressed.pdf} \vspace{-2ex} \caption{(Top) Reconstruction of target and robot positions and robot paths as observed through our monitoring system. (Bottom) Physical experiments using a connectivity of $k=5$ and adaptive repulsion. (A) Robots initialized at the start of the experiments. (B) Robots without agent-based memory unable to respond to a target's presence. (C) Robots with agent-based memory moving towards target after being found. (D) ORION robotic unit~\citep{Kit2019}.} \label{fig:experiment} \end{figure*} To validate the obtained simulation results, we performed series of experiments using 6 in-house developed differential-drive land robots with a maximum speed of $10~\text{cm}/\text{s}$. Although this swarm robotic system was originally developed for the mapping of unknown environments~(see \cite{Kit2019} for technical details), it has also been used in the tracking of non-evasive targets~\citep{Kwa2020a}. At the start of all tests, 6 of the robots were arranged in the middle of an open search area. These robots were tasked with tracking a virtual evasive target, traveling at an average speed of $5~\text{cm}/\text{s}$, following the same evasive movement policy previously described with $\rho = 0.75~\text{m}$. The target's location is determined by a central computer that calculates its next position based on the current locations of all of robots. To ensure that no gradient descent methods are used, only the units within the target's radius are given information about the target's location. It must be emphasized that besides this communication of target locations to the robots and robot positions to the computer, there was no central controller facilitating the coordination of the robots' movements. It should also be noted that while the target traveled at a slower speed than the robots, the target has infinite maneuverability compared to the finite maneuverability of the robots. As such, even if the individual robots can move faster than the target in a straight line, they effectively respond much slower due to their low maneuverability. It is also worth mentioning that these experiments were carried out in an environment free of obstacles to highlight the effects of agent-based memory. Should this experiment be rerun in a more complex environment with obstacles, the robot units are equipped with LIDAR sensors, allowing them to perform collision avoidance. All experiments were run with an all-to-all connectivity ($k=5$), in an attempt to make the response of the swarm more apparent. Two sets of tests were run, one with agent-based memory length of $M = 15~\text{s}$, and another without any. Each set of tests was comprised of 10 runs, with each run lasting for approximately 2 minutes to minimize the directional drift experienced by the robots and allow for the assumption that the robots are able to accurately self-localize. The robots' locations are communicated to a central computer to enable the reconstruction and visualization of their paths and responses to the presence of a target seen in Fig.~\ref{fig:experiment}. The figure shows that without memory, the robots were unable to respond to the presence of the target and tended to remain in place even when the target had been encountered. In contrast, with agent-based memory, when an agent encountered the target, the swarm as a whole was able to respond and the units turned to move towards and aid in the tracking of the target. The improved response of swarm system to the presence of the target resulted in a significant increase in tracking performance $(p < 0.01)$, with the swarm being better able to track the evasive target for a longer period of time (Table~\ref{tab:results}). This is similar to the results obtained in the simulations, validating our hypothesis that agent-based memory is required in the tracking of a fast-moving evasive target. While the physical experiments performed confirmed the necessity of the implementation of agent-based memory, the quantitative results obtained from the physical experiments did not replicate those obtained from the simulations. These discrepancies can be attributed to three reasons: (1) the small number of robots used for the simulations, (2) the short experiment duration relative to that of the simulations, and (3) the physical tests and the simulations were not performed at the same scale and density. Also as demonstrated by \cite{Czirok1997}, statistical characterization of a multi-agent system's order becomes more difficult at low swarm densities. This makes it harder to predict the behavior of a system with low density within simulations, which could account for some of the discrepancies between the simulation and physical experiment results. \begin{table}[htbp] \caption{Swarm tracking performance results with and without agent-based memory obtained from the robotic units.} \vspace{-3ex} \begin{center} \begin{tabular}{lcccl} \label{tab:results} & \multicolumn{2}{c}{Without Memory} & \multicolumn{2}{c}{With Memory} \\\hline & 39.0 & 31.8 & 48.8 & 63.8 \\ & 47.1 & 39.9 & 46.6 & 44.0 \\ & 37.6 & 40.5 & 64.4 & 37.0 \\ & 32.9 & 37.1 & 40.1 & 58.4 \\ & 30.8 & 35.1 & 48.1 & 42.8 \\ \hline Averaged & \multicolumn{2}{c}{$37.2 \pm 4.6$} & \multicolumn{2}{c}{$49.4 \pm 9.2$} \\ \hline \end{tabular} \end{center} \end{table} \section{Discussion} The application of swarming MRS to a dynamic target search and tracking task is a very challenging problem. This is especially the case when multiple evasive targets capable of traveling faster than the individual agents are being considered. Such cases are not adequately studied as it has been assumed that a fast-moving evasive target will always be able to outmaneuver its pursuers, rendering the tracking task impossible and therefore trivial. In this work, we show that despite having to track multiple fast-moving evasive targets, it is possible to employ limited perception swarming MRS to accomplish the task through the use of a decentralized swarming strategy. The presented strategy allows the tuning of a swarm's exploration and exploitation dynamics through the use of an adaptive inter-agent repulsion behavior, the degree of connectivity of the interconnecting $k$-nearest neighbor network, and the length of memory present in all agents. The swarm's EED shifts in favor exploration by reducing the degree of connectivity or by reducing the agents' memory lengths and vice versa to favor information exploitation. This strategy was tested in simulations where we quantified the swarm's overall tracking performance and its EED. The former was performed by counting the number of time-steps the targets had been tracked and the later was done by calculating the swarm's engagement ratio, the average proportion of agents attempting to track a target during the entire simulation. Through tuning the swarm's EED, an optimum balance between the level of exploration and exploitation was found, occurring only when the swarm tracks targets moving faster than its component agents. This balance tilts in favor of performing higher amounts of exploration when attempting to track multiple evasive targets, due to the swarm's need to acquire information of the targets' locations. Similarly, when tracking a smaller number of non-evasive targets, better tracking performance will be obtained if a swarm performs higher amounts of exploitative actions. A limitation of this work is that our MRS operates in an unobstructed environment. However, as this work focuses on the highly dynamic problem of tracking a fast-moving target and the importance of memory in the performance of such tasks, more complex environments were not used. Should the MRS be implemented within an environment with obstacles, the simulations can be modified to utilize obstacle avoidance algorithms, taking advantage of our robotic test platform's LIDAR sensors. Finally, physical experiments were carried out with a swarm of 6 robots. While the quantitative results did not replicate those obtained in the simulations, we demonstrated a significant improvement of the swarm's evasive target tracking performance when equipped with agent-based memory compared to an MRS without. This is in agreement with our results, highlighting the importance of memory in the search and tracking of a fast-moving evasive target. \section{Acknowledgements} This research is funded by Thales Solutions Asia Pte Ltd, under the Singapore Economic Development Board IPP. \footnotesize
\subsection{Dataset} We train and evaluate our model on a dataset of programs from code competition websites. Programs from these platforms exhibit a few qualities that are suitable for program synthesis. The programs are tested and known to be syntactically correct and compile-able, and they are standalone code fragments and do not depend on any code that is not built into the programming language. The dataset consists of almost two million C++ programs across 148 competitions divided over 904 problems. \subsection{Implementation details} We use three-layered LSTMs in the encoder and decoder with a recurrent dropout rate of 20\% to reduce over-fitting. The embedding layer is initialized with Glove wiki gigaword 50 \cite{pennington2014glove} embedding. We train the model using the Adam optimizer \cite{kingma2014adam} with a learning rate of $1e-3$ and 10 epochs with early stopping and a patience of 3. We train and run the experiments on GPUs with a batch size set to 32. \subsection{Baseline} Our method is compared to a baseline inspired by autoencoders used for text generation in natural language. We can also evaluate how well these models generalize to source code synthesis by taking inspiration from natural language models. The model architecture is inspired from \cite{bowman2015generating}. In this architecture, both the encoder and decoder networks contain single-layer recurrent neural networks. A Gaussian prior is used for the regularization of the latent space. The model operates on the original sequences of source code and decodes the latent vector back to the source code without an intermediate structured representation. Therefore we refer to the baseline model as the Sequence-to-Sequence (Seq2Seq) model, and the architecture is depicted in \cref{fig:seq2seq}. \begin{figure*}[ht!] \centering \includegraphics[width=0.8\linewidth]{figures/seq2seq.png} \caption{The architecture of the Seq2Seq model} \label{fig:seq2seq} \end{figure*} Similar to our proposed autoencoder model, we employ methods to mitigate KL-vanishing. Again, we use cyclic KL annealing \cite{fu2019cyclical}, and we combine this with a technique called word dropout \cite{bowman2015generating} to weaken the decoder. \subsection{Reconstruction results}\label{results:recon} First of all, we look at how accurately the autoencoders can reconstruct programs. We use a separate test split containing around 60.000 samples of our data set to evaluate this and use these samples as input for the autoencoders. We compute BLEU scores \cite{papineni2002bleu} for both models on the original representation of the source code to obtain comparable results, i.e., we do not use the tree representation. The Tree2Tree model thus has an extra step to use the data parser to transform the tree representation back to source code. This extra step is disadvantageous for the Tree2Tree model as it may introduce some errors due to imperfections in the parsing process. The BLEU scores are then computed on each token in a program: keywords, identifiers, operators, and special symbols such as semicolons or braces. We report on the cumulative BLEU-1 through BLEU-4 scores to indicate the overlap between original and reconstructed programs. Furthermore, we present the percentage of reconstructed programs that compile to indicate how well the models have learned the programming language's syntax. We experiment with different combinations of latent sizes $l$ and hidden RNN dimensions $h$: ($l$:10, $h$:50), ($l$:50, $h$:100), ($l$:100, $h$:200), ($l$:150, $h$:300), ($l$:300, $h$:500), ($l$:500, $h$:800), ($l$:800, $h$:1200). For reconstructions, we will use greedy decoding in both models. That means that for each label, we select the most likely prediction according to the model. We take this approach as we would like the reconstructions to be close to the original input. In contrast, sampling will give more variety in the output, which can be helpful when generating new samples. The results of the reconstruction experiments using greedy decoding are shown in \cref{tab:rec_results}. \begin{table}[ht!] \centering \begingroup \setlength{\tabcolsep}{3pt} \renewcommand{\arraystretch}{1.4} \begin{tabular}{cccccccc} \ChangeRT{1pt} \textbf{Model} & \textbf{Latent size} & \textbf{BLEU-1} & \textbf{BLEU-2} & \textbf{BLEU-3} & \textbf{BLEU-4} & \textbf{Compiles}\\ \hline \multirow{7}{*}{Seq2Seq} & 10 & 0.037 & 0.024 & 0.017 & 0.013 & 0.000\% \\ & 50 & 0.085 & 0.061 & 0.047 & 0.037 & 42.467\% \\ & 100 & 0.295 & 0.225 & 0.176 & 0.141 & 65.808\% \\ & 150 & 0.278 & 0.211 & 0.165 & 0.131 & 66.971\% \\ & 300 & 0.346 & 0.262 & 0.203 & 0.161 & 60.651\% \\ & 500 & 0.421 & 0.332 & 0.263 & 0.211 & 90.329\% \\ & 800 & 0.429 & 0.329 & 0.253 & 0.195 & \textbf{91.784\%} \\\hline \multirow{7}{*}{Tree2Tree} & 10 & 0.445 & 0.339 & 0.260 & 0.202 & 28.375\% \\ & 50 & 0.417 & 0.317 & 0.242 & 0.189 & 23.256\% \\ & 100 & 0.423 & 0.323 & 0.251 & 0.200 & 30.429\% \\ & 150 & \textbf{0.486} & \textbf{0.382} & \textbf{0.302} & \textbf{0.243} & 35.419\% \\ & 300 & 0.457 & 0.342 & 0.260 & 0.202 & 35.054\% \\ & 500 & 0.398 & 0.301 & 0.230 & 0.178 & 36.022\% \\ & 800 & 0.258 & 0.182 & 0.131 & 0.096 & 2.358\% \\\ChangeRT{1pt} \end{tabular} \endgroup \caption{Reconstruction results.} \label{tab:rec_results} \end{table} The results listed in \cref{tab:rec_results} show the superiority of the Tree2Tree model in terms of reconstruction capability (BLEU scores), especially for smaller latent sizes. The reconstruction scores of the Tree2Tree model of latent size 150 outperform all the Seq2Seq models up to latent size 800. In contrast, the Seq2Seq models show to perform much better at constructing compile-able programs, which improves with the model's size, to nearly 100\%. This is a surprising result, which is investigated in more detail in supplementary material\footnote{\url{https://tree2tree.app/supmat.pdf}}. An interesting result is that the performance of the models does not necessarily increase with the size of the model. Especially for the Tree2Tree models, we see that after latent size 150, the models' performance decreases. In general, one would expect that the model would perform better with an increase in latent size, allowing more information flow between the encoder and decoder. We hypothesize that, because not only the latent size increases but also the number of hidden units in the auto-regressive models, the models experience KL vanishing. Due to the increasing hidden units, the auto-regressive models become stronger and may depend more on their predictions, ignoring information from the latent vector. In turn, the reconstruction performance vastly decreases. Confirmation of this hypothesis is left as a venue for future work. Next, we would like to experiment on how different input sizes affect the performance of both models. Due to the tree-structured representation used by the Tree2Tree model, the size of the sequences that the RNNs process scale proportionally to the width and depth of the tree. The Seq2Seq model, on the other hand, processes sequences left to right, hence the number of computations of the RNNs scale directly with the sequence length. To evaluate the performance on different sized inputs, we split the test data set into three subsets. A small, medium and large subset with the following properties: \begin{itemize} \item \textbf{small subset}: maximum of 250 tokens \item \textbf{medium subset}: between 251 and 500 tokens \item \textbf{large subset}: between 501 and 750 tokens \end{itemize} We compute the BLEU scores and compilation percentage again using greedy decoding on the smaller subsets for the best performing Seq2Seq and Tree2Tree models, based on the results of \cref{tab:rec_results}. Here, performance is based on the combination of BLEU-4 and compilation percentage. For Seq2Seq, this is the model with latent size 500. Similarly, for Tree2Tree, this is the model with latent size 150. The results are depicted in \cref{tab:rec_results_inp_sizes}. \begin{table}[ht!] \centering \begingroup \setlength{\tabcolsep}{3pt} \renewcommand{\arraystretch}{1.4} \begin{tabular}{clccccc} \ChangeRT{1pt} \textbf{Model} & \textbf{Input size} & \textbf{BLEU-1} & \textbf{BLEU-2} & \textbf{BLEU-3} & \textbf{BLEU-4} & \textbf{Compiles}\\ \hline \multirow{3}{*}{Seq2Seq} & small & 0.513 & 0.403 & 0.321 & 0.258 & 95.334\% \\ & medium & 0.306 & 0.244 & 0.192 & 0.153 & 86.812\% \\ & large & 0.196 & 0.157 & 0.123 & 0.096 & 87.971\% \\ \hline \multirow{3}{*}{Tree2Tree} & small & 0.633 & 0.516 & 0.424 & 0.355 & 59.022\% \\ & medium & 0.478 & 0.371 & 0.289 & 0.229 & 21.241\% \\ & large & 0.324 & 0.242 & 0.181 & 0.138 & 5.001\% \\ \ChangeRT{1pt} \end{tabular} \endgroup \caption{Reconstruction results of the best models on different input sizes.} \label{tab:rec_results_inp_sizes} \end{table} From \cref{tab:rec_results_inp_sizes} we can observe that both models follow the same logical trend: the larger the input size, the lower BLEU-scores and compilation percentages. For the Tree2Tree model, the BLEU scores for the medium subset seem to be similar to the BLEU scores on the entire test set, whereas, for the Seq2Seq model, the BLEU scores are much lower on the medium subset. The models seem to be fairly close in terms of performance degradation from small to large program sizes. For example, we can measure performance degradation for the large versus small subset by dividing the BLEU-4 scores on the large set by the BLEU-4 score on the small set. For the Seq2Seq model, we get a score of $0.372$, and for the Tree2Tree model, we get $0.389$. Similarly, we get $0.593$ and $0.645$ for the Seq2Seq and Tree2Tree model for the medium versus small subset. While the performance degrades less with increasing input sizes for the Tree2Tree model, this difference is insignificant. An issue with the aforementioned computation of performance degradation is that it does not correct for elements in programs that are almost always present. For example, each program contains a main function, with standard input and output streams. The models may simply always predict these standard elements of a program and then use the information of the encoder to complete the details of the program. However, this causes the BLEU score to consist of two parts: the score for the prediction of the elements that are always present and the score of what it has learned to predict together with the encoder. The latter is more interesting and shows how much information can be saved in the latent vector. Therefore, we apply a correction on the BLEU scores to focus on the prediction based on the information in the latent vector. We compute corrected scores by feeding the decoder with random latent vectors and computing BLEU scores on the subsets of the test data set. Then, we subtract these correction scores from the computed BLEU scores in \cref{tab:rec_results_inp_sizes}, and take 0 if the result of the subtraction is negative. The corrected BLEU scores including the correction scores are presented in \cref{tab:corrected_rec_results_inp_sizes}. \begin{table}[ht!] \centering \begingroup \setlength{\tabcolsep}{3pt} \renewcommand{\arraystretch}{1.4} \resizebox{\linewidth}{!}{% \begin{tabular}{clccccc} \ChangeRT{1pt} \textbf{Model} & \textbf{Input size} & \textbf{BLEU-1} & \textbf{BLEU-2} & \textbf{BLEU-3} & \textbf{BLEU-4} \\ \hline \multirow{3}{*}{Seq2Seq} & small & 0.072 (0.441) & 0.077 (0.326) & 0.075 (0.246) & 0.070 (0.188) \\ & medium & 0.006 (0.300) & 0.018 (0.226) & 0.021 (0.171) & 0.023 (0.130) \\ & large & 0.000 (0.213) & 0.000 (0.166) & 0.000 (0.128) & 0.000 (0.099) \\ \hline \multirow{3}{*}{Tree2Tree} & small & 0.200 (0.433) & 0.220 (0.296) & 0.223 (0.201) & 0.218 (0.137) \\ & medium & 0.148 (0.330) & 0.147 (0.224) & 0.146 (0.150) & 0.128 (0.101) \\ & large & 0.102 (0.222) & 0.090 (0.152) & 0.079 (0.102) & 0.070 (0.068) & \\ \ChangeRT{1pt} \end{tabular}% } \endgroup \caption{Corrected BLEU scores of reconstructed results of the best models on different input sizes. (correction scores in parenthesis)} \label{tab:corrected_rec_results_inp_sizes} \end{table} \Cref{tab:corrected_rec_results_inp_sizes} indicates a large difference in performance degradation between the Seq2Seq model and the Tree2Tree model. A noticeable result is that the corrected BLEU scores for large programs predicted by the Seq2Seq model are 0. Hence, the Seq2Seq model extracts no information from the latent vector at all for large programs. Similarly, for medium-sized programs, little information is transferred between the encoder and decoder. We can again compute the performance degradation scores for the Seq2Seq model, which are $0.280$ and $0.00$ for the medium versus small and large versus small subsets, respectively, on the corrected BLEU-4. In contrast, the performance degradation is much smaller for the Tree2Tree model: $0.587$ and $0.321$ for the medium versus small and large versus small subsets, respectively, on the corrected BLEU-4. Hence, the structural nature of the Tree2Tree model scales better to large input sequences than the Seq2Seq model in terms of reconstruction scores, even with a much smaller latent size. We hypothesize that, due to the Tree2Tree model performing auto-regressive operations on paths of trees that scale on the width and depth of the tree, the model mitigates exploding and vanishing gradients. An interesting observation is that the latent vector conveys relatively little information in terms of BLEU scores. The correction scores make up a large part of the total BLEU scores as presented in \cref{tab:rec_results_inp_sizes}. Hence, the BLEU scores are largely determined by the models' general knowledge of how C++ programs are built up and not the specific content. This is a side effect of training on this particular data set, as the model will put a lot of its focus on learning the highest reconstruction score, which can be obtained by learning these basic constructs of a program. \subsection{Generative results} The aim of the autoencoders is to be able to generate syntactically correct and compile-able programs from latent space. Therefore, we evaluate both the autoencoders on this ability next. To do this, we sample 1000 random latent vectors from the prior distribution $\mathcal{N}(0, I)$ and input these vectors to the decoder networks. Then, we compute the percentage of generated programs that compiles and is thus also syntactically correct. This measure allows us to see how well autoencoders can generate reasonable samples from any point in latent space that conform to the C++ syntax. Again, we experiment with different combinations of latent sizes and hidden dimensions. We employ two decoding strategies to test the generative capabilities of the models: greedy decoding and sampling. We use greedy decoding to see how well the models perform when selecting their most likely predictions. Sampling is more often used when generating new samples, allowing for more diversity in the output. The sampling strategy we apply is a combination of top-$k$, nucleus, and temperature sampling \cite{holtzman2019curious}. We first use temperature sampling to scale the logits to control the shape of the probability distribution. Then, we filter the on the top-$k$ samples, after which we filter tokens on their cumulative probability using nucleus sampling (top-$p$). Lastly, we sample a token from the resulting distribution. The selected sampling hyper-parameters for this experiment are: $k=40$, $p=0.9$, $temperature=0.7$. The results of the experiment are displayed in \cref{tab:gen_results}. \begin{table}[ht!] \centering \begingroup \setlength{\tabcolsep}{3pt} \renewcommand{\arraystretch}{1.4} \begin{tabular}{cccc} \ChangeRT{1pt} \textbf{Model} & \textbf{Latent size} & \textbf{Greedy search} & \textbf{Sampling} \\ \hline \multirow{5}{*}{Seq2Seq} & 10 & 0.0\% & 0.9\% \\ & 50 & 38.5\% & 2.9\% \\ & 100 & 62.1\% & 21.3\% \\ & 150 & 58.0\% & 23.5\% \\ & 300 & 60.6\% & 36.8\% \\ & 500 & 67.5\% & 37.8\% \\ & 800 & 78.2\% & 39.6\% \\\hline \multirow{5}{*}{Tree2Tree} & 10 & 29.6\% & 20.2\% \\ & 50 & 22.6\% & 17.7\% \\ & 100 & 30.3\% & 22.1\% \\ & 150 & 26.9\% & 18.8\% \\ & 300 & 23.4\% & 12.8\% \\ & 500 & 25.6\% & 14.4\%\\ & 800 & 4.1\% & 6.7\% \\\ChangeRT{1pt} \end{tabular} \endgroup \caption{Generative results compilation percentage.} \label{tab:gen_results} \end{table} The results from \cref{tab:gen_results} show similar trends as \cref{results:recon}. The general trend is: the larger the model (in terms of latent size and hidden units), the higher the compilation percentage. Moreover, greedy search during inference gives a higher compilation percentage than sampling. This outcome is not surprising, as, with greedy search, we always pick the label for which the model is most confident. On the other hand, sampling gives a more varied output and may be useful for searching similar programs in a vicinity of the latent space. The trade-off for a more diverse output is thus a lower compilation ratio. \paragraph{General errors} We have manually inspected the messages of the compiler to find the main issues with the generated programs. This shows the weaknesses of the current programs and what a possible improved model can focus on to improve the performance of the compilation rate. The most common issues with the Seq2Seq model are: \begin{itemize} \item References to identifiers not declared in scope \item Re-declarations of identifiers \end{itemize} Furthermore, we have also inspected the compiler errors on the generated programs of the Tree2Tree models, the most often occurring errors are: \begin{itemize} \item References to identifiers not declared in scope \item Invalid types (e.g. trying to access an array element on a non-array type) \item Mismatched types (e.g. concatenate integer and string) \item Invalid type conversion (e.g. read standard input to an integer array) \item Use of member functions not available for a type (e.g. try to use the $push\_back$ member function of integer arrays on a string) \end{itemize} Lastly, we have performed a more qualitative evaluation (see supplementary material, \url{https://tree2tree.app/supmat.pdf}). From this evaluation, we find that the Tree2Tree model has a structured latent space where similar points in latent space also map to similar programs. This allows for a directed search over the latent space. Moreover, we find that the Seq2Seq model maps the same program to multiple latent vectors, indicating some form of KL vanishing. \subsection{Architecture} The baseline model considered takes inspiration from NLP autoencoder models. Typically, NLP methods consider texts/inputs as linear sequences of tokens. Our baseline model will follow this approach and consider source code as a sequence. The model will take a sequence as input and output a sequence. Therefore, we refer to the baseline model as the sequence to sequence model or Seq2Seq in short. In this work, we will focus on Variational Autoencoders (VAE) to allow for the generation of new programs, as discussed in \cref{sec:VAE} \begin{figure*}[ht!] \centering \includegraphics[width=0.9\linewidth]{figures/seq2seq.png} \caption{The architecture of the Seq2Seq model} \label{fig:seq2seq} \end{figure*} The model architecture is inspired from \cite{bowman2015generating}. In this architecture, both the encoder and decoder networks contain single-layer recurrent neural networks. A Gaussian prior is used for the regularization of the latent space. The decoder is an RNN language model that is conditioned on the latent code that the encoder outputs. More specifically, the encoder takes the hidden state of its RNN after operating on a sequence and outputs a mean and variance. After obtaining a mean and variance from the encoder, we sample a latent code $z$ representing the input using the reparameterization trick \cite{kingma2013auto}. The decoder uses $z$ and transforms it to a state, with the help of a linear layer, where it can be used as initial the hidden state for its RNN. This architecture is depicted in \cref{fig:seq2seq}. In the model, tokens are represented using a learned dictionary of embedding vectors. These embedding vectors can either be learned from scratch or pre-trained and then fine-tuned. \subsection{Optimization} The model aims to learn a latent space that represents source code. We can quantify how well the model learns a latent space using a variational lower bound objective \cref{eq:ELBO}. This bound can be expressed as two separate terms: the likelihood of the data under the posterior (which we refer to as the reconstruction loss) and KL divergence. Simply put, the reconstruction loss is a measure of how well the model reconstructs the input, while the KL divergence is a measure of how similar the posterior is compared to the prior. A common issue of variational autoencoders, where the decoder is parameterized with an auto-regressive model, is KL vanishing \cite{bowman2015generating}. The KL divergence term will go to zero when this happens, and the model will behave as an RNN language model. We employ two techniques to mitigate this issue. \subsubsection{Cyclic KL annealing}\label{seq2seq:cyclic_kl_annealing} We employ cyclical KL cost annealing \cite{fu2019cyclical} to mitigate the KL vanishing issue. This technique weighs the KL divergence term of the loss function, increasing the weight from 0 to 1 at a fast pace, staying at 1 for some iterations, and then returning to 0 in several cycles. The cyclical schedule can progressively improve the performance by resetting the KL term to 0 to leverage good latent codes learned in previous cycles as warm re-starts. \subsubsection{Word dropout} As in \cite{bowman2015generating}, we use a technique called word (or token) dropout. The cyclic KL annealing weakens the penalty term on the output of the encoder whereas word dropout weakens the decoder. The decoder learns how to predict a next token conditioned on the true previous token using teacher forcing. To weaken the decoder, some of the information of the conditioning can be removed during learning. This can be achieved by randomly replacing a fraction of the previous true tokens with an unknown token. This is a technique to force the model to rely on the latent variable $z$ for learning how to reconstruct the input. The fraction of true tokens replaced by unknown tokens is a hyperparameter between 0 and 1. When this hyperparameter is set to 1, the decoder sees no input. \subsubsection{Loss function} The last part of the model that has yet to be defined is the loss function. The KL divergence part of the loss function can be computed in closed form given our Gaussian prior (\Cref{eq:KL_div}). We use the output of the encoder, the mean and variance, to compute the KL divergence. We use cross-entropy loss (negative log-likelihood) between the softmax probabilities of the predicted sequence of the encoder and the target sequence (reconstruction) to estimate the reconstruction loss. Our dataset contains almost 300.000 unique tokens, and the distribution of these tokens is highly imbalanced. For example, the token "\{" occurs much more often than an arbitrary user-defined variable name. Therefore, to allow softmax to be computed efficiently, we use adaptive softmax \cite{grave2017efficient}. The reconstruction loss and KL divergence term are then summed, and this total cost function is optimized during training. \subsection{Data Pre-processing} The data set containing complete C++ programs must be pre-processed to sequences of tokens to feed the model. This pre-processing step must be reversible up to a particular state. More specifically, we need to create syntactically valid and compilable programs back from the sequences of tokens. Furthermore, the reconstructed programs should not function any differently compared to their original counterparts. We want to model to learn how to generate valid code. Therefore, we remove certain components from programs that are not we do not consider as source code. These components are comments, imports/includes, and macros. Comments can safely be removed without changing the functionality of a program. Imports can be extracted, saved, and re-added later, if necessary. Additionally, we expand any defined macros in the source code. We expand the macros and remove comments by running CLANG C++ compiler with the `-E' option, which stops the compiler after the prepossessing stage. \subsection{Autoencoder type} For our model, we have chosen to use a variational autoencoder (see \cref{sec:VAE}) since, unlike its non-stochastic counterpart,it is less dependent on choosing the right size of the latent vector, since the KL component encourages the model to use as small of a subspace of the latent space as it can. Our experiments do, however, indicate that the choice of latent dimension is still important. \subsection{Code representation} Unlike natural languages, programming languages are easier to represent structurally due to the nature of their syntax which improves machine learning performance \cite{alon2019structural}\cite{chen2018tree}\cite{kusner2017grammar} compared to a more traditional sequence of tokens representation. We are proposing a model that takes as input a tree and outputs a tree and will refer to our proposed autoencoder as the Tree-to-Tree (Tree2Tree) model. \subsection{Encoder} The encoder network aims to capture the most relevant information in a program and map it to a smaller representation. \paragraph{Embedding} The first step when dealing with language is to convert tokens into dense representations, commonly referred to as embeddings. The first layer of the encoder network consists of an embedding layer, which can be either initialized randomly or initialized with pre-trained parameters and then fine-tuned further. \paragraph{Tree-LSTM} As mentioned, we would like to take advantage of the structural information present in source code. There are two methods in which we could incorporate tree-structured data in the encoder network. The first method would be to flatten tree-structured data into a sequence and have the encoder operate on the flattened tree representation. There are multiple well-researched models capable of processing sequences, such as RNNs, Transformers, or CNNs. One of these established models could be used to process such a flattened tree representation. However, we want to operate directly on the tree representation to take advantage of the structural information. To allow for this, we require a model that can process tree-structured data. Tai \textit{et al.}\cite{tai2015improved} propose such a network by altering the standard LSTM architecture to enable capturing structural information. Instead of computing the hidden state from the input at the current time and the hidden state from the previous step, like in the standard LSTM model, the proposed model computes its hidden state from input at the current step and the hidden states from an arbitrary number of children. We employ the Child-Sum Tree-LSTM \cite{tai2015improved} which is defined as follows. Given some tree, we can denote the set of children of a node $y$ as $C(y)$ and the vector representation of the node as $\mathbf{x}^y$. The transition equations between the different Tree-LSTM are the following: \begin{align}\label{eq:tree_lstm_encocer} \mathbf{h}^y_* &= \sum_{z \in C(y)} \mathbf{h}^z \\ \mathbf{i}^y &= \sigma(\mathbf{W}_{i} \cdot \mathbf{x}^y + \mathbf{U}_{i} \cdot \mathbf{h}^y_* + \mathbf{b}_{i}) \\ \mathbf{f}^{yz} &= \sigma(\mathbf{W}_{f} \cdot \mathbf{x}^y + \mathbf{U}_{f} \cdot \mathbf{h}^z + \mathbf{b}_{f}) \\\label{eq:child_sum_4} \mathbf{o}^y &= \sigma(\mathbf{W}_{o} \cdot \mathbf{x}^y + \mathbf{U}_{o} \cdot \mathbf{h}^y_* + \mathbf{b}_{o}) \\ \mathbf{u}^y &= tanh(\mathbf{W}_{u} \cdot \mathbf{x}^y + \mathbf{U}_{u} \cdot \mathbf{h}^y_* + \mathbf{b}_{u}) \\ \mathbf{c}^y &= \mathbf{i}^y \odot \mathbf{u}^y + \sum_{z \in C(y)} \mathbf{f}^{yz} \odot \mathbf{c}^z \\ \mathbf{h}^y &= \mathbf{o}^y \odot tanh(\mathbf{c}^y) \end{align} In \cref{eq:child_sum_4}, $z \in C(y)$ and $\odot$ denotes the element-wise product (Hadamard product). Furthermore, $W$, $U$ and $b$ denote trainable parameters of the model. Here we see that for calculating node $y$, we need to have computed the hidden states of all of the children $C(y)$. Hence, the computation order of the Tree-LSTM, given some tree, is bottom-up. Just like with the standard LSTM model, we can stack the Tree-LSTM to create a multilayer Tree-LSTM. In such a multilayer architecture, the hidden state of a Tree-LSTM unit in layer $l$ is then used as input to the Tree-LSTM unit in layer $l + 1$ in the same time step, the same as with the standard LSTM \cite{graves2013hybrid}. The idea is to let higher layers capture longer-term dependencies of the input. In the case of Tree-LSTMs, this translates to capturing longer-term dependencies along the paths of a tree. \begin{figure}[ht!] \centering \includegraphics[width=\linewidth]{figures/pooling.png} \caption[RNN pooling]{\textbf{Top}: Typical architecture of encoder model of VAE in which only the last hidden state from the RNN is used to compute the mean $u$ and variance $\sigma^2$. \textbf{Bottom}: A pooling method to aggregate the hidden states from the RNN to compute the mean $u$ and variance $\sigma^2$.} \label{fig:pooling} \end{figure} \paragraph{Neural attention} As the aim of the encoder network is to extract the most relevant information to a compressed state; we add an attention layer that comes after the last Tree-LSTM layer. This layer is fed with all the hidden states of the last Tree-LSTM layer. We add this layer because some nodes in the tree might contain more information to contribute to the latent code. The node importance calculation is based on \cite{winata2018attention}, and updates the hidden states as follows: \begin{align} \mathbf{h}_{at} = \mathbf{h} \cdot tanh(\mathbf{W} \cdot \mathbf{h} + \mathbf{b}) \end{align} Here, $h$ denotes the hidden states of the last Tree-LSTM layer. This additional layer allows the network to learn how to alter the Tree-LSTM layer(s) output to focus more on the nodes that contain the most information. \paragraph{Pooling} We require our model to output a fixed size vector representing our latent code, however, the size of $h_{at}$ is variable as it is dependent on the size of the input. One approach to obtain a fixed size vector is to take the last hidden state after processing the entire tree. This method is often applied in autoregressive autoencoders \cite{fabius2015variational}. The intuition is that the last hidden state captures the entire input and summarizes this input into a single state. However, this method may suffer from long-term memory loss \cite{kao2020comparison}. Instead, pooling is a method to obtain a fixed size vector from the hidden states by aggregating features across different time steps of the hidden states. \cref{fig:pooling} depicts the difference between taking the last hidden state and pooling. Our model uses max-pooling to obtain a fixed size vector from our hidden states. \paragraph{Sampling latent code} The pooled vector is then used to compute the mean and variance of the approximate posterior to sample a latent code $z$ with the help of the reparametrization trick \cite{kingma2013auto}. The mean and variance are computed using linear layers that learn a set of weights and biases. \subsection{Decoder} The goal of the decoder network is to reconstruct a given input as accurately as possible, given the latent code produced by the encoder. \paragraph{Tree decoding} We use the same tree structure for decoding as we used for encoding. . Additionally, \cite{fabius2015variational} shows that having a reversed order of the input sequence compared to the reconstructed sequence when dealing with autoregressive models improves the performance. We employ this technique in our model, which means that since our encoder processes trees bottom-up, the decoder will produce trees top-down. The idea here is that the first steps of decoding the tree are more related to the latent space than the last steps. A method called the doubly-recurrent neural network (DRNN) \cite{alvarezmelis2017tree} allows for top-down tree generation from an encoded vector representation. This method operates solely on the vector representation and does not require that either the tree structure or the nodes are given. The DRNN is based on two recurrent neural networks, breadth and depth-wise, to model ancestral and fraternal information flow. Hence, each node in the tree receives input from two types of states, one input comes from its parent, and the other comes from its previous sibling. Since we capture the information flow with two separate RNN modules, we obtain two hidden states for each node in the tree (ancestral and fraternal). These hidden states can be combined to form a so-called predictive hidden state from which topological information and node labels can be predicted. For some node $y$ with parent $pa(y)$ and previous sibling $s(y)$, the ancestral and fraternal hidden states are computed as follows: \begin{align} \mathbf{h}_a^y &= rnn_a(\mathbf{h}_a^{pa(y)}, \mathbf{i}^{pa(y)}) \\ \label{eq:ancestral_update} \mathbf{h}_f^y &= rnn_f(\mathbf{h}_f^{s(y)}, \mathbf{i}^{s(y)}) \end{align} Where $rnn_a$, $rnn_f$ are functions that apply one step of the ancestral and fraternal RNNs, respectively. Furthermore, $\mathbf{i}^{pa(y)}$, $\mathbf{i}^{s(y)}$ are the input values (label vectors) of the parent and previous sibling respectively. After the ancestral and fraternal states of $y$ have been computed with the observed labels of its parent and previous sibling, these states can be combined to form a predictive hidden state: \begin{align} \mathbf{h}^y_{pred} = \tanh\left((\mathbf{W}_a \cdot \mathbf{h}_a^y + \mathbf{b}_a) + (\mathbf{W}_f \cdot \mathbf{h}_f^y + \mathbf{b}_f)\right) \end{align} Where the operations applied to $\mathbf{h}_a^y$, $\mathbf{h}_f^y$ are linear layers with learnable weights and biases. This combined state then contains information about the nodes' surroundings in the tree. For each node in the tree, the model needs to decide whether it has offspring and whether it has any successor siblings. Answering this question for every node allows the model to construct a complete tree from scratch. This method avoids using terminal tokens to end the generation compared to sequential decoders. In turn, this method allows us to make topological decisions explicitly bypassing the need for padding token. We can use the predictive hidden state of a node $\mathbf{h}^y_{pred}$, with a linear layer and a sigmoid activation to compute the probability for offspring and successor siblings as: \begin{align} p_a^y &= \sigma(\mathbf{W}_{pa} \cdot \mathbf{h}_{pred}^y + \mathbf{b}_{pa}) \label{eq:prob_ancestral} \\ p_f^y &= \sigma(\mathbf{W}_{pf} \cdot \mathbf{h}_{pred}^y + \mathbf{b}_{pf})\label{eq:prob_fraternal} \end{align} Where during training, we use the actual values for whether a node has children and successor siblings. During inference, we can either greedily choose any confidence level to continue creating offspring and succeeding siblings by checking whether the probability is above some threshold or sample this choice. Besides topological predictions, the model should also predict the label of each token. Again the predictive hidden state can be used for label prediction as follows: \begin{align} \mathbf{o}^y = softmax\left(\mathbf{W}_o \cdot \mathbf{h}_{pred}^y + \mathbf{b}_{o}\right) \label{eq:label_pred} \end{align} \paragraph{Tree decoding optimizations} Now that we have the basic DRNN model \cite{alvarezmelis2017tree} in place to generate a tree from scratch using a latent vector, we can optimize it for our use case. There are still a few issues with the tree decoding method, such that it is not practical to be used with generating industry-grade programming languages. The first issue is the possibly infinitely large vocabulary that source code allows. In contrast to NLP, developers may choose any combination of characters, e.g., for identifiers, and are not limited to a finite dictionary of words. For identifiers, the compiler does not care about the identifier itself but only about the declaration of an identifier and its references. Changing these identifiers to any other random combination of characters while preserving the relations will not functionally change the code. Therefore, we map each unique identifier to a reusable ID \cite{tufano2019learning} and treat the prediction of identifiers as a clustering problem between declarations and references. We use the predictive hidden states of the nodes to learn relationships between declarations and references. The model can keep track of a list of the declared identifiers while generating an AST. Each time a new identifier is declared, a new reusable ID is added to the list. Then for each reference, we can compute the similarity to each of the declared identifiers using some similarity function and predict the most similar identifier. We can keep track of what type of node we are currently trying to predict due to the AST structure and because we have access to the parent node label, i.e., the parent node indicates whether the child node is a declaration or reference. Let $D$ be the set of currently declared identifier nodes and $y$ be the current reference node we are trying to predict, the most similar declared identifier can be computed as follows: \begin{align} \mathbf{s}^{yz} &= similarity(\mathbf{W}_c \cdot \mathbf{h}^y_{pred} + \mathbf{b}_c, \mathbf{W}_c \cdot \mathbf{h}^z_{pred} + \mathbf{b}_c) \\ \mathbf{r}^y &= \min_{z \in D}(\mathbf{s}^{yz}) \end{align} We have a similar problem for literal tokens; developers can use an almost infinitely large number of unique literals in source code. However, in contrast to identifier tokens, literal tokens influence the functionality of a program. Therefore, to assure that generated programs are still compile-able, we cannot remap the literal tokens to reduce the token count. For example, we cannot map rarely used literals to special unknown tokens, as unknown tokens create compiler errors. Instead, we can employ adaptive softmax \cite{grave2017efficient} to use a vocabulary consisting of many unique literal tokens without a considerable increase in computational complexity. We have identifiers and literals as token categories already, but we can also categorize the leftover tokens into the following categories: \begin{itemize} \item \textbf{Reserved tokens:} for, if, while, ... \item \textbf{Types:} int, long, string, ... \item \textbf{Built in function names:} printf, scanf, push, ... \end{itemize} In total, the five categories cover all the different tokens of the programming language (at least for C++). The reason for splitting up the leftover tokens into more categories is to predict these categories separately based on their parent node. For example, this ensures that we do not input a type-token in the tree, where there should be a reserved token. The categorization improves the compilation rate of the generated programs by allowing the model only to predict tokens of the correct token category. The tree-structured representation during decoding allows us to use this optimization technique. For the reserved tokens, type, and built-in function names, \cref{eq:label_pred} is used for label prediction, as there is only a limited number of unique tokens in these categories. To allow for the categorized label predictions, we need to add one more element to the DRNN model. As mentioned, the chosen category to predict a label for depends mainly on the parent node. An essential aspect of the tree structure is that all categories, except for reserved tokens, only occur on leaf nodes. In essence, all types, identifiers, built-in function names, and literals occur in the leaves of the trees. Therefore, if a node has offspring, the category of the current node must be a reserved token. However, if a node has no offspring, it can be either of the categories, and we need to somehow decide which category to predict a label for. Note that a reserved token can also be on a leaf node on the tree. For example, consider an empty return statement. For that reason, similar to the topology predictions, we have the model predict whether a node is of the reserved token category or not. This prediction is computed in the same way as the topology predictions using the predictive hidden state of the node as follows: \begin{align} p_r^y &= \sigma(\mathbf{W}_{pr} \cdot \mathbf{h}_{pred}^y + \mathbf{b}_{pr}) \label{eq:res_pred} \end{align} Next, let us consider the case where a node is not of the reserved token category. The model must be informed to predict a label for one of the remaining categories. The data in the tree structure can be represented in a way that this choice depends on the parent label. We can label the parent node of literals: `literal', type nodes: `type', and built-in function names: `built-in function name'. The identifier (including references) token category is the leftover category that can be predicted if a node does not fall in any of the previous categories. \paragraph{Add gate} The DRNN model has a large flaw, where it is not able to differentiate between paths with the same prefix. For example, consider the situation depicted in \cref{fig:treeAddGate}, where we have two function declarations named `add' and `main'. Due to the information flow downwards, both name nodes have the same hidden state and the model is not able to distinguish the leaf nodes and will therefore predict the same label for both. This issue is depicted in the left image of \cref{fig:treeAddGate}. To solve this issue, we would like to incorporate the fraternal states in the downwards flow for the model to learn to differentiate the paths downwards. Hence we would like to revise \cref{eq:ancestral_update}, where we take inspiration from the LSTM model and apply the idea of the add gate to our ancestral update formula as follows: \begin{align} &\mathbf{m}_f^y = \sigma(\mathbf{W}_m \cdot \mathbf{h}_f^y + \mathbf{b}_m)\\ &\mathbf{a}_f^y = tanh(\mathbf{W}_a \cdot \mathbf{h}_f^y + \mathbf{b}_a)\\ &\mathbf{h}_a^y = \mathbf{h}_a^y + (\mathbf{a}_f * \mathbf{m}_f) \end{align} This update to the fraternal state is applied after predicting the label for node $y$, which is depicted in the right image of \cref{fig:treeAddGate}. Here, $a_f^y$ is the value of the transformation on the previous sibling state that should be added to the parent state, where the $tanh$ transforms it between -1 and +1 to mitigate exploding gradients. Furthermore, $m_f^y$ decides which elements should be added using a sigmoid function that outputs values between 0 and 1. By multiplying $a_f^y$ with $m_f^y$, the model can learn to decide what and how much to add from the previous sibling state to each parent state's element to help predict the next steps of the tree. \begin{figure}[ht!] \centering \includegraphics[width=\linewidth]{figures/TreeAddGate.png} \caption{DRNN expanded with an add gate to allow for information flow from previous siblings downwards} \label{fig:treeAddGate} \end{figure} \subsection{Optimization} \subsubsection{Mitigating KL vanishing} KL vanishing is a common issue when dealing with VAEs with a decoder parameterized by an auto-regressive model. We mitigate it vanishing using cyclical KL cost annealing \cite{fu2019cyclical}. Furthermore, we apply pooling to the hidden states of the RNN network in the encoder. Long \textit{et al.} \cite{long2019preventing} show this pooling method can effectively prevent the posterior collapse issue. The argumentation is that taking only the last hidden state from the RNN of the encoder will cause the encoder to often produce similar representations leading to nearly indistinguishable samples. In turn, the decoder will ignore the latent variables as they convey no useful information about the data. Pooling the hidden states of the encoder RNN incorporates more information of the entire input into the latent variables mitigating the KL vanishing issue. \subsubsection{Loss function} We can categorize two classes of predictions that the model has to perform to generate a tree structure: labels and topology. The topology class entails the predictions that lead to building the structure of the tree. Precisely, for each node, predict whether there is offspring and any successor siblings. The label class encompasses filling in the actual values in the tree structure, predicting what tokens should occur at a particular node in the tree given the surrounding context. Let us first look into the loss terms for the topology predictions. Predicting whether a node has offspring and successor siblings are binary choices. Recall from \cref{eq:prob_ancestral} and \cref{eq:prob_fraternal} that we compute probabilities for these choices using the sigmoid function that gives values between 0 and 1. Therefore, we can use binary cross-entropy to compute the loss for both of the topology predictions. The loss can be computed between the predicted probabilities and the true values of having offspring and successor siblings. Let $a^y$, $f^y$ represent the actual values of having offspring and successor siblings for node $y$, the topological losses for this node are then computed as follows: \begin{align} \mathcal{L}_{a}(y) = - a^y \cdot \log(p^y_a) + (1 - a^y) \cdot \log(1 - p^y_a) \\ \mathcal{L}_{f}(y) = - f^y \cdot \log(p^y_f) + (1 - f^y) \cdot \log(1 - p^y_f) \end{align} \noindent where $\mathcal{L}_{a}$, $\mathcal{L}_{f}$ denote the ancestral and fraternal loss respectively. Because the reserved token category prediction (\cref{eq:res_pred}) is so similar to the topological predictions, the loss for that component can be defined in a similar fashion: \begin{align} \mathcal{L}_{r}(y) = - r^y \cdot \log(p^y_r) + (1 - r^y) \cdot \log(1 - p^y_r) \end{align} \noindent Where we define $r^y$ to represent the actual value of node $y$ being in the reserved token category. Secondly, let us elaborate on the loss for the label predictions. For all label categories, except the identifiers, we are dealing with a classification problem. Hence, we can compute the cross entropy loss (or negative log likelihood) between the softmax output for a node $y$ (\cref{eq:label_pred}) and its true label: \begin{align} \mathcal{L}_{l}(y) = - \log(\mathbf{o}^y[l^y]) \end{align} \noindent Where we assume that $l^y$ is the index of the true label, and hence $\mathbf{o}^y[l^y]$ retrieves the softmax value at the index of the correct class. Lastly, since predicting the labels of identifier (reference) tokens is treated as a clustering problem, we can use triplet loss \cite{chechik2010large}. We use a similarity function (or inversely, distance function) and maximize the similarity between declarations and reference labels. To compute the loss of a reference node $y$, we select the true declaration node $z$ and sample a negative declaration node $x$; the loss is then defined as follows: \begin{align} \mathcal{L}_i(y)=\max(\mathbf{s}^{yx} - \mathbf{s}^{yz},0) \end{align} \noindent We can then combine all of the separate components to form a single reconstruction loss function for a node: \begin{small} \begin{align} \mathcal{L}_{rec}(y) = \begin{cases} \mathcal{L}_{a}(y) + \mathcal{L}_{f}(y) + \mathcal{L}_{r}(y),& \text{if } y \text{ is a declaration} \\ \mathcal{L}_{a}(y) + \mathcal{L}_{f}(y) + \mathcal{L}_{r}(y) + \mathcal{L}_{i}(y),& \text{if } y \text{ is a reference} \\ \mathcal{L}_{a}(y) + \mathcal{L}_{f}(y) + \mathcal{L}_{r}(y) + \mathcal{L}_{l}(y),& \text{otherwise} \end{cases} \end{align} \end{small} \noindent Because the loss is decoupled, this allows us to weigh the objectives differently to emphasize, for example, topology or label prediction accuracy. We leave experimenting with different weights for objectives as future work. Let $N$ be the set of nodes of a tree; we can define the loss reconstruction loss of an entire tree as follows: \begin{align} \mathcal{L}_{tot\_rec}(N) = \sum_{y \in N}\mathcal{L}_{rec}(y) \end{align} \noindent The total loss function, combining the KL divergence, KL weight $w$ and reconstruction loss becomes: \begin{align} \mathcal{L}(N) = \mathcal{L}_{tot\_rec}(N) - w \cdot D_{KL}\left(Q(z|N)||P(N)\right) \end{align} \noindent During training, we perform teacher forcing, technique that is commonly used with sequence generation. \begin{figure*}[ht!] \centering \includegraphics[width=\linewidth]{figures/tree2treeLSTM2.png} \caption[Tree2Tree model high-level overview]{Tree to tree autoencoder overview. \textbf{First Fig.}: The piece of code considered. \textbf{Second Fig.}: The piece of code parsed to an AST tree format. \textbf{Third Fig.}: The order in which the encoder module encodes the tree structure bottom-up. Here, $h_c$ indicates the hidden state that travels from a child to a parent. \textbf{Fourth Fig.}: The order in which the decoder module decodes the tree structure top-down. Here, $h_p$ indicates the hidden state that travels from a parent to a child, and $h_s$ indicates the hidden state that travels from a node to its successor sibling.} \label{fig:tree2treeVAE} \end{figure*} \subsection{Data Pre-processing} Now that we have defined the proposed Tree2Tree model, we have to pre-process the C++ programs to the representation that fits the model's description. We have to convert the sequential source code to the hierarchical tree structure. In this section, we will first go over the process of transforming the data to the tree structure and back. Afterward, we will discuss the filters we apply to the data. \subsubsection{Transformations} The first steps are to remove comments, extract imports and expand macros. The resulting output is the actual source code. Next, we extract the AST representation from the Clang C++ compiler. We filter the extracted AST to the minimal representation required to reconstruct the source code. Moreover, we categorize each node in the tree in one of the following categories: reserved tokens, types, built-in function names, literals, and identifiers. An example of how a piece of code is transformed into a tree structure is depicted in \cref{fig:tree2treeVAE}. To go back to the sequence representation from the tree representation, we start from the root and recursively iterate over the children to reconstruct the source code. \subsubsection{Filtering} To keep the training stage of the model efficient, we set a limit to the maximum tree size the programs may have. Large programs will create a bottleneck during training, especially with mini-batch processing. We find that putting the tree size limit at 750 strikes a good balance between effective training and keeping a large portion of the data because 95\% of the programs are within this limit of 750 tree nodes. Therefore, we filter out any programs with a tree size of more than 750 nodes and use the remaining data set for training and validating the model. In the next section, we introduce a baseline model where we apply the same filters on the data as with the Tree2Tree model, to allow for a fair comparison of the two models. \section{Introduction} \input{introduction} \section{Background} \input{background} \section{Related work} \input{related_work} \section{Proposal: Tree-to-Tree} \input{Tree2Tree} \section{Experiments} \input{Experiments} \section{Conclusion} \input{conclusion} \bibliographystyle{abbrv}
\section{introduction} Capsule endoscopy has been extensively studied since its first invention by Iddan \cite{ref1}. The actuation for capsule robots can be generally divided into two different categories: active and passive. The actuator of the active capsule robot is delicately embedded into its size-limited structure, which results in its vulnerability and complicated manufacturing process. Compared with the active capsule robot, the passive capsule robot has a simpler internal structure and is more stable for practical applications. There are three popular methods to provide external field strength. The first method is to use the Helmholtz coil. A coiled microrobot is designed to move in all the directions in \cite{ref2}. The spherical capsule robot controlled by the coil can rotate and translate \cite{ref3}. A coil-controlled capsule robot is used in the intestinal movement \cite{ref4}. The second method is to use a combination of an external permanent magnet and an electromagnetic coil, which is used to control the steering and movement of capsule robot in PVC (polyvinyl chloride) pipe \cite{ref5}\cite{ref6}. The third method is to use an external permanent magnet. A capsule robot with three degrees of freedom and two directions is controlled base on this method \cite{ref7}\cite{ref8}. The external permanent magnet drive has the advantages of no energy consumption, constant magnetic induction, and ease to control. There are three main external magnetic field control drives: the transplanting platform machine \cite{ref9}, the handheld drive \cite{ref10}, and the manipulator \cite{ref5}\cite{ref6}\cite{ref7}. Among them, the manipulator is easy and sensitive to control and has a variety of gestures, which is adopted in this paper. For the transmission of signals, capsule robots can be divided into two categories: wireless and tethered. For a wireless capsule robot, the image signal transmission has a certain delay because it relies on the internal image transmitting device and the external image receiving device \cite{ref1}. Doctors observe the reconstruction of images captured by wireless capsule robots. Tethered capsule robots have a stable video transmission channel and a lighting energy supply. Despite of the merits of tethered capsule robots, it is also difficult to control the whole system due to the friction and the drag force from the tethered. The mathematical relationship between the manipulator and the capsule robot established in \cite{ref7}, which corresponded the joint speed of the manipulator to the position of the capsule robot, and could control five degrees of freedom, including three directions of movement and two directions of rotation. In addition, Hall-effect sensors are added to the capsule robot to detect the real-time position and to introduce feedback direction control to realize the closed-loop control of the capsule robot \cite{ref4}\cite{ref11}\cite{ref12}. However, the environmental friction in the tethered capsule robot motion model is still not clearly taken into account. In this paper, we propose a dynamic model with friction compensation for the planar motion of the capsule robot. Based on the theoretical control scheme of wireless capsule robot proposed by Mahoney \emph{et al.} \cite{ref7}. We extracted a dynamic model with friction compensation for the control of the tethered capsule robot. Furthermore, we build a magnetic-driven capsule robot system, which includes a six-axis manipulator, a capsule robot, a camera, and a PVC partition (Fig.~\ref{fig1}). This paper is organized as follows: In Section \uppercase\expandafter{\romannumeral2}, the theory of the capsule friction model is proposed. In Section \uppercase\expandafter{\romannumeral3}, the hardware and software of the system are studied. In Section \uppercase\expandafter{\romannumeral4}, the trajectory tracking and magnetic field simulation of the capsule robot are studied and the specific expression of the friction theory in the current experimental environment through experiments is demonstrated. In Section \uppercase\expandafter{\romannumeral5}, the whole research work and results of this article are summarized. The main contribution of our research is to give a learning friction model, which can be applied to translation of tethered capsule robot between any two contact medium.In addition, a strong magnetic Halbach array is applied to improve the external field intensity for a capsule robot. \begin{figure}[htbp] \centerline{\includegraphics[width=3in]{1}} \caption{A scene diagram in the simulated environment: At the end of the manipulator is a external permanent magnet (EPM), and an inner permanent magnet (IPM) is inside the terthered capsule robot. PVC is an obstacle between IPM and EPM. \textbf{} } \label{fig1} \end{figure} \section{Methods} A friction dynamic model between the capsule robot and the contact interface is proposed to optimize the motion control of the capsule robot attached to different media. We expect to obtain a more specific friction relationship between capsule robot and environment to improve the control accuracy. \subsection{Dynamics Model of Magnetron Capsule}\label{AA} According to the application of the point dipole model in \cite{ref7}\cite{ref11}, the theoretical dynamics model of magnetron capsule is defined as: \begin{equation} B(x)\ddot x + C(x,\dot x)\dot x + G(x) = {\tau _m}(x,q)\label{eq1} \end{equation} where $x \in {\mathbb{R}^3}$ is the capsule pose (position and orientation) and $q \in {\mathbb{R}^6}$ embeds the robot joint variables; matrices $B(x)$, $C(x,\dot x)$, $G(x)$ are the respective inertia, Coriolis matrix and gravity. The vector ${\tau _m}(x,q) \in {\mathbb{R}^6}$ represents the magnetic force and torque exerted by the EPM on the IPM. Our aim is to find $q$ such that $x$ approaches a desired value ${x_d}$. The differential of \eqref{eq1} can be deduced as the following expression: \begin{equation} {\dot \tau _m} = \frac{{\partial \tau (x,q)}}{{\partial x}}\dot x + \frac{{\partial \tau (x,q)}}{{\partial q}}\dot q = {J_x}\dot x + {J_q}\dot q\label{eq2} \end{equation} ${\tau _m}$ is the state variable of the control system\cite{ref11}. It is obtained by \eqref{eq1} and \eqref{eq2}: \begin{equation} \left\{ {\begin{array}{*{20}{c}} {B(x)\ddot x + C(x,\dot x)\dot x + G(x) = \tau }\\ {\dot \tau = {J_x}\dot x + {J_q}\dot q + \dot \kappa } \end{array}} \right.\label{eq3} \end{equation} $\tau $ is the actual force and moment on the EPM. Other parameters are shown in Table.~\ref{tab1}. The $\dot \kappa $ mentioned in \eqref{eq3} is put as equivalent to a straight connecting rod in the simulation environment \cite{ref11}, which is not verified in the real environment. In the real environment, $\dot \kappa $ is judged to represent the friction between the capsule and the environment, including kinetic friction force ${{\bf{f}}_{\bf{k}}}$ and static friction force (lead drag force ${{\bf{f}}_{\bf{s}}}$). \subsection{Planar dynamics model of capsule}\label{BB} The theoretical kinetic model of magnetron capsules can be expressed as: \begin{equation} \begin{array}{l} {\bf{F + }}{{\bf{f}}_{\bf{s}}}{\bf{ + }}{{\bf{f}}_{\bf{k}}}{\bf{ = }}m{\bf{a}},{\rm{ }}{{\bf{f}}_{\bf{k}}}{\bf{ = }}{{\bf{F}}_{\bf{N}}} \cdot \mu \\ \\ {\bf{F + }}{{\bf{f}}_{\bf{s}}}{\bf{ + }}{{\bf{F}}_{\bf{N}}} \cdot \mu {\bf{ = }}m{\bf{a}} \end{array}\label{eq4} \end{equation} The force diagram of the model is shown in Fig.~\ref{fig2}(a), and the other parameters are shown in Table.~\ref{tab1}. \begin{figure}[htbp] \centerline{\includegraphics[width=3.5in]{2}} \caption{The force diagram of the magnetron capsule: (a) Schematic diagram of the force of the capsule robot in the working state. (b) The top view of the capsule robot's working state.} \label{fig2} \end{figure} \begin{table}[htbp] \renewcommand\arraystretch{1.5 \caption{Nomenclature Used} \begin{center} \begin{tabularx}{\linewidth}{ c c \hline \textbf{\space\space\space Symbol \space\space\space\space}&\textbf{{Description}} \\ \hline $\kappa $& Friction between Lead and Environment \\ \multirow{2}{*}{}{${\bf{F}}$}& \makecell[c]{Traction Force of Capsule in Movement Direction}\\ \multirow{2}{*}{}{${{\bf{F}}_{\bf{z}}}$}& \makecell[c]{Magnetic Force of capsule in Vertical Direction}\\ \multirow{2}{*}{}{${{\bf{F}}_{\bf{N}}}$}& \makecell[c]{Support Force of capsule by PVC}\\ ${{\bf{f}}_{\bf{s}}}$& Static Friction Force \\ ${{\bf{f}}_{\bf{k}}}$& Kinetic Friction Force\\ $m$& Capsule Mass (20.9g)\\ ${\bf{a}}$& Capsule Acceleration\\ ${\bf{v}}$& Manipulator Speed (Preset Experimental Speed)\\ ${{\bf{v}}^{\bf{*}}}$& The Typical Speed, about 0.2m/s \cite{ref15}\\ ${\bf{D_{c}}}$& Critical Slip Length \cite{ref15}\\ $a$& System Constant \cite{ref15}\cite{ref16}\\ $b$& System Constant \cite{ref15}\cite{ref16}\\ ${\mu _0}$& Sliding Friction Coefficient\\ $c$& Equation of Friction System to be Solved.\\ \hline \end{tabularx} \label{tab1} \end{center} \end{table} In particular, kinetic friction and static friction have been proved to be relative. These two concepts can be replaced by a view of rate-dependent friction, the law of friction of rocks \cite{ref15}, which is generally applicable to materials including polymers, glasses, etc. In \cite{ref15}, the coefficient of friction is related to instantaneous velocity ${\bf{v}}$ and state variable $\theta $. \begin{equation} \mu = {\mu _0} - a\ln \left( {\frac{{{{\bf{v}}^{\bf{*}}}}}{{{\bf{|v|}}}} + 1} \right) + b\ln \left( {\frac{{{{\bf{v}}^{\bf{*}}}{\rm{\theta }}}}{\bf{D_{c}}} + 1} \right)\label{eq5} \end{equation} For the state variable $\theta $ in law \eqref{eq5}, the following equation is available, \begin{equation} \dot{\theta}=1-\left(\frac{\bf{|v|} \theta}{\bf{D_{c}}}\right)\label{eq6} \end{equation} The constants a and b in law \eqref{eq5} are both positive numbers, with the order of magnitude from ${\bf{D_{c}}}$ , and the order of magnitude of ${\bf{D_{c}}}$ under the experimental conditions is 10um. In the static case, $\theta =t\ $ is true. Therefore, the state variable can be interpreted as the average time from the beginning of the movement of the micro-contact. When the moving speed is constant ${\bf{|v|}}$ and the initial condition is $\theta (0)={{\theta }_{0}} $, the solution of equation \eqref{eq6} is: \begin{equation} \theta(t)=\frac{\bf{D_{c}}}{\bf{|v|}}+\left(\theta_{0}-\frac{\bf{D_{c}}}{\bf{|v|}}\right) \exp \left(-\frac{{\bf{|v|}} t}{\bf{D_{c}}}\right)\label{eq7} \end{equation} All existing micro-contacts along the sliding length ${D_{c}}$ where ${D_{c}}$ is located are destroyed and replaced by new micro-contacts. After this transformation process,\begin{equation} \theta(\infty)=\frac{\bf{D_{c}}}{\bf{v}}\label{eq8} \end{equation} This is true, which is consistent with the interpretation of state variable 0 as an age variable. In this case, the steady-state value of $\theta $ is equal to the average contact time of micro-contact. For steady-state sliding, the friction coefficient is the formula \eqref{eq9}: \begin{equation} \mu=\mu_{0}- c\ln \left(\frac{{\bf{v}}^{*}}{\bf{|v|}}+1\right)\label{eq9} \end{equation} The Dieterich-Ruina friction law provides a good description of the unsteady state transition process. We consider a friction process with a sliding speed of v. According to \eqref{eq7}, the steady-state friction coefficient is equal to \eqref{eq8}, and c expresses the unsteady-state friction system equation to be solved. $\left| {\bf{v}} \right| < < {{\bf{v}}^*}$, the expression of friction law \eqref{eq10} can be rewritten as: \begin{equation} \mu = {\mu _0} - c\ln \left( {\frac{{{{\bf{v}}^{\bf{*}}}}}{{{\bf{|v|}}}} } \right)\label{eq10} \end{equation} \begin{equation} {\bf{F + }}{{\bf{f}}_{\bf{s}}}{\bf{ + }}{{\bf{F}}_{\bf{{\bf N}}}} \cdot \left[ {{\mu _0} - c \cdot \ln \left( {\frac{{{{\bf{v}}^{\bf{*}}}}}{{{\bf{|v|}}}} } \right)} \right] = m{\bf{a}}\label{eq11} \end{equation} The drag force ${{\bf{f}}_{\bf{s}}}$ of the system is obtained using the tension dynamometer to measure, which is 0.03N. ${\bf{F}}$ and ${{\bf{F}}_{\bf{z}}}$ are obtained by theoretical simulation. From \eqref{eq12}, the ambient friction force of the capsule robot can be compensated by adjusting the ${\bf{v}}$ of the manipulator, to determine the force of the capsule robot, furthermore, the instantaneous acceleration of the capsule robot can be controlled, but this friction relation $c$ must be determined in advance, which is obtained through physical experiments as shown in the following section. \section{Experimental system setup} It can be seen the overall hardware system from (Fig.~\ref{fig3}(a)(b)). The external permanent magnet (EPM) terminal designed in this paper is composed of four strong magnets in a Halbach Array \cite{ref13} (As shown in Fig.~\ref{fig3}(c)(d)), which is fixed on the end of the manipulator through 6061 aluminum alloy. The strong magnetic terminal can provide a strong and stable magnetic field. The EPM is mounted at the end of a robot arm with 6 DOFs (degrees of freedom). The capsule robot is composed of a camera module, circuit board sealed shell, inner permanent magnet (IPM), and PLA (polylactic acid) shell. IPM design inspiration comes from Mahoney \emph{et al.}( A solid cylindrical magnet as IPM in \cite{ref7}), and F. Zhang \emph{et al.} (Two disk magnets as IPM in \cite{ref14}). The weight, length, and diameter of the capsule robot are 20.9g, 36mm, and 14mm respectively. The specific structure is shown in Fig.~\ref{fig3}(e)(f). During the movement, the capsule robot is attached to the PVC plate by external magnetic force. To explore the dynamic model with friction compensation of the capsule robot, we use the planar friction between a PVC plate and the capsule to provide a fixed kinetic friction coefficient. A transparent PVC plate is selected to facilitate camera calibration and collect the motion information of the capsule robot. The control diagram of the whole system is shown in Fig.~\ref{fig4}. The force of the capsule robot is different when the relative positions of the IPM and EPM are different. To control capsule robot to motion under trajectory map, we need to control the manipulator (EPM) motion.first the preset speed and joint speed are used, second, the trajectory is broken up into many points. The manipulator carries on from one point to the next until the last point. The friction between the capsule robot and the environment can be compensated by adjusting the speed of the manipulator through the friction model. The position of IPM and EPM can be saved in real time. \begin{figure}[htbp] \centerline{\includegraphics[width=3.5in]{3}} \caption{Structure of system: (a) Schematic diagram of the overall scene. (b) Working diagram of EPM and IPM. (c) Front view of external permanent magnet. (d) Axonometric view of external permanent magnet. (e) A detail drawing of the capsule robot. (f) Assembled capsule robot.} \label{fig3} \end{figure} \begin{figure}[htbp] \centerline{\includegraphics[width=3.5in]{4}} \caption{ Flowchart of magnetron motion.} \label{fig4} \end{figure} \section{Experiments} \subsection{Tracking of Capsule Trajectory} The coordinates of the end of the manipulator and the capsule robot are read at the same frequency, which ensures that the position information is saved based on the same time series. Fig.~\ref{fig5a} show the capsule tracking process of the capsule robot on the tablet and inside the pipeline. \begin{figure}[htbp] \centerline{\includegraphics[width=3.5in]{5_2x4}} \caption{The trajectory tracking process of the capsule robot: (a) The rectangular trajectory of the capsule robot. (b) The pipeline trajectory of the capsule robot.} \label{fig5a} \end{figure} \subsection{Finite Element Simulation: Obtaining ${\bf{F}}$ and ${{\bf{F}}_{\bf{z}}}$} The finite element analysis software Maxwell is based on Maxwell's equations. The electromagnetic force between magnets is calculated by using the equivalent volume current method for permanent magnets and the change of virtual displacement magnetic energy. In this control experiment, the forces {\bf{F}} and ${{\bf{F}}_{\bf{z}}}$ of IPM can be obtained. The parameters of EPM and IPM within are shown in Table.~\ref{tab2}. \begin{table}[htbp] \renewcommand\arraystretch{1.5 \caption{Parameters of EPM and IPM} \begin{center} \begin{tabularx}{\linewidth}{c c c } \hline \textbf{Parameter}&\textbf{\space\space\space\space\space\space EPM \space\space\space\space\space\space}&\textbf{\space\space\space\space\space\space IPM\space\space\space\space\space\space }\\ \hline \text{Magnetization (T)}& 1.26 & 1.26 \\ \text{Length (mm)}&80&35 \\ \text{Width / Outer Diameter (mm)}& 60 & $D$10 \\ \text{\space Height / Internal Diameter (mm)}\space& 50 & $D$6 \\ \text{Material}& N35 & N30 \\ \hline \end{tabularx} \label{tab2} \end{center} \end{table} \subsection{Experimental Verification} As shown in \eqref{eq7}, the friction model given in this paper can adapt to the relative motion of medium contact with different sliding friction coefficients. According to the friction coefficient of PVC and PLA materials \cite{ref17}\cite{ref18} and the tensile force of 0.042$\sim$0.048N, we set the sliding friction coefficient of PVC transparent plate and capsule robot as 0.22. According to our friction dynamic model, the difference of sliding friction coefficient does not affect the validity of the model. To ensure the rationality of the parameters in the given friction model, the coordinates of the end of the manipulator and the capsule robot are read and saved at the same frequency. The red line in Fig.~\ref{fig7}(a) indicates the preset trajectory of the manipulator. The IPM follows the EPM movement, which track point information is collected by the camera. The coordinate data (${{\bf{P}}_{\bf{E}}} \in {\mathbb{R}^3}$) of the EPM at the end of the robotic arm is directly read from the ros node. At the same time, the coordinate information of IPM and EPM is saved in the same program based on time series. We obtain the ${\bf{a}}$ (capsule acceleration) by obtaining the second-order derivative of time for the trajectory point (${{\bf{P}}_{\bf{I}}} \in {\mathbb{R}^3}$) information of the capsule robot. ${\bf{v}}$ is obtained by finding the first derivative of time for ${{\bf{P}}_{\bf{E}}}$. By substituting the distance of each (${{\bf{P}}_{\bf{E}}}$-${{\bf{P}}_{\bf{I}}}$) into the Maxwell simulation, ${\bf{F}}$ and ${{\bf{F}}_{\bf{z}}}$ at the corresponding time can be obtained. \begin{figure*}[htbp] \centerline{\includegraphics[width=7in]{7}} \caption{(a) The red line represents the EPM preset trajectory, and the blue line represents the trajectory of the IPM following movement. (b) The light red area indicates the boundary and the mixed fitting state, and the light green area indicates the state where the two curves are completely separated. (c) Residual diagram of ${\bf{v}}$-$c$ fitting.} \label{fig7} \end{figure*} In order to learn the friction model in \eqref{eq7}, we repeat the above process to obtain 24786 track point data (including {\bf{F}}, ${{\bf{F}}_{\bf{z}}}$, ${\bf{a}}$). The trend of the discrete point graph is curved. Consequently, we use polynomial in Matlab Curve Fitting Toolbox \cite{MATLAB:2017b} to fit (as shown in Fig.~\ref{fig7}(b)). Besides, the residual diagram (Fig.~\ref{fig7}(c)) shows that the sum variance of ${\bf{v}}$-$c$ is 0.03977 when the control speed of the manipulator is between 0.005m/s and 0.04m/s. In this experimental environment, the specific fitting relationship is obtained as follows: \begin{equation} \begin{array}{l} c = {p_1}*{{\bf{v}}^4} + {p_2}*{{\bf{v}}^3} + {p_3}*{{\bf{v}}^2} + {p_4}*{\bf{v}} + {p_5}\\ \left\{ \begin{array}{l} {p_1} = - 1.189e + 05\\ {p_2} = 1.173e + 04\\ {p_3} = - 404.7\\ {p_4} = 7.44\\ {p_5} = 0.03222 \end{array} \right. \end{array}\label{eq12} \end{equation} \subsection{Experimental Results} From \eqref{eq7} and \eqref{eq8} that the specific friction model of this experimental system is established. We analyze the trajectory’s STD (standard deviation) of the movement trajectory of the capsule robot in the shaded area in the Fig.~\ref{fig8}. As shown in Fig.~\ref{fig8}(a) that the STD of the capsule robot is 3.5mm. Furthermore, we use the friction model to reduce 20\% speed increment of the manipulator and control the manipulator to complete the same preset trajectory in Fig.~\ref{fig7}. Similarly, we analyze the STD of the robot. It can be seen from Fig.~\ref{fig8}(b) that the STD dropped to 3.3mm after reduce the value of ${\bf{v}}$ in \eqref{eq6} to 0.8${\bf{v}}$. As shown in the shaded area in the Fig.~\ref{fig8}, we use the Learning friction model to reduce the STD by 5.6\% in a controlled experiment by calculating the absolute position error between the EPM and IPM in the process of motion. \begin{figure*}[htbp] \centerline{\includegraphics[width=7in]{8}} \caption{The shaded areas in (a)(b) indicate the process of movement. (a) shows the control error without considering the friction of the tether model. (b) represents the control error when considering the friction of the tether model.} \label{fig8} \end{figure*} \section{Discussion} The friction model mentioned in Letter has been validated in the plane. Subsequently, we added movement experiments in the pipe. The pipe material shown in the Fig.~\ref{fig9}(a) is the same as the PVC pipe mentioned above, and the friction coefficient between the pipe and the capsule robot is 0.22. Considering that velocity is the variable controlled by our model, the conditions (EPM, IPM, H) of the experimental scene remain constant. Three control experiments are carried out as shown in the Fig.~\ref{fig9}(b)(3 trajectory diagrams), where the velocities of v1 and v3 are beyond the velocity range of the friction model mentioned in the Letter, and STDS are 4.9mm and 5.1mm respectively. Fig.~\ref{fig9}(c) shows the error of the capsule robot with the v2, in the speed range of the friction modelwhich in the range of the frction and its STD is 4.7mm. \begin{figure*}[htbp] \centerline{\includegraphics[width=7in]{99}} \caption{(a) Panorama of the experiment in the pipeline. (b) The trajectory diagram of the 10 averages of the 3 sets of speeds. The same color is a group of EPM and IPM trajectory control group, v1, v2, v3 are 0.045m/s, 0.02m/s, 0.005m/s respectively. (c) shows different errors at three speeds. The three shaded areas from left to right correspond to the starting segment, the second corner, and the third corner.} \label{fig9} \end{figure*} \section{Conclusion} In this study, a learned friction model for tethered capsule robot is proposed. We design an experimental system, and the experimental results demonstrate the effectiveness of the model. In addition, we can get the specific relationship between the control speed ${\bf{v}}$ and the friction factor $c$ in the process of the capsule robot moving in any plane contact medium. In the future, we will further study the space attitude control of the tethered capsule robots and optimize the structural components of the capsule robot to obtain better control accuracy. \section*{ACKNOWLEDGMENTS} This work was supported by the Natural Science Foundation of Jiangsu Province (Grant No. BK20180235). \begin{table*}[htbp] \section*{Authors' background} \renewcommand\arraystretch{1.5 \begin{center} \begin{tabular}{|c|c|c|c|} \hline \textbf{Your Name}&\textbf{Title}&\textbf{Research Field}&\textbf{Personal website} \\ \hline Miao Li\textsuperscript{*} & associate professor& robotics, machine earning and applied nonlinear control&\href{https://miaoli.github.io/}{https://miaoli.github.io/} \\ \hline Yi Wang& master student & capsule robot &\href{http://aric.whu.edu.cn/team-member/master-2/wangyi/}{http://aric.whu.edu.cn/team-member/master-2/wangyi/} \\ \hline \end{tabular} \end{center} \end{table*} \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:Introduction} Learning with limited human supervision is a longstanding goal in machine learning, especially in medical image analysis due to the expensive and time-consuming annotation process. Self-supervised learning (SSL) methods have gained increasing popularity due to their ability to learn general-purpose features that are competitive with representations generated by state-of-the-art (SoTA) fully-supervised methods \cite{azizi2021big, chen2020simple, ciga2020self, srinidhi2021self}. These methods involve two steps: unsupervised pretraining on unlabeled data in a task-agnostic way, followed by supervised fine-tuning in a task-specific way with limited labeled data. SSL methods, however, often struggle to perform well on downstream tasks and generalize poorly on out-of-distribution data due to limited downstream supervision \cite{andreassen2021evolution, yan2020clusterfit, zhai2019s4l}. Recent studies have focused on improving self-supervised pretrained representations with effective sampling strategies that mine informative hard examples via aggressive data augmentations \cite{li2020self} or with hard-negative mining techniques \cite{robinson2020contrastive}. However, these methods are tailored to improve a specific family of contrastive based SSL methods (such as MoCo \cite{he2020momentum}, and SimCLR \cite{chen2020simple}) and cannot be applied or generalized to other pretraining methods. In contrast, consistency based semi-supervised techniques \cite{chen2020big, srinidhi2021self, zhai2019s4l} have been proposed to improve the SSL by utilizing the unlabeled data in a task-specific semi-supervised manner. However, despite their improved performance, the semi-supervised approaches typically suffer from the problem of confirmation bias \cite{arazo2020pseudo}, and as yet, their practical applicability to medical image analysis has been severely limited. In this paper, we attempt to improve self-supervised pretrained representations through the lens of curriculum learning (CL). CL in machine learning paradigm \cite{bengio2009curriculum, soviany2021curriculum} is fundamentally inspired by the human learning process, where the easier concepts (examples) are presented first, and most difficult concepts are learned later on. Such meaningful ordering of samples (as opposed to random ordering) during training has shown to improve both convergence speed and accuracy of the neural network model. To this end, we extend the previous idea of leveraging hard examples to improve the self-supervised pretrained representations \cite{li2020self, robinson2020contrastive} further by combining SSL and CL in an elegant manner. In this study, we empirically investigate their inter-dependencies and present novel ways to combine them to achieve faster convergence, better generalization ability, and alleviate over-fitting to in-domain data. In relation to the CL paradigm introduced in \cite{bengio2009curriculum, hacohen2019power, wu2020curricula}, we first start by asking two very fundamental questions: (i) \textbf{how to determine the notion of example difficulty} (i.e., \textit{scoring} function) that is made available to the network during training? (ii) \textbf{how to specify the order} (typically, easy to hard) \textbf{at which the examples are presented to the network?} - which depends on both the data and learning model. To answer the above questions, we first attempt to determine the ``\textit{\textbf{hardness}}" or ``\textit{\textbf{difficulty}}" of each sample in the training data via curriculum by transfer learning approach, initially proposed in Weinshall \textit{et al.} \cite{weinshall2018curriculum}. Here, we choose to rank the difficulty of training samples with the help of instantaneous feedback (i.e., \textit{loss}) from the pretrained self-supervised model, while fine-tuning on the downstream task of interest. Unlike in the previous study in histopathology \cite{wei2021learn}, where the ranking (i.e., hardness) of samples are determined with the aid of human teachers (i.e., pathologists), our proposed approach rather investigates the knowledge transfer to determine the hardness of each training sample, which provides more reliable scores for the target task and does not involve any additional human-intervention. This is particularly important in pathology, where obtaining multiple annotator agreements as a proxy for determining the sample difficulty is often time-consuming and challenging. Besides, it is also shown in previous studies \cite{hacohen2019power, weinshall2018curriculum} that the ranking provided by the human teachers may not reflect the true underlying difficulty as it affects the neural network. Second, we focus our attention on specifying the \textit{``\textbf{order}"} at which the data is presented to the network. Typically, most studies in the CL literature \cite{soviany2021curriculum, wu2020curricula} either follow ordering of input examples from easy-to-hard (curriculum) or hard-to-easy (anti-curriculum) and sometimes random \cite{wu2020curricula}. However, one significant limitation with the existing approaches is that they do not necessarily consider the learning dynamics of the neural network while estimating the sample hardness over the course of model training. Due to the stochastic mini-batch style nature of gradient-descent optimization, the instantaneous hardness of each training sample changes over time from the early part of training to the later part of training. i.e., the hardness of each sample decreases monotonically over the course of training, where the hard samples become easier, while easy samples stay easy throughout training. With this motivation, we choose to measure the sample hardness adaptively in each mini-batch during task-specific fine-tuning of self-supervised pretrained model by introducing ``hardness-aware dynamic curriculum learning (HaDCL)" as a mini-batch instantaneous hardness measure of a training sample over time. Empirically, we show that our proposed HaDCL strategy significantly improves the SSL on a challenging downstream task, i.e., breast cancer lymph node metastases detection on both in-domain and out-of-domain data, supporting that the hard example mining is indeed crucial for improved model accuracy and generalizability. \vspace{1.5mm} \noindent \textbf{Contributions.} To summarise, we make the following contributions in this study: \vspace{-2mm} \begin{itemize} \item We propose a principled way of combining SSL with CL to improve the self-supervised pretrained representations on the downstream task on both in-domain and out-of-domain distribution data. \vspace{-2mm} \item We present a mini-batch hardness-aware dynamic curriculum learning (HaDCL) strategy to determine the instantaneous hardness of training samples with improved training convergence and better accuracy. \vspace{-2mm} \item We also conduct an empirical study to understand the boundaries within which the curriculum works to improve SSL on both patch-wise and slide-level classification tasks in histology. Further, we also probe the generalizability of our method on out-of-distribution data with significant domain shifts. \end{itemize} \vspace{-2mm} \section{Related Work} \label{sec:Realted work} \noindent \textbf{Self-supervised Learning.} Inspired by the recent success in SSL, the existing methods are categorized into context-based and contrastive-based learning methods. The early works focused on context-based methods to formulate an auxiliary task (i.e., \textit{pretext} task) to pretrain the model on the unlabeled data \cite{jing2020self}. These pretext tasks were hand-crafted based on domain knowledge, which includes rotation \cite{gidaris2018unsupervised}, solving jigsaw puzzles \cite{noroozi2016unsupervised}, relative patch prediction \cite{doersch2015unsupervised}, and so on. Many of these tasks are based on ad-hoc heuristics that limit the applicability of these approaches to broader domains. Consequently, a new family of SSL methods based on contrastive learning \cite{chen2020simple, he2020momentum} has emerged as the top-performing method that demonstrated excellent performance on many downstream tasks. More recently, these techniques have been extended to medical image analysis \cite{azizi2021big, bai2019self, ciga2020self, koohbanani2021self, sowrirajan2020moco, srinidhi2021self} and have shown a promising viable alternative to fully supervised based methods. In the context of histopathology, a few domain-specific pretext tasks \cite{koohbanani2021self, srinidhi2021self} have been proposed to leverage multi-resolution contextual features for learning representations in pathology images. Notably, the recently proposed resolution sequence prediction (RSP) \cite{srinidhi2021self} pretext task has shown promising results on three different histopathology tasks, including patch-wise and slide-level classification problems. Contrastive learning based methods such as SimCLR have also been extended to histology \cite{ciga2020self} and have shown SOTA performance on many diverse histology tasks. However, in recent studies \cite{srinidhi2021self, yan2020clusterfit, zhai2019s4l}, it is shown that the representations learned by SSL methods are often overfitted to the pretraining objective and do not generalize well to downstream tasks. Furthermore, the improved efficiency of these methods is heavily dependent on the quantity of both labeled and unlabeled data \cite{cole2021does, reed2021self}, and most importantly, the aggressive data augmentation strategies \cite{li2020self, purushwalkam2020demystifying, xiao2020should} that are used during pretraining. Consequently, some recent works have attempted to improve the pretrained representations by leveraging hard examples either during the pretraining stage \cite{li2020self, robinson2020contrastive} or during the fine-tuning stage \cite{andreassen2021evolution, chen2020adversarial}. Inspired by these previous works, we propose to improve SSL on downstream tasks with a curriculum based hard example fine-tuning. We will show that our proposed technique improves robustness on both in-domain and out-of-domain distribution data, and furthermore, our method is generic and easily adaptable to any self-supervised pretrained objective. \vspace{1.5mm} \noindent \textbf{Curriculum Learning.} The human learning mechanism follows a curriculum to understand complex tasks by imposing the order at which the complexity of the data is presented to the learner. For instance, human teachers often divide complex tasks into smaller sub-tasks and teach easier concepts first, followed by difficult concepts to another human. However, in machine learning, the supervision is often random, and training models have no clue about the difficulty of the sample which is being presented. One of the early seminal works by Bengio et al. \cite{bengio2009curriculum} demonstrated the applicability of CL to machine learning and showed that the learning improves if the data is presented in a meaningful order, with a gradual increase in complexity (typically, easier to hard). Following this intuition, several methods \cite{hacohen2019power, weinshall2018curriculum, wu2020curricula, zhou2020curriculum} have been proposed to determine the difficulty of the data sample and also the order in which it is presented to the network. Most of these previous methods either depend on the confidence of a pretrained model \cite{weinshall2018curriculum, hacohen2019power} or human-annotators to determine sample difficulty \cite{wei2021learn}. For instance, Wei et al. \cite{wei2021learn} explored the CL in histology based on multiple annotator agreements as a proxy to estimate the difficulty of a training sample. Notably, Wu et al. \cite{wu2020curricula} investigated several benefits of CL and provided thorough insights on when and where curriculum works to improve machine learning models on standard benchmark datasets. Our work takes inspiration from \cite{weinshall2018curriculum} and extends the idea of the curriculum by transfer learning to improve SSL on downstream tasks by generalizing representations to both in-domain and out-of-domain distribution data. \vspace{-1mm} \section{Method} \label{sec:Method} Our approach consists of the following steps. First, we perform self-supervised pretraining on unlabeled data to learn histology specific visual representations. Second, we fine-tune the pretrained representations using hard examples via hardness-aware dynamic curriculum learning (HaDCL) approach. The HaDCL comprises two following stages: i) we first fine-tune the model with easy-to-hard examples (i.e., Curriculum-I stage), and ii) we then initialize the Curriculum-I model to fine-tune with hard-to-very-hard samples in the Curriculum-II stage. The details are presented next. \subsection{Self-supervised Pretraining} \label{ssec:Self-supervised Pretraining} The goal of SSL is to first learn general visual representations with task-agnostic pretraining using unlabeled data. The pretraining is performed via solving a pretext objective, where the labels needed to train a convolutional neural network are generated within the data itself. These pretrained representations are transferred to downstream tasks by supervised fine-tuning on limited label data. In this work, we consider two prominent SSL techniques: a context-based Resolution Sequence Prediction (RSP) \cite{srinidhi2021self} and a contrastive learning based Momentum Contrastive Coding (MoCo) \cite{he2020momentum} approach. Our motivation behind adopting RSP and MoCo is because these techniques have shown consistent and reliable performance across a variety of histopathology tasks based on a recent study in \cite{srinidhi2021self}. \subsection{Hardness-aware Dynamic Curriculum Learning (HaDCL)} \label{ssec:Hardness-aware Dynamic Curriculum Learning (HaDCL)} In this section, we begin by answering the two following questions in the context of CL: \textbf{Q1.} \textit{How to measure the hardness or difficulty of a training sample?} ~and ~\textbf{Q2.} \textit{How to specify the order at which the training data is presented to the network?}. Before we begin, we shall setup some basic notations and definitions of CL. Let $D = \{(x_{i}, y_{i})\}_{i=1}^N$ denote the training data, where $x_{i} \in \mathbb{R}^{d}$ denotes an input sample and $y_{i} \in \mathcal{C}$ its corresponding label. In CL, the common approach is to train a target model $f_{\theta} : \mathcal{X} \rightarrow \mathcal{Y}$ with a set of non-uniformly sampled mini-batches $[\mathbb{B}_{1},...,\mathbb{B}_{M}] \subseteq D$ using a Stochastic Gradient Descent (SGD) optimization. To measure the instantaneous hardness of a training sample (\textbf{Q1}), we define a scoring function via curriculum by transfer learning approach \cite{hacohen2019power}: $s(x_{i}, y_{i}) \in \mathbb{R}$ based on the loss value $\ell=(f_{\theta}(x_{i}), y_{i})$ obtained from a pretrained self-supervised model ($f_{pre}(\cdot; \theta)$). We measure this instantaneous hardness of training samples during downstream fine-tuning by initializing $f_{\theta}$ with $f_{pre}(\cdot; \theta)$. We say that a sample $x_{j}$ is more difficult/hard than $x_{i}$, if $\ell(f_{\theta}(x_{j}), y_{j}) > \ell(f_{\theta}(x_{i}), y_{i})$. In this work, we consider $\ell(.,.)$ as the standard categorical cross-entropy loss to measure the instantaneous hardness of a training sample. Unlike in the previous work \cite{wei2021learn}, our proposed approach is more reliable to the training dynamics of a neural network; since it makes use of a powerful pretrained SSL model to examine the sample difficulty, which reflects the true underlying hardness of a training sample as it is experienced by the machine learner rather than a human-teacher. Such model-based ranking of training samples is of paramount importance in histopathology, where measuring hardness level by multiple annotator agreements is costly and sometimes infeasible for large-scale applications. Next, we focus on the order in which the training data is presented to the network (\textbf{Q2}). Typically, an easy to hard (i.e., lowest to highest score ($s$)) strategy is followed to determine the ordering of samples during training. However, in the context of CL, we argue that there exist two main limitations: (i) due to randomness of SGD optimization, the instantaneous hardness of each training sample can vary significantly over consecutive epochs, which may not reflect the true hardness level of a sample over time with the model being trained. This is because the easier samples stay easy throughout training since their loss value is more likely to stay at samples minima; while for hard examples, the loss value is relatively less stable during the early part of the training and gradually stabilizes as we train more on them. Thus the instantaneous hardness level of a sample tends to decrease monotonically during training and cannot be at a fixed level; (ii) further, keeping track of the instantaneous hardness of each sample up-to-date requires extra inference computation over all training samples, which can be computationally challenging for neural networks \cite{jiang2019accelerating}. The aforementioned limitations motivated us to propose a ``\textit{hardness-aware dynamic curriculum learning} (\textbf{HaDCL})" approach to dynamically determine the sample's instantaneous hardness level over the gradual course of training. Our proposed approach consists of a \textit{\textbf{dual-stage}} curriculum training strategy, which we apply during downstream fine-tuning. In the first stage, we focus on \textit{easy-to-hard} samples, and in the second stage, we focus on \textit{hard-to-very-hard} samples for fine-tuning the pretrained SSL model. In \textbf{Curriculum-I} (i.e., \textbf{\textit{easy-to-hard}}) stage, we first initialize the downstream fine-tuning model $f_{ft}(\cdot;\theta)$ with the pretrained SSL model $f_{pre}(\cdot;\theta)$, and compute loss for all input samples $\ell = (f_{ft}(x_{i}), y_{i})_{i=1}^B$ in a mini-batch $\mathbb{B}$ using categorical cross-entropy. Next, all $B$ samples within a mini-batch $\mathbb{B}$ are sorted in descending order by their loss value $\ell$ to obtain a set $\tilde{D}$. From the sorted set $\tilde{D}$, we select the top-$K$ samples that constitute the hard examples: \textbf{top-}$\boldsymbol{K}$ = $\boldsymbol{\alpha \times B}$, where $\alpha$ is parameter $(0 \leq \alpha \leq 1)$ which denotes the portion of hard samples in a set $\tilde{D}$. However, relying only on the portion of hard samples in each mini-batch does not always necessarily consider varying hardness levels between mini-batches. In other words, treating all mini-batches equally may lead to sub-optimal performance as different batches will have a varying number of hard examples. Thus, the level of hardness must be smoothly adjusted according to the training dynamics of neural network to account for varying instantaneous hardness levels of training samples over time. Therefore, we choose to \textit{dynamically} determine the mini-batch instantaneous hardness level using an adaptive \textbf{\textit{threshold}} as \vspace{-3mm} \begin{equation} \textit{thres} = a(1 - \frac{t}{T}) + b, \label{eq:threshold} \end{equation} where, $a$ and $b$ are hyperparameters (such that, $a \gg b$) which controls $\textit{thres}$ such that its value changes from $a+b \rightarrow b$ at uniform speed over the gradual course of training. The term $t$ denotes the current iteration, and $T$ indicates the total number of iterations within an epoch. Next, we dynamically update the model weights $\theta$ in a mini-batch $\mathbb{B}$ based on the top-$K$ samples in set $\tilde{D}$ for which the \textbf{sum of top-$\boldsymbol{K}$ loss} (i.e., $\sum_{k=1}^{K} \ell_{k}$) exceeds the threshold \textbf{\textit{`thres'}} as \vspace{-2.5mm} \begin{equation} \sum_{k=1}^{K} \ell_{k} > \textit{thres} \times \sum_{i=1}^{B} \ell_{total}, \label{eq:loss1} \vspace{-0.5mm} \end{equation} where, $\sum_{i=1}^{B} \ell_{total}$ is the \textbf{\textit{total loss}} value over all $B$ samples within a mini-batch $\mathbb{B}$. By doing so, we can avoid an extra inference step for keeping track of the instantaneous hardness of each sample up-to-date, which can be computationally expensive. Further, this dynamic way of updating the model parameters based on mini-batch hardness level can simultaneously alleviate both under-fitting (for hard samples) and over-fitting (for easy samples) problems. From Eq. \eqref{eq:threshold}, during the early phase of training (i.e., at $t \geq 1$), the model is oriented to learn with a larger number of easier examples - due to a larger threshold value \textit{thres} $\approx a+b$; while, during the later part of the training (i.e., at $t \approx T$) fewer but hard samples are learned - due to lower threshold value of \textit{thres} $\approx b$. This dynamic way of CL allows the model to revisit more frequently those samples that have been historically hard, while making less frequent revisits to those easier samples that have been already learned. In \textbf{Curriculum-II} training, we start by initializing the model ($\theta_{2}$) with Curriculum-I fine-tuned model ($\theta_{1}$) and focus on \textbf{\textit{hard-to-very-hard}} examples for CL. Here, we determine the instantaneous hardness of hard to very-hard samples by dynamically choosing a subset of top-$K'$ samples, within a pre-defined set of top-$K$ samples as: \textbf{top-$\boldsymbol{K'}$ = $\textit{thres} ~\times$ top-$\boldsymbol{K}$}; where, \textit{thres} is an adaptive threshold (see, Eq. \eqref{eq:threshold}) to estimate the mini-batch instantaneous hardness level over top-$K'$ samples. In this stage, we dynamically update the fine-tuned Curriculum-I model weights $\theta_{1}$ based on top-$K'$ samples in a set $\tilde{D}$, for which the \textbf{sum of top-$\boldsymbol{K'}$ loss} (i.e., $\sum_{k'=1}^{K'} \ell_{k'}$) exceeds the threshold \textbf{\textit{`thres'}} as \vspace{-1.5mm} \begin{equation} \sum_{k'=1}^{K'} \ell_{k'} > \textit{thres} \times \sum_{k=1}^{K} \ell_{k}, \label{eq:loss2} \vspace{-0.5mm} \end{equation} where, $\sum_{k=1}^{K} \ell_{k}$ is the sum of loss values over top-$K$ samples within a mini-batch $\mathbb{B}$, as defined in Eq. \eqref{eq:loss1}. The pseudocode for our proposed dual-stage HaDCL strategy is illustrated in Algorithm \ref{Algo:HaDCL method}. \vspace{-1mm} \begin{algorithm} \footnotesize \DontPrintSemicolon \vspace{1mm} \SetKwInOut{Parameter}{Inputs} \Parameter{$D = \{(x_{i}, y_{i})\}_{i=1}^B$ = training samples in mini-batch $\mathbb{B}$\\ $f_{pre}(\cdot ;\theta)$ = SSL pretrained model \\ $\ell=(f_{\theta}(x_{i}), y_{i}) \in \mathbb{R}$ = loss / scoring function \\ $\mathit{o} \in$ \{``descending"\} = order \\ $\alpha$ = portion of hard samples in a set $\tilde{D}$ \\ $a, b$ = hyperparameters such that $a \gg b$ \\ $t$ = current iteration \\ $T$ = total number of iterations within an epoch \\ $f_{ft}(\cdot ;\theta)$ = fine-tuning model \\ \vspace{1mm} \Indm $\tilde{D} = (x_{1},..., x_{B}) \leftarrow$ \textbf{sort}$(\{x_{1},..., x_{B}\}, \ell, o)$ } \vspace{2mm} \SetKwInOut{Parameter}{\textcolor{blue}{Curriculum-I stage}} \Parameter{} \vspace{0.5mm} \textit{\textbf{Initialize:}} $f_{ft}(\cdot ;\theta_1) \leftarrow f_{pre}(\cdot ;\theta)$, with weights $\theta$ unfrozen across entire network + a 2-layer MLP (Fc1, ReLU, Fc2) that predicts class logits \\ \vspace{0.5mm} \For{$epoch$ in $[1,...,num\_epochs]$\vspace{0.25mm}}{ \For{each minibatch $\mathbb{B}_{t}$, where $t \in [1, ..., T]$\vspace{0.25mm}}{ top-$K$ = $\alpha \times B$\\ $thres = a(1 - \frac{t}{T}) + b$ ;~~adaptive hardness threshold \\ $D' = \tilde{D}[0:$ top-$K]$ ;~~top-$K$ \textit{\textbf{hard}} samples\\ $\ell_{total} = \ell(D) = \ell(f_{ft}(x_{i}), y_{i})_{i=1}^B$ ;~\textbf{total loss}\\ $\ell_{k} = \ell(D') = \ell(f_{ft}(x_{k}), y_{k})_{k=1}^K$ ;~~\textbf{top-$K$ loss}\\ \vspace{1mm} \eIf{$\sum_{k=1}^{K} \ell_{k} > thres \times \sum_{i=1}^{B} \ell_{total}$ \vspace{0.5mm}} {Update ~$f_{ft}(\cdot ;\theta_1)$ with $\ell_{k}$} {Update ~$f_{ft}(\cdot ;\theta_1)$ with $\ell_{total}$} }} \textbf{return} $\theta_1$; \vspace{2mm} \SetKwInOut{Parameter}{\textcolor{blue}{Curriculum-II stage}} \Parameter{} \vspace{0.5mm} \textit{\textbf{Initialize:}} $f_{ft}(\cdot ;\theta_2) \leftarrow \theta_1$ \\ \vspace{0.5mm} \For{$epoch$ in $[1,...,num\_epochs]$\vspace{0.25mm}}{ \For{each minibatch $\mathbb{B}_{t}$, where $t \in [1, ..., T]$\vspace{0.25mm}}{ $thres = a(1 - \frac{t}{T}) + b$ ;~~adaptive hardness threshold\\ top-$K$ = $\alpha \times B$\\ top-$K'$ = $thres ~\times$ top-$K$\\ $D' = \tilde{D}[0:$ top-$K]$ ;~~top-$K$ \textit{\textbf{hard}} samples\\ $D'' = D'[0:$ top-$K']$ ;~~top-$K'$ \textit{\textbf{very-hard}} samples\\ $\ell_{k} = \ell(D') = \ell(f_{ft}(x_{k}), y_{k})_{k=1}^K$;~\textbf{top-$K$ loss}\\ $\ell_{k'} = \ell(D'') = \ell(f_{ft}(x_{k'}), y_{k'})_{k'=1}^{K'}$; \textbf{top-$K'$ loss}\\ \vspace{1mm} \eIf{$\sum_{k'=1}^{K'} \ell_{k'} > thres \times \sum_{k=1}^{K} \ell_{k}$\vspace{0.5mm}} {Update ~$f_{ft}(\cdot ;\theta_{2})$ with $\ell_{k'}$} {Update ~$f_{ft}(\cdot ;\theta_{2})$ with $\ell_{k}$} }} \textbf{return} $\theta_2$; \caption{HaDCL method} \label{Algo:HaDCL method} \end{algorithm} \section{Experiments} \label{sec:Experiments} In this section, we validate our method on \textbf{three} standard benchmark datasets for breast cancer metastasis detection in lymph nodes at whole-slide-image (WSI)-level (\textbf{Camelyon16, MSK}) \cite{bejnordi2017diagnostic, campanella2019clinical} and patch-level colorectal polyps classification (\textbf{MHIST}) \cite{wei2021learn}. We choose these three datasets to investigate the relative benefits of CL on standard high and low-data training regimes. In addition, the chosen tasks embody both patch-wise and slide-level classification in histopathology and explore the problem of domain shift when training data from the target domain is entirely absent. This helps to understand the generalizability of our proposed approach and the boundaries within which the CL works to improve SSL in practice. \subsection{Datasets} \label{ssec:Datasets} We first perform self-supervised pretraining on the Camelyon16 dataset, followed by fine-tuning the pretrained model with our proposed HaDCL approach on Camelyon16 and MHIST datasets, respectively; and finally, evaluated on test sets of three datasets: Camelyon16, MSK, and MHIST. We will next introduce the datasets in detail. \vspace{1mm} \textbf{Camelyon16 dataset \cite{bejnordi2017diagnostic}.} Camelyon16 consists of 399 hematoxylin and eosin (H\&E) stained WSIs (from 399 patients) of lymph nodes in the breast, divided into 270 for training and 129 for testing. The WSIs were acquired from two different centers using two different scanners with specimen level pixel sizes of ($0.226 \mu m/pixel$) and ($0.243 \mu m/pixel$). For self-supervised pretraining, we only considered 60 WSIs (slide id: normal set (1-35); tumor set (1-25)) from the total 270 training images discarding their labels (we refer to this as an \textbf{\textit{unlabeled} set}). While, the downstream fine-tuning is performed with 228 WSIs (85\%) (slide id: normal set (1-135); tumor set (1-93)) and validation with the rest 42 WSIs (15\%) (slide id: normal set (136-160); tumor set (94-110)). Further, the fine-tuning set contains 400K patches (200K tumor and 200K normal), and the validation set contains 40K patches (20K tumor and 20K normal). The test set contains an independent set of 129 WSIs (49 with nodal metastases and 80 normal WSIs). \vspace{1mm} \textbf{MSK dataset \cite{Campanella_Hanna_Brogi_Fuchs_2019}.} MSK set was released as part of a previous study in \cite{campanella2019clinical}, which contains an independent test set of 130 H\&E stained WSIs of axillary lymph nodes from 78 breast cancer patients. The nodal metastasis is present in 36 images from 27 patients with corresponding slide-level labels. The WSIs were scanned at $20\times$ magnification ($0.5 \mu m/pixel$). Note: the publicly released dataset\footnote{\textcolor{red}{https://doi.org/10.7937/tcia.2019.3xbn2jcc}} is only an independent test set and does not contain training images. MSK is considered out-of-distribution (OOD) to Camelyon because of three reasons: i) image resolution difference ($20 \times$ in MSK vs. $40 \times$ magnification in Camelyon); ii) technical variability in slide preparation \cite{campanella2019clinical}; iii) presence of cases with signs showing the effect of treatment response from neoadjuvant chemotherapy in MSK vs. no treatment response cases in Camelyon. Therefore, we choose the MSK dataset to test the generalizability of our approach to domain shift. \vspace{1mm} \textbf{MHIST dataset \cite{wei2021learn}.} MHIST contains a total of 3,152 images (with $224 \times 224$ pixels) for classifying colorectal polyps as between hyperplastic polyps (HPs) and sessile serrated adenomas (SSAs). This dataset is split into a training set consisting of 2,175 images, whereas the test set contains 977 images. We further divide the train set into fine-tuning set with 1740 images (80\%) and a validation set of 435 images (20\%). Multiple annotators annotated the images, and majority voting of labels was performed to obtain the final ground truth. \subsection{Implementation Details} \label{ssec:Implementation Details} We first perform \textbf{self-supervised pretraining} of RSP and MoCo on Camelyon16 \textit{unlabeled} set using ResNet-18 as our base encoder network. We adopt similar hyperparameter settings and domain-specific data augmentation strategies for RSP and MoCo pretraining as reported in \cite{srinidhi2021self}. After pretraining, we only use the ResNet encoder $f_{\theta}$ (that maps output to a 512-dimensional embedding) for downstream fine-tuning, discarding the project head (2-layer MLP in previous design \cite{srinidhi2021self}) following the suggestion in SimCLR \cite{chen2020simple}. Further, we choose to fine-tune from the first layer in the encoder $f_{\theta}$ with a newly initialized 2-layer MLP (Fc1, ReLU, Fc2) that predicts the class logits for final classification using all labeled samples and a standard supervised cross-entropy loss. In our experiments, we fine-tune the pretrained model with a patch size of $256 \times 256$ pixels on Camelyon16 and MHIST datasets ($224 \times 224$ resized to $256 \times 256$), respectively, followed by evaluation on Camelyon16, MSK, and MHIST test sets. Note: to account for the input resolution differences between MSK ($0.5 \mu m/pixel$) and Camelyon16 datasets ($0.23 - 0.24 \mu m/pixel$), we choose to test the camelyon16 fine-tuned model on MSK by upsampling the input patch from $256 \times 256$ to $512 \times 512$ pixels, followed by centre cropping to $256 \times 256$ pixels. For fine-tuning, we use the following sets of domain-specific data augmentations \cite{tellez2019quantifying}: perturbations of hue and saturation values between (-0.1, 0.1) and (-1, 1), respectively in HSV color space, additive Gaussian noise with $\mu=0$ and $\sigma=(0, 0.1)$, shifting brightness and contrast intensity ratios between (-0.2, 0.2), blurring with a random-sized kernel (3, 7), affine transformation with translation, scale and rotation limit of ($0.0625, 0.5, 45^{\circ}$), rotation with centre crop of (-$90^{\circ}, +90^{\circ}$) and finally, we scale with a factor of $(0.8, 1.2)$ and randomly resize and crop the image patch to its original size. We apply these augmentations in sequence by randomly selecting 2 of total 7 augmentations in each mini-batch, similar to RandAugment technique \cite{cubuk2020randaugment}. The \textbf{fine-tuning} is performed with three different strategies: \textbf{supervised fine-tuning} (\textit{vanilla baseline}), \textbf{curriculum-I} and \textbf{curriculum-II} fine-tuning as described in Section. \ref{ssec:Hardness-aware Dynamic Curriculum Learning (HaDCL)}. We first list the hyperparameters common to all three strategies for \textbf{Camelyon16} dataset: we set the batch size to 512 and optimize the network with Adam optimizer ($\beta_{1} = 0.9$, $\beta_{2} = 0.999$) with a weight decay of $1e-4$. Next, we train the model for 250 epochs, with an initial learning rate ($lr$) of $5e^{-4}$ and a multi-step decay at (60, 120, 180) epochs by 0.1 for supervised and Curriculum-I fine-tuning; while we train for 60 epochs with $lr$=$1e^{-5}$ and a multi-step decay at 30$^{th}$ epoch by 0.1 for Curriculum-II stage. We set empirically the parameters $k$ as 0.10 and $a$ and $b$ in Eq. \ref{eq:threshold} as (0.7, 0.2) in both Curriculum-I and II stages (refer, Section \ref{sssec:Ablation Study} for ablations). For the \textbf{MHIST} dataset, we adopted the same settings as Camelyon16, except the following parameters: we set the batch size as 32 and trained for 1000 epochs with $lr$=$1e^{-5}$ and a multi-step decay at (200, 400, 600, 800) epochs by 0.95 for supervised and Curriculum-I fine-tuning; while for Curriculum-II, we trained for 60 epochs with $lr$=$1e^{-5}$ and a multi-step decay at 30$^{th}$ epoch by 0.95. Finally, we saved the best model based on the highest validation accuracy to test on the test set. We implemented our approach in PyTorch and trained with Nvidia V100 GPUs. \begin{table*} \Large \centering \caption{WSI classification results on Camelyon16 and MSK set evaluated with WSI-level accuracy and area under the curve (AUC) with 95\% CIs shown in square brackets; followed by patch-wise colorectal polyps classification on MHIST dataset evaluated with patch-level accuracy and AUC. The DeLong method \cite{sun2014fast} was used to construct 95\% CIs. The best results for each dataset are highlighted in bold.} \label{tab:overall_results} \vspace{1.5mm} \resizebox{0.75\linewidth}{!}{ \begin{tabular}{@{}lllcccccc@{}} \toprule \toprule[1pt] \multicolumn{2}{c}{\multirow{2}{*}{\textbf{Pretraining}}} & \multicolumn{1}{l}{\multirow{2}{*}{\textbf{Fine-tuning}}} & \multicolumn{2}{c}{\textbf{Camelyon16} (slide-level)} & \multicolumn{2}{c}{\textbf{MSK} (slide-level)} & \multicolumn{2}{c}{\textbf{MHIST} (patch-level)} \\ \cmidrule(l){4-9} \multicolumn{3}{c}{} & \textbf{Accuracy} & \textbf{AUC} & \textbf{Accuracy} & \textbf{AUC} & \textbf{Accuracy} & \textbf{AUC} \\ \midrule \multicolumn{2}{l}{\multirow{3}{*}{\textbf{Random}}} & Baseline & 0.760 & 0.780 [0.595-0.804] & 0.285 & 0.518 [0.403-0.632] & 0.803 & 0.880 \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-I} & 0.853 & 0.814 [0.735-0.892] & 0.400 & 0.685 [0.571-0.798] & 0.802 & 0.889 \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-II} & 0.822 & 0.845 [0.768-0.922] & 0.800 & 0.744 [0.645-0.842] & 0.795 & 0.874 \\ \midrule [1pt] \multicolumn{2}{l}{\multirow{3}{*}{\textbf{RSP \cite{srinidhi2021self}}}} & Baseline & 0.752 & 0.806 [0.724-0.887] & 0.285 & 0.542 [0.428-0.654] & 0.816 & 0.888 \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-I} & 0.860 & 0.891 [0.824-0.958] & 0.654 & 0.743 [0.650-0.835] & 0.805 & 0.880 \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-II} & \textbf{0.891} & \textbf{0.942 [0.897-0.987]} & 0.669 & 0.771 [0.670-0.871] & 0.793 & 0.872 \\ \midrule [1pt] \multicolumn{2}{l}{\multirow{3}{*}{\textbf{MoCo \cite{he2020momentum}}}} & Baseline & 0.744 & 0.837 [0.759-0.915] & \textbf{0.846} & 0.749 [0.645-0.852] & 0.815 & 0.884 \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-I} & 0.729 & 0.829 [0.751-0.906] & 0.823 & \textbf{0.771 [0.667-0.874]} & \textbf{0.825} & \textbf{0.896} \\ \cmidrule(l){3-9} \multicolumn{2}{l}{} & \textbf{Curriculum-II} & 0.744 & 0.854 [0.783-0.925] & 0.808 & 0.771 [0.676-0.864] & 0.815 & 0.887 \\ \bottomrule \bottomrule[1pt] \end{tabular}} \vspace{-12mm} \end{table*} \subsection{Results and Discussion} \label{ssec:Results and Discussion} We validate the performance of our HaDCL approach with strong set of baselines: (i) \textbf{pretraining} with \textbf{RSP} \cite{srinidhi2021self} and \textbf{MoCo} \cite{he2020momentum} based SSL methods, along with \textbf{fully-supervised} method (\textbf{\textit{randomly}} initialized); (ii) \textbf{fine-tuning} with 3 different strategies: \textbf{Supervised (\textit{`Baseline'}}, as depicted in Table \ref{tab:overall_results}), \textbf{Curriculum-I} (with \textit{easy-to-hard} examples) and \textbf{Curriculum-II} (with \textit{hard-to-very-hard} examples). We evaluate these baselines for breast cancer metastasis detection at WSI-level (Camelyon16, MSK) and patch-level colorectal polyps classification (MHIST) tasks. For WSI-level classification, a random-forest-based slide-level classifier was used to obtain the final slide-level predictions. Similar to Wang et al. \cite{wang2016deep}, we extract several geometrical features from the heatmap predictions (connected component analysis with threshold of 0.5 and 0.95) to train a final slide-level classifier. We used accuracy (Acc) and area under the receiver operating characteristic curve (AUC) as evaluation metrics for accessing both WSI-level and patch-level classification performance. Further, to check whether our HaDCL approach significantly improved the performance, we also computed statistical significance test using Delong's test \cite{sun2014fast} for pairs of AUCs between supervised (baseline) and HaDCL based fine-tuning methods. The 95\% CIs were computed to access the significance at $p$-value $< 0.05$. \begin{figure*} \centering \begin{tabular}{ @{}>{\centering\arraybackslash}m{\dimexpr0.92\textwidth-\tabcolsep\relax} >{\centering\arraybackslash}m{\dimexpr.0001\textwidth-\tabcolsep\relax}@{} } \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{26}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{RSP_26_SSL}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{RSP_26_hnm}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{RSP_26_hnm2}} \end{minipage} \vfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{16}} \centerline{(a) Original} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{Mo_16_SSL}} \centerline{(b) Baseline} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{Mo_16_hnm}} \centerline{(c) Curriculum-I} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.9cm]{Mo_16_hnm2}} \centerline{(d) Curriculum-II} \end{minipage} & \vspace{6mm} \begin{center} \includegraphics[scale=0.075]{color_bar} \end{center} \end{tabular} \vspace{2mm} \caption{Predicted tumor probability heat-maps on Camelyon16 test set with RSP (\textbf{top} row) and MoCo (\textbf{bottom} row) methods. Note. (a) Original WSI's with overlaid manual ground truth (shown in blue) depicting the region containing both macro and micro-metastases.} \label{Fig:Predicted tumor probability heat-maps on Camelyon16 test set} \vspace{-4mm} \end{figure*} \begin{figure*} \centering \begin{tabular}{ @{}>{\centering\arraybackslash}m{\dimexpr.80\textwidth-\tabcolsep\relax} >{\centering\arraybackslash}m{\dimexpr.0001\textwidth-\tabcolsep\relax}@{} } \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{5422}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{RSP_5422_SSL}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{RSP_5422_hnm}} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{RSP_5422_hnm2}} \end{minipage} \vfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{5810}} \centerline{(a) Original} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{Mo_5810_SSL}} \centerline{(b) Baseline} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{Mo_5810_hnm}} \centerline{(c) Curriculum-I} \end{minipage} \hfill \begin{minipage}{0.245\linewidth} \centerline{\includegraphics[height = 1.6cm, width = 3.4cm]{Mo_5810_hnm2}} \centerline{(d) Curriculum-II} \end{minipage} & \vspace{6mm} \begin{center} \includegraphics[scale=0.075]{color_bar} \end{center} \end{tabular} \vspace{2mm} \caption{Out-of-distribution prediction results showing tumor probability heat-maps on MSK test set (\textbf{target}) trained from Camelyon16 (\textbf{source}) with RSP (\textbf{top} row) and MoCo (\textbf{bottom} row) methods. Note. (a) Original WSI's with overlaid manual ground truth (shown in red) annotated by our in-house pathologist.} \label{Fig:Predicted tumor probability heat-maps on MSK test set} \vspace{-3mm} \end{figure*} \vspace{2mm} \noindent \textbf{WSI-level Classification.} The quantitative results are summarized in Table \ref{tab:overall_results} and qualitative results are shown in Figure \ref{Fig:Predicted tumor probability heat-maps on Camelyon16 test set}, \ref{Fig:Predicted tumor probability heat-maps on MSK test set}. On the Camelyon16 dataset, we achieved statistically significant improvement in accuracy (Acc) and AUC, with a minimum score of 9.3\% and 3.4\%, respectively, with Curriculum-I stage against the standard baseline; while the performance of Curriculum-II improved with a minimum Acc and AUC score of 6.2\% and 6.5\%, respectively, over the baseline, using Random and RSP pretrained methods. On the other hand, the MoCo performance improved marginally with a 1.7\% increase in AUC with Curriculum-II vs. baseline. Notably, our proposed HaDCL method achieves the best AUC score of 0.942 with 400K labeled samples compared to an AUC of 0.925 of the top-1 winning method of Camelyon16 \cite{wang2016deep}, which was trained in a fully-supervised manner with millions of image patches. We conducted further experiments to evaluate the effective robustness of SSL methods to out-of-distribution (OOD) data. For this, we first pretrain followed by fine-tuning the model on Camelyon16 but tested on MSK dataset. We observed significant improvement in SSL methods on OOD data, particularly when fine-tuned with curriculum-I and II approaches over the standard baseline, as shown in Table \ref{tab:overall_results}. We observed larger gains with minimum improvement in Acc and AUC score of 11.5\% and 16.7\%, respectively, with Curriculum-I stage vs. standard baseline; whereas Curriculum-II's performance further improved over baseline, with a minimum increase in Acc and AUC score of 38.4\% and 22.6\%, respectively, using Random and RSP methods. Furthermore, the performance with MoCo also improved with a 2.2\% increase in Acc and AUC score with both Curriculum-I and -II over baseline approach. This significant improvement under domain shift is of paramount importance in real clinical settings \cite{de2021residual, stacke2019closer}, where the model trained on Camelyon16 with images acquired with higher resolution ($0.25 \mu m/pixel$) can generalize satisfactorily to the OOD MSK test set, which was acquired with a lower resolution ($0.5 \mu m/pixel$). Overall, our results provide evidence that representations learned by SSL methods can be further enhanced and made more generalizable to out-of-domain distribution by effectively leveraging difficult examples during fine-tuning. This observation is also \textbf{consistent} with \textbf{recent studies} in \cite{andreassen2021evolution, wu2020curricula}; where the authors have shown that the effective robustness of pretraining models can be further enhanced with a more extensive and diverse set of pretraining samples followed by fine-tuning with more difficult and noisy samples. Thus, our experimental findings clearly demonstrate that the hardness-aware curriculum learning has a superior advantage over the standard fine-tuning in improving SSL methods. Further, it is interesting to explore the effect of Curriculum fine-tuning of SSL methods under a limited labeled regime, which has significant opportunities for further enhancements as shown in a recent study in \cite{srinidhi2021self}. \vspace{2mm} \noindent \textbf{Patch-level Classification.} Table \ref{tab:overall_results} presents the colorectal polyps patch-wise classification results on MHIST dataset. On this task, we didn't observe any significant improvement with the HaDCL approach over the standard baseline. However, we obtained a marginal improvement in AUC of 0.895 compared with the recent CL based method \cite{wei2021learn} with AUC of 0.882. Unlike the previous method \cite{wei2021learn}, our approach doesn't depend on the annotator agreement to determine the sample hardness but rather estimates the sample hardness via knowledge transfer from a powerful pretrained SSL model. One of the main reasons for no significant improvement is because the patch-wise dataset usually does not capture all diversity of hardness that is presented in the data compare to the level of hardness that is present in the WSI. Further, most of the curated patches are often very clean and carefully hand-picked, which lacks the level of difficulty/hardness suitable for training a model. This phenomenon has also been studied in recent work \cite{ciga2021overcoming}, where the authors show evidence that injecting hard negatives samples for patch-wise classification has been shown to degrade performance, whilst the performance improves significantly for slide-level classification tasks. Notably, this phenomenon was also shown to be consistent on vision tasks \cite{wu2020curricula, weinshall2018curriculum}, where CL has shown almost no improvement on standard benchmark datasets such as CIFAR10 and CIFAR100; while, it improves only when the task is made more difficult. \subsubsection{Ablation Study} \label{sssec:Ablation Study} \begin{table} \centering \caption{Impact of parameter $\alpha$ which denotes the portion of hard samples in each mini-batch. These experiments were performed on the Camelyon16 validation set with RSP based SSL method \cite{srinidhi2021self} using the Curriculum-I approach.} \vspace{2mm} \label{tab:ablations} \resizebox{0.65\linewidth}{!}{% \begin{tabular}{@{}ccccc@{}} \toprule \toprule [1pt] $\boldsymbol{\alpha}$ & \textbf{0.05} & \textbf{0.10} & \textbf{0.15} & \textbf{0.20} \\ \midrule \textbf{Accuracy} & 0.8511 & 0.8837 & 0.7441 & 0.6511 \\ \midrule \textbf{AUC} & 0.8920 & 0.9176 & 0.7269 & 0.6892 \\ \bottomrule \bottomrule [1pt] \end{tabular}} \vspace{-3mm} \end{table} Table \ref{tab:ablations} shows the effect of parameter $\alpha$ that selects the portion of hard samples in each mini-batch in our formulation. We observe that varying $\alpha$ to large values ($>0.10$) will lead to a large selection of easy samples, thus deteriorating the performance; on the other hand, selecting $\alpha$ to small values ($<0.10$) over exaggerates the hard samples leading to under-fitting. Thus, we empirically found $\alpha = 0.10$ as the optimal choice based on the validation performance of the Camelyon16 set that selects sufficient hard examples to balance between over-fitting to easy samples or under-fitting to hard samples. Next, we empirically chose the value of $(a, b)$ as $(0.7, 0.2)$ in a reasonable range such that the threshold $thres$ in Eq. \ref{eq:threshold} changes at uniform speed from $a+b \rightarrow b$ which is $0.9 \rightarrow 0.2$ during the gradual course of training. More intuition on selection of $(a, b)$ with respect to training dynamics of neural network is discussed in Section \ref{sec:Method} (Curriculum-I). However, note that we fixed these parameters constant across all three datasets, and we find that the above choices of $(a, b)$ are less sensitive to data distribution. \section{Conclusion} \label{sec:Conclusion} We introduce HaDCL, a method for improving self-supervised learning to both in-domain and out-of-domain distribution data, and also slide-level and patch-wise classification tasks in histopathology. By dynamically leveraging the hard examples during downstream mini-batch fine-tuning, we learn robust features that are adaptable to different domains with significant domain shifts. Our approach is more generic and adaptable to different SSL methods and does not involve any additional overhead complexity. Through experiments, we demonstrated state-of-the-art classification results on three histology benchmark datasets with a significant performance improvement on an external test set with notable domain-shift. We believe HaDCL may prove to be a useful stepping stone in generalizing the pretrained representations to various downstream tasks under a limited annotation setting. Future research will focus on extending the approach to mixed supervision to simultaneously exploit both pixel-level and image-level annotations for slide-level prediction tasks. {\small \bibliographystyle{ieee_fullname}
\section{Introduction} Due to the boom of CNNs, standard face recognition (SFR) systems have achieved a remarkable success, which usually work with mostly non-occluded faces. However, there are a number of circumstances where faces are occluded by facial masks, rising the masked face recognition (MFR) problem. During the global COVID-19, people are encouraged to wear masks in public areas, making primary facial features invisible. Few SFR systems can work well with this situation, but removing the mask for authentication will increase the risk of virus infection. Recently, some commercial vendors \cite{FRVT-mask} have developed face recognition algorithms capable of handling face masks, and an increasing number of research publications \cite{ding2020masked,geng2020masked,du2021towards,hariri2021efficient,anwar2020masked} have surfaced on this topic. However, due to the sudden outbreak of the epidemic, there are yet no publicly available large-scale MFR benchmark. To address the above-mentioned issue, we organize the Face Bio-metrics under COVID Workshop and Masked Face Recognition Challenge in ICCV 2021. Face benchmarks empower researchers to train high-performance face recognition systems. Enabled by the ultra-large-scale WebFace260M benchmark \cite{WebFace260M}, this challenge aims to push the frontiers of practical MFR. On the other hand, evaluation protocols and test set play an essential role in analysing face recognition performance. Since public evaluation sets are mostly saturated or contain noise, we adopt the Face Recognition Under Inference Time conStraint (FRUITS) protocol in WebFace260M Track in this workshop. Besides, a new test set is gathered consisting of elaborated 2,478 celebrities and 60,926 faces. Meanwhile, we collect the world-largest real-world masked test set. This paper is the official report of WebFace260M Track in the MFR workshop and challenge. We detail the training data, evaluation protocols, submission rules, test set and metric in SFR and MFR, ranking criterion, baseline solution, and preliminary competition results. The challenge was launched at June 7, 2021. In the first phase of WebFace260M Track, 69 teams from academia and industry participate in the challenge and 49 teams exceed the performance of our baseline. Total 833 solutions are submitted, covering various network designs and training strategies. There are second phase of the challenge till October 1, 2021 and on-going leaderboard. We will actively update this report in the future. \begin{table*}[!t] \begin{center}{\scalebox{0.9}{ \begin{tabular}{l|c|c|c|c|c|c|c} \hline Dataset & \# Identities & \# Images & Images/ID & Cleaning & \# Attributes & Availability & Publications\\ \hline \hline CASIA-WebFace~\cite{CASIA-WebFace} & $10$ K & $0.5$ M & 47 & Auto & - & Public & Arxiv 2014\\ CelebFaces~\cite{DeepID} & $10$ K & $0.2$ M & 20 & Manual & 40 & Public & ICCV 2015\\ UMDFaces~\cite{UMDFaces} & $8$ K & $0.3$ M & 45 & Semi-auto & 4 & Public & IJCB 2017\\ VGGFace~\cite{VGGFace} & $2$ K & $2.6$ M & 1,000 & Semi-auto & - & Public & BMVC 2015\\ VGGFace2~\cite{VGGFace2} & $9$ K & $3.3$ M & 363 & Semi-auto & 11 & Public & FG 2018\\ MS1M~\cite{MS1M} &$0.1$ M & $10$ M & 100 & No & -& Public & ECCV 2016\\ MS1M-IBUG~\cite{deng2017marginal} &$85$ K & $3.8$ M & 45 & Semi-auto & -& Public & CVPRW 2017\\ MS1MV2~\cite{ArcFace} & $85$ K & $5.8$ M & 68 & Semi-auto & -& Public & CVPR 2019\\ MS1M-Glint~\cite{glintweb} & $87$ K & $3.9$ M & 44 & Semi-auto & -& Public & -\\ MegaFace2~\cite{MF2} & $0.6$ M & $4.7$ M & 7 & Auto & -& Public & CVPR 2017\\ IMDB-Face~\cite{IMDB-Face} & $59$ K & $1.7$ M & 29 & Manual & - & Public & ECCV 2018\\ \hline \textcolor[RGB]{128,128,128}{Facebook~\cite{DeepFace}} & \textcolor[RGB]{128,128,128}{$4$ K} & \textcolor[RGB]{128,128,128}{$4.4$ M} & \textcolor[RGB]{128,128,128}{1,100} & \textcolor[RGB]{128,128,128}{-} & \textcolor[RGB]{128,128,128}{-}& \textcolor[RGB]{128,128,128}{Private} &\textcolor[RGB]{128,128,128}{CVPR 2014}\\ \textcolor[RGB]{128,128,128}{Facebook~\cite{taigman2015web}} & \textcolor[RGB]{128,128,128}{$10$ M} & \textcolor[RGB]{128,128,128}{$500$ M} & \textcolor[RGB]{128,128,128}{50} & \textcolor[RGB]{128,128,128}{-} & \textcolor[RGB]{128,128,128}{-}& \textcolor[RGB]{128,128,128}{Private} &\textcolor[RGB]{128,128,128}{CVPR 2015}\\ \textcolor[RGB]{128,128,128}{Google~\cite{FaceNet}} & \textcolor[RGB]{128,128,128}{$8$ M} & \textcolor[RGB]{128,128,128}{$200$ M} & \textcolor[RGB]{128,128,128}{25} & \textcolor[RGB]{128,128,128}{-} & \textcolor[RGB]{128,128,128}{-}& \textcolor[RGB]{128,128,128}{Private} & \textcolor[RGB]{128,128,128}{CVPR 2015}\\ \textcolor[RGB]{128,128,128}{MillionCelebs~\cite{MillionCelebs}} & \textcolor[RGB]{128,128,128}{$0.6$ M} & \textcolor[RGB]{128,128,128}{$18.8$ M} & \textcolor[RGB]{128,128,128}{30} & \textcolor[RGB]{128,128,128}{Auto} & \textcolor[RGB]{128,128,128}{-}& \textcolor[RGB]{128,128,128}{Private} & \textcolor[RGB]{128,128,128}{CVPR 2020}\\ \hline \textbf{WebFace260M} & \textbf{4 M} & \textbf{260M} & \textbf{65} & No & -& Public & CVPR 2021 \\ \textbf{WebFace42M} & \textbf{2 M} & \textbf{42M} & \textbf{21} & Auto & 7 & Public & CVPR 2021 \\ \hline \end{tabular}}} \end{center} \caption{Training data for deep face recognition. The cleaned WebFace42M is the largest public training set in terms of both \# identities and \# images.} \label{table:training_set} \end{table*} \section{Training Data and Evaluation Protocols} \subsection{WebFace260M Data} WebFace260M \cite{WebFace260M} is current largest public face recognition dataset, covering noisy 4M identities/260M faces and cleaned 2M identities/42M faces. With such large data size, this dataset takes a significant step towards closing the data gap between academia and industry as shown in Table~\ref{table:training_set}. The celebrity name list consists of two parts: the first one is borrowed from MS1M (1 million, constructed from Freebase) and the second one (3 millions) is collected from the IMDB database. Based on the name list, celebrity faces are searched and downloaded via Google image search engine~\cite{google_image}. The WebFace42M training set is obtained by a Cleaning Automatically utilizing Self-Training (CAST) pipeline. Noise ratio of WebFace42M is lower than 10\% (similar to CASIA-WebFace~\cite{CASIA-WebFace} and Glint360K \cite{an2020partial}) based on the sampling estimation. After CAST, duplicates of each subject are removed when their cosine similarity is higher than 0.95. Furthermore, the feature center of each subject is compared with popular benchmarks (\eg the test set in this challenge, LFW families~\cite{LFW,CALFW,CPLFW}, FaceScrub~\cite{FaceScrub}, IJB-C~\cite{IJB-C} \etal), and overlaps are removed if the cosine similarity is higher than 0.7. \subsection{FRUITS Protocol} Most existing face recognition evaluation protocols \cite{LFW,CFP,AgeDB,CALFW,CPLFW,MegaFace,IJB-C,YTF,IQIYI2018} target the pursuit of accuracy. However, face recognition in real-world application scenarios is always restricted by inference time. Lightweight face recognition challenge \cite{LFR} takes a step toward this goal by constraining the FLOPs and model size of submissions, which is not a straightforward solution. Besides, it neglects the face detection and alignment module cost. Strict submission policy of NIST-FRVT~\cite{FRVT} hinders researchers to freely evaluate their algorithms. In WebFace260M Track of this challenge, we follow the Face Recognition Under Inference Time conStraint (FRUITS) protocol. Referring to~\cite{WebFace260M}, inference time is measured on a single core of an Intel Xeon CPU E5-2630-v4@2.20GHz processor (no GPU hardware is provided), and the constraint of 1000 milliseconds is adopted. \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{./img/test-set2.pdf} \caption{The collecting pipeline of test set.} \vspace{-2mm} \label{fig:test_set} \end{figure*} \subsection{Submission Rules} The WebFace260M Track of our challenge\footnote{\url{https://www.face-benchmark.org/challenge.html}} has two phases. For the first phase, the number of max submissions per day is 5. For the second phase, the number of max submissions per day is 3. The full WebFace260M data has been open for all applicants, as long as their agreements\footnote{\url{https://www.face-benchmark.org/doc/license_agreement_for_webface260m_dataset.pdf}} are qualified. Mask data-augmentation is allowed, for example this method\footnote{\url{https://github.com/deepinsight/insightface/tree/master/recognition/_tools_}}. The applied mask augmentation tool should be reproducible. External dataset and pre-trained models are both prohibited in the second phase. Participants could submit their submission package\footnote{\url{https://github.com/WebFace260M/webface260m-iccv21-mfr}} to the submission server\footnote{\url{https://competitions.codalab.org/competitions/32478}} and get scores by our online evaluation. Participants should run the code for verification on the provided docker file to ensure the correctness of feature and time constraints. Both the models for face detection and recognition should be converted to ONNX format. Participants must package the code directory for submission and see the results on the leaderboard\footnote{\url{https://competitions.codalab.org/competitions/32478\#results}}. Test images are invisible during challenges. \section{Standard Face Recognition} \subsection{Test Set} \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{./img/system.pdf} \caption{The annotation interface of our test set collecting system. Top part is gathered celebrities images, while bottom part shows cosine similarities.} \label{fig:system} \vspace{-5mm} \end{figure} To compare deep CNN face matchers utilizing FRUITS protocol, we manually construct a elaborated test set. It is well known that recognizing strangers (especially when they are similar-looking) is a difficult task even for experienced researchers. So we choose to select our familiar celebrities, which ensure the high-quality of the test set. The collecting pipeline of test set is illustrated in Figure \ref{fig:test_set}. Each annotator is asked to write about 100 names of celebrities including stars, politics, business, athletes \etal. Different name lists are exclusive, and a identities pool is maintained by merging lists. It is noting that annotators are encouraged to collect gender-balanced and race-balanced identities lists. The final identities pool consists of 2,748 names. For each celebrity, responsible annotator need to collect his/her faces from reliable sources of information. Targeting at analysing recognition performance in different application scenarios, 3 subclass is defined to guide collection: \noindent{\bf Controlled image}: \emph{Controlled} faces collection targets to evaluate ID photo such as visa and driving license. \emph{Controlled} face in our test set is defined as: near frontal, five landmarks are visible, normal expression, not low-resolution. \noindent{\bf Wild image}: \emph{Wild} subclass aims to collect faces in unconstrained scenarios, including large pose, partial occlusion, resolution variation, illumination variation \etal. \noindent{\bf Cross-age image}: This subclass collects faces whose age is obviously different from \emph{Controlled} and \emph{Wild} faces, including \emph{Cross-age-10} (more than 10-years gap) and \emph{Cross-age-20} (more than 20-year gap). For each subclass of a certain celebrity, we gather about 7 faces (\ie ~20 faces/identity) to construct test set as shown in Figure \ref{fig:test_set}. Furthermore, we design a interface to assist annotators to judge the difficulty and quality of the collected faces. In Figure \ref{fig:system}, collected images for a celebrity, its intra-class scores, its highest inter-class scores with other identities are illustrated respectively. Based on scores indicator from this system, annotators are encouraged to gather hard case (For example, less than 0.5 similarity score for intra-class, more than 0.5 for inter-class). Besides, noisy faces could be effectively filtered (For example, if the score of one face is less than 0.5 compared with all other intra-class images, it should be paid more attention). The statistics of final test is listed in Table \ref{table:test_set_num}. There are elaborately constructed 2,478 identities and 57,715 faces in total for SFR. 3,328,950,920 impostors and 2,070,305 genuine pairs could be constructed. Protected attributes (gender, race) as well as different scenarios (\emph{Controlled}, \emph{Wild}, \emph{Cross-age}) are accurately annotated for each subject. \emph{Cross-age} and \emph{Cross-scene} comparisons are also conducted in corresponding subset. \begin{table}[t] \begin{center}{\scalebox{0.67}{ \begin{tabular}{c|c|c|c|c|c} \hline Eva. & Attributes& \# Identities & \# Faces & \# Impostor & \# Genuine \\ \hline \hline \multirow{6}{*}{\tabincell{l}{SFR}} &\textbf{All} & \textbf{2,478} & \textbf{57,715} & \textbf{3,328,950,920} & \textbf{2,070,305}\\ \cline{2-6} &Cross-age-10& - & - & 1,667,036,254 & 553,174\\ &Cross-age-20& - & - & 842,366,636 & 123,560 \\ \cline{2-6} & Controlled& - & 22,135 & 489,657,590 & 300,635\\ &Wild& - & 35,580 & 1,264,898,172 & 1,038,228\\ &Cross-scene& - & - & 1,574,395,158 & 731,442 \\ \hline \multirow{6}{*}{\tabincell{l}{MFR}} & \textbf{All} & \textbf{2,478} & \textbf{60,926} & - & -\\ \cline{2-6} & Masked & 862 & 3,211 & - & -\\ \cline{2-6} & Nonmasked & 2,478 & 57,715 & - & -\\ \cline{2-6} & Controlled-Masked& - & - & 71,042,982 & 32,503 \\ &Wild-Masked& - & - & 114,193,476 & 53,904\\ &All-Masked& - & - & 185,236,458 & 86,407 \\ \hline \end{tabular}}} \end{center} \vspace{-4mm} \caption{The statistics of our test set.} \label{table:test_set_num} \end{table} \begin{figure} \small \centering \includegraphics[width=0.83\linewidth]{img/Picture1.pdf \caption{Celebrities with and without real-world mask.} \vspace{-5mm} \label{fig:mask_test_set} \end{figure} \subsection{Metric} Based on the FRUITS protocol and the new test set, we perform 1:1 face verification across various attributes for SFR evaluation. Table \ref{table:test_set_num} shows numbers of imposter and genuine in different verification settings. \emph{All} means impostors are paired without attention to any attribute, while later comparisons are conducted on age and scenario subsets. \emph{Cross-age} refers to cross-age (more than 10 and 20 years) verification, while \emph{Cross-scene} means pairs are compared between controlled and wild settings. Different algorithms are measured on False Non-Match Rate (FNMR) \cite{FRVT}, which is defined as the proportion of mated comparisons below a threshold set to achieve the False Match Rate (FMR) specified. FMR is the proportion of impostor comparisons at or above that threshold. It is worth noting that \textbf{Lower FNMR at the same FMR is better}. \section{Masked Face Recognition} \subsection{Test Set} In contrast with simulated \cite{FRVT-mask, negi2021deep} or relatively small \cite{anwar2020masked,damer2021extended,IJCB-mask,wang2020masked} masked face test sets, a real-world comprehensive benchmark for evaluating MFR is developed in this challenge. Based on the SFR identities, we further collect masked faces for these celebrities. Specifically, as shown in Table \ref{table:test_set_num}, there are carefully selected 3,211 masked faces among 862 identities. Subjects with real-world mask are illustrated in Figure~\ref{fig:mask_test_set}. \subsection{Metric} For MFR, assessment is performed with \emph{Mask-Nonmask} comparisons. Specifically, there is one face with mask in imposter and genuine, while another face is from standard face sets. According to the attribute of face without mask, we evaluate the performance of algorithms under \emph{Controlled-Masked}, \emph{Wild-Masked}, and \emph{All-Masked} settings listed in Table \ref{table:test_set_num}. \begin{table*}[!t] \begin{center}{\scalebox{0.77}{ \begin{tabular}{l|l|c|c|c|c|c|c|c|c|c} \hline Rank & Participant & \makecell[c]{All\\\textbf{(MFR\&SFR)}} & \makecell[c]{Wild\\\textbf{(MFR\&SFR)}} & \makecell[c]{Controlled\\\textbf{(MFR\&SFR)}} & \makecell[c]{All\\\textbf{(SFR)}} & \makecell[c]{Wild\\\textbf{(SFR)}} & \makecell[c]{Controlled\\\textbf{(SFR)}} & \makecell[c]{Detection\\time} & \makecell[c]{Recognition\\time} & \makecell[c]{Total\\time} \\ \hline \hline 1 & Ethan.y & 0.0980$^{(1)}$ & 0.1283$^{(5)}$ & 0.0500$^{(1)}$ & 0.0393$^{(12)}$ & 0.0627$^{(13)}$ & 0.0032$^{(6)}$ & 156 & 760 & 916\\ 2 & victor-2021 & 0.1017$^{(2)}$ & 0.1222$^{(1)}$ & 0.0694$^{(3)}$ & 0.0162$^{(1)}$ & 0.0270$^{(1)}$ & 0.0018$^{(1)}$ & 157 & 496 & 653\\ 3 & sleepybear & 0.1036$^{(3)}$ & 0.1246$^{(2)}$ & 0.0699$^{(5)}$ & 0.0168$^{(2)}$ & 0.0276$^{(2)}$ & 0.0020$^{(2)}$ & 162 & 498 & 660\\ 4 & wjtan99 & 0.1056$^{(4)}$ & 0.1279$^{(4)}$ & 0.0698$^{(4)}$ & 0.0187$^{(3)}$ & 0.0306$^{(4)}$ & 0.0021$^{(3)}$ & 97 & 897 & 994\\ 5 & hukangli & 0.1056$^{(4)}$ & 0.1278$^{(3)}$ & 0.0698$^{(4)}$ & 0.0187$^{(3)}$ & 0.0305$^{(3)}$ & 0.0021$^{(3)}$ & 97 & 899 & 996\\ 6 & min.yang & 0.1131$^{(5)}$ & 0.1366$^{(6)}$ & 0.0758$^{(6)}$ & 0.0228$^{(4)}$ & 0.0367$^{(5)}$ & 0.0026$^{(4)}$ & 158 & 453 & 611\\ 7 & wzw & 0.1272$^{(6)}$ & 0.1530$^{(7)}$ & 0.0833$^{(11)}$ & 0.0267$^{(7)}$ & 0.0432$^{(8)}$ & 0.0028$^{(5)}$ & 49 & 744 & 793\\ 8 & vuvko & 0.1315$^{(7)}$ & 0.1575$^{(8)}$ & 0.0872$^{(12)}$ & 0.0248$^{(6)}$ & 0.0407$^{(7)}$ & 0.0028$^{(5)}$ & 157 & 926 & 1083\\ 9 & lcx2 & 0.1318$^{(8)}$ & 0.1699$^{(13)}$ & 0.0689$^{(2)}$ & 0.0585$^{(27)}$ & 0.0911$^{(30)}$ & 0.0061$^{(19)}$ & 186 & 371 & 557\\ 10 & linkpal2021 & 0.1319$^{(9)}$ & 0.1622$^{(11)}$ & 0.0828$^{(10)}$ & 0.0346$^{(9)}$ & 0.0561$^{(10)}$ & 0.0033$^{(7)}$ & 162 & 769 & 931\\ 11 & tuolaji & 0.1340$^{(10)}$ & 0.1610$^{(10)}$ & 0.0909$^{(15)}$ & 0.0242$^{(5)}$ & 0.0399$^{(6)}$ & 0.0026$^{(4)}$ & 167 & 286 & 453\\ 12 & crishawy & 0.1340$^{(10)}$ & 0.1610$^{(10)}$ & 0.0909$^{(15)}$ & 0.0242$^{(5)}$ & 0.0399$^{(6)}$ & 0.0026$^{(4)}$ & 158 & 861 & 1019\\ 13 & betterone & 0.1341$^{(11)}$ & 0.1608$^{(9)}$ & 0.0882$^{(13)}$ & 0.0291$^{(8)}$ & 0.0476$^{(9)}$ & 0.0032$^{(6)}$ & 157 & 948 & 1105\\ 14 & cheng3qing & 0.1377$^{(12)}$ & 0.1685$^{(12)}$ & 0.0812$^{(8)}$ & 0.0538$^{(24)}$ & 0.0782$^{(24)}$ & 0.0062$^{(20)}$ & 159 & 688 & 847\\ 15 & nayesoj & 0.1389$^{(13)}$ & 0.1724$^{(14)}$ & 0.0814$^{(9)}$ & 0.0498$^{(19)}$ & 0.0761$^{(23)}$ & 0.0042$^{(11)}$ & 164 & 346 & 510\\ 16 & amyburden & 0.1503$^{(14)}$ & 0.1807$^{(15)}$ & 0.0996$^{(17)}$ & 0.0413$^{(13)}$ & 0.0639$^{(14)}$ & 0.0048$^{(16)}$ & 158 & 659 & 817\\ 17 & mind\_ft & 0.1503$^{(14)}$ & 0.1813$^{(16)}$ & 0.1003$^{(18)}$ & 0.0377$^{(10)}$ & 0.0603$^{(11)}$ & 0.0040$^{(9)}$ & 160 & 340 & 500\\ 18 & jyf & 0.1591$^{(15)}$ & 0.2026$^{(19)}$ & 0.0769$^{(7)}$ & 0.0878$^{(41)}$ & 0.1267$^{(42)}$ & 0.0097$^{(30)}$ & 158 & 320 & 478\\ 19 & Wison & 0.1596$^{(16)}$ & 0.1906$^{(17)}$ & 0.1093$^{(20)}$ & 0.0386$^{(11)}$ & 0.0624$^{(12)}$ & 0.0037$^{(8)}$ & 164 & 570 & 734\\ 20 & ncvl01 & 0.1685$^{(17)}$ & 0.1996$^{(18)}$ & 0.1133$^{(21)}$ & 0.0457$^{(15)}$ & 0.0683$^{(16)}$ & 0.0042$^{(11)}$ & 157 & 819 & 976\\ 21 & Daniel2018 & 0.1736$^{(18)}$ & 0.2172$^{(26)}$ & 0.0994$^{(16)}$ & 0.0723$^{(33)}$ & 0.1115$^{(38)}$ & 0.0075$^{(26)}$ & 158 & 330 & 488\\ 22 & simonss & 0.1745$^{(19)}$ & 0.2043$^{(20)}$ & 0.1196$^{(22)}$ & 0.0462$^{(16)}$ & 0.0682$^{(15)}$ & 0.0043$^{(12)}$ & 157 & 1164 & 1321\\ 23 & hihi123 & 0.1767$^{(20)}$ & 0.2106$^{(23)}$ & 0.1133$^{(21)}$ & 0.0456$^{(14)}$ & 0.0730$^{(19)}$ & 0.0042$^{(11)}$ & 184 & 644 & 828\\ 24 & Sungmin & 0.1780$^{(21)}$ & 0.2086$^{(22)}$ & 0.1210$^{(24)}$ & 0.0473$^{(18)}$ & 0.0697$^{(17)}$ & 0.0044$^{(13)}$ & 136 & 1160 & 1296\\ 25 & HIT\_face & 0.1780$^{(21)}$ & 0.2083$^{(21)}$ & 0.1224$^{(25)}$ & 0.0470$^{(17)}$ & 0.0701$^{(18)}$ & 0.0041$^{(10)}$ & 226 & 639 & 865\\ 26 & thesherlock & 0.1826$^{(22)}$ & 0.2124$^{(24)}$ & 0.1285$^{(28)}$ & 0.0501$^{(21)}$ & 0.0744$^{(21)}$ & 0.0045$^{(14)}$ & 162 & 439 & 601\\ 27 & fh\_nj & 0.1827$^{(23)}$ & 0.2144$^{(25)}$ & 0.1249$^{(26)}$ & 0.0508$^{(22)}$ & 0.0758$^{(22)}$ & 0.0048$^{(16)}$ & 158 & 316 & 474\\ 28 & liu\_xiang886 & 0.1859$^{(24)}$ & 0.2329$^{(32)}$ & 0.0897$^{(14)}$ & 0.1103$^{(46)}$ & 0.1543$^{(48)}$ & 0.0127$^{(33)}$ & 157 & 317 & 474\\ 29 & ppnn & 0.1867$^{(25)}$ & 0.2251$^{(29)}$ & 0.1056$^{(19)}$ & 0.0937$^{(44)}$ & 0.1282$^{(43)}$ & 0.0133$^{(34)}$ & 159 & 827 & 986\\ 30 & MCPRL\_aiwa & 0.1882$^{(26)}$ & 0.2182$^{(27)}$ & 0.1328$^{(30)}$ & 0.0500$^{(20)}$ & 0.0741$^{(20)}$& 0.0045$^{(14)}$ & 158 & 657 & 815\\ 31 & tongtong & 0.1923$^{(27)}$ & 0.2246$^{(28)}$ & 0.1332$^{(31)}$ & 0.0529$^{(23)}$ & 0.0792$^{(25)}$& 0.0047$^{(15)}$ & 159 & 318 & 477\\ 32 & billzeng & 0.1923$^{(27)}$ & 0.2246$^{(28)}$ & 0.1332$^{(31)}$ & 0.0529$^{(23)}$ & 0.0792$^{(25)}$& 0.0048$^{(16)}$ & 157 & 319 & 476\\ 33 & runauto & 0.1938$^{(28)}$ & 0.2311$^{(31)}$ & 0.1224$^{(25)}$ & 0.0741$^{(34)}$ & 0.1066$^{(35)}$& 0.0071$^{(24)}$ & 157 & 733 & 890\\ 34 & yossibiton & 0.1944$^{(29)}$ & 0.2263$^{(30)}$ & 0.1345$^{(32)}$ & 0.0552$^{(25)}$ & 0.0818$^{(27)}$& 0.0049$^{(17)}$ & 167 & 83 & 250\\ 35 & haoyayu365 & 0.1970$^{(30)}$ & 0.2345$^{(33)}$ & 0.1321$^{(29)}$ & 0.0566$^{(26)}$ & 0.0892$^{(28)}$& 0.0061$^{(19)}$ & 156 & 396 & 552\\ 36 & dler & 0.2064$^{(31)}$ & 0.2389$^{(34)}$ & 0.1464$^{(41)}$ & 0.0538$^{(24)}$ & 0.0807$^{(26)}$ & 0.0051$^{(18)}$ & 181 & 1060 & 1241\\ 37 & f.gomes & 0.2092$^{(32)}$ & 0.2459$^{(36)}$ & 0.1407$^{(34)}$ & 0.0676$^{(30)}$ & 0.0999$^{(32)}$ & 0.0064$^{(21)}$ & 157 & 1285 & 1442\\ 38 & AntonS & 0.2093$^{(33)}$ & 0.2450$^{(35)}$ & 0.1411$^{(35)}$ & 0.0698$^{(31)}$ & 0.1017$^{(33)}$ & 0.0069$^{(23)}$ & 157 & 337 & 494\\ 39 & Jim\_1021 & 0.2106$^{(34)}$ & 0.2553$^{(40)}$ & 0.1204$^{(23)}$ & 0.0978$^{(45)}$ & 0.1384$^{(46)}$ & 0.0101$^{(31)}$ & 156 & 829 & 985\\ 40 & linghu8812 & 0.2117$^{(35)}$ & 0.2510$^{(38)}$ & 0.1352$^{(33)}$ & 0.0828$^{(39)}$ & 0.1200$^{(41)}$ & 0.0072$^{(25)}$ & 157 & 857 & 1014\\ 41 & tib6913 & 0.2141$^{(36)}$ & 0.2501$^{(37)}$ & 0.1453$^{(39)}$ & 0.0720$^{(32)}$ & 0.1044$^{(34)}$ & 0.0066$^{(22)}$ & 157 & 192 & 349\\ 42 & meixitu2 & 0.2171$^{(37)}$ & 0.2501$^{(37)}$ & 0.1529$^{(46)}$ & 0.0630$^{(28)}$ & 0.0901$^{(29)}$ & 0.0069$^{(23)}$ & 157 & 295 & 452\\ 43 & Cavall & 0.2174$^{(38)}$ & 0.2583$^{(44)}$ & 0.1418$^{(37)}$ & 0.0792$^{(37)}$ & 0.1172$^{(39)}$ & 0.0066$^{(22)}$ & 157 & 389 & 546\\ 44 & HYL\_Dave & 0.2174$^{(38)}$ & 0.2562$^{(41)}$ & 0.1444$^{(38)}$ & 0.0751$^{(36)}$ & 0.1112$^{(37)}$ & 0.0069$^{(23)}$ & 157 & 173 & 330\\ 45 & zhangge00hou & 0.2187$^{(39)}$ & 0.2565$^{(42)}$ & 0.1469$^{(42)}$ & 0.0742$^{(35)}$ & 0.1090$^{(36)}$ & 0.0071$^{(24)}$ & 157 & 647 & 804\\ 46 & maguih & 0.2188$^{(40)}$ & 0.2566$^{(43)}$ & 0.1469$^{(42)}$ & 0.0742$^{(35)}$ & 0.1090$^{(36)}$ & 0.0071$^{(24)}$ & 158 & 651 & 809\\ 47 & jinhong.zhang & 0.2202$^{(41)}$ & 0.2539$^{(39)}$ & 0.1524$^{(45)}$ & 0.0661$^{(29)}$ & 0.0934$^{(31)}$ & 0.0071$^{(24)}$ & 12 & 341 & 353\\ 48 & cmkyec & 0.2286$^{(42)}$ & 0.2781$^{(46)}$ & 0.1413$^{(36)}$ & 0.0932$^{(43)}$ & 0.1419$^{(47)}$ & 0.0103$^{(32)}$ & 158 & 247 & 405\\ 49 & nikkonew & 0.2295$^{(43)}$ & 0.2681$^{(45)}$ & 0.1545$^{(47)}$ & 0.0816$^{(38)}$ & 0.1185$^{(40)}$ & 0.0077$^{(27)}$ & 156 & 321 & 477\\ 50 & litian1045 & 0.2342$^{(44)}$ & 0.2816$^{(48)}$ & 0.1483$^{(44)}$ & 0.0871$^{(40)}$ & 0.1341$^{(45)}$ & 0.0094$^{(29)}$ & 157 & 172 & 329\\ \hline \end{tabular}}} \end{center} \vspace{-4mm} \caption{The leaderboard of first phase. Results outperforming the baseline (Participant: \emph{litian1045}) are shown.} \vspace{-3mm} \label{table:competition_results} \end{table*} \subsection{Competition Ranking} The competition is ranked according to both MFR and SFR metrics. To reduce a tendency that models overfit on masked or standard face recognition, the main series of evaluation metrics are designed to show a weighted sum to consider both masked and standard faces at the same time. As shown in Table \ref{table:competition_results}, the overall ranking is ascend ordered by the \emph{All (MFR\&SFR)} metric: \emph{All (MFR\&SFR)} = 0.25 $\times$ \emph{All-Masked} + 0.75 $\times$ \emph{All (SFR)}. At the same time, \emph{Wild} and \emph{Controlled} metrics can also be computed as: \emph{Wild (MFR\&SFR)} = 0.25 $\times$ \emph{Wild-Masked} + 0.75 $\times$ \emph{Wild (SFR)}; \emph{Controlled (MFR\&SFR)} = 0.25 $\times$ \emph{Controlled-Masked} + 0.75 $\times$ \emph{Controlled (SFR)}. It is worth noting that scores of different metrics is computed at corresponding FNMR@FMR=10-5. \begin{figure*} \small \centering \subfigure[]{ \includegraphics[width=0.32\linewidth]{img/SFR.pdf}} \subfigure[]{ \includegraphics[width=0.32\linewidth]{img/MFR.pdf}} \subfigure[]{ \includegraphics[width=0.32\linewidth]{img/Combined.pdf}} \vspace{-3mm} \caption{FMR-FNMR plots of SFR, MFR, and final combined MFR\&SFR results.} \vspace{-3mm} \label{fig:mask_test_set} \end{figure*} \section{Baseline Solutions} \subsection{Implementation Details} In order to fairly evaluate the performance of different face recognition models, we reproduce representative algorithms in one Gluon codebase with the hyper-parameters referred to the original papers. Default batch size per GPU is set as 64 unless otherwise indicated. Learning rate is set as 0.05 for a single node (8 GPUs), and follows the linear scaling rule \cite{goyal2017accurate} for the training on multiple nodes (\ie $0.05\times$\# machines). We decrease the learning rate by 0.1$\times$ at 8, 12, and 16 epochs, and stop at 20 epochs for all models. During training, we only adopt the flip data augmentation. Note that other data augmentations such as adding simulated mask are encouraged to boost MFR performance. \subsection{Baseline Model and Results} The configuration of the baseline model is ResNet-50 backbone, ArcFace loss, with WebFace12M (30\%) training data. The backbone architecture is shown in Table~\ref{table:backbone}. The evaluation results of the baseline model (Participant: \emph{litian1045}) are shown in the last row of Table~\ref{table:competition_results}. The FNMR@FMR=1e-5 across different attributes (\emph{All (MFR\&SFR)}, \emph{Wild (MFR\&SFR)}, \emph{Controlled (MFR\&SFR)}, \emph{All (SFR)}, \emph{Wild (SFR)}, \emph{Controlled (SFR)}) is 0.2342, 0.2816, 0.1483, 0.0871, 0.1341, 0.0094, respectively. The time cost of detection, recognition and total is 157 ms, 172 ms, 329 ms, respectively. \begin{table}[!t] \begin{center}{\scalebox{0.9}{ \begin{tabular}{c|c|c} \hline layer name & 50-layer & output size \\ \hline\hline Input Image Crop & & 112$\times$112$\times$3\\\hline & 3$\times$3, 64, stride~1 & 112$\times$112$\times$64\\\hline Conv2\_x & $\begin{bmatrix}\makecell[c]{3\times3, 64\\3\times3, 64}\end{bmatrix}\times3$ & $56\times56\times64$\\\hline Conv3\_x & $\begin{bmatrix}\makecell[c]{3\times3, 128\\3\times3, 128}\end{bmatrix}\times4$ & $28\times28\times128$\\\hline Conv4\_x & $\begin{bmatrix}\makecell[c]{3\times3, 256\\3\times3, 256}\end{bmatrix}\times14$ & $14\times14\times256$\\\hline Conv5\_x & $\begin{bmatrix}\makecell[c]{3\times3, 512\\3\times3, 512}\end{bmatrix}\times3$ & $7\times7\times512$\\\hline FC & & 512\\\hline \end{tabular}}} \end{center} \vspace{-2mm} \caption{The network configuration of our baseline model. Convolutional building blocks are shown in brackets with the numbers of blocks stacked. Down-sampling is performed by the second conv in conv2\_1, conv3\_1, conv4\_1, and conv5\_1 with a stride of 2.} \vspace{-2mm} \label{table:backbone} \end{table} \section{Preliminary Results of First Phase} First phase was held between June 7, 2021 to August 11, 2021. During this phase, 69 teams submit a total of 833 effective solutions to the challenge. Table~\ref{table:competition_results} gives a detailed result for each participant with their ranks. As shown in Table~\ref{table:competition_results} and Figure \ref{fig:mask_test_set}, \emph{Ethan.y} ranks the 1st place in main \emph{All (MFR\&SFR)} metric with 0.0980 as well as \emph{Controlled (MFR\&SFR)} with 0.0500, while \emph{victor-2021} wins \emph{Wild (MFR\&SFR)} with a score of 0.1222. For SFR metrics, \emph{victor-2021} ranks the 1st place among \emph{All (SFR)}, \emph{Wild (SFR)} and \emph{Controlled (SFR)} with 0.0162, 0.0270 and 0.0018. Since the FNMR of MFR is much higher than that in SFR, the MFR performance dominates the final ranks. It is worth noting that during first phase, a model is allowed to be evaluated if its \emph{Total time} (which is a sum of \emph{Detection time} and \emph{Recognition time}) is no more than 2000ms. In the final ranks (second phase), we only rank models with a \emph{Total time} less than 1000ms. As shown in Table~\ref{table:competition_results}, there are 9 participants who have submitted models to the leaderboard with \emph{Total time} more than 1000ms. Since the challenge is still going on, more details of top-ranked solution would be updated in the future. \section{Conclusion} To address the MFR problem during epidemic, we organize the Face Bio-metrics under COVID Workshop and Masked Face Recognition Challenge in ICCV 2021. Enabled by the WebFace260M and FRUITS, this challenge (WebFace260M Track) aims to push the frontiers of practical MFR. This report details the training data, evaluation protocols, submission rules, test set and metric in SFR and MFR, ranking criterion, baseline solution, and preliminary competition results. In the first phase of WebFace260M Track, 69 teams (total 833 solutions) participate in the challenge and 49 teams exceed the performance of our baseline. We will actively update this report in the future. {\small \bibliographystyle{ieee_fullname}
\section{Introduction} \label{sec1} Over the past decades new branches of statistical research have developed to meet the needs of an economy with growing data volumes at its disposal. One approach to analyze large data samples, particularly when detected on a dense grid, is interpolation of discrete measurements to continuous, functional observations. This method is known as functional data analysis (FDA) and nowadays has numerous applications as diverse as economics, climatology and medicine \citep[see, for example,][among many others]{anderson2010, bonner2014, sorensen2013}. FDA benefits users in several ways: From a theoretical perspective functional models - in contrast to standard multivariate analysis - can incorporate smoothness in the data. From a computational viewpoint, the interpolation of thousands of observations to, say a yearly curve of price development, can drastically reduce the amount of data to be stored, since interpolations only consume a fraction of memory compared to the noisy raw data \citep[see, for example,][among many others]{liebl2013,stoehr2020}. From a practical point of view, random curves are easy to visualize and interpret for human users, who cannot possibly make sense from endless data lists.\\ One model that has attracted particular interest in the context of FDA due to its parsimony and interpretability is the functional linear regression model \begin{equation} \label{model_1} Y_n = S X_n + \varepsilon_n \qquad n=1,...,N. \end{equation} Here the regressors, errors and dependent variables are functions. More mathematically, $X_n, \varepsilon_n$ and $Y_n$ are elements of (potentially different) Hilbert spaces $H_1$ and $H_2$ and the slope parameter $S: H_1 \to H_2$ is a Hilbert--Schmidt operator. Such models extend existing ones for time series and panel data, and have applications in different situations, where standard, non-functional approaches fail \citep[see, for example,][]{anderson2010}. \\ Linear models are attractive for users because of their simple structure, where all information is stored in the slope parameter $S$. However, compared to the better known case of finite dimensional, linear regression, the standard tasks of estimation, prediction and statistical inference become substantially more difficult in the functional regime. Indeed all of these tasks require the approximate inversion of the compact covariance operator $\Gamma := \mathbb{E}X \otimes X$ (we discuss this issue in detail in Section \ref{Subsection_linear_model}), which constitutes a {\it statistical inverse problem}. Statistical inverse problems extend {\it classical inverse problem} \citep[the reconstruction of an entity using indirect observations, see fore example][]{Englbook,Helgasonbook} by including noise in the model. Naturally arising in different settings, statistical inverse problems have been studied extensively in tomography, deconvolution or the heat equation, to name but a few examples \citep[see][and the references therein]{cavalier2008,bissantz2008}. Since our subsequent discussion is exclusively concerned with statistical inverse problems, we will for brevity just refer to them as inverse problems without qualifications. Characteristic of inverse problems is a need for regularization, which leads to slower than parametric convergence rates of the resulting estimates. The study of functional linear regression and the associated inverse problem has been a part of FDA for more than two decades \citep[see, for example the monograph of][]{Ramsaybook}. Early work has focused on the scalar response model \begin{equation} \label{functions_on_regressors} Y_n = \int_0^1 \varphi_S(t) X_n(t) dt + \varepsilon_n~, \end{equation} which is a special case of \eqref{model_1}, where $H_1=L^2[0,1]$, the space of square integrable function defined on the interval $[0,1]$, $H_2= {\mathbb R}$ and $S: L^2[0,1] \to {\mathbb R}$ is an integral operator with square integrable kernel $ \varphi_S$. For the investigation of scalar response models, we refer the interested reader for instance to \cite{cardot2003}, \cite{hall2007}, \cite{yuan2012} and references therein. In \cite{hall2007} convergence rates for spectral cut-off estimators (a specific kind of regularization also used in this paper) are investigated with respect to the $L^2$-norm and it is shown that these estimators can achieve minimax optimal rates. Generalizations of these results to functional linear regression with functional responses can be found in \cite{masaaki2017}. Similarly, \cite{benatia2017} investigate minimax $L^2$-rates, as well as practical aspects of Tikhonov regularizations in the estimation of the slope parameter. Besides $L^2$-rates other aspects of model \eqref{model_1} have been investigated in a wide variety of works, such as consistency under weak dependence in a white noise model \citep[see][]{hoermann2012}, aspects of identifiability \citep[see][]{scheipl2016}, minimax rates for prediction \citep[see][]{crambes2013} and robust estimation \citep[see][]{shin2016}. \\ The list of cited references is by no means complete and only comprises a fraction of the larger body of research in this domain. Besides estimation and prediction, hypothesis testing in the functional regression model has attracted some attention. \cite{cardot2003, cardot2004} consider the problem of testing for a particular value of the slope, i.e. $H_0:S=S_0$ vs. $H_1: S \neq S_0$, where $S_0$ is some hypothesized operator (see Section \ref{Subsection_relevant_hypothesis} for details and more references). It turns out that $H_0$ can be examined by $\sqrt{N}$-consistent tests, which employ transformed versions of both operators $S$ and $S_0$. Importantly such tests do not have to solve the inverse problem of reconstructing $S$, which makes them theoretically more parsimonious, but practically somewhat difficult to interpret, as they do not assess the deviation of the true operators of interest (for a more detailed discussion of this problem we refer to Section \ref{Subsection_relevant_hypothesis} below). As a consequence attention has recently shifted to inference methods, based on direct slope comparisons, to make the results statistically more meaningful. For example, in the functional linear model \eqref{functions_on_regressors} with scalar responses \cite{kato2019} develop confidence bands that cover the slope function at most points with a prespecified probability. Other authors use Gaussian approximations to construct uniform confidence bands; see, for example, \cite{babii2020}, who devises honest confidence bands for the regression function in a nonparametric instrumental variable regression using Tikhonov regularization. Notice that these approaches, based on reconstructing $S$ (or $\varphi_S$), have to pay the price of solving the inverse problem, by a convergence speed significantly slower than $1/\sqrt{N}$. \\ In this paper, we contribute to the discussion by providing a new method of statistical inference in the regression model \eqref{model_1}. Our inference concerns the two deviation measures $\vvvert S-S_0 \vvvert^2$ (the distance in Hilbert--Schmidt norm) and ${\mathbb E}\| SX-S_0X \|^2$ (the expected prediction error), where again $S_0$ is a hypothesized operator. In contrast to the hypothesis of the form $H_0: S=S_0$, we prefer a more quantitative approach, testing whether the deviation $\vvvert S-S_0 \vvvert^2$ or ${\mathbb E}\| SX-S_0X \|^2$ is smaller than some predetermined threshold, say $\Delta >0$. Although one has to solve the inverse problem to reconstruct $S$, the proposed estimates converge at a parametric rate of $1/\sqrt{N}$, due to a natural smoothing effect of the $L^2$-norms. In particular, we use a new proof-technique, called {\it smoothness shift}, to establish asymptotic normality for estimators of the deviation measures $\vvvert S-S_0 \vvvert^2$ and ${\mathbb E}\| SX-S_0X \|^2$. This technique can be also used in the study of other inverse problems, such as deconvolution or tomography and is therefore of independent interest. A direct application of these results for statistical inference such as the construction of hypothesis tests or confidence intervals is theoretically possible, but practically difficult, because it requires the estimation of asymptotic (long-run) variances. This estimation is intricate in inverse problems even for i.i.d.\ data and becomes even more difficult for functional time series (see Proposition~\ref{proposition_1} below for a presentation of the long-run variance $\tau^2$). To circumvent these problems we investigate sequential versions of our estimators, prove weak invariance principles and use the concept of self-normalization \citep[see, for example,][]{shao2015,DetKokVol20} to construct (asymptotically) pivotal estimates of the deviation measures. Users benefit from the principle of self-normalization, because it provides (robust) inference tools, which do not require the choice of tuning parameters for long-run variance estimation (see, e.g. \cite{Horvath2011} and \cite{Kokoszka2012}) or for the block bootstrap of dependent data \citep[see, e.g.,][]{poliroma1994,bucher2013}.\\ The rest of this paper is organized as follows: In Section \ref{sec2}, we discuss the linear model in detail and construct the spectral cut-off estimator $\hat S_N$ for $S$. Next, in Section~\ref{sec3}, we present statistical inference for the distance in Hilbert--Schmidt norm and in Section~\ref{sec4} inference for the expected prediction error. Then, in Section~\ref{sec5} we propose extensions of our methodology to two sample and change point scenarios, while in Section~\ref{sec6} we investigate finite sample properties by virtue of a simulation study. Finally, the Appendix contains the technical proofs and mathematical details. \begin{comment} Over the past decades new branches of statistical research have developed to meet the needs of an economy with growing data volumes at its disposal. One approach to analyze large data samples, particularly when detected on a dense grid, is interpolation of discrete measurements to continuous, functional observations. This method is known as functional data analysis (FDA) and has nowadays numerous applications as diverse as economics, climatology and medicine \citep[see, for example,][among many others]{anderson2010, bonner2014, sorensen2013}. FDA benefits users in several ways: From a theoretical perspective functional models - in contrast to standard multivariate analysis - can incorporate smoothness in the data. From a computational viewpoint, the interpolation of thousands of observations to, say a yearly curve of price development, can drastically reduce the amount of data to be stored, since interpolations only consume a fraction of memory compared to the noisy raw data \citep[see, for example,][among many others]{aston2013,liebl2013}. From a practical point of view, random curves are easy to visualize and interpret for human users, who cannot possibly make sense from endless data lists.\\ In the context of FDA the functional linear regression model \begin{equation} \label{model_1} Y_n = S X_n + \varepsilon_n \qquad n=1,...,N \end{equation} has attracted particular interest due to its parsimony and interpretability. Here the regressors, errors and dependent variables are functions. More mathematically, $X_n, \varepsilon_n$ and $Y_n$ are elements of (potentially different) Hilbert spaces $H_1$ and $H_2$ and the slope parameter $S: H_1 \to H_2$ is a Hilbert--Schmidt operator. Such models extend existing ones for time series and large data panel, and have applications in different situations, where standard, non-functional approaches fail \citep[see, for example,][]{anderson2010}. Models of the form \eqref{model_1} are attractive because of their simple structure, where all information is stored in the slope parameter $S$. However, even in this plain model, the problems of estimation, prediction and statistical inference are non-trivial, as they all require solving a statistical inverse problem, namely recovering the unknown operator $S$ from the indirect observations $(Y_1, X_1) , \ldots , (Y_N, X_N) $. Statistical inverse problems extend {\it classical inverse problems} \citep[the reconstruction of an entity using indirect observations, see fore example][]{Englbook,Helgasonbook} by including noise in the model (in our case $\varepsilon_n$). Naturally arising in different settings, statistical inverse problems have been studied extensively in tomography, deconvolution or the heat equation, to name just a few \citep[see][and references therein]{cavalier2008,bissantz2008}. Since our subsequent discussion is exclusively concerned with statistical inverse problems, we will for brevity just refer to them as "inverse problems" without qualifications. By definition, these problems involve a regularization method to reconstruct an unobservable quantity (in our case the operator $S$), which implies a trade-off between an increased bias for low regularizations and an increased variance for high regularizations. The study of functional linear regression and the associated slope reconstruction has been a feature of FDA for more than two decades \citep[see, for example the monograph of][]{Ramsaybook}. Early work has its focus on the scalar response model \begin{equation} \label{functions_on_regressors} Y_n = \int_0^1 \varphi_S(t) X_n(t) dt + \varepsilon_n~, \end{equation} which is a special case of \eqref{model_1}, where $H_1=L^2[0,1]$, the space of square integrable functions, $H_2= {\mathbb R}$ and $S: L^2[0,1] \to {\mathbb R}$ is an integral operator with square integrable kernel $ \varphi_S$. Such a model captures the relation between a regressor function and an economic or scientific key figure, as they often occur in practical applications. For the investigation of scalar response models, we refer the interested reader for instance to \cite{cardot2003}, \cite{hall2007}, \cite{yuan2012} and the references therein. In \cite{hall2007} convergence rates for spectral cut-off estimators are investigated with respect to the $L^2$-norm and it is shown that these estimators are minimax optimal under adequate regularization. Generalizations of these results to functional linear regression with functional responses can be found xxx in a more recent work by \cite{masaaki2017}. Similarly, \cite{benatia2017} have investigated theoretical and practical aspects of Tikhonov regularizations in the estimation of the slope parameter (with a focus on $L^2$-minimax rates). Besides the study of $L^2$-rates other aspects of model \eqref{model_1} have been investigated in a wide variety of works, such as consistency under weak dependence in a white noise model \citep[see][]{hoermann2012}, aspects of identifiability \citep[see][]{scheipl2016}, minimax rates for prediction \citep[see][]{crambes2013} and robust estimation \citep[see][]{shin2016}. The list of cited references is by no means complete and only comprises a fraction of the larger body of research in this domain. Besides estimation and prediction, the functional regression model has attracted attention in terms of statistical inference. In particular the "exact hypothesis" of testing $H_0:S=S_0$ vs. $H_1: S \neq S_0$ (see Section \ref{Subsection_relevant_hypothesis}) has been much investigated. It turns out that this hypothesis can be examined via $\sqrt{N}$-consistent tests, which are based on the comparison of smoothed versions of $S$ and $S_0$ (see e.g. \cite{cardot2003, cardot2004}). Importantly such tests do not have to solve the inverse problem of reconstructing $S$, which makes them mathematically more parsimonious, but somewhat difficult to interpret for users (for more details on this point see Section \ref{Subsection_relevant_hypothesis}). As a consequence attention has recently shifted to inference methods, based on direct comparison of $S$ and $S_0$, to make the estimated deviations statistically more meaningful. For example, in the functional linear model \eqref{functions_on_regressors} with scalar response \cite{kato2019} have developed confidence bands that cover the slope function at most of points with a prespecified probability. Other authors use Gaussian approximations to develop confidence bands. For example, \cite{babii2020} construct honest confidence bands for the regression function in a nonparametric instrumental variable regression using Tikhonov regularization. Besides confidence bands other approaches have been investigated, such as studying the supremum of $\int_0^1 \varphi_S(t) x(t) dt $, with $x \in L^2[0,1]$ on a slowly growing set of finite dimensional spaces, which approximately equals the supremum of a Gaussian process \citep[see][]{leung2021}. However, due to the regularization-variance trade-off the convergence speed in all of these procedures is significantly slower than $1/\sqrt{N}$. \end{comment} \begin{comment} One major hurdle in construction tests consists in the lack of convergence of common functional estiamtors $\hat S_N$ for $S$ (such as constructed by spectral truncation of Tikhonov regularization). This result was proved in \cite{cardot2007} for scalar response models and generalized to models with functional responses by \cite{crambes2013} (as well as recently \cite{benatia2017}). \textcolor{red}{\bf es gibt natuerlich auch eine ganze Menge zum Testen $S=S_0$, das wir hier zitieren sollten (siehe meine Email und auch Seite 10). Dann ist der letze Satz evtl. nicht ganz korrekt!} One reason for this is the observation that in the general functional linear model \eqref{functions_on_regressors} the (asymptotic) distributional of estimators of $S$ are not available. \textcolor{red}{\bf Hier \cite{cardot2007} einbauen, kurz beschreiben, was gemacht wird} Indeed, for the spectral cut-off estimator, say $\hat S_N$, \cite{crambes2013} demonstrate, that it is in principle impossible to derive a weak convergence result for the difference $S-\hat S_N$, no matter how it is scaled. A similar conclusion was reached by \cite{benatia2017} for estimators based on Tikhonov regularization. In particular, these authors derived weak convergence for asymptotically biased estimators, as a vanishing bias implies an exploding variance. The absence of a central limit theorem for $\hat S_N$ has been a major hurdle for statistical inference in both cases. \change{On the other hand, some progress in statistical inference for the slope operator $S$ has been made recently. For example, in the functional linear model \eqref{functions_on_regressors} with a scalar response \cite{kato2019} develop confidence bands that cover the slope function at most of points with a prespecified probability. Other authors use Gaussian approximations to develop confidence bands. For example, \cite{babii2020} construct honest confidence bands for the regression function in a nonparametric instrumental variable regression using Tikhonov regularization. Besides confidence bands other approaches have been investigated, such as studying the supremum of $\int_0^1 \varphi_S(t) x(t) dt $, with $x \in L^2[0,1]$ on a slowly growing set of finite dimensional spaces, which approximately equals the supremum of a Gaussian process \citep[see][]{leung2021}. However, due to the regularization-variance trade-off the convergence speed is significantly slower than $1/\sqrt{N}$. \textcolor{red}{{\bf evtl noch einbauen?} In Theorem 3.4 in Hao, Liu, Xu, Zhao (2020, JASA), Semiparametric Inference for the Functional Cox Model, gibt es ein Resultat zur Prozesskonvergenz! Warum geht das da? Koennte passen im Abschnitt ueber Func Daten als Beispiel aktuelle Research Themen} } \textcolor{red}{{\bf Vermutlich haben \cite{cardot2007} hier auch schon etwas gemacht - bitte entsprechend einarbeiten!} The related problem of inference for the predictive properties of $S$ has already been addressed in \cite{crambes2013}.} These authors demonstrate for i.i.d.\ data the existence of a standardizing sequence, say $a_N$, depending only on the sample size and the regularization parameter, such that \begin{equation} \label{mas_convergence_Undef_Norma} a_N (\hat S_N X-SX) \to G~, \end{equation} where $G$ is a Gaussian process on $H_2$, with the covariance structure of the error $\varepsilon_1$ and $X$ is an independent copy of $X_1$. The presence of a central limit theorem shows the more benign nature of the predictive setting. Nevertheless the problem is still inverse as testified by the fact that $a_N$ grows slower than $\sqrt{N}$. The weak convergence \eqref{mas_convergence_Undef_Norma} can be employed to construct predictive confidence regions in an $L^2$-sense. Still, as we will discuss in Remark \ref{remark_1}, the convergence to $G$ is somewhat slow and the variance is underestimated for finite samples, such that more likely than not corrections need to be taken into consideration. We contribute to this discussion by providing a new method for statistical inference in the linear model \eqref{model_1}. Our inference concerns the two deviation measures $\vvvert S-S_0 \vvvert^2$ (the distance in Hilbert--Schmidt norm) and ${\mathbb E}\| SX-S_0X \|^2$ (the expected prediction error), where $S_0$ is a hypothesized operator. \change{ Despite the absence of functional central limit theorems for estimators of the slope $S$ (see \cite{cardot2007}, \cite{crambes2013}), we establish asymptotic normality of the estimated deviation measures, by virtue of novel stochastic lineariaztions. We therefore employ a natural smoothing effect of the Hilbert--Schmidt norm, which yields the parametric convergence rate of $1/\sqrt{N}$ for our statistics, implying fast detection of local alternatives. Our methodology is applicable under weak dependence assumptions, quantified e.g.\ by $\phi$- or $\alpha$-mixing and therefore suitable to the study of functional time series. A direct application of our weak convergence results for statistical inference such as the construction of hypothesis tests or confidence intervals for $\vvvert S-S_0 \vvvert^2$ and ${\mathbb E}\| SX-S_0X \|^2$ is theoretically possible, but practically difficult, because it requires the estimation of asymptotic (long-run) variances. This estimation is intricate in inverse problems even for i.i.d. data and becomes even more difficult in the case of dependent data (e.g. see Proposition \ref{proposition_1} for a presentation of the long-run variance $\tau^2$). To evade these problems we investigate sequential versions of our estimators, prove an invariance principle and use the concept of self-normalization \citep[see, for example,][]{shao2015,DetKokVol20} to construct (asymptotically) pivotal estimates of these deviation measures. Besides the specification of a regularization level in the reconstruction of $S$ (which is unavoidable in inverse problems) our methodology does not involve any nuisance parameters, typical in the study of dependent data, such as the choice of the block-length in bootstrap \citep[see, for example,][]{kunsch1989,poliroma1994,bucher2013} or a bandwidth in the estimation of a long-run covariance \citep{Horvath2011, Kokoszka2012}, making it particularly user-friendly. The rest of this paper is organized as follows: First, in Section~\ref{Section_estimation}, we discuss the linear model in detail and construct the spectral cut-off estimator $\hat S_N$ for $S$. Next, in Section~\ref{sec3} we present statistical inference for the reconstruction and in Section~\ref{sec4} inference for the expected prediction error. Then, in Section~\ref{sec5} we propose extensions of the methodology to two sample and change point scenarios, while in Section~\ref{sec6} we investigate finite sample properties by virtue of a simulation study. Finally, the Appendix contains the technical proofs and mathematical details. } \section{Estimation of the slope parameter} \label{Section_estimation} \label{sec2} \change{ In this Section we introduce the mathematical set-up for estimation in the functional linear regression model \eqref{model_1}. We begin by first recalling some basic facts about Hilbert--Schmidt operators and secondly introducing some notation concerning outer products, that will be used throughout this paper. Subsequently we explain the necessity of regularization for estimating the slope $S$ and discuss the ensuing variance-regularization trade-off. } \end{comment} \section{Estimation of the slope parameter} \label{sec2} In this Section we introduce the mathematical set-up for estimation in the functional linear regression model \eqref{model_1}. We begin by recalling some basic facts about Hilbert--Schmidt operators and continue with a discussion of the estimation problem of the slope $S$ in the functional linear model. In particular, we explain the necessity of regularization and discuss the ensuing variance-regularization trade-off. \subsection{Operators on Hilbert spaces} \label{Subsection_Operators} Throughout this paper we treat functional observations as elements of Hilbert spaces. Thus before we proceed to the statistics, we recall some fundamental aspects of operator theory on Hilbert spaces. For a more detailed overview we recommend the monographs of \cite{HorKokBook12} (with particular emphasis on functional data) as well as \cite{WeidmannBook80}. \\ Suppose two generic Hilbert spaces $(\mathcal{H}_1, \langle, \rangle_1)$ and $(\mathcal{H}_2, \langle, \rangle_2)$ are given. The corresponding norms on the spaces are denoted by $\|\cdot\|_i$, for $i=1,2$. The space $\mathcal{L}(\mathcal{H}_1, \mathcal{H}_2)$ consists of all linear operators $L:\mathcal{H}_1 \to \mathcal{H}_2$, satisfying $$ \vvvert L\vvvert_\mathcal{L} := \sup_{\|x\|_1 = 1} \|L x\|_2 < \infty. $$ The norm $\vvvert \cdot \vvvert_\mathcal{L}$ is referred to as operator or spectral norm. Recall that all operators with bounded spectral norm are also continuous. An important subclass of $\mathcal{L}(\mathcal{H}_1, \mathcal{H}_2)$ is given by the compact operators, i.e., such operators $L$ which map the unit ball in $\mathcal{H}_1$ to a totally bounded set in $\mathcal{H}_2$. In the special case where $\mathcal{H}_1=\mathcal{H}_2$ and the operator $L$ is both compact and symmetric, $L$ can - according to the spectral theorem for normal operators - be diagonalized, in the sense that for any $x \in \mathcal{H}_1$ \begin{equation} \label{spectral_decomposition} L x = \sum_{n \in {\mathbb N} } \eta_n \langle f_n, x \rangle_1 f_n, \end{equation} where $\eta_1, \eta_2,... \in {\mathbb R}$ are the eigenvalues and $f_1, f_2,... \in \mathcal{H}_1$ the corresponding eigenvectors of $L$. In the context of functional spaces the eigenvectors are usually referred to as eigenfunctions. The most restrictive class of operators, that we consider in this paper consists of the {Hilbert--Schmidt operators}. This subspace of $\mathcal{L}(\mathcal{H}_1, \mathcal{H}_2)$ denoted by $\mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$ consists of all linear operators $L$, which satisfy $$ \vvvert L \vvvert := \sum_{n \in {\mathbb N}} \|L f_n \|_2^2 <\infty, $$ where $\{f_n\}_{n \in {\mathbb N}}$ is some orthonormal basis (ONB) of $\mathcal{H}_1$. The value of the norm is independent of the basis. Notice that $\vvvert L \vvvert< \infty$ directly entails compactness and hence boundedness w.r.t.\ the operator norm. The norm $\vvvert \cdot \vvvert$ is called {Hilbert--Schmidt norm} and is the infinite-dimensional analogue of the Frobenius norm. Just as the Frobenius norm it is induced by an inner product, which for two operators $L, T \in \mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$ is given by $$ \langle L, T \rangle := \sum_{n \in {\mathbb N}} \langle L f_n, T f_n \rangle_2, $$ where again the value of the inner product (on the left hand side) does not depend on the choice of basis. Equipped with this inner product the linear space $\mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$ becomes itself a Hilbert space. Finally we introduce the outer product of two elements in $\mathcal{H}_1, \mathcal{H}_2$. For any $f \in \mathcal{H}_1$, $g \in \mathcal{H}_2$ we define the linear operator $g \otimes f \in \mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$, pointwise by \be \label{Eq_DefTensProd} g \otimes f [h] := g \langle f, h \rangle_1 \quad \quad \forall h \in \mathcal{H}_1. \end{equation} By virtue of this definition it is possible to endow $\mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$ with a particularly natural basis: If $\{f_n\}_{n \in {\mathbb N}}, \{g_n\}_{n \in {\mathbb N}}$ are ONBs of $\mathcal{H}_1$, $\mathcal{H}_2$ respectively, then the set $\{g_n \otimes f_m\}_{ n,m \in {\mathbb N} }$ is an ONB of $\mathcal{S}(\mathcal{H}_1, \mathcal{H}_2)$. Finally, we notice that the outer product notation can be used to restate the spectral theorem for a compact, symmetric operator $L$ in \eqref{spectral_decomposition} as follows $$ L= \sum_{n \in {\mathbb N} } \eta_n f_n \otimes f_n. $$ In the next step we bring to bear these notations to the analysis of the functional regression problem \eqref{model_1}. \subsection{The functional linear model} \label{Subsection_linear_model} In this Section we introduce the functional, linear regression model \eqref{model_1} in a more rigorous way. Let $\mathcal{T} \subset {\mathbb R}^d$ denote a compact and non-empty set and $\mu_1$, $\mu_2$ measures defined on some $\sigma$-algebra on $\mathcal{T}$. Furthermore define $H_1:= (L^2(\mathcal{T}), \mu_1)$ and $H_2:= (L^2(\mathcal{T}), \mu_2)$ as the spaces of all measurable, real-valued functions on $\mathcal{T}$, that are square integrable w.r.t.\ $\mu_1$ and $\mu_2$, respectively. Equipped with the inner products $$ \langle f, g \rangle := \int_\mathcal{T} f(t) g(t) d \mu_i(t) \quad \quad f,g \in H_i ~~~~(i=1,2) $$ $H_1$ and $H_2$ are Hilbert spaces. Notice that the inner product $\langle f, g \rangle $ depends on the index $i=1,2$, but for the sake of simplicity we do not make this explicit. Accordingly, the norms induced by the inner products are denoted by $\|\cdot \|$. This general setup includes many of the standard scenarios treated in the related literature. For instance to retrieve the model \eqref{functions_on_regressors} with functional regressors and scalar responses \citep[see][]{hall2007} it suffices to set $\mathcal{T}=[0,1]$, $\mu_1= \lambda$ (the Lebesgue measure) and $\mu_2= \delta_1$ (the Dirac measure at the point $1$). Another typical setting is to choose both measures as the Lebesgue measure, which gives functional inputs and outputs \citep[see, for example,][among many others]{yao2005}. Further important non-standard cases such as spatio-temporal functions with continuous time and discrete space components \citep[see][]{constantinou2015} can be accommodated as well. Let $(X_1, Y_1),\ldots , (X_N, Y_N)$ denote $N$ observations from a time series $\{ (X_n, Y_n) \}_{n \in {\mathbb Z}} \subset H_1 \times H_2$, which are generated according to the linear model \eqref{model_1}, that is \begin{align} \label{hd1} Y_n = S X_n + \varepsilon_n \qquad n=1,...,N, \end{align} where $ S \in \mathcal{S}(H_1, H_2)$ denotes the (unknown) slope parameter and $\varepsilon_n \in H_2$ an observational error. By virtue of the outer product (see Section~\ref{Subsection_Operators}) it is possible to transform this linear model into a version, which is more suitable to inference about the slope parameter. More precisely, ``multiplying'' \eqref{hd1} by $X_n$ from the right gives \begin{equation} \label{model_2} Y_n \otimes X_n = SX_n \otimes X_n + \varepsilon_n \otimes X_n \quad \quad n=1,...,N. \end{equation} Under the assumption ${\mathbb E} \|X_n\|^2, {\mathbb E} \|\varepsilon_n\|^2 <\infty$ the operators $ SX_n \otimes X_n , \varepsilon_n \otimes X_n$ are random elements in $\mathcal{S}(H_1, H_2)$. Moreover, if the random functions $X_n, \varepsilon_n$ are also centered, taking expectations on both sides of \eqref{model_2} gives \begin{equation} \label{equation_expectation} \mathbb{E} Y_n \otimes X_n = S \Gamma+{\mathbb E} \varepsilon_n \otimes X_n. \end{equation} Here $\Gamma := \mathbb{E} X_n \otimes X_n$ is the covariance operator of $X_n$ (recall that the sequence $\{ X_n\} _{n\in {\mathbb N}} $ of regressors is stationary). Note that we merely assume centered regressors for ease of presentation and adaption to the non-centered case is simple (for details see Remark~\ref{remark_centering}). Under the additional assumption of weak exogeneity, i.e., ${\mathbb E} \varepsilon_n \otimes X_n=0$, equation \eqref{equation_expectation} entails the fundamental identity \begin{equation} \label{inverse_characterization} \mathbb{E} Y_n \otimes X_n = S \Gamma. \end{equation} The task of recovering the operator $S$ from equation \eqref{inverse_characterization} is non-trivial, even if we knew the ``true'' expectation $S \Gamma = \mathbb{E} Y_n \otimes X_n$ and the covariance operator $\Gamma$. One obvious condition for a complete recovery of $S$ is identifiability, which is satisfied, if $\Gamma$ is an injective operator. However, even in this case, as $\Gamma$ is compact, its inverse must be unbounded and hence can only be defined on a dense linear subspace. We refer the interested reader to \cite{DunSchBookPart1} and \cite{WeidmannBook80} for a detailed discussion of (un)bounded operators. A remedy for this problem is given by the application of a regularized inverse, i.e.\ a sequence of continuous operators $\{\Gamma^\dagger_k\}_{k \in {\mathbb N}}$, converging pointwise to $\Gamma^{-1}$. Of course this means that $\vvvert \Gamma^\dagger_k \vvvert_\mathcal{L} \to \infty = \vvvert \Gamma^{-1} \vvvert_\mathcal{L}$, but for each finite $k$ the operator $S \Gamma \Gamma^\dagger_k$ is well defined on the whole space. Moreover, for sufficiently large $k$ we expect that $S \approx S \Gamma \Gamma^\dagger_k$ in the sense that $\vvvert S - S \Gamma \Gamma^\dagger_k \vvvert$ becomes arbitrarily small. Let $$ \Gamma := \sum_{i=1}^\infty {\lambda_i} e_i \otimes e_i, $$ denote the spectral decomposition of the operator $\Gamma$, with eigenvalues $\lambda_1 \ge \lambda_2 \ge ... > 0$ and corresponding eigenfunctions $e_1, e_2,...$. A typical example of a regularized inverse operator is given by the spectral cut-off regularizer $$ \Gamma^\dagger_k := \sum_{i=1}^k \frac{1}{\lambda_i} e_i \otimes e_i, $$ which evidently has operator norm $\vvvert \Gamma^\dagger_k \vvvert_\mathcal{L} = \lambda_k^{-1}< \infty$. We also point out that $ \Gamma \Gamma^\dagger_k =: \Pi_{ k }$, where $\Pi_{ k }$ is the projection on the space spanned by the first $k$ eigenfunctions $e_1,...,e_k$ of $\Gamma$. Notice that, if this was the whole problem, we could simply choose a large, but finite $k$ and receive an arbitrarily precise approximation of $S$ via $S \Gamma \Gamma^\dagger_k$. However, in practice neither the true expectation ${\mathbb E} Y_n \otimes X_n$, nor the true covariance operator $\Gamma$ are known and have to be estimated from the data. For this purpose we define \begin{equation} \label{h2} \hat \Gamma_N := \frac{1}{N} \sum_{n=1}^N X_n \otimes X_n \quad \end{equation} as the standard estimate of the covariance operator $\Gamma$ and $ \frac{1}{N} \sum_{n=1}^N Y_n \otimes X_n$ as estimate of ${\mathbb E} Y_n \otimes X_n$. This gives an empirical analogue of equation \eqref{inverse_characterization}, that is \begin{equation} \label{h1} \frac{1}{N} \sum_{n=1}^N Y_n \otimes X_n = S \hat \Gamma_N + U_N , \end{equation} where \begin{equation} \label{def_U} \quad U_N := \frac{1}{N} \sum_{n=1}^N \varepsilon_n \otimes X_n \end{equation} is a remainder term, arising from \eqref{model_2}. Note that the identity~\eqref{h1} provides a way of estimating $S \Gamma$. We define the empirical version of the regularized inverse by \begin{equation} \label{h3} \hat \Gamma^\dagger_k := \sum_{i=1}^{k } \frac{1}{ \hat \lambda_i} \hat e_i \otimes \hat e_i, \end{equation} where $\hat \lambda_1 \ge \hat \lambda_2 \ge ... \ge 0$ are the ordered eigenvalues of $\hat \Gamma_N$ and $\hat e_1, \hat e_2,...$ the corresponding eigenfunctions. An estimator of the operator $S$ is now given by \begin{equation} \label{h4} \hat{S}_N := \frac{1}{N} \sum_{n=1}^N Y_n \otimes X_n \hat \Gamma_k^\dagger = S \hat \Gamma_N \hat \Gamma^\dagger_k + U_N \hat \Gamma^\dagger_k = S \hat \Pi_{ k } + U_N \hat \Gamma^\dagger_k~, \end{equation} where $\hat \Pi_{ k }$ is the projection on the subspace spanned by the the first $k$ eigenfunctions of the empirical covariance operator $\hat \Gamma_N$. This equation differs notably from the ideal $ S \Gamma \Gamma^\dagger_k = S \Pi_{ k } $ by the noise term $ U_N \hat \Gamma^\dagger_k$ (which makes it a statistical inverse problem; see the discussion in the introduction). If $k$ is large compared to $N$ this remainder can potentially spoil the estimate, because the noise $U_N$ is amplified by the regularized inverse $\hat \Gamma^\dagger_k$. Consequently the solution of the inverse problem as described in model~\eqref{model_2}, features a trade-off between regularization parameter $k$ and sample size $N$. \begin{comment} For illustrative purposes, consider the situation where $k \in {\mathbb N}$ is fixed and the sample size $N$ diverges to infinity. In this case the noise term vanishes and we get from \eqref{h4} $ S \hat \Gamma_N \hat \Gamma^\dagger_k + U_N \hat \Gamma^\dagger_k \approx S \Gamma \Gamma^\dagger_k = S \Pi_{ k } $. Consequently, the accuracy of recovery of $S$ is limited by the size of $k$ and in general $\hat S_N$ is not a consistent estimator for $S$. On the other hand, if $N$ is fixed and $k \to \infty$, the variance of the estimator $\hat S_N$ is amplified ever more. In this situation we encounter nothing but noise, because the inflated error term dominates the estimate. Hence to guarantee successful estimation (and inference) a careful choice of regularization depending on the sample size is necessary. \end{comment} As a corollary of our later discussion we will get a consistency result for $\hat S_N$ under suitable regularity conditions. For works specifically aimed at reconstructing the operator $S$ see, for instance, \cite{hall2007}, \cite{benatia2017} and \cite{masaaki2017}. \section{Statistical inference for the location of $S$} \label{sec3} In this section we introduce the concept of relevant hypotheses for the location of $S$ and discuss the assumptions that are made throughout this paper. Furthermore we revisit the problems in deriving a weak convergence result for the estimator $\hat S_N$ as described in \cite{cardot2007}, \cite{crambes2013} and suggest a new technique - the smoothness shift - to grapple with them. Based on this idea, we establish an invariance principle for the estimated distance $\vvvert \hat S_N-S_0 \vvvert^2$, which is used to develop pivotal statistics for testing relevant hypotheses. \subsection{Relevant differences in the slope} \label{Subsection_relevant_hypothesis} A typical concern in the context of model \eqref{model_1} is the comparison of the true slope $S$ with some hypothesized operator $S_0 \in \mathcal{S}(H_1, H_2)$. This problem is often addressed by constructing statistical tests for the hypotheses \begin{align} \label{hd2} H_0: S=S_0 \quad {\rm versus } \quad H_1 : S \not = S_0 ~. \end{align} These hypotheses may for instance be used with $S_0 = 0$, to determine the explanatory power of the model, or with a slope $S_0$ from a theoretical model. Various tests have been devised for these (or related) hypotheses, such as in \cite{cardot2003b, cardot2004}, where the cross covariance operator $\mathbb{E}Y_1 \otimes X_1= S \Gamma$ is used to test the mathematically equivalent null hypothesis $S \Gamma = S_0 \Gamma$. In a similar spirit \cite{hilgertetal2010} propose minimax optimal adaptive tests based on projections of $Y$ onto the principal components of $\Gamma$ or \cite{kong2016} employ traditional tests (such as the $F$-test) on finite dimensional subspaces, to validate model fit. \\ Although from a decision theoretical perspective all of these methods define consistent tests for the hypotheses \eqref{hd2}, they have the drawback of telling us little about the actual proximity of the operators $S$ and $S_0$. For example a test for $H_0$, based on the quantity $\vvvert S \Gamma - S_0 \Gamma \vvvert$ is difficult to interpret, as $\vvvert S \Gamma - S_0 \Gamma \vvvert$ may be arbitrarily small, while in fact the true difference $\vvvert S- S_0\vvvert$ is arbitrarily large. In particular if a user decides to perform data analysis under the assumption $S=S_0$ after a test has not rejected the hypothesis $S \Gamma = S_0 \Gamma $, there is no guarantee that $S_0$ is indeed a good approximation of $S$. This insight has motivated some of the contemporary approaches to confidence regions for $S$ (see the discussion in the introduction), where even a slower than parametric convergence rate is accepted, in return for an inference method, based on the original slope operator $S$.\\ In this paper we take up this insight and base statistical inference directly on the measure $\vvvert S- S_0\vvvert$. Evidently the point hypothesis in \eqref{hd2} is equivalent to $\vvvert S- S_0\vvvert =0$. However in this work, we want to investigate the ``relevant hypotheses'', given by \begin{eqnarray} \label{relevant_difference} &&H_0^\Delta: \vvvert S-S_0\vvvert ^2 \le \Delta \quad {\rm versus } \quad H_1^\Delta: \vvvert S-S_0\vvvert ^2 > \Delta, \\ \text{and} ~~~~~~~~~~~~~~\nonumber &&\\ \label{equiv} && H_0^{\tilde \Delta}: \vvvert S-S_0\vvvert ^2 \ge \tilde \Delta \quad {\rm versus } \quad H_1^{\tilde \Delta}: \vvvert S-S_0\vvvert ^2 < \tilde \Delta, \end{eqnarray} where $\Delta>0$ and $\tilde \Delta>0$ are predetermined thresholds. Our suggestion to replace the ``classical'' hypotheses in \eqref{hd2} by hypotheses of the form \eqref{relevant_difference} or \eqref{equiv} has theoretical as well as practical reasons.\\ From a theoretical perspective, testing exact equality of $S$ and $S_0$ (both of which are infinite dimensional objects) might be questionable, because it is rarely believed that the hypothesized slope coincides perfectly with the true one. Therefore, testing $H_0$ means testing a hypothesis, which is essentially known to be false. This point is important, because any consistent test will detect any arbitrarily small deviation from $H_0$ if the sample size is sufficiently large \citep[see][]{berkson1938} and thus we expect any consistent test for $H_0$ to eventually reject the hypothesis. This problem is evaded by the consideration of relevant hypotheses~\eqref{relevant_difference}, which only refer to sufficient proximity of $S$ and $S_0$. \\ We also believe that the relevant hypotheses are more congruent with common interests of users, who are less concerned with perfect equality than with the practical issue of comparable performance. Often users are willing to trade - at least to some extend - statistical precision for a simpler model. In this sense the thresholds $\Delta, \tilde \Delta$ in the relevant hypotheses can be understood as the largest deviation between $S$ and $S_0$, which is still acceptable for the user. This also highlights that the choice of the threshold will depend on the application in hand and is not an a priori question. Finally we point out that a formulation of the hypotheses in the form \eqref{equiv} might be preferred if one is interested to work under the assumption $S=S_0$. If the null hypothesis $H_0^{\tilde \Delta}$ is rejected at level $\alpha$, the risk of erroneously assuming $\vvvert S-S_0\vvvert ^2 \le \tilde \Delta$, is controlled, which is not possible using the ``classical'' hypotheses in \eqref{hd2}, because there is no symmetry in the problem.\\ Although the hypotheses~\eqref{relevant_difference} and \eqref{equiv} are different with respect to their statistical interpretation it will become clear later that from a mathematical point of view they are in some sense equivalent. Therefore, and also for the sake of brevity, we restrict ourselves to the development of testing procedures for the hypotheses in \eqref{relevant_difference} and denote the null hypothesis as ``no relevant deviation from $S_0$''. \subsection{Assumptions}\label{Subsection_assumptions} The theoretical results of this paper require several assumptions, which are explained and illustrated in this section. Recall that a stationary sequence $\{Z _j\}_{j\in {\mathbb Z}}$ of random variables is called $\phi$-{mixing}, if $\lim_{k \to \infty }\phi(k) =0$, where \begin{align*} \phi(k) :=& \sup_{h \in {\mathbb Z}} \sup\big \{ {|\mathbb{P}(F| E)} - \mathbb{P}(F)| \, : \, E \in \sigma(Z _1,\ldots ,Z _h) , F \in \sigma(Z_{h+k},Z_{k+h+1}, \ldots ) , ~\mathbb{P}(E)>0 \big \}. \end{align*} denotes the { $\phi$-dependence coefficients} and $\sigma(Z _h,...,Z _k), $ is the $\sigma$-algebra generated by $Z _h,\ldots ,Z _k$ \citep[see for instance][]{dehling}. \begin{assumption} \label{ass31} ~~\\ {\rm (1) \textit{Smoothness:} For some $\beta \ge 0$ the operators $S$ and $S_0$ are elements of the smoothness class $$ \mathcal{C}(\beta,\Gamma):=\big\{R \Gamma^{\beta}: R \in \mathcal{S}_2(H_1, H_2) \big\}. $$ (2) \textit{Moments:} There exists some $\kappa>0$, such that ${\mathbb E} \|X_1\|^{4+\kappa}$, ${\mathbb E} \|\varepsilon_1\|^{4+\kappa}<\infty$. \\ (3) \textit{Dependence:} The sequence of random functions $\{(X_n, \varepsilon_n)\}_{n \in {\mathbb Z}}$ is centered, strictly stationary and $\phi$-mixing, such that $$\phi(1)<1 ~~ \text{ and } ~~\sum_{h \ge 1} \sqrt{\phi(h)}<\infty $$ (4) \textit{Coefficients}: There exists a finite constant $C>0$, s.t.\ the inequality ${\mathbb E} | \langle X_1, e_j \rangle|^4 \le C ({\mathbb E} | \langle X_1, e_j \rangle|^2)^2$ holds for any $j \in {\mathbb N}$. (5) \textit{Weak exogeneity:} ${\mathbb E} \varepsilon_1 \otimes X_1=0$. (6) \textit{Decay of eigenvalues and eigengaps:} For some $ \SM >0$ and large enough $C >0$, the eigenvalues of the covariance operator $\Gamma$ satisfy $$ \lambda_k \le C k^{-{\SM}} \quad \quad \textnormal{and} \quad \quad \lambda_k-\lambda_{k+1} \ge C^{-1} k^{-{\SM}-1} \quad \forall k \in {\mathbb N}. $$ (7) \textit{Rates of regularization:} The regularization parameter $k=k(N)$ is chosen such that for some $\delta>0$ $$ \frac{k^{\SM+1+\delta}}{\sqrt{N}} \to 0 \quad \quad \textnormal{and} \quad \quad \frac{k^{\SM \beta}}{\sqrt{N}} \to \infty. $$ } \end{assumption} \begin{rem} \label{rem1} ~~ \\ {\rm (a) Assumption~(1) is a smoothness condition on the slope operators $S, S_0$, w.r.t.\ the principal components of $\Gamma$. To see this let $S = R\Gamma^\beta$ and $x \in H_1$. It follows that $ S x = R \Gamma^\beta x = R y, $ where $y= \sum_{r \in {\mathbb N}} e_r (\lambda_r^\beta \langle x, e_r \rangle) $. Evidently the $L^2$-coefficients $(\lambda_r^\beta \langle x, e_r \rangle)$ of $y$ decay faster than those of $x$, as they are weighted by a power of the decaying eigenvalues. In this sense $y$ is smoother than $x$ and a larger value of $\beta$ translates into lighter coefficients and thus more smoothing. In this way $Sx$ can be understood as the application of an integral operator $R$ to a smoothed version of $x$. Assumption \ref{ass31}(1) was also considered in \cite{benatia2017} in their study of the Tikhonov regularization, where it was denoted by the common label of {\it source condition}. At the beginning of their Section~3 the smoothing effect of $\Gamma^\beta$ is explored by various examples.\\ In the following calculations we demonstrate that Assumption \ref{ass31}(1) can be translated into {\it fast decaying tails} of the operator $S$ '', which is another standard way of stating smoothness in the literature. Consider the application of $R$ to a basis function $e_q$ of $\Gamma$ $$ R e_q = R \Gamma^{ \beta} \Gamma^{- \beta} e_q = S \Gamma^{- \beta} e_q. $$ Notice that $\Gamma^{- \beta} e_q= \lambda_q^{-\beta} e_q$ is indeed well defined. We can now express $R e_q $ as $$ R e_q=S\Gamma^{-\beta} e_q =\Big[ \sum_{i,j \in {\mathbb N} } s_{i,j} e_i \otimes e_j \Big] \Big[ \sum_{k\in {\mathbb N}} \lambda_k^{-\beta} e_k \otimes e_k \Big] e_q = \sum_{i\in {\mathbb N}} s_{i, q} \lambda_q^{-\beta} e_i , $$ where $s_{i,j} := \langle S, e_i \otimes e_j \rangle$ (with the inner product on the space of Hilbert--Schmidt operators, see Section ~\ref{Subsection_Operators}). Now the squared Hilbert--Schmidt norm of $R$ equals \begin{align} \nonumber \infty>\vvvert R \vvvert^2=&\sum_{q \in {\mathbb N}} \langle Re_q, R e_q \rangle =\sum_{q \in {\mathbb N}} \langle \sum_{i \in {\mathbb N}} s_{i,q} \lambda_q^{-\beta} e_i, \sum_{l \in {\mathbb N}} s_{l,q} \lambda_q^{-\beta} e_l \rangle = \sum_{q,l \in {\mathbb N}} \lambda_q^{-2\beta} s_{l,q}^2 \\ =& \sum_{q,l \in {\mathbb N}} \lambda_q^{-2\beta} \langle S e_q, e_l \rangle^2 = \sum_{q \in {\mathbb N}} \lambda_q^{-2\beta} \|S e_q\|^2 , \label{hd4} \end{align} where we have used Parseval's identity in the last step. In the scalar response model \eqref{functions_on_regressors} one has $\|S e_q\|^2 = \langle \varphi_S, e_q \rangle^2$. Thus the summability in \eqref{hd4} is a smoothness condition for $\varphi_S$. In this form it has been used by \cite{hall2007} (see equation~(3.3) in that paper). In the more general model \eqref{model_1} the decay of $\|S e_q\|^2 $ was considered as a smoothness condition in \cite{crambes2013} (see their Definition~3). \medskip (b) Assumptions~\ref{ass31}(2) - (5) are required to derive a weak convergence result stated in Theorem~\ref{theorem_1}. The existence of moments of larger order than $4$ is typical for proving second order, weak invariance principles \citep[it corresponds to the assumption of more than second moments for the first order; see][]{berkes2013}. The mixing assumption is weaker than those in the related literature, where almost exclusively i.i.d.\ observations are considered, \citep[see][among others]{hall2007, crambes2013, benatia2017, kato2019, babii2020}. Assumption \ref{ass31}(4) regarding the moments of the coefficients $\langle X_1, e_j \rangle $ is standard in the literature \citep[see for example][]{hall2007, crambes2013, kato2019} and is needed for technical reasons. We use it in the proof of Lemma \ref{Lem_Bounds-NonSmoothed-Var-and-Bias-of-S_N}, part ii). Assumption \ref{ass31}(5) regarding the exogeneity is again weaker than in most of the literature. Here often strong exogeneity is required (see the literature cited before), where the work of \cite{benatia2017} constitutes an important exception. \medskip (c) Assumption \ref{ass31}(6) guarantees a polynomial decay rate for the eigenvalues of $\Gamma$, that is $\lambda_k \sim k^{-\SM}$. More important than the precise rate of decay is the assumption on the eigengaps, which have to be controlled for identifiability reasons. Assumptions of this type are standard in the literature, in particular in the analysis of spectral cut-off estimators \citep[see,][among others]{hall2007,qiao2018functional}, even though they are sometimes made implicitly \citep[see Lemma~12 in][]{crambes2013}. \\ The two decay rates in Assumption \ref{ass31}(7) expose the trade-off inherent in the choice of $k$. On the one hand $k$ has to increase slowly enough, such that the $k$-th eigenvalue $\lambda_k$ can be distinguished from $\lambda_{k+1}$. This means that the $k$-th eigengap of size $k^{-\SM-1}$ is of larger order than the estimation error of size $1/\sqrt{N}$. Our assumption is almost sharp in the sense that we assume $k^{\SM+1}/\sqrt{N}$ to decay at some arbitrarily slow polynomial rate in $N$. We use this additional leverage to derive not only a CLT but a stronger weak invariance principle, where remainders have to be controlled uniformly; see Lemma~\ref{Lem_Bounds-NonSmoothed-Var-and-Bias-of-S_N}. A sharp version has been used for confidence bands in the scalar response model by \cite{kato2019}. On the other hand, $k$ has to increase fast enough, such that the asymptotic bias is negligible, more precisely % $$ \vvvert S-S\Pi_{ k } \vvvert= \vvvert R \Gamma^\beta [Id-\Pi_{ k }]\vvvert \le \vvvert R \vvvert \vvvert \Gamma^\beta [Id-\Pi_{ k }] \vvvert_\mathcal{L} = \vvvert R \vvvert \lambda_{k+1}^\beta =\mathcal{O}(k^{-\SM \beta})= o(1/\sqrt{N}). $$ It can be shown that the above bound is sharp for general operators and hence the bias rate cannot be improved upon. Notice that the two Assumptions on $k$ can be simultaneously fulfilled if and only if $$ \beta> 1+1/\SM. $$ } \end{rem} \subsection{Main results} \label{Subsection_weak_convergence} In order to develop a statistical test for the relevant hypotheses defined in \eqref{relevant_difference} it is reasonable to estimate the difference $\vvvert S - S_0 \vvvert^2$. A natural estimator is given by $\vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2$. While it is also possible to replace $S_0 \hat \Pi_{ k }$ by $S_0$ in the subsequent theory, we prefer to work with $S_0 \hat \Pi_{ k }$ as it does not seem sensible to compare $S_0$ along dimensions to $S$, where no estimate for $S$ exists (this common sense approach is also supported by simulations). In order to define a consistent and (asymptotic) level-$\alpha$ test, we are interested in the weak convergence of the difference \begin{equation} \label{functional_convergence} \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \vvvert S-S_0\vvvert ^2 \big). \end{equation} The standard approach to this problem would be to: first establish weak convergence of the difference $\sqrt{N} (\hat S_N - S)$ in the space $\mathcal{S}(H_1,H_2)$; then deduce weak convergence of the test statistic in \eqref{functional_convergence} by applying the Delta method (see Section~3.9 in \cite{vandervaart1996}) to the mapping $ S \to \vvvert S-S_0\vvvert ^2 $. Notice that, using the OLS estimator, this method works for finite dimensional linear regression. However this approach fails in the context of functional regression problems, as it is not possible to find a standardizing sequence, say $\{a_N\}_{N\in {\mathbb N}}$, such that the difference $a_N( \hat S_N - S) $ converges weakly to a non-degenerate limit, if $k$ converges to infinity with the sample size, which is necessary to obtain an asymptotically vanishing bias \citep[see, for example,][]{crambes2013}. More precisely, if $k$ is fixed one can prove that $\sqrt{N}(\hat S_N - S)\Pi_k$ converges weakly to a Gaussian random vector. A similar result was derived by \cite{benatia2017} for a different regularization method. However these authors likewise concluded that for decaying regularization, i.e.\ $k \to \infty$ as $N \to \infty$ the sequence $\sqrt{N}(\hat S_N - S)$ has a degenerate limit caused by an inflation of the error variance. Nevertheless the fact that no weak convergence of $\sqrt{N} (\hat S_N - S)$ in the space $\mathcal{S}(H_1, H_2)$ can be established does not necessarily imply that the difference in \eqref{functional_convergence} cannot converge weakly. Indeed we will demonstrate that the mapping $ S \to \vvvert S-S_0\vvvert ^2 $ has a smoothing effect on $\hat S_N$. Therefore the inflation of the observation error $U_N$ (defined in \eqref{def_U}) is compensated and it is possible to establish weak convergence of \eqref{functional_convergence} with a normally distributed limit. The precise statement will be given in Proposition~\ref{proposition_1} below. To get an intuition how this smoothing works note that by the third binomial formula in Hilbert spaces we have $$ \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \vvvert (S-S_0) \Pi_{ k }\vvvert ^2 \big) =\langle \sqrt{N}[ \hat S_N-S_0 \hat \Pi_{ k }- (S-S_0) \Pi_{ k }], \hat S_N-S_0 \hat \Pi_{ k } + (S-S_0) \Pi_{ k } \rangle. $$ After some careful bounding of the error terms (recall that the left side of the inner product asymptotically degenerates), we can show that this equals $$ 2 \sqrt{N}\langle \hat S_N-S_0 \hat \Pi_{ k }- (S-S_0) \Pi_{ k }, S-S_0 \rangle + o_{\mathcal P}(1). $$ By Assumption~\ref{ass31}$(1)$ there exist operators $R, R_0 \in \mathcal{S}(H_1, H_2)$, such that $S=R \Gamma^\beta, S_0 = R_0 \Gamma^\beta$. Hence we can perform the following {\it smoothness shift}, moving smoothness in the form of $\Gamma^\beta$ from the second to the first component of the inner product, i.e. \begin{align*} 2 \sqrt{N}\langle \hat S_N-S_0 \hat \Pi_{ k }- (S-S_0) \Pi_{ k }, S-S_0 \rangle = & 2 \sqrt{N}\langle \hat S_N-S_0 \hat \Pi_{ k }- (S-S_0) \Pi_{ k }, [R-R_0] \Gamma^\beta \rangle \\ = & 2 \sqrt{N}\langle [\hat S_N-S_0 \hat \Pi_{ k }- (S-S_0) \Pi_{ k } ]\Gamma^\beta , R-R_0\rangle. \end{align*} It turns out that the smoothing effect of $\Gamma^\beta$ on the left stops the error inflation and thus weak convergence to a non-degenerate and (with some technical linearization) normally distributed limit can be proved. Intuitively the smoothing works, because $$ \hat S_N \Gamma^\beta = \frac{1}{N} \sum_{n=1}^N Y_n \otimes X_n \hat \Gamma^\dagger_k \Gamma^\beta \approx \frac{1}{N} \sum_{n=1}^N Y_n \otimes X_n \Gamma^{\beta-1}, $$ i.e.\ the regularized inverse $\hat \Gamma^\dagger_k$ and the shifted operator $\Gamma^\beta$ "cancel out" to $\Gamma^{\beta-1}$, thus eliminating the pathology of the asymptotically unbounded operator $\hat \Gamma^\dagger_k$. If the term on the right is centered and standardized by $\sqrt{N}$ it is asymptotically normal. The price we pay for this non-standard approach is a more elaborate proof, where many difficult remainders have to be controlled. As announced we now formulate the precise result. \begin{prop} \label{proposition_1} Under the Assumptions presented in Section~\ref{Subsection_assumptions}, it holds that \begin{equation} \label{h5} T_N = \sqrt{N} \left( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \vvvert (S-S_0)\Pi_{k} \vvvert ^2 \right) \stackrel{ d }{ \to } \mathcal{N}(0, \tau^2), \end{equation} where the long-run variance $\tau^2$ is defined by \begin{align} \label{def_long_run_variance} \tau^2 :=& 4 \Bigg\{ \sum_{h \in \mathbb{Z}} \mathbb{E} \Big[ \langle (R - R_0) L[ X_0 \otimes X_0 - \Gamma], R - R_0 \rangle \, \langle (R - R_0) L[ X_h \otimes X_h - \Gamma], R - R_0 \rangle \Big] \\ & \quad \, + 2 \mathbb{E} \Big[ \langle ( R - R_0) L[ X_0 \otimes X_0 - \Gamma], R - R_0 \rangle \, \langle \varepsilon_h \otimes X_h \Gamma^{\beta-1}, R - R_0 \rangle \Big] \nonumber \\ & \quad \, \, \, \, + \mathbb{E} \Big[ \langle \varepsilon_0 \otimes X_0 \Gamma^{\beta-1}, R - R_0 \rangle \, \langle \varepsilon_h \otimes X_h \Gamma^{\beta-1}, R - R_0 \rangle \Big] \Bigg\}. \nonumber \end{align} Here the map $L$ is given in Definition~\ref{Def_LinerazationOperat} of the Appendix. \end{prop} \begin{comment} \begin{align} \label{def_long_run_variance} \tau :=& 4 \big\{ \langle L(R-R_0) \Psi_1 L (R-R_0)^{ \ast }, (R-R_0) \otimes (R-R_0)^{ \ast } \rangle \\ & + 2 \langle L(R-R_0) \Psi_2 \Gamma^{\beta-1}, (R-R_0) \otimes (R-R_0)^{ \ast } \rangle \nonumber \\ & + \langle \Gamma^{\beta-1} \Psi_3 \Gamma^{\beta-1}, (R-R_0)^{ \ast } \otimes (R-R_0) \rangle \big\}. \nonumber \end{align} Here $R$ and $R_0$ are the operators in Assumption~\ref{ass31}(1) and the operators $\Psi_1, \Psi_2, \Psi_3$ are defined by $$ \Psi_1 := \sum_{h \in {\mathbb Z}} {\mathbb E} X_0 \otimes X_0 \otimes X_h \otimes X_h, \quad \Psi_2 := \sum_{h \in {\mathbb Z}} {\mathbb E} X_0 \otimes X_0 \otimes \varepsilon_h \otimes X_h, \quad \Psi_3 := \sum_{h \in {\mathbb Z}} {\mathbb E} \varepsilon_0 \otimes X_0 \otimes \varepsilon_h \otimes X_h. $$ \end{comment} Using Proposition~\ref{proposition_1}, we could in principle construct a test for the hypothesis of no relevant deviation, presented in \eqref{relevant_difference}, by rejecting the null hypothesis, whenever \begin{equation} \label{primitive_test} \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \Delta \big)> \tau \Phi^{-1}(1-\alpha), \end{equation} where $\Phi^{-1}$ is the quantile function of a standard normal distribution and $\alpha \in (0,1)$ denotes the nominal level. This decision yields indeed a test which is asymptotically consistent and keeps its nominal level asymptotically. To see this we use the expansion \begin{align} \label{decomposition} \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \Delta \big) & = T_{1N} + T_{2N} +T_{3N}~, \end{align} where \begin{align*} T_{1N} & = \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \vvvert (S-S_0) \Pi_{ k }\vvvert^2\big), \\ T_{2N} &= \sqrt{N} \big( \vvvert (S-S_0) \Pi_{ k } \vvvert ^2 - \vvvert S-S_0\vvvert^2\big), \\ T_{3N} &= \sqrt{N} \big( \vvvert S-S_0\vvvert^2 - \Delta\big). \end{align*} By Proposition \ref{proposition_1} the first term $T_{1N} $ in \eqref{decomposition} converges weakly to a centered normal distribution with variance $\tau^2 $. The term $T_{2N} $ is the bias and asymptotically vanishes (see discussion of Assumption \ref{ass31}(7)). The third term $T_{3N} $ is also deterministic. In the \textit{interior} of the null hypothesis, that is $ \vvvert S-S_0\vvvert^2 < \Delta$, it converges to $-\infty$ and thus asymptotically no rejection occurs for $N \to \infty$. On the \textit{ boundary } of the hypothesis, that is $ \vvvert S-S_0\vvvert^2 = \Delta$, it vanishes and we get $ \sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \Delta \big) = T_{1N} + o_{\mathcal P}(1) \to \mathcal{N}(0, \tau^2)$. Consequently, the test \eqref{primitive_test} has asymptotic level $\alpha$ in this case. Notice that the bias $T_{2N} $ is always non-positive which means that small choices of $k$ (resulting in larger bias) invariably make the test more conservative. Finally, under the alternative the term $T_{3N} $ diverges to $\infty$ and thus rejection occurs with probability converging to $1$ (asymptotic consistency). In the following remark we briefly explain how the decomposition \eqref{decomposition} can be used for a more refined analysis with respect to local alternatives. \begin{rem} \label{remark_local_alternatives} {\rm Consider the local alternative of $S= \tilde S +c H/\sqrt{N}$, where both $H, \tilde S \in \mathcal{C}(\beta,\Gamma)$ (see Assumption \ref{ass31}(1)) are operators, $c>0$ is a scaling factor and $\Delta = \vvvert \tilde{S} - S_0 \vvvert ^2$ demarcates the boundary of the hypothesis. Furthermore assume that $\langle \tilde S-S_0, H \rangle =: \Lambda >0$. The last requirement is necessary, such that we are indeed under the alternative ($\Lambda < 0$ corresponds to the hypothesis) and thus $$ \vvvert S- S_0 \vvvert ^2 = \vvvert \tilde{S} - S_0 \vvvert ^2 + 2 c \langle H, \tilde S-S_0 \rangle /\sqrt{N} +c^2\vvvert H\vvvert ^2/N = \Delta + 2 c \Lambda /\sqrt{N} + \mathcal{O}(1/N) >\Delta. $$ Now suppose that the Assumptions of Proposition~\ref{proposition_1} hold. We apply the test, defined in \eqref{primitive_test} in this situation and let $ p_{H_1^\Delta}(c) $ denote the probability of rejection. It then follows that $$ \lim_{N \to \infty} p_{H_1^\Delta}(c)> \alpha \quad \Leftrightarrow \quad c>0 \quad \quad \textnormal{and} \quad\quad \lim_{c \to \infty} \lim_{N \to \infty} p_{H_1^\Delta}(c) = 1.$$ Both results follow from the decomposition \eqref{decomposition}. It is not difficult to show that $T_{1N}$ converges to the same normal distribution as in the case of $S=\tilde S$, that $T_{2N}$ asymptotically vanishes and that $T_{3N} = 2 c \Lambda +o(1)>0$ is non-vanishing and (asymptotically) scales linearly with $c$. Consequently the test in \eqref{primitive_test} is able to detect local alternatives converging to the null hypothesis at a rate of $1/\sqrt{N}$. We also point out that all subsequently presented, self-normalized tests directly inherit this property, as the numerator of the normalized statistic can be decomposed as in \eqref{decomposition}. } \end{rem} Note that the test \eqref{primitive_test} provides an attractive decision rule for the hypothesis~\eqref{relevant_difference} supposing that a reliable estimate of the variance $\tau^2$ is available. Unfortunately, even in the case of independent observations this quantity is painfully complex to estimate. It requires not only estimation of $\Gamma$, but also of the fourth order structure of regressors and errors, a linearization map $L$ depending on all eigenvalues and eigenfunctions of the operator $\Gamma$ (an object which depends inversely on the small eigengaps) as well as knowledge about the operators $R$ and $R_0$ in Assumption~\ref{ass31}(1). What is difficult for i.i.d.\ data is almost infeasible in the case of dependent data. In this case $\tau^2$ is a long-run variance, which requires besides the estimation of all the mentioned entities the determination of a bandwidth, capturing the sequential dependence of the regressors and errors. \\ Given the impracticality and instability of such an estimate we pursue the different approach of self-normalization in the following section. The technical prerequisite for this procedure is the derivation of a weak invariance principle, generalizing Proposition~\ref{proposition_1}. For this purpose we introduce a sequential version of the statistic $\hat S_N$ which is defined similarly as the original, with the difference that - instead of all $N$ observations - only the observations $(X_{1},Y_{1}), \ldots , (X_{\lfloor \FP N \rfloor},Y_{\lfloor \FP N \rfloor})$ for $\FP \in (0,1]$ are used for estimation. To be precise we define the sequential covariance estimator \begin{equation} \label{Eq_DefSeqCovOp} \hat \Gamma_N[\FP] = \frac{1}{N} \sum_{n=1}^{\lfloor \FP N \rfloor} X_n \otimes X_n. \end{equation} Furthermore, we define the sequential estimators of the eigenvalues and eigenfunctions of $\Gamma$, denoted by $\hat{\lambda}_i[\FP], \hat e_i[\FP]$ as the eigenvalues and eigenfunctions of the operator $\hat \Gamma_N[\FP]$ (where the eigenvalues are again assumed to be in non-increasing order). With these estimators we set \begin{equation} \label{Eq_DefSeqPseudoInvs-and-SeqProj} \hat \Gamma^\dagger_k[\FP] = \sum_{i=1}^k \frac{1}{\hat{\lambda}_i[\FP]} \hat e_i[\FP] \otimes \hat e_i[\FP] \qquad \textnormal{ and } \qquad \hat \Pi_{ k }[\FP] = \sum_{i=1}^k \hat e_i[\FP] \otimes \hat e_i[\FP]. \end{equation} Finally the sequential estimator of $S$ is given by \begin{equation} \label{App_ref_3} \hat{S}_N [\FP] := \frac{1}{N} \sum_{n=1}^{\lfloor \FP N \rfloor} Y_n \otimes X_n \hat \Gamma^\dagger_k[\FP]. \end{equation} Note that in the case of $\FP=1$ these estimators are identical to their non-sequential counterparts $\hat{\Gamma}_N $, $\hat \Gamma^\dagger_k$ and $ \hat{S}_N $ defined in \eqref{h2}, \eqref{h3} and \eqref{h4}, respectively, and that we do not adapt $k=k(N)$ to $\FP$. Throughout this paper we will use the notations $\hat \Gamma_N$ and $\hat \Gamma_N [1]$ simultaneously. We can now state the weak invariance principle generalizing Proposition~\ref{proposition_1}. \begin{theo} \label{theorem_1} Under our Assumptions~\ref{ass31}, it holds for any compact interval $I \subset (0,1]$ that $$ \left\{ \sqrt{N} \FP \left( \vvvert \hat S_N[\FP] - S_0 \hat \Pi_{ k }[\FP] \vvvert ^2 - \vvvert ( S - S_0 )\Pi_{k} \vvvert ^2 \right) \right\}_{\FP \in I} \stackrel{ d }{ \to } \{ \tau \mathbb{B} (\FP) \}_{\FP \in I}, $$ as $N \to \infty$, where $\mathbb{B}$ is a standard Brownian motion and the long-run variance $\tau^2$ is defined in \eqref{def_long_run_variance}. \end{theo} \subsection{A pivotal test statistic } \label{Subsection_test_one_sample} In the last section we have derived a weak invariance principle for the estimated deviation measure in \eqref{functional_convergence}. While a central limit theorem is theoretically sufficient to construct a test for the hypothesis \eqref{relevant_difference}, as we have seen in the discussion of Proposition \ref{proposition_1}, the estimation of the long-run variance $\tau^2$ is infeasible in applications. In this section we circumvent the problem of estimating $\tau^2$, by a self-normalization approach, based on the weak invariance principle in Theorem \ref{theorem_1}. For this purpose, define for $0 < a<1$ the interval $I = [a, 1]$, let $\nu$ be a probability measure on $I$ and consider the normalizer \begin{equation} \label{denominator} \hat V_N := \left\{ \int_I \FP^4 \left( \vvvert \hat S_N[\FP]-S_0 \hat \Pi_{ k }[\FP] \vvvert ^2 - \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 \right)^2 d\nu(\FP) \right\}^{1/2}. \end{equation} The next corollary is a consequence of Theorem~\ref{theorem_1} and the continuous mapping Theorem. It can be viewed as a standardized version of Proposition~\ref{proposition_1}. \begin{cor} \label{corollary_2} Suppose that the assumptions of Theorem~\ref{theorem_1} hold and that $\tau>0$. Then the weak convergence \begin{align} \label{hd5} \frac{ \left( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \vvvert ( S-S_0 ) \Pi_{ k } \vvvert ^2 \right) }{ \hat V_N } \stackrel{ d }{ \to } W := \frac{ \mathbb{B}(1) }{ \left\{\int_I \FP^2 ( \mathbb{B}(\FP)-\FP \mathbb{B}(1))^2 d \nu(\FP) \right\}^{1/2} } \end{align} holds, where $\mathbb{B}$ is a standard Brownian motion on the interval $[0,1]$. \end{cor} We point out that the quantiles of the distribution of $W$ can be readily simulated using the Fourier representation of the Brownian motion. A typical choice for the measure $\nu $ is a discrete uniform measure on the set $\{1/T,2/T,...,(T-1)/T, 1\}$ for some $T \ge 2$. Simulations suggest that the choice of $T$ has little impact on the statistical performance of the resulting procedure, while - of course - smaller values of $T$ yield computational advantages (see Section \ref{sec6}). In view of \eqref{primitive_test} and the subsequent discussion we now define a decision rule for the hypothesis in \eqref{relevant_difference} rejecting the null hypothesis in \eqref{relevant_difference}, whenever \begin{equation} \label{test_decision} \hat W_N(\Delta) :=\frac{\sqrt{N} \big( \vvvert \hat S_N-S_0 \hat \Pi_{ k } \vvvert ^2 - \Delta \big)}{\hat V_N}> q_{1-\alpha}, \end{equation} where $q_{1-\alpha}$ is the $1-\alpha$ quantile of the distribution of $W$ in \eqref{hd5}. The next theorem shows the validity of this test decision. \begin{theo} \label{theorem_2} Under the assumptions of Corollary~\ref{corollary_2} the decision presented in \eqref{test_decision} yields an asymptotic level-$\alpha$ and consistent test for the hypothesis \eqref{relevant_difference}. \end{theo} \begin{rem} \label{remark_centering} ~~ \smallskip {\rm (1) In the theoretical results presented so far it is assumed that the regressors are centered, that is ${\mathbb E} X_1 =0$. In reality it may well be that ${\mathbb E} X_1 = \mu \neq 0$ and therefore an empirical centering is necessary. More precisely we can introduce the sequential mean estimates (recall that $\FP \in \left[ a,1 \right]$, $0 < a < 1$) $$ \bar Y_N[\FP] := \frac{1}{ \lfloor N \FP \rfloor } \sum_{n=1}^{\lfloor N \FP \rfloor} Y_n, \quad \textnormal{and} \quad \bar X_N[\FP] := \frac{1}{\lfloor N \FP \rfloor} \sum_{n=1}^{\lfloor N \FP \rfloor} X_n, $$ and consider the modified observations $Y_n-\bar Y_N[\FP]$ and $ X_n- \bar X_N[\FP] $ in any of the sequential statistics introduced at the beginning of this section. It can be shown that all results presented so far remain correct in this case (we also employ this empirical centering in the simulation study in Section~\ref{sec6}). \smallskip (2) It follows from the proof of Theorem~\ref{theorem_2} that $ \lim_{N \to \infty } \mathbb{P}\big( \hat W_N(\Delta) > q_{1-\alpha}\big) = 0 $ if $ \vvvert S-S_0\vvvert ^2 < \Delta $ (interior of the null hypothesis), while for $ \vvvert S-S_0\vvvert ^2 = \Delta $ (boundary of the null hypothesis) we have $\lim_{N \to \infty } \mathbb{P}\big( \hat W_N(\Delta) > q_{1-\alpha}\big) = \alpha $. \smallskip (3) It is easy to see that the test statistic $\hat W_N(\Delta)$ is a decreasing function of the threshold $\Delta$. This means that rejection for some $\Delta> 0$ also entails rejection for all smaller thresholds and vice versa accepting the hypothesis for some threshold means acceptance for all larger values. Hence the interpretation for multiple values of $\Delta$ - if considered - is internally consistent. \smallskip (4) Similar results can also be obtained for other dependence concepts than $\phi-$mixing. For example, consider $\alpha$-mixing processes \citep[for a definition, see, for instance][]{dehling} and assume \begin{align*} (3'): & ~~~~\text{The sequence ~} \{(X_n, \varepsilon_n)\}_{n \in {\mathbb Z}} ~\text{ is strictly stationary and~} \alpha \text{-mixing s.t. ~} \sum_{h \ge 1} h^{4/\kappa}\alpha(h)<\infty\\ (4'):& ~~~~ \text{If } c \text{ is the smallest even integer } c>4+ \kappa , \text{ then } ~~ {\mathbb E} | \langle X_1, e_j \rangle|^c \le C ({\mathbb E} | \langle X_1, e_j \rangle|^2)^{c/2} ~~~~. \end{align*} respectively, where $\alpha(h)$ denotes the $\alpha$-mixing coefficient. Then all statements in this and the subsequent sections remain correct if the conditions $(3)$ and $(4)$ in Assumption~\ref{ass31} are replaced by $(3')$ and $(4')$, respectively. For technical details we refer the interested reader to \cite{dehling} (covariance inequalities for $\alpha-$mixing in Hilbert spaces) and to \cite{merlevede} (invariance principles under $\alpha$-mixing). } \end{rem} \section{Statistical inference for relevant prediction errors} \label{sec4} In the previous section we have compared the slope operator $S$ to a predetermined operator $S_0$, in terms of the Hilbert--Schmidt norm $\vvvert S-S_0 \vvvert^2$. However, from a statistical perspective other deviation measures are at least equally important. One vital mode of comparison is, in how far the predictions of the two operators differ, which we discuss in this section. Prediction in finite and infinite dimensional linear models is a well-investigated subject. In the work most closely related to our own, \cite{crambes2013} considered the minimax prediction error of the spectral cut-off estimator $\hat S_N$, compared to the true slope $S$. The focus in our work is different, as we want to compare the predictive properties of the true slope $S$, with the hypothesized operator $S_0$. More specifically we are interested in the quantity ${\mathbb E} \| S X-S_0 X \|^2$, where the expectation is taken with respect to a regressor $X$, distributed as $X_1$. A simple calculation, using the trace representation of inner products and its properties (see Section~13.5 in \cite{HorKokBook12}) shows that \begin{equation}\label{h6} {\mathbb E} \| S X-S_0 X \|^2 = \vvvert S \Gamma^{1/2}-S_0 \Gamma^{1/2}\vvvert^2. \end{equation} Therefore we are comparing smoothed versions of the slope operators. We point out that even though the inequality $$ \vvvert S \Gamma^{1/2}-S_0 \Gamma^{1/2}\vvvert^2 \le \vvvert \Gamma^{1/2} \vvvert_\mathcal{L}^2 \vvvert S-S_0 \vvvert^2 $$ implies that small differences between $S$ and $S_0$ result in small prediction errors, the converse is not true. In particular small prediction errors may be found in operators, that vastly differ in the Hilbert--Schmidt norm. We now formulate the hypothesis of no relevant prediction error as \begin{equation} \label{relevant_prediction_error} {}^{\textnormal{pred}}H_0^\Delta: {\mathbb E}\| SX-S_0X\| ^2 \le \Delta \quad \quad {}^{\textnormal{pred}}H_1^{\Delta}: {\mathbb E} \| SX-S_0X\| ^2 > \Delta, \end{equation} where $X$ has the same distribution as $X_1$. Again $\Delta>0$ is a user determined threshold, where a deviation of more than $\Delta$ is considered scientifically relevant. In order to test this hypothesis we recall the identity \eqref{h6} which suggests the natural estimator $\vvvert \hat S_N \hat \Gamma_N^{1/2}-S_0 \hat \Pi_{ k } \hat \Gamma_N^{1/2}\vvvert^2$ for the prediction error. Recall that the projection $S_0 \hat \Pi_{ k }$ can be replaced by the operator $S_0$, but projecting seems more sensible, because otherwise $S_0$ is compared to $S$ along axes, which are not estimated. Compared to the statistic discussed in Section \ref{sec3}, we expect that the multiplication with $\hat \Gamma_N^{1/2}$ leads to an even stronger smoothing effect, which indeed manifests itself in weaker assumptions on the regularization parameter. \begin{assumption} \label{ass41} \textit{Rates of regularization:} {\rm The regularization parameter $k$ satisfies for some $\delta>0$ $$ \frac{k^{\SM+1+\delta}}{\sqrt{N}} \to 0 \quad \quad \textnormal{and} \quad \quad \frac{k^{\SM (\beta+1/2)}}{\sqrt{N}} \to \infty. $$ } \end{assumption} If Assumption~\ref{ass41} holds, the bias of the prediction error vanishes asymptotically, as \begin{eqnarray*} \vvvert [S-S\Pi_{ k }]\Gamma^{1/2}\vvvert &= &\vvvert R \Gamma^\beta [I-\Pi_{ k }]\Gamma^{1/2}\vvvert \le \vvvert R\vvvert \vvvert \Gamma^\beta [I-\Pi_{ k }]\Gamma^{1/2}\vvvert _\mathcal{L} \\ &= & \vvvert R\vvvert \lambda_{k+1}^{\beta+1/2} =\mathcal{O}(k^{-\SM (\beta+1/2)})= o(1/\sqrt{N}). \end{eqnarray*} Notice that compared to Assumption \ref{ass31}(7), Assumption \ref{ass41} translates into weaker smoothness requirements for the operators $S$ and $S_0$. In fact it implies $\beta>1/2 +1/\SM$ (instead of $\beta>1+1/\SM$, because $S \in \mathcal{C}(\beta - 1/2, \Gamma)$ already entails $S \Gamma^{1/2} \in \mathcal{C}(\beta, \Gamma)$). In applications this effect is reflected by smaller values of $k$ in the spectral cut-off estimator for prediction compared to reconstruction. Nevertheless the representation $$ \hat S_N \hat \Gamma_N^{1/2} = S \hat \Pi_{ k } \hat \Gamma_N^{1/2} + U_N (\hat \Gamma^\dagger_k)^{1/2}, $$ suggests, that inference for the prediction error remains a genuinely inverse problem. In particular we still observe an amplification of the observation error $U_N$ by the regularized inverse, but to a weaker extend than in the case of reconstruction. Recalling the definition of the sequential estimators \eqref{Eq_DefSeqCovOp}, \eqref{Eq_DefSeqPseudoInvs-and-SeqProj} and \eqref{App_ref_3} in Section~\ref{Subsection_weak_convergence} we obtain the following invariance principle. \begin{theo} \label{theorem_3} Under the Assumptions~\ref{ass31}(1)-(6) and Assumption~\ref{ass41}, it holds for any compact interval $I \subset (0,1]$, that $$ \left\{ \sqrt{N} \FP \left( \vvvert \hat S_N[\FP] \hat \Gamma_N [\FP]^{1/2} - S_0 \hat \Pi_{ k }[\FP] \hat \Gamma_N [\FP]^{ 1 / 2 } \vvvert ^2 - \vvvert ( S - S_0 )\Pi_{k} \Gamma^{1/2} \vvvert ^2 \right) \right\}_{\FP \in I} \stackrel{ d }{ \to } \{ \tau^{\rm pred} \mathbb{B} (\FP) \}_{\FP \in I}, $$ where the long-run variance $(\tau^{\rm pred})^2 $ is defined as follows \begin{align} \label{def_long_run_variance_pred} (\tau^{\rm pred})^2 :=& 4 \Big\{ \sum_{h \in \mathbb{Z}} \mathbb{E} \Big[ \langle (R-R_0) \tilde L[X_0 \otimes X_0 -\Gamma], R-R_0 \rangle \langle (R-R_0) \tilde L[X_h \otimes X_h -\Gamma], R-R_0 \rangle \Big] \\ & \quad \, + 2 \mathbb{E} \Big[\langle (R-R_0) \tilde L[X_0 \otimes X_0 -\Gamma], R-R_0 \rangle \langle \varepsilon_h \otimes X_h \Gamma^{\beta-1}, R-R_0 \rangle \Big] \nonumber \\ & \quad \, \, \, \, + \mathbb{E} \Big[ \langle \varepsilon_0 \otimes X_0 \Gamma^{\beta-1}, R-R_0 \rangle\langle \varepsilon_h \otimes X_h \Gamma^{\beta-1}, R-R_0 \rangle \Big] \Big\}. \nonumber \end{align} Here the map $ \tilde L$ is given in Definition \ref{Def_LinerazationOperat}. \end{theo} \begin{comment} \begin{align} \label{long_run_prediction} \tau^{\rm pred} =& 4 \big\{ \langle \tilde L(R-R_0) \Psi_1 \tilde L (R-R_0)^{ \ast }, (R-R_0) \otimes (R-R_0)^{ \ast } \rangle \\ & + 2 \langle \tilde L(R-R_0) \Psi_2 \Gamma^{\beta}, (R-R_0) \otimes (R-R_0)^{ \ast } \rangle \nonumber \\ & + \langle \Gamma^{\beta} \Psi_3 \Gamma^{\beta}, (R-R_0)^{ \ast } \otimes (R-R_0) \rangle \big\}. \nonumber \end{align} where $\mathbb{B}$ is a standard Brownian motion, the map $\tilde L$ is given in Definition \ref{Def_LinerazationOperat} and the operators $\Psi_1, \Psi_2, \Psi_3$ are defined in Proposition \ref{proposition_1}. \end{comment} Next we define the adapted denominator \begin{equation} \label{denominator_2} \hat V_N^{\rm pred} := \Big\{ \int_I \FP^4 \Big( \vvvert \hat S_N[\FP]\hat \Gamma_N [\FP]^{1/2}-S_0 \hat \Pi_{ k }[\FP]\hat \Gamma_N [\FP]^{1/2} \vvvert ^2 - \vvvert \hat S_N\hat \Gamma_N ^{1/2}-S_0 \hat \Pi_{ k } \hat \Gamma_N ^{1/2}\vvvert ^2 \Big)^2 d\nu(\FP) \Big\}^{1/2}, \end{equation} and propose to reject the null hypothesis in \eqref{relevant_prediction_error}, if \begin{equation} \label{test_decision_2} \hat W_N^{\rm pred}(\Delta) :=\frac{\sqrt{N} \big( \vvvert \hat S_N \hat \Gamma_N ^{1/2}-S_0 \hat \Pi_{ k } \hat \Gamma_N ^{1/2} \vvvert ^2 - \Delta \big)}{\hat V_N^{\rm pred}}> q_{1-\alpha}. \end{equation} \begin{theo} \label{theorem_4} Suppose that the Assumptions~\ref{ass31}(1)-(6), Assumption~\ref{ass41} hold and that the long-run variance $\tau^{\rm pred}$ is positive. Then the decision rule in \eqref{test_decision_2} defines a consistent, asymptotic level-$\alpha$ test for the hypothesis in \eqref{relevant_prediction_error}. \end{theo} We conclude this part by comparing the weak convergence result of this Section to those derived in \cite{crambes2013} for prediction. \begin{rem} \label{remark_1} {\rm \cite{crambes2013} proved a weak convergence result in the case of i.i.d.\ observations and somewhat different assumptions than those used in this section. In their Theorem~9 (which is a generalization of Theorem~4.2 in \cite{cardot2007}), they showed that for a random variable $X$ distributed as $X_1$ and independent of the sequence $\{(X_n ,\varepsilon_n)\}_{n\in {\mathbb Z}}$ , the weak convergence \begin{equation} \label{mas_convergence} \sqrt{N/k}(\hat S_N X -SX) \stackrel{ d }{ \to } G \end{equation} holds, where $G$ is a centered Gaussian process on $H_2$, with covariance operator ${\mathbb E} \varepsilon_1 \otimes \varepsilon_1$. Notice the standardization of $\sqrt{N/k}$ instead of $\sqrt{N}$, which corresponds to the standard deviation of $U_N \Gamma^\dagger_k X $. This term naturally occurs (as second term) in the decomposition $$ \sqrt{ N / k } (\hat S_N - S\Pi_{ k } ) X = \sqrt{ N / k } \left\{ S ( \hat \Pi_{ k } -\Pi_{ k } ) X + U_N \hat \Gamma^\dagger_k X \right\}. $$ Importantly the first term here is asymptotically negligible, which is not the case in our smoothed statistic. Indeed, in the $L^2$-statistic, after the smoothness shift is performed, the amplifying effect of the regularized inverse is eliminated, which yields the convergence rate $1/\sqrt{N}$ for both terms instead of $\sqrt{k/N}$. In view of these technical differences we have developed a separate asymptotic theory for the proof of Theorem~\ref{theorem_4} tailored to the study of relevant hypotheses and could not use the result in \eqref{mas_convergence}. \begin{comment} It is also worthwhile to mention that the rate of convergence in \eqref{mas_convergence} is usually slow. To see this recall the decomposition $$ \sqrt{N/k}(\hat S_N - S\Pi_{ k } )X = \sqrt{N/k} \big[ S [\hat \Pi_{ k } -\Pi_{ k }] X + U_N \hat \Gamma^\dagger_k X \big]. $$ Asymptotically, the second term dominates, such that $$ \sqrt{N/k} U_N \hat \Gamma^\dagger_k X \approx \sqrt{N/k} U_N \Gamma^\dagger_k X = \frac{1}{\sqrt{N}}\sum_{n=1}^N \varepsilon_n \frac{\langle X_n, \Gamma^\dagger_k X \rangle }{\sqrt{k}} \to G. $$ However, the first term $\sqrt{N} S [\hat \Pi_{ k } -\Pi_{ k }] X $ is also approximately normal, which can be understood in terms of the linearizations presented in this paper (see Lemma \ref{Lem_Projection-Statistics-Smoothed-Right-and-Left} and its proof). Given that in applications $k$ is usually quite small, $\sqrt{N / k } S [\hat \Pi_{ k } -\Pi_{ k }] X $ tends to blow up the variance of $\sqrt{N/k}(\hat S_N X -SX)$ for finite samples. \textcolor{red}{{\bf das ist irgendwie unklar. wuerde ich weglassen} In particular the asymptotic normality presented in \cite{crambes2013} only holds as $k \to \infty$ and not for fixed $k$ (as in this paper). In this sense the linearizations presented in this paper can be understood as refinement to the existing theory. } \end{comment} } \end{rem} \section{Change point analysis and two sample tests} \label{sec5} In the context of dependent time series, functional data analysis is usually employed to model successive observations of a system over an extended time period. In this context it is natural to consider the stability of the data, e.g., by searching for change points in the mean \citep[see e.g.][]{BerGabHorKok2009}, Chapter~6 in \cite{HorKokBook12}, \cite{aston2012} or \cite{DetKokVol20}) or in the second order structure, i.e.\ covariance operators \citep{jaruskova2013}, principle components \citep{dettekutta2020} or other features \citep{aue2018}. For the linear regression model~\eqref{model_1} stability concerns first and foremost the slope operator $S$. This problem has been addressed by \cite{HorHusKok2010} for AR(1)-processes and by \cite{horvathlin2011} for more general processes by testing ``classical'' hypotheses (of the type $H_0$ versus $H_1$ described at the beginning of Section \ref{Subsection_relevant_hypothesis}). In this Section we discuss how one can adapt the previous techniques to the detection of a relevant change in the operator $S$. The related, but easier case of comparing two operators, say $S^{(1)}$ and $S^{(2)}$ from independent samples is briefly discussed in Remark~\ref{rem2} below. To be precise consider the following regression model \begin{equation} \label{model_3} Y_n \otimes X_n = S_n X_n \otimes X_n + \varepsilon_n \otimes X_n \quad \quad n=1,...,N, \end{equation} where $S^{(1)} := S_1 =S_2 =...=S_{\lfloor \theta N \rfloor}$, $S^{(2)}:= S_{\lfloor \theta N \rfloor+1} =...=S_N$ and $\theta \in (0,1)$ determines the location of the change point and is unknown. We assume that $\{(X_n, \varepsilon_n)\}_{n \in {\mathbb Z}}$ is a stationary time series of regressors and errors, which satisfies the Assumptions~\ref{ass31}(1)-(5) in Section~\ref{Subsection_assumptions}. The two hypotheses of no relevant change at $\theta$ in the slope operator and of no relevant change in the predictive properties of $S$ are defined by \begin{align} \label{relevant_change} H_0^\Delta& : \vvvert S^{(1)}-S^{(2)}\vvvert ^2 \le \Delta \quad \quad & H_1^\Delta : \vvvert S^{(1)}-S^{(2)} \vvvert ^2 > \Delta, \quad \quad \,\, \\ {}^{\textnormal{pred}}H_0^\Delta& : {\mathbb E} \| S^{(1)} X-S^{(2)} X\| ^2 \le \Delta \quad \quad & {}^{\textnormal{pred}}H_1^\Delta: {\mathbb E} \| S^{(1)} X-S^{(2)} X \| ^2 > \Delta. \label{relevant_changepre} \end{align} Before continuing we point out an important difference to change point analysis based on testing classical hypotheses (that is $\Delta=0$): Suppose a change in the slope operator is detected by a traditional change point test, but would be considered irrelevant in the sense of the hypotheses \eqref{relevant_change} for some small $\Delta >0$. In this situation it might be reasonable to reconstruct the slope $S$ using all of the data, instead of considering two estimates from the data before and after the estimated change point. On the one hand this would introduce a (small) bias in the estimation, but on the other hand this increase could be compensated by a significant reduction of the variance. In the following discussion let $\hat \theta $ denote an estimator of the change point (see Remark~\ref{rem2}(1) below for a concrete example). We define the sequential estimators for the covariance operator \begin{align} \label{hd6} \hat \Gamma_N^{(1)}[\FP]= \frac{1}{N \hat \theta} \sum_{n=1}^{\lfloor \FP \hat \theta N \rfloor} X_n \otimes X_n \quad \quad\textnormal{and } \quad \quad \hat \Gamma_N^{(2)}[\FP]= \frac{1}{N (1- \hat \theta)} \sum_{n= \hat \theta N+1}^{\lfloor \FP (1- \hat \theta) N \rfloor} X_n \otimes X_n~. \end{align} The eigenvalues (in non-increasing order) and their corresponding eigenfunctions are denoted by $\hat \lambda_1^{(j)}[\FP] \ge \hat \lambda_2^{(j)}[\FP] \ge \ldots$ and $\hat e_1^{(j)}[\FP], \hat e_2^{(j)}[\FP], \ldots$, respectively $(j=1,2)$. As before, we consider for $k \in {\mathbb N}$ the regularized inverse of the operator $\hat \Gamma^{(j)}_N[\FP]$, as well as the projection on the first $k$ empirical eigenfunctions as $$ \hat \Gamma_k^{\dagger, (j)}[\FP] = \sum_{i=1}^{k} \frac{1}{\hat{\lambda}_i^{(j)}[\FP]} \hat e_i^{(j)}[\FP] \otimes \hat e_i^{(j)}[\FP] \qquad \textnormal{and } \qquad \hat \Pi_{ k }^{(j)}[\FP] = \sum_{i=1}^{k} \hat e_i^{(j)}[\FP] \otimes \hat e_i^{(j)}[\FP]. $$ By virtue of the regularized inverse operators, we can now define the slope estimates, as \begin{align} \label{hd7} \hat S_N^{(1)}[\FP] = \frac{1}{N \hat \theta} \sum_{n=1}^{\lfloor \FP \hat \theta N \rfloor} Y_n \otimes X_n \hat \Gamma^{\dagger, (1)}_k[\FP] \qquad \textnormal{and } \qquad \hat S^{(2)}_N[\FP] = \frac{1}{N (1- \hat \theta)} \sum_{n=N \hat \theta+1}^{\lfloor \FP (1- \hat \theta) N \rfloor} Y_n \otimes X_n \hat \Gamma^{\dagger, (2)}_k[\FP] \end{align} and propose to reject the null hypothesis in \eqref{relevant_change} whenever \begin{equation} \label{test_decision_3} \hat W^{\rm cp}_N(\Delta) := \frac{\sqrt{N} \left( \vvvert \hat S_N^{(1)}- \hat S_N^{(2)} \vvvert ^2 - \Delta \right) }{ \hat V_N^{\rm cp} } > q_{1-\alpha}. \end{equation} where the denominator $\hat V_N^{\rm cp}$ is defined as \begin{equation} \label{denominator_3} \hat V_N^{\rm cp} := \left\{ \int_I \FP^4 \left( \vvvert \hat S_N^{(1)}[\FP]- \hat S_N^{(2)}[\FP] \vvvert ^2 - \vvvert \hat S_N^{(1)}- \hat S_N^{(2)}\vvvert ^2 \right)^2 d\nu(\FP) \right\}^{1/2}, \end{equation} and $q_{1-\alpha}$ is the $(1-\alpha)$-quantile of the distribution of the random variable $W$ defined in \eqref{hd5}. In order to test for relevant predictive differences we define $\hat W_N^{\rm cp, pred}(\Delta)$ in the same way as $\hat W_N^{\rm cp}(\Delta)$, where we replace all instances of $S^{(j)}[\FP]$ by $S^{(j)}[\FP] \hat \Gamma_N^{(j)}[\FP]^{1/2}$. This gives us the test decision for a relevant change in prediction \begin{equation} \label{test_decision_4} \hat W_N^{\rm cp, pred}(\Delta) > q_{1-\alpha}. \end{equation} For the statement of the main results of this section we require the consistency of the change point estimator $\hat \theta$, such that the amount of missclassified data is asymptotically negligible. \begin{assumption} \label{ass51} {\rm (Consistency of $\hat \theta$): } $ \quad \hat \theta = \theta +o_{\mathcal P}(1/\sqrt{N}). $ \end{assumption} The following result shows that the decision rules~\eqref{test_decision_3} and \eqref{test_decision_4} define consistent tests for the hypotheses~\eqref{relevant_change} and \eqref{relevant_changepre}, respectively and have asymptotic level $\alpha$. In its formulation we understand that a postulated assumption applies to each operator before and after the change point. \begin{theo} \label{theorem_5} Suppose that the Assumptions~\ref{ass31}(1)-(6) and Assumption~\ref{ass51} hold. \begin{itemize} \item[a)] If additionally Assumption~\ref{ass31}(7) holds, then the long-run variance $(\tau^{\rm cp})^2$ of $$ \sqrt{N} \left( \vvvert \hat S_N^{(1)}- \hat S_N^{(2)} \vvvert ^2 - \vvvert S^{(1)} - S^{(2)}\vvvert ^2 \right) \stackrel{ d }{ \to } \mathcal{N}(0, (\tau^{\rm cp})^2) $$ exists. If $\tau^{\rm cp}$ is positive, then the decision rule in \eqref{denominator_3} yields a consistent, asymptotic level-$\alpha$ test for the hypothesis~\eqref{relevant_change} of no relevant change in the slope. \item[b)] If additionally Assumption~\ref{ass41} holds, then the long-run variance $(\tau ^{\rm cp, pred})^2$ of $$ \sqrt{N} \left( \vvvert \hat S_N^{(1)} ( \hat \Gamma_N^{(1)} )^{1/2} - \hat S_N^{(2)} ( \hat \Gamma_N^{(2)} )^{1/2} \vvvert ^2 - \vvvert ( S^{(1)}- S^{(2)} ) \Gamma^{1/2} \vvvert ^2 \right) \stackrel{ d }{ \to } \mathcal{N}(0, (\tau ^{\rm cp, pred})^2) $$ exists. If $\tau ^{\rm cp, pred}$ is positive, then the decision rule in \eqref{test_decision_4} yields a consistent, asymptotic level-$\alpha$ test for the hypothesis \eqref{relevant_changepre} of no relevant change in the prediction. \end{itemize} \end{theo} It is possible to give explicit formulas for $\tau ^{\rm cp}$ and $\tau ^{\rm cp, pred}$, which are similar to those in Proposition~\ref{proposition_1} and Theorem~\ref{theorem_3} above, but we omit them to avoid redundancy. We conclude this section with a brief remark concerning the change point estimator $\hat \theta$ and two sample testing. \begin{rem} \label{rem2} ~~ {\rm (1) There are many ways of defining an estimator for the location $\theta$ of the change point. As an example we consider a standard change point estimator from the observations $Y_1 \otimes X_1 \ldots , Y_n \otimes X_n$ based on the CUSUM-principle (note that any change in the slope operator $S_n$ in model~\eqref{model_3} manifests itself in the product $S_n \Gamma$). To be precise we define \begin{align} \label{hd8} \hat \theta := \frac{1}{N} \operatorname{argmax} \left\{ f(M): 1< M < N \right\} , \end{align} where the function $f$ is given by $$ f(M) := \frac{M}{N} \left( 1 -\frac{M}{N} \right) \left\vvvert \frac{1}{M} \sum_{n=1}^M Y_n \otimes X_n - \frac{1}{N-M} \sum_{n=M+1}^N Y_n \otimes X_n \right\vvvert^2, \quad M = 2, \ldots ,N-1 $$ It then follows from Corollary~1 in \cite{hariz2007} that $$ |\hat \theta-\theta| = \mathcal{O}_{\mathcal P}(1/N) $$ if the condition $$ \sum_{q,r} \sqrt{{\mathbb E} \langle S^{(j)} X \otimes X, f_r \otimes e_q \rangle^2 } < \infty $$ holds for some orthonormal basis $\{f_r\}_{r \ge 1}$ of $H_2$. In this case Assumption~\ref{ass51} is satisfied for the estimator in \eqref{hd8}. \smallskip (2) It is easy to see that the test formulated in this section can be applied (without the change point estimation) to the case of two independent samples of size $N_1$ and $N_2$. In this case we set $N=N_1+N_2$ and replace $\hat \theta N $ and $(1-\hat \theta ) N $ in the definitions~\eqref{hd6} and \eqref{hd7} by $N_1$ and $N_2$. The details are omitted for the sake of brevity. Tests for relevant differences between the slopes of two functional linear regression models may be of interest e.g.\ in cases where the behavior of contemporary individuals at different geographical locations is compared. } \end{rem} \section{Finite sample properties} \label{sec6} In this section we investigate the finite sample properties of the spectral reconstructions and the self-normalized tests by means of a simulation study. We restrict ourselves to the one-sample cases presented in Sections~\ref{sec3} and \ref{sec4}, even though non-reported simulations suggest similar performance for two sample cases and change point scenarios. Following \cite{benatia2017} we consider $(H_1, \mu_1) = (H_2, \mu_2) =(L^2([0,1], \mu)$, where $\mu$ is the uniform distribution on the points $\{0, 1/50, 2/50..., 1\}$, which may be regarded as a discretized version of the Lebesgue measure. We consider two scenarios of dependence: i.i.d.\ observations and dependent observations, where regressors and errors are generated by $AR(1)$ processes. \subsection{Inference for the location of $S$} \label{sec61} Recall the regression model in \eqref{model_1}. In the case of i.i.d.\ observations, we generate the regressors as \begin{equation} \label{regressors} X_n(t) = \frac{\Gamma(A_n + B_n)}{\Gamma(A_n)\Gamma(B_n)} t^{A_n}(1-t)^{B_n} + Z_n, \end{equation} (shifted $\beta$-densities) where $A_n, B_n$ are independent, uniformly distributed on the interval $[2,5]$ and $Z_n$ is an independent, standard normal shift. Notice that the regressor functions $X_1, X_2, \ldots$ are not centred, and hence we include an empirical centering in all statistics (see Remark~\ref{remark_centering}). The error functions $\varepsilon_n$ are i.i.d.\ realizations of an Ornstein--Uhlenbeck process, with zero mean, variance parameter and mean reversion rate equal to one. Note that $\varepsilon_n$ is a stationary, centered, Gaussian process, which is the solution of the stochastic differential equation $d \varepsilon(t) = -\varepsilon(t) dt + \sigma d \mathbb{B}(t) $, where $ \mathbb{B}$ is a standard Brownian motion and $\sigma=1$. Some typical paths of these regressors and errors are depicted in Figure~\ref{fig:sub21}. \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=220pt]{Regressors.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=220pt]{Errors.png}\\[-2ex] \end{subfigure} \caption{\textit{Realizations of regressors (left) and errors (right), both in the i.i.d.\ case.} \label{fig:sub21}} \end{figure} In the case of dependent observations we generate both regressors and errors by $AR(1)$ processes, with parameter $\rho =0.6$, that is $$ \tilde X_n = \rho \tilde X_{n-1} + X_{n}, \quad \quad \tilde \varepsilon_n = \rho \tilde \varepsilon_{n-1} + \varepsilon_{n}, $$ where the random variables $X_n$ and $ \varepsilon_n$ are i.i.d.\ random functions, generated as in the independent case (see equation \eqref{regressors} and following discussion). In all simulations a burn in period of $200$ repetitions is used. Finally we turn to the operators $S_0$ and $S$, both of which are integral operators, defined as $$ S f \mapsto \int_0^1 \varphi_S(s,\cdot ) f(s) \mu(s), \quad \quad \textnormal{and} \quad \quad S_0 f \mapsto \int_0^1 \varphi_{S_0}(s,\cdot ) f(s) d\mu(s), $$ pointwise for a function $f \in (L^2[0,1], \mu)$, where $\varphi_{S}$ and $\varphi_{S_0}$ are the integral kernels corresponding to $S$ and $S_0$. We first define the benchmark kernel $\varphi_{S_0}$ as in \cite{benatia2017}, by $$ \varphi_{S_0}(s,t) = 1 -|s-t|^2 $$ and then the slightly more complex regression kernel $\varphi_S$ as $$ \varphi_S(s,t) = 1 -4/5 |s-t|^2 + 1/5 \cos( |s-t|/5). $$ In Figure \ref{fig2} we plot the two kernel functions, to illustrate their shape differences. The difference between the kernels can be asessed by the relative deviation measure $$ 1 - \frac{\vvvert S- S_0 \vvvert^2}{\vvvert S_0 \vvvert^2} = 1 - \frac{\int_0^1 \big[ \varphi_{S}(s,t) -\varphi_{S_0}(s,t) \big]^2 ds \, dt }{\int_0^1 \varphi_{S_0}(s,t)^2 ds \, dt } \approx 0.032 $$ (since $\vvvert S \vvvert^2 \approx \vvvert S_0 \vvvert^2$ it does not matter by which norm we normalize). \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=200pt]{Functions1.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=200pt]{Functions2.png}\\[-2ex] \end{subfigure} \caption{\label{fig2} \textit{ Image of the two integration kernels, plotted as surfaces. Left: $\varphi_S$. Right: $\varphi_{S_0}$. }} \end{figure} Before we consider the estimation problem, it is reasonable to investigate the complexity of the two slopes $S$ and $S_0$, relative to the principal components of the operator $\Gamma$. For this purpose we consider the measure of relative explanation \begin{equation} \label{h7} \frac{ \vvvert S \Pi_{ k }- S_0 \Pi_{ k }\vvvert^2 }{ \vvvert S- S_0 \vvvert^2 }, \end{equation} which varies in the interval $[0,1]$ and is increasing in $k$. A value of $1$ means that $S-S_0$ acts exclusively on $\operatorname{span}\{e_1, \ldots ,e_k\}$, whereas a value of $0$ implies that $S-S_0$ lives on the orthogonal complement. A rapid increase in $k$ corresponds to a high degree of smoothness in the sense of Assumption~\ref{ass31}(1) and hence to a small bias. However, smoothness of the slopes is not enough, since one also has to be able to estimate the principal components of $\Gamma$ properly. This corresponds to eigenvalues $\lambda_1, \lambda_2, \ldots$ of $\Gamma$ (and eigengaps), which are not too small. \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.9\linewidth,height=160pt]{Coverage.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.9\linewidth,height=160pt]{Eigenvalues.png}\\[-2ex] \end{subfigure} \caption{\label{fig3} \textit{Left: The measure \eqref{h7} as a function of $k$. Right: First $9$ eigenvalues of the operator $\Gamma$. }} \end{figure} In left part of Figure \ref{fig3} we display the measure \eqref{h7} as a function of $k$ and observe a quick increase for $k \le 5$ up to $95\%$. In the right part of the figure we present the decaying eigenvalues of the operator $\Gamma$ (in the case of independent variables). Here we observe a fast decay followed by a sharp elbow. The first three eigengaps are rather large, but afterwards the distinction becomes increasingly difficult. Indeed even for a large sample size of $N=1000$, the recovery of more than $5$ eigenfunctions is somewhat unstable, resulting in inflated rejection probabilities at the boundary of the hypothesis. Together these considerations suggest that choices of $k$ between $4$ and $5$ are optimal, depending on the sample size $N$. \medskip Throughout this section all empirical results are based on $1000$ simulation runs. In order to investigate the power of the test \eqref{test_decision} for the relevant hypotheses \eqref{relevant_difference} we consider the sample sizes of $N= 50, 200, 500$ and $k=3,4,5$ (note that $k=3$ is rather small for practical inference and only included to illustrate aspects of the bias-variance trade-off). The measure $\nu$ in the definition of the normalizer~\eqref{denominator} is the uniform distribution on the set $\{1/5, 2/5, 3/5, 4/5\}$. Simulations for other measures, which are not reported for the sake of brevity, suggest that the number of points does not have a large or systematic impact on the results. In Figure~\ref{fig4} we display the rejection probability of the self-normalized test \eqref{test_decision} as a function of the threshold $\Delta$ in the hypothesis~\eqref{relevant_difference}. A vertical grey line indicates the true value of $\vvvert S- S_0\vvvert^2 \approx 0.023$ and corresponds to the boundary of the hypotheses, while the grey horizontal line shows the nominal level $\alpha$, which is chosen as $\alpha = 0.05$. The left column shows the results for the i.i.d.\ case, while the results for the dependent case can be found in the right column. The plots can be evaluated as follows: \begin{figure}[H] \ContinuedFloat \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep0N50.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep1N50.png} \end{subfigure} \end{figure} $ $\\[-15ex] \begin{comment} \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep0N100.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep1N100.png}\\[-2ex] \end{subfigure} \end{figure} \end{comment} % \begin{figure}[H] \ContinuedFloat \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep0N200.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep1N200.png}\\[-2ex] \end{subfigure} \end{figure} $ $\\[-15ex] \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep0N500.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{dep1N500.png}\\[-2ex] \end{subfigure} \caption{\label{fig4} \textit{Rejection probabilities ($y$-axis) of the test \eqref{test_decision} for different choices of $\Delta$ ($x$-axis). Different sizes of $N$ and $k$ are displayed, for i.i.d.\ observations (left) and dependent observations (right). The level $\alpha=0.05$ is indicated by the horizontal grey line, and the true size of $\vvvert S- S_0\vvvert^2$ by the vertical line.}} \end{figure} If $\Delta <\vvvert S- S_0\vvvert^2\approx 0.023 $ (left of the vertical line) we operate under the alternative (see \eqref{relevant_difference}) and expect high rejection probabilities. At the boundary of the hypotheses corresponding to the vertical line we expect to approximate $\alpha$, whereas for larger values of $\Delta$ the asymptotic theory developed in Section~\ref{sec3} suggests that the rejection probability tends to $0$; see Remark~\ref{remark_centering}(2). Because the test statistic is a monotone function of $\Delta$, the rejection probability decreases monotonically in $\Delta$; see Remark~\ref{remark_centering}(3). Before we evaluate the specific performance of the test \eqref{test_decision}, we illustrate in Figure~\ref{fig4} some general features of the linear inverse problem. Evidently the rejection curves exhibit the bias variance trade-off, which occurs at the level of $k$. For $k = 3$ we observe a substantial bias, which we would expect, in view of Figure~\ref{fig3} (left). It diminishes rapidly for $k=4$ and $k=5$. In view of our discussion of \eqref{decomposition} we should understand the left shifts of the rejection curves as a result of the bias, which makes the test somewhat conservative. The upside of smaller values of $k$ is the accompanying small variance, manifest in the rapid decay of the rejection curves. For larger values of $k$ the variance increases and this may result in inflated rejection probabilities at the boundary (e.g. for $N=50$ and the too large choice $k=5$). With regard to the statistical properties of the test presented in \eqref{test_decision}, we observe a reasonable level approximation at the boundary, even for sample sizes as small as $50$ in the independent scenario. Dependence in the observations leads to worse performance, particularly for samples as small as $N=50$, whereas the effect for $N= 200, 500$ is minute. The power of the test is for independent observations even for $N=50$ acceptable and for larger samples, we observe rapid improvements, even for greater values of $k$. In the dependent case for $N=200, 500$ we observe a good level approximation at the boundary and high rejection probabilities under the alternative. Interestingly the bias-variance trade-off sometimes implies that while some $k$ leads to the optimal level approximation at the boundary and thus high power close to the hypothesis, for larger distances smaller values of $k$ perform better, because the variance is smaller. This effect is reflected by crossing rejection curves. Finally, we notice that in view of the sometimes abrupt change in variance and bias for two successive values of $k$, in practice a soft threshold might be considered, for a more nuanced trade-off. \subsection{Inference for relevant prediction errors} We consider the set-up described in the previous section to investigate deviation in the predictive performance of $S$ and $S_0$. We begin by considering the smoothed kernels $S \Gamma^{1/2}$ and $S_0 \Gamma^{1/2}$, which are depicted in Figure~\ref{fig5} (for $\Gamma$ corresponding to the i.i.d.\ case). Even though they bear some resemblance to their originals (see Figure~\ref{fig2}), we observe a high smoothing effect caused by the application of $\Gamma^{1/2}$. \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=200pt]{Functions3.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=200pt]{Functions4.png}\\[-2ex] \end{subfigure} \caption{\label{fig5} \textit{ Image of the two integration kernels, plotted as surfaces. Left: $\varphi_{S \Gamma^{1/2}}$. Right: $\varphi_{S_0\Gamma^{1/2}}$. }} \end{figure} As a consequence of the smoothing effect, we expect that the relative explanation should be higher than for the non-smoothed operators. This is in fact what we see in Figure~\ref{fig6} (left), where we have plotted the relative explanation measure \begin{equation} \label{h8} \frac{\vvvert S\Gamma^{1/2}\Pi_{ k }- S_0\Gamma^{1/2} \Pi_{ k }\vvvert^2}{\vvvert S\Gamma^{1/2}-\ S_0\Gamma^{1/2} \vvvert^2}. \end{equation} We see that the first principal component already covers more than $ 75 \%$ of the norm, for $k = 3$ the relative explanation is about $99 \%$ and for $k =4$ it has reached almost $100\%$. Compared to the explanation for the non-smoothed kernel in Figure~\ref{fig3} (left) this is a very rapid increase and it suggests the use of smaller values for $k$. Notice that this matches our theoretical results in Sections~\ref{sec3} and \ref{sec4} (compare Assumptions~\eqref{ass31}(7) and \ref{ass41})), which suggest higher $k$ for the recovery of the slope and smaller $k$ for the purpose of prediction. On the right side of Figure~\ref{fig6} we display the smoothing kernel corresponding to the operator $\Gamma^{1/2}$ in the case of i.i.d.\ observations.\\ \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.9\linewidth,height=160pt]{smoothed_coverage.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=1\linewidth,height=200pt]{root_Gamma.png}\\[-2ex] \end{subfigure} \caption{\label{fig6} \textit{ Left: Relative explanation measure defined in \eqref{h8} as a function of $k$. Right: Kernel of the operator $\Gamma^{1/2}$ (for i.i.d.\ observations). }} \end{figure} We now proceed to the application of the statistical test \eqref{test_decision_2}, presented in Section~\ref{sec4} for the hypothesis~\eqref{relevant_prediction_error}. As in Section~\ref{sec61} we consider sample sizes $N = 50, 200, 500$ and parameter choices $k=1,2,3$, both for i.i.d.\ samples (left part of the figures) and dependent samples (right part of the figures). For details on the model as well as the dependence we refer to Section~\ref{sec61}. The measure $\nu$ in the normalizer $\hat V_N^{\rm pred}$ (see \eqref{denominator_2}) is again chosen to be the uniform measure on $\{1/5, 2/5, 3/5, 4/5\}$ and the level of the test is $\alpha = 0.05$. All simulations are based on $1000$ repetitions. Notice that the absolute deviation (vertical grey line) differs in the case of independent and dependent data, since the operator $\Gamma$ is different in the dependent and independent case. \begin{figure}[H] \ContinuedFloat \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep0N50.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep1N50.png} \end{subfigure} \end{figure} $ $\\[-15ex] % \begin{comment} \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep0N100.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep1N100.png}\\[-2ex] \end{subfigure} \end{figure} \end{comment} \begin{figure}[H] \ContinuedFloat \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep0N200.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep1N200.png}\\[-2ex] \end{subfigure} \end{figure} $ $\\[-15ex] \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep0N500.png}\\[-1ex] \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.85\linewidth,height=180pt]{preddep1N500.png}\\[-2ex] \end{subfigure} \caption{\label{fig7} \textit{Rejection probabilities ($y$-axis) of the test \eqref{test_decision_2} for different choices of $\Delta$ ($x$-axis). Different sizes of $N$ and $k$ are displayed, for i.i.d.\ observations (left) and dependent observations (right). The level $\alpha=0.05$ is indicated by the horizontal grey line, and the true size of $\vvvert S \Gamma^{1/2} - S_0 \Gamma^{1/2}\vvvert^2$ by a vertical line.}} \end{figure} The numerical results confirm the theoretical findings in Section~\ref{sec4}. We observe a good approximation of the level at the boundary of the hypothesis, both for dependent and independent data and accordingly high rejection probabilities under the alternative. The smoothing parameter is chosen smaller than in the case of prediction, which corresponds to the smaller bias in the case of prediction. In contrast to Section~\ref{sec61} we do not see pronounced crossing of the power curves for different $k$, such that better level approximation automatically translates into higher overall power. This also is an effect of the relatively small bias in the case of prediction. \bigskip \bigskip \nocite{*}
\section{Introduction} \label{sec:int} To date it is possible to perform most collider-physics studies with fully-differential NLO+PS matching thanks to two general, well-developed, and widely applied procedures: M\protect\scalebox{0.8}{C}@N\protect\scalebox{0.8}{LO}\xspace \cite{Frixione:2002ik} and P\protect\scalebox{0.8}{OWHEG}\xspace \cite{Nason:2004rx}. By fully differential matching, we understand that the matching is done point by point in both the Born- and real-emission phase spaces, with a parton shower that reflects the correct singular structure of the fixed-order calculation. In this sense, fully-differential matching requires the fixed-order expansion of the shower to develop the same singularities as the fixed-order calculation up to the matched order. At NLO, this is achieved by parton showers that exponentiate terms reducing to the universal DGLAP kernels in any collinear limit and the eikonal factor in soft limits, with the colour dependence in the soft limit requiring special attention~\cite{Hoeche:2011fd}. As of today, no fully-differential matching method obeying these criteria is available at NNLO, although significant progress on including higher-order corrections to parton showers has been made \cite{Li:2016yez,Hoche:2017iem,Hoche:2017hno,Dulat:2018vuy}. Existing NNLO+PS matching methods either extend existing merging schemes or utilise analytical resummation for the transition between the fixed-order and parton-shower realms. Examples of the first kind are UN$^2$LOPS\xspace \cite{Hoche:2014uhw}, which extends the UNLOPS\xspace \cite{Lonnblad:2012ix} scheme to the second order, and MiNNLO$_{\mathrm{PS}}$\xspace \cite{Monni:2019whf,Re:2021vcb} as well as other extensions~\cite{Hamilton:2013fea,Karlberg:2014qua,Astill:2016hpa,Astill:2018ivh,Hamilton:2012rf,Frederix:2015fyz,Hu:2021rkt} of the MiNLO\xspace technique \cite{Hamilton:2012np}. The UN$^2$LOPS\xspace scheme has recently been generalised to processes with an additional jet in the context of an UNLOPS\xspace-based N$^3$LO+PS matching strategy \cite{Prestel:2021vww}. The MiNLO\xspace-based schemes may be seen as a hybrid approach, since they use a combination of analytical and numerical resummation. A noteworthy example of a scheme employing the latter approach is implemented in the G\protect\scalebox{0.8}{ENEVA}\xspace framework \cite{Alioli:2013hqa,Alioli:2021qbf}. While all of these have enabled impressive phenomenological studies \cite{Hoche:2014uhw,Hoche:2014dla,Hoche:2018gti,Alioli:2015toa,Alioli:2016wqt,Cridge:2021hfr,Monni:2020nks,Lombardi:2020wju,Lombardi:2021rvg,Mazzitelli:2020jio,Buonocore:2021fnj} and provide pathways to matching precision calculations to event generators, they do not provide the same level of theoretical control as the fully-differential matching methods that are available at NLO. In this letter, we present for the first time a fully-differential NNLO+PS matching scheme for final-state parton showers, restricting ourselves to the case of two coloured final-state particles. The new method combines NNLO antenna subtraction with the sector-antenna shower in V\protect\scalebox{0.8}{INCIA}\xspace~\cite{Brooks:2020upa}, suitably extended to include real-virtual and double-real corrections. A key aspect of the new technique is that the parton shower is employed only as an efficient Sudakov-weighted phase-space generator. It does not define the infrared subtraction terms that are key to M\protect\scalebox{0.8}{C}@N\protect\scalebox{0.8}{LO}\xspace type matching strategies. The letter is structured as follows. We review the matching method at NLO in \cref{sec:strategyNLO} before extending it to the NNLO in \cref{sec:strategyNNLO}, retaining a rather general notation. A numerical implementation in the V\protect\scalebox{0.8}{INCIA}\xspace sector-antenna shower in P\protect\scalebox{0.8}{YTHIA}\xspace 8.3~\cite{Sjostrand:2014zea} is described in \cref{sec:implementation}, featuring a more detailed description of the matching scheme. We conclude in \cref{sec:conclusions} and provide an outlook on applications beyond the simple cases considered here. \section{NLO Matching Strategy}\label{sec:strategyNLO} Our matching strategy generalises the technique first developed in \cite{Norrbin:2000uu}, which nowadays is referred to as the P\protect\scalebox{0.8}{OWHEG}\xspace scheme \cite{Nason:2004rx,Frixione:2007vw,Alioli:2010xd}. To start with, it is thus useful to recap the NLO matching strategy, before moving on to the new NNLO technique. At NLO, the expected value of an infrared-safe observable $O$ defined on a two-particle final state process with a colourless initial state is given by \begin{align} &\avg{O}_\mathrm{NLO} = \int \, \ensuremath{\,\text{d}} \Phi_2 \left[ {\mathrm{B}}(\Phi_2) + {\mathrm{V}}(\Phi_2) + {\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2) \right] O(\Phi_2) \nonumber \\ &+\int \, \ensuremath{\,\text{d}} \Phi_3 \left[ {\mathrm{R}}(\Phi_3) O(\Phi_3) - {\mathrm{S}}^\mathrm{NLO}(\Phi_3) O(\Phi_2(\Phi_3)) \right] \, , \label{eq:expvalNLO} \end{align} where ${\mathrm{B}}$ and ${\mathrm{V}}$ denote the Born cross section and virtual correction, differential in the two-particle phase space $\Phi_2$. Similarly, ${\mathrm{R}}$ denotes the real-radiation cross section differential in the three-particle phase space $\Phi_3$, and ${\mathrm{S}}^\mathrm{NLO}$ denotes the differential NLO subtraction term in the antenna subtraction method, with its integral over the antenna phase space given by ${\mathrm{I}}^\mathrm{NLO}_{\mathrm{S}}$.\footnote{Other well-established NLO subtraction schemes such as FKS~\cite{Frixione:1995ms} or dipole subtraction~\cite{Catani:1996vz} may equally well be employed here.} In order to achieve a Born-local cancellation of the subtraction term upon integration over the real-emission phase space, the observable acting on ${\mathrm{S}}^\mathrm{NLO}$ must be evaluated at the reduced phase-space point $\Phi_2(\Phi_3)$, where the precise mapping from the three-parton to the two-parton state depends on the subtraction scheme. We can invert this mapping and factorise the phase space into the 2-particle (Born) phase space $\Phi_2$, and the one-particle radiation phase space $\Phi_{+1}$, \begin{equation} \ensuremath{\,\text{d}}\Phi_{3} = \ensuremath{\,\text{d}}\Phi_{2}\times\ensuremath{\,\text{d}}\Phi_{+1} \, . \end{equation} By defining a Born-local NLO weight, \begin{multline}\label{eq:local_kfac_nlo} k_\mathrm{NLO}(\Phi_2) := 1 + \frac{{\mathrm{V}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} \\ + \int \ensuremath{\,\text{d}} \Phi_{+1}\, \left[\frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} - \frac{{\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)}\right] \end{multline} \cref{eq:expvalNLO} can be rewritten as \begin{multline}\label{eq:born_local_nlo} \avg{O}_\mathrm{NLO} = \int \ensuremath{\,\text{d}} \Phi_2 \, {\mathrm{B}}(\Phi_2)\, \Bigg[ k_\mathrm{NLO}(\Phi_2) O(\Phi_2)\\ + \int \ensuremath{\,\text{d}} \Phi_{+1}\,\frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} \left( O(\Phi_2,\Phi_{+1}) - O(\Phi_2) \right) \Bigg] \, . \end{multline} The parton-shower evolution, on the other hand, is described by a generating functional, the shower operator, recursively defined for an infrared-safe observable $O$ by \begin{align} {\mathcal{S}}_n(t,O) &= \Delta_n(t,\ensuremath{t_\mathrm{c}}) O(\Phi_n) \label{eq:showerOperator}\\ & + \int^t_{\ensuremath{t_\mathrm{c}}}\ensuremath{\,\text{d}}\Phi_{+1}\, {\mathrm{A}}^{(0)}_n(\Phi_{+1}) \Delta_n(t,t') {\mathcal{S}}_{n+1}(t',O) \, , \nonumber \end{align} where ${\mathrm{A}}^{(0)}_n(\Phi_{+1})$ is the sum of all leading-order antenna functions\footnote{We refer to NLO antenna subtraction terms as LO antenna functions.} competing for the next branching $IK \mapsto ijk$ off the $n$-parton configuration, \begin{align}\label{eq:ps_partitioning} &\int^t_{\ensuremath{t_\mathrm{c}}}\ensuremath{\,\text{d}}\Phi_{+1}\, {\mathrm{A}}^{(0)}_{n\mapsto n+1}(\Phi_{+1}) \\ &\qquad := \int^t_{\ensuremath{t_\mathrm{c}}} \sum\limits_{j\in \{n\mapsto n+1\}}A_{j/IK}^{(0)}\left(\Phi_{+1}^j\right) \, \ensuremath{\,\text{d}}\Phi_{+1}^j \, , \nonumber \\ &\qquad = \sum\limits_{j\in \{n\mapsto n+1\}} \int^t_{\ensuremath{t_\mathrm{c}}}\, \frac{\ensuremath{\alpha_{\mathrm{s}}}(t)}{4\uppi} {\mathcal{C}}_{j/IK} \bar{A}^{(0)}_{j/IK}(t,\zeta,\phi) \ensuremath{\,\text{d}} t \ensuremath{\,\text{d}} \zeta \frac{\ensuremath{\,\text{d}} \phi}{2\uppi}\nonumber \end{align} with the sum and shower variables left implicit in our notation. Note that when working in the sector antenna framework~\cite{Kosower:1997zr,Kosower:2003bh, Larkoski:2009ah,Lopez-Villarejo:2011pwr,Brooks:2020upa}, Eq.~\eqref{eq:ps_partitioning} implicitly defines a partitioning of the real-emission term along with the associated subtractions in Eq.~\eqref{eq:local_kfac_nlo}. This is crucial to avoid double-counting of radiative corrections generated by the parton shower. The associated Sudakov factor is given by \begin{equation} \Delta_n^\mathrm{LO}(\ensuremath{t_0},t) = \exp{-\int^{\ensuremath{t_0}}_{t}\ensuremath{\,\text{d}}\Phi_{+1}\, {\mathrm{A}}_{n\mapsto n+1}^{(0)}(\Phi_{+1})} \, . \end{equation} Taking only the first shower emission into account, the expected value of the observable $O$ at LO is given by \begin{multline} \avg{O}_{\mathrm{LO}+\mathrm{PS}} = \int \ensuremath{\,\text{d}} \Phi_2 \, {\mathrm{B}}(\Phi_2)\, \Big[\Delta(\ensuremath{t_0},\ensuremath{t_\mathrm{c}}) O(\Phi_2) \nonumber \\ + \int \ensuremath{\,\text{d}} \Phi_{+1}\, {\mathrm{A}}^{(0)}_{2\mapsto3}(\Phi_{+1}) \Delta(\ensuremath{t_0},t) O(\Phi_2,\Phi_{+1}) \Big] \, . \end{multline} This implies that upon the replacement \begin{align} {\mathrm{B}}(\Phi_2) &\to k_\mathrm{NLO}(\Phi_2) {\mathrm{B}}(\Phi_2) \nonumber\\ {\mathrm{A}}^{(0)}_{2\mapsto 3} &\to w^\mathrm{LO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) {\mathrm{A}}^{(0)}_{2\mapsto 3} \end{align} where we have defined the $2\mapsto 3$ LO matrix-element correction factor, \begin{equation} w^\mathrm{LO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) = \frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{{\mathrm{A}}^{(0)}_{2\mapsto3}(\Phi_{+1}){\mathrm{B}}(\Phi_2)} \, , \label{eq:LOMEC2to3} \end{equation} the following matching formula is NLO accurate up to terms appearing at order $\ensuremath{\alpha_{\mathrm{s}}}^2$ \begin{align} \avg{O}_{\mathrm{NLO}+\mathrm{PS}} = \int \ensuremath{\,\text{d}} \Phi_2 \, {\mathrm{B}}(\Phi_2)\, k_\mathrm{NLO}(\Phi_2)\Big[\Delta(\ensuremath{t_0},\ensuremath{t_\mathrm{c}}) O(\Phi_2) \nonumber \\ + \int^{\ensuremath{t_0}}_{\ensuremath{t_\mathrm{c}}} \ensuremath{\,\text{d}} \Phi_{+1}\, w^\mathrm{LO}_{2\mapsto3}{\mathrm{A}}_{2\mapsto3}(\Phi_{+1}) \Delta(\ensuremath{t_0},t) O(\Phi_2,\Phi_{+1}) \Big] \, . \end{align} This can be seen by expanding the result to order $\ensuremath{\alpha_{\mathrm{s}}}$. \section{NNLO Matching Strategy} \label{sec:strategyNNLO} We now turn to the main result of this work, the definition of a fully-differential NNLO matching strategy for processes with two coloured final-state particles. It is applicable to both decays of colour singlets as well as scattering processes as long as all initial-state particles are colourless, for instance as in $e^+e^- \to jj$. In the antenna formalism, the expected value for an infrared-safe observable of a process with two coloured final-state particles is given at NNLO by \begin{align} \avg{O}_\mathrm{\small{NNLO}} &= \int \ensuremath{\,\text{d}}\Phi_2 \, \Big[ {\mathrm{B}}(\Phi_2) + {\mathrm{V}}(\Phi_2) + {\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2) \nonumber \\ &\qquad + {\mathrm{V\kern-0.15em V}}(\Phi_2) + {\mathrm{I}}_{{\mathrm{T}}}(\Phi_2) + {\mathrm{I}}_{{\mathrm{S}}}(\Phi_2)\Big]\, O(\Phi_2) \nonumber \\ &+ \int \ensuremath{\,\text{d}}\Phi_3 \, \Big[ {\mathrm{R}}(\Phi_2,\Phi_{+1})O(\Phi_2,\Phi_{+1}) \nonumber \\ &\qquad - {\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1})O(\Phi_2) \nonumber \\ &\qquad + {\mathrm{R\kern-0.15emV}}(\Phi_2,\Phi_{+1})O(\Phi_2,\Phi_{+1}) \nonumber \\ & \qquad + {\mathrm{T}}(\Phi_2,\Phi_{+1},O) \Big] \nonumber \\ &+ \int \ensuremath{\,\text{d}}\Phi_4 \, \Big[{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+2})O(\Phi_2,\Phi_{+2}) \nonumber \\ &\qquad - {\mathrm{S}}(\Phi_2,\Phi_{+2},O) \Big] \, , \label{eq:expvalNNLO} \end{align} where ${\mathrm{R\kern-0.15em R}}$ is the differential double-real radiation cross section and ${\mathrm{R\kern-0.15emV}}$ and ${\mathrm{V\kern-0.15em V}}$ denote the differential virtual (one-loop) and double-virtual (two-loop) corrections to the real-radiation cross section ${\mathrm{R}}$ and the Born cross section ${\mathrm{B}}$, respectively. In this context, the term ${\mathrm{S}}^\mathrm{NLO}$ denotes the differential NLO real antenna subtraction term, ${\mathrm{S}}$ denotes the differential NNLO double-real antenna subtraction term \cite{GehrmannDeRidder:2004tv,GehrmannDeRidder:2005aw,GehrmannDeRidder:2005hi,GehrmannDeRidder:2005cm}, \begin{multline} {\mathrm{S}}(\Phi_2,\Phi_{+2},O) = {\mathrm{S}}^{a}(\Phi_2,\Phi_{+2})O(\Phi_2) + {\mathrm{S}}^{b}(\Phi_3,\Phi_{+1})O(\Phi_3) \\ - {\mathrm{S}}^c(\Phi_2,\Phi_{+1},\Phi_{+1}')O(\Phi_2) \label{eq:SNNLORR} \end{multline} and ${\mathrm{T}}$ denotes the differential NNLO real-virtual antenna subtraction term \cite{GehrmannDeRidder:2004tv,GehrmannDeRidder:2005aw,GehrmannDeRidder:2005hi,GehrmannDeRidder:2005cm}, \begin{multline} {\mathrm{T}}(\Phi_2,\Phi_{+1},O) = {\mathrm{T}}^{a}(\Phi_2,\Phi_{+1})O(\Phi_2) + {\mathrm{T}}^{b}(\Phi_3)O(\Phi_3) \\ - {\mathrm{T}}^{c}(\Phi_2,\Phi_{+1})O(\Phi_2) \label{eq:TNNLORV} \end{multline} Their integrated counterparts are given by ${\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}$, ${\mathrm{I}}_{{\mathrm{T}}}$, and ${\mathrm{I}}_{{\mathrm{S}}}$. In this context, terms labelled with superscript $a$ constitute the double-real/real-virtual subtraction terms with compensating terms labelled with a superscript $c$ that remove spurious single-unresolved singularities. The single-unresolved singularities are captured by the NLO subtraction terms of the $+1$-jet calculation, labelled with superscript $b$, \begin{equation} {\mathrm{S}}^b(\Phi_3,\Phi_{+1}') \equiv {{\mathrm{S}}}^\mathrm{NLO}(\Phi_3,\Phi_{+1}')\, , \quad {\mathrm{T}}^b(\Phi_3) \equiv {\mathrm{I}}_{{\mathrm{S}}}^\mathrm{NLO}(\Phi_3) \, . \label{eq:subtTermsNLO1jet} \end{equation} The terms labeled with superscript $b$ and $c$ cancel independently in eq.~\eqref{eq:expvalNNLO}. They are constructed such as to make the integrals individually infrared finite and thus amenable to evaluation with Monte-Carlo methods. As for the NLO case, we define a Born-local weight, \begin{align}\label{eq:born_local_nnlo_kfactor} k_\mathrm{NNLO}(\Phi_2) &:= 1 + \frac{{\mathrm{V}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} \\ &+ \frac{{\mathrm{V\kern-0.15em V}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{I}}_{{\mathrm{T}}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{I}}_{{\mathrm{S}}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} \nonumber \\ &+ \int \ensuremath{\,\text{d}}\Phi_{+1}\, \Big[\frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} - \frac{{\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} \nonumber \\ &\qquad+\frac{{\mathrm{R\kern-0.15emV}}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{T}}(\Phi_2,\Phi_{+1})}{{\mathrm{B}}(\Phi_2)} \Big] \nonumber \\ &+ \int \ensuremath{\,\text{d}}\Phi_{+2}\, \Big[\frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+2})}{{\mathrm{B}}(\Phi_2)} - \frac{{\mathrm{S}}(\Phi_2,\Phi_{+2})}{{\mathrm{B}}(\Phi_2)} \Big]\nonumber \, , \end{align} which will be used to construct the NNLO matching formula, and which can be used to perform the fixed-order computation in complete analogy to eq.~\eqref{eq:born_local_nlo}. Here, $\ensuremath{\,\text{d}}\Phi_{+2}$ is the two-particle radiation phase space that enters the factorised $n+2$-particle phase space \begin{equation} \ensuremath{\,\text{d}}\Phi_{n+2} = \ensuremath{\,\text{d}}\Phi_{n} \times \ensuremath{\,\text{d}}\Phi_{+2}\,. \end{equation} We shall further need to distinguish between an ordered and unordered component of the two-particle radiation phase space, according to the following partition of unity: \begin{align} \ensuremath{\,\text{d}}\Phi_{+2} &= \theta(t'-t)\ensuremath{\,\text{d}}\Phi_{+2} + \theta(t-t')\ensuremath{\,\text{d}}\Phi_{+2} \, ,\nonumber \\ &= \ensuremath{\,\text{d}}\Phi_{+2}^> + \ensuremath{\,\text{d}}\Phi_{+2}^< \, . \end{align} The ordered part $\ensuremath{\,\text{d}}\Phi_{+2}^<$ corresponds to the region accessible to strongly-ordered shower paths $\ensuremath{t_0} > t > t'$, whereas the unordered part $\ensuremath{\,\text{d}}\Phi_{+2}^>$ is inaccessible to strongly-ordered showers because of the larger intermediate scale $\ensuremath{t_0} > t' > t$. We will use V\protect\scalebox{0.8}{INCIA}\xspace's sector criterion, cf.\ sec.~3.3 in \cite{Brooks:2020upa}, to distinguish between the two, cf.~\cref{subsec:2to4}. In order to be able to match the NNLO calculation with the shower, the shower needs to incorporate virtual corrections to ordinary $2\to 3$ branchings as well as new $2\to 4$ branchings, accounting for the simultaneous emission of two particles. These new shower terms correspond to the real-virtual and double-real corrections in the NNLO calculation. In addition, we need to incorporate the corresponding parton-shower counterterms. We start by defining the two-particle NLO Sudakov as \cite{Li:2016yez} \begin{multline} \Delta_2^\mathrm{NLO}(\ensuremath{t_0},t) \\ = \exp\Bigg\{-\int^{\ensuremath{t_0}}_{t}\ensuremath{\,\text{d}}\Phi_{+1}\, {\mathrm{A}}_{2\mapsto3}^{(0)}(\Phi_{+1}) w^\mathrm{NLO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) \Bigg\} \\ \times \exp\Bigg\{-\int^{\ensuremath{t_0}}_{t}\ensuremath{\,\text{d}}\Phi_{+2}^>\, {\mathrm{A}}_{2\mapsto 4}^{(0)}(\Phi_{+2})w^\mathrm{LO}_{2\mapsto4}(\Phi_2,\Phi_{+2}) \Bigg\} \, , \label{eq:nloSudakov} \end{multline} where we have introduced the $2\mapsto4$ LO matrix-element correction factor, \begin{equation} w^\mathrm{LO}_{2\mapsto4}(\Phi_2,\Phi_{+2}) = \frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+2})}{{\mathrm{A}}^{(0)}_{2\mapsto4}(\Phi_{+2}){\mathrm{B}}(\Phi_2)} \label{eq:LOMEC2to4} \end{equation} and the $2\mapsto3$ NLO matrix-element correction factor $w^\mathrm{NLO}_{2\mapsto3}(\Phi_{+1})$, which we write in terms of a second order correction to the LO $2\mapsto 3$ MEC in \cref{eq:LOMEC2to3}, \begin{multline} w^\mathrm{NLO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) = w^\mathrm{LO}_{2\mapsto3}(\Phi_2,\Phi_{+1})\\ \times\big(1+\tilde{w}^\mathrm{FO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) +\tilde{w}^\mathrm{PS}_{2\mapsto3}(\Phi_2)\big)\,. \label{eq:NLOMEC2to3} \end{multline} The coefficients $\tilde{w}$ are given by matching the $\Order{\ensuremath{\alpha_{\mathrm{s}}}^2}$ terms in the expansion of the truncated shower approximation to the fixed-order result in \cref{eq:expvalNNLO} \cite{Li:2016yez,Hartgring:2013jma}. We find the fixed-order contribution \begin{multline} \tilde{w}^\mathrm{FO}_{2\mapsto3}(\Phi_2,\Phi_{+1})=\\ \frac{{\mathrm{R\kern-0.15emV}}(\Phi_2,\Phi_{+1})}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} + \int^{t}_{0}\ensuremath{\,\text{d}}\Phi_{+1}^\prime\, \frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+1},\Phi_{+1}^\prime)}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} \\ -\left(\frac{{\mathrm{V}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)}+\int^{\ensuremath{t_0}}_{0}\ensuremath{\,\text{d}}\Phi_{+1}'\,\frac{{\mathrm{R}}(\Phi_2,\Phi_{+1}')}{{\mathrm{B}}(\Phi_2)}\right)\;, \label{eq:VMEC2to3} \end{multline} and the second-order parton-shower matching term \begin{multline} \tilde{w}^\mathrm{PS}_{2\mapsto3}(\Phi_2) = \frac{\ensuremath{\alpha_{\mathrm{s}}}}{2\pi}\ln\frac{\kappa^2\mu_{\rm S}^2}{\ensuremath{\mu}_\mathrm{R}^2}\\ + \int^{\ensuremath{t_0}}_{t}\ensuremath{\,\text{d}}\Phi_{+1}'\, {\mathrm{A}}_{2\mapsto3}^{(0)}(\Phi_{+1}')w^\mathrm{LO}_{2\mapsto3}(\Phi_2,\Phi_{+1}')\;. \end{multline} The factor $\kappa$ is a constant and $\mu_\mathrm{S}^2$ is the parton-shower renormalisation scale. The two are conventionally chosen such that the logarithmic structure of eq.~\eqref{eq:VMEC2to3} is reproduced, which leads to $\mu_\mathrm{S}=p_\perp$ and $\kappa^2=\exp\{K/\beta_0\}$, with $K$ the two-loop cusp anomalous dimension~\cite{Kodaira:1981nh,Davies:1984hs,Davies:1984sp,Catani:1988vd}. This is known as the CMW scheme~\cite{Catani:1990rr}. Note that in \cref{eq:nloSudakov}, the integral over ${\mathrm{A}}_{2\mapsto 4}^{(0)}$ is defined over the range $[t, \ensuremath{t_0}]$, since the ``ordered'' contribution $t'<t$ has been reabsorbed into $\tilde w^\mathrm{FO}_{2\mapsto3}(\Phi_{+1})$. It should be emphasised that we do not require the NLO three-jet calculation to be provided externally but include the correction directly in the shower evolution. This means that, different to the situation in traditional merging approaches, this correction is exponentiated into a Sudakov factor. Up to the first emission, this agrees with the treatment in~\cite{Hoche:2017iem,Dulat:2018vuy} and implicitly includes the contribution from higher-order matching terms and collinear mass factorization counterterms that are needed to recover the NLO DGLAP splitting functions. In addition, we need the $3$-particle Sudakov, which we describe at LO, \begin{multline} \Delta_3^\mathrm{LO}(t,t') \\ = \exp\Bigg\{-\int^{t}_{t'}\ensuremath{\,\text{d}}\Phi^\prime_{+1}\, {\mathrm{A}}_{3\mapsto4}^{(0)}(\Phi^\prime_{+1}) w^\mathrm{LO}_{3\mapsto4}(\Phi_3,\Phi_{+1}^\prime) \Bigg\} \, . \end{multline} with the $3\mapsto 4$ LO matrix-element correction factor, \begin{equation} w^\mathrm{LO}_{3\mapsto4}(\Phi_3,\Phi_{+1}^\prime) = \frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+2})}{{\mathrm{A}}^{(0)}_{3\mapsto4}(\Phi_{+1}^\prime){\mathrm{R}}(\Phi_2,\Phi_{+1})} \, . \label{eq:LOMEC3to4} \end{equation} Up to the second emission, the shower operator is thus given by \begin{align} &{\mathcal{S}}_2(\ensuremath{t_0},O) = \Delta_2^\mathrm{NLO}(\ensuremath{t_0},\ensuremath{t_\mathrm{c}})O(\Phi_2) \label{eq:showerOpNLO} \\ &+ \int^{\ensuremath{t_0}}_{\ensuremath{t_\mathrm{c}}}\ensuremath{\,\text{d}}\Phi_{+1}\, {\mathrm{A}}_{2\mapsto3}^{(0)}(\Phi_{+1})w^\mathrm{NLO}_{2\mapsto3}\Delta^\mathrm{NLO}_2(\ensuremath{t_0},t) \nonumber \\ &\quad \times \Big(\Delta_3^\mathrm{LO}(t,\ensuremath{t_\mathrm{c}})O(\Phi_2,\Phi_{+1})\nonumber \\ &\qquad + \int^t_{\ensuremath{t_\mathrm{c}}}\ensuremath{\,\text{d}}\Phi_{+1}^\prime\, {\mathrm{A}}^{(0)}_{3\mapsto4}(\Phi^\prime_{+1}) w^\mathrm{LO}_{3\mapsto4}(\Phi_3,\Phi_{+1}^\prime)O(\Phi_3,\Phi_{+1}^\prime) \Big) \nonumber \\ &+ \int^{\ensuremath{t_0}}_{\ensuremath{t_\mathrm{c}}}\ensuremath{\,\text{d}}\Phi_{+2}^>\, {\mathrm{A}}_{2\mapsto4}^{(0)}(\Phi_{+2})w^\mathrm{LO}_{2\mapsto4} (\Phi_2,\Phi_{+2})O(\Phi_2,\Phi_{+2}) \nonumber \end{align} and our final NNLO+PS matching formula takes the simple form: \begin{equation} \avg{O}_{\mathrm{NNLO}+\mathrm{PS}} = \int \ensuremath{\,\text{d}} \Phi_2\, {\mathrm{B}}(\Phi_2) k_\mathrm{NNLO}(\Phi_2) {\mathcal{S}}_2(\ensuremath{t_0},O) \, . \label{eq:nnlops} \end{equation} When expanding the truncated shower operator ${\mathcal{S}}_2$ in \cref{eq:nnlops} up to order $\ensuremath{\alpha_{\mathrm{s}}}^2$, NNLO accuracy is recovered for the observable $O(\Phi_2)$, while $O(\Phi_3)$ and $O(\Phi_4)$ achieve NLO and LO accuracy, respectively. This is true, because the combination of the iterated $2\mapsto 3\mapsto 4$ and the direct $2\mapsto 4$ contributions to \cref{eq:showerOpNLO} yields the correct double-real correction ${\mathrm{R\kern-0.15em R}}$ in \cref{eq:expvalNNLO} by means of the LO MEC factors in \cref{eq:LOMEC2to3,eq:LOMEC3to4,eq:LOMEC2to4}. Moreover the NLO correction \cref{eq:NLOMEC2to3} recovers the correct real and real-virtual corrections ${\mathrm{R}}$ and ${\mathrm{R\kern-0.15emV}}$ in \cref{eq:expvalNNLO} by means of \cref{eq:LOMEC2to3} and \cref{eq:VMEC2to3}. \begin{comment} \todo{SH: I think the following paragraph is not needed anymore. We could comment earlier on when we describe the counterterms. One really does not have a choice if one wants to avoid a large logarithm in the NLO weight.} We want to close this section by elaborating upon the renormalisation scales in our calculation. While the fixed-order calculation is renormalised at the scale of the hard process, $\ensuremath{\mu}_\mathrm{R}^2$, the scales in the real-radiation contributions are dictated by the parton-shower resummation, meaning that the strong coupling is evaluated at the emission scales $t \equiv p_\perp^2$. This is reflected in our calculation above by evaluating all antenna functions at the shower scales, \begin{equation} {\mathrm{A}}^{(\ell)}_{n\mapsto n+m}(\Phi_{+m}) \equiv {\mathrm{A}}^{(\ell)}_{n\mapsto n+m}(\Phi_{+m}; p_{\perp,n+m}^2) \, , \end{equation} whereas all matrix-element correction factors and the Born-local (N)NLO weights are evaluated at the renormalisation scale of the hard process, \begin{align} w^\mathrm{MEC}_{n\mapsto n+m}(\Phi_n,\Phi_{+m}) &\equiv w^\mathrm{MEC}_{n\mapsto n+m}(\Phi_n,\Phi_{+m}; \ensuremath{\mu}_\mathrm{R}^2) \, , \\ k_\mathrm{(N)NLO}(\Phi_2) &\equiv k_\mathrm{(N)NLO}(\Phi_2; \ensuremath{\mu}_\mathrm{R}^2) \, . \end{align} This allows the calculation to be reorganised in a way that all logarithms containing scale hierarchies can be reabsorbed in a multiplicative factor. \end{comment} \section{Numerical Implementation} \label{sec:implementation} In this section, we want to present all necessary components of an implementation of our NNLO matching strategy. These are: \begin{itemize} \item a framework to calculate the Born-local NNLO $K$-factors in Eq.~\eqref{eq:born_local_nnlo_kfactor} \item a shower filling the strongly-ordered \cite{Brooks:2020bhi} and unordered \cite{Li:2016yez} regions of the single- and double-emission phase space \item tree-level MECs in strongly-ordered \cite{Fischer:2017yja} and unordered \cite{Giele:2011cb} shower paths \item NLO MECs in the first emission \cite{Hartgring:2013jma} \end{itemize} With the exception of the first point, (process-dependent) implementations of these components existed in previous V\protect\scalebox{0.8}{INCIA}\xspace versions (not necessarily simultaneously), and have been described in detail in the various references. We have (re-)implemented all components in a semi-automated~\footnote{Semi-automated here refers to the fact that antenna subtraction terms are explicitly implemented for each class of processes.} fashion in the V\protect\scalebox{0.8}{INCIA}\xspace antenna shower in P\protect\scalebox{0.8}{YTHIA}\xspace 8.3. We access loop matrix elements via a novel M\protect\scalebox{0.8}{CFM}\xspace \cite{Campbell:1999ah,Campbell:2011bn,Campbell:2015qma,Campbell:2019dru} interface presented in \cite{Campbell:2021vlt} and tree-level matrix elements via a new run-time interface \cite{ComixInterface} to the C\protect\scalebox{0.8}{OMIX}\xspace matrix element generator \cite{Gleisberg:2008fv} in S\protect\scalebox{0.8}{HERPA}\xspace \cite{Gleisberg:2008ta,Sherpa:2019gpd}. Our NNLO matching algorithm can be summarised in the following steps: \begin{enumerate} \item[1.] Generate a phase space point according to the Born cross section ${\mathrm{B}}(\Phi_2)$. \item[2.] Calculate the Born-local NNLO factor $k_\mathrm{NNLO}(\Phi_2)$ and reweight the phase space point by the result. \item[3.] Let the phase-space maximum given by the invariant mass of the two Born partons define the starting scale for the shower, $t_\mathrm{now} = t_0(\Phi_2)$. \item[4.] Starting from the current shower scale, $t_\mathrm{now}$, let the $2\mapsto 3$ and $2\mapsto 4$ showers compete for the highest branching scale. \item[5.] Update the current shower scale to be that of the winning branching, $t_\mathrm{now} = \mathrm{max}(t_{2\mapsto 3},t_{2\mapsto 4})$. \item[6a.] If the winning branching is a $2\mapsto 3$ branching, calculate the accept probability including the NLO MEC $w^\mathrm{NLO}_{2\mapsto3}$. \begin{itemize} \item If rejected, continue from step 4. \item If accepted, continue with a LO shower from the resulting three-particle configuration, starting from $t_\mathrm{now}$ and including the LO MEC $w^\mathrm{LO}_{3\mapsto 4}$ when calculating accept probabilities for the $3\mapsto4$ step. \end{itemize} When a $3\mapsto 4$ branching is accepted (or the shower cutoff scale is reached), continue with step 7. \item[6b.] If the winning branching is a $2\mapsto 4$ branching, calculate the accept probability including the LO MEC $w^\mathrm{LO}_{2\mapsto4}$. \begin{itemize} \item If rejected, continue from step 4. \item If accepted, continue with step 7. \end{itemize} \item[7.] Continue with a standard (possibly uncorrected) shower from the resulting four-particle configuration, starting from $t_\mathrm{now}$. \end{enumerate} It should be emphasised that the matrix-element correction factors make this algorithm independent of the splitting kernels (i.e.\ antenna functions in our case) up to the matched order and the shower merely acts as an efficient Sudakov-weighted phase-space generator. Hence, if the algorithm is stopped after step 6, an NNLO-matched result is obtained, which can be showered by any other parton shower, just as is the case for P\protect\scalebox{0.8}{OWHEG}\xspace NLO matching. Note, that there remains a dependence on the ordering variable, which has to be properly accounted for. \subsection{NNLO Kinematics}\label{subsec:kinematics} For both, the unordered shower contributions and the Born-local NNLO weight, new kinematic maps are needed to reflect their direct $2\mapsto 4$, i.e.\ unordered or double-unresolved, nature. We utilise that the $n$-particle phase space measure may be factorised into the product of a $2\mapsto 3$ antenna phase space and the $n-1$-particle phase space measure, as well as into the product of a $2\mapsto 4$ antenna phase space and the $n-2$-particle phase space. This allows us to write the $2\mapsto 4$ antenna phase space as the product of two $2\mapsto 3$ antenna phase spaces, \begin{multline} \ensuremath{\,\text{d}} \Phi_{+2} (p_I+p_K; p_i, p_{j_1}, p_{j_2}, p_{k}) \\ = \ensuremath{\,\text{d}} \Phi_{+1} (p_I+p_K; \hat{p}_i, \hat{p}_{j}, p_{k}) \\ \times \ensuremath{\,\text{d}} \Phi_{+1} (\hat{p}_i+\hat{p}_j; p_i, p_{j_1}, p_{j_2}) \, , \label{eq:PS2to4} \end{multline} corresponding to the kinematic mapping \begin{equation} p_I + p_K = \hat{p}_i + \hat{p}_j + p_k = p_i + p_{j_1} + p_{j_2} + p_k \, , \end{equation} effectively representing a tripole map \cite{Gehrmann-DeRidder:2003pne}. In line with the phase space factorisation, the kinematic mapping is then constructed as an iteration of two on-shell $2\mapsto 3$ antenna maps given in sec.~2.3 in \cite{Brooks:2020upa}. We have tested the validity of our kinematic maps by comparing V\protect\scalebox{0.8}{INCIA}\xspace's phase-space mappings (double-gluon emission and gluon-emission-plus-splitting) to a flat sampling via R\protect\scalebox{0.8}{AMBO}\xspace. \subsection{Unordered Shower Contributions}\label{subsec:2to4} \begin{figure*}[t] \centering \includegraphics[width=0.4\textwidth]{main205-1.pdf} \includegraphics[width=0.4\textwidth]{main205-2.pdf} \includegraphics[width=0.4\textwidth]{main205-3.pdf} \includegraphics[width=0.4\textwidth]{main205-4.pdf} \caption{Ratio of the evolution variable of the four-parton and three-parton configuration $\log(p_{\perp,4}^2/p_{\perp,3}^2)$ in $e^+e^-\to 4j$. The region $> 0$ corresponds to unordered contributions not reached by strongly-ordered showers.} \label{fig:orderingZDecays} \end{figure*} An important part of our proposal is the inclusion of double-unresolved radiation in the shower evolution. To this end, we employ the sector-antenna framework \cite{Brooks:2020upa} and amend it by direct $2\mapsto 4$ branchings as described in \cite{Li:2016yez}. In the sector-shower approach, each branching is restricted to the region in phase space where it minimises the resolution variable, defined for final-state clusterings by \begin{equation} Q^2_{\mathrm{res},j} = \begin{cases} \frac{s_{ij}s_{jk}}{s_{IK}} & \text{if } j \text{ is a gluon} \\ s_{ij} \sqrt{\frac{s_{jk}}{s_{IK}}} & \text{if } (i,j) \text{ is a quark-antiquark pair} \end{cases} \label{eq:resVar} \end{equation} This is achieved by a ``sectorisation'' of phase space according the partition of unity, \begin{equation} 1 = \sum\limits_j \Theta^\mathrm{sct}_{j/IK} = \sum\limits_j \theta\left(\min\limits_{i}\left\{Q^2_{\mathrm{res},i}\right\} - Q^2_{\mathrm{res},j}\right) \, , \label{eq:sectorVetoLO} \end{equation} which is implemented in the shower evolution as an explicit veto for each trial branching. Since only a single branching kernel contributes per colour-ordered phase space point, sector antenna functions have to incorporate the full singularity structure associated with the respective sector. At LO, this amounts to including both the full single-collinear and single-soft limits in the antenna function. The full set of V\protect\scalebox{0.8}{INCIA}\xspace's LO sector antenna functions is collected in \cite{Brooks:2020upa}. By construction, the default sector shower generates only strongly-ordered sequences\footnote{This is different to virtually any other strongly-ordered shower, where recoil effects introduce unordered sequences. Such phase space points are vetoed in a sector shower.}, as the sector veto ensures that each emission is the softest (or most-collinear) in the post-branching configuration. The inclusion of direct $2\mapsto 4$ branchings (which look unordered from an iterated $2\mapsto 3$ point of view) in the sector shower is facilitated by extending the sector decomposition in \cref{eq:sectorVetoLO} by an ordering criterion, \begin{align} 1 &= \sum\limits_j \left[\Theta^<_{j/IK}\Theta^\mathrm{sct}_{j/IK} + \Theta^>_{j/IK}\Theta^\mathrm{sct}_{j/IK}\right]\\ &= \underbrace{\sum\limits_j \theta\left(\hat{p}_{\perp,\hat{j}}^2 - p_{\perp,j}^2\right)\Theta^\mathrm{sct}_{j/IK}}_{2\mapsto 3 \text{ (strongly ordered)}} + \underbrace{\sum\limits_j \theta\left(p_{\perp,j}^2 - \hat{p}_{\perp,\hat{j}}^2\right)\Theta^\mathrm{sct}_{j/IK}}_{2\mapsto4 \text{ (unordered)}} \nonumber \end{align} where $p_\perp^2$ denotes V\protect\scalebox{0.8}{INCIA}\xspace's transverse-momentum ordering variable and hatted variables denote the intermediate node in a sequence $IL \mapsto \hat{i} \hat{j} \hat{\ell} \mapsto i j k \ell$. Here, the scales $p_\perp^2$ and $\hat p_\perp^2$ are uniquely defined by the ordering variable of the sector-shower emission, i.e., that emission which minimises \cref{eq:resVar}. Direct $2\mapsto 4$ emissions are thus restricted to the unordered region of the double-emission phase space, denoted as $\ensuremath{\,\text{d}}\Phi_{+2}^>$ in \cref{eq:nloSudakov} and defined as \begin{equation} \ensuremath{\,\text{d}}\Phi_{+2}^> = \sum\limits_{j} \Theta^>_{j/IK} \Theta^\mathrm{sct}_{j/IK} \ensuremath{\,\text{d}} \Phi_{+2}^j \, . \end{equation} For $2\to 4$ emissions off quark-antiquark and gluon-gluon antennae, we use the double-real antenna functions in \cite{GehrmannDeRidder:2004tv,GehrmannDeRidder:2005aw,GehrmannDeRidder:2005cm}. We note that NLO quark-gluon antenna functions appear in the Standard Model at lowest order for three final-state particles and are hence not of interest for our test case of $e^+e^-\to jj$. We wish to point out, however, that the NLO quark-gluon antenna functions in \cite{GehrmannDeRidder:2005hi,GehrmannDeRidder:2005cm} contain spurious singularities which have to be removed before a shower implementation is possible. As a validation, we show in \cref{fig:orderingZDecays} the ratio of the four-jet to three-jet evolution variable for $e^+e^- \to 4j$ at $\sqrt{s} = 240~\giga e\volt$. To focus on the perturbative realm, the shower evolution is constrained to the region between $\ensuremath{t_0} = s$ and $\ensuremath{t_\mathrm{c}} = (5~\giga e\volt)^2$. The region $>0$ corresponds to the unordered part of phase space to which strongly-ordered showers cannot contribute. Due to the use of sector showers, there is a sharp cut-off at the boundary between the ordered and unordered region, as the sector criterion ensures that the last emission is always the softest and therefore, no recoil effects can spoil the strong ordering of the shower. As expected, the inclusion of direct $2\to 4$ branchings gives access to the unordered parts of phase space, a crucial element of our matching method. \subsection{LO Matrix-Element Corrections} In order for the shower expansion to match the fixed-order calculation, we need (iterated) $2\mapsto 3$ tree-level MECs and (direct) $2\mapsto4$ tree-level MECs. Both take a particularly simple form in the sector-antenna framework, as will be shown below. At leading-colour, tree-level MECs to the ordered sector shower can be constructed as \cite{LopezVillarejo:2011ap,Fischer:2017yja} \begin{align*} w_{2\mapsto 3,i}^{\mathrm{LO},\mathrm{LC}}(\Phi_2,\Phi_{+1}) &= \frac{{\mathrm{R}}^\mathrm{LC}_{i}(\Phi_2,\Phi_{+1})}{\sum_j \Theta^\mathrm{sct}_{j/IK} A^\mathrm{sct}_{j/IK}(p_i,p_j,p_k){\mathrm{B}}(\Phi_2)} \, ,\\ w_{3\mapsto 4,i}^{\mathrm{LO},\mathrm{LC}}(\Phi_3,\Phi_{+1}) &= \frac{{\mathrm{R\kern-0.15em R}}^\mathrm{LC}_{i}(\Phi_3,\Phi_{+1})}{\sum_j \Theta^\mathrm{sct}_{j/IK} A^\mathrm{sct}_{j/IK}(p_i,p_j,p_k){\mathrm{R}}^\mathrm{LC}_i(\Phi_3)} \, , \end{align*} where \begin{align*} {\mathrm{B}}(\Phi_2) &= \abs{{\mathcal{M}}_2^{(0)}(p_1,p_2)}^2 \, , \\ {\mathrm{R}}^\mathrm{LC}_{i}(\Phi_3) &= \abs{{\mathcal{M}}_3^{(0)}(\sigma_i\{p_1,p_2,p_3\})}^2 \, , \\ {\mathrm{R\kern-0.15em R}}^\mathrm{LC}_{i}(\Phi_4) &= \abs{{\mathcal{M}}_4^{(0)}(\sigma_i\{p_1,p_2,p_3,p_4\})}^2 \, , \end{align*} denote squared leading-colour colour-ordered amplitudes with the index $i$ denoting the respective permutation $\sigma_i$ (the number of permutations depends on the process). The sector veto $\Theta^\mathrm{sct}_{j/IK}$ ensures that only the most singular term contributes in the denominators, rendering the fraction exceptionally simple. Direct $2\mapsto 4$ branchings can be corrected in an analogous way, replacing the sum over $2\mapsto3$ antenna functions with a sum of $2\mapsto4$ ones, \begin{multline*} w_{2\mapsto 4,i}^{\mathrm{LO},\mathrm{LC}}(\Phi_2,\Phi_{+2}) \\ = \frac{{\mathrm{R\kern-0.15em R}}^\mathrm{LC}_{i}(\Phi_2,\Phi_{+2})}{\sum_{\{j,k\}} \Theta^\mathrm{sct}_{jk/IL} A^\mathrm{sct}_{jk/IL}(p_i,p_j,p_k,p_\ell){\mathrm{B}}(\Phi_2)} \, , \end{multline*} The full-colour matrix element can be recovered on average by multiplication with a full-colour to leading-colour-summed matrix-element weight, \begin{align} w_{2\mapsto 3,i}^{\mathrm{LO}} &= w_{2\mapsto 3,i}^{\mathrm{LO},\mathrm{LC}} \times \frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{\sum_j {\mathrm{R}}^\mathrm{LC}_{j}(\Phi_2,\Phi_{+1})} \, , \\ w_{3\mapsto 4,i}^{\mathrm{LO}} &= w_{3\mapsto 4,i}^{\mathrm{LO},\mathrm{LC}} \times \frac{{\mathrm{R\kern-0.15em R}}(\Phi_3,\Phi_{+1})}{\sum_j {\mathrm{R\kern-0.15em R}}^\mathrm{LC}_{j}(\Phi_3,\Phi_{+1})} \, , \\ w_{2\mapsto 4,i}^{\mathrm{LO}} &= w_{2\mapsto 4,i}^{\mathrm{LO},\mathrm{LC}} \times \frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+2})}{\sum_j {\mathrm{R\kern-0.15em R}}^\mathrm{LC}_{j}(\Phi_2,\Phi_{+2})} \, . \end{align} For gluon splittings, multiple histories contribute even in the sector shower, because all permutations of quark lines have to be taken into account. To ensure that the MEC factors remain finite for final states with multiple quark pairs, an additional quark-projection factor has to be included. Since we only deal with a maximum of two quark pairs, it is given by \begin{equation} \rho_j = \frac{A^\mathrm{sct}_{j_q/g_IX_K}(\bar q_i, q_j, X_k)}{\sum_{j}A^\mathrm{sct}_{j_q/g_IX_K}(\bar q_i, q_j, X_k)} \end{equation} for $2\to 3$ branchings and \begin{equation} \rho_j = \frac{A^\mathrm{sct}_{j_qk_{\bar q}/X_IY_L}(X_i, q_j,\bar q_k, Y_\ell)}{\sum_{j}A^\mathrm{sct}_{j_qk_{\bar q}/X_IY_L}(X_i, q_j, \bar q_k, Y_\ell)} \end{equation} for $2\mapsto 4$ branchings. \subsection{NLO Matrix-Element Corrections} Making the antenna subtraction terms explicit, the fixed-order correction to the NLO matrix-element correction \cref{eq:NLOMEC2to3} reads \begin{align} &\tilde{w}^\mathrm{FO}_{2\mapsto3}(\Phi_2,\Phi_{+1}) = \frac{{\mathrm{R\kern-0.15emV}}(\Phi_2,\Phi_{+1})}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} + \frac{{\mathrm{I}}^\mathrm{NLO}(\Phi_2,\Phi_{+1})}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} \label{eq:VMEC2to3Numerical} \\ &\, + \int^{t}_{0}\ensuremath{\,\text{d}}\Phi_{+1}^\prime\, \left[ \frac{{\mathrm{R\kern-0.15em R}}(\Phi_2,\Phi_{+1},\Phi_{+1}^\prime)}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} - \frac{{\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1},\Phi_{+1}^\prime)}{{\mathrm{R}}(\Phi_2,\Phi_{+1})} \right] \nonumber\\ &\, - \Bigg(\frac{{\mathrm{V}}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} + \frac{{\mathrm{I}}^\mathrm{NLO}(\Phi_2)}{{\mathrm{B}}(\Phi_2)} \nonumber \\ &\qquad + \int^{\ensuremath{t_0}}_{0}\ensuremath{\,\text{d}}\Phi_{+1}'\, \left[\frac{{\mathrm{R}}(\Phi_2,\Phi_{+1}^\prime)}{{\mathrm{B}}(\Phi_2)} - \frac{{\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1}^\prime)}{{\mathrm{B}}(\Phi_2)} \right]\Bigg)\, , \nonumber \end{align} with the differential NLO antenna subtraction terms ${\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1}^\prime)$, ${\mathrm{S}}^\mathrm{NLO}(\Phi_2,\Phi_{+1},\Phi_{+1}^\prime)$ and their integrated counterparts ${\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2)$, ${\mathrm{I}}^\mathrm{NLO}_{{\mathrm{S}}}(\Phi_2,\Phi_{+1})$ cf.~\cref{eq:expvalNNLO,eq:subtTermsNLO1jet}. Based on the argument of the last subsection, we construct the full-colour NLO matrix-element correction as \begin{align} w^\mathrm{NLO}_{2\mapsto 3,i}(\Phi_2,\Phi_{+1}) &= w^{\mathrm{LO},\mathrm{LC}}_{2\mapsto3,i}(\Phi_2,\Phi_{+1}) \frac{{\mathrm{R}}(\Phi_2,\Phi_{+1})}{\sum_j {\mathrm{R}}^\mathrm{LC}_{j}(\Phi_2,\Phi_{+1})} \nonumber \\ &\quad \times (1 + \tilde{w}^\text{FO}_{2\mapsto 3}(\Phi_2,\Phi_{+1}) + \tilde{w}^\text{PS}_{2\mapsto 3}(\Phi_2)) \, . \end{align} The integration over the radiation phase spaces denoted $\Phi_{+1}^\prime$ in \cref{eq:VMEC2to3Numerical} is done numerically, utilising antenna kinematics to map $3$-parton configurations to $4$-parton configurations (similarly for $2$-parton configurations). This phase-space generation approach will be described in detail in the next subsection in the context of the NNLO Born weight. Note that the radiation phase space $\Phi_{+1}$ in \cref{eq:VMEC2to3Numerical} is generated by the shower. \subsection{NNLO Born Weight} The Born-local NNLO weight can be calculated numerically using a ``forward-branching'' phase-space generation approach \cite{Frixione:2007vw,Hoche:2010pf,Alioli:2010xd,Giele:2011tm,Figy:2018imt}, which has previously been applied to unweighted NLO event generation, using Catani-Seymour dipole subtraction \cite{Campbell:2012cz}. The application to NNLO corrections to $e^+e^- \to 2j$ using antenna subtraction has been outlined in \cite{Weinzierl:2006ij}. Given a Born phase space point, the real-radiation phase space is generated by uniformly sampling the shower variables $(t,\zeta,\phi)$ for each antenna, which represent integration channels in this context. As for the shower evolution, every phase space point is restricted to the sector in which the emission(s) correspond to the most-singular clusterings. The momenta of the Born$+1j$ point are constructed according to the same kinematic map as the shower uses, summarised in sec.~2.3 in \cite{Brooks:2020bhi}. Since antenna functions are azimuthally averaged, they do not cancel spin-correlations in collinear gluon branchings locally. To obtain a point-wise pole cancellation, the subtracted real correction ${\mathrm{R}}-{\mathrm{S}}$ can be evaluated on two correlated phase space points, \begin{equation*} \left\{ \left(t,\zeta,\phi\right), \left(t,\zeta,\phi+\uppi/2\right)\right\} \, \end{equation*} which cancels the collinear spin correlation exactly, as it is proportional to $\cos(2\phi)$. To obtain double-real radiation phase space points for the subtracted double-real correction ${\mathrm{R\kern-0.15em R}}-{\mathrm{S}}$, this procedure can be iterated, yielding four angular-correlated phase space points which cancel spin correlations in double single-collinear and triple-collinear limits. Due to the bijective nature of the sector-antenna framework, each $3$- or $4$-particle phase-space point obtained in this way can be mapped back uniquely to its $2$-particle origin, making the NNLO weight exactly Born-local. For $e^+e^- \to 2j$ this procedure is identical to the one in \cite{Weinzierl:2006ij}. \begin{figure*}[t] \centering \includegraphics[width=0.4\textwidth]{spiketest-nnlo-tc.pdf} \includegraphics[width=0.4\textwidth]{spiketest-nnlo-ds.pdf}\\ \includegraphics[width=0.4\textwidth]{nnlotest-134.pdf} \includegraphics[width=0.4\textwidth]{nnlotest-243.pdf} \caption{Test of the convergence of the double-real subtraction term ${\mathrm{S}}(\Phi_{2},\Phi_{+2},O)$ in \cref{eq:SNNLORR} in $e^+e^-\to q g g \bar q$. \textsl{Top row}: progression of weight distributions from $x=10^{-2}$ to $x=10^{-4}$ in the triple-collinear limit ($s_{134}/s_{1234} < x$) and double-soft limit ($s_{134}s_{234}/s_{1234}^2 < x$). \textsl{Bottom row}: trajectories $x\cdot s_{134}$, $x\cdot s_{234}$, $x\to 0$ approaching the two triple collinear limits. Phase space points are not azimuthally averaged.} \label{fig:subtractionNNLO} \end{figure*} We have implemented the NNLO antenna subtraction terms for processes with two massless final-state jets, cf.~e.g.~\cite{GehrmannDeRidder:2004tv}, in V\protect\scalebox{0.8}{INCIA}\xspace in a semi-automated fashion. As a validation, we illustrate the convergence of the double-real radiation subtraction term \cref{eq:SNNLORR} in the triple-collinear and double-soft limits for the process $e^+e^-\to q g g \bar q$ in \cref{fig:subtractionNNLO}. Phase space points are sampled according to the kinematic map in \cref{subsec:kinematics} and we do not make use of the azimuthal averaging alluded to above. It should be noted that a numerical calculation of the Born-local NNLO weight is not necessary for colour-singlet decays, as the inclusive $K$-factors are well known from analytical calculations, cf.~e.g.~\cite{Chetyrkin:1996ela,GehrmannDeRidder:2004tv} for $Z\to q\bar q$ (with massless quarks), \cite{Gorishnii:1990zu,Chetyrkin:1996sr,Baikov:2005rw,DelDuca:2015zqa} for $H \to b\bar b$ (with massless $b$s), and \cite{Chetyrkin:1997iv,GehrmannDeRidder:2005aw} for $H\to gg$ (in the Higgs effective theory). \section{Conclusions and Outlook} \label{sec:conclusions} We have presented a technique to match final-state parton showers fully-differentially to next-to-next-to-leading order calculations in processes with two final-state jets. To our knowledge, this is the first method of its kind. We have outlined a full-fledged numerical implementation in the V\protect\scalebox{0.8}{INCIA}\xspace antenna shower in the P\protect\scalebox{0.8}{YTHIA}\xspace 8.3 event generator. Phenomenological studies employing our strategy will be presented in separate works. We want to close by noting that, while we here focused on the simplest case of two massless final-state jets, the use of the NNLO antenna subtraction formalism facilitates its adaption to more complicated processes such as $e^+ e^- \to t\bar t$ or $e^+e^-\to 3j$. Considering the latter, spurious singularities in the quark-gluon NNLO antenna subtraction terms need to be removed before exponentiation in the shower. For future work, an extension of our method to processes with coloured initial states can be envisioned, given the applicability of the NNLO antenna subtraction to hadronic collisions. \section*{Acknowledgements} We thank Aude Gehrmann-de Ridder and Thomas Gehrmann for providing us with FORM files of their antenna functions. We thank Philip Ilten for the development of a general matrix-element generator interface for P\protect\scalebox{0.8}{YTHIA}\xspace 8.3, which allowed us to interface C\protect\scalebox{0.8}{OMIX}\xspace in this work. CTP is supported by the Monash Graduate Scholarship, the Monash International Postgraduate Research Scholarship, and the J.L.~William~Scholarship. HTL is supported by the U.S. Department of Energy under Contract No. DE-AC02-06CH11357 and the National Science Foundation under Grant No. NSF-1740142. This research was supported by Fermi National Accelerator Laboratory (Fermilab), a U.S. Department of Energy, Office of Science, HEP User Facility. Fermilab is managed by Fermi Research Alliance, LLC (FRA), acting under Contract No. DE-AC02-07CH11359. This work was further partly funded by the Australian Research Council via Discovery Project DP170100708 — “Emergent Phenomena in Quantum Chromodynamics”. This work was also supported in part by the European Union’s Horizon 2020 research and innovation programme under the Marie Sk\l{}odowska-Curie grant agreement No 722104 – MCnetITN3. \bibliographystyle{elsarticle-num}
\section{Introduction}\label{sec:intro} Let $L^p(\R^n,w)$ and $\wL^p(\R^n,w)$ be the weighted Lebesgue space and its weak version on the $n$-dimensional Euclidean space $\R^n$, respectively. Then it is well known that the Hardy-Littlewood maximal operator $M$ is bounded from $L^1(\R^n,w)$ to $\wL^1(\R^n,w)$ if $w\in A_1$, and, from $L^p(\R^n,w)$ to itself if $w\in A_p$, $p\in(1,\infty]$, where $A_p$ is the Muckenhoupt class, see \cite{Muckenhoupt1972}. The Calder\'on-Zygmund operators have the same boundedness except the case $p=\infty$. It is also known that $M$ is bounded from $\wL^p(\R^n,w)$ to itself if $w\in A_p$, $p\in(1,\infty]$. This boundedness can be obtained by using the property of $A_p$-weights and the Marcinkiewicz interpolation theorem for the operators of restricted weak type, see \cite[Theorem 1.4.19 (page 61)]{Grafakos2014GTM249} for example. See also \cite{Komori2012} for its simple proofs. In this paper we extend these boundedness to the weighted Orlicz-Morrey space $\LPp(\R^n,w)$ and its weak version $\wLPp(\R^n,w)$, where $\Phi$ is a Young function and $\vp$ is a variable growth function. Namely, we prove the following boundedness: \begin{align} \|Tf\|_{\wLPp(\R^n,w)}&\le C\|f\|_{\LPp(\R^n,w)}, \label{w} \\ \|Tf\|_{\LPp(\R^n,w)}&\le C\|f\|_{\LPp(\R^n,w)}, \label{s} \\ \|Tf\|_{\wLPp(\R^n,w)}&\le C\|f\|_{\wLPp(\R^n,w)}, \label{ww} \end{align} where $T$ is the Hardy-Littlewood maximal operator or a Calder\'on-Zygmund operator. The function spaces $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ contain weighted Orlicz, Morrey and Lebesgue spaces and their weak versions as special cases. Then we also get the boundedness for these function spaces as corollaries. For a measurable set $G\subset\R^n$, we denote its Lebesgue measure and characteristic function by $|G|$ and $\chi_G$, respectively. A weight is a locally integrable function on $\R^n$ which takes values in $(0,\infty)$ almost everywhere. For a weight $w$ and a measurable set $G$, we define $w(G) = \int_G w(x)\,dx$. For $p\in(0,\infty]$, the weighted Lebesgue space and its weak version with respect to the measure $w(x)\,dx$ are denoted by $L^p(\R^n,w)$ and $\wL^p(\R^n,w)$, respectively. For a function $\vp:\R^n\times(0,\infty)\to(0,\infty)$ and a ball $B=B(a,r)$, we denote $\vp(a,r)$ by $\vp(B)$. For a weight $w$, a measurable set $G$ and a function $f$, let \begin{equation*} w(G,f,t) = w(\{x\in\ G:|f(x)|>t\}), \quad t\in[0,\infty). \end{equation*} In the case $G=\R^n$, we briefly denote it by $w(f,t)$. \begin{defn}[Orlicz-Morrey space and weak Orlicz-Morrey space]\label{defn:OM} For a Young function $\Phi:[0,\infty]\to[0,\infty]$, a function $\vp:\R^n\times(0,\infty)\to(0,\infty)$, a weight $w$ and a ball $B$, let \begin{align*} \|f\|_{\Phi,\vp,w,B} &= \inf\left\{ \lambda>0: \frac{1}{\vp(B)w(B)} \int_B \!\Phi\!\left(\frac{|f(x)|}{\lambda}\right)\! w(x)\,dx \le 1 \right\}, \\ \|f\|_{\Phi,\vp,w,B,\weak } &= \inf\left\{ \lambda>0: \frac{1}{\vp(B)w(B)} \sup_{t\in (0,\infty)} \Phi(t)\, w\!\left( B,\frac{f}{\lambda}, t\right) \le 1 \right\}. \end{align*} Let $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ be the sets of all functions $f$ such that the following functionals are finite, respectively: \begin{align*} \|f\|_{\LPp(\R^n,w)} &= \sup_{B} \|f\|_{\Phi,\vp,w,B}, \\ \|f\|_{\wLPp(\R^n,w)} &= \sup_{B} \|f\|_{\Phi,\vp,w,B,\weak}, \end{align*} where the suprema are taken over all balls $B$ in $\R^n$. (For the definition of the Young function, see the next section.) \end{defn} Then $\|f\|_{\LPp(\R^n,w)}$ is a norm and thereby $\LPp(\R^n,w)$ is a Banach space, and $\|f\|_{\wLPp(\R^n,w)}$ is a quasi norm and thereby $\wLPp(\R^n,w)$ is a quasi Banach space. The Orlicz-Morrey space $\LPp(\R^n)$ was first studied in \cite{Nakai2004KIT}. The spaces $\LPp(\R^n)$ and $\wLPp(\R^n)$ were investigated in \cite{Ho2013,Nakai2008Studia,Nakai2008KIT,Sawano2019}, etc. For other kinds of Orlicz-Morrey spaces, see \cite{Deringoz-Guliyev-Nakai-Sawano-Shi2019Posi,Deringoz-Guliyev-Samko2014,Gala-Sawano-Tanaka2015,Guliyev-Hasanov-Sawano-Noi2016,Sawano-Sugano-Tanaka2012}, etc. See also \cite{Ho2019,Ho2020} for Morrey-Banach spaces. The function spaces $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ contain several function spaces as special cases. If $\vp(B)=1/w(B)$, then $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ coincide with the weighted Orlicz space $\LP(\R^n,w)$ and its weak version $\wLP(\R^n,w)$, respectively. If $\Phi(t)=t^p$, $1\le p<\infty$, then $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ are denoted by $L^{(p,\vp)}(\R^n,w)$ and $\wL^{(p,\vp)}(\R^n,w)$, respectively, which are the generalized weighted Morrey space and its weak version. If $\vp(B)=w(B)^{\kappa-1}$, $0<\kappa<1$, then $L^{(p,\vp)}(\R^n,w)$ and $\wL^{(p,\vp)}(\R^n,w)$ are denoted by $L^{p,\kappa}(\R^n,w)$ and $\wL^{p,\kappa}(\R^n,w)$, respectively, which were introduced by Komori and Shirai~\cite{Komori-Shirai2009}. If $\Phi(t)=t^p$, $1\le p<\infty$, and $\vp(B)=1/w(B)$, then $\LPp(\R^n,w)=L^p(\R^n,w)$ and $\wLPp(\R^n,w)=\wL^p(\R^n,w)$. Therefore, by \eqref{w}, \eqref{s} and \eqref{ww}, we also have the norm inequalities for these function spaces as corollaries. Let $A_p$ be the Muckenhoupt class of weights, see Definition~\ref{defn:Ap}. Let $p\in[1,\infty)$ and $w$ is a weight. Muchenhoupt~\cite{Muckenhoupt1972} proved that the Hardy-Littlewood maximal operator $M$ is bounded from $L^p(\R^n,w)$ to $\wL^p(\R^n,w)$ if and only if $w\in A_p$. He also proved that, for $p\in(1,\infty)$, $M$ is bounded from $L^p(\R^n,w)$ to itself if and only if $w\in A_p$. For the boundedness of the Hiibert transform, the same conclusions hold, see \cite{Hunt-Muckenhoupt-Wheeden1973}. Let $p\in(1,\infty)$ and $w$ is a weight. It is also known that $M$ is bounded from $\wL^p(\R^n,w)$ to itself if and only if $w\in A_p$. We learned from \cite{Komori2012} two kinds of simple proofs of this boundedness by Grafakos and by Yabuta. By our results, we see that any Calder\'on-Zygmund operator is bounded from $\wL^p(\R^n,w)$ to itself if $w\in A_p$. In particular, the Reisz transforms are bounded from $\wL^p(\R,w)$ to itself if and only if $w\in A_p$, see Corollary~\ref{cor:modular}. In the next section we state on the functions $\Phi$, $\vp$ and $w$ by which we define $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$. Then we state main results in Section~\ref{sec:main}. We recall the properties of Young functions and show a lemma in Section~\ref{sec:prop}. To prove the norm inequalities \eqref{w}, \eqref{s} and \eqref{ww} we need the modular inequalities \begin{align*} \sup_{t\in (0,\infty)}\Phi(t)w(Tf,t) &\le C \int_{\R^n}\Phi(c|f(x)|)w(x)\,dx, \\ \int_{\R^n}\Phi(|Tf(x)|)w(x)\,dx &\le C \int_{\R^n}\Phi(c|f(x)|)w(x)\,dx, \\ \sup_{t\in (0,\infty)}\Phi(t)w(Tf,t) &\le C\sup_{t\in (0,\infty)}\Phi(t)w(f,t), \end{align*} respectively, in which the first and the second are known. We prove the third in Section~\ref{sec:modular}. Then, using the results in Sections~\ref{sec:prop} and \ref{sec:modular}, we prove the main results in Section~\ref{sec:proof}. In the above, each modular inequality means that it holds for any function $f$ such that the left-hand side is finite, and that the constant $C$ is independent of $f$. We will make similar abbreviated statements involving other modular and (quasi-)norm inequalities; they will be always interpreted in the same way. At the end of this section, we make some conventions. Throughout this paper, we always use $C$ to denote a positive constant that is independent of the main parameters involved but whose value may differ from line to line. Constants with subscripts, such as $C_p$, is dependent on the subscripts. If $f\le Cg$, we then write $f\ls g$ or $g\gs f$; and if $f \ls g\ls f$, we then write $f\sim g$. \section{On the functions $\Phi$, $\vp$ and $w$}\label{sec:Young} In this section we state on the functions $\Phi$, $\vp$ and $w$ by which we define $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$. We first recall the Young function and its generalization. For an increasing (i.e. nondecreasing) function $\Phi:[0,\infty]\to[0,\infty]$, let \begin{equation*}\label{aP bP} a(\Phi)=\sup\{t\ge0:\Phi(t)=0\}, \quad b(\Phi)=\inf\{t\ge0:\Phi(t)=\infty\}, \end{equation*} with convention $\sup\emptyset=0$ and $\inf\emptyset=\infty$. Then $0\le a(\Phi)\le b(\Phi)\le\infty$. Let $\biP$ be the set of all increasing functions $\Phi:[0,\infty]\to[0,\infty]$ such that \begin{enumerate} \item\label{ab} \ $\displaystyle 0\le a(\Phi)<\infty, \quad 0<b(\Phi)\le\infty, $ \item \label{lim_0} \ $\displaystyle \lim_{t\to+0}\Phi(t)=\Phi(0)=0, $ \item \label{left cont} \ $\displaystyle \text{$\Phi$ is left continuous on $[0,b(\Phi))$}, $ \item \label{left cont infty} \ $\displaystyle \text{if $b(\Phi)=\infty$, then } \lim_{t\to\infty}\Phi(t)=\Phi(\infty)=\infty, $ \item \label{left cont b} \ $\displaystyle \text{if $b(\Phi)<\infty$, then } \lim_{t\to b(\Phi)-0}\Phi(t)=\Phi(b(\Phi)) \ (\le\infty). $ \end{enumerate} In what follows, if an increasing and left continuous function $\Phi:[0,\infty)\to[0,\infty)$ satisfies \ref{lim_0} and $\dlim_{t\to\infty}\Phi(t)=\infty$, then we always regard that $\Phi(\infty)=\infty$ and that $\Phi\in\biP$. For $\Phi, \Psi\in\biP$, we write $\Phi\approx\Psi$ if there exists a positive constant $C$ such that \begin{equation*} \Phi(C^{-1}t)\le\Psi(t)\le\Phi(Ct) \quad\text{for all}\ t\in[0,\infty]. \end{equation*} Now we recall the definition of the Young function and give its generalization. \begin{defn}\label{defn:Young} \begin{enumerate} \item A function $\Phi\in\biP$ is called a Young function (or sometimes also called an Orlicz function) if $\Phi$ is convex on $[0,b(\Phi))$. Let $\iPy$ be the set of all Young functions, and let $\biPy$ be the set of all $\Phi\in\biP$ such that $\Phi\approx\Psi$ for some $\Psi\in\iPy$. (Each $\Phi\in\biPy$ is also called a quasi-convex function, see~\cite{Kokilashvili-Krbec1991}). \item Let $\cY$ be the set of all Young functions such that $a(\Phi)=0$ and $b(\Phi)=\infty$, and let $\bcY$ be the set of all $\Phi\in\biP$ such that $\Phi\approx\Psi$ for some $\Psi\in\cY$. \end{enumerate} \end{defn} By the convexity, any Young function $\Phi$ is continuous on $[0,b(\Phi))$ and strictly increasing on $[a(\Phi),b(\Phi)]$. Hence $\Phi$ is bijective from $[a(\Phi),b(\Phi)]$ to $[0,\Phi(b(\Phi))]$. If $\Phi\in\cY$, then $\Phi$ is continuous and bijective from $[0,\infty]$ to itself. \begin{defn}\label{defn:D2 n2} \begin{enumerate} \item A function $\Phi\in\biP$ is said to satisfy the $\Delta_2$-condition, denoted by $\Phi\in\bdtwo$, if there exists a constant $C>0$ such that \begin{equation*} \Phi(2t)\le C\Phi(t) \quad\text{for all } t>0. \end{equation*} \item A function $\Phi\in\biP$ is said to satisfy the $\nabla_2$-condition, denoted by $\Phi\in\bntwo$, if there exists a constant $k>1$ such that \begin{equation*} \Phi(t)\le\frac1{2k}\Phi(kt) \quad\text{for all } t>0. \end{equation*} \item Let $\Delta_2=\iPy\cap\bdtwo$ and $\nabla_2=\iPy\cap\bntwo$. \end{enumerate} \end{defn} For $\Phi\in\biP$, we recall the dilation indices which are also called the Orlicz-Matuszewska-Maligranda indices: \begin{defn}\label{defn:index} For $\Phi\in\biP$ with $a(\Phi)=0$ and $b(\Phi)=\infty$, let \begin{equation*} h_{\Phi}(\lambda)=\sup_{t\in(0,\infty)}\frac{\Phi(\lambda t)}{\Phi(t)}, \quad \lambda\in(0,\infty), \end{equation*} and define the lower and upper indices of $\Phi$ by \begin{align*} i(\Phi) &= \lim_{\lambda\to+0}\frac{\log h_{\Phi}(\lambda)}{\log\lambda} = \sup_{\lambda\in(0,1)}\frac{\log h_{\Phi}(\lambda)}{\log\lambda}, \\ I(\Phi) &= \lim_{\lambda\to\infty}\frac{\log h_{\Phi}(\lambda)}{\log\lambda} = \inf_{\lambda\in(1,\infty)}\frac{\log h_{\Phi}(\lambda)}{\log\lambda}, \end{align*} respectively, with convention $\log\infty=\infty$. \end{defn} \begin{rem}\label{rem:index} By the definition we see that $h_{\Phi}(1)=1$ and that $h_{\Phi}$ is increasing (i.e.\,non-decreasing) and submultiplicative which means that $h_{\Phi}(\lambda_1\lambda_2)\le h_{\Phi}(\lambda_1)h_{\Phi}(\lambda_2)$ for all $\lambda_1,\lambda_2\in(0,\infty)$. In this case the above limits exist (permitting $\infty$) and $0\le i(\Phi)\le I(\Phi)\le\infty$, see \cite{Maligranda1985} for example. If $\Phi\in\bdtwo$, then $a(\Phi)=0$ and $b(\Phi)=\infty$. In this case $0<i(\Phi)\le I(\Phi)<\infty$, see \cite{Gustavsson-Peetre1977,Maligranda1985} for example. \end{rem} \begin{rem}\label{rem:index 2} Let $\Phi,\Psi\in\biP$ with $a(\Phi)=a(\Psi)=0$ and $b(\Phi)=b(\Psi)=\infty$. \begin{enumerate} \item If $\Phi\approx\Psi$, then $i(\Phi)=i(\Psi)$ and $I(\Phi)=I(\Psi)$. \item If $\Phi\in\bcY$, then $1\le i(\Phi)\le I(\Phi)\le\infty$. \item $\Phi\in\bntwo$ if and only if $1<i(\Phi)\le I(\Phi)\le\infty$. \item $\Phi\in\bdtwo\cap\bntwo$ if and only if $1<i(\Phi)\le I(\Phi)<\infty$. \item\label{item:bdtwo} Let $\Phi\in\bcY$. Then $\Phi\in\bdtwo$ if and only if $1\le i(\Phi)\le I(\Phi)<\infty$. \item Let $0<i(\Phi)\le I(\Phi)<\infty$. If $0<p<i(\Phi)\le I(\Phi)<q<\infty$, then there exists a positive constant $C$ such that, for all $t,\lambda\in(0,\infty)$, \begin{equation*} \Phi(\lambda t) \le C\max\left(\lambda^{p},\lambda^{q}\right)\Phi(t), \end{equation*} that is, $t\mapsto\dfrac{\Phi(t)}{t^p}$ is almost increasing and $t\mapsto\dfrac{\Phi(t)}{t^q}$ is almost decreasing. \item\label{item:cY} $\Phi\in\bcY$ if and only if $t\mapsto\dfrac{\Phi(t)}{t}$ is almost increasing (\cite[Lemma~1.1.1]{Kokilashvili-Krbec1991}). \end{enumerate} \end{rem} Next, we say that a function $\theta:\R^n\times(0,\infty)\to(0,\infty)$ satisfies the doubling condition if there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r,s\in(0,\infty)$, \begin{equation}\label{doubling} \frac1C\le\frac{\theta(x,r)}{\theta(x,s)}\le C, \quad\text{if} \ \ \frac12\le\frac{r}{s}\le2. \end{equation} We say that $\theta$ is almost increasing (resp. almost decreasing) if there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r,s\in(0,\infty)$, \begin{equation*} \theta(x,r)\le C\theta(x,s) \quad (\text{resp.}\ \theta(x,s)\le C\theta(x,r)), \quad\text{if $r<s$}. \end{equation*} For two functions $\theta,\kappa:\R^n\times(0,\infty)\to(0,\infty)$, we write $\theta\sim\kappa$ if there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r\in(0,\infty)$, \begin{equation*} \frac1C\le\frac{\theta(x,r)}{\kappa(x,r)}\le C. \end{equation*} As same as Definition~\ref{defn:OM} we also define $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ by using generalized Young functions $\Phi\in\biPy$ together with $\|\cdot\|_{\Phi,\vp,w,B}$ and $\|\cdot\|_{\Phi,\vp,w,B,\weak}$, respectively. Then $\|\cdot\|_{\LPp(\R^n,w)}$ and $\|\cdot\|_{\wLPp(\R^n,w)}$ are quasi norms and thereby $\LPp(\R^n,w)$ and $\wLPp(\R^n,w)$ are quasi Banach spaces. \begin{rem}\label{rem:approx norm} Let $\Phi,\Psi\in\biPy$ and $\vp,\psi:\R^n\times(0,\infty)\to(0,\infty)$. If $\Phi\approx\Psi$ and $\vp\sim\psi$, then $\LPp(\R^n,w)=\LPsps(\R^n,w)$ and $\wLPp(\R^n,w)=\wLPsps(\R^n,w)$ with equivalent quasi norms. It is also known by \cite[Proposition~4.2]{Kawasumi-Nakai2020Hiroshima} that, for $\Phi\in\iPy$ and a measurable set $G$, \begin{equation}\label{weak type} \sup_{t\in(0,\infty)}\Phi(t)w(G,f,t) = \sup_{t\in(0,\infty)}t\,w(G,\Phi(|f|),t). \end{equation} \end{rem} In this paper we consider the following classes of $\vp$: \begin{defn}\label{defn:cG} For a weight $w$, let $\cGdec_w$ be the set of all functions $\vp:\R^n\times(0,\infty)\to(0,\infty)$ such that $\vp$ is almost decreasing and that $r\mapsto\vp(x,r)w(B(x,r))$ is almost increasing. That is, there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r,s\in(0,\infty)$, \begin{equation*} C\vp(x,r)\ge \vp(x,s), \quad \vp(x,r)w(B(x,r))\le C\vp(x,s)w(B(x,s)), \quad \text{if} \ r<s. \end{equation*} If $w(x)\equiv1$, we denote $\cGdec_w$ by $\cGdec$ simply. \end{defn} On the weights we consider the following Muckenhoupt $A_p$ classes: \begin{defn}\label{defn:Ap} For $p\in[1,\infty)$, let $A_p$ be the set of all weight functions $w$ such that the following functional is finite: \begin{align*} [w]_{A_1} &= \sup_B\left(\frac1{|B|}\int_B w(x)\,dx\right) \|w^{-1}\|_{\Li(B)}, &\quad\text{if} \ p=1, \\ [w]_{A_p} &= \sup_B\left(\frac1{|B|}\int_B w(x)\,dx\right) \left(\frac1{|B|}\int_B w(x)^{-1/(p-1)}\,dx\right)^{p-1}, &\quad\text{if} \ p\in(1,\infty), \end{align*} where the suprema are taken over all balls $B$ in $\R^n$. Let \begin{equation*} A_{\infty}=\bigcup_{p\in[1,\infty)}A_p. \end{equation*} \end{defn} Then the following properties are known: Let $w$ is a weight. Then $w\in A_{\infty}$ if and only if there exist positive constants $\delta$ and $C$ such that, for any ball $B$ and its subset $E$, \begin{equation}\label{delta} \frac{w(E)}{w(B)}\le C\left(\frac{|E|}{|B|}\right)^{\delta}. \end{equation} If $1\le p<q\le\infty$, then $A_p\subset A_q$. Let $p\in(1,\infty)$. If $w\in A_p$, then $w\in A_r$ for some $r\in[1,p)$. Let $w\in A_p$ for some $p\in[1,\infty)$. Then, for any ball $B$, \begin{equation}\label{fint B} \left(\frac1{|B|}\int_B|f(x)|\,dx\right)^p \le [w]_{A_p} \frac1{w(B)}\int_B|f(x)|^p w(x)\,dx. \end{equation} Moreover, there exists a positive constant $C$ such that, for any ball $B$ and $k\in(1,\infty)$, \begin{equation}\label{w kB} w(kB)\le C k^{np}[w]_{A_p}w(B). \end{equation} If $w\in A_p$ for some $p\in[1,\infty)$ and $\vp\in\cGdec_w$, then $\vp$ satisfies the doubling condition \eqref{doubling}, since $w$ satisfies \eqref{w kB}. For the properties of $A_p$-weights, see \cite{GarciaCuerva-RubiodeFrancia1985,Grafakos2014GTM249} for example. \section{Main results}\label{sec:main} The Hardy-Littlewood maximal operator is defined by \begin{equation*} Mf(x)=\sup_{B\ni x}\frac1{|B|}\int_B |f(y)|\,dy, \end{equation*} for locally integrable functions $f$, where the supremum is taken over all balls $B$ containing $x$. It is known that, if $\Phi\in\biPy$ and $\vp\in\cGdec$, then the Hardy-Littlewood maximal operator $M$ is bounded from $\LPp(\R^n)$ to $\wLPp(\R^n)$. Moreover, if $\Phi\in\bntwo$, then $M$ is bounded from $\LPp(\R^n)$ to itself and from $\wLPp(\R^n)$ to itself, see \cite{Kawasumi-Nakai-Shi2021MathNachr,Nakai2008Studia}. Next we state known results for the boundedness of the Calder\'on-Zygmund operator. First we recall its definition following \cite{Yabuta1985}. Let $\cS(\R^n)$ be the set of all Schwartz functions on $\R^n$ and $\cS'(\R^n)$ be the dual spaces of $\cS(\R^n)$. Let $\Omega$ be the set of all increasing functions $\omega:(0,\infty)\to(0,\infty)$ such that $\int_0^1\frac{\omega(t)}{t}dt<\infty$. \begin{defn}[{standard kernel}]\label{defn:Kernel} Let $\omega\in \Omega$. A continuous function $K(x,y)$ on $\R^n\times\R^n\setminus\{(x,x)\in\R^{2n}\}$ is said to be a standard kernel of type $\omega$ if the following conditions are satisfied; \begin{gather*} |K(x,y)|\le \frac{C}{|x-y|^n} \quad\text{for}\quad x\not=y, \\ \begin{split} |K(x,y)-K(x,z)|+|K(y,x)-K(z,x)| \le \frac{C}{|x-y|^{n}} \,\omega\!\left(\frac{|y-z|}{|x-y|}\right) & \\ \text{for}\quad 2|y-z|<|x-y|. & \end{split} \end{gather*} \end{defn} \begin{defn}[{Calder\'on-Zygmund operator}]\label{defn:CZO} Let $\omega\in \Omega$. A linear operator $T$ from $\cS(\R^n)$ to $\cS'(\R^n)$ is said to be a Calder\'on-Zygmund operator of type $\omega$, if $T$ is bounded on $L^2(\R^n)$ and there exists a standard kernel $K$ of type $\omega$ such that, for $f\in \Cic(\R^n)$, \begin{equation} Tf(x)=\int_{\R^n} K(x,y)f(y)\,dy, \quad x\notin\supp f. \label{CZ3} \end{equation} \end{defn} \begin{rem}\label{rem:CZO} If $x\notin\supp f$, then $K(x,y)$ is bounded on $\supp f$ with respect to $y$. Therefore, if \eqref{CZ3} holds for $f\in \Cic(\R^n)$, then \eqref{CZ3} holds for $f\in L^1_{\comp}(\R^n)$. \end{rem} It is known by \cite{Yabuta1985} that any Calder\'on-Zygmund operator of type $\omega\in \Omega$ is bounded on $L^p(\R^n)$ for $1<p<\infty$. This result was extended to Orlicz-Morrey spaces $\LPp(\R^n)$ by \cite{Nakai2008KIT} as the following: Let $\vp:(0,\infty)\to(0,\infty)$. Assume that $\vp\in\cGdec$ and that there exists a positive constant $C$ such that, for all $r\in(0,\infty)$, \begin{equation*} \int_r^{\infty}\frac{\vp(t)}{t}\,dt\le C\vp(r). \end{equation*} Let $\Phi\in\Delta_2\cap\nabla_2$. For $f\in\LPp(\R^n)$, we define $Tf$ on each ball $B$ by \begin{equation*} Tf(x)=T(f\chi_{2B})(x)+\int_{\R^n\setminus 2B}K(x,y)f(y)\,dy, \quad x\in B. \end{equation*} Then the first term in the right hand side is well defined, since $f\chi_{2B}\in\LP_{\comp}(\R^n)\subset L^1_{\comp}(\R^n)$, and the integral of the second term converges absolutely. Moreover, $Tf(x)$ is independent of the choice of the ball $B$ containing $x$. By this definition we can show that $T$ is a bounded operator from $\LPp(\R^n)$ to itself. For the weighted boundedness, it is also known by \cite{Yabuta1985} that, if $w\in A_1$, then $T$ is bounded from $L^1(\R^n,w)$ to $\wL^1(\R^n,w)$, and, if $w\in A_p$, $1<p<\infty$, then $T$ is bounded from $L^p(\R^n,w)$ to itself. In this paper we extend the above results to the weighted Orlicz-Morrey space and its weak version. As a corollary we also get the boundedness of $T$ from $\wL^p(\R^n,w)$ to itself if $w\in A_p$, $1<p<\infty$. The main result is the following: \begin{thm}\label{thm:M CZO} Let $M$ be the Hardy-Littlewood maximal operator, and let $T$ be a Calder\'on-Zygmund operator of type $\omega\in\Omega$. Let $\Phi\in\bcY$, $w\in A_{i(\Phi)}$ and $\vp\in\cGdec_w$. \begin{enumerate} \item If $i(\Phi)=1$, then $M$ is bounded from $\LPp(\R^n,w)$ to $\wLPp(\R^n,w)$. If $1<i(\Phi)\le\infty$, then $M$ is bounded from $\LPp(\R^n,w)$ to itself and from $\wLPp(\R^n,w)$ to itself. \item Assume that there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r\in(0,\infty)$, \begin{equation}\label{int vp x} \int_r^{\infty}\frac{\vp(x,t)}{t}\,dt\le C\vp(x,r). \end{equation} If $i(\Phi)=1\le I(\Phi)<\infty$, then $T$ is bounded from $\LPp(\R^n,w)$ to $\wLPp(\R^n,w)$. If $1<i(\Phi)\le I(\Phi)<\infty$, then $T$ is bounded from $\LPp(\R^n,w)$ to itself and from $\wLPp(\R^n,w)$ to itself. \end{enumerate} \end{thm} Ho~\cite{Ho2013} proved the boundedness of $M$ on $\LPp(\R^n,w)$ under stronger conditions. He treated the vector valued inequality. To prove Theorem~\ref{thm:M CZO} we need the modular inequalities for which the assumption $w\in A_{i(\Phi)}$ is necessary, see Corollary~\ref{cor:modular}. From the theorem above, for the operators $M$ and $T$, we get the following corollaries immediately: \begin{cor}\label{cor:M CZO Orl} Let $\Phi\in\bcY$, $w\in A_{i(\Phi)}$ and $\vp\in\cGdec_w$. \begin{enumerate} \item If $i(\Phi)=1$, then $M$ is bounded from $\LP(\R^n,w)$ to $\wLP(\R^n,w)$. If $1<i(\Phi)\le\infty$, then $M$ is bounded from $\LP(\R^n,w)$ to itself and from $\wLP(\R^n,w)$ to itself. \item Assume that $\vp$ satisfies \eqref{int vp x}. If $i(\Phi)=1\le I(\Phi)<\infty$, then $T$ is bounded from $\LP(\R^n,w)$ to $\wLP(\R^n,w)$. If $1<i(\Phi)\le I(\Phi)<\infty$, then $T$ is bounded from $\LP(\R^n,w)$ to itself and from $\wLP(\R^n,w)$ to itself. \end{enumerate} \end{cor} \begin{cor}\label{cor:M CZO Mor} Let $p\in[1,\infty)$, $w\in A_p$ and $\vp\in\cGdec_w$. \begin{enumerate} \item If $p=1$, then $M$ is bounded from $L^{(1,\vp)}(\R^n,w)$ to $\wL^{(1,\vp)}(\R^n,w)$. If $1<p<\infty$, then $M$ is bounded from $L^{(p,\vp)}(\R^n,w)$ to itself and from $\wL^{(p,\vp)}(\R^n,w)$ to itself. \item Assume that $\vp$ satisfies \eqref{int vp x}. Then $T$ has the same boundedness as $M$. \end{enumerate} \end{cor} Let $w\in A_p$ for some $p\in[1,\infty)$. If $\vp(B)=w(B)^{\kappa-1}$ for some $\kappa\in[0,1)$, then $\vp(kB)\ls k^{-n\delta(1-\kappa)}\vp(B)$ for some $\delta>0$ and all $k\ge1$ by \eqref{delta}. Hence, $\vp$ satisfies \eqref{int vp x}. Then we also have the following corollary: \begin{cor}\label{cor:M CZO Mk} If $w\in A_1$ and $\vp\in\cGdec_w$, then both $M$ and $T$ are bounded from $L^{1,\kappa}(\R^n,w)$ to $\wL^{1,\kappa}(\R^n,w)$. If $1<p<\infty$, $w\in A_p$ and $\vp\in\cGdec_w$, then both $M$ and $T$ are bounded from $L^{p,\kappa}(\R^n,w)$ to itself and from $\wL^{p,\kappa}(\R^n,w)$ to itself. \end{cor} \section{Properties on Young functions}\label{sec:prop} In this section we state the properties of Young functions and their generalization. For the theory of Orlicz spaces, see \cite{Kita2009,Krasnoselsky-Rutitsky1961,Maligranda1989} for example. For $\Phi\in\biP$, we recall the generalized inverse of $\Phi$ in the sense of O'Neil \cite[Definition~1.2]{ONeil1965}. \begin{defn}\label{defn:ginverse} For $\Phi\in\biP$ and $u\in[0,\infty]$, let \begin{equation*} \Phi^{-1}(u) = \begin{cases} \inf\{t\ge0: \Phi(t)>u\}, & u\in[0,\infty), \\ \infty, & u=\infty. \end{cases} \end{equation*} \end{defn} Let $\Phi\in\biP$. Then $\Phi^{-1}$ is finite, increasing and right continuous on $[0,\infty)$ and positive on $(0,\infty)$. If $\Phi$ is bijective from $[0,\infty]$ to itself, then $\Phi^{-1}$ is the usual inverse function of $\Phi$. In general, if $\Phi\in\biP$, then \begin{equation*} \Phi(\Phi^{-1}(u)) \le u \le \Phi^{-1}(\Phi(u)) \quad\text{for all $u\in[0,\infty]$}, \end{equation*} which is a generalization of Property 1.3 in \cite{ONeil1965}, see \cite[Proposition~2.2]{Shi-Arai-Nakai2019Taiwan}. Let $\Phi, \Psi\in\biP$. Then \begin{equation*} \Phi(C^{-1}t)\le\Psi(t)\le\Phi(Ct) \quad\text{for all}\ t\in[0,\infty], \end{equation*} if and only if \begin{equation*} C^{-1}\Phi^{-1}(t)\le\Psi^{-1}(t)\le C\Phi^{-1}(t) \quad\text{for all}\ t\in[0,\infty], \end{equation*} see \cite[Lemma~2.3]{Shi-Arai-Nakai2019Taiwan}. That is, $\Phi\approx\Psi$ if and only if $\Phi^{-1}\sim\Psi^{-1}$. \begin{defn}\label{defn:complem} For a Young function $\Phi$, its complementary function is defined by \begin{equation*} \cPhi(t)= \begin{cases} \sup\{tu-\Phi(u):u\in[0,\infty)\}, & t\in[0,\infty), \\ \infty, & t=\infty. \end{cases} \end{equation*} \end{defn} Then $\cPhi$ is also a Young function, and $(\Phi,\cPhi)$ is called a complementary pair. For example, if $\Phi(t)=t^p/p$, then $\cPhi(t)=t^{p'}/p'$ for $p,p'\in(1,\infty)$ and $1/p+1/p'=1$. If $\Phi(t)=t$, then \begin{equation*} \cPhi(t)= \begin{cases} 0, & t\in[0,1], \\ \infty, & t\in(1,\infty]. \end{cases} \end{equation*} Namely, $\cPhi$ is not necessary in $\cY$ even if $\Phi\in\cY$. Let $(\Phi,\cPhi)$ be a complementary pair of Young functions. Then the following inequality holds (\cite[(1.3)]{Torchinsky1976}): \begin{equation}\label{Phi cPhi r} t\le\Phi^{-1}(t) \cPhi^{-1}(t)\le2t \quad\text{for}\quad t\in[0,\infty]. \end{equation} Let $\Phi$ be a Young function and $(X,\mu)$ a measure space, and let $\LP(X,\mu)$ be the Orlicz space with the norm $\|\cdot\|_{\LP(X,\,\mu)}$. Then a simple calculation shows that, for any measurable subset $G\subset X$ with $\mu(G)>0$, \begin{equation}\label{chi Orlicz norm} \|\chi_G\|_{\LP(X,\,\mu)} = \frac1{\Phi^{-1}(1/\mu(G))}. \end{equation} Let $(\Phi,\cPhi)$ be a complementary pair of Young functions. Then the following generalized H\"older's inequality holds (see \cite{ONeil1965}): \begin{equation}\label{g Holder} \int_{X} |f(x)g(x)| \,d\mu(x) \le 2\|f\|_{\LP(X,\,\mu)} \|g\|_{\LcP(X,\,\mu)}. \end{equation} Let $\Phi\in\iPy$, $\vp:\R^n\times(0,\infty)\to(0,\infty)$ and $B=B(a,r)\subset\R^n$, and let $\mu_B=w\,dx/(\vp(B)w(B))$. Then by the definition of $\|\cdot\|_{\Phi,\vp,w,B}$ and \eqref{chi Orlicz norm} we have \begin{equation}\label{chi norm B} \|\chi_B\|_{\Phi,\vp,w,B} = \|\chi_B\|_{\LP(B,\mu_B)} = \frac1{\Phi^{-1}(1/\mu_B(B))} = \frac1{\Phi^{-1}(\vp(B))}. \end{equation} Moreover, by \eqref{g Holder} we have \begin{equation}\label{g Holder B} \frac1{\vp(B)w(B)}\int_{B} |f(x)g(x)| w(x)\,dx \le 2\|f\|_{\Phi,\vp,w,B} \|g\|_{\cPhi,\vp,w,B}. \end{equation} Here we show the following lemma: \begin{lem}\label{lem:p} Let $w$ be a weight, $\Phi\in\bcY$ and $\vp:\R^n\times(0,\infty)\to(0,\infty)$. Then there exists a positive constant $C$ such that, for all balls $B$, \begin{equation}\label{fint 1} \frac1{w(B)}\int_B |f(x)|w(x)\,dx \le C\Phi^{-1}(\vp(B))\|f\|_{\Phi,\vp,w,B}. \end{equation} Moreover, assume that $t\mapsto\Phi(t)/t^p$ is almost increasing for some $p\in(1,\infty)$. Then there exists a positive constant $C_p$ such that \begin{equation}\label{fint p} \left(\frac1{w(B)}\int_{B} |f(x)|^p w(x)\,dy\right)^{1/p} \le C_p\Phi^{-1}(\vp(B)) \|f\|_{\Phi,\vp,w,B}, \end{equation} and, for all $q\in[1,p)$, there exists a positive constant $C_{p,q}$ such that \begin{equation}\label{fint q} \left(\frac1{w(B)}\int_{B} |f(x)|^q w(x)\,dy\right)^{1/q} \le C_{p,q}\Phi^{-1}(\vp(B)) \|f\|_{\Phi,\vp,w,B,\weak}. \end{equation} \end{lem} \begin{proof} We may assume that $\Phi\in\cY$. By \eqref{g Holder B}, \eqref{chi norm B} and \eqref{Phi cPhi r} we have \begin{align*} \frac1{w(B)}\int_B |f(x)|w(x)\,dx &\le 2\vp(B)\|f\|_{\Phi,\vp,w,B}\|\chi_B\|_{\cPhi,\vp,w,B} \\ &= \frac{2\vp(B)}{\cPhi^{-1}(\vp(B))}\|f\|_{\Phi,\vp,w,B} \\ &\le 2\Phi^{-1}(\vp(B))\|f\|_{\Phi,\vp,w,B}. \end{align*} Next, we assume that $t\mapsto\Phi(t)/t^p$ is almost increasing for some $p\in(1,\infty)$. Then $t\mapsto\Phi(t^{1/p})/t$ is almost increasing, which implies $\Phi((\cdot)^{1/p})\in\bcY$, see Remark~\ref{rem:index 2}. Let $\Phi_{p}\in\cY$ such that $\Phi_{p}\approx\Phi\left((\cdot)^{1/p}\right)$. Then ${\Phi_{p}}^{-1} \sim (\Phi^{-1})^{p}$ and $\||f|^p\|_{\Phi_{p},\vp,w,B}\sim(\|f\|_{\Phi,\vp,w,B})^p$. Using $\eqref{fint 1}$, we have \begin{align*} \left(\frac1{w(B)}\int_{B} |f(x)|^p w(x)\,dx\right)^{1/p} &\ls \big({\Phi_{p}}^{-1}(\vp(B)) \||f|^p\|_{\Phi_{p},\vp,w,B}\big)^{1/p} \\ &\sim \Phi^{-1}(\vp(B)) \|f\|_{\Phi,\vp,w,B}. \end{align*} Finally, we show \eqref{fint q}. We may assume that $\|f\|_{\Phi,\vp,w,B,\weak}=1$. Then \begin{equation*} w(B,f,t) \le \frac{\vp(B)w(B)}{\Phi(t)} \quad\text{for all}\quad t\in(0,\infty). \end{equation*} Let $q\in[1,p)$ and $t_0=\Phi^{-1}(\vp(B))$. Then $\Phi(t_0)=\vp(B)$. Since $t\mapsto\Phi(t)/t^p$ is almost increasing, \begin{align*} \int_B|f(x)|^qw(x)\,dx &= q\int_0^{t_0} t^{q-1} w(B,f,t) \,dt +q\int_{t_0}^{\infty} t^{q-1}w(B,f,t) \,dt \\ &\le {t_0}^qw(B) + q\int_{t_0}^{\infty} t^{q-1} \frac{\vp(B)w(B)}{\Phi(t)} \,dt \\ &= {t_0}^qw(B) + q\vp(B)w(B) \int_{t_0}^{\infty} \frac{ t^p }{ \Phi(t) } t^{-p+q-1} \,dt \\ &\ls {t_0}^qw(B) + q\vp(B)w(B) \frac{{t_0}^p}{ \Phi({t_0}) } \int_{t_0}^{\infty} t^{-p+q-1} \,dt \\ &= {t_0}^qw(B) +\frac{q}{p-q}{t_0}^qw(B). \end{align*} This shows the conclusion. \end{proof} At the end of this section we state another lemma. \begin{lem}[{\cite[Lemma~4.4]{Shi-Arai-Nakai2021Banach}}]\label{lem:int Phi vp} Let $\Phi\in\dtwo$ and $\vp:\R^n\times(0,\infty)\to(0,\infty)$. If $\vp$ satisfies \eqref{int vp x}, then there exists a positive constant $C$ such that, for all $x\in\R^n$ and $r\in(0,\infty)$, \begin{equation*} \int_r^{\infty}\frac{\Phi^{-1}(\vp(x,t))}{t}\,dt\le C\Phi^{-1}(\vp(x,r)). \end{equation*} \end{lem} Note that \cite[Lemma~4.4]{Shi-Arai-Nakai2021Banach} is the case $\vp:(0,\infty)\to(0,\infty)$. However the proof is the same. \section{Modular inequalities}\label{sec:modular} In this section we show the modular inequalities with $\Phi\in\bcY$ by using the indices $i(\Phi)$ and $I(\Phi)$. We first state known weighted inequalities. \begin{thm}[\cite{Coifman1972,Coifman-Fefferman1974,Hunt-Muckenhoupt-Wheeden1973,Muckenhoupt1972,Yabuta1985}]\label{thm:Lp bdd} Let $M$ be the Hardy-Littlewood maximal operator, and let $T$ be a Calder\'on-Zygmund operator of type $\omega\in\Omega$. Let $w\in A_p$, $1\le p\le\infty$. \begin{enumerate} \item If $1<p\le\infty$, then \begin{equation*} \int_{\R^n}(Mf(x))^pw(x)\,dx \le C\int_{\R^n}|f(x)|^pw(x)\,dx. \end{equation*} If $p=1$, then \begin{equation*} \sup_{t\in(0,\infty)}tw(Mf,t) \le C\int_{\R^n}|f(x)|w(x)\,dx. \end{equation*} \item If $1<p<\infty$, then \begin{equation*} \int_{\R^n}|Tf(x)|^pw(x)\,dx \le C\int_{\R^n}|f(x)|^pw(x)\,dx. \end{equation*} If $p=1$, then \begin{equation*} \sup_{t\in(0,\infty)}tw(Tf,t) \le C\int_{\R^n}|f(x)|w(x)\,dx. \end{equation*} \end{enumerate} \end{thm} Coifman and Fefferman~\cite{Coifman-Fefferman1974} prove the inequality \begin{equation}\label{CZ M} \int_{\R^n}|Tf(x)|^pw(x)\,dx \le C\int_{\R^n}(Mf(x))^pw(x)\,dx, \end{equation} for any $w\in A_{\infty}$ and any Calder\'on-Zygmund operator with standard kernel (the case $\omega(t)=t$ in Definition~\ref{defn:Kernel}). By the kernel estimates in \cite{Yabuta1985} we see that the inequality \eqref{CZ M} valids for any Calder\'on-Zygmund operator of type $\omega\in\Omega$. From the inequality \eqref{CZ M} Curbera, Garcia-Cuerva, Martell and Perez~\cite{Curbera-GarciaCuerva-Martell-Perez2006} proved the following inequalities: \begin{align}\label{modular T M} \int_{\R^n}\Phi(|Tf(x)|)w(x)\,dx &\le C\int_{\R^n}\Phi(Mf(x))w(x)\,dx, \\ \label{ww modular T M} \sup_{t\in(0,\infty)}\Phi(t)w(Tf,t) &\le C\sup_{t\in(0,\infty)}\Phi(t)w(Mf,t). \end{align} Then they proved the following modular inequalities except \eqref{ww modular M} and \eqref{ww modular CZO}, see \cite[Theorem~3.7]{Curbera-GarciaCuerva-Martell-Perez2006}. In this section we prove \eqref{ww modular M} and then \eqref{ww modular CZO}. That is, we have the following theorem: \begin{thm \label{thm:modular} Let $M$ be the Hardy-Littlewood maximal operator, and let $T$ be a Calder\'on-Zygmund operator of type $\omega\in\Omega$. Let $\Phi\in\bcY$, and let $w\in A_{i(\Phi)}$. \begin{enumerate} \item If $1<i(\Phi)\le\infty$, then \begin{align}\label{modular M} \int_{\R^n}\Phi(Mf(x))w(x)\,dx &\le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, \\ \label{ww modular M} \sup_{t\in(0,\infty)}\Phi(t)w(Mf,t) &\le C\sup_{t\in(0,\infty)}\Phi(t)w(Cf,t). \end{align} If $i(\Phi)=1$, then \begin{equation}\label{w modular M} \sup_{t\in(0,\infty)}\Phi(t)w(Mf,t) \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx. \end{equation} \item If $1<i(\Phi)\le I(\Phi)<\infty$, then \begin{align}\label{modular CZO} \int_{\R^n}\Phi(|Tf(x)|)w(x)\,dx &\le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, \\ \label{ww modular CZO} \sup_{t\in(0,\infty)}\Phi(t)w(Tf,t) &\le C\sup_{t\in(0,\infty)}\Phi(t)w(Cf,t). \end{align} If $i(\Phi)=1\le I(\Phi)<\infty$, then \begin{equation}\label{w modular CZO} \sup_{t\in(0,\infty)}\Phi(t)w(Tf,t) \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx. \end{equation} \end{enumerate} \end{thm} Kokilashvili and Krbec~\cite{Kokilashvili-Krbec1991} also investigated the modular inequalities except \eqref{ww modular M} and \eqref{ww modular CZO}. If $1<i(\Phi)\le I(\Phi)<\infty$ and $w$ is a weight, then the modular inequality \eqref{modular M} implies $w\in A_{i(\Phi)}$. see \cite[Theorem~2.1.1]{Kokilashvili-Krbec1991}. If $T=R_j$, $i=1,\dots, n$, which are the Reisz transforms, then \eqref{w modular CZO} also implies $w\in A_{i(\Phi)}$, see \cite[Theorem~3.1.1]{Kokilashvili-Krbec1991}. From this fact, \eqref{modular T M} and \eqref{ww modular T M} we have the following corollary: \begin{cor}\label{cor:modular} Let $M$ be the Hardy-Littlewood maximal operator, and let $R_j$, $i=1,\dots, n$, be the Reisz transforms. Let $w$ be a weight and $\Phi\in\bdtwo\cap\bntwo$, i.e., $1<i(\Phi)\le I(\Phi)<\infty$. Then the following are equivalent: \begin{enumerate} \item \ $\displaystyle \int_{\R^n}\Phi(Mf(x))w(x)\,dx \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, $ \item \ $\displaystyle \sup_{t\in(0,\infty)}\Phi(t)w(Mf,t) \le C\sup_{t\in(0,\infty)}\Phi(t)w(Cf,t), $ \item \ $\displaystyle \sup_{t\in(0,\infty)}\Phi(t)w(Mf,t) \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, $ \item \ $\displaystyle \int_{\R^n}\Phi(|R_jf(x)|)w(x)\,dx \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, $ \item \ $\displaystyle \sup_{t\in(0,\infty)}\Phi(t)w(R_jf,t) \le C\sup_{t\in(0,\infty)}\Phi(t)w(Cf,t), $ \item \ $\displaystyle \sup_{t\in(0,\infty)}\Phi(t)w(R_jf,t) \le C\int_{\R^n}\Phi(C|f(x)|)w(x)\,dx, $ \item \ $\displaystyle w \in A_{i(\Phi)}. $ \end{enumerate} \end{cor} Note that another pair of indices $a_{\Phi}$ and $b_{\Phi}$ are defined by \begin{equation*} a_{\Phi}=\inf_{t\in(0,\infty)}\frac{t\Phi'(t)}{\Phi(t)}, \quad b_{\Phi}=\sup_{t\in(0,\infty)}\frac{t\Phi'(t)}{\Phi(t)}. \end{equation*} Then $t\mapsto\Phi(t)/t^{a_{\Phi}}$ is increasing and $t\mapsto\Phi(t)/t^{b_{\Phi}}$ is decreasing (not almost), see \cite[Proposition~2.1~(ii) and (iii)]{Fu-Yang-Yuan2012} for example. However, these indices $a_{\Phi}$ and $b_{\Phi}$ are not sharp for the modular inequalities, see the following example. \begin{exmp}\label{exmp:type} Let \begin{equation*} \Phi(t)= \begin{cases} t^2, & t\in[0,1/4], \\ t/2-1/{16}, & t\in(1/4,1/2], \\ t^2/2+1/{16}, & t\in(1/2,\infty). \end{cases} \end{equation*} Then \begin{equation*} i(\Phi)=I(\Phi)=2, \quad\text{but}\quad a_{\Phi}=4/3, \ b_{\Phi}=2. \end{equation*} \end{exmp} Liu and Wang~\cite{Liu-Wang2013} also considered the weighted Orlicz spaces and they showed the modular inequality \eqref{ww modular M} by using the Marcinkiewicz-type interpolation theorem, see the proof of \cite[Theorem~5.1]{Liu-Wang2013}. However, they used indices $a_{\Phi}$ and $b_{\Phi}$, which are not sharp as shown by Example~\ref{exmp:type}. To prove \eqref{ww modular M} we prepare the following lemma: \begin{lem}\label{lem:Mw} For $w\in A_{\infty}$, let \begin{equation*} M_wf(x)=\sup_{B\ni x}\frac1{w(B)}\int_B |f(y)|w(y)\,dy. \end{equation*} Let $\Phi\in\bcY$. If $i(\Phi)>1$, then there exists a positive constant $c_1$ such that \begin{equation*} \sup_{t\in(0,\infty)}\Phi(t)w(M_wf,t) \le c_1\sup_{t\in(0,\infty)}\Phi(t)w(c_1f,t). \end{equation*} \end{lem} \begin{proof} We may asssume that $\Phi\in\cY$. First note that $M_w$ is bounded from $\wL^p(\R^n,w)$ to itself as same as $M$ is bounded from $\wL^p(\R^n)$ to itself if $p\in(1,\infty]$. If $i(\Phi)>1$, then $\Phi^{\theta}\in\biPy$ for some $\theta\in(0,1)$. In this case we have the inequality \begin{equation*} \Phi(M_wf(x))\le (cM_w(\Phi(c|f|)^{\theta})(x))^{1/\theta}, \end{equation*} for some constant $c$ by the same way as \cite[Proof of Proposition~5.1]{Curbera-GarciaCuerva-Martell-Perez2006}. Then \begin{align*} \sup_{t\in(0,\infty)}tw(\Phi(M_wf),t) &\le \sup_{t\in(0,\infty)}tw((cM_w(\Phi(c|f|)^{\theta}))^{1/\theta},t) \\ &= \sup_{t\in(0,\infty)}t^{1/\theta}w(cM_w(\Phi(c|f|)^{\theta}),t) \\ &\ls \sup_{t\in(0,\infty)}t^{1/\theta}w(\Phi(c|f|)^{\theta},t) \\ &= \sup_{t\in(0,\infty)}tw(\Phi(c|f|),t). \end{align*} By \eqref{weak type} we have the conclusion. \end{proof} \begin{proof}[Proof of \eqref{ww modular M}] We may asssume that $\Phi\in\cY$. We use a similar way to the proof of \eqref{modular M} in \cite{Curbera-GarciaCuerva-Martell-Perez2006}. Let $w\in A_i(\Phi)$. In both cases $1<i(\Phi)<\infty$ and $i(\Phi)=\infty$, there exists $r\in(1,i(\Phi))$ such that $w\in A_r$. Set $\Phi_r(t)=\Phi(t^{1/r})$. Then $i(\Phi_r)=i(\Phi)/r>1$. By \eqref{fint B} we have $Mf(x)\le\left([w]_{A_r}M_w(|f|^r)(x)\right)^{1/r}$ and then \begin{equation*} \Phi(Mf(x))\le\Phi_r(M_w\widetilde{f}(x)), \end{equation*} where $\widetilde{f}=[w]_{A_r}|f(x)|^r$. By Lemma~\ref{lem:Mw} and \eqref{weak type} we have \begin{align*} \sup_{t\in(0,\infty)}tw(\Phi(Mf),t) &\le \sup_{t\in(0,\infty)}tw(\Phi_r(M_w\widetilde{f}),t) \\ &\ls \sup_{t\in(0,\infty)}tw(\Phi_r(c_1\widetilde{f}),t) \\ &= \sup_{t\in(0,\infty)}tw(\Phi(Cf),t), \end{align*} which shows the conclusion. \end{proof} \section{Proofs}\label{sec:proof} To prove Theorem~\ref{thm:M CZO}, we prepare three lemmas. \begin{lem}\label{lem:Mf1} Let $\Phi\in\bcY$, $w\in A_{i(\Phi)}$ and $\vp\in\cGdec_w$. Let $B$ be a ball. If $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, then \begin{equation*} \|M(f\chi_{2B})\|_{\Phi,\vp,w,B,\weak}\le C \quad\text{and}\quad \|T(f\chi_{2B})\|_{\Phi,\vp,w,B,\weak}\le C. \end{equation*} If $1<i(\Phi)\le I(\Phi)\le\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$ or $\|f\|_{\wLPp(\R^n,w)}=1$, then \begin{equation*} \|M(f\chi_{2B})\|_{\Phi,\vp,w,B}\le C \quad\text{or}\quad \|M(f\chi_{2B})\|_{\Phi,\vp,w,B, \weak}\le C, \end{equation*} respectively. If $1<i(\Phi)\le I(\Phi)<\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$ or $\|f\|_{\wLPp(\R^n,w)}=1$, then \begin{equation*} \|T(f\chi_{2B})\|_{\Phi,\vp,w,B}\le C \quad\text{or}\quad \|T(f\chi_{2B})\|_{\Phi,\vp,w,B, \weak}\le C, \end{equation*} respectively. In the above the constant $C$ is independent of $f$ and $B$. \end{lem} \begin{proof} We use Theorem~\ref{thm:modular}. We only prove the case $i(\Phi)=1$ and $M$, since the other cases are similar. If $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, then by \eqref{w modular M} we have \begin{align*} \sup_{t\in(0,\infty)}\Phi(t)\,w\left(B,{M(f\chi_{2B})}/C,t\right) &\le \sup_{t\in(0,\infty)}\Phi(t)\,w\left({M(f\chi_{2B})}/C,t\right) \\ &\le C \int_{2B}\Phi(|f|)w(x)\,dx \\ &\le C \vp(2B)w(2B) \le C' \vp(B)w(B). \end{align*} We may assume that $C'\ge1$. Then \begin{equation*} \sup_{t\in(0,\infty)}\Phi(t)\,w\left(B,M(f\chi_{2B})/(C'C),t\right) \le \vp(B)w(B), \end{equation*} which shows the conclusion. \end{proof} \begin{lem}\label{lem:Mf2} Let $\Phi\in\bcY$, $w\in A_{i(\Phi)}$ and $\vp\in\cGdec_w$. Let $B$ be a ball. If one of the following three conditions holds; {\rm (1)} $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, {\rm (2)} $1<i(\Phi)\le\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$, {\rm (3)} $1<i(\Phi)\le\infty$ and $\|f\|_{\wLPp(\R^n,w)}=1$, then \begin{equation}\label{Mf2} M(f\chi_{(2B)^{\complement}})(x)\le C_0\Phi^{-1}(\vp(B)), \quad x\in B, \end{equation} where the constant $C_0$ is independent of $f$ and $B$. \end{lem} \begin{proof} Let $f_2=f\chi_{(2B)^{\complement}}$, $B=B(a,r)$ and $x\in B$. We show that, for all balls $B'\ni x$, \begin{equation*} \frac{1}{|B'|}\int_{B'} |f_2(x)|\,dx \ls \Phi^{-1}(\vp(B)). \end{equation*} Let $B'=B(z,r')$. If $r'\le r/2$, then $\int_{B'} |f_2(y)|\,dy=0$, since $B'\subset2B$. If $r'> r/2$, then $B'\subset B(a,3r')$. Setting $B''=B(a,3r')$, we have \begin{equation*} \frac{1}{|B'|}\int_{B'} |f_2(x)|\,dx \ls \frac{1}{|B''|}\int_{B''} |f_2(x)|\,dx. \end{equation*} If we show \begin{equation}\label{B''} \frac{1}{|B''|}\int_{B''} |f_2(x)|\,dx \ls \Phi^{-1}(\vp(B'')), \end{equation} then we have \eqref{Mf2}, since $\vp$ is almost decreasing and $\Phi^{-1}$ satisfies the doubling condition. \noindent Case (1): We use \eqref{fint B} and \eqref{fint 1}. Since $w\in A_1$, we have \begin{equation*} \frac{1}{|B''|}\int_{B''} |f_2(x)|\,dx \ls \frac{1}{w(B'')}\int_{B''} |f_2(x)|w(x)\,dx \ls \Phi^{-1}(\vp(B'')). \end{equation*} \noindent Case (2): We use \eqref{fint B} and \eqref{fint p}. Since $i(\Phi)>1$ and $w\in A_{i(\Phi)}$, we can take $p\in(1,i(\Phi))$ such that $w\in A_p$. In this case $t\mapsto\Phi(t)/t^p$ is almost increasing and \begin{equation*} \frac{1}{|B''|}\int_{B''} |f_2(x)|\,dx \ls \left(\frac{1}{w(B'')}\int_{B''} |f_2(x)|^pw(x)\,dx\right)^{1/p} \ls \Phi^{-1}(\vp(B'')). \end{equation*} \noindent Case (3): We use \eqref{fint B} and \eqref{fint q}. Since $i(\Phi)>1$ and $w\in A_{i(\Phi)}$, we can take $q\in(1,i(\Phi))$ such that $w\in A_q$. In this case $t\mapsto\Phi(t)/t^p$ is almost increasing for $p\in(q,i(\Phi))$ and \begin{equation*} \frac{1}{|B''|}\int_{B''} |f_2(x)|\,dx \ls \left(\frac{1}{w(B'')}\int_{B''} |f_2(x)|^qw(x)\,dx\right)^{1/q} \ls \Phi^{-1}(\vp(B'')). \end{equation*} Therefore, we have the conclusion. \end{proof} \begin{lem}\label{lem:Tf2} Let $\Phi\in\bcY$, $w\in A_{i(\Phi)}$ and $\vp\in\cGdec_w$. Assume that $\vp$ satisfies \eqref{int vp x}. Let $B$ be a ball. If one of the following three conditions holds; {\rm (1)} $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, {\rm (2)} $1<i(\Phi)\le I(\Phi)<\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$, {\rm (3)} $1<i(\Phi)\le I(\Phi)<\infty$ and $\|f\|_{\wLPp(\R^n,w)}=1$, then \begin{equation*} \int_{\R^n\setminus{2B}}|K(x,y)f(y)|\,dy \le C_0 \Phi^{-1}(\vp(B)), \quad x\in B, \end{equation*} where the constant $C_0$ is independent of $f$ and $B$. \end{lem} \begin{proof} By Remark~\ref{rem:index 2}~\ref{item:bdtwo} we may assume that $\Phi\in\dtwo$. Let $B=B(a,r)$ and $B_k=B(a,2^kr)$, $k=1,2,\ldots$. Then \begin{align*} \int_{\R^n\setminus{2B}} |K(x,y)f(y)|\,dy &= \sum_{k=2}^{\infty}\int_{B_k\setminus B_{k-1}} |K(x,y) f(y)|\,dy \\ &\ls \sum_{k=2}^\infty \frac{1}{|B_k|}\int_{B_k} |f(y)|\,dy. \end{align*} For each case of (1), (2) and (3), by the same way as in the proof of the previous lemma, we have \begin{equation*} \frac{1}{|B_k|}\int_{B_k} |f(y)|\,dy \ls \Phi^{-1}(\vp(B_k)), \end{equation*} instead of \eqref{B''}. By the doubling condition of $\Phi^{-1}(\vp(\cdot))$ and Lemma~\ref{lem:int Phi vp} we have \begin{align*} \int_{\R^n\setminus{2B}} |K(x,y)f(y)|\,dy &\ls \sum_{k=2}^\infty \Phi^{-1}(\vp(B_k)) \\ &\sim \sum_{k=2}^\infty \int_{2^{k-1}r}^{2^{k}r}\frac{\Phi^{-1}(\vp(a,t))}{t}\,dt \\ &\le \int_r^\infty\frac{\Phi^{-1}(\vp(a,t))}{t}\,dt \ls \Phi^{-1}(\vp(B)), \end{align*} which shows the conclusion. \end{proof} Now we prove Theorem~\ref{thm:M CZO}. \begin{proof}[\bf Proof of Theorem~\ref{thm:M CZO} (i)]\label{proof of Theorem CZO (i)} Let $f \in \LPp(\R^n,w)$ or $f \in \wLPp(\R^n,w)$. We may assume that $\|f\|_{\LPp(\R^n,w)}=1$ or $\|f\|_{\wLPp(\R^n,w)}=1$, respectively. We will show that $\|Mf\|_{\Phi,\vp,w,B}\le C$ or $\|Mf\|_{\Phi,\vp,w,B,\weak}\le C$ for any ball $B=B(a,r)$. Let $f=f_1+f_2$ with $f_1 = f\chi_{2B}$. If $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, or, if $1<i(\Phi)\le\infty$ and $\|f\|_{\wLPp(\R^n,w)}=1$, then $\|Mf_1\|_{\Phi,\vp,w,B,\weak}\le C$ by Lemma~\ref{lem:Mf1}. If $1<i(\Phi)\le\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$, then $\|Mf_1\|_{\Phi,\vp,w,B}\le C$ by Lemma~\ref{lem:Mf1}. Moreover, by Lemma~\ref{lem:Mf2} we have \begin{equation*} \|Mf_2\|_{\Phi,\vp,w,B,\weak} \le \|Mf_2\|_{\Phi,\vp,w,B} \le C_0. \end{equation*} The proof is complete. \end{proof} \begin{proof}[\bf Proof of Theorem~\ref{thm:M CZO} (ii)]\label{proof of Theorem CZO (ii)} Let $f \in \LPp(\R^n,w)$ or $f \in \wLPp(\R^n,w)$. We may assume that $\|f\|_{\LPp(\R^n,w)}=1$ or $\|f\|_{\wLPp(\R^n,w)}=1$, respectively. For any ball $B=B(a,r)$, let $f=f_1+f_2$ with $f_1 = f\chi_{2B}$, and let \begin{equation}\label{Tf def} Tf(x)=Tf_1(x)+\int_{\R^n}K(x,y)f_2(y)\,dy, \quad x\in B. \end{equation} We will show that $Tf(x)$ in \eqref{Tf def} is well defined and independent of the choice of $B$ containing $x$ and that $T$ is bounded. For the part $Tf_1$, by Lemma~\ref{lem:Mf1}, if $i(\Phi)=1$ and $\|f\|_{\LPp(\R^n,w)}=1$, or, if $1<i(\Phi)\le I(\Phi)<\infty$ and $\|f\|_{\wLPp(\R^n,w)}=1$, then \begin{equation}\label{Tf1 w} \|Tf_1\|_{\Phi,\vp,w,B,\weak}\le C. \end{equation} If $1<i(\Phi)\le I(\Phi)<\infty$ and $\|f\|_{\LPp(\R^n,w)}=1$, then \begin{equation}\label{Tf1} \|Tf_1\|_{\Phi,\vp,w,B}\le C. \end{equation} Moreover, by Lemma~\ref{lem:Tf2} we have \begin{equation*} \left|\int_{\R^n} K(x,y)f_2(y)\,dy\right| \le \int_{\R^n\setminus{2B}}|K(x,y)f(y)|\,dy \le C_0 \Phi^{-1}(\vp(B)), \quad x\in B. \end{equation*} Then \begin{align*} \int_B \Phi\left( \frac{\left|\int_{\R^n} K(x,y)f_2(y)\,dy\right|}{C_0} \right) w(x)\,dx &\le \int_B \Phi\left( \Phi^{-1}(\vp(B)) \right) w(x)\,dx \\ &= \vp(B)w(B), \end{align*} that is, \begin{equation}\label{Tf2} \left\|\int_{\R^n}K(\cdot,y)f_2(y)\,dy\right\|_{\Phi,\vp,w,B,\weak} \le \left\|\int_{\R^n}K(\cdot,y)f_2(y)\,dy\right\|_{\Phi,\vp,w,B} \le C_0. \end{equation} Moreover, if $x \in B\cap B'$ and \begin{equation*} f = f_1 + f_2 = g_1 + g_2, \quad f_1 = f\chi_{2B}, \quad g_1 = g\chi_{2B'} \end{equation*} then $\supp(f_2 - g_2)$ is compact and $x \notin \supp(f_2 - g_2)$. From \eqref{CZ3}, it follows that \begin{equation*} \int_{\R^n} K(x, y)\left(f_2(y) - g_2(y) \right)\,dy = T(f_2-g_2)(x). \end{equation*} Hence \begin{equation*} \left(Tf_1(x) + \int_{\R^n} K(x,y)f_2(y) dy\right) - \left(Tg_1(x) + \int_{\R^n} K(x,y)g_2(y) dy\right) = 0. \end{equation*} Therefore, $Tf(x)$ in \eqref{Tf def} is well defined and independent of the choice of $B$ containing $x$. Further, by \eqref{Tf1 w}, \eqref{Tf1} and \eqref{Tf2} we have \begin{equation*} \|Tf\|_{\Phi,\vp,w,B,\weak}\le C \quad\text{or}\quad \|Tf\|_{\Phi,\vp,w,B}\le C, \quad\text{for all balls $B$}, \end{equation*} which shows the conclusion. \end{proof} \section*{Acknowledgement} The authors would like to thank the referee for her/him careful reading and useful comments. The second author was supported by Grant-in-Aid for Scientific Research (B), No.~15H03621 and 20H01815, Japan Society for the Promotion of Science.
\section{Introduction\label{sec:Int}} Non-Hermitian topological matter has attracted great attention in the past decade~(see \cite{NHRev1,NHRev2,NHRev3,NHRev4,NHRev5,NHRev6} for reviews). Theoretically, these unique phases have been classified according to their symmetries and exceptional topologies~\cite{NHClass1,NHClass2,NHClass3,NHClass4,NHClass5,NHClass6}. Experimentally, non-Hermitian topological phases have been engineered in a broad range of physical platforms~\cite{NHExp1,NHExp2,NHExp3,NHExp4,NHExp5,NHExp6,NHExp7,NHExp8,NHExp9,NHExp10,NHExp11,NHExp12,NHExp13,NHExp14}, yielding potential applications such as topological lasers \cite{TILZ1,TILZ2,TILZ3} and high-performance sensors~\cite{NHSens1,NHSens2,NHSens3,NHSens4}. The localization problem in non-Hermitian systems was introduced early on by Hatano and Nelson~\cite{HNM1}, and followed up by a series of related studies~\cite{HNM2,HNM3,HNM4,HNM5}. In the Hatano-Nelson model, the asymmetry in the hopping amplitude of the one-dimensional Anderson model was found to be able to induce a transition from an insulator to a metallic phase. Recently, the development of non-Hermitian topological matter has re-evoked the interest in non-Hermitian systems with spatial aperiodicity. Specially, the interplay between non-Hermitian effects and quasiperiodic modulations has been found to induce rich patterns of localization-delocalization transitions, topological phase transitions and mobility edges in one-dimensional~(1D) non-Hermitian quasicrystals~(NHQCs)~\cite{NHQC1,NHQC2,NHQC3,NHQC4,NHQC5,NHQC6,NHQC7,NHQC8,NHQC9,NHQC10,NHQC11,NHQC12,NHQC13,NHQC14,NHQC15,NHQC16,NHQC17,NHQC18,NHQC19,NHQC20,NHQC21,NHQC22,NHQC23,NHQC24,NHQC25}. Typical systems considered in the study of 1D NHQCs include various extensions of the Aubry-Andr\'e-Harper~\cite{NHQC1,NHQC2,NHQC3,NHQC4,NHQC5}, Fibonacci~\cite{NHQC17}, Su-Schrieffer-Heeger~\cite{NHQC21}, Kitaev chain~\cite{NHQC24} and Maryland~\cite{NHQC25} models. Localization and topological transitions induced by time-periodic driving fields have also been investigated in the context of Floquet NHQCs~\cite{NHQC26}. Another way to make a disordered system non-Hermitian is to couple it to the outside world by a lead, as explored earlier in \cite{OpenQC}. In this work, we introduce a non-Hermitian extension of the quasiperiodic Maryland model~\cite{MM1,MM2,MM3,MM4,MM5,MM6} by adding nonreciprocity to its hopping amplitudes. The resulting system exhibits two distinct NHQC phases and a phase transition induced by the hopping asymmetry. We introduce our model in Sec.~\ref{sec:Mod} and reveal its key features in Sec.~\ref{sec:Res}. Besides characterizing the real-to-complex spectrum transition and the delocalization transition from an insulator to a mobility edge phase with coexisting extended and localized states in Secs.~\ref{subsec:E} and \ref{subsec:IPR}, we also introduce a topological winding number to describe different phases and transitions in the nonreciprocal Maryland model in Sec.~\ref{subsec:WN}. We summarize our results and discuss potential future work in Sec.~\ref{sec:Sum}. \section{Model\label{sec:Mod}} The Maryland model describes particles hopping in a tight-binding lattice and subject to an unbounded onsite superlattice potential. Its Hamiltonian in position representation takes the form $H_{0}=\sum_{n}(J|n\rangle\langle n+1|+{\rm H.c.}+V\tan(\pi\alpha n)|n\rangle\langle n|)$. Here $J$ is the nearest-neighbor~(NN) hopping amplitude, $V$ is the amplitude of onsite potential, $n\in\mathbb{Z}$ is the lattice site index and $\{|n\rangle\}$ forms a complete basis of the lattice. $\alpha$ is chosen as an irrational number to realize quasiperiodic modulations. The Hermitian Maryland model $H_{0}$ is first introduced as an integrable model to study localization problems in quantum chaotic systems~\cite{MM1,MM2,MM3,MM4,MM5,MM6}. Later, it is also utilized to understand the localization in higher dimensions~\cite{MM7,MM8,MM9} and topological features of integer quantum Hall effects~\cite{MM10}. Experimentally, the Maryland model might be realized in photonic systems by engineering the light propagation in polygonal optical waveguide lattices \cite{MMExp1}. In this work, we focus on the localization problem in a non-Hermitian extension of the Maryland model, which is obtained by incorporating asymmetry into the hopping amplitudes of $H_0$. The Hamiltonian of the resulting system, which is dubbed the nonreciprocal Maryland model (NRMM), takes the following form \begin{alignat}{1} H & = J\sum_{n}(e^{-\gamma}|n\rangle\langle n+1|+e^{\gamma}|n+1\rangle\langle n|)\nonumber \\ & + V\sum_{n}\tan(\pi\alpha n)|n\rangle\langle n|.\label{eq:H} \end{alignat} Here $J,V,\gamma\in\mathbb{R}$. $\gamma$ measures the degree of asymmetry between left-to-right and right-to-left NN hopping amplitudes. We take the periodic boundary condition~(PBC) for all calculations below by identifying $|n\rangle=|n+L\rangle$, where $n=1,2,...,L$ and $L$ is the length of lattice. When $\alpha=p/q$ ($p,q$ being coprime integers) is chosen to be a rational number and $L$ is an integer multiple of $q$, the system is in the commensurate regime and under the PBC it is expected to hold charge density wave like states. In this work, we instead take $\alpha=\frac{\sqrt{5}-1}{2}$, i.e., the inverse golden ratio to yield a quasiperiodic potential. Inserting the expansion of state $|\psi\rangle=\sum_{n}\psi_{n}|n\rangle$ into the eigenvalue equation $H|\psi\rangle=E|\psi\rangle$, we obtain \begin{equation} J(e^{-\gamma}\psi_{n+1}+e^{\gamma}\psi_{n-1})+V\tan(\pi\alpha n)\psi_{n}=E\psi_{n}.\label{eq:Seq} \end{equation} Here $E$ is the energy of state $|\psi\rangle$, which is in general complex as $H\neq H^{\dagger}$. $\psi_{n}\equiv\langle n|\psi\rangle$ represents the amplitude of right eigenvector $|\psi\rangle$ on the $n$th lattice site. The solution of Eq.~(\ref{eq:Seq}) under the PBC then yields all the possible eigenenergies and eigenstates of the NRMM. Note that in numerical calculations, we take a rational approximation for $\alpha$ by setting $\alpha\simeq F_{l}/F_{l+1}$, where $F_{l}$ and $F_{l+1}$ are two adjacent elements of the Fibonacci sequence. In the Hermitian limit ($\gamma=0$), due to the unbounded nature of onsite potential $V_{n}=V\tan(\pi\alpha n)$, all eigenstates of $H$ are localized with energy-dependent localization lengths for irrational $\alpha$ and $V\neq0$. Away from the Hermitian limit, however, we find a nonreciprocity induced transition of the system from a localized phase with real spectrum to a mobility edge phase with complex spectrum at a finite $\gamma=\gamma_{c}$, which is thus of non-Hermitian origin. Note that the mobility edge phase means a phase in which extended and localized states coexist and are separated in their energies by a mobility edge. We present systematic characterizations of this transition and the resulting energy-dependent mobility edges in the following section. \section{Results\label{sec:Res}} In this section, we investigate the spectrum, delocalization and topological transitions of the NRMM. In Sec.~\ref{subsec:E}, we study the energies of NRMM and find a real-to-complex spectral transition at a finite hopping asymmetry $\gamma=\gamma_{c}$, whose expression as a function of the hopping amplitude and onsite potential is obtained. In Sec.~\ref{subsec:IPR}, the spectrum transition is connected to a transition of the system from localized to mobility edge phases. The mobility edge separating localized and extended states is further picked up and its expression is found to be energy-dependent. In Sec.~\ref{subsec:WN}, a topological winding number is introduced to distinguish phases with different transport nature and characterize the transitions between them in the NRMM, thus yielding a complete phase diagram. For ease of reference, we summarize our main results about the NRMM in Table~\ref{tab:NRMM}. \begin{table*} \begin{centering} \begin{tabular}{|c|c|c|} \hline \textbf{Phase} & \textbf{Localized} & \textbf{Mobility edge}\tabularnewline \hline \hline \textbf{Condition} & $|2J\sinh\gamma|<|V|$ & $|2J\sinh\gamma|>|V|$\tabularnewline \hline \textbf{Spectrum} & Real & Complex~(see Eq.~(\ref{eq:EPM}))\tabularnewline \hline \textbf{IPR} & $>0$ for all states & $>0$ and $\simeq0$ coexist\tabularnewline \hline \textbf{Mobility edge equation} & \multicolumn{2}{c|}{$\frac{V^{2}}{(2J\sinh\gamma)^{2}}+\frac{({\rm Re}E)^{2}}{(2J\cosh\gamma)^{2}}=1$}\tabularnewline \hline \textbf{Winding number} & \multicolumn{2}{c|}{$w=\int_{0}^{2\pi}\frac{d\theta}{2\pi i}\partial_{\theta}\ln\det[H(\theta)-E_{0}]=\begin{cases} 0 & {\rm Localized}\\ \pm1 & {\rm Mobility\,\,edge} \end{cases}$}\tabularnewline \hline \end{tabular} \par\end{centering} \caption{Summary of results for the NRMM. $J$, $\gamma$ and $V$ control the hopping amplitude, hopping asymmetry and onsite potential. $E$ is the eigenenergy. $H(\theta)$ is obtained from $H$ in Eq.~(\ref{eq:H}) by setting $e^{\pm\gamma}\rightarrow e^{\pm\gamma\pm i\theta/L}$, with $L$ being the length of lattice. The base energy is set as $E_{0}=0$ in the calculation of $w$.\label{tab:NRMM}} \end{table*} \subsection{Real-to-complex spectrum transition\label{subsec:E}} We first study the spectrum of NRMM by solving the eigenvalue Eq.~(\ref{eq:Seq}). Two typical examples of the spectrum are presented in Figs.~\ref{fig:E}(a) and \ref{fig:E}(b), where ${\rm Re}E$ and ${\rm Im}E$ refer to the real and imaginary parts of energy $E$, respectively. We observe that with weak hopping asymmetry $\gamma$, the eigenvalues of $H$ could retain real. When $\gamma$ goes beyond a critical value $\gamma_{c}$, a finite amounts of eigenenergies deviate from the real axis, and the spectrum undergoes a real-to-complex transition. After the transition, the complex part of eigenenergies develop a loop on the ${\rm Re}E$-${\rm Im}E$ plane surrounding a base energy $E_{0}=0$. The points along the loop in Fig.~\ref{fig:E}(b) satisfy the equation \begin{equation} E_{\pm}=2J\cos(\beta-i\gamma)\pm iV,\quad\beta\in[-\pi,\pi)\label{eq:EPM} \end{equation} under the constraint ${\rm Im}{E_{-}}>{\rm Im}{E_{+}}$. \begin{figure} \begin{centering} \includegraphics[scale=0.47]{NRMM_E_vs_V-GAM_PBC_J-1_L-377} \par\end{centering} \caption{Spectrum and DOS of NRMM under the PBC. System parameters are $J=1$, $\alpha=\frac{\sqrt{5}-1}{2}$ for all panels, and the length of lattice is $L=377$. (a) and (b) show two typical examples of the spectrum on the complex plane with $V=1$. (c) and (d) show the maximal imaginary parts of eigenenergies $\max|{\rm Im}E|$ and DOS with complex energies $\rho$ at different sets of $(V,\gamma)$. The red dashed lines in (c) and (d) highlight the boundaries between phases with real and complex spectrum, which are determined by Eq.~(\ref{eq:Gc}).\label{fig:E}} \end{figure} To find the critical point $\gamma_{c}$ as a function of system parameters, we evaluate the maximum of imaginary parts of energy $\max|{\rm Im}E|$ and the density of states~(DOS) with complex eigenvalues $\rho$ at different $V$ and $\gamma$, with results presented in Figs.~\ref{fig:E}(c) and \ref{fig:E}(d). In numerical calculations, we count $E$ as a complex eigenvalue if $|{\rm Im}E|>10^{-5}$. It is clear that once $V\neq0$, we could obtain spectrum transitions from real to complex in the NRMM with the increase of $|\gamma|$. By setting Im$E_{\pm}=0$ in Eq.~(\ref{eq:EPM}), we find the critical values of hopping asymmetry $\gamma=\gamma_c$ where spectrum transitions happen, i.e., \begin{equation} \gamma_{c}=\pm{\rm arcsinh}\left(\frac{V}{2J}\right).\label{eq:Gc} \end{equation} When $|\gamma|<|\gamma_{c}|$, all eigenvalues of $H$ are found to be real, whereas a finite portion of the spectrum becomes complex for $|\gamma|>|\gamma_{c}|$. We plot these exact phase boundaries by red dashed lines in Figs. \ref{fig:E}(c) and \ref{fig:E}(d), and find that they are coincide with numerical calculations of the spectrum. Meanwhile, Eq.~(\ref{eq:Gc}) provides us with a guideline for the study of transport nature of the NRMM, as will be discussed in the next subsection. \subsection{Delocalization transition and mobility edge\label{subsec:IPR}} In NHQCs, spectrum transitions usually accompany state transitions regarding their spatial profiles~\cite{NHQC1,NHQC5}. In the NRMM, we also discover a transition from an insulator phase with no extended eigenstates to a mobility edge phase, in which extended and localized eigenstates coexist. To see this, we first inspect the inverse participation ratio~(IPR), which is defined for the $i$th normalized eigenstate $|\psi^{i}\rangle$ of $H$ in the lattice representation as ${\rm IPR}_{i}={\textstyle \sum_{n=1}^{L}}|\psi_{n}^{i}|^{4}$. Here the amplitude $\psi_{n}^{i}=\langle n|\psi^{i}\rangle$ and $i=1,2,...,L$. In the localized phase, all eigenstates have finite IPRs. Extended states start to appear when the minimum of IPRs, denoted as $\min({\rm IPR})$, starts to approach zero. In Fig.~\ref{fig:IPR}(a), we show the minimum, maximum and average of IPRs for the NRMM. It is clear that the $\max({\rm IPR})\simeq1$ due to the unbounded nature of the onsite potential $V_{n}$, which indicates that there are localized states at any hopping asymmetry in the limit $L\rightarrow\infty$. Notably, the $\min({\rm IPR})$ decreases to zero when $\gamma$ goes beyond a critical value $\gamma_{c}$, which happens to be coincide with the critical point of spectrum transition in Eq.~(\ref{eq:Gc}). Therefore, when the hopping asymmetry is tuned from below to above the critical point $\gamma_{c}$, the NRMM transforms from a localized phase with real spectrum to a mobility edge phase with complex spectrum. The number of extended states in the mobility edge phase further increases with the increase of $\gamma$, as hinted by the ${\rm ave}({\rm IPR})$ in Fig.~\ref{fig:IPR}(a). In Fig.~\ref{fig:IPR}(b), we present the $\min({\rm IPR})$ as a function of system parameters $(V,\gamma)$, and indeed observe two distinct phases characterized by $\min({\rm IPR})>0$ and $\min({\rm IPR})\simeq0$. Their boundaries are highlighted by the red dashed lines and given exactly by Eq.~(\ref{eq:Gc}). To the best of our knowledge, the NRMM contributes the first example of a 1D NHQC with only localized and mobility edge phases, but no metallic phases at any amounts of non-Hermiticity. \begin{figure} \begin{centering} \includegraphics[scale=0.47]{NRMM_IPR_vs_V-GAM_PBC_J-1_L-987} \par\end{centering} \caption{IPRs of NRMM under the PBC. The length of lattice is $L=987$. System parameters are $J=1$, $\alpha=\frac{\sqrt{5}-1}{2}$ for all panels. In (a), the solid, dashed and dash-dotted lines show the minimum, maximum and average of IPRs versus the hopping asymmetry $\gamma$ at $V=1$. The crossing point of the dotted line and the horizontal axis corresponds to the critical value of $\gamma=\gamma_{c}={\rm asinh}(V/2J)\approx0.4812$, where the system undergoes a transition from the localized to the mobility edge phase. (b) shows the minimum of IPRs at different parameters $(V,\gamma)$. The red dashed lines refer to the boundaries between localized and mobility edge phases, which are given by Eq.~(\ref{eq:Gc}). The IPRs of all states versus the real parts of their energies and $V$ ($\gamma$) are shown in (c) ((d)) with $\gamma=0.5$ ($V=1$). The magenta dashed lines obtained following Eq.~(\ref{eq:ME}) are mobility edges separating extended and localized states.\label{fig:IPR}} \end{figure} To give a more detailed look at the mobility edge, we show the IPRs of all eigenstates of the NRMM versus the real parts of their energies and the potential amplitude $V$~(hopping asymmetry $\gamma$) for two typical examples in Figs.~\ref{fig:IPR}(c) and \ref{fig:IPR}(d). We observe that the states with ${\rm IPR}\simeq0$ and ${\rm IPR}>0$ are clearly separated in both figures. Moreover, with thorough numerical analysis, we find an equation that describes the mobility edge of the NRMM, i.e., \begin{equation} \frac{V^{2}}{(2J\sinh\gamma)^{2}}+\frac{({\rm Re}E)^{2}}{(2J\cosh\gamma)^{2}}=1.\label{eq:ME} \end{equation} Trajectories determined by this equation, presented by the magenta dashed lines in Figs.~\ref{fig:IPR}(c) and \ref{fig:IPR}(d), separate states with vanishing and finite IPRs in the energy-parameter plane of the system. Moreover, the Eq.~(\ref{eq:ME}) is well-defined at finite $V$ only if $\gamma\neq0$. Therefore, mobility edges in the NRMM are solely originated from non-Hermitian effects encoded in the hopping asymmetry of the lattice. \subsection{Topological invariant and phase diagram\label{subsec:WN}} In recent studies, a spectral winding number has been introduced to depict the transitions between different NHQC phases~\cite{NHQC1}, following a strategy that is different from the topological characterization of Hermitian quasicrystals~(see \cite{QCRev1} for a review). The general idea is to incorporate a periodic parameter $\theta$ into the Hamiltonian $H$ of the system, usually achieved by imposing the twist boundary condition~(flux insertion), and then track the spectral flow of the parameter-dependent Hamiltonian $H(\theta)$ with respect to a certain base energy on the complex plane during the change of $\theta$ over a cycle. If the spectrum of $H(\theta)$ is real, all eigenvalues collapse onto the real axis and their winding number $w$ must vanish with respect to any base energies. If $H(\theta)$ possesses complex energies, their flow with respect to $\theta$ could form loops around certain points on the complex plane, and the spectral winding number of $H(\theta)$ around these points could be nonzero and quantized. The value of $w$ jumps whenever the spectral of the system changes from real to complex, or vice versa. Therefore, $w$ can be naturally employed as a topological order parameter to distinguish NHQC phases with real and complex eigenspectrum. Interestingly, it was found in some typical NHQC models~\cite{NHQC1,NHQC26} that the real-complex spectral transition could go together with a localization-delocalization transition (with a possible exception reported in Ref.~\cite{NHQC23}). Therefore, we may adopt the same winding number to signify the emergence of mobility edge phase in our system, since the extended states therein are those whose energies possess nonvanishing imaginary parts. For the NRMM, we construct a spectral winding number as \begin{equation} w=\frac{1}{2\pi i}\int_{0}^{2\pi}\partial_{\theta}\ln\det[H(\theta)-E_{0}]d\theta.\label{eq:WN} \end{equation} Here $H(\theta)$ is obtained from $H$ by letting $e^{\pm\gamma}\rightarrow e^{\pm\gamma\pm i\theta/L}$ in Eq.~(\ref{eq:H}), with $L$ being the length of lattice. This winding number counts the number of times the spectrum of $H(\theta)$ winds around the base energy $E_{0}$ when $\theta$ changes over a cycle from zero to $2\pi$. Referring to the spectrum presented in Fig.~\ref{fig:E}, we choose $E_{0}=0$ in our calculation of $w$ without loss of generality. It is clear that in the Hermitian region~($\gamma=0$) we have $w=0$, since in this case $H(\theta)$ has only real energies. At a finite hopping asymmetry $\gamma=\gamma_c$, we expect a quantized jump of $w$ from zero to $\pm1$, which should be accompanied by the spectrum transition of the NRMM from real to complex. \begin{figure} \begin{centering} \includegraphics[scale=0.48]{NRMM_WN_vs_V-GAM_PBC_J-1_L-377} \par\end{centering} \caption{Winding numbers of the NRMM. System parameters are $J=1$ and $\alpha=\frac{\sqrt{5}-1}{2}$. The length of lattice is $L=377$ with the twist boundary condition. Each region with a uniform color corresponds to a phase with common spectrum and transport features, whose winding number $w$ is denoted explicitly therein. The red dashed lines separating different regions denote the phase boundaries obtained from Eq.~(\ref{eq:Gc}).\label{fig:WN}} \end{figure} In Fig.~\ref{fig:WN}, we present the winding number $w$ of NRMM versus the onsite potential $V$ and hopping nonreciprocity $\gamma$, which is obtained directly from Eq.~(\ref{eq:WN}). The red dashed lines in Fig.~\ref{fig:WN} highlight the exact phase boundaries, which are given by Eq.~(\ref{eq:Gc}). We observe that the winding number $w$ takes a quantized change when crossing the border between two NHQC phases, and remain constant elsewhere. More specially, we find $w=0$ when the system is prepared in the localized phase with real spectrum, and $w=\pm1$ if the system moves into the mobility edge phase with complex spectrum. These observations confirm that the topological winding number $w$ can indeed be utilized to discriminate the NHQC phases of NRMM with distinct spectrum and transport nature, and characterize the transitions between them in the meantime. For completeness, we have checked other values of the irrational parameter $\alpha$ (e.g., $\alpha=(\sqrt{5}+1)/2$, $1/\sqrt{2}$) in our calculations of spectrum, IPRs and winding numbers of the NRMM. The results we obtained are all consistent with those reported in Figs.~\ref{fig:E}--\ref{fig:WN}, which implies that the conclusion we drew from this section is general to other incommensurate values of the onsite potential in Eq.~(\ref{eq:H}). \section{Summary and discussion\label{sec:Sum}} In this work, we uncover non-Hermiticity induced spectral, localization and topological phase transitions in the nonreciprocal Maryland model. A transformation of the system from a localized phase with real spectrum to a mobility edge phase with complex spectrum can be obtained only if there are finite amounts of hopping asymmetry. The equations satisfied by the complex spectrum, phase boundaries and energy-dependent mobility edges are found exactly. A topological order parameter is further employed to build the phase diagram and characterize transitions between different NHQC phases. Notably, due to the unbounded nature of onsite potential in the NRMM, we find no extended phases at any finite hopping nonreciprocity, which is distinct from the situation found in a Maryland model with complex onsite potential~\cite{NHQC25}. Our study thus enriches the family of NHQCs by unveiling a particular type of system with only localized and mobility edge phases, whose properties can be characterized exactly. In future work, it would be interesting to consider many-body effects in Maryland-type NHQCs and investigate their dynamical properties. The interplay between non-Hermiticity and quantum chaos in the NRMM can further be studied following the mapping discussed in Appendix \ref{app:1}. In this work, our calculations are performed under the PBC and the non-Hermitian skin effects (NHSEs) \cite{NHSE1,NHSE2,NHSE3,NHSE4,NHSE5} are expected to have no impacts on the results. Under the open boundary condition, the nonreciprocal hoppings in our model could possibly induce non-Hermitian skin modes. Recently, it was shown that (de)localization transitions and (pseudo) mobility edges could even emerge in clean systems due to the NHSEs, and topological characterizations of these intriguing phenomena have been proposed~\cite{PMBZhou}. Therefore, it is expected that in the presence of both NHSEs and spatial quasiperiodicity, richer patterns of spectrum, localization and topological transitions could appear in generic NHQCs, which deserve more thorough explorations. \begin{acknowledgments} L.Z. is supported by the National Natural Science Foundation of China~(Grant No.~11905211), the China Postdoctoral Science Foundation~(Grant No.~2019M662444), the Fundamental Research Funds for the Central Universities~(Grant No.~841912009), the Young Talents Project at Ocean University of China~(Grant No.~861801013196), and the Applied Research Project of Postdoctoral Fellows in Qingdao~(Grant No.~861905040009). \end{acknowledgments}
\section{Introduction} Recent surveys have revealed that almost ubiquitously, protoplanetary disks appear highly structured with rings and gaps, spiral arms and asymmetries \citep[e.g.,][]{garufi2018, andrews2020}. While other scenarios are discussed, these features are often interpreted as resulting from the presence of planets embedded in disks \citep[e.g.,][]{dong2015a, bae2018, Lodato2019}. Additional observational support for such a scenario can be found in the form of local perturbation of the gas velocity field from Keplerian rotation \citep{pinte2018, teague2019,casassus2019}. The quest to detect protoplanets embedded in their host disk through direct imaging has been challenging, with current detection limits on the order of a few Jupiter masses (M$_{\rm Jup}$) at large radii \citep[e.g.,][]{nuria2018, ruben2021}. A few protoplanet candidates have been claimed in the infrared (IR) and in the H${_{\alpha}}$ line \citep[e.g.,][]{sallum2015, reggiani2018} but remain controversial \citep{mendigutia2018}. The first robust detection through direct imaging techniques of a protoplanet still embedded in its natal disk was obtained in the young system PDS\,70 \citep[spectral type K7; M$\sim$0.8\,M$_{\odot}$; age$\sim$5.4\,Myr old;][]{mueller2018} located at $\sim$112.4\,pc \citep{gaiaDR3} in the Upper Centaurus Lupus association \citep{Pecaut2016}. PDS\,70\,b was discovered with an orbital radius of $\sim$22\,au, and imaged at multiple IR wavelengths \citep{Keppler2018, mueller2018} as well as in a filter centered on the H$\alpha$ line \citep{Wagner2018b}. Subsequently, PDS\,70\,c was discovered in H$\alpha$ imaging at the outer edge of the cavity with an orbital radius of $\sim$34\,au \citep{haffert2019}. These two planets carve a large cavity in the disk, evidenced by a cavity in dust \citep[e.g.,][]{hashimoto2012,Dong2012} and a gap in the $^{12}$CO gas emission along the orbit of PDS\,70\,b \citep{Keppler2019} that indicates significant gas depletion. Observations and hydrodynamic simulations indicate that the planets' orbital configuration is stable, close to a 2:1 mean motion resonance, with PDS\,70\,b in a slightly eccentric orbit \citep[e$\sim$0.2;][]{bae2019, Toci2020, wang2021}. The masses of the two planets are still uncertain, although both planets are likely lighter than 10 M$_{\rm Jup}$ to ensure dynamical stability \citep{wang2021} and a non-eccentric outer disk \citep{bae2019}. Spectro-photometric analyses, limited to the IR regime (1-5\,$\mu$m) remain inconclusive, but suggest planet masses between 1 and a few M$_{\rm Jup}$ \citep[e.g.,][]{mueller2018,mesa2019,stolker2020} as well as a clear contribution from dust grains in clouds and/or circumplanetary disks (CPDs) \citep{christiaens2019,stolker2020, Wang2020}. \begin{table*}[t] \centering \caption{Summary of available ALMA Band 7 observations of PDS\,70. MRS is the maximum recoverable scale.} \begin{tabular}{ccccccl} \toprule Label & ID & Date & Baselines & Frequency & MRS & References \\ & & & [m] & [GHz] & [arcsec] & \\ \hline SB16 & 2015.1.00888.S & 2016 Aug 14-18 & 15-1462 &344-355 & 3.23 & Long et al. 2018\\ IB17 & 2017.A.00006.S & 2017 Dec 2-6 & 15-6855 & 346-357 & 1.05 & Keppler et al. 2019; Isella et al. 2019 \\ LB19 & 2018.A.00030.S & 2019 Jul 27-31 & 92-8547 & 346-355 & 0.53 & This work\\\hline \end{tabular} \label{tab:obsdata} \end{table*} CPDs play a fundamental role in planet formation, as they regulate the gas accretion onto the planet and determine the conditions for satellite formation. As gas enters the planet's sphere of influence, it falls at supersonic velocities onto the surface of the CPD \citep{tanigawa2012,judit2017}, possibly episodically \citep{Gressel2013}, leading to shocks that can ionize hydrogen and be traced in the H$\alpha$ line. From observations of the H$\alpha$ line, PDS\,70\,b and PDS\,70\,c are found to be accreting material from their host disk at a rate of $\sim10^{-8}$ M$_{\rm{Jup}}$ per year \citep{wagner2018, haffert2019, Thanathibodee2019, aoyama2019, hashimoto2020}. Using Atacama Large Millimeter/ submillimeter Array (ALMA) observations at $\sim$67\,mas$\times$50\,mas resolution, \citet{isella2019} showed evidence for sub-millimeter continuum emission co-located with PDS~70~c, interpreted as tracing a dusty CPD, and for another compact continuum emission source located at $\sim$74\,mas offset in a South West direction from b. The emission around c however was not spatially separated from the outer ring. In this Letter, we present new ALMA observations with 20\,mas resolution that provide an independent detection of a compact source of emission colocated with PDS\,70\,c and of low surface brightness emission within the cavity close to PDS\,70\,b. The Letter is organized as follows. Section~\ref{sec:obs} presents the observations and the procedure to calibrate the data. Section~\ref{sec:results} presents our new images and analysis. Finally, we discuss our findings in Section~\ref{sec:discussion}. \section{Observations} \label{sec:obs} This Letter presents new ALMA observations, hereafter referred to as LB19 (for 'Long Baselines 2019'), obtained in Band 7 ($\lambda=855\,\micron$), under a Director's Discretionary Time (DDT) program with ID 2018.A.00030.S. PDS\,70 was observed during 4 execution blocks (EB) with the C-8 configuration on 2019 July 27, 28, and 30, for a total on-source time of 43 minutes per execution. An observing log including the precipitable water vapor (PWV) levels and calibrator names is given in Appendix \ref{sec:log}. The spectral set-up was tuned to optimize continuum detection, but includes the $^{12}$CO J=3-2 line at 345.8\,GHz and the HCO$^+$ J=4-3 line at 356.7\,GHz, which will be presented in forthcoming papers. The raw data calibration was done with the \texttt{CASA v.5.6.1} pipeline \citep{McMullin2007} and the self-calibration and post-processing imaging were done using \texttt{CASA v.5.4.0}. We first flagged the channels that included the $^{12}$CO and the HCO$^+$ lines and spectrally averaged the remaining channels to produce a continuum dataset. We imaged the resulting visibilities with the \texttt{tclean} task using the multi-scale \texttt{CLEAN} algorithm with scales of 0, 1, 3 and 6 times the beam FWHM, and an elliptic \texttt{CLEAN} mask encompassing the disk emission. To reduce the size of the data, we time averaged it to 6.06 seconds, i.e., 3 times the original integration time. After imaging, one EB image appeared of much lower SNR and therefore the corresponding visibilities were rejected. The individual images of the three remaining execution blocks (EBs 0,1,3) did not appear astrometrically offset with respect to each other, which is as expected because they were taken very close in time. As the fluxes of all EBs match within 2\%, we concatenated the three EBs and self-calibrated them all together. To determine a good initial model for the self-calibration, we used multi-scale cleaning with the \texttt{tclean} task using a threshold of $\sim$7 times the rms noise level of the image. Using the tasks \texttt{gaincal} and \texttt{applycal}, we corrected for phase offsets between spectral windows, and between polarizations considering a solution interval of the scan length (\texttt{solint=inf}). Another iteration of phase self-calibration was done with a solution interval of 30s. We reached an overall improvement in peak SNR of 34\% after self-calibrating the LB19 data. \begin{figure*}[t] \begin{center} \includegraphics[width=1.0\textwidth]{FIG/LB1_SB1_final_wJvM_v090421_annotations.pdf} \end{center} \caption{Images of the new continuum observations of PDS\,70 (LB19+SB16). The data were imaged with a robust parameter of 0.5 (left) and 1 (center), with resolutions of 0.036\arcsec{}$\times$0.030\arcsec{} and 0.051\arcsec{}$\times$0.044\arcsec{}, respectively. The right panel shows the same image as in the left panel, with annotations. Beams are in the bottom left corner of each panel. Contours are 3 to 7$\sigma$, spaced by 1$\sigma$ (with $\sigma$=8.8 and 4.8$\ \rm \mu Jy\ beam^{-1}$, respectively). An image gallery for all datasets is given in Appendix \ref{sec:Im}. } \label{fig:continuum} \end{figure*} The LB19 data were combined with archival observations previously published in \cite{isella2019} and are summarized in Table\,\ref{tab:obsdata}. These observations correspond to program ID 2015.1.00888.S (PI: E. Akiyama), taken in August 2016 and labeled SB16 (for 'Short Baselines 2016'), and to program ID 2017.A.00006.S (PI: M. Keppler) taken in December 2017, labeled IB17 (for 'Intermediate Baselines 2017'). We refer the reader to Appendix A of \cite{isella2019} where the procedure for the self-calibration of SB16 and IB17 data is described in detail. For all datasets, we used the \texttt{statwt} task to weight the visibilities according to their scatter. Before combining the LB19 data with the previously published data, we fitted an elliptical ring to the maximum of the outer ring in the image plane, for all datasets separately, to derive the center of the image and then used the \texttt{fixvis} task to shift the image to the phase center, and assign it to a common phase center using the \texttt{fixplanets} task on the center coordinate derived by \cite{isella2019}. The fluxes of the executions in LB19 differed by $\sim$3\% from the archival datasets \citep[IB17+SB16; ][]{isella2019} and were rescaled using the DSHARP \texttt{rescale\_flux} function\footnote{\texttt{https://almascience.eso.org/almadata/lp/DSHARP/scripts/}}. After concatenation of the data, we followed the same procedure as explained above, with three rounds of phase self-calibration. We proceeded with imaging of the final data using \texttt{CLEAN}. In a normal \texttt{CLEAN} workflow, after the \texttt{CLEAN} iterations terminate when the peak value of the residual image drops below a threshold value (4$\times$ rms noise level in the observations considered here), a restored \texttt{CLEAN} model is combined with the residual image to form the \texttt{CLEAN}ed image. As discussed in Czekala et al. \emph{in press}, however, the units of these two quantities differ: the units of the restored \texttt{CLEAN} model are $\mathrm{Jy}\,\{\mathrm{CLEAN\; beam}\}^{-1}$ while the units of the residual image are $\mathrm{Jy}\,\{\mathrm{dirty\;beam}\}^{-1}$, since it originated as the dirty image. When the \texttt{CLEAN} beam (typically chosen to be an elliptical Gaussian) poorly approximates the dirty beam (as is common with multi-configuration ALMA datasets), the normal \texttt{CLEAN} workflow produces a \texttt{CLEAN}ed image with an incorrect flux scale and compromised image fidelity, especially for faint emission. This phenomenon was first described in \citet{jorsater95}, and so we term it the ``JvM effect''. To correct for the unit mismatch, before combining the residual image with the restored \texttt{CLEAN} model, we first rescaled the residual image by the ratio of the \texttt{CLEAN} beam / dirty beam ``volumes'' (see ``JvM correction'', Czekala et al. \emph{in press}). To test the effect of the angular resolution on the image features and assess their robustness, we performed a grid of \texttt{CLEAN}ed and JvM-corrected images, using Briggs weighting \citep{Briggs1992} with different robust parameters. A gallery of continuum images (and corresponding fluxes), synthesized from the new dataset alone (LB19) and from dataset combinations including the observations published by \citet{isella2019} (IB17+SB16; LB19+IB17+SB16) is given in Appendix \ref{sec:Im}. Depending on the dataset and the robust parameter, our JvM-corrected images have a rms ranging between $\sim$4 and $\sim$26 $\mu \mathrm{Jy}$ $\mathrm{beam}^{-1}$ across beam sizes of 93\,mas$\times$74\,mas to 20\,mas$\times$20\,mas (Table\,\ref{tab:imagingsummary}). We note that while the uv coverage and sensitivity are maximized when all datasets are combined (LB19+IB17+SB16), such a combination does not take into account the intrinsic changes of the emission that are due to the rotation of the system, and the change in the location of the dust surrounding the planets. Based on the orbital solutions of \citet{wang2021}, we expect a motion of $\sim$14\,mas for both planets between December 2017 and July 2019. \begin{figure*}[t] \begin{center} \includegraphics[width=0.7\textwidth]{FIG/Cavity_selection_120421_-36sigma_shifted.pdf} \end{center} \caption{Residual images obtained after subtracting the Fourier transform of the \texttt{CLEAN} model for the outer ring (referred to as 'cavity images'), obtained with the new data (LB19+SB16; left) and the data published in \citet{isella2019} (IB17+SB16; right) considering a Briggs robust parameter of 1. Contours are 3 to 18 times the rms noise level (4.7 and 6\,$\ \rm \mu Jy\ beam^{-1}$, respectively), spaced in steps of 3$\sigma$. Dashed contours correspond to -3$\sigma$. A gallery of cavity images is given in Appendix \ref{sec:Im}.} \label{fig:cavityJvMselection} \end{figure*} \section{Results} \label{sec:results} \subsection{Continuum images} Figure~\ref{fig:continuum} presents a selection of images of the continuum emission of PDS\,70 at 855\,$\mu$m, synthesized from the new ALMA observations combined with short baseline data (LB19+SB16). The disk is well detected with a spatially integrated flux density of $\sim$176$\pm$18 mJy (all images give similar values). After deprojecting the image with an inclination of $\sim$51.7$^\circ$ and a position angle of $\sim$160.4$^\circ$ \citep{Keppler2019}, we computed an azimuthally averaged radial profile and found that the outer disk resolves in a ring extending radially from $\sim$0.4\arcsec\ (45\,au) and $\sim$0.9\arcsec\ (100\,au). The outer disk is not radially symmetric and shows a clear azimuthal asymmetric feature in the North West ($\sim$27\% brighter at peak compared to the mean ring value), as already discussed by \citet{long2018} and \citet{Keppler2019}. When imaged at high resolution, the outer disk resolves into a narrow and bright ring with a faint inner shoulder detected in the image at the 3-4$\sigma$ level (Appendix \ref{sec:Im}). To better assess the presence of such substructures, we model the azimuthally averaged radial visibility profile using the \texttt{frank} package \citep{jennings2020}. Our analysis, presented in Appendix\,\ref{sec:frank} recovers a double peaked profile for the outer disk. Such a substructure was already hinted in the data presented in \citet{Keppler2019}. Inward of the outer disk, the dust-depleted cavity includes an inner disk that radially extends up to 0.16\arcsec{} (18\,au) and presents faint additional emission in the West and in the South of the inner disk that will be discussed in the next subsection. \begin{figure*}[t] \begin{center} \includegraphics[width=1.0\textwidth]{FIG/galario_r1_with_astrometry_v120421_369-369sigma_2sigmapadding.pdf} \end{center} \caption{From left to right: Cavity image for LB19+SB16; \texttt{Galario} best fit model for the inner disk, b$\rm_{smm}$, and c$\rm_{smm}$; Residuals from the \texttt{Galario} best fit model. All images are obtained with r=1. Contours are 3, 6, 9 $\sigma$. Dashed contours correspond to -6,-3$\sigma$.The predicted positions of the two planets in July 2019 are indicated with a circle and diamond (PDS\,70\,b and c, respectively).} \label{fig:galario} \end{figure*} \subsection{Emission within the cavity} Within the cavity, the inner disk appears well resolved with an integrated flux ranging between 727$\pm$27~$\mu$Jy and 888$\pm$59~$\mu$Jy depending on the dataset (Table\,\ref{tab:innerdisk}). When imaged at high angular resolution (e.g., Figure \,\ref{fig:continuum}, left), it appears irregular and the emission is discontinuous in the North. Continuum emission is also detected near the locations of the planets, confirming the findings of \citet{isella2019}. We use the same nomenclature as \citet{isella2019} and label the continuum emission located close to planet b and c, b$\rm_{smm}$ and c$\rm_{smm}$, respectively. The continuum emission around PDS\,70\,c, c$\rm_{smm}$, is recovered in all images, and in particular in the standalone new, high resolution, dataset (LB19), where it appears as a 5.4 to 16$\sigma$ feature depending on the robust parameter. c$\rm_{smm}$ clearly separates from the outer disk when imaged at resolutions finer than $\sim$40\,mas. It appears unresolved even at our best angular resolution ($\sim$20\,mas;$\sim$2.3\,au). We find that its peak intensity is similar in all the images that spatially resolve it from the outer disk (see Appendix \ref{sec:cpdflux}), confirming its point-source nature. Depending on the dataset (IB17+SB16 or LB19+SB16) and the robust parameter, its peak intensity ranges between 80$\pm$6 and 107$\pm$15\,$\mu \mathrm{Jy}\mathrm{beam}^{-1}$. In the following, we will consider 86$\pm$16\,$\mu \mathrm{Jy}\mathrm{beam}^{-1}$ as a reference for further discussion. The emission located near PDS\,70\,b, b$\rm_{smm}$, is on the other hand, only recovered when the new high resolution data is combined with short baselines, and when the beam is larger than $\sim$50\,mas. This indicates that it is low surface brightness, extended emission. Its peak intensity and morphology vary greatly between images of different datasets (Table\,\ref{tab:innerdisk}), which makes its morphology and properties difficult to recover accurately. In order to assess whether the signal within the cavity could result from imaging artifacts, following \citet{andrews2018b}, we subtracted the Fourier transform of the \texttt{CLEAN} model of the outer disk, after blanking out the pixels within the cavity (using an elliptical mask of 0.25\arcsec{}$\times$ 0.4\arcsec{}), and image and model the visibilities carrying the residual signal from within the cavity. Figure~\ref{fig:cavityJvMselection} show two residual images, hereafter called 'cavity images', for LB19+SB16 and IB17+SB16, that clearly show that the inner disk emission and c$_{\rm smm}$ are recovered in both epochs, the latter with a significance up to 18$\sigma$. On the other hand, b$_{\rm smm}$ is detected at a 3$\sigma$ level only in some cavity images obtained from combined datasets. A gallery of cavity images are given in the Appendix \ref{sec:Im}. \begin{table*}[t] \centering \caption{Best-fit parameters for the model to the cavity data for the datasets LB19+SB16 and IB17+SB16, with the $1\sigma$ error. The flux, radial peak position, and width of the Gaussian for the inner disk are $f_{\text{inn}}$, $r_{\text{inn}}$, $\sigma_{\text{inn}}$, respectively. The total flux and polar coordinates in the disk plane of b$\rm_{smm}$ and c$\rm_{smm}$ are $f_b$, $r_b$, $\theta_b$ and $f_c$, $\sigma_c$, $r_c$, $\theta_c$, respectively. The relative apparent astrometry $\Delta (\text{RA, Dec})$ is also provided.} \begin{tabular}{c||ccc|ccc|ccc} \hline Dataset & $f_{\text{inn}}$ & $r_{\text{inn}}$ & $\sigma_{\text{inn}}$ & $r_b$ & $\theta_b$ & $f_b$ & $r_c$ & $\theta_c$ & $f_c$ \\ & [$m$Jy] & [mas] & [mas] & [mas] & [deg] & [$\mu$Jy] & [mas] & [deg] & [$\mu$Jy] \\ \hline LB19+SB16 & $0.846_{-0.047}^{+0.036}$ & $2.0_{-1.6}^{+25.0}$ & $59.3_{-12.0}^{+2.7}$ & $178.5_{-3.8}^{+2.7}$& $174.0_{-1.3}^{+1.4}$ & $83.1_{-15.8}^{+12.4}$ & $324.9_{-2.7}^{+2.7}$ & $-70.6_{-0.7}^{+0.6}$ & $111.5_{-13.6}^{+14.0}$ \\ IB17+SB16 & $0.765_{-0.040}^{+0.018}$ & $2.8_{-1.0}^{+24.8}$ & $52.6_{-12.0}^{+0.1}$ & --- & --- & --- & $329.4_{-10.1}^{+10.8}$ & $-68.9_{-1.0}^{+1.1}$ & $91.6_{-13.1}^{+14.4}$ \\ \hline & & & & $\Delta$\,RA [mas] & $\Delta$\,Dec [mas] & & $\Delta$\,RA & $\Delta$\,Dec & \\ \hline LB19+SB16 & & & & $70.1_{-2.5}^{+2.4}$ & $-163.0_{-3.2}^{+3.4}$ & & $-215.1_{-1.6}^{+1.8}$ & $37.8_{-3.7}^{+3.3}$ & \\ IB17+SB16 & & & & --- & --- & & $-219.2_{-6.5}^{+7.0}$ & $47.9_{-4.8}^{+4.9}$ & \\ \end{tabular} \label{tab:galario_results} \end{table*} As an additional test, we perform a model fit of the cavity visibilities using the dataset LB19+SB16, obtained after subtracting the Fourier transform of the \texttt{CLEAN} model of the outer disk using a robust parameter of 1. We consider a simple model for all three sources of emission within the cavity, namely the inner disk, b$\rm_{smm}$ and c$\rm_{smm}$, compute the Fourier transform using \texttt{galario} \citep{galario} and explore the parameter space using the Monte Carlo Markov chains implementation in \texttt{emcee} \citep{emcee}. Our model consists in a Gaussian ring for the inner disk, that enables to model an additional structure within the inner disk, a point source for c$\rm_{smm}$ (between PA=250$^\circ$ and 280$^\circ$), and a circular Gaussian for b$\rm_{smm}$, located in the South (between PA=70$^\circ$ and 250$^\circ$). A uniform prior was used over the allowed range for each parameter. Our best-fit model and residual maps are shown in Figure~\ref{fig:galario}, and corresponding parameters are in Table\,\ref{tab:galario_results}. We find that the best-fit location of c$\rm_{smm}$ is $\Delta (\text{RA, Dec})$=($-215.1_{-1.6}^{+1.8}$, $37.8_{-3.7}^{+3.3}$)~mas, close to the predicted position of PDS\,70\,c $\Delta (\text{RA, Dec})=(-214.8, 31.9)$~mas (see Appendix \ref{sec:astrometry}). For b$\rm_{smm}$, the location is constrained to $\Delta (\text{RA, Dec})$=( $70.1_{-2.5}^{+2.4}$, $-163.0_{-3.2}^{+3.4}$)~mas, offset from the predicted position of PDS\,70\,b ($\Delta (\text{RA, Dec})=(96.9, -153.7)$~mas). From the orbital fits of \citet{wang2021}, the expected motions of the planets between the epoch of the long baselines observations (December 2017 and July 2019) is similar for both, $\sim$14\,mas, smaller than the angular resolution of our observations. To search for possible motion of c$\rm_{smm}$ between the two epochs, we performed the same modeling as above on the IB17+SB16 dataset. b$\rm_{smm}$ was not recovered in this fit, but the inner disk and c$\rm_{smm}$ were. Using the best-fit positions for c$\rm_{smm}$ at the two epochs, and considering a 2\,mas error in the centering of the two datasets, we find marginal evidence for a movement of the peak position of 10.9$\pm$6.9\,mas. We note that the nominal positional accuracy is defined as beam$_{\rm{FWHM}}$/SNR/0.9 \citep[][ and ALMA Cycle 8 2021 Technical Handbook]{astrometry}, with 0.9 a factor to account for a nominal 10\% signal decorrelation. We consider two images in which c$\rm_{smm}$ is imaged at a decent SNR and separated from the outer disk, LB19+SB16 (r=0.5) and IB17+SB16 (r=-0.3). With corresponding SNR of 8.9$\sigma$ and 7.1$\sigma$ on the peak intensity of c$\rm_{smm}$ respectively, and a beam FWHM of 36 and 60\,mas, respectively, the positional accuracies are $\sim$4.5\,mas and 9.4\,mas, respectively, comparable to the uncertainty that we derived for the apparent displacement of c$\rm_{smm}$. Additional observations with ALMA in the coming years, providing a longer time baseline, are needed to confirm such a movement. \section{Discussion} \label{sec:discussion} \paragraph{A circumplanetary disk around PDS\,70\,c} \citet{isella2019} reported the detection of c$\rm_{smm}$ using $\sim$67\,mas resolution observations. We confirm this detection with higher angular resolution observations that enable us to separate the emission from the outer disk. Given that the location of c$\rm_{smm}$ is very close to the existing H$\alpha$ and NIR measurements of PDS\,70\,c \citep{isella2019}, and to the expected positions of PDS\,70\,c at the time of our observations (Figure~\ref{fig:galario}), we interpret it as tracing the millimeter emission of dust grains located in a CPD. Assuming that c$\rm_{smm}$ is optically thin, its flux density can be converted into a dust mass estimate, for a given dust opacity and temperature. We note that if the emission is optically thick, such an assumption would provide a lower limit in the dust mass. The CPD temperature is also uncertain. It is determined by the sum of various sources of heating, namely viscous heating due to accretion of material through the CPD, accretion shocks, and external irradiation from both the planet and the star \citep{isella2014, isella2019, andrews2021}. Using 2\,M$_{\rm{Jup}}$, 2\,R$_{\rm{Jup}}$, and 1055~K as the mass, radius, and temperature of PDS\,70\,c \citep{wang2021}, a mass accretion rate of 10$^{-8}$\,M$_{\rm{Jup}}$/year \citep{haffert2019}, we find that at a radial distance of 1 au from the planet, T$_{vis}$ = 3\,K, and T$_{p,irr}$= 18\,K. Considering a stellar-irradiation temperature of T$_{s,irr}$ = 24\,K at the location of PDS\,70\,c (obtained from the radiative transfer model of \citet{Keppler2019}), the CPD temperature at 1\,au is T$_{CPD}^{4}$ = T$_{vis}^{4}$ + T$_{p,irr}^{4}$ + T$_{s,irr}^{4}$, that is T$_{CPD} \sim$ 26\,K. Considering a typical dust opacity for 1\,mm sized grains of 3.63 cm$^{2}$\,g$^{-1}$ \citep{Birnstiel2018} and a temperature of 26\,K, we estimate a CPD dust mass of $\sim$0.007\,$M_{\oplus}$. A lower dust mass would be inferred if the dust temperature is higher than considered here \citep{schulik2020}. However, PDS\,70\,c is massive enough to carve a gap, and, as a consequence, large grains are trapped in a pressure maximum in the outer disk while small grains, well coupled to the gas, can flow inward. This is confirmed by the different cavity outer radii measured in scattered light compared to mm wavelengths \citep[probing small and large grains, respectively;][]{Keppler2019}. The CPD is therefore only replenished with small dust particles that leak into the cavity \citep{bae2019} through meridional flows from the upper protoplanetary disk layers \citep[e.g.,][]{kley2001,ayliffe2009}. If the CPD contains only small 1\,$\mu$m sized grains \citep[with an opacity of 0.79 cm$^{2}$ g$^{-1}$;][]{Birnstiel2018} the CPD dust mass increases to $\sim$0.031\,M$_{\oplus}$. It is of course possible that the CPD hosts a range of particle sizes if the grains can grow. \citet{bae2019} find that, if a steady state is achieved between the mass inflow to the CPD and the mass accretion rate onto the planet, the amount of sub-micron grains in the CPD would largely underestimate the observed mm flux and that accumulation of grains beyond the steady-state amount and/or in-situ grain growth is needed to account for it. In Appendix \ref{sec:cpdmass}, we show the range of dust masses that the CPD would have for various dust grain size distributions, as a function of the maximum grain size. With these mass estimates, the ratio between the CPD dust mass and the planet mass, considering 2\,M$_{\rm{Jup}}$ \citep{wang2021}, ranges between 1 and 5$\times$10$^{-5}$. If small grains can grow to mm sizes within the CPD, they could rapidly be lost as they efficiently drift toward the planet and it only takes 100-1000 years for an accreting CPD to lose all its mm dust \citep{zhu2018}. However, as in protoplanetary disks, local gas pressure maxima can act as particle traps, and prevent these grains from drifting. Interestingly, this can naturally occur in CPDs. Most of the gas that is feeding the CPD through meridional flows is then radially flowing outward in a decretion disk. The balance between the sub-Keplerian headwind and viscous outflow associated with a decretion flow leads to a global dust trap \citep{batygin2020}. As a consequence, dust grains with sizes 0.1-10\,mm may be trapped in the CPD and as the dust-to-gas ratio increases, streaming instabilities might be triggered \citep{joanna2018}, or gravitational fragmentation in the outer regions of the CPD \citep{batygin2020} that will eventually lead to the formation of satellitesimals. At the same time, dust particles can accrete via pebble-accretion onto the satellitesimals formed in situ or captured from the disk edge \citep[e.g.,][]{ronnet_2020}. Our observations also put a strong constraint on the spatial extent of the CPD as seen in the dust emission at mm wavelengths. The emission c$\rm_{smm}$ is unresolved even at our highest angular resolution, and its peak intensity is similar over a range of beam sizes, until $\sim$40\,mas, beyond which the CPD does not separate from the outer disk anymore (Appendix \ref{sec:cpdflux}). This indicates that it is more compact than 1.2\,au in radius. On the other hand, there is a lower limit to the CPD extent needed to account for the observed flux. Assuming that it is a uniform disk with an optical depth of 1, and considering a temperature of 26\,K, we find that it has a radius of 0.58\,au. These two values (0.58 and 1.2\,au) are therefore the lower and upper limits on the CPD radial extent constrained from our observations. The CPD is expected to be truncated (in gas) at a third of the Hill radius, which for PDS\,70\,c, assuming a planet mass of 2\,M$_{\rm{Jup}}$ at 34\,au, is 1/3 $\times$3.1 $\sim$1\,au. 3D simulations show that isothermal CPD are bound within 10\% of the Bondi radius \citep{fung2019}, that is 1/10 $\times$11 $\sim$1.1\,au for PDS\,70\,c assuming a local temperature of 26~K. Both estimates are therefore consistent with our constraints. However, we cannot rule out the possibility that the gas component of the CPD extends beyond the dust component, in particular if some dust grains in the CPD drift inward. \begin{figure*}[t] \begin{center} \includegraphics[width=0.95\textwidth]{FIG/Final_All_PDS_70_LB1_LB3_SB1_final_shallow_r1_JvMcorrv256.pdf} \end{center} \caption{Left: Total optical depth of the continuum emission computed from the azimuthally averaged radial profile of the r=1 image of LB19+IB17+SB16. The lines show 4 models with different maximum grain sizes. The grey dashed line corresponds to a floor value of 3$\sigma/\sqrt{N}$, with $\sigma$ the image rms, and N the number of beams in a radial bin. Shaded regions indicate error bars, computed as the square root of the quadratic sum of the image rms, the standard deviation in the radial bin and the 10\% flux uncertainty. Right: dust surface density profiles (top) and corresponding cumulative masses (bottom). } \label{fig:TauCumMass} \end{figure*} \paragraph{Extended faint emission near PDS\,70\,b.} The nature of the material close to PDS\,70\,b is unclear. It is not detected in the images obtained at high resolution with small synthesized beams but is apparent at low SNR at intermediate resolution indicating that it has a low surface brightness. It is confirmed in the two epochs 2017 and 2019, when combined with the short baselines data. b$\rm_{smm}$ appears offset toward the South-West from the position of PDS\,70\,b, confirming the findings of \citet{isella2019} who speculated that it could be tracing dust trapped at the Lagrangian point L5 \citep{Montesinos2020}, if the planet is on an inclined orbit. The shape of the b$\rm_{smm}$ in our images is suggestive that it could also trace the faint signature of a streamer connecting the planets to the inner disk. Evidence for dust grains in the vicinity of PDS\,70\,b is clear already from the IR spectral energy distribution \citep{stolker2020, wang2021}, likely explaining the non-detection of Br$\gamma$ \citep{christiaens2019} and H$\beta$ emission lines \citep{hashimoto2020}. It is interesting to understand why PDS\,70\,b, at the sensitivity of our observations, does not seem to host a compact, dusty, circumplanetary disk as PDS\,70\,c does. A possibility would be that PDS\,70\,b has a much smaller Hill radius than PDS\,70\,c, as it orbits at smaller separation. Another natural explanation could be that PDS\,70\,b is starved of dust grains, as only the small grains that leak through the orbit of PDS\,70\,c and are transported through a streamer from the outer to the inner planet would enter the region of influence of PDS\,70\,b. Finally, it could be that the nature of the CPD is different around the two planets, with a decretion disk around PDS\,70\,c, and an accretion disk around PDS\,70\,b that is fed through a streamer coming from PDS\,70\,c rather than through meridional flows. More theoretical work looking at formation of CPDs in systems hosting two giant planets is needed to assess the potential differences between CPD formation in the inner and outer planet. \paragraph{Inner disk.} An inner dusty disk, evidenced in the IR spectral energy distribution and scattered light images is also clearly detected in our images up to $\sim$0.16\arcsec{} ($\sim$18\,au) \citep[see also,][]{long2018, Keppler2019}. Considering that the planets are filtering material from the outer disk such that only small dust particles can flow in the cavity, as for the CPD, it is unclear whether the inner disk mm emission is due to a population of small or large dust grains. To address this question, we computed the dust surface density and optical depth radial profiles of the continuum emission, using the combined dataset (SB16+IB17+LB19) imaged with robust=1. We consider 4 models for the dust grain population, that follow a size distribution $n(a)da \propto a^{-3.5}da$ with a maximum grain size $a_{\rm{max}}$ of 10\,$\mu$m, 100\,$\mu$m, 1\,mm and 1\,cm, and a minimum size of 0.05\,$\mu$m. We use the DSHARP opacities \citep{Birnstiel2018} and the temperature profile output of the radiative transfer model of \citet{Keppler2018}. The dust surface density as well as the total optical depth $\tau_{\nu}$ is numerically computed, considering scattering and absorption opacities \citep{Sierra2020, sierra2021}. Figure~\ref{fig:TauCumMass}, left, shows the total optical depth $\tau_{\nu}$ for all 4 models. The right panels show the dust surface density profiles (top) and corresponding cumulative masses (bottom). The dust surface density is maximum at the outer disk that is obviously the disk region that contributes to most of the dust mass ($\sim$0.24$\times$10$^{-3}$\,$M_{\odot}$ for $a_{\rm{max}}$= 1\,mm). We note that without the inclusion of scattering, the optical depth would follow the curve of the dust population with $a_{\rm{max}}$=10\,$\mu$m, as the albedo at mm wavelengths is negligible for these small grains. In all these models, the inner disk is optically thin, with a total dust mass of $\sim 2\times10^{-7}-10^{-6}$\,$M_{\odot}$ (i.e., 0.08-0.36$M_{\oplus}$). It therefore appears that the emission at 855\,$\mu$m from the inner disk regions located within the orbit of PDS70\,b could be accounted for by a population of small grains. Interestingly, we note that the near infrared excess apparent in the spectral energy distribution of PDS70 is very low \citep{Dong2012}. This emission is mostly due to the thermal emission of small grains located within the innermost au and such a low excess could indicate a low small-dust mass content in the inner disk, and therefore suggest the additional presence of larger dust grains in order to account for the measured flux at 855\,$\mu$m. However, the inner disk emission in the infrared could still be optically thick \citep{Dong2012}, making it difficult to directly relate to our sub-millimeter observations and multiple wavelength observations in the millimeter regime are needed to constrain the grain size population in the inner disk. We note that the brightness temperature might be underestimated near the star because of our limited angular resolution and that it is possible that the innermost disk regions are optically thick also at sub-millimeter wavelengths. The longevity of the inner disk remains unclear; the replenishment flow is controlled by the planets, if it is so strongly depleted (in gas) it may not allow grains to grow efficiently. It is possible that some of the dust in the inner disk is of second generation produced by collision of larger bodies, perhaps stirred up by PDS\,70\,b. The star exhibits a small, but non negligible, mass accretion rate, for which an additional mass reservoir in the inner disk, such as a dead zone, was recently suggested \citep{thanathibodee2020}. Determining the physical conditions there-in, in particular the dust to gas ratio, would be crucial for understanding whether such an inner disk can still grow terrestrial planets within a system hosting two outer giant planets. The current dust mass estimates are so low that it is unlikely that planets could form through pebble accretion \citep{Lambrechts2019}. \paragraph{Outer disk structure.} Our observations at high angular resolution indicate that the outer disk hosts substructures. In addition to an 'arc' in the North-West, already seen at lower resolution images \citep{long2018, Keppler2019}, it resolves into two components, that can be either a double-ring structure with a dip at $\sim$0.55\arcsec{} or a bright ring with an inner shoulder. Interestingly, \citet{Huang2020} also find with high resolution observations, a two-component structure in GM\,Aur, with a bright ring and an outer shoulder. It is unclear if such two-component structure in PDS\,70 could be due to a secondary gap induced by PDS\,70\,c as an outer secondary gap opens only when the disk is sufficiently cold \citep{bae2018b}, with $(h/r)_p \lesssim 0.06$ where $(h/r)_p$ is the disk aspect ratio at the location of the planet \citep[$(h/r)_p \simeq 0.08$ at PDS\,70\,c's location;][]{bae2019}. On the other hand, recent three-dimensional planet-disk interaction simulations including both gas and dust components showed that dust grains at the gap edge can have radial structures \citep{bi2021}, potentially induced by corrugated vertical flows driven by the spiral wave instability \citep{bae2016a,bae2016b} or meridional flows \citep{fung2016}. Alternatively, such a substructure could be due to the presence of an additional, yet-undetected low-mass planet embedded within the outer disk. Similar multiple-ring substructures were also observed in other transition disks, such as HD\,169142 in which three narrow rings were found and interpreted as tracing a migrating 10\,M$_{\oplus}$ in a low viscosity disk \citep{seba2019}. However, hydrodynamical simulations show that thermodynamics can dramatically affect the structure of gas and dust, with different disk cooling timescales leading to different planet-induced substructures \citep{facchini2020}. Further chemical surveys will help to constrain the density and temperature structures \citep{Facchini2021}, enabling to test the possibility that an additional, low-mass planet is responsible for the structured outer ring and constrain the mass and radial location of that planet. We note that it is unlikely that an additional planet within the outer continuum ring disrupt the planetary system. In a two-planet system neglecting the eccentricity damping from the protoplanetary disk gas, the planets can avoid close encounters and are Hill-stable when their orbital separation is greater than $3.46~R_{\rm H}$, where $R_{\rm H} = a_1[(M_1 + M_2) / 3M_*]^{1/3}$ is the mutual Hill radius \citep{gladman1993,barnes2006}. The addition of a third planet generally makes the stability criteria more stringent because the conservation of the total angular momentum and energy can no longer guarantee the avoidance of close encounters even for initially large separations beyond the Hill-stability criteria \citep{tamayo2015}. However, provided that the protoplanetary disk gas provides sufficient eccentricity damping, \citet{tamayo2015} argued that the two-planet criteria can still be used in three-planet cases. Assuming a range of $1-10~M_{\rm Jup}$ for PDS\,70\,c and a Saturn mass for the hypothesized additional planet, this criteria is met when the latter is located beyond $44 - 53$~au. Therefore, the system would be dynamically stable if the additional planet is located within the dip in the outer continuum ring at $\sim 60$~au. Future numerical simulations will allow to further test our conclusions. \section{Conclusions} In this Letter, we report new ALMA observations obtained at high angular resolution ($\sim$20\,mas) at 855\,$\mu$m of the PDS\,70 system. We confirm the tentative detection by \citet{isella2019} of a compact source co-located with the position of PDS\,70\,c with an independent dataset at higher angular resolution. These new observations provide the most compelling evidence of the presence of a CPD around an accreting planet to date. Future molecular line infrared observations at very high angular resolution may be able to detect rotating gas around PDS\,70\,\,c, providing conclusive results on the nature of the continuum mm emission. The detection of unresolved ($r<1.2\,$au) emission around planet c confirms that circumplanetary material is able to retain dust for long timescales, as required in satellite formation models. These ALMA observations shed new light on the origin of the mm emission close to planet b. The emission is diffuse with a low surface brightness and is suggestive of a streamer of material connecting the planets to the inner disk, providing insights into the transport of material through a cavity generated by two massive planets. The non-detection of a point source around PDS\,70\,b indicates a smaller and/or less massive CPD around planet b as compared to planet c, due to the filtering of dust grains by planet c preventing large amounts of dust to leak through the cavity, or that the nature of the two CPDs differ. We also detect a faint inner disk emission that could be reproduced with small 1\,$\mu$m dust grains, and resolve the outer disk into two substructures (a bright ring and an inner shoulder). PDS 70 is the best system to date to study and characterize circumplanetary disks, but also planet-disk interactions and disk cavity clearing by massive planets. The two massive planets, likely migrating outward in a grand tack-like scenario \citep{bae2019}, are reminiscent of the Jupiter-Saturn pair, at larger distances from the star. Detailed studies of the circumplanetary disks, and of the leakage of material through the cavity, will provide strong constraints on the formation of satellites around gas giants, and on the ability to provide the mass reservoir needed to form terrestrial planets in the inner regions of the disk. Upcoming studies of the gas kinematics and chemistry of PDS\,70 will complement the view provided by this work, serving as a benchmark for models of satellite formation, planet-disk interactions and delivery of chemically enriched material to planetary atmospheres.
\section{Introduction} \label{sec:1} Before an external RF wave can damp in the core plasma of a magnetic confinement device, it must first propagate through the highly turbulent scrape-off layer (SOL) region. SOL turbulence is comprised of dense, coherent structures called blobs/filaments\cite{zweben2002edge,kirk2006filament} that can significantly modify the incident wave-spectrum. Scattering from filaments leads to refraction of the intended wave-path and broadening of the incident wave-spectrum, which in turn can cause lower efficiency in the intended function of the wave. For example, simulations predict significant power-loss through filament-assisted mode-conversion for launched ion-cyclotron waves\cite{tierens2020filament}. Electron cyclotron beams can be broadened in the presence of SOL turbulence, leading to ineffective targeting of neo-classical tearing modes \cite{tsironis2009electron}. In the case of driving current using Lower Hyrbid (LH) waves, SOL scattering is a promising explanation for the spectral gap problem and current drive density limit. Measurements on Alcator C-Mod\cite{mumgaard2015lower}, EAST\cite{ding2018review}, and Tore Supra\cite{peysson2000progress} indicate self-similar, on-axis peaked LH current profiles. Ray-tracing/Fokker-Planck simulations predict off-axis peaks\cite{mumgaard2015lower}, which are inconsistent with these measurements. In addition, these simulated profiles are sensitive to plasma and wave launch parameters, unlike experiment. Lastly, Lower Hybrid current drive (LHCD) suffers from an anomalous density limit, beyond which current drive (CD) efficiency dramatically falls \cite{wallace2010absorption}. Meanwhile, SOL turbulence increases with Greenwald density\cite{cziegler2010experimental}. Raising the Ohmic current, and therefore decreasing Greenwald density and shrinking the SOL width is shown to increase LHCD efficiency at high densities in C-Mod\cite{baek2018observation}. These considerations suggest there are important spectral broadening effects, i.e. scattering from SOL turbulence, unaccounted for in the standard ray-tracing/Fokker-Planck model. It should be noted that alternate spectral broadening mechanisms exist. These include full-wave effects in the core like interference and focusing, and edge mechanisms such as parametric decay instabilities (PDI)\cite{porkolab1977parametric}. The capability to run full-wave simulations of LHCD is fairly recent\cite{wright2009assessment, shiraiwa2010plasma}, and it is not yet clear whether it provides a better match to experiment than ray-tracing/Fokker-Planck models. PDI is a strong candidate for explaining the current drive density limit \cite{cesario2014spectral, baek2015high}. However, there is no clear indication that PDI significantly modifies the wave-spectrum in low-density discharges\cite{baek2015high}. Note that the parallel wave-vector up-shift from PDI and the perpendicular wave-vector rotation from scattering may both be required to bridge the LH spectral gap \cite{biswas2020study}. (The terms ``perpendicular/parallel'' are used in relation to the local background magnetic field.) Early attempts to model LH wave scattering in the SOL treat the turbulence as incoherent drift-wave-like density fluctuations\cite{bellan1978effect,bonoli1982toroidal,andrews1983scattering}. This results in a diffusive process leading to the angular broadening of the perpendicular wave-vector component $\bold{k}_{\perp}$. While these models can significantly broaden the incident wave-spectrum, they have been unable to explain experimental measurements at either low or high densities\cite{peysson2011rf,bertelli2013effects}. A recent study models LH scattering from coherent SOL filaments with ray-tracing \cite{biswas2020study}. This results in an increased angle-broadening effect compared to previous models, which in turn leads to relatively better match with experimental current drive measurement and reduced sensitively to simulation parameters. Another recent study using full-wave simulations predict large parasitic loss of LH power in the presence of SOL filaments\cite{lau2020full}. This is attributed to significant partial-reflection and side-scattering. In ray-tracing, partial-reflection is neglected, and side-scattering is likely underestimated. These results motivate a closer study of wave scattering from filaments using a full-wave treatment. Unlike ray-tracing, which only accounts for refraction and total-reflection, a full-wave model also retains the physical optics effects of interference, diffraction, and focusing. In addition, full-wave models can account for asymmetric scattering, resulting in the rotation of $\bold{k_{\perp}}$ in one preferential direction. Notably, this effect is ignored in ray-tracing and other wave-kinetic models for LH wave scattering. This is discussed further in \hyperref[sec:7.2]{Section 7.2}. In this paper, a hybrid method is introduced to efficiently calculate the full-wave effects of RF scattering through a slab layer comprised of filaments. First, the scattered EM wave is calculated for an incident wave interacting with a single filament, which is modeled as an infinitely long cylinder. This problem has a semi-analytic solution, and can be very efficiently computed relative to numeric full-wave solvers. Previous implementations\cite{myra2010scattering,ram2016scattering} of this semi-analytic scattering (SAS) model in a plasma-physics context were restricted to ``flat-top'' (homogenuous) filaments. This model is generalized to filaments with radially-varying density profiles, which better mimic experimentally relevant filaments. Next, a scattering-width (analagous to a scattering cross-section) is calculated from the scattered wave solution. Third, this process is repeated multiple times, for different filament parameters, until a statistically averaged ``effective'' scattering-width is produced. Lastly, this effective scattering-width is used to calculate the cumulative effect of multiple scattering events for an RF wave incident on a turbulent slab. This is identical to solving the \emph{radiative transfer equation}, for which many techniques exist from the fields of optics and neutronics. The present study uses the absorbing Markov chain technique\cite{esposito1978radiative} to compute the final transmitted and reflected wave-spectrum. This work-flow is henceforth called the Semi-Analytic Scattering Markov Chain (SAS-MC) model. The SAS-MC model can be applied to any frequency range to study RF-scattering in the SOL because it is derived using the fully-electromagnetic cold dispersion relation. This paper focuses on applying it to LH waves. Assuming certain properties about the SOL geometry and turbulence, a modified wave-spectrum is calculated for LH launch in a low-density Alcator C-Mod discharge. This wave-spectrum is coupled to the ray-tracing/Fokker-Planck solver GENRAY\cite{smirnov2001genray}/CQL3D\cite{harvey1992cql3d} to determine its impact on current drive. The result is a significantly modified CD profile that is peaked on-axis. This increased on-axis damping is attributed to a fraction of LH rays rotated by scattering such that they damp on-axis during first-pass. In addition, a mechanism for asymmetric scatter is identified. The extent of asymmetric scattering increases with background density and turbulence. This paper is structured in the following way. \hyperref[sec:2]{Section 2} reviews the SAS model for calculating the scattered wave. In \hyperref[sec:3]{Section 3}, the SAS model is generalized to radially-varying filaments. \hyperref[sec:4]{Section 4} discusses the calculation of the scattering-width and ``effective" scattering width. \hyperref[sec:5]{Section 5} introduces the Markov chain (MC) model necessary to calculated the final modified wave-spectrum following propagation through the SOL. In \hyperref[sec:6]{Section 6}, the SAS-MC model is compared to the higher fidelity numeric full-wave solver PETRA-M\cite{shiraiwa2017rf}. Limitations to the accuracy of the SAS-MC model are discussed. \hyperref[sec:7]{Section 7} applies the SAS-MC model to Lower Hybrid launch in a typical SOL in C-Mod. There is an in-depth discussion about the asymmetric profile of the scattering-width. Comparisons are made with a ray-tracing treatment. In \hyperref[sec:8]{Section 8}, the modified wave-spectrum is coupled to GENRAY/CQL3D to model LHCD in a C-Mod discharge. \hyperref[sec:9]{Section 9} summarizes the results of this study. \section{Review of Semi-analytic scattering model} \label{sec:2} The first component of the SAS-MC model is the semi-analytic Mie-scattering description of an incident RF wave interacting with a single cylindrical filament. To the authors' knowledge, this problem is first treated in the magnetized plasma context by Myra \& D'Ippolito (2010)\cite{myra2010scattering} in the Lower Hybrid limit ($\Omega_{ci}^2 \ll \omega^2 \ll \Omega_{ce}^2$) for a homogenous cylinder. Ram \& Hizanidis (2016)\cite{ram2016scattering} extended this model to all frequencies. The single filament scattering model is briefly reviewed in this section, and then extended to radially in-homogeneous filaments in \hyperref[sec:3]{Section 3}. Fig. \ref{fig:1} illustrates the SAS model coordinate system. The cylinder axis is aligned with the background magnetic field $\bold{B}_0$ in the z-direction. Given a plane-wave traveling in the +x-direction, the objective is to calculate the scattered wave exterior to the cylinder. The electric field inside and outside the filament must satisfy the vector wave equation. In the case that the cylinder's dielectric properties have no longitudinal ($z$) and poloidal ($\theta$) dependence, this problem can be solved via separation of variables in cylindrical coordinates. \begin{figure}[!h] \centering \includegraphics[width=8cm, height=7cm]{1_a_coordinateSystem.png} \caption[font=5]{Poloidal and Cartesian coordinate system used to model RF scattering from a field-aligned filament.} \label{fig:1} \end{figure} Since the medium is homogeneous inside and outside the cylinder, it is simple to formulate an ansatz to the wave equation in each region. There are five waves to consider: the known incident wave $\bold{E}_{0}$; the scattered slow, fast wave $\bold{E}_{1}$, $\bold{E}_{2}$ outside the cylinder; and the slow, fast wave $\bold{E}_{3}$, $\bold{E}_{4}$ excited inside the cylinder. At the discontinuous boundary $\rho = a_b$, the fields inside and outside must satisfy Maxwell's boundary conditions. \subsection{Ansatz to electric field} \label{sec:2.1} Using separation of variables (see \hyperref[sec:A1]{App. A}), the electric field can be written in cylindrical coordinates as: \begin{subequations} \begin{align} E_{j \gamma} & = e^{i(k_{||}z-\omega t)}\sum_{m=-\infty}^{+\infty} E_{jm} W_{j \gamma m} e^{i m \theta}; \quad \quad\gamma = \rho,\theta,z \\ W_{j\rho m} & = \xi_{jx} J_{m}^{'}(k_{j \perp}\rho) - i\xi_{jy} \frac{m}{k_{j \perp} \rho} J_{m}(k_{j \perp}\rho) \\ W_{j\theta m} & = i\xi_{jx} \frac{m}{k_{j \perp} \rho} J_{m}(k_{j \perp}\rho) + \xi_{jy} J_{m}^{'}(k_{j \perp}\rho) \\ W_{jzm} & = i \xi_{jz}J_{m}(k_{j \perp}\rho) \end{align} \end{subequations} where $j=0,...,4$ is the wave index. $\bar{\xi}_j = \{\xi_{jx},\xi_{jy},\xi_{jz}\}$ is the plane-wave polarization of wave $j$. $J_{m}$ is the Bessel function of the first kind and order $m$. $J_{m}^{'}$ is the first derivative of $J_{m}$ with respect to its argument. For the known incident plane wave ($j=0$), it is required that: \begin{equation} E_{0m} = i^{m-1} \end{equation} $E_{jm}$ for $j>0$ have yet to be determined. Note that $k_{||}$ is the same for all waves, and is fixed by the incident wave. This is a consequence of Snell's law applied to a medium that is constant along the z-direction. \subsection{Boundary conditions} \label{sec:2.2} In general, the solutions in equations (1) can have both $J$ and $Y$ terms, where $Y$ is the Bessel function of the second kind. The requirement that $\bold{E}$ is finite at $\rho = 0$ leads to $Y$ terms being zero for the slow and fast branch inside the filament. For $\rho \rightarrow \infty$, the scattered fields must be radiating away from the filament. For the scattered fast wave, this requires the use of Hankel functions of the first kind, $H^{1}$, instead of $J$ in eqs. (1). The LH slow wave is backward-propagating, meaning $\bold{k_{\perp}}$ and $\bold{v}_{gr,\perp}$ are anti-parallel. This requires the use of Hankel functions of the second kind, $H^{2}$, for the scattered slow wave. It should be noted that a backward-propagating incident wave (ie. the slow wave) has $k_{inc,x} = -k_{\perp}$. This flipped sign can most easily be accounted for by substituting $J_{m} \rightarrow J_{-m}$\cite{myra2010scattering}. Lastly, a system of equations must be formulated to determine coefficients $E_{jm}$ for $j=1,...,4$. This is accomplished by imposing the four independent Maxwell boundary conditions at $\rho = a_b$ (see \hyperref[sec:A2]{App. B}). For each poloidal mode-number, there are four unknown coefficients and four boundary conditions, resulting in a solvable system of equations. \section{Generalizing to radially in-homogeneous filaments} \label{sec:3} The scattering model reviewed in the previous section is now extended to account for radially in-homogeneous cylinders. The cylinder remains poloidally symmetric, and therefore the poloidal mode-numbers are still uncoupled. A solution via separation of variables, similar to that in \hyperref[sec:2]{Section 2}, is still possible. The following solution scheme for a radially in-homogeneous filament is similar to Mie-scattering formulations for scattering from layered dielectrics \cite{kai1995finely} or annular cylinders\cite{wu1994scattering}. To the authors' knowledge, this is its first application in the context of Lower Hybrid wave scattering. In the previous case of a totally homogeneous ``flat-top" cylinder, there was a single boundary (at $\rho = a_b$) and therefore only one radial ``bin'' inside the cylinder. The cylinder is now discretized into multiple bins $r=0,...,R$. In other words, the filament is now a set of radially-stratified concentric cylinders. This introduces discontinuities in the media between bins, and so boundary conditions must be imposed at each separating layer. In the limit $R \rightarrow \infty$, a cylinder with a smoothly varying radial profile can be modeled with arbitrary precision. \subsection{Modified system of equations} \label{sec:3.1} Remember that the ``flat-top'' ($R=0$) system is solvable because there exist four unknowns $E_1,E_2,E_3,E_4$ and four independent boundary equations for each mode-number $m$. A similar system of equations must be derived for the general $R>0$ case. The simplest case ($R=1$) is illustrated in Fig \ref{fig:1b}. In the intermediate layers ($0<r \leq R$), each wave branch is generally a function of both $H_{m}^{1}$ and $H_{m}^{2}$ terms, and are therefore split into these two electric field contributions. \begin{figure}[!h] \centering \includegraphics[width=11cm, height=6cm]{1_b_solutionScheme.png} \caption[font=5]{The different contributions of $\bold{E}$ in the SAS model for a filament with two radial bins ($R=1$). There are two regions of interest: background and filament. The filament is further divided into the central (cntr) and intermediate (mid) region. `S' and `F' denote slow and fast LH branches. Functions in parentheses denote the type of Bessel function used in eq. (1).} \label{fig:1b} \end{figure} With the considerations made above, there are now eight unknown waves for the $R=1$ case. There are also two boundaries, supplying four boundary conditions each. This results in a solvable system for the total electric field everywhere. For the general case ($R>0$), there are all together $4(R+1)$ equations for each mode-number. For more detail, see \hyperref[sec:A2]{App. C}. Solving for the total electric field requires inverting $4(R+1) \times 4(R+1)$ matrices a total of $2M+1$ times, where $M$ is the maximum mode-number chosen to truncate the series. These matrices are sparse and banded, resulting in fast solution times on the order of seconds on a single CPU. \subsection{Poloidal and radial resolution} \label{sec:3.2} The electric field will evolve on three possible length-scales: $a_b, k_{\text{in} \perp}^{-1}$, or $k_{\text{out} \perp}^{-1}$. Sub-scripts ``in'', ``out'' denote inside, outside the cylinder. Define a characteristic poloidal mode-number $\tilde{m} \equiv \text{max}(k_{\text{in} \perp},k_{\text{out} \perp})a_{b}$. If $\tilde{m} \gtrsim 1$, terms with $|m|>\tilde{m}$ will rapidly decay in magnitude. Therefore, for a converged solution, it is necessary that $M \gg \tilde{m}$. If $\tilde{m}\ll 1$, it is necessary that $M \gg 1$. A rule-of-thumb can also be derived for how many radial bins are required. The source of error stems from discretizing the cylinder's smoothly varying radial profile into homogeneous radial bins. The discontinuity between bins is of order $L_{n}^{-1} \Delta r$, where $L_n$ is the characteristic length of the density in-homogeneity. $\Delta r$ is the radial bin width. Assume the cylinder has a monotonically decreasing radial profile with characteristic radial width $a_b$. Then the discontinuity is approximately $L_{n}^{-1} \Delta r \sim \left( \frac{n_b}{n_0 a_b}\right) \left( \frac{a_b}{R}\right) = \frac{n_b}{n_0 R}$. $\frac{n_b}{n_0}$ is the ratio of peak (center) cylinder density to the background density, and $R$ is the number of radial bins. To ensure the discontinuities are small requires $R \gg \frac{n_b}{n_0}$. \section{Scattering-width for statistical ensemble of filaments} \label{sec:4} While the model described above solves for the scattered field, it is more convenient to calculate a \emph{differential scattering-width}, which accounts for the deflection of scattered power in $\theta$-space. The differential scattering-width is defined as \cite{myra2010scattering}: \begin{equation} \sigma(\theta) \equiv \frac{d\sigma}{d\theta} = \frac{\textrm{lim}_{\rho \rightarrow \infty} \rho S_{sct,\rho}(\rho,\theta)}{S_{inc,x}} \end{equation} $\bold{S}_{inc}$, $\bold{S}_{sct}$ is the incident, scattered Poynting flux. It follows that the \emph{scattering-width} $\sigma = \int_{-\pi}^{+\pi} \sigma (\theta) d\theta$. See \hyperref[sec:A4]{App. D} for derivation and physical meaning of $\sigma$. The scattering-width (units of length) is the 1D analogy for a scattering cross-section (units of length squared). Lastly, define a \emph{normalized differential scattering-width} $\hat{\sigma}(\theta) = \sigma(\theta)/\sigma$ which will be useful in \hyperref[sec:5]{Section 5}. Note that $\sigma(\theta) \geq 0$ since, at a far enough distance, the scattered waves must be radiating $away$ from the cylinder. So far, no explicit expression for $S_{sct,\rho}$ and $S_{inc,x}$ in eq. (3) have been provided. The time-averaged Poynting flux for the scattered wave can be written as: \begin{equation} \bold{S}_{sct,j}= \frac{1}{2 \mu_0 \omega} \Im{\bold{E}_{j}^{*} \cross (\nabla \cross \bold{E}_{j})} \end{equation} where $j = S,F$ now refer to the scattered slow and fast wave, respectively. Equations (1) are substituted into eq. (4), and then substituted into eq. (3) to produce \begin{equation} \sigma_{j}(\theta) = \frac{ \mp 2}{\pi} \frac{|\xi_{j,y}|^2 + |\xi_{j,z}|^2 + \frac{k_z}{k_{j\perp}} \Re{\xi_{j,x} \xi_{j,z}^{*}} }{k_{inc,x} (|\xi_{inc,y}|^2 + |\xi_{inc,z}|^2) -k_{z} \Re{\xi_{inc,x} \xi_{inc,z}^{*}}} \abs{\sum_{m=-\infty}^{+\infty}i^{\pm m} E_{jm} e^{i m \theta}}^{2} \end{equation} assuming real valued $k_{j\perp}$. If $k_{j\perp}$ is imaginary, then the RHS of eq. (5) is zero. $\sigma_{(S,F)} (\theta)$ denotes the differential scattering-width for coupling from the incident slow wave to a scattered slow, fast wave. The asympotic relation $H_{m}^{(1,2)}(\tau)\approx \sqrt{\frac{2}{\pi \tau}}e^{\pm i(\tau-m \pi /2 - \pi/4)}$ for large argument $\tau$ has been used. In the denominator, $\bar{\xi}_{inc}$ is the normalized polarization of the incident slow-wave. Equation (5) is a generalization of the $\sigma (\theta)$ calculated by Myra \& D'Ippolito (2010)\cite{myra2010scattering}, which was done in the electrostatic limit. Equation (5) accounts for a fully electromagnetic dispersion tensor, and is therefore valid for the low densities in the far-SOL. The total differential scattering-width is: \begin{equation} \sigma(\theta) = \sigma_{S}(\theta) + \sigma_{F}(\theta) \end{equation} For background densities in which the slow-wave is propagating but the fast-wave is evanescent, $\sigma_{F} = 0$. It only becomes comparable to $\sigma_S$ as the background density approaches the mode-conversion density. For the purposes of studying slow-wave scattering in the SOL, it is reasonable to neglect $\sigma_{F}$. \subsection{Effective differential scattering-width: $\sigma_{\text{eff}}(\theta)$} \label{sec:4.1} In the presence of a filament, the resulting scattered field will depend on $a_b$ and $n_{b}$. Therefore, $\sigma(\theta)= \sigma(\theta; n_b/n_0, a_b)$ for a given $n_0, \bold{B},N_{||}$, and $\omega$. A joint probability distribution function (PDF), $p(n_b/n_0,a_b)$, is introduced. This is the probability that a filament will have certain parameters $a_b$ and $n_b/n_0$. Taking a weighted-average of $\sigma(\theta)$ with this joint-PDF returns the statistically averaged $\sigma(\theta)$ for scattering from a randomly selected filament. This averaged, or \emph{``effective'' differential scattering-width} is defined as: \begin{equation} \sigma_{\text{eff}}(\theta) = \int_{0}^{\infty} da_{b} \int_{0}^{\infty}d \left(n_{b}/n_0\right) \, \sigma_{S}(\theta; n_b/n_0, a_b) p(n_b/n_0,a_b) \end{equation} where $p(n_b/n_0,a_b)$ is normalized such that $\int_{0}^{\infty} da_{b} \int_{0}^{\infty}d\left(n_{b}/n_0\right)p(n_b/n_0,a_b) = 1$. Again, $\sigma_{F}$ is neglected since the focus is on SOL plasmas. The choice of joint-PDF for the filament parameters is guided by experimental measurements. In the SOL of C-Mod, mirror Langmuir probe measurements reveal positively skewed PDFs of density fluctuations\cite{graves2005self}. SOL fluid codes predict that filament width and density are positively correlated \cite{decristoforo2020blob}. Therefore, the joint-PDF is reasonably well described by a positively-skewed Gaussian PDF for each parameter ($a_b$ and $n_b/n_0$) along with a positive bi-variate correlation. The mean filament width and relative density is \begin{subequations} \begin{align} \langle a_b \rangle & = \int_{0}^{\infty} da_{b} \int_{0}^{\infty}d \left(n_{b}/n_0\right) \, \, a_b \, p(n_b/n_0,a_b)\\ \left\langle \frac{n_b}{n_0}\right\rangle & = \int_{0}^{\infty} da_{b} \int_{0}^{\infty}d \left(n_{b}/n_0\right) \, \, \frac{n_b}{n_0} \, p(n_b/n_0,a_b)\\ \end{align} \end{subequations} Filament mean width $\langle a_b \rangle$ is well bounded by gas-puff imaging (GPI) measurements as well as theory/simulation\cite{zweben2002edge, krasheninnikov2008recent, keramidas2020comparison}. Langmuir probe and GPI measurements provide a rough lower-bound on the filament mean relative density $\langle n_b/n_0 \rangle$, though this value will vary significantly at different radial locations in the SOL\cite{terry2003observations, zweben2002edge}. \section{The radiative transfer equation in slab geometry} \label{sec:5} The previous sections deal with a single scattering event due to one filament. \hyperref[sec:4.1]{Section 4.1} introduced an effective scattering-width $\sigma_{\text{eff}}(\theta)$, but this still only gives information about the average scattered power due to \emph{one} filament. Consider a turbulent medium with filaments of mean width $\langle a_b \rangle$ with packing fraction $f_{p}$. An incident LH wave will, on average, interact with $\frac{f_p L_x}{\pi \langle a_{b} \rangle^{2}}$ filaments per unit length in the perpendicular plane. Therefore, $\Sigma_{\text{eff}} \equiv \frac{f_p}{\pi \langle a_b \rangle^{2}}\sigma_{\text{eff}}$ is the inverse mean-free-path for the incident power to scatter. A \emph{radiative transfer equation} (RTE) can then be derived. \begin{equation} \left(\frac{\partial}{\partial t} + \bold{v}_{gr} \cdot \nabla \right) P(\bold{r},\theta)= -\Sigma_{\text{eff}} |\bold{v}_{gr \perp}| P(\bold{r},\theta) + \Sigma_{\text{eff}} |\bold{v}_{gr \perp}| \int_{-\pi}^{\pi}\hat{\sigma}_{\text{eff}}(\theta-\theta^{'})P(\bold{r},\theta^{'})d\theta^{'} \end{equation} where $P(\bold{r},\theta)$ is the power density at $\bold{r}$ directed along angle $\theta$. In eqn. (9), the first term on the RHS accounts for power directed along $\theta$ that is lost to scattering. The second term accounts for power gained at $\theta$ due to scattering from all other $\theta^{'}$. (Any losses due to the anti-Hermitian part of the dielectric tensor are ignored.) Now, consider a steady-state slab geometry with a filamentary turbulent layer limited to $0<x<L_{x}$. The filaments and background B are aligned along the z-direction. A LH plane-wave is incident on the slab from the left ($S_{inc,x}>0$). Since the background density is homogeneous, $|\bold{v}_{gr\perp}|$ is constant. Equation (9) then simplifies to \begin{subequations} \begin{align} & cos\theta \frac{dP(x,\theta)}{dx} = -\Sigma_{\text{eff}}P(x,\theta) + \Sigma_{\text{eff}}\int_{-\pi}^{\pi}\hat{\sigma}_{\text{eff}}(\theta-\theta^{'})P(x,\theta^{'})d\theta^{'}\\ & P(L_{x},\theta) = 0 \quad \textrm{for} \quad |\theta| \geq \pi/2\\ & P(0,\theta) = \delta(\theta) \quad \textrm{for} \quad |\theta| \leq \pi/2 \end{align} \end{subequations} where $\delta (\theta)$ is the Dirac delta function. Compare this to eq. (31) in Andrews \& Perkins (1983)\cite{andrews1983scattering}, where a similar RTE is formulated for drift-wave-like turbulence. Equations (10b \& c) enforce no scattering back into the turbulent layer at $x = L_{x}$ and $0$, respectively. Equation (10c) also enforces a normalized incident power from the left. Solving this equation and evaluating $P(x,\theta)$ at $x = L_x$ and $0$ results in the normalized angle-broadened transmitted and reflected wave-spectrum, respectively. It should be noted that two critical assumptions have been made in formulating the RTE. (1) $\sigma_{\text{eff}} (\theta)$ is formulated using the far-field limit. (2) The interaction of a wave with multiple filaments is modeled by chaining multiple single-filament scattering events. Together, they constute the \emph{far-field approximation}, which is only valid if $\langle a_b \rangle \ll d$, and $k_{\perp} d \gg 1$, where $d$ is the average distance between filaments \cite{mishchenko2014electromagnetic}. This approximation breaks down as $f_p$ increases (and therefore $d$ decreases), and is further discussed in \hyperref[sec:6.2]{Section 6.2}. \subsection{Solution to RTE using a Markov chain} \label{sec:5.1} Equation (10) is an integro-differential equation, and cannot, in general, be solved analytically. One numerical method is to discretize the wave-spectrum into photons/rays, and stochastically evolve their trajectories, as per the standard Monte-Carlo technique. This method is rather slow in providing a converged wave-spectrum near $\theta = \pm \pi/2$, where tally counts are usually low. Given how simple the slab geometry is, a more elegant Absorbing Markov chain method can be employed. This Markov chain (MC) method is deterministic, so it avoids the low tally count problem. It is commonly used to solve for a reflected and transmitted wave-spectrum through a turbid slab (e.g. solar rays interacting with Earth's atmosphere). The present study closely follows the formalism by Esposito \& House (1977)\cite{esposito1978radiative} and Xu \emph{et al.} (2011)\cite{xu2011markov}. Power is incident on the turbulent slab from the left, directed along the x-direction ($\theta_{0}=0$). It is convenient to define a $\zeta \equiv |\cos{\theta}|$ such that $\zeta_{0}=1$. It is simple to calculate the fraction of transmitted power that does not scatter in the slab. This is the ``ballistic'' fraction: \begin{equation} P_{ball} = e^{-\frac{L_x}{\zeta_{0}}\Sigma_{\text{eff}}} \end{equation} It is also straightforward to calculate the transmitted and reflected fraction that only scatter \emph{once} in the slab: \begin{equation} P_{T,1}(\theta) = \hat{\sigma}(\theta-\theta_{0})e^{-\frac{L_{x}}{\zeta}\Sigma_{\text{eff}}}\times \begin{cases} 0 & \cos{\theta} < 0\\ \frac{\zeta \zeta_{0}}{\zeta-\zeta_{0}}\left[1-e^{-L_{x}\Sigma_{\text{eff}}(\frac{1}{\zeta_0}-\frac{1}{\zeta})}\right] & \theta \neq \theta_{0}\\ \Sigma_{\text{eff}}L_{x} & \theta = \theta_0 \end{cases} \end{equation} \begin{equation} P_{R,1}(\theta) = \hat{\sigma}(\theta-\theta_{0}) \times \begin{cases} 0 & \cos{\theta} > 0\\ \frac{\zeta \zeta_{0}}{\zeta+\zeta_{0}}\left[1-e^{-L_{x}\Sigma_{\text{eff}}(\frac{1}{\zeta_0}+\frac{1}{\zeta})}\right] & \text{otherwise} \end{cases} \end{equation} The above are the first-order scattering terms. To compute the higher order terms (fraction of power undergoing $> 1$ scattering events), it is necessary to use the MC method. The slab is discretized into $n=1,\ldots ,\text{N}$ segments of width $\Delta x=L_{x}/\text{N}$. The angular spectrum is also discretized into $m=1,\ldots ,\text{M}$ segments of width $\Delta \theta=2\pi/\text{M}$. Next, the $\text{NM}\times \text{NM}$ ``transition'' matrix $\text{T}(x_n,\theta_m;x_{n^{'}}\theta_{m^{'}})$ is generated, which accounts for the probability of a photon in segment $n$ and directed along $\theta_m$ to scatter in segment $n'$ into $\theta_{m^{'}}$. The $\text{N}\times \text{M}$ ``source'' matrix $\Pi(x_n,\theta_m)$ is defined as the probability distribution of photons in segment $n$ directed along $\theta_{m}$ right after the first scattering event. Lastly, the $\text{NM}\times \text{M}$ ``absorption'' matrix $\text{R}_{T/R}(x_n,\theta_m;\theta_{m^{'}})$ is the probability of a photon to escape the slab via transmission/reflection following its final scattering event in segment $n$ from $\theta_m$ to $\theta_{m^{'}}$. The form for these matrices are as follows. The ``transition'' matrix can be broken into four components: \begin{equation} \text{T}(x_n,\theta_m;x_{n^{'}}\theta_{m^{'}}) = p_{\text{esc}}(x_n,\theta_m)\,p_{\text{trvl}}(x_n, \theta_m, x_{n'})\, p_{\text{sct}}(x_{n'},\theta_m)\,\hat{\sigma}(\theta_{m'}-\theta_{m}) \end{equation} where \begin{subequations} \begin{align} p_{\text{esc}}(x_n,\theta_m) & = \frac{\zeta_m}{\Sigma_{\text{eff}}\Delta x} \left(1-e^{-\frac{\Delta x}{\zeta_m}\Sigma_{\text{eff}}}\right)\\ p_{\text{trvl}}(x_n,\theta_m,x_{n'}) & = \begin{cases} e^{-\frac{x_{n'}-x_n}{\zeta_m}\Sigma_{\text{eff}}} & \quad \frac{x_{n'}-x_n}{\cos{\theta_m}} \geq 0\\ 0 & \quad \frac{x_{n'}-x_n}{\cos{\theta_m}} < 0\\ \end{cases} \\ p_{\text{sct}}(x_{n'},\theta_m) & = 1 - e^{-\frac{\Delta x}{\zeta_m}\Sigma_{\text{eff}}} \end{align} \end{subequations} The \emph{escape} probability, $p_{\text{esc}}(x_n,\theta_m)$, is the probability for a photon to travel through segment $n$ without scattering. The \emph{travel} probability, $p_{\text{trvl}}(x_n,\theta_m,x_{n'})$, is the probability of traveling between segments $n$ and $n'$ without scattering. Note that $p_{\text{trvl}}$ is set to zero in cases where the photon in segment $n$ with $\theta_m$ is oriented such that it is traveling away from $n'$. The \emph{scatter} probability, $p_{\text{sct}}(x_{n'},\theta_m)$, is the probability of scattering within segment $n'$. Lastly, $\hat{\sigma}(\theta_{m'}-\theta_{m})$ is the probability of the photon rotating from $\theta_m$ to $\theta_{m'}$ given that it undergoes a scattering event. The ``source'' matrix is \begin{equation} \Pi(x_n,\theta_m) = \hat{\sigma}(\theta_m-\theta_{0})C^{-1} \times \begin{cases} \frac{\zeta_m}{\zeta_m-\zeta_0} e^{-(\frac{x_n}{\zeta_0}+\frac{\Delta x}{\zeta_m})\Sigma_{\text{eff}}} \left(1-e^{-\Sigma_{\text{eff}}\Delta x (\frac{1}{\zeta_{0}}-\frac{1}{\zeta_m})}\right)& \cos{\theta_m} > 0\\ \frac{\zeta_0 \zeta_m}{\zeta_0 + \zeta_m}e^{-\frac{x_n}{\zeta_0}\Sigma_{\text{eff}}}\left(1 - e^{-\Sigma_{\text{eff}}\Delta x (\frac{1}{\zeta_0}+\frac{1}{\zeta_m})}\right) & \cos{\theta_m} < 0 \\ \frac{\Sigma_{\text{eff}} \Delta x }{\zeta_0} e^{-\frac{x_n + \Delta x}{\zeta_0}\Sigma_{\text{eff}}} & \theta_m = \theta_0 \end{cases} \end{equation} \begin{equation} C = \frac{\zeta_m}{\Sigma_{\text{eff}}\Delta x} \left(1-e^{-\frac{\Delta x}{\zeta_m}\Sigma_{\text{eff}}}\right) \end{equation} where the coefficient $C$ is required to properly volume-average the source over segment $n$. The transmission and reflection ``absorption'' matrices are \begin{equation} \text{R}_{T}(x_n,\theta_m;\theta_{m'}) = \hat{\sigma}(\theta_{m'}-\theta_{m}) \times \begin{cases} 0 & \cos{\theta_{m'}} < 0 \\ \frac{\zeta_{m'}}{\zeta_{m'}-\zeta_m}e^{-\Sigma_{\text{eff}}(\frac{L_x}{\zeta_{m'}} - \frac{x_n}{\zeta_{m}})}\times \\ \left(e^{-\Sigma_{\text{eff}}x_n (\frac{1}{\zeta_{m'}} - \frac{1}{\zeta_{m}})} - e^{-\Sigma_{\text{eff}}L_x (\frac{L_x}{\zeta_{m'}} - \frac{x_n}{\zeta_{m}})}\right) & \cos{\theta_{m}} > 0 \\ \frac{\zeta_{m'}}{\zeta_m+\zeta_{m'}}e^{-\Sigma_{\text{eff}}(\frac{L_x}{\zeta_{m'}}+\frac{x_n}{\zeta_m})}\times \\ \left(e^{\Sigma_{\text{eff}}x_n(\frac{1}{\zeta_m}+\frac{1}{\zeta_{m'}})} - e^{\Sigma_{\text{eff}}L_x(\frac{1}{\zeta_m}-\frac{1}{\zeta_{m'}})}\right) & \cos{\theta_{m}} < 0 \\ \frac{\Sigma_{\text{eff}}}{\zeta_m}e^{-\Sigma_{\text{eff}}(\frac{L_x}{\zeta_{m'}}-\frac{x_n}{\zeta_m})}(L_x - x_n) & \theta_m = \theta_{m'} \end{cases} \end{equation} \begin{equation} \text{R}_{R}(x_n,\theta_m;\theta_{m'}) = \hat{\sigma}(\theta_{m'}-\theta_{m}) \times \begin{cases} 0 & \cos{\theta_{m'}} > 0 \\ \frac{\zeta_{m'}}{\zeta_{m}-\zeta_{m'}}e^{-\Sigma_{\text{eff}}\frac{x_n}{\zeta_{m}}}\left(1 - e^{-\Sigma_{\text{eff}}x_n (\frac{1}{\zeta_{m'}} - \frac{1}{\zeta_{m}})}\right) & \cos{\theta_{m}} < 0 \\ \frac{\zeta_{m'}}{\zeta_m+\zeta_{m'}}e^{\Sigma_{\text{eff}}\frac{x_n}{\zeta_{m'}}}\left(e^{-\Sigma_{\text{eff}}x_n(\frac{1}{\zeta_m}+\frac{1}{\zeta_{m'}})} - 1\right) & \cos{\theta_{m}} > 0 \\ \frac{\Sigma_{\text{eff}}}{\zeta_m}e^{-\frac{\Sigma_{\text{eff}}}{\zeta_{m'}}x_n}x_n & \theta_m = \theta_{m'} \end{cases} \end{equation} Using these matrices, one can calculate the higher-order transmitted/reflected wave-spectrum terms: \begin{subequations} \begin{align} P_{T/R,2}(\theta_m) & = \Pi \cdot \text{I} \cdot \text{R}_{T/R}\\ P_{T/R,l}(\theta_m) & = \Pi \cdot \text{T}^{l-2} \cdot \text{R}_{T/R} \quad \text{for } l \geq 3 \end{align} \end{subequations} where $l$ is the order of the scattering term, and $\text{I}$ is the $\text{NM}\times \text{NM}$ identity matrix. In summing all scattering terms, the total transmitted and reflected wave-spectrum is \begin{subequations} \begin{align} P_{T}(\theta_m) - \frac{P_{ball}}{\Delta \theta}\delta_{\theta_m,\theta_0} & = P_{T,1}(\theta_m) + \sum_{l=1}^{\infty} P_{T,l}\\ P_{R}(\theta_m) & = P_{R,1}(\theta_m) +\sum_{l=1}^{\infty} P_{R,l} \end{align} \end{subequations} and $\delta_{i,j}$ is the Kronecker delta. Furthermore, eq. (21a) can be rewritten as: \begin{equation} P_{T}(\theta_m) - \frac{P_{ball}}{\Delta \theta}\delta_{\theta_m,\theta_0} - P_{T,1}(\theta_m)= \Pi \cdot \left( \text{I} + \sum_{l=1}^{\infty}\text{T}^l \right) \cdot \text{R}_{T} = \Pi \cdot \left( \text{I} - \text{T}\right)^{-1}\cdot \text{R}_{T} \end{equation} A similar form applies to eq. (21b). The second relation in eq. (22) produces the solution following a matrix inversion. In practice, it is often faster to evaluate the first relation and truncate the series at a finite $l$ when the solution is sufficiently converged \cite{yang2018markov}. In deriving $p_{\text{esc}}$ and $p_{\text{sct}}$, the possibility of multiple scattering events in segment $n$ is neglected. This is a reasonable assumption as long as $\Delta x \equiv \frac{L_x}{\text{N}} \ll \frac{\zeta}{\Sigma_{\text{eff}}}$. The population of photons with $\zeta \approx 0$ is the largest source of error for any finite N. Nevertheless, in practice, $P_{T/R}$ is found to converge as long as $\Sigma_{\text{eff}} \Delta x \ll 1$. A criteria for the angular resolution is not as straight-forward. It depends on the smoothness of $\hat{\sigma}(\theta)$. Naturally, a fine resolution is needed to accurately resolve sharp peaks in $\hat{\sigma}(\theta)$. \section{Verification of SAS-MC with numeric full-wave solver} \label{sec:6} The SAS-MC model is compared with the higher-fidelity finite-element full-wave code PETRA-M \cite{shiraiwa2017rf}. First, the SAS model for a single filament is compared to PETRA-M. Then the same is done for the MC model, which accounts for multiple filaments in a slab. \subsection{Scattered field for single filament} \label{sec:6.1} Consider an incident slow wave with a prescribed frequency $f$ and parallel refractive index $N_{||}\equiv\frac{c k_{||}}{\omega}$. Also assume a filament with Gaussian radial profile such that \begin{equation} n(\rho) -n_0= n_0 \left( \frac{n_b}{n_0} -1 \right) e^{-\left(\frac{2\sqrt{\text{ln}(2)}\rho}{a_b}\right)^{2}} \end{equation} where $n_{b}/n_0$ is the relative density at the filament's peak ($\rho = 0$), and $a_b$ is re-defined as the \emph{full-width half-max} of the filament. A case with $n_0=1\times 10^{19}\, \text{m}^{-3}$, $\text{B}=4\, \text{T}$, $f=4.6\, \text{GHz}$, $N_{||} =2$, $n_b/n_0 = 4.8$, and $a_b=1\, \text{cm}$ is simulated using the SAS model. Simulation resolution is $R=22$ and $M=100$. Figure \ref{fig:2}(a-c) show the (x,y,z) components of the time-averaged Poynting flux $\bold{S}$ exterior to the filament. $\bold{S}$ is calculated using the relation $\bold{S} = \frac{1}{2 \mu_0 \omega}\Im{\bold{E}^{*} \cross (\nabla \cross \bold{E})}$. The normalized field $\bold{P} \equiv \frac{\bold{S}}{|\bold{S}_{inc}|}$ is introduced, where $\bold{S}_{inc}$ is the Poynting flux of the incident wave. Figure \ref{fig:2} reveals a shadowing effect downstream of the filament. The striations in the field indicate strong back and side-scattering of the incident wave. Note that $\bold{P}$ has been numerically computed from the interpolated $\bold{E}$-field on a grid in the (x,y)-plane. This method of plotting $\bold{P}$ is susceptible to large errors inside the filament where the gradients of $\bold{E}$ are large. Therefore, $\bold{P}$ inside the filament is not plotted. Figures \ref{fig:2}(d-f) show this case repeated in PETRA-M, and result in excellent agreement with the SAS model. This 2D simulation is done in a circular domain. The incident wave is excited to the left of the filament using an external current source term. To approximate an infinite background plasma, a perfectly-matched layer (PML) is modeled at the perimeter of the circular simulation domain. \begin{figure}[!h] \centering \includegraphics[width=16cm, height=8cm]{2_analyticVersusPetraMComparison.png} \caption[font=5]{Gaussian filament: Normalized Poynting flux computed using the SAS model (a-c) and PETRA-M (d-f). $n_0=1\times 10^{19} \, \text{m}^{-3}$, $\text{B}=4 \, \text{T}$, $f=4.6\, \text{GHz}$, $N_{||} =2$, $n_b/n_0 = 4.8$, and $a_b=1\, \text{cm}$.} \label{fig:2} \end{figure} \subsection{Reflection coefficient for turbulent slab} \label{sec:6.2} Next, the Markov chain (MC) step of the SAS-MC model is compared with a turbulent slab modeled in PETRA-M. This will reveal whether the far-field limit, a critical approximation in the MC model, is valid for the treatment of LH scattering in the SOL. In theory, the far-field approximation should break down as filaments are packed closer together \cite{mishchenko2014electromagnetic}. For the MC model, $\sigma_{\text{eff}}(\theta)$ must be calculated, which first requires prescribing a joint-PDF of filaments. Figure \ref{fig:7} plots an example joint-PDF. A skewed-normal distribution is assumed for $a_b$ and $n_b/n_0$. In this case, $\langle a_b \rangle = 0.48\,$cm and $\langle n_b/n_0 \rangle = 2.6$. These values are bounded by experimental SOL measurements \cite{terry2003observations, zweben2002edge}. (Assuming SOL turbulence is predominantly filamentary, the approximation $\langle n_b/n_0 \rangle \approx 1 + \frac{n_{\text{RMS}}}{n}f_{p}^{-1}$ is made, where $f_{p}$ is the packing fraction and is assumed to be $0.2$). Filament size and density skewness are prescribed via the shape parameter for a skewed normal distribution. These are chosen to be +10 and +7, respectively. Filament size and relative density standard deviation are 0.1$\,$cm and 1.35, respectively. The bi-variate correlation coefficient is 0.9. \begin{figure}[!h] \centering \includegraphics[scale=0.8]{7_blobJointPDF.png} \caption[font=5]{Example joint-PDF of filament parameters $a_b$ and $n_b/n_0$. A skewed-normal distribution is assumed for $a_b$ and $n_b/n_0$. $\langle a_b \rangle = 0.48\,$cm and $\langle n_b/n_0 \rangle = 2.6$. Filament size and density shape parameters are +10 and +7, respectively. Filament size and density standard deviation are 0.1$\,$cm and 1.35, respectively. Bi-variate correlation coefficient is 0.9.} \label{fig:7} \end{figure} Figure \ref{fig:11} shows the simulation setup for a slab turbulent geometry in PETRA-M. A slow wave traveling in the $+x$-direction interacts with a turbulent layer populated with Gaussian filaments. The filaments are randomly generated in the slab using a Monte-Carlo approach\cite{sierchio2016comparison,biswas2020study}. Each filament is generated with a randomly picked $n_b/n_0$ and $a_b$ with a probability that satisfies the prescribed joint-PDF $p(n_b/n_0, a_b)$. In this way, the turbulent slab used in the SAS-MC model and in PETRA-M are made statistically equivalent. The incident slow wave is excited with an external current density source function upstream of the turbulence. Top and bottom boundaries are periodic. The turbulence is also periodic in the $y$-direction. In order to minimize the periodic geometry's effect on the wave, the $y$ length of the solution domain is much larger than $\langle a_b \rangle$ or $k_{inc\perp}$. To mimic infinite domain in the $\pm x$-direction, the left and right boundaries can be modeled as either a perfectly matched layer (PML) or an absorbing boundary condition (ABC). The PML, while more computationally efficient, does not work when both the slow and fast wave can propagate in the background plasma. In PETRA-M, the reflection coefficient $F_{\text{ref}}=1-P_{x}/P_{x,0}$ is calculated and directly compared with the SAS-MC value. $P_{x}$ is the x-component of the Poynting flux and $P_{x,0}$ is the ``nominal'' value when no turbulence is present. In the SAS-MC model, $F_{\text{ref}}=\int P_{\text{R}}(\theta)d\theta$. \begin{figure}[!h] \centering \includegraphics[scale=0.6]{11_PetramMultiBlobSetup.png} \caption[font=5]{Setup for PETRA-M simulation with turbulent slab. ``PML'' denotes perfectly matching layer. ``PEC'' denotes perfect electric conductor.} \label{fig:11} \end{figure} Table \ref{table:1} compares $F_{\text{ref}}$ computed in PETRA-M and the SAS-MC model. Both models follow the same general trend. Cases (1-4) and (8-11) reveal that $F_{\text{ref}}$ increases with $f_{p}$. Cases (3,5,6,8) reveal that $F_{\text{ref}}$ increases with $\langle n_b/n_0 \rangle$ and decreases with $\langle a_b \rangle$. This is consistent with previous scattering theories\cite{andrews1983scattering,ott1979lower}. Another way to analyze the trends in $F_{\text{ref}}$ between models is by inspecting $\Sigma_{\text{eff}}L_{x}$ calculated in the SAS-MC model. This is the attenuation factor for the ballistic power (see eq. (11)). As $\Sigma_{\text{eff}}L_{x}$ increases, so should $F_{\text{ref}}$. Indeed, this is true for both models. In general, the SAS-MC model over-predicts $F_{\text{ref}}$, such that the absolute error $\Delta F_{\text{ref}} \equiv F_{\text{ref,SAS-MC}} - F_{\text{ref,PETRA-M}} \geq 0$. This error increases with $f_p$. Again, this is due to the far-field approximation breaking down. While far-field validity is dependent on $f_{p}$, the aggregate error depends on $\Sigma_{eff} L_{x}$. For example, the SOL width is varied between cases (2) and (7), while the turbulence is kept statistically identical. The $L_{x}=5\,$cm case results in $\Delta F_{\text{ref}} = 0.00$. For the $L_{x}=15\,$cm case, $\Delta F_{\text{ref}} = +0.13$. SOL measurements indicate $f_p \approx 0.05-0.25$ \cite{agostini2007study,carralero2018role,zweben2011estimate}. SOL widths are also $<5$ cm in present-day devices. As a result, cases (2) and (9) are most representative of a C-Mod SOL, depending on whether the background density is evaluated at the far-SOL or the separatrix, respectively. At low-density (case 2), the two models agree well ($\Delta F_{\text{ref}} = 0.00$). At high density (case 9), the SAS-MC model over-predicts $F_{\text{ref}}$, such that $\Delta F_{\text{ref}} = +0.08$. A possible reason for the disagreement at high density may be because $\Sigma_{\text{eff}}L_{x}$ is greater (compared to similar cases at low density). \begin{table}[!h] \begin{tabular}{c|ccccc|c|cc} \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{Plasma parameters} & \multicolumn{1}{c|}{} & \multicolumn{2}{c}{$F_{\text{ref}}$} \\ \hline Case \# & $n_{0}\times10^{19}\,[\text{m}^{-3}]$ & $\langle n_{b}/n_{0} \rangle$ & $\langle a_b \rangle\,$[cm] & $f_{p}$ & $L_{x}\,$[cm] & $\Sigma_{\text{eff}}L_{x}$ & Petra-M & SAS-MC \\ \hline 1 &0.55 & 2.60 & 0.48 & 0.02 &5.0 & 0.26 & 0.01 & 0.02 \\ 2 &0.55 & 2.60 & 0.48 & \textbf{0.10} &5.0 & 1.29 & 0.13 & 0.13 \\ 3 &0.55 & 2.60 & 0.48 & \textbf{0.25} &5.0 & 3.23 & 0.18 & 0.31 \\ 4 &0.55 & 2.60 & 0.48 & \textbf{0.50} &5.0 & 6.45 & 0.29 & 0.48 \\ 5 &0.55 & 2.60 & \textbf{1.10} & 0.25 &5.0 & 1.33 & 0.02 & 0.06 \\ 6 &0.55 & \textbf{1.80} & 0.48 & 0.25 &5.0 & 1.42 & 0.04 & 0.13 \\ 7 &0.55 & 2.60 & 0.48 & 0.10 &\textbf{15.0} & 3.89 & 0.22 & 0.35 \\ 8 &\textbf{2.25} & 2.60 & 0.48 & 0.02 &5.0 & 0.40 & 0.04 & 0.04 \\ 9 &2.25 & 2.60 & 0.48 & \textbf{0.10} &5.0 & 2.02 & 0.15 & 0.23 \\ 10 &2.25 & 2.60 & 0.48 & \textbf{0.25} &5.0 & 5.06 & 0.34 & 0.46 \\ 11 &2.25 & 2.60 & 0.48 & \textbf{0.50} &5.0 & 10.1 & 0.55 & 0.65 \end{tabular} \caption[font=5]{Comparison between SAS-MC model and PETRA-M. Slow-wave launched at $4.6\, \text{GHz}$ and $N_{||}=2$ with $\text{B}=4\, \text{T}$. Filament joint-PDF parameters are same as in Figure \ref{fig:7} unless otherwise noted. $\Sigma_{\text{eff}}L_{x}$ calculated in SAS-MC model. For each case, results from multiple iterations (with different turbulence realizations) are averaged until $F_{\text{ref}}$ is statistically converged.} \label{table:1} \end{table} \subsection{Comments on computational cost} \label{sec:6.3} Generally, the semi-analytic scattering method has three key advantages compared to finite-element Maxwell solvers. (1) The large (in fact infinite) background plasma region does not need to be meshed. (2) It exactly solves scattering problems, since the infinite exterior domain does not need to be artificially truncated. (3) Analyzing the scattered wave-spectrum is straight-forward, since the solution is already deconvolved into the constituent poloidal mode-numbers \emph{for each} branch. Points 1 and 2 result in the SAS-MC model being considerably less expensive than slab turbulence simulations in PETRA-M. Using the SAS technique, computing a single differential scattering-width $\sigma(\theta;n_b/n_0, a_b )$ takes $\sim\! 10$ seconds on a single CPU, and considerably less time if parallelized between poloidal mode-numbers. Computing $\sigma_{\text{eff}}(\theta)$ may require sampling a few hundred combinations of $(n_b/n_0, a_b)$, depending on the filament joint-PDF. Fortunately, each sampled $\sigma(\theta;n_b/n_0, a_b )$ needs to be computed only once. Any number of $\sigma_{\text{eff}}(\theta)$ can then be generated from the sampled differential scattering-widths. The most expensive process in the MC routine is generating the transition matrix T. This takes $\sim 20$ seconds on a single CPU, depending on poloidal and radial bin resolution. Using PETRA-M, each $n_0 = 2.25 \times 10^{19}\, \text{m}^{-3}$, $L_{x} = 5\,$cm slab case required $\sim\!25\,$CPU-hours and $\sim\! 300\,$GB of RAM on the MIT Engaging computing cluster. The size of PETRA-M simulations is primarily limited by available RAM. In comparison, all computations for the SAS-MC model have been conducted on a PC with $8\,$GB of available RAM. \subsection{Caveats to the SAS-MC model} \label{sec:6.4} The SAS-MC model offers higher physics-fidelity than ray-tracing, while being computationally less expensive than numeric full-wave solvers. This is possible due to a number of assumptions made in the model that makes it less universally applicable than numeric full-wave solvers. The semi-analytic scattering (SAS) model assumes a homogeneous background plasma with a cylindrical scattering object (the filament) that is poloidally and azimuthally symmetric. This allows an efficient solution scheme using separation of variables. In reality, filaments usually develop a shock front as they convect outward \cite{krasheninnikov2008recent}, and the resulting crescent-like filament shape can lead to significantly modified scattering behavior, at least for ion-cylcotron waves \cite{tierens2020importance}. Furthermore, the filament in the SAS model is assumed to be aligned with the magnetic field, so that $\nabla_{||} \left( \frac{n}{n_0} \right)=0$. This is likely a reasonable assumption since filaments introduce a $\nabla_{||} \left( \frac{n}{n_0} \right)$ that is much smaller than $k_{||}$ of the LH wave\cite{grulke2014experimental}. As a result, the effect of $k_{||}$ broadening due to a typical SOL filament is small \cite{madi2015propagation}. The Markov chain (MC) model introduces additional assumptions. The SOL is treated as a slab, which means the effect of toroidal geometry is neglected. This is a reasonable assumption for the treatment of first-pass scattering in front of the antenna. In addition, the background plasma and turbulence parameters are constant within the slab, when in reality they are sensitive to the radial coordinate in a tokamak. The MC model also assumes the reflected wave-spectrum is lost, when in reality a fraction of this power may once again reflect at a cutoff and re-enter the core plasma. Lastly, the MC model assumes the filaments are far enough apart so that the RTE is valid. This assumption is increasingly poor as $f_p$ rises. In order to quantify the inaccuracies introduced by the MC model, it may be worth-while to model scattering along the full extent of a ray-trajectory in a realistic tokamak geometry. This can be done by employing $\sigma(\theta; n_0, B, N_{||}, \langle n_b/n_0 \rangle, \langle a_b \rangle)$ as a scattering probability in a Monte-Carlo ray-tracing simulation, similar to what has been done for the $k$-scattering model \cite{bonoli1982toroidal,bertelli2013effects}. Alternatively, 3D PETRA-M simulations of LH launch in a turbulent SOL, with realistic geometry, would address all the caveats mentioned. These tests are outside the scope of this paper. \section{SAS-MC applied to Lower Hybrid scattering} \label{sec:7} The SAS-MC model is applied to LH wave scattering in front of the antenna in C-Mod. Figure \ref{fig:8} plots $\sigma_{\text{eff}} (\theta)$ for the joint-PDF in Figure \ref{fig:7}, and $N_{||}=2$, $f=4.6\, \text{GHz}$, and $\text{B}=4\, \text{T}$. At low background density ($n_0 = 5.5 \times 10^{18} \text{m}^{-3}$), $\sigma_{\text{eff}} (\theta)$ resembles a wrapped-Cauchy distribution, though slightly skewed so that it peaks at $+0.2\, \text{rad}$. At high background density ($n_0 = 4.8 \times 10^{19} \text{m}^{-3}$), $\sigma_{\text{eff}} (\theta)$ is sharply peaked near $+0.05\, \text{rad}$ and is very asymmetric. A fat-tail exists only for $\theta > 0$. This tail also has fine structures that do not exist in the low density case. $\sigma_{\text{eff}} (\theta)$ is more asymmetric at higher densities because $|\epsilon_{xy}|$ is larger, and therefore the effect of asymmetric scattering for any given filament is stronger (see \hyperref[sec:7.2]{Section 7.2} for more detail). \begin{figure}[!h] \centering \includegraphics[scale=0.6]{8_effectiveScatteringWidth.png} \caption[font=5]{Effective differential scattering-width $\sigma_{\text{eff}} (\theta)$. Calculated using filament joint-PDF shown in Figure \ref{fig:7}. Green and red lines denote low and high background density, respectively.} \label{fig:8} \end{figure} \subsection{Parametric scan of SOL density and filament parameters} \label{sec:7.1} Figures \ref{fig:3}(a,c,e) plot $\sigma_{S}$ as a function of background density $n_0$, relative filament density $n_b/n_0$, and filament width $a_b$. The incident wave is at 4.6$\,$GHz with $N_{||}=2$, typical for LH launch in C-Mod. In accordance with the low-field-side SOL in C-Mod, $\text{B}=4\, \text{T}$. As expected, $\sigma_{S}$ increases as $n_b/n_0$ deviates from unity. Notably, scattering resonances can be seen, as indicated by bands of higher $\sigma_{S}$. These are due to standing wave resonances excited within the filament, which result in stronger coupling to the scattered waves. Expressions for these resonances can be analytically derived for the ``flat-top'' filament case\cite{myra2010scattering, tierens2020filament}, and are related to radial and poloidal harmonics in cylindrical geometry. To the authors' knowledge, these analytic calculations are intractable for Gaussian (and more general) filament cross-sections. \subsection{Asymmetric scattering} \label{sec:7.2} The quantity $\alpha$ is introduced as a metric for asymmetric scattering. \begin{equation} \alpha = \int_{0}^{\pi} \hat{\sigma}_{S}(\theta) d \theta - \frac{1}{2} \end{equation} $\alpha=-0.5,+0.5$ denote that power is only scattered downwards ($-\pi < \theta < 0$), upwards ($0 < \theta < \pi$). If $\alpha=0$ then an equal fraction of power is scattered downwards and upwards. Figures \ref{fig:3}(b,d,f) reveal that $\alpha$ is not guaranteed to be zero. This means, in general, $\sigma (\theta)$ is not an even function, and the scattered power is not equally distributed downwards or upwards. This effect is most noticeable at high background densities ($n_0 \gtrsim 2\times 10^{19} \text{m}^{-3}$). For positive density modifications ($n_b/n_0 > 1$), power is predominantly scattered upwards. The reverse is true for negative density modifications ($n_b/n_0 < 1$). In the typical tokamak SOL, filaments are predominantly denser than the background plasma\cite{graves2005self}. As a result, the incident wave is preferentially scattered upwards. The strength of this asymmetry depends on the statistical properties of the filaments. \begin{figure}[!h] \centering \includegraphics[scale=0.8]{3_scatteringWidthScans.png} \caption[font=5]{Plots of (a) scattering-width $\sigma_{S}$ and (b) asymmetric scattering metric $\alpha$ for an incident slow-wave at 4.6$\,$GHz, $N_{||}=2$. $\text{B}=4\, \text{T}$. $a_b =0.30\,\text{cm}$. (c) and (d) plot $\sigma_{S}$ and $\alpha$, respectively, for $a_b=0.85\,\text{cm}$. (e) and (f) plot $\sigma_{S}$ and $\alpha$, respectively, for $a_b=1.30\,\text{cm}$. The white region in the upper-right corner of each subplot has no data plotted.} \label{fig:3} \end{figure} Asymmetric scattering is possible in an anisotropic medium. Specifically, the dielectric dyadic tensor, $\epsilon$, has off-diagonal components $\epsilon_{12} = -\epsilon_{21} \neq 0$, which permits asymmetric scattering\cite{wu1994scattering}. $\epsilon_{12}=-i \epsilon_{xy}$. In the LH limit, $\epsilon_{xy}\approx \omega_{pe}^2/{\omega \Omega_{ce}}$, where $\Omega_{ce} \equiv eB/m_e$ is the electron cyclotron frequency. It is clear that the sign of $\epsilon_{xy}$ is dependent on the sign of $B$ (that is, whether the magnetic field is oriented co-parallel or counter-parallel with $\hat{e}_{z}$). Correspondingly, when the direction of $\bold{B}$ is flipped, $\epsilon \rightarrow \epsilon^{T}$, and $\sigma (\theta) \rightarrow \sigma (-\theta)$ . Notably, this asymmetric scattering effect is not accounted for in previous treatments for LH wave scatter. It is easy to see why this is the case for models that assume drift-wave like turbulence. These models assume that density fluctuations are equally likely to be above or below the background density. Therefore, this asymmetric scatter effect is statistically canceled out. There also exist LH scattering models that assume coherent turbulent structures that can, on average, be denser than the background \cite{hizanidis2010fokker,biswas2020study}. These models also do not account for asymmetric scattering, because they make the ray-tracing approximation. The reason why ray-tracing cannot model asymmetric scattering is subtle. It is related to the breakdown of the ray-tracing approximation. Consider the ray-tracing equations for a LH ray initially propagating with $\bold{N}_{\perp}$ aligned along the x-direction, and background $\bold{B}$ aligned along the z-direction. The ray-tracing equations involve partial derivatives of $\text{det}(\bold{D})$, where $\bold{D}$ is now the dielectric tensor and \begin{equation} \bold{D} \cdot \bold{\tilde{E}}= \begin{bmatrix} \epsilon_{\perp} - N_{||}^2 & -i\epsilon_{xy} & N_{\perp}N_{||} \\ i\epsilon_{xy} & \epsilon_{\perp} - N^2 & 0 \\ N_{\perp}N_{||} & 0 & \epsilon_{||} - N_{\perp}^2 \end{bmatrix} \cdot \begin{bmatrix} \tilde{E_x} \\ \tilde{E_y} \\ \tilde{E_z} \end{bmatrix} = 0 \end{equation} where $\bold{\tilde{E}}(\bold{r})$ is the slowly-varying part of the electric field. det($\bold{D}$) has terms that are quadratic in $\epsilon_{xy}$, but no linear $\epsilon_{xy}$ terms. As a result, information about the sign of $B$ along $\hat{e}_{z}$ is lost. Compare this to the full EM wave-equation, with no ray-tracing approximation, written in a form similar to that of eq. (25). \begin{equation} \begin{bmatrix} \epsilon_{\perp} - \frac{c^2}{\omega^2}(F_{yy} + F_{zz}) & \frac{c^2}{\omega^2}F_{yx} - i\epsilon_{xy} & \frac{c^2}{\omega^2}F_{zx} \\ \frac{c^2}{\omega^2}F_{xy} + i\epsilon_{xy} & \epsilon_{\perp} - \frac{c^2}{\omega^2}(F_{zz} + F_{xx}) & \frac{c^2}{\omega^2}F_{zy} \\ \frac{c^2}{\omega^2}F_{xz} & \frac{c^2}{\omega^2}F_{yz} & \epsilon_{||} - \frac{c^2}{\omega^2}(F_{xx} + F_{yy}) \end{bmatrix} \cdot \begin{bmatrix} \tilde{E_x} \\ \tilde{E_y} \\ \tilde{E_z} \end{bmatrix} = 0 \end{equation} where \begin{subequations} \begin{align} F_j = k_j - i \pdv{}{j} \\ F_{jl} = F_j(F_l) \end{align} \end{subequations} Equation (26) accounts for $\nabla \bold{k}$ and $\nabla \bold{\tilde{E}}$ terms which are usually neglected in ray-tracing because the plasma is assumed sufficiently homogeneous, such that $k_{\perp}L_n \gg 1$, where $L_n\equiv |\frac{\nabla n}{n_0}|^{-1}$ is the characteristic length of the density in-homogeneity. This heuristic validity criterion is actually too lax for magnetized plasma. A perturbation analysis of eq. (26) reveals that these higher-order gradient terms can be comparable to the zeroth-order terms (eq. (25)) even if $k_{\perp}L_n \gg 1$. Following some algebra, it is found that the two leading higher-order terms are linear in $\epsilon_{xy}$ and quadratic in $N_{||}$, respectively, such that the actual validity criterion for ray-tracing is $(|\epsilon_{xy}| + N_{||}^2) \frac{1}{k_{\perp} L_{n}} \ll 1$. (More details about this perturbation analysis can be found in Appendix A of \cite{biswas2020study}, although in that derivation $\nabla\bold{k}$ terms were erroneously neglected, which lead to the dropping of the $N_{||}^2$ term in the final ray-tracing validity criterion.) At initial launch of the LH wave $N_{||}^2 , |\epsilon_{xy}| \sim 1$, but they can both grow to be much larger as the ray continues to propagate. Specifically, $|\epsilon_{xy}|\propto n_e$, and so it rapidly increases as the ray propagates into the plasma. The restriction that $\epsilon_{xy}$ places on LH ray-tracing has been commented on before\cite{ott1979lower}. The following discussion is the first time it has been linked to asymmetric scattering in the context of LH waves. In deriving the new ray-tracing criterion for LH waves in a magnetized plasma, it was revealed that one of the leading higher-order gradient terms neglected in ray-tracing is linear in $\epsilon_{xy}$. This is precisely the term with information about the orientation of $\bold{B}$. In accordance, as $|\epsilon_{xy}|\frac{1}{k_{\perp} L_n}$ grows and becomes comparable to unity, asymmetric scattering also becomes important. This is shown numerically by simulating the scatter of LH waves from four increasingly dense Gaussian filaments. Figure \ref{fig:4} plots the validity regime of ray-tracing in the presence of a Gaussian filament as a function of $n_b/n_0$ and $a_b$. The incident wave is launched at 4.6$\,$GHz with $N_{||}=2$ and $\text{B} = 4\,\text{T}$. It is assumed that $L_{n}^{-1} \approx (\frac{n_b}{n_0}-1)/a_b$. The black line denotes the validity limit for $n_0 = 1 \times 10^{19} \text{m}^{-3}$. To the right of this line, $|\epsilon_{xy}|\frac{1}{k_{\perp} L_n} > 1$ and to the left $|\epsilon_{xy}|\frac{1}{k_{\perp} L_n} < 1$. (For simplicity, the $N_{||}^2$ term is ignored). The four starred points denote filaments with $a_b = 1$cm and $n_b/n_0 = [1.24, 1.6, 2.44, 4.6]$ (plotted left to right). Alternatively, these filaments satisfy $n_b = [0.1, 0.25, 0.6, 1.5]\times n_{b,\text{max}}$ where $n_{b,\text{max}}$ satisfies $|\epsilon_{xy}|\frac{1}{k_{\perp} L_n} = 1$. Qualitatively, the green point signifies a filament that is validly treated with ray-tracing since $|\epsilon_{xy}|\frac{1}{k_{\perp} L_n} \approx \frac{n_b}{n_{b,\text{max}}} = 0.1 < 1$. The yellow points are marginally valid, since $\frac{n_b}{n_{b,\text{max}}} < 1$ but also $\mathcal{O}(1)$. The red point, for which $\frac{n_b}{n_{b,\text{max}}} > 1$, certainly cannot be treated using ray-tracing. \begin{figure}[!h] \centering \includegraphics[scale=0.6]{4_rayTracingValidity.png} \caption[font=5]{Ray-tracing validity for Gaussian filaments as a function of relative density ($n_b/n_0$) and radial width ($a_b$). Black line denotes validity limit at $n_0 = 1 \times 10^{19} \text{m}^{-3}$ (see \hyperref[sec:7.2]{Section 7.2} for more detail). Stars denote filaments that are used in scattering studies in Figures \ref{fig:5} and \ref{fig:6}. Numbers in color denote the ratio $n_b/n_{b,\text{max}}$.} \label{fig:4} \end{figure} Figure \ref{fig:5} plots the ray-trajectories of LH rays incident from the left and interacting with a filament. As $n_b/n_0$ increases, rays are more strongly refracted, resulting in a shadowing effect downstream of the filament. Notably, these ray-trajectories are always perfectly symmetric with respect to y=0. \begin{figure}[!h] \centering \includegraphics[scale=0.7]{5_rayTracingAsymmetry.png} \caption[font=5]{Ray-tracing simulations of LH waves scattering from a filament. f=4.6$\,$GHz, $N_{||}=2$, $\text{B}=4\,\text{T}$, and $n_0 = 1 \times 10^{19} \text{m}^{-3}$. Each subplot corresponds to a star on Figure \ref{fig:4}. Blue lines denote ray trajectories.} \label{fig:5} \end{figure} In contrast, Figure \ref{fig:6} plots $\sigma (\theta)$ calculated using the SAS method for the same four cases simulated in Figure \ref{fig:5}. The SAS method (like all full-wave treatments) implicitly accounts for all terms in eq. (26). For $n_b/n_0=1.24$ and 1.6, $\sigma (\theta)$ is symmetric about $\theta = 0$. The profiles peak at $\theta =0$, signifying predominantly forward-scatter. At $n_b/n_0=2.44$, $\sigma (\theta)$ is slightly asymmetric because the side-lobe at $-40^{o}$ is larger than the one at $+40^{o}$. At $n_b/n_0=4.6$, $\sigma (\theta)$ is clearly asymmetric. Notably, the largest lobe is centered at $+5^{o}$. While a direct quantitative comparison between Figure \ref{fig:5} and \ref{fig:6} is not possible, it is clear that as $|\epsilon_{xy}|\frac{1}{k_{\perp} L}$ grows (filaments get denser), ray-tracing becomes less accurate because the increasingly important asymmetric scattering effect is ignored. It is important to note that filaments with $n_b/n_0 \gtrsim 2$ are common in the SOL\cite{zweben2002edge}, which signifies ray-tracing is inadequate for the treatment of LH wave scattering in realistic SOL turbulence. \begin{figure}[h!] \centering \includegraphics[scale=0.7]{6_fullWaveAsymmetry.png} \caption[font=5]{Polar plots of differential scattering-width $\sigma (\theta)$ calculated using the SAS method. Simulation parameters are same as in Figure \ref{fig:5}.} \label{fig:6} \end{figure} \subsection{Modified wave-spectrum in front of LH antenna} \label{sec:7.3} The incident wave parameters, background plasma parameters, and joint-PDF of filament parameters determine $\sigma_{\text{eff}}(\theta)$. The Markov Chain (MC) method is used to compute the modified wave-spectrum after the incident wave interacts with a slab layer of thickness $L_{x}$ and packing fraction $f_p$. Figure \ref{fig:9} plots the modified wave-spectrums resulting from the $\sigma_{\text{eff}}(\theta)$ shown in Figure \ref{fig:8}. $L_{x} = 2.5\,$cm, which is the typical gap between the LH antenna and the separatrix in C-Mod. Green, black, and red lines denote $f_p=[0.1,0.25,0.5]$. Note that the ballistic power fraction is not plotted (if it were, it would be a Dirac-delta plotted at $\theta = 0$). In the low-density ($n_0 = 0.55 \times 10^{19} \text{m}^{-3}$) case, the modified wave-spectrum is smoothly broadened in $\theta$-space, with a peak centered at $\theta = 0$. Increase in $f_p$ leads to a decrease in ballistic power, and increase in reflected power. This is expected, since $\Sigma_{\text{eff}}$, the inverse mean-free-path to scatter, is linearly proportional to $f_p$. In the high-density ($n_0 = 4.8 \times 10^{19} \text{m}^{-3}$) case, the modified wave-spectrum is significantly asymmetric, with net power scattered in the +$\theta$-direction. Naturally, this is the result of $\sigma_{\text{eff}}(\theta)$ in the high-density case being very asymmetric. Again, ballistic power decreases and reflected power increases with $f_p$. In comparing the low and high-density cases, it is found that the high-density case results in significantly greater reflected power. This is due to $\sigma_{\text{eff}}$ being larger in the high-density cases, as can be seen by inspecting Figure \ref{fig:8}. \begin{figure}[!h] \centering \includegraphics[scale=0.6]{9_AMCScan.png} \caption[font=5]{Modified LH wave-spectrum after interacting with turbulent slab. $|\theta| < \pi /2$ denotes transmitted power. $|\theta| > \pi /2$ denotes reflected power. Ballistic power not plotted. $f_p = $ 0.1 (green), 0.25 (black), 0.5 (red). Left and right plots assume low and high background density, respectively. $F_{\text{bal}}$, $F_{\text{T}}$, $F_{\text{R}}$ denote fractional ballistic, transmitted, and reflected power, respectively. $\sigma_{\text{eff}}(\theta)$ used is shown in Figure \ref{fig:8}.} \label{fig:9} \end{figure} \subsection{SAS-MC compared with ray-tracing} \label{sec:7.4} A comparison study between the SAS-MC model and ray-tracing model is conducted. Rays are launched in a slab geometry, and are incident normal to a slab comprised of randomly generated filaments (see \hyperref[sec:6.2]{Section 6.2}). A ray terminates when it leaves the slab (either reflected backward or transmitted forward), at which point the angle between the ray's perpendicular group velocity ($\bold{v}_{gr_{\perp}}$) and $\hat{e}_x$ is tallied. This poloidal angle is the direction that the ray continues to propagate and radiate power away from the slab. It is therefore equivalent to $\theta$ in the SAS-MC model. Following multiple ray launches, a histogram of these tallies is constructed. This histogram, once properly normalized, is equivalent to a modified wave-spectrum that can be compared with the wave-spectrum computed with the SAS-MC model. Figure \ref{fig:10} plots modified wave-spectrums computed using the SAS-MC model and the ray-tracing model for statistically identical turbulent slabs. Three different cases are ran. All cases assume LH rays incident at 4.6GHz and $N_{||}=2$. $\text{B}=4\,\text{T}$ and $L_x=2.5\,$cm. In the first case, $n_0 = 1 \times 10^{19}\,\text{m}^{-3}$, and the joint-PDF in Figure \ref{fig:7} is assumed. The SAS-MC model and ray-tracing model show good agreement in wave-spectrum. Both predict low reflected power fractions. The wave-spectrum computed with the SAS-MC model is fairly symmetric. This means that asymmetric scatter was weak, and therefore the ray-tracing approximation was valid. Thus, the good agreement between the two models. In the next case, $\langle a_b \rangle$ is halved to 0.5 cm. The SAS-MC model results in an asymmetric wave-spectrum, such that the peak is shifted to +0.2rad. The onset of significant asymmetric scattering is caused the decrease in $L_{n}$. At the same time, the ray-tracing approximation begins to break down. As a result, the ray-tracing results (which are symmetric) begin to deviate from the SAS-MC results. Notably, the ray-tracing model severely under-predicts the fraction of reflected power compared to the SAS-MC model. The last case increases background density to $n_0 = 4.8 \times 10^{19}\,\text{m}^{-3}$. Now, $\epsilon_{xy}$ is large enough that asymmetric scattering is quite strong and the ray-tracing approximation is surely invalid. As a result, the two models result in very different wave-spectrums. Ray-tracing predicts a scattered wave-spectrum with a large central peak between $\pm 0.2\,$rad. In contrast, the SAS-MC model predicts a smaller central peak slightly shifted in the +$\theta$-direction. The tail to the right of this peak is significantly larger than the one on the left. Lastly, SAS-MC model results in $\sim$50\% more power being reflected than the ray-tracing model. \begin{figure}[!h] \centering \includegraphics[width=17cm, height=5cm]{10_AMCVersusRayTracing.png} \caption[font=5]{Comparison between SAS-MC and ray-tracing slab model. Blue bars denote histogram of ray $\bold{v}_{gr_{\perp}}$ angle after leaving slab. Red line denotes modified wave-spectrum $P_{sct} (\theta)$ calculated using SAS-MC method. $L_x = 2.5\,$cm. $f_p = 0.25$. Filament joint-PDF parameters are same as in Figure \ref{fig:7} unless otherwise noted in subplot title. $F_{\text{ref}}$ denotes fractional power reflected in (blue) ray-tracing and (red) SAS-MC model. Ballistic power and un-scattered rays are not plotted.} \label{fig:10} \end{figure} \section{Impact of scattering on LHCD} \label{sec:8} In typical ray-tracing/Fokker-Planck simulations, the initial perpendicular group-velocity $\bold{v}_{gr\perp}\equiv \partial \omega /\partial \bold{k}_{\perp}$ is assumed co-parallel with the unit vector normal to the flux surface ($\hat{e}_{\nabla \psi}$). Therefore, the angle between these two vectors, $\chi \equiv \angle (\bold{v}_{gr\perp}, \hat{e}_{\nabla \psi})$, is usually zero. Scattering caused by edge density fluctuations can rotate $\bold{v}_{gr\perp}$ leading to a broadened wave-spectrum in $\chi$-space, as evidenced by LH electric field vector measurements in C-Mod \cite{martin2019experimental}. This rotation can modify the ray-path so that single-pass damping is strengthen or weakened, depending on the sign of $\chi$ \cite{baek2020role}. The $\chi$ angle in the tokamak frame and $\theta$ in the slab geometry (as defined in Figure \ref{fig:1}) are identical. However, the orientation of $\chi$ (i.e. whether positive $\chi$ points upwards or downwards in the tokamak frame) depends on the sign of $N_{||}$, and the orientation of toroidal magnetic field and current in the tokamak. Given that $N_{||}$ must always be directed opposite to the plasma current (in order to drive co-current via electron Landau damping), it is found that $\chi$ (or equivalently $\theta$) must be oriented such that $\chi > 0$ rotates the ray trajectory away from the core. Conversely, $\chi < 0$ rotates the ray towards the core. This is true in all tokamak orientations. Thus, the transmitted wave-spectrum calculated using the SAS-MC model can be coupled to GENRAY/CQL3D to study its impact on LHCD. A well-studied \cite{mumgaard2015lower}, low-density, L-mode discharge is modeled. This upper single-null discharge, with $\overline{n}_e = 0.52 \times 10^{20}\,\text{m}^{-3}$, $I_p = 530\,\textrm{kA}$, and $\text{B}=5.4\,$T, achieves non-inductive current drive using 850$\,$kW of LH power launched at 4.6$\,$GHz with $N_{||} = -1.6$. ($\overline{n}_e$ is line-averaged electron density and $I_p$ is plasma current.) It is assumed that $85\%$ of power is coupled to the primary lobe. In GENRAY, this primary lobe is centered at $N_{||}=-1.6$, and is discretized into 12 bins in $N_{||}$-space. Each bin is further discretized into 23 rays to model wave-spectrum broadening in $\chi$-space. Figure \ref{fig:12} plots the SAS-MC calculated transmitted wave-spectrum assuming SOL background density $n_0 = 1 \times 10^{19}\,\text{m}^{-3}$, SOL width $L_x = 2.5\,$cm, and packing fraction $f_{p}=0.25$. Filament joint-PDF is the same as in Figure \ref{fig:7}. The spike at $\chi$=0 accounts for ballistic power. Note that the reflected power, which accounts for roughly $30\%$ of power in the primary lobe, is assumed lost and therefore not modeled in GENRAY. Lastly, the spatial height of the launcher is modeled as 4 poloidal points in the outer mid-plane. In total, 1104 rays are launched to ensure a converged solution. \begin{figure}[!h] \centering \includegraphics[scale=0.4]{12_CMODModifiedWaveSpectrum.png} \caption[font=5]{Modified wave-spectrum launched in GENRAY/CQL3D simulation of LHCD in Alcator C-Mod. Wave-spectrum calculated using SAS-MC model for slow-wave launched at 4.6$\,$GHz and $N_{||}=1.6$. SOL background density $n_0 = 1 \times 10^{19}\,\text{m}^{-3}$, packing-fraction $f_p = 0.25$, and SOL width $L_x = 2.5\,$cm is assumed. Filament joint-PDF parameters are same as in Figure \ref{fig:7}. Crosses show discretization of wave-spectrum into rays for use in GENRAY. Spike at $\chi =0$ is due to ballistic power. Reflected power is ignored.} \label{fig:12} \end{figure} The rays are launched from the separatrix, but are allowed to propagate into the SOL after first-pass. Here, the rays will either reflect at the cutoff density or specularly reflect from the vessel wall back towards the core. Due to low temperatures in the SOL, collisional damping in non-negligible. It is found that the SOL topology and presence of a divertor can significantly affect the calculated core CD profiles. Therefore, the two-point model is used to accurately generate the SOL\cite{shiraiwa2015impact}. Once the proper SOL geometry is set, parameters like SOL e-folding width and divertor temperature do not strongly affect core CD results for cases with the $\chi$-broadened wave-spectrum. Figure \ref{fig:13} plots the calculated core power deposition and CD profile in this C-Mod discharge. The core density is scaled $\pm 10 \%$ to assess the sensitivity of these results. The top figures, for which the launched wave-spectrum was not broadened in $\chi$-space, reveal core profiles that are robustly peaked at $\rho \approx 0.8$. A smaller peak exists on-axis, though it shifts to $\rho \approx 0.25$ when the background density is decreased $-10\%$. A robust current valley exists at $\rho \approx 0.5$. The bottom plots model a launched wave-spectrum that is $\chi$-broadened. These profiles are remarkably different from the cases without broadening. There is a $65\%$ increase in power deposited near-axis ($\rho < 0.5$), leading to profiles that are robustly peaked on-axis. There are also no large off-axis peaks. \begin{figure}[!h] \centering \includegraphics[scale=0.8]{13_CMODCorePowerAndCurrent.png} \caption[font=5]{Core LH power deposition and driven current density profiles in C-Mod L-mode discharge \#1101104011 at t=1.10s, modeled with GENRAY/CQL3D. $\overline{n_e} = 0.52\times 10^{20} \,\text{m}^{-3}$, $I_p = 530\,\text{kA}$, and $\text{B}=5.4\,$T. 850$\,$kW of LH power launched at 4.6$\,$GHz and $N_{||}=1.6$. (Top) simulations with no wave-spectrum broadening. (Bottom) simulations with broadened angular wave-spectrum shown in Figure \ref{fig:12}. Green, black, red lines denote core background density is scaled x0.9, x1.0, x1.1 the nominal value, respectively.} \label{fig:13} \end{figure} Figure \ref{fig:14} plots the cumulative CD profile. The $\chi$-broadened cases result in roughly linear profiles and greater current driven near-axis. In contrast, the cases without broadening result in CD preferentially in the off-axis ($\rho > 0.7$) region. The total LH current is $10-20\%$ lower in the broadened cases. This is partly due to $\sim\!30\%$ of incident power being reflected in the SAS-MC model, and therefore not being launched in GENRAY for the $\chi$-broadened cases. \begin{figure}[!h] \centering \includegraphics[scale=0.6]{14_CMODCumulativeCurrent.png} \caption[font=5]{Cumulative core LH current driven, modeled in GENRAY/CQL3D. Simulation parameters same as in Figure \ref{fig:13}.} \label{fig:14} \end{figure} Figure \ref{fig:15} plots the ray-trajectories during first-pass. Ray color denotes the logarithmic power in the ray, normalized to initial power in the highest-powered ray. In the case with no broadening, rays cannot propagate to the hot magnetic axis, and therefore cannot Landau damp strongly. In contrast, $\chi$-broadening ``fans'' out the initial ray trajectories. Notably, rays that are sufficiently rotated inwards ($\chi < 0$) strongly Landau damp in the hot near-axis plasma. Even though this is a small fraction of the incident power, it is sufficient to seed a supra-thermal electron tail near-axis. As a result, additional rays can quasi-linearly damp on this tail on subsequent passes through the core. In the case without broadening, there is insufficient on-axis power for this seeding effect. As a result, on-axis current drive is relatively low. \begin{figure}[!h] \centering \includegraphics[scale=0.7]{15_CMODRayTrajectories.png} \caption[font=5]{Poloidal projection of first-pass ray-trajectories in C-Mod discharge. Simulation parameters are the same as in Figure \ref{fig:13} for x1.0 scaled density case. Colored lines denote ray-trajectories. The color of lines denote $\text{log}_{10}$ power in ray, normalized to initial power in highest-power ray. Gray patch denotes core region ($\rho < 1$). Green patch denotes near-axis region ($\rho < 0.2$).} \label{fig:15} \end{figure} Note that the modified wave-spectrum has a net effect of deflecting power away from the core on first pass. Paradoxically, near-axis CD increases. Again, this is attributed to the small fraction of power deflected inwards that seeds a near-axis supra-thermal electron tail. It is possible this phenomenon does not extend to high-density discharges, where stronger asymmetric scattering will deflect a greater fraction of power outwards. \section{Conclusion} \label{sec:9} A hybrid Semi-Analytic Scattering Markov chain (SAS-MC) model is formulated to calculate the modified wave-spectrum of an RF wave propagating through a turbulent SOL. First, a semi-analytic full-wave technique is adopted to calculate the scattered power from a SOL filament. This technique is generalized to account for filaments with radially-varying densities. Next, an effective differential scattering-width is derived for a statistical ensemble of filaments. Lastly, the SOL is modeled as a slab, and the modified wave-spectrum is found by solving the radiative transfer equation using a Markov chain technique. This model is applied to the case of Lower Hybrid launch for driving current in a tokamak. GENRAY/CQL3D is used to model the impact of the modified wave-spectrum on current drive in Alcator C-Mod. In calculating the differential scattering-width, it is found that the scattered power can be asymmetrically directed (in the y-direction). This is true even for the effective scattering-width, which averages over the statistical properties of filaments. Previous RF scattering models have either used the drift-wave approximation and/or the ray-tracing approximation. As a result, they fail to account for this important asymmetric effect. The SAS-MC model is compared to the ray-tracing treatment of LH wave scattering. By retaining full-wave effects, the SAS-MC model is able to produce a significantly asymmetric transmitted wave-spectrum. As stated previously, ray-tracing cannot replicate this effect. The SAS-MC model is compared to PETRA-M, which self-consistently models full-wave interactions in the presence of multiple filaments. Both models predict $F_{\text{ref}}$ increases with $\langle n_b/n_0 \rangle$, $\langle a_b \rangle^{-1}$, and $L_{x}$, as do previous analytic scattering models. Assuming a low background density, and realistic SOL packing-fraction and width, the two models agree in the calculated $F_{\text{ref}}$. As packing-fraction rises, the SAS-MC model increasingly over-predicts $F_{\text{ref}}$, which suggests this is a result of the far-field approximation breaking down. Nevertheless, the SAS-MC model retains full-wave effects for scattering from a single filament, and is therefore a significant improvement over previous reduced models for scattering. A modified wave-spectrum is calculated for LH launch in a low-$\bar{n}_{e}$ Alcator C-Mod discharge. Roughly $30\%$ of launched power is reflected back into the SOL. The transmitted wave-spectrum is coupled to GENRAY/CQL3D, resulting in a significantly altered core CD profile. Notably, the on-axis current is increased, and off-axis peaks are greatly mitigated. This is attributed to a portion of the modified wave-spectrum that is rotated such that it damps on-axis during first-pass. This seeds a supra-thermal electron population on which rays preferentially Landau damp during subsequent passes through the core. The result is a CD profile that better matches experimental measurements in low-$\bar{n}_{e}$ discharges\cite{mumgaard2015lower}, which robustly feature monotonic profiles that peak on-axis. The asymmetric scattering effect is stronger at high SOL densities, and result in a significant net deflection of launched LH power away from the core. This may induce greater parasitic losses in the edge, either through collisional damping or PDI. This warrants the investigation of asymmetric scattering as a possible explanation to the LHCD density limit \cite{wallace2010absorption}. Lastly, it should be noted that the SAS-MC model is not limited to the LH frequency range. For example, this model is well-suited for the study of wave-spectrum broadening of the electron-cyclotron wave in the tokamak SOL. The relatively larger $k_{\perp}$ of the electron-cyclotron wave means the $k_{\perp}d\gg1$ criterion for the far-field approximation is more strongly satisfied than in the case of LH waves. \newpage \begin{appendix} \addcontentsline{toc}{section}{Appendices} \section*{Appendices} \setcounter{equation}{0} \renewcommand{\theequation}{A.\arabic{equation} \renewcommand{\thesubsection}{} \subsection{Appendix A: Electric field in cylindrical coordinates} \label{sec:A1} The incident plane-wave is assumed to be have a wave-vector $\bold{k} = k_{\perp}\hat{e}_{x} + k_{||}\hat{e}_{z}$. Given the background is homogeneous, the incident wave solution is \begin{equation} \bold{E}_{0} = (\xi_{0x}\hat{e}_{x}+\xi_{0y}\hat{e}_{y}+\xi_{0z}\hat{e}_{z})e^{i (k_{\perp}x + k_{||}z-\omega t)} \end{equation} $\bar{\xi}_0 = \{\xi_{0x},\xi_{0y},\xi_{0z}\}$ is the wave polarization. It can be evaluated by finding the null-space of the dispersion tensor for the given frequency and incident wave-vector. The following transformation to cylindrical coordinates is used: \begin{subequations} \begin{align} \hat{e}_x & = \hat{e}_{\rho}\cos{\theta} - \hat{e}_{\theta}\sin{\theta}\\ \hat{e}_y & = \hat{e}_{\rho}\sin{\theta} + \hat{e}_{\theta}\cos{\theta}\\ \hat{e}_z & = \hat{e}_z \end{align} \end{subequations} to yield \begin{equation} \bold{E}_{0} = \left[\hat{e}_{\rho}(\xi_{0x}\cos{\theta}+\xi_{0y}\sin{\theta}) +\hat{e}_{\theta}(-\xi_{0x}\sin{\theta}+\xi_{0y}\cos{\theta})+\hat{e}_{z}\xi_{0z}\right]e^{i (k_{\perp}x + k_{||}z-\omega t)} \end{equation} Next, eq. (A.3) and the Jacobi-Anger identity are employed to cast the incident wave as a series solution in cylindrical coordinates. This results in eqs. (1) and (2). Equation (1) can be generalized to the non-incident waves for the following reason. The plane-wave $\bold{E}_0$, as formulated in eq. (1), is the known solution to this equation if the correct values of $k_{\perp}$ and $\bar{\xi}_0$ are used. In addition, each poloidal mode-number term in the series is a solution to the wave equation. It therefore follows that eqs. (1) can describe all other waves ($j \neq 0$) given the appropriate coefficients $E_{jm}$ are found. \subsection{Appendix B: ``Flat top'' filament system of equations} \label{sec:A2} A system of equations must be formulated to find $E_{jm}$ for $j=1,...,4$. $j=0$ denotes the incident wave. $j=1,2$ denote the slow, fast waves in the filament. $j=3,4$ denote the slow, fast scattered waves outside the filament. Assuming no free charge or current on the cylinder edge, the following boundary conditions are imposed: \begin{subequations} \begin{align} \hat{e}_{\rho} \cdot (\bold{D}_{0}+\bold{D}_{1}+\bold{D}_{2})|_{\rho = a_{b}} & = \hat{e}_{\rho} \cdot (\bold{D}_{3}+\bold{D}_{4})|_{\rho = a_{b}} \\ \hat{e}_{\rho} \cdot (\bold{B}_{0}+\bold{B}_{1}+\bold{B}_{2})|_{\rho = a_{b}} & = \hat{e}_{\rho} \cdot (\bold{B}_{3}+\bold{B}_{4})|_{\rho = a_{b}} \\ \hat{e}_{\rho} \cross (\bold{E}_{0}+\bold{E}_{1}+\bold{E}_{2})|_{\rho = a_{b}} & = \hat{e}_{\rho} \cross (\bold{E}_{3}+\bold{E}_{4})|_{\rho = a_{b}} \\ \hat{e}_{\rho} \cross (\bold{B}_{0}+\bold{B}_{1}+\bold{B}_{2})|_{\rho = a_{b}} & = \hat{e}_{\rho} \cross (\bold{B}_{3}+\bold{B}_{4})|_{\rho = a_{b}} \end{align} \end{subequations} where $\bold{D}_{j}$ is the electric displacement field of wave $j$. Equations (A.4) provide six constraints, but only four are independent. Myra and D'Ippolito (2010) \cite{myra2010scattering} employ eqs. (A.4a,c) and require $B_{z}$ to be continuous at the boundary. This paper follows this prescription. The field solution have the poloidal dependence $e^{i m \theta}$. These exponential terms are orthogonal, and therefore the $m$-th terms must independently satisfy the boundary conditions. The following quantities are introduced: \begin{subequations} \begin{align} \mathcal{D}_{jm} & = \epsilon_{\perp} W_{j\rho m} - i \epsilon_{xy} W_{j\theta m}\\ M_{jm} & = \xi_{jy}\left(k_{j \perp} J_{m}^{''} + \frac{1}{\rho}J_{m}^{'}-\frac{m^2}{k_{j \perp} \rho^{2}}J_{m}\right) \end{align} \end{subequations} where $\epsilon_{\perp}$ and $\epsilon_{xy}$ are components of the dielectric tensor in the Stix frame\cite{stix1992waves}. The argument of $J_{m}(k_{j \perp} \rho)$ has been suppressed. Again, $J$ must be replaced with the appropriate type of Bessel/Hankel function for the wave. $E_{j}\mathcal{D}_{jm}$ is proportional to $\bold{D}_{jm}\cdot \hat{e}_{\rho}$. $E_{j}M_{jm}$ is proportional to $\bold{B}_{jm}\cdot \hat{e}_{z}$. Equations (A.4) and (A.5) are used to formulate the following linear system of equations: \begin{equation} \begin{bmatrix} W_{1\theta m} & W_{2\theta m} & -W_{3\theta m} &-W_{4\theta m}\\ M_{1m} & M_{2 m} & -M_{3m} &-M_{4m}\\ \mathcal{D}_{1m} & \mathcal{D}_{2 m} & -\mathcal{D}_{3m} &-\mathcal{D}_{4m}\\ W_{1z m} & W_{2z m} & -W_{3z m} &-W_{4z m}\\ \end{bmatrix} \cdot \begin{bmatrix} E_{1m}\\ E_{2m}\\ E_{3m}\\ E_{4m} \end{bmatrix} = -E_{0m} \begin{bmatrix} W_{0\theta m}\\ M_{0m}\\ \mathcal{D}_{0m}\\ W_{0zm} \end{bmatrix} \end{equation} which is evaluated at $\rho = a_b$. The only unknown is the column vector on the LHS. It is solved for by inverting the 4x4 matrix. This process is repeated for each poloidal mode-number. \subsection{Appendix C: Radially in-homogeneous filament system of equations} \label{sec:A3} In general, there are $4(R+1)$ unknown wave coefficients and $4(R+1)$ independent boundary equations, making this problem solvable for any $R$. For convenience, the wave indices are reordered. Waves $j=0,1$ denote the slow, fast wave (respectively) in the inner-most ($r=0$) bin. Waves $j=4r-2,...,4r+1$ are the slow $H_{m}^1$, slow $H_{m}^2$, fast $H_{m}^1$, and fast $H_{m}^2$ contributions (respectively) in bin $r>0$. Waves $j=4R+2,4R+3$ are the slow, fast scattered waves outside the cylinder. Lastly, wave $j=4R+4$ is the incident wave. The first four matching relations (with the $m$ subscript suppressed) are: \begin{equation} \begin{bmatrix} -W_{0\theta} & -W_{1\theta} &W_{2\theta} & W_{3\theta}& W_{4\theta} &W_{5\theta}\\ -M_{0} & -M_{1}& M_{2} & M_{3} &M_{4} &M_{5}\\ -\mathcal{D}_{0} & -\mathcal{D}_{1}& \mathcal{D}_{2} & \mathcal{D}_{3} &\mathcal{D}_{4} &\mathcal{D}_{5}\\ -W_{0z} & -W_{1z} &W_{2z} & W_{3z}& W_{4z} &W_{5z} \end{bmatrix} \cdot \begin{bmatrix} E_{0}\\ E_{1}\\ E_{2}\\ E_{3}\\ E_{4}\\ E_{5} \end{bmatrix} = 0 \end{equation} They are evaluated at $\rho = \rho_{0}$ where $\rho_{0}$ is the radius of the inner-most bin $r=0$. The ``intermediate'' relations are: \begin{equation} \small \begin{bmatrix} -W_{ (4r-2) \theta} & -W_{(4r-1)\theta} &-W_{(4r)\theta} & -W_{(4r+1)\theta}& W_{(4r+2)\theta} &W_{(4r+3)\theta} & W_{(4r+4)\theta} &W_{(4r+5)\theta}\\ -M_{(4r-2)} & -M_{(4r-1)}& -M_{(4r)} & -M_{(4r+1)} &M_{(4r+2)} &M_{(4r+3)}&M_{(4r+4)} &M_{(4r+5)}\\ -\mathcal{D}_{(4r-2)} & -\mathcal{D}_{(4r-1)}& -\mathcal{D}_{(4r)} & -\mathcal{D}_{(4r+1)} &\mathcal{D}_{(4r+2)} &\mathcal{D}_{(4r+3)}&\mathcal{D}_{(4r+4)} &\mathcal{D}_{(4r+5)}\\ -W_{ (4r-2) z} & -W_{(4r-1)z} &-W_{(4r)z} & -W_{(4r+1)z}& W_{(4r+2)z} &W_{(4r+3)z}& W_{(4r+4)z} &W_{(4r+5)z} \end{bmatrix} \cdot \begin{bmatrix} E_{(4r-2)}\\ E_{(4r-1)}\\ E_{(4r)}\\ E_{(4r+1)}\\ E_{(4r+2)}\\ E_{(4r+3)}\\ E_{(4r+4)}\\ E_{(4r+5)} \end{bmatrix} = 0 \end{equation} and are evaluated at $\rho = \rho_{r}$ for $0<r<R$. The outer-most relations are: \begin{equation} \small \begin{bmatrix} -W_{ (4R-2) \theta} & -W_{(4R-1)\theta} &-W_{(4R)\theta} & -W_{(4R+1)\theta}& W_{(4R+2)\theta} &W_{(4R+3)\theta}\\ -M_{(4R-2)} & -M_{(4R-1)}& -M_{(4R)} & -M_{(4R+1)} &M_{(4R+2)} &M_{(4R+3)}\\ -\mathcal{D}_{(4R-2)} & -\mathcal{D}_{(4R-1)}& -\mathcal{D}_{(4R)} & -\mathcal{D}_{(4R+1)} &\mathcal{D}_{(4R+2)} &\mathcal{D}_{(4R+3)}\\ -W_{ (4R-2) z} & -W_{(4R-1)z} &-W_{(4R)z} & -W_{(4R+1)z}& W_{(4R+2)z} &W_{(4R+3)z} \end{bmatrix} \cdot \begin{bmatrix} E_{(4R-2)}\\ E_{(4R-1)}\\ E_{(4R)}\\ E_{(4R+1)}\\ E_{(4R+2)}\\ E_{(4R+3)} \end{bmatrix} = -E_{ (4R+4) } \begin{bmatrix} W_{(4R+4)\theta}\\ M_{(4R+4)}\\ \mathcal{D}_{(4R+4)}\\ W_{(4R+4)z} \end{bmatrix} \end{equation} evaluated at $\rho = \rho_{R} = a_b$. \subsection{Appendix D: Derivation of scattering-width} \label{sec:A4} First, derive the ratio of the power scattered to the power incident: $\frac{P_{sct}}{P_{inc}}$. The power is $P = \int d\bold{a}\cdot \bold{S}$, where $\bold{S}$ is the time-averaged Poynting flux and $\bold{a}$ is the cross-sectional area of interest. Consider the incident power through the cross-sectional area of dimensions $L_z$ and $L_y$ on the yz- plane. \begin{equation} P_{inc,x} = S_{inc,x}L_y L_z \end{equation} The equation above is straight-forward since $S_{inc,x}$ is assumed constant. The scattered power radiating away from cylinder is: \begin{equation} P_{sct,\rho}(\rho) = \rho L_z \int_{-\pi}^{+\pi} S_{sct,\rho}(\rho,\theta)d\theta \end{equation} Only the far-field radiation is considered (and therefore multi-pole effects near the cylinder are neglected). In this case: \begin{equation} P_{sct,\rho}|_{\textrm{far-field}} = \textrm{lim}_{\rho \rightarrow \infty} \rho L_z \int_{-\pi}^{+\pi} S_{sct,\rho}(\rho,\theta)d\theta \end{equation} In general, the far-field radial scattered power $P_{sct,\rho}|_{\textrm{far-field}}$ converges to a non-zero value because $S_{sct,\rho}(\rho,\theta)\propto 1/\rho$ for large $\rho$. From now on, $P_{sct,\rho}$ is taken to mean $P_{sct,\rho}|_{\textrm{far-field}}$. Next, define the scattering-width, $\sigma$: \begin{equation} \sigma \equiv \frac{P_{sct} L_{y}}{P_{inc}} = \frac{\textrm{lim}_{\rho \rightarrow \infty} \rho \int_{-\pi}^{+\pi} S_{sct,\rho}(\rho,\theta)d\theta }{S_{inc,x}} \end{equation} which has the physical meaning of power scattered per cylinder \emph{per} incident power/$L_{y}$ \cite{myra2010scattering}. Clearly, as $L_y$ (the incident beam-width in the y-direction) increases, less power is directly incident on the cylinder. So as $L_{y} \rightarrow \infty$, also $\frac{P_{sct}}{P_{inc}} \rightarrow 0$. In reality, the Lower-Hybrid beam has a finite width, and there are multiple cylinders (SOL filaments) in its path. This allows the cancellation of the $L_{y}$ variable. Suppose a beam of width $L_y$ is traveling through a turbulent layer of width $L_x$. Within that layer are filaments of average radius $a_b$. Assuming the cross-sectional packing fraction $f_{p}$ of filaments in this layer is known, the beam encounters $\frac{f_{p} L_x L_y}{\pi a_b^2}$ filaments on average. This can be used to roughly estimate the fraction of incident power scattered from multiple filaments: \begin{equation} \frac{P_{sct}}{P_{inc}} \approx \frac{f_{p} L_x}{\pi a_b^2} \sigma \end{equation} This is only valid for a \emph{sparse} filament layer, because the effects of an already scattered wave interacting with another filament are ignored. This is properly accounted for in the RTE introduced in \hyperref[sec:5]{Section 5}. \end{appendix} \section*{Acknowledgements} This work was supported by US DoE under contract numbers: DE-SC0018090 supporting the RF-SciDAC 4 project, and DE-SC0014264 supporting PSFC MFE projects. The GENRAY/CQL3D and PETRA-M simulations presented in this paper were performed on the MIT-PSFC partition of the Engaging cluster at the MGHPCC facility (www.mghpcc.org) which was funded by DoE grant number DE-FG02-91-ER54109. \section*{Declaration of interest} The authors report no conflict of interest. \newpage
\section{Introduction} \label{sec:intro} \begin{figure*}[th] \centering \includegraphics[width=\textwidth]{figure/case_hvis.pdf} \caption{A case visualization of human-centric video segmentation under complex real-world scenarios. The three rows are input video, output result, and the two superimposed visualization effects, respectively. The mask color of the output result indicates the identity of the humans. The little girl with the white bounding box has undergone complex scenes such as occluded, overlapped, and reappeared.} \label{fig:teaser} \end{figure*} \IEEEPARstart{H}uman-centric research on tracking, detection, and segmentation has gained significantly increased interest due to its broad application scenarios, such as autonomous driving, intelligent surveillance, human-machine interaction, and mobile entertainment. Such research in the image domain, such as portrait segmentation~\cite{shen2017high,chen2019boundary,shen2016automatic}, person re-identification~\cite{zeng2020illumination,ye2016person,zheng2015scalable}, or pedestrian detection~\cite{qian2019oriented,zhang2018occluded,zhang2020attribute,zhang2020stinet,huang2020nms}, has been well-studied and applied in real-life applications. Its counterpart in the video, however, is an issue that has not been sufficiently addressed. Current studies on video instance segmentation are primarily concentrated on simple multi-category scenes without distinguishing objects of the same categories, \textit{e.g.}, pedestrians in the crowd. Meanwhile, the capability of handling heavily-occluded people is an urgent requirement for practical applications such as autonomous driving. Therefore, in this paper, we propose a novel framework that extends HIIS from the image domain to the video domain, focusing on instance segmentation of multi-humans under complex real-world scenarios. To be specific, our goal is to accurately segment every human in given videos and guarantee a consistent identity for the same person, despite reappearance after several frames. This \textit{human-centric video instance segmentation for complex scenes} (HVIS-CS) is more challenging than some related tasks such as human image instance segmentation (HIIS) \cite{zhang2019pose2seg,bolya2019yolact,lee2020centermask}, multi-object tracking and segmentation (MOTS) \cite{voigtlaender2019mots}, and video instance segmentation (VIS) \cite{perazzi2016benchmark}. Compared to HIIS, it requires instance segmentation on each frame of the video and needs to ensure that the identity consistency of each human, as illustrated in Figure~\ref{fig:teaser}. MOTS extends the basic task of multi-object tracking to the pixel level and uses a more accurate mask to represent the object. Different from MOTS, HVIS-CS segments all humans accurately, whether this human is a pedestrian. MOTS only segments and tracks primary pedestrians in the video, ignoring riders, sitting and standing persons. The VIS task extends image instance segmentation to the video, aiming to simultaneously detect, segment, and track \textit{object} instances in videos. Our HVIS-CS can be taken as a sub-task of the VIS, focusing on distinguishing different \textit{human} instances in complex video scenes. It requires identifying every shown person and ensuring consistency of inter-frame identity under complex scenarios such as overlapping, occlusion, disappearance, and reappearance. \begin{figure*}[th] \centering \includegraphics[width=0.9\textwidth]{figure/pipline_7.pdf} \caption{ The pipeline of the proposed method. Given the current t-frame in a video sequence, we obtain the multi-level features $P_3$, $P_4$, $P_5$, which is represented as $H_0 \times W_0 \times C_0$, $\frac{1}{2} H_0 \times \frac{1}{2} W_0 \times C_0 $, $\frac{1}{4} H_0 \times \frac{1}{4}W_0 \times C_0$, respectively. These features, taking $P_3$ ($H_0 \times W_0$) as an example, are then fed into the head structure composed of two branches to extract the detected targets $(H_0 \times W_0 \times C)$ and the appearance embedding $(H_0 \times W_0 \times 256)$. The detection branch contains two components to estimate classification score $(H_0\times W_0\times 1)$ and regression $(H_0 \times W_0 \times 4)$, respectively. Then we select top $K$ detections and embeddings for identification matching based on the classification scores from the multi-level heads. Finally, we use the embeddings and bounding boxes of the current frame to associate tracks in the previous frame to obtain the identity of the human and update the tracks. } \vspace{-10pt} \label{fig:framework} \end{figure*} Despite good application prospects, the research on HVIS-CS is still relatively scarce. Currently, existing VIS studies mainly use MaskRCNN~\cite{he2017mask} as the basic framework, which first obtains the bounding boxes through MaskRCNN and then extracts the feature of the bounding boxes to complete the trajectory matching. These methods are equivalent to using two separate models to locate the bounding box's position on the image and extract features for each bounding box, then match the bounding box with the existing trajectories based on these features in a video. However, using two networks to extract features separately is not conducive to the real-time performance of video instance segmentation. Therefore, we propose a novel framework called HVISNet for marking humans accurately in videos based on BlendMask~\cite{chen2020blendmask}, a state-of-the-art method for HIIS. We add a new head branch, which is parallel with the detection branch, aiming to extract the appearance embedding of each human instance through the backbone network. The framework can simultaneously obtain embedding for detection and appearance, which contributes to improving inference speed. One-stage detectors generally make dense predictions on the features obtained through the backbone. It classifies the features into positive and negative samples according to specific rules. Positive samples are then classified and regressed. For the classification of positive and negative samples, FCOS~\cite{tian2019fcos} maps the points on the feature map to the original image, and it is considered a positive sample if it falls within ground-truth. FCOSv2 decreases the positive sample region to within $\frac{1}{2}$ stride of the ground-truth (bounding box) center, and the performance is significantly improved. Thus, positive and negative samples have a significant impact on performance. Suppose we use rules in FCOS to classify positive and negative samples in intense overlapping scenes. In that case, the experiment finds that some positive samples belong to both human A and human B. These positive samples are used not only for the acquisition of the human A mask and appearance embedding but also for human B. Such positive samples are ambiguous. Therefore, to alleviate the problem of positive sample ambiguity, we propose inner center sampling to replace the original positive and negative sample classifier to distinguish positive samples of different instances in intense overlapping scenarios. We verify the generalization ability of this plug-and-play mechanism by incorporated it into different instance segmentation methods. Existing datasets for similar tasks either do not exhaustively label all people or only contain simple scenes in the video. A human object is a particular category in the field of computer vision with many application scenarios. Autonomous driving, human monitoring, mobile entertainment applications, and other practical requirements need to segment and track all humans in the video, especially in complex video scenes. In real life, there are always severe occlusions or shifts between human bodies. Therefore, we propose a new benchmark called \textsc{\textbf{H}uman \textbf{V}ideo \textbf{I}nstance \textbf{S}egmentation} (HVIS), which focuses on complex real-world scenarios with sufficient human instance masks and identities. Our dataset contains 805 videos with 1447 detailedly annotated human instances. It also includes various overlapping scenes, which integrates into the most challenging video dataset related to humans. The contributions of our work are three-fold: \begin{itemize} \item We propose a novel framework (HVISNet) for human video instance segmentation based on a one-stage detector, which outperforms the state-of-the-art methods in terms of accuracy and runs over 30fps in inference. \item We propose a new benchmark named HVIS that focuses on complex video scenes with sufficient human instance masks and identities. \item We propose an inner center sampling mechanism to effectively alleviates the problem of positive sample ambiguity in instance segmentation. Besides, such a plug-and-play inner center sampling mechanism shows good generalization ability and can be incorporated in any instance segmentation model based on a one-stage detector to improve human instance segmentation accuracy. \end{itemize} \section{Related Work} \label{sec:related_work} \PARbegin{HIIS.} The typical work of human-centric image instance segmentation is combined with the human pose estimation \cite{papandreou2017towards,papandreou2018personlab}. For example, Pose2Instance \cite{tripathi2017pose2instance} proposes a cascaded network to apply human pose estimation for instance segmentation. Pose2seg~\cite{zhang2019pose2seg} proposes an Affine-Align operation for selecting ROIs based on pose instead of bounding-boxes. It concatenates the human pose skeleton feature to the image feature in the network to further improve the performance. The aforementioned methods depend on pose estimation performance, and the speed is much lower than general instance segmentation. The general image instance segmentation methods~\cite{tian2020conditional,xie2020polarmask} based on a one-stage detector also have good performance in the category of the human on the COCO dataset~\cite{lin2014microsoft}. Similar to HIIS, HVIS-CS needs to segment the human instance in every frame but also requires consistent identities for different persons across frames. \PARbegin{MOTS.} MOTS performs multi-target tracking and segmentation simultaneously. TrackR-CNN~\cite{voigtlaender2019mots} adds an association head generating correlation vectors on the MaskRCNN~\cite{he2017mask} and uses the video timing information through 3D convolution. PointTrack~\cite{xu2020segment,xu2020pointtrack++} proposes an efficient segmentation-based instance embedding method, which generates a novel point-by-point tracking paradigm by converting the compact image. The MOTS task only tracks the cars and the pedestrians in video and treats the cyclists, riders, and standing humans as the background without processing. It is inconsistent with practical applications. HVIS-CS corrects this problem of MOTS by segmenting and tracking anyone who appears in the video. \PARbegin{VIS.} VIS is a newly proposed task that enables simultaneous detection, segmentation, and tracking object instances in videos. For example, MaskTrack~\cite{yang2019video} adds a tracking branch to MaskRCNN, used to assign the identity of each instance. Lin~\textit{et.al.}~\cite{lin2020video} propose a modified VAE built on top of MaskRCNN for instance-level video segmentation and tracking. STEm-Seg~\cite{athar2020stem} is a bottom-up method for clustering each instance pixel and introduce timing information through 3D convolution. These methods aim to segment forty categories of objects into video instances, and the scenes are relatively simple. When objects of different categories are matched between frames, the tracking is completed using classified features, but the inter-frame matching between different instances of the same category is ignored. Differently, our HVIS-CS task focuses on how to represent each instance in complex video scenes with a high-quality pixel mask. \begin{figure*}[!ht] \centering \vspace{-2mm} \begin{tabular}{ccccc} \hspace{-3.2mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/ori_1.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/bbox_3.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/mask_2.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/inner_4.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/all_2.png} \\ \hspace{-3.2mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/ori_2.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/bbox_4.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/mask_3.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/inner_5.png} & \hspace{-6mm} \includegraphics[width=0.195\linewidth]{figure/figure_points/all_3.png} \\ (a) Original image & (b) Center of bbox & (c) Centroid of mask & (d) Inner center & (e) Center points \end{tabular} \vspace{-2mm} VIS is a newly proposed task that enables \caption{Comparison of different sampling centers. The two rows represent different frames in a video, with five columns representing the original image (a), center of the bounding box (b), centroid of the mask (c), our proposed inner center (d), and representation of all centers (e). The green points denote the center of the bounding box, blue points denote the centroid of the mask, and red points denote the inner center.} \vspace{-12pt} \label{fig:point} \end{figure*} \section{HVISNet Framework} \label{sec:method} Our goal is to mark every human in complex video scenes accurately. To be specific, given a video sequence $F=\left\{ f_1,f_2,\ldots,f_i,...,f_n \right\}$, we obtain the accurate mask and appearance feature in each frame image $f_i$, then we associate the appearance feature with the previous frame $\{f_k\}_{k=1}^{i-1}$ to achieve the human identification in the video. The proposed overall framework named HVISNet is shown in Figure~\ref{fig:framework}, which is built upon one-stage detector FCOS~\cite{tian2019fcos}. We add an identification branch upon the backbone network, which is parallel to the detection branch. The identification branch is used for extracting the appearance embedding of each instance. As for the segmentation task, we follow the \textit{top-down meets bottom-up} structure proposed in BlendMask~\cite{chen2020blendmask} and retain the bottom module and blender. For the problem of ambiguous positive samples in the training process, we have explored the impact of positive samples on instance segmentation and propose the inner center sampling strategy to alleviate the ambiguous positive samples problem. Furthermore, we construct the match module to associate the appearance embedding obtained from different frames in a video. More details are covered in the following sections. \subsection{Identification Branch} \label{subsec:method_identification} As illustrated in Figure~\ref{fig:framework}, the multi-level backbone feature maps are extracted from each frame image with a resolution of $H \times W $, and represented as $P_3$ ($H_0 \times W_0 \times C_0$), $P_4$ ($\frac{1}{2} H_0 \times \frac{1}{2} W_0 \times C_0 $), and $P_5$ ($\frac{1}{4} H_0 \times \frac{1}{4}W_0 \times C_0 $) respectively, where $C_0$ is the number of channels. And the multi-level backbone feature maps are fed into the head structure composed of two branches, \emph{i.e.} the identification branch (marked as id) and the detection branch (marked as det) to extract the appearance embedding and the detected targets, respectively. The identification branch aims to generate the appearance embedding to associate the same human and distinguish different humans in a video. And it is composed of two convolution layers to extract the appearance embedding from each position on the multi-level feature maps. The appearance embedding is expressed as $E_{x,y}=\{E_{(x_1,y_1)},E_{(x_2,y_2)},\cdots,E_{(x_n,y_n)}\} \in \mathbb{R} ^{1 \times 1 \times 256}$, where $(x, y)$ indicates the position on the feature map and $(x_i,y_i)$ represents the position of each positive sample on the feature map, both here and below. For each feature map, we apply the sampling strategy proposed in FCOS \cite{tian2019fcos} to determine the positive samples $P=\{p_{(x_1,y_1)},p_{(x_2,y_2)},...,p_{(x_n,y_n)}\}$. These positive samples $P$ are then fed into different heads module to predict the categories, offsets, and appearance embedding. Obviously, the distance between the appearance embedding from different humans should be greater than that from the same human. We take those appearance embedding with identical labels as the positive samples and those with different labels as the negative ones. Thus, the appearance embedding can be learned with the triplet loss~\cite{schroff2015facenet}: \begin{equation} L_{tri} = \max(||E_{x,y}^a - E_{x,y}^p||_2^2 - ||E_{x,y}^a - E_{x,y}^n||_2^2 + \alpha, 0), \end{equation} where $\alpha$ is the bound margin, $E_{x,y}^a$ is the anchor, $E_{x,y}^p$ is the positive sample, and $E_{x,y}^n$ is the negative sample. To alleviate the problem of easily falling into the local optimum with only the triplet loss, we introduce the classification loss to assist the training: \begin{equation} L_{cls} = \mathbb{CE}(\phi(E_{x,y}), l_{x, y}), \end{equation} where $\phi$ is a simple binary classifier, $l_{x,y}$ is the label of $E_{x, y}$, and $\mathbb{CE}$ denotes the cross-entropy. We set the label of negative samples to 0 and the label of positive samples to the ground-truth human id. In a conclusion, the identification branch is trained with the triple loss $L_{tri}$ and the classification loss $L_{cls}$: \begin{equation} L_{id} = L_{tri}+L_{cls}. \end{equation} \subsection{Inner Center Sampling} \label{subsec:method_sampling} We design HVISNet directly according to the previous section but find that the segmentation accuracy and appearance embedding differentiation in complex scenes is poor. By analyzing these underperforming cases, we find that there exist some ambiguous positive samples. We use an example to illustrate what are ambiguous positive samples. Note that the two humans are represented as A and B as shown in Figure~\ref{fig:point} (a). The classification of the positive and negative samples of the two humans is based on the position of the center of the bounding box. That is, if the sample position within $\frac{1}{2}$ stride range around the center, the sample is classified as a positive sample. However, the bounding box centers of the two humans A and B in the figure are close, which means the positive sample area overlaps seriously. Moreover, the two humans are similar in size and cannot be distinguished by the different levels. These overlapping positive samples need to represent both the embedding of A and the embedding of B. During training, there is a problem that the same positive sample has multiple labels. We define such a problem as the ambiguity positive samples problem. \begin{figure}[!th] \centering \small \vspace{-2mm} \begin{tabular}{ccc} \hspace{-3.2mm} \includegraphics[width=0.325\linewidth]{figure/figure_step/step_11.png} & \hspace{-6mm} \includegraphics[width=0.325\linewidth]{figure/figure_step/step_21.png} & \hspace{-6mm} \includegraphics[width=0.325\linewidth]{figure/figure_step/step_31.png} \\ (a) & (b) & (c) \end{tabular} \vspace{-2mm} \caption{Definition of the Inner Center. The three columns represent the three steps of finding the center inner, including obtaining the edge point set of the mask, sampling, and finding the point corresponding to the shortest distance.}\label{fig:inner} \vspace{-7pt} \end{figure} We find that if the center of the bounding box is used to classify positive and negative samples, then there will generate ambiguous positive samples in complex scenes. Furthermore, it is found that the positions of features with poor performance are almost outside the human mask but inside the bounding box, denote $P_{NP}$. Ideally, if the position of the positive sample falls inside the mask, it must be inside the bounding box. Therefore, if the positive samples in complex scenes are guaranteed to be inside each independent instance, we can avoid overlapping the positive samples of different instances. We also alleviate the problem of ambiguous positive samples. Thus, we propose the inner center sampling strategy, which is sampling at the \textbf{Inner Center}. Inner Center is defined as the point $(x_{in},y_{in})$ inside a human's mask and matching $\min \sum_{(x_i,y_i)\in P_E} [(x_{in}-x_i)^2+(y_{in}-y_i)^2] $, where $P_E$ is the edge sampling point set of a human mask. As shown in~\ref{fig:inner}, we first find the edge point sets of a human mask and sample edge points randomly, which are marked green. Then we find the point with the shortest distance between the sampled edge point set inside the mask. We visualize different positions of center points in Figure~\ref{fig:point}. Column (b) is the center of the bounding box introduced above, which is easy to generate ambiguous positive samples. Column (c) is the centroid of the mask. Intuitively, the mask is more refined than the bounding box. Sampling with the centroid of the mask leads to better performance than the center of the bounding box. However, neither the center of the green bounding box nor the centroid of the blue mask can be guaranteed to be inside the human all the time. In column (d), the Inner Center marked in red is still guaranteed to be inside the human if the overlap exceeds 0.7. Column (e) contains the different center points, from which we discover that our Inner Center can alleviate the ambiguous positive samples problem and better distinguish different individuals. \begin{table}[th] \caption{Comparison with existing video segmentation datasets.} \setlength\tabcolsep{10pt} \begin{center} \begin{tabular}{lccc} \toprule[1.5pt] Dataset &Exhaustion &Consistency &Complexity \\ \hline DAVIS~\cite{pont20172017} &&$ \checkmark$ & \\ DAVSOD~\cite{fan2019shifting} &&&$ \checkmark$\\ MOTS~\cite{Voigtlaender19CVPR_MOTS} &&$ \checkmark$&\\ VIS~\cite{yang2019video} &$ \checkmark$&$ \checkmark$&\\ \hline Our HVIS&$ \checkmark$&$ \checkmark$&$ \checkmark$\\ \bottomrule[1.5pt] \end{tabular} \end{center} \label{tab:datadif} \end{table} \begin{table}[th] \small \caption{Comparison between VISPersons~\cite{yang2019video} and our proposed HVIS.} \setlength\tabcolsep{4pt} \begin{center} \begin{tabular}{c|ccccc} \toprule[1.5pt] Dataset& \#videos & \#small-taget & \#instances & \#overlapping \\ VISPersons & 59& 11.12 $\%$ & 77& 10 \\ HVIS & 81&49.74 $\%$ & 205 &97 \\ \bottomrule[1.5pt] \end{tabular} \end{center} \label{tab:dataset_compare} \end{table} \begin{table}[th] \centering \caption{Quantitative evaluation with state-of-the-art methods on two datasets, VISPersons and HVIS.} \setlength\tabcolsep{3pt} \begin{tabular}{l|l|cccc} \toprule[1.5pt] Dataset & Method & sMOTA & MOTSA & MOTSP & FPS \\ \hline \multirow{3}{*}{VISPerson} &MaskTrack & 53.1 &66.7 &83.8 &25 \\ & STEm-Seg & \textbf{56.2} &\textbf{65.7} &\textbf{86.1} &7 \\ & HVISNet &55.7 & 65.3 &86.0&\textbf{30} \\ \hline \multirow{3}{*}{HVIS} &MaskTrack &37.3 &54.3 &78.5 &25 \\ &STEm-Seg &44.5 &62.0 &78.8 &7 \\ &HVISNet &\textbf{52.1} &\textbf{64.4} &\textbf{81.9} &\textbf{30} \\ \bottomrule[1.5pt] \end{tabular} \label{tab:result} \end{table} \subsection{Match Module} \label{subsec:method_match} The match module is to associate each frame in the video to obtain the identification of the human. Given a test video, we input each frame of the video into the network chronologically. The backbone network extracts multi-level features from each frame and inputs them into heads composed of a detection branch and identification branch. The outputs of detection are category score and regression of bounding box. And appearance embedding is obtained from the identification branch. For the first frame, we initialize the track according to the bounding boxes, which means we number each person detected on the first frame. On subsequent frames, appearance embedding and bounding boxes are inputted to the match module to associate with the predictions of the previous frame, which means the humans in subsequent frames are numbered according to the results of the previous frame. The match module is equivalent to completing the post-processing steps of the video frame through Kalman filtering ~\cite{Maybeck90Kalman} and Hungarian matching for each frame of the image. \section{HVIS Benchmark} \label{sec:data} To evaluate the performance of our method in complex video scenes, we propose the HVIS benchmark. \subsection{Dataset Composition} \label{subsec:data_composition} The proposed HVIS benchmark, including 1447 human instances in 805 videos, is divided into a training set and a validation set. The proposed dataset has the following characteristics. \textbf{Exhaustion}: all human instances that ensure that each video should be annotated at the pixel level regardless of the size and pose. \textbf{Consistency}: the identity of each human instance in the video should be unchanged. \textbf{Complexity}: the diversity of video scenes should be guaranteed, which means the dataset needs to contain various complex cases, such as occlusion, fast motion, strange poses, and overlapping, \emph{etc.} We obtain this dataset by reprocessing existing video segmentation datasets of related tasks~\cite{brox2010object,ochs2013segmentation,galasso2013unified,sundberg2011occlusion, Voigtlaender19CVPR_MOTS, fan2019shifting, yang2019video, pont20172017, MOT16} rather than collecting and annotating from scratch. We select video data from the datasets above and do cropping, relabeling, and other operations to build our dataset. Specifically, DAVIS~\cite{pont20172017} is the dataset of the video object segmentation task, which refers to segmenting and tracking the specified human in the first frame. That is to say, the non-specified human or the human that appears in the subsequent frames is not labeled. DAVSOD~\cite{fan2019shifting} is proposed for the task of video saliency segmentation salient humans in the video and ignore the non-salient human. MOTS~\cite{Voigtlaender19CVPR_MOTS} is to segment and track pedestrians, which does not label humans in other states such as riding, sitting, or standing. Thus, the above datasets are not fully labeled. VIS~\cite{yang2019video} is proposed for the video instance segmentation task, which is marked all humans in the video. But it was found that there were a certain number of missing labels. In terms of continuity, video saliency segmentation only needs to segment the saliency target, which is not needed to consider the target's identity in the video. Other video segmentation tasks need to consider the identity, and they meet the continuity. The complexity is illustrated in detail in the next section. The comparison with existing video segmentation datasets is shown in Table~\ref{tab:datadif}. \begin{figure*}[!th] \centering \vspace{-5mm} \begin{tabular}{m{2mm}ccccc} \hspace{-3.2mm} {\vspace{-1.2cm}}{(a)} & \ & \ & \ & \ & \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} {\vspace{-1.2cm}}{(b)} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_ride/064.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_ride/104.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_ride/144.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_ride/164.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_ride/184.png} \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} {\vspace{-1.8cm}}{(c)} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_ride/064.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_ride/104.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_ride/144.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_ride/164.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_ride/184.png} \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} {\vspace{-1.5cm}}{(d)}& \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_occlusion/resize5.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_occlusion/resize6.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_occlusion/resize8.png} & \hspace{-5.8mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_occlusion/resize13.png} & \hspace{-5.8mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_occlusion/resize15.png} \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} {\vspace{-1.5cm}}{(e)} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_occlusion/resize5.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_occlusion/resize6.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_occlusion/resize8.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_occlusion/resize13.png} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_occlusion/resize15.png} \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} {\vspace{-1.5cm}}{(f)} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_complex/000500.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_complex/000504.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_complex/000508.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_complex/000512.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/masktrack_complex/000528.jpg} \\ \specialrule{0mm}{-0.3mm}{-0.3mm} \hspace{-3.2mm} &\hspace{-5.8mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_complex/000500.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_complex/000504.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_complex/000508.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_complex/000512.jpg} & \hspace{-5mm} \includegraphics[width=0.185\linewidth]{figure/figure_results/ours_complex/000528.jpg} \\ \end{tabular} \vspace{-2mm} \caption{Visual comparison of Masktrack and HVISNet. Each row demonstrates five frames sampled from a video sequence. (a), (c) and (e) show the experimental results of MaskTrack, while (b), (d), and (f) represent HVISNet results. The mask's color represents human identity, where the human in the same mask color has the same identity. } \label{fig:result} \end{figure*} We propose the dataset to evaluate the robustness of our method in complex scenes. We consider it better to utilize a public dataset for training and a dataset containing complex scenes for evaluation. Therefore, during the dataset partition, the training set retains part of the person category in the VIS dataset. The missing part labels in the VIS indicate that some videos do not annotate all humans. We clean that part of the data and only keep the videos that match the above characteristics. In addition, we also add some other videos. The validation set is composed of 81 videos, including full complex scenes. The quantification of complex scenes is illustrated in detail in the next section. \subsection{Dataset Statistic} \label{subsec:data_statistic} We illustrate the complexity of different datasets using three metrics: mask size of humans (\# small-target), number of instances (\# instances), and number of overlapping humans (\# overlapping). The size of the mask determines the difficulty of segmentation. Considering the obvious fact that the smaller the target, the greater the difficulty of segmentation, we calculate the mask of the human size for the distinction of target size. The human masks smaller than $32*32$ are marked as tiny, more extensive than $96*96$ are large, and the rest are medium. We count the proportion of small and medium-sized humans to measure the impact on the complexity of the dataset. The more the number of instances in the video, the more difficult it is to identify the identity, and the greater the difficulty. The number of overlapping instances in the video indicates the presence of occluded scenes in the dataset. We also compared our validation set with the most similar dataset, the human portion of the VIS test dataset \cite{yang2019video} (VISPersons), as shown in Table~\ref{tab:dataset_compare}. Despite the exhaustive annotations in VISPersons, its video scenes are relatively simple, and there are few videos of different instances of the same category or small annotations. Therefore, the VISPersons cannot evaluate the performance of the methods in complex video scenes such as occlusion and overlapping. Moreover, the complexity evaluation of our dataset is much higher than that of the VISPersons in terms of all these three aspects. \section{Experiments} \label{sec:exp} We evaluate our proposed method and other baseline methods on two datasets: (1) HVIS, which is proposed in this paper and focuses on complex scenes with various kinds of occluded, overlapped, and deformed humans; (2) the person partition of Youtube-VIS~\cite{yang2019video}, which is proposed with the related task named VIS and contains relatively simple scenes. \PARbegin{Dataset.} The Youtube-VIS dataset~\cite{yang2019video} contains 40 common categories, including 2238 training videos, 302 validation videos, and 343 test videos. However, there are not any annotations in the released testing and validation sets. For comparison, we selected 647 videos with the category of humans from the training videos of Youtube-VIS and randomly split the subset of the Youtube-VIS dataset into 588 training videos and 59 test videos. For details of our proposed HVIS dataset, please refer to Section~\ref{sec:data} above. \PARbegin{Evaluation Metrics.} Human-centric video segmentation in complex video scenes can be decomposed into detection, segmentation, and multi-object tracking. To evaluate our method from multiple task dimensions, we chose the evaluation metrics of related task MOTS~\cite{Voigtlaender19CVPR_MOTS}. The metrics contain soft multi-object tracking and segmentation accuracy (sMOTSA), multi-object tracking and segmentation accuracy (MOTSA), and mask-based multi-object tracking and segmentation precision (MOTSP). Among these metrics, sMOTSA considers detection, segmentation, and tracking quality simultaneously. \PARbegin{Implementation Details.} We use a DLA-34~\cite{yu2018deep} backbone for HVISNet, and pre-train it on the COCO dataset~\cite{lin2014microsoft}. Our framework is implemented using Pytorch, which is trained end-to-end in 12 epochs with GeForce RTX 2080 Ti GPU. We set the initial learning rate to 0.01 and decreased the learning rate by a factor of 0.1 after 8 epochs and 11 epochs. Our model given a video frame with $512\times512$ resolution as inputs can run at about 30 FPS for inference. \begin{table}[t] \centering \caption{Performance of Center Inner Sampling on three instance segmentation methods (\%): BlendMask~\cite{chen2020blendmask}, CondInst~\cite{tian2020conditional}, and PolarMask~\cite{xie2020polarmask}. The models are trained on COCOPersons and tested on COCOPersons Val and OCHuman, respectively.} \footnotesize \setlength\tabcolsep{5pt} \begin{tabular}{l|c|ccc|ccc} \hline \multicolumn{1}{c|}{\multirow{2}{*}{Method}} & \multicolumn{1}{c|}{\multirow{2}{*}{Strategy}} & \multicolumn{3}{c|}{COCOPersons} & \multicolumn{3}{c}{OCHuman} \\ \cline{3-8} \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{} &$AP$ &$AP_M$ &$AP_H$ &$AP$ &$AP_M$ &$AM_H$ \\ \hline &bbox &40.3 &44.4 &61.7 &25.7 &1.06 &27.0 \\ BlendMask &mask &41.0 &45.2 &62.6 &28.5 &\textbf{4.00} &29.8 \\ &ours &\textbf{41.2} &\textbf{45.6} &\textbf{62.7} &\textbf{29.8} &2.10 &\textbf{31.1}\\ \hline & bbox &39.8 &44.2 &61.4 &24.2 &2.00 &25.6 \\ CondInst &mask &40.1 &44.7 &62.0 & 27.5 &3.10 &28.9 \\ & ours & \textbf{40.1}&\textbf{44.9} &\textbf{62.0}&\textbf{28.1} &\textbf{5.00} &\textbf{29.3}\\ \hline & bbox &34.3 &37.8 &51.8 &22.3 &3.90 &23.2 \\ PolarMask &mask &\textbf{34.6} &\textbf{38.1} &\textbf{52.5} &23.2 &3.90 &24.1 \\ &ours &34.5 &38.0 &52.2 &\textbf{23.4} &\textbf{4.40} &\textbf{24.2}\\ \hline \end{tabular} \label{tab:points} \end{table} \subsection{Main Results} \label{subsec:main_results} In this experiment, we compare the performance of our method with several state-of-the-art methods whose code is publicly available, such as MaskTrack~\cite{yang2019video} and STEm-Seg~\cite{athar2020stem}, on the HVIS dataset and VISPerson dataset. Table~\ref{tab:result} presents the quantitative results. As shown, our method achieves competitive accuracy and speed under all evaluation metrics on HVIS and VISPerson. The main difference between our method and MaskTrack is that we build the framework based on a single-stage detector, simultaneously obtaining the mask and appearance embedding. Moreover, we use appearance embedding that represents humans' association to complete the association of human identities in the video, which can better distinguish different humans. STEm-Seg introduces timing information through 3D convolution to better handle complex scenes, but the speed is low. The experimental results also illustrate this phenomenon. Our method can achieve similar accuracy at a real-time speed. We visualize the several cases of MaskTrack and our method as shown in Figure~\ref{fig:result}. Each row demonstrates five frames sampled from a video sequence. (a), (c), and (e) show the experimental results of MaskTrack, while (b), (d), and (f) represent the results of HVISNet. As shown, when the posture of a person changes, MaskTrack treats it as a different individual. Therefore, MaskTrack cannot guarantee the identity consistency of the same person who is occluded by another human and reoccurs. Our method can mark humans accurately in these complex scenes. Even though the human size is small, our method also achieves good performance. \subsection{Ablation study} \label{subsec:ablation_study} \begin{figure}[t] \small \centering \includegraphics[width=0.48\textwidth]{figure/ablation_v2.png} \caption{The impact of different positive samples on the instance segmentation method. } \label{fig:ablation} \vspace{-7pt} \end{figure} \begin{figure*}[th] \centering \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.98\linewidth]{figure/fig-ablation-a.pdf}\\ \vspace{-5.0pt}\fontsize{7.0pt}{\baselineskip}\selectfont{(a)} \end{minipage} \begin{minipage}[t]{0.48\textwidth} \centering \includegraphics[width=0.98\linewidth]{figure/fig-ablation-b.pdf}\\ \vspace{-5.0pt}\fontsize{7.0pt}{\baselineskip}\selectfont{(b)} \end{minipage} \caption{Qualitative diverse results of human image instance segmentation. These two rows of (a) and (b) represent the results of the sampling strategy in FCOS (upper) and our inner sampling strategy (lower), respectively. The red points in Figure~(a) indicate the obtained positions of the positive samples. Each red point corresponds to a bounding box and a score. The yellow circles emphasize the difference between our strategy and FCOS. Figure~(b) represents the segmentation and detection results of the sampling strategy in FCOS (upper) and our inner sampling strategy (lower), respectively.} \label{fig:ablation_comp} \end{figure*} \PARbegin{Ambiguous Positive Sample Problem.} When we apply the sampling strategy proposed in FCOS to train the instance segmentation network, we discover the point features $ P_{NP}$ in complex scenes with poor performance. Although these features fed to the detection branch can lead to the bounding box's normal regression, the segmentation accuracy and appearance embedding differentiation are relatively low. The point features $ P_{NP}$ inside the bounding box but outside the mask are classified as positive samples in the classifiers in FCOS. Such a classifier can distinguish positive and negative samples in simple scenes such as single-human or multi-humans non-overlapping scenes. However, in complex scenes, such as severely occluded scenes, the positive samples of different instances overlap, with multiple labels during training. Thus, we explore whether different positive samples have an impact on the experimental results. We generate two positive sample sets $S_C$ and $S_I$ according to the strategy proposed in FCOS and center inner sampling, which proposes in this paper, respectively. Then, $a\% (a=10, 20, \cdots, 100)$ points in $S_I$ are augmented into $S_C$ and vice versa. And we use the two types of augmented positive samples to train the BlendMask. The model is trained on COCOPersons (the person category of COCO) with 90K iterations, tested on OCHuman \cite{zhang2019pose2seg}. The experimental results are shown in Figure~\ref{fig:ablation}. We can find that the different positive sample points impact the segmentation accuracy, and positive samples in the human masks are more conducive to segmentation. \PARbegin{Inner Center Sampling on HIIS.} To verify the effectiveness of our proposed inner center sampling strategy, we evaluate the impact of three different sampling strategies on instance segmentation in complex scenes. The first strategy is the bounding-box center sampling proposed in FCOS, which results in ambiguous positive sample problems. The second strategy is centroid mask sampling associated with mask intuitively, which is more accurate. Moreover, it can alleviate ambiguous positive sample problems to a certain extent in some strange pose scenes, such as some humans dancing hip-hop. However, the performance is still deficient in the intense overlap scene. The third strategy is inner center sampling proposed in this paper, which alleviates ambiguous positive sample problems in complex scenes, especially for strong overlap. To illustrate the universality of the inner center sampling strategy, we apply it to other instance segmentation methods based on FCOS. The models are trained on COCOPersons (the person category of COCO) with 90K iterations and tested on COCOPersons and OCHuman datasets. From Table~\ref{tab:points}, the inner center sampling strategy leads to slight improvement on the COCOPersons dataset. Notably, the gain is much more significant on the OCHuman dataset, where each human instance is heavily occluded by one or several others. Figure~\ref{fig:ablation_comp} illustrates the qualitative comparison of human image instance segmentation between FCOS and our inner sampling strategy. The results show that our method effectively suppresses the direct interference samples of two targets. Table~\ref{tab:comp_strategy} shows the comparison of these three sampling strategies. We count the positive sample numbers of three different strategies that fall inside the mask during the test. The values mean the percentage of positive samples (confident score \textgreater{0.5}) trained by the corresponding strategy. Both Table~\ref{tab:points} and Table~\ref{tab:comp_strategy} demonstrate that our proposed strategy improves the overall performance by a significant margin, which shows the effectiveness of the plug-and-play inner center sampling strategy. \begin{table}[t] \caption{Quantitive comparison of three sampling strategies.} \label{tab:comp_strategy} \begin{tabular}{cccc} \toprule Confident Score &Center of bbox &Center of Mask &Inner-center \\ \midrule \textgreater{}0.5 &0.891 &0.918 &0.931 \\ \bottomrule \end{tabular} \end{table} \begin{table}[th] \centering \caption{Performance when constraining positive samples in segmentation (Seg.) and embedding (Emb.), respectively.} \begin{tabular}{cc|ccc} \toprule Seg. &Emb. &sMOTSA &MOTSA &MOTSP \\ \midrule $\xmark$ &$\xmark$ &30.4 &40.3 &81.0 \\ $\checkmark$ &$\xmark$ &51.3 &63.9 &81.8 \\ $\xmark$ &$\checkmark$ &40.3 &51.8 &80.0 \\ $\checkmark$ &$\checkmark$ &\bf{52.1} &\bf{64.4} &\bf{81.9} \\ \bottomrule \end{tabular} \label{tab:hvisnet} \end{table} \PARbegin{Inner Center Sampling on Human-centric Video Segmentation.} We evaluate the impact of inner center sampling on the HVIS-CS in Table~\ref{tab:hvisnet}. We use the appearance embedding of a certain position on the feature map to represent the human's identity. Intuitively, it is more reasonable to use the embedding corresponding to the positive sample located inside the mask to represent the identity of the human. In the above experiment, the results show that the model can incorporate a plug-and-play inner center sampling strategy with a one-stage instance segmentation model to improve the model's segmentation accuracy. In the HVIS-CS task, we directly eliminate the ambiguous positive samples. In particular, we set the label of ambiguous positive samples to 0, which means treating ambiguous positive samples as negative samples. The result is shown in Table \ref{tab:hvisnet}, we find that if we directly eliminate the ambiguous positive samples, the performance of HVIS-CS is also improved. After we add the Inner Center Samping strategy on this basis, the performance achieves the best. Although our strategy can constrain the position of the positive samples within the mask as much as possible, it still cannot guarantee that all the positive sample points are inside the mask. Thus, we further constrain the positive samples by eliminating the ambiguous positive samples to improve the performance of the model. \section{Conclusion} \label{sec:conclusion} In this paper, we propose a novel framework based on a one-stage detector for human-centric segmentation in complex video scenes, which had a good performance in accuracy and speed. Moreover, we found that the sampling strategies proposed in FCOS had a poor performance of segmentation and low accuracy of appearance embedding. We interpret this phenomenon as an ambiguous positive sample problem. To solve this problem, we proposed a novel inner center sampling strategy. Extensive experiments have been conducted to illustrate the effectiveness and universality of the inner center sampling strategy for performance improvement. We also propose a benchmark HVIS better to evaluate the performance of different methods in complex scenes. Comparative results on VISPersons and the proposed HVIS show that our framework achieves state-of-the-art performance. \bibliographystyle{IEEEtran}
\section{\label{sec:level1}Introduction} Production from gas-condensate reservoirs can be significantly affected by condensate banking. As the pressure around producing wells is lowered below the reservoir mixture's dew point, a liquid phase emerges in the porous medium and partially blocks the gas flow. Several parameters affect the severity of the damage, such as the reservoir permeability, fluid composition and depletion level. Even lean gas mixtures can lead to significant flow blockage once liquid dropout takes place \citep{afidick1994production}. The liquid and gas phases different mobilities and molar contents induce a compositional shift in the two-phase region, which enlarges the local heavier component fractions and can lead to substantial liquid saturations \citep{vo2015experimental}. In order to manage this production challenge, various production strategies and EOR methods have been devised for gas-condensate reservoirs development \citep{sayed2016mitigation,ganie2019review,hassan2019gas}. Among these methods, many involve the injection of gases in the reservoir, aiming full or partial pressure maintenance, as well as re-evaporation of accumulated condensate. In full pressure maintenance, the reservoir pressure is kept above the dew point pressure and liquid dropout is prevented. If feasible, this method can maximize condensate recovery, as no liquid phase is deposited in the porous medium and heavy components are produced in the gas. \citet{luo2001experimental} conducted long-core flooding experiments with lean gas injection to compare recoveries above and below the dew point pressure. While injection below the dew point managed to re-vaporize a fraction of both intermediate and heavy hydrocarbons in the core, condensate recovery was considerably higher for the case above the dew point. Implementing a full pressure maintenance scheme, however, requires large amounts of injected gas and can be unpractical for cases in which the initial reservoir pressure is close to the fluids dew point \citep{luo2001experimental}. Also, special attention has to be directed to the injected gas composition. Certain gases, such as nitrogen\citep{luo2001experimental} and methane \citep{ahmed1998wellbore}, have a tendency to increase gas-condensate mixtures dew point and can lead to early condensation in the reservoir. For the case of partial pressure maintenance, gas can be injected following liquid dropout in the reservoir. In this approach, the objectives are both slowing down pressure depletion and re-vaporizing the accumulated condensate, so that gas flowing paths are cleared and valuable heavy components are recovered. Numerous studies have investigated the ability of different gas compositions to support reservoir pressure and reduce liquid banking. \citet{al2004revaporization} evaluated the effectiveness of methane to recover condensate using coreflooding experiments. They concluded that methane is able to re-vaporize the liquid phase and restore the core's original permeability, but that tens to hundreds of injected pore volumes can be required for the method's success. High injection pressures and flow rates were pointed out as means to accelerate the method's outcomes. \citet{gachuz2011laboratory} performed core flooding experiments to investigate the recovery obtained with gas injection in naturally fractured gas-condensate reservoirs. A small gap was allowed around the core to simulate a fracture and, after the core was depleted below the dew point pressure, $N_2$, $CO_2$ and lean gas were injected. The results indicated a condensate recovery of $51.7\%$ with the lean gas injection, $34.78\%$ with $CO_2$ and only $18.7\%$ with the $N_2$ injection case. \citet{al2012mobility} evaluated condensate recovery by the injection of super-critical $CO_2$, $C_1$, and their mixtures. They performed gas injection in a sandstone core following condensate flooding, meaning that the liquid content was not established in the porous medium by condensation. Unsteady-state relative permeability and recovery measurements demonstrated that the injection of pure $CO_2$ delayed the gas breakthrough and provided higher recovery of condensate when compared to the injection of mixtures of $CO_2$ and pure $C_1$, at the same operating conditions. Besides conventional gas flooding, huff-n-puff gas injection has also been investigated experimentally, for application in shale gas-condensate reservoirs. Due to shale ultra low permeabilities, this technique could be beneficial to expedite both pressure boost and re-evaporation of condensate in the producing wellbore vicinity \citep{sheng2015increase}. Core flooding experiments in shale cores displayed promising results with the huff-n-puff injection of produced gas \citep{meng2016experimental}, $C_1$ \citep{sharma2018comparative} and $CO_2$ \citep{meng2018performance}. Additionally to core flooding tests, several reservoir-scale numerical studies have been conducted to assess gas injection as an enhanced gas-condensate recovery method. \citet{marokane2002applicability} used a full-field compositional reservoir simulation model to investigate the efficacy of a one-time lean gas injection scheme to remove the condensate banking around producing wells. Results indicated that, for a lean gas reservoir, maximum recovery was obtained for injection at pressures below the maximum liquid dropout. For a rich gas reservoir, however, starting gas injection before reaching the maximum liquid dropout pressure produced better results. \citet{linderman2008feasibility} used a similar approach to evaluate the feasibility of injecting nitrogen in a gas-condensate reservoir. Their model predicted superior net gas production with the injection of nitrogen than with the injection of produced gas, while the condensate net recovery was virtually identical for the two scenarios. They also compared the injection of $CO_2$ with $N_2$, finding no significant differences in the achieved recoveries. \citet{taheri2013miscible} modeled enhanced condensate recovery in fractured gas-condensate reservoirs using stock tank gas, $C_1$, $N_2$ and $CO_2$ injection. Results suggested that $CO_2$ injection could generate considerably better results that the other tested gases, and that no appreciable difference is obtained between the injections of methane, nitrogen and stock-tank gas. It was also concluded that injection at higher pressures boosted condensate recovery. Another numerical study evaluating gas injection in fractured gas-condensate reservoirs was conducted by \citet{fath2016investigation}. After testing four different injected gas compositions, they obtained the highest recovery with $CO_2$, followed by $C_1$, produced gas and $N_2$. Their model also predicted that, for the same injected volumes of the tested gases, nitrogen led to a significant higher pressure average in the reservoir, while produced gas led to the lowest. Recent numerical works also investigated the efficacy of $C_2$ injection for condensate recovery, with very favorable results. \citet{sharma2017comparative} evaluated the performance of huff-n-puff gas and solvent injection in shale gas-condensate reservoirs. They concluded that ethane was the best injection fluid on accounts of higher and much faster recovery, when compared to methane, methanol and isopropanol. The positive results were attributed to ethane's ability to greatly reduce the gas-condensate mixture's dew point pressure, ensuring relatively low injecting volumes for condensate re-vaporization. \citet{zhang2020investigation} investigated the injection of $C_1$, $C_2$, $CO_2$ and $N_2$ in a five-spot configuration for condensate enhanced recovery. In their study, $C_2$ also led to the best condensate recovery, of $56.8\%$ after the injection of 0.85 pore volumes, closely followed by $CO_2$, with a recovery of $50.7\%$. Methane and nitrogen displayed considerably worse performances, with $22.8\%$ and $21.3\%$ of condensate recovery, respectively, for the same injected volume. Although both experimental and numerical research indicate that gas injection is an advantageous approach for condensate enhanced recovery, no micro-scale analysis of the method has been reported in the literature. This represents a significant gap in data for gas injection performance evaluation, especially considering that pore-scale events are essential to understanding macro-scale transport properties in porous media. During gas injection, local changes in composition can alter significantly both bulk and interfacial properties of gas and liquid phases, which in turn affect their flow, characterized by the relative permeability curves. To address this gap, we used a compositional pore-network model to evaluate gas injection in porous media after condensate accumulation. The model has been validated against core flooding experiments \citep{reis2021pore} and also used to evaluate wettability alteration as a gas-condensate enhanced recovery method \citep{reis2020pore}. In the present study, first we replicated condensate accumulation in the porous medium by flowing a representative gas-condensate mixture through a sandstone-based network at different depletion levels, starting from values just below the dew point, until pressures below the maximum liquid dropout. Then $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas were injected in the condensate bearing network and the flow improvement was evaluated. Final saturations, relative permeabilities and recovery of heavy hydrocarbon components were quantified to compare the efficacy of each injection scenario. The impact of the concentration of the injected gases was also explored, by repeating the analysis with the injection of mixtures containing $50\%$ in moles of $C_1$, $C_2$, $CO_2$ or $N_2$, and $50\%$ the produced gas. \section{Pore-network model} The pore-network model used in the preset study was devised specifically to represent gas-condensate flow in porous media. It was based on the fully compositional pore-network model proposed by \citet{santos2020pore} and adapted to encompass realistic characteristics of \textit{in-situ} condensate formation and gas-condensate flow. In the following sections, the main aspects of gas-condensate flow in porous media and their representation in the model are described. For further details, we refer to \citet{reis2021pore}. \subsection{Pore-scale gas-condensate flow patterns} \label{sec:gc_flow} Gas-condensate mixtures undergo a transition from single-phase gas flow to two-phase gas-condensate flow, as the dew point pressure is reached. Upon condensation, it has been observed in micro model experiments \citep{cocskuner1997microvisual,al2009condensate} that the liquid phase wets completely the porous medium and tends to form a film that flows adjacent to the walls, while the gas flows along the pore centers, in a core-annular pattern. This flow configuration can be disrupted, however, if the film becomes unstable and the snap-off of the gas happens. In this case, a bridge of liquid is formed across the gas flowing channel and blocks the flow. Once blocked, a balance between viscous and capillary forces determines whether the channel is re-opened to gas flow. This intermittent opening and closing of gas flowing channels is pointed out as the main mechanism behind condensate blockage \citep{jamiolahmady2003positive}. In our model, we represented this mechanism as illustrated in Figure \ref{fig:cond_ev}. Figure \ref{fig:cond_ev}(a) represents a flowing channel above the dew point pressure, where only gas flows. Figure \ref{fig:cond_ev}(b) depicts the flowing channel below the dew point pressure. In this case, the phases flow in core-annular configuration, with condensate at the walls and gas at the center. Figure \ref{fig:cond_ev}(c) contains the phases configurations once the snap-off of the gas happens and the bridge of liquid is formed. Finally, Figure \ref{fig:cond_ev}(d) illustrates the re-opening of the flowing channel, with the mobilization of the condensate bridge. \begin{figure}[H] \centering \includegraphics[width=40mm]{Figures/Snap_off_Evolution.png} \caption{Evolution of condensate configuration in a pore throat \cite{reis2021pore}} \label{fig:cond_ev} \end{figure} \subsection{Pore Geometry} \label{pn_geom} Networks of pore bodies connected by converging-diverging circular pore throats were used in the model. Equation \ref{eq:r_fun} expresses the radius of a pore throat $j$, with length $L_j$, maximum radius $R_{max,j}$ and constricted radius $R_{min,j}$. Control volumes for each pore $i$ were defined encompassing half the volumes of the throats connected to them, as illustrated in Figure \ref{fig:volumeporo}. The constricted pore throat geometry was chosen so that an accurate criterion for the snap-off of the gas phase could be implemented. Apart from that, it allows the calculation of unique and continuously varying capillary pressure as the the liquid bridge meniscii move in a pore throat \citep{al2005dynamic} (e.g. Figure \ref{fig:cond_ev}(c) and (d) ). Consequently, the conditions for gas flow blockage could be adequately represented. \begin{subequations} \label{eq:r_fun} \begin{align} r_j(x) = \sqrt{a_j+b_jx^2} \\ a_j = R_{min,j}^2 \\ b_j = \left(\frac{2}{L_j}\right)^2(R_{max,j}^2-R_{min,j}^2) \end{align} \end{subequations} \begin{figure}[H] \centering \includegraphics[width=70mm]{Figures/Pore_Volume.png} \caption{Definition of a pore volume \cite{reis2020pore}} \label{fig:volumeporo} \end{figure} \subsection{Fluid conductances and snap-off criteria} \label{sec:snap_off} Regarding the two-phase flow calculations, it was considered that pore bodies impose no restriction to the flow, so that conductances were devised only for pore throats. For the annular flow developed after condensate dropout, the conductances for the gas and liquid phases are presented in equations \ref{eq:g}(a) and \ref{eq:g}(b), respectively. \begin{subequations} \label{eq:g} \begin{align} g_{g} &=\frac{\pi}{8\mu _{g} L}(S_{g} R^2)^2+\frac{\pi}{4\mu _{l} L}(R^2-S_{g} R^2) S_{g} R^2 \\ g_{l} &=\frac{\pi}{8\mu _{l} L}(R^2-S_{g} R^2)^2 \end{align} \end{subequations} \noindent where, $\mu _g$ and $\mu _{l}$ are the viscosities of the gas and liquid phases, $S_{g}$ is the gas saturation and $R$ and $L$ are, respectively, the equivalent radius\citep{sochi2013newtonian,reis2021pore} and length of the capillary. The snap-off of the gas phase takes place in a pore throat once a critical thickness of the liquid film is achieved \cite{reis2021pore} and the criterion proposed by \citet{beresnev2009condition} is met. This criterion, given by equation \ref{eq:berev}, takes into consideration the length, maximum and minimum radii of the throat, as well as the condensate film thickness ($e$). \begin{equation} \label{eq:berev} L>2\pi\sqrt{(R_{min}-e)(R_{max}-e)} \end{equation} For the flow through a pore throat to be reestablished after the snap-off, the pressure drop across the throat has to overcome the critical value given by equation \ref{eq:dP_crit}. It is a function of the interfacial tension, $\sigma$, between the phases and the radii of the condensate bridge meniscii, $R_1$ and $R_2$. The interfacial tension is calculated with the correlation proposed by \citet{WK}, and the radii vary according to the throat geometry and the condensate saturation. \begin{equation} \label{eq:dP_crit} \Delta P_{crit}=2\sigma \left(\frac{1}{R_{1}}-\frac{1}{R_{2}}\right) \end{equation} \subsection{Governing Equations} \label{sec:ge} A system of non-linear equations relates the molar content and pressure of each pore control volume $i$ in the model. It encompasses molar balance equations (eq. \ref{eq:mb}), volume consistency equations (eq. \ref{eq:vc}), and equations to enforce boundary conditions. Equation \ref{eq:mb}(a) describes how the number of moles in a pore volume $i$ varies due to the molar flow rate through its adjacent pore throats, $\dot{n}^k_j$, and the flow at the network boundaries, $\dot{s}_i^k$. In this equation, $c_{ij}$ are the entries of the incidence matrix $C$, which maps which throats are connected to each pore volume in the network. The molar flow through a pore throat, given by equation \ref{eq:mb}(b), converts the volumetric flow, calculated with the conductances and the pressure drop, into the molar flow, using the molar fraction of each component in the gas and liquid phases, $y^k$ and $x^k$, and their molar densities, $\xi_g$ ans $\xi_l$. Equation \ref{eq:mb}(c) represents the pressure difference that drives the flow through the throats. The inclusion of the interface pressure difference ($\Delta P_j^{int}$) in eq. \ref{eq:mb}(c) is controlled by the parameter $H^{int}$, which is equal to $1$ when a liquid bridge is present and $0$, otherwise. In Equations \ref{eq:mb}, $i=1..n_b$, $j=1..n_t$, and $k=1..n_c$, represent, respectively, the number of pore volumes, pore throats and fluid mixture components in a network. \begin{subequations} \label{eq:mb} \begin{equation} \frac{\partial N^k_i}{\partial t}=-\displaystyle\sum_{j=1}^{n_{t}} c_{ij}\dot{n}_j^k+\dot{s}_i^k \end{equation} \begin{equation} \dot{n}_j^k =(y^k\xi _{g}g_{g}+x^k\xi _{l}g_{l})_j\Delta P_j \\ \end{equation} \begin{equation} \Delta P_j =\displaystyle\sum_{m=1}^{n_{b}} c_{mj}P_m - H_j^{int}\Delta P_j^{int} \end{equation} \end{subequations} The volume consistency equations, given by eq. \ref{eq:vc}, are used to enforce compatibility between the pore volumes and the volumes of the phases contained in them. These equations are devised considering slightly compressible networks, so that, for a given pressure $P_i$, the volume of a pore can be approximated using the pore compressibility, $\nu _i$, along with reference volume, $\overline{V_i}$, and pressure, $\overline{P_i}$ values. For the calculation of the gas and liquid phases volumes, the pressure and temperature in the pore, $P_i$ and $T$, are related with the fluid parameters $\mathcal{L}_i$, $Z_i^{g}$, $Z_i^{l}$, $x_i^k$ and $y_i^k$ (respectively: the fraction of the $N_i$ moles in the liquid phase, the compressibility factors and the molar fractions of each component $k$ in the gas and liquid phases). \begin{equation} \label{eq:vc} N_i-\frac{\overline{V_i}[1+\overline{\nu _i}(P_i-\overline{P})]}{\mathcal{L}_i\left(\frac{Z_i^{l}RT}{P_i}-\sum_{k=1}^{n_c} v_kx_i^k\right)+(1-\mathcal{L}_i)\left(\frac{Z_i^{g}RT}{P_i}-\sum_{k=1}^{n_c} v_ky_i^k\right)}=0 \end{equation} Additionally to equations \ref{eq:mb} and \ref{eq:vc}, simple equations are written to enforce the boundary conditions for the system. In the presented model, the flow can be driven either by imposing different pressure levels at the inlet and the outlet, or by prescribing molar flow rate at the inlet and pressure at the outlet. Other parameters that have to be imposed are the composition of the fluid injected in the network and the temperature $T$. The presented system of equations was based on the compositional formulation proposed by \citet{collins1992efficient}, which decouples the flow equations from the flash calculations. In this formulation, the system relating flow equations is solved with the Newton-Raphson method, while thermodynamic equilibrium is enforced at each newton iteration by performing phase equilibrium calculations using the Peng-Robinson EoS and the trial solution variables. Details of the implemented phase equilibrium calculations can be found in \citet{santos2020pore}. \section{Results} \subsection{Pore-network} The pore-network used in the present study, shown in Figure \ref{fig:net}, represented a $1.75 mm^3$ cubic section of a sandstone with permeability of $169mD$ and porosity of $17.1\%$. This network was first extracted from Micro-CT imaging of a sandstone sample, using the network extraction algorithm proposed by \citet{dong2008micro}, then adapted to meet the geometric criteria described in section \ref{pn_geom}. Figure \ref{fig:net_hist} represents the size distributions of the constricted and unconstricted capillary radii of the adapted pore-network. More details of the network adaptation process can be found in \citet{reis2020pore}. \begin{figure}[H] \centering \includegraphics[height=2in]{Figures/net_sandstone.png} \caption{Sandstone based network} \label{fig:net} \end{figure} \begin{figure}[H] \centering \includegraphics[height=2.5in]{Figures/Fig_Hist_PN_EOR.png} \caption{$R_{min}$ and $R_{max}$ distributions in the used pore-network} \label{fig:net_hist} \end{figure} \subsection{Fluids} A series of fluid mixtures was used in the present study in order to represent condensate buildup in porous medium followed by gas injection and condensate re-vaporization. The composition of the fluid used during the condensate accumulation process in the porous medium is presented in Table \ref{tab:comp}. This mixture represents a typical fluid found in gas-condensate reservoirs, composed by carbon dioxide, nitrogen, light, intermediate and heavy hydrocarbons. It exhibits a large window of retrograde condensation behavior in the temperature range from $12^{\circ}C$ to $207^{\circ}C$, as shown in the phase diagram in Figure \ref{fig:pe}. For our analyses, a temperature of $60^{\circ}C$ was chosen as the reservoir temperature. \begin{table}[H] \centering \caption{\label{tab:comp}Gas-condensate mixture composition.} \begin{tabular}{cc} Component & Molar Fraction\\ \hline $CO_2$ & 0.05\\ $N_2$ & 0.02\\ $C_1$ & 0.65\\ $C_2$ & 0.13\\ $C_3$ & 0.07\\ $C_6$ & 0.05\\ $C_{10}$ & 0.025\\ $C_{16}$ & 0.005\\ \end{tabular} \end{table} \begin{figure}[H] \centering \includegraphics[width=100mm]{Figures/phase_envelope.png} \caption{Fluid mixture phase envelope} \label{fig:pe} \end{figure} After condensate accumulation, the gases chosen as candidates for injection aiming condensate enhanced recovery were produced gas obtained during the flow of the mixture presented in Table \ref{tab:comp}, methane ($C_1$), ethane ($C_2$), carbon dioxide ($CO_2$) and nitrogen ($N_2$). For the sake of appraising preliminarily the ability of the four last gases to re-vaporize condensate, Figure \ref{fig:LDO} illustrates the liquid dropout as a function of the pressure obtained by mixing $C_1$, $C_2$, $CO_2$ or $N_2$ with the composition presented in Table \ref{tab:comp}, at different molar fractions and a temperature of $60^{\circ}C$. It can be noticed from Figure \ref{fig:LDO}(a) that the addition of $25\%$ in moles of the tested gases to the reservoir composition leads to a substantial reduction in maximum liquid dropout, varying from $31.8\%$, in the case of $C_2$, to $49.6\%$, in the case of $C_1$. It is also noticeable that the effects of the tested gases on the mixture's dew point pressure are very distinct. $C_2$ and $CO_2$ reduce the saturation pressure, thus allowing the mixture to remain as a single gas phase at lower pressures. The opposite is verified as the reservoir fluid is mixed with $C_1$ and $N_2$. While the negative effect of $C_1$ on the dew point pressure is mild, $N_2$ increases significantly its value, and can lead to very early condensation in porous media. The same trend of effects is observed as the content of the tested gases is increased to $50\%$, Figure \ref{fig:LDO}(b), and $75\%$, Figure \ref{fig:LDO}(c). The maximum liquid dropout is progressively reduced, with $C_1$ and $CO_2$ being the most, and $C_2$ and $N_2$ the least effective gases to lower the maximum volume of liquid formed. As for the effects on the dew point pressure, at higher molar fractions $C_2$ and $CO_2$ gradually reduce it, while $N2$ increases it. $C_1$, on the other hand, slightly augments and then reduces the mixture's dew point pressure, at the molar fractions of $50\%$ and $75\%$, respectively. These results suggest that mixtures rich in $C_1$, $C_2$, $CO_2$ and $N_2$ have a positive prospect to work as condensate re-vaporization agents and, consequently, improve gas flow in porous media. \begin{figure}[H] \centering \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[width=80mm]{Figures/LDO_25.png} \caption{ 75\% of the gas-condensate mixture and 25\% of the injected gases } \end{subfigure}% \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[width=80mm]{Figures/LDO_50.png} \caption{ 50\% of the gas-condensate mixture and 50\% of the injected gases } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[width=80mm]{Figures/LDO_75.png} \caption{ 25\% of the gas-condensate mixture and 75\% of the injected gases } \end{subfigure} \caption{Liquid dropout at a temperature of $60^{\circ}C$} \label{fig:LDO} \end{figure} Additionally to the injection of $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas individually, mixtures of $C_1$, $C_2$, $CO_2$ and $N_2$ with the produced gas, at molar fractions of $50\%$, were also injected in the networks to assess their ability to recover condensate after liquid banking. These tests were devised considering two different scenarios. First, to take advantage of the produced gas availability, we wanted to test whether directly injecting mixtures of the produced gas with $C_1$, $C_2$, $CO_2$ or $N_2$ could satisfactorily enhance condensate recovery. Secondly, even during the injection of pure gases, the flow of mixtures of injected and reservoir fluids will take place, especially at regions far from the injection wells and/or at small injection volumes. These test, therefore, serve also to appraise the effects of in situ mixing with the reservoir fluid in the performance of $C_1$, $C_2$, $CO_2$ and $N_2$ to recover condensate. \subsection{Flow conditions} Two steps of injection were performed in the networks for every evaluated case. First, the reservoir fluid was injected so that condensate accumulated in the porous medium, mimicking the process of condensate banking in the near wellbore regions. Then, the injected composition in the networks was altered, so that the liquid buildup was followed by gas injection and condensate recovery. The process of condensate accumulation was reproduced by injecting 25 pore volumes (PV) of the mixture presented in Table \ref{tab:comp} in the networks at different pressures. As the timing for gas injection is one of the most relevant parameters for the method's success \citep{marokane2002applicability}, we wanted to test its performance at various reservoir depletion stages. Six pressure values were used, 22, 21.5, 21, 19.5, 17.75 and 14.75 MPa, which corresponded to liquid dropout saturations of $2.3\%$, $9.7\%$, $13.3\%$, $17.1\%$, $17.3\%$ and $14.7\%$, respectively. With that, a broad range of depletion scenarios could be covered, from the early stages of condensate formation to pressures below the maximum liquid dropout. After the first 25 PV of injection, $C_1$, $C_2$, $CO_2$, $N_2$, produced gas or their mixtures were injected in the the networks. This step also lasted until 25 PV were injected. Under certain conditions, the recovery of heavy components by gas injection can be a very slow process, requiring tens to hundreds of pore volumes injected \citep{al2004revaporization}. For this reason, in some cases, we could not reach a steady state flow. The prescribed boundary conditions for both steps were molar flow rate at the network inlet and pressure at the outlet. For all tested injection scenarios, a molar flow rate was imposed so that a gas flowing velocity of $35m/day$ was achieved. It has been reported in the literature \citep{al2004revaporization} that injection rate does not influence significantly the performance of gas injection as a gas-condensate EOR method and we chose, therefore, not to explore the effects of this parameter. \subsection{Condensate saturation reduction} \label{sec:cond_sat} Figures \ref{fig:cond_sat_99}(a)-(f) illustrate the evolution of the condensate saturation in the networks with time, during the injection of the gas-condensate mixture followed by $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas, at different pressures. The first 25 PV of injection represent the condensate buildup during the injection of the reservoir fluid, and the last 25 PV represent the condensate recovery during gas injection. At the pressure of $22 MPa$ (Fig. \ref{fig:cond_sat_99}(a)), just below the dew point pressure, $C_2$ and $CO_2$ produce almost identical effects on the accumulated condensate. Both reduced the liquid content faster and to a lower saturation than the other tested gases. $C_1$ also reduced significantly the condensate saturation, from $13.93\%$ to $1.08\%$, while $N_2$ and the produced gas displayed the lowest capacity to recover condensate, leaving $3.33\%$ and $2.74\%$ of liquid in the network, respectively. Similar results were obtained with gas injection at the pressures of $21.5$ (Fig. \ref{fig:cond_sat_99}(b)) and $21 MPa$ (Fig. \ref{fig:cond_sat_99}(c)). Even though the amount of accumulated condensate in the networks increased significantly, corresponding to $27.65\%$ at $21.5 MPa$, and $32.06\%$ at $21 MPa$, the injected gases cleared the liquid damage efficiently. This is a good indicative that, at high pressures, all tested gases could be used to support reservoir pressure and mobilize accumulated liquid. As the injection pressure is lowered below $20 MPa$, however, the ability of the gases to recover condensate is clearly reduced, as shown in Figures \ref{fig:cond_sat_99}(d) to (f). The rate of liquid re-vaporization is progressively slowed down during the injection of all tested gases, indicating that more injected volume is required for the same volume of recovered condensate, as the reservoir becomes more depleted. At the lowest tested pressure of $14.75 MPa$, all injection scenarios perform similarly, leaving most of the condensate in the porous medium after 25 PV. These findings support the hypothesis that the timing for injection of gases in gas-condensate reservoirs is crucial for effective condensate recovery and gas flow improvement. \begin{figure}[H] \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_225.png} \caption{$P=22 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_220.png} \caption{$P=21.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_215.png} \caption{$P=21 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_200.png} \caption{$P=19.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_180.png} \caption{$P=17.75 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_99_P_150.png} \caption{$P=14.75 MPa$} \end{subfigure} \end{minipage} \hfill \caption{Condensate saturation evolution with time in the networks. Injection of the reservoir mixture followed by $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas.} \label{fig:cond_sat_99} \end{figure} To further illustrate the effect of pressure in the ability of the tested gases to recover condensate, Figure \ref{fig:C02_sat} displays the $CO_2$ molar concentration in the networks following the 25 PV of $CO_2$ injection. From $22 MPa$ down to $19.5 MPa$, $CO_2$ injection's micro-sweep efficiency is gradually reduced, but most of the pore space is cleared from its liquid content. At $17.75 MPa$, the reduction in condensate recovery becomes more prominent and, at $14.75 MPa$, most of the pore space is bypassed by $CO_2$ injection. \begin{figure}[H] \begin{minipage}[l]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_225.png} \caption{$P=22 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_220.png} \caption{$P=21.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_215.png} \caption{$P=21 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_200.png} \caption{$P=19.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_180.png} \caption{$P=17.75 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.3\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=4cm]{Figures/CO2_99_150.png} \caption{$P=14.75 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[r]{1\textwidth} \begin{subfigure}{1\textwidth} \centering \includegraphics[width=10cm]{Figures/Colorbar.png} \end{subfigure} \end{minipage} \caption{$CO_2$ concentration in the networks after 25 PV of $CO_2$ injection at different pressures} \label{fig:C02_sat} \end{figure} The condensate saturation evolution during the injection of the gas mixtures containing $50\%$ in moles of the produced gas and $50\%$ of $C_1$, $C_2$, $CO_2$ or $N_2$ is presented in Figure \ref{fig:cond_sat_50}. Additionally, a comparison between the liquid saturation reductions achieved with the injection of pure $C_1$, $C_2$, $CO_2$ or $N_2$ and their mixtures with the produced gas is presented in Figure \ref{fig:SL_50_99}. \begin{figure}[H] \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_225_gas.png} \caption{$P=22 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_220_gas.png} \caption{$P=21.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_215_gas.png} \caption{$P=21 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_200_gas.png} \caption{$P=19.5 MPa$} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_180_gas.png} \caption{$P=17.75 MPa$} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/Sat_50_P_150_gas.png} \caption{$P=14.75 MPa$} \end{subfigure} \end{minipage} \hfill \caption{Condensate saturation evolution with time in the networks. Injection of gases at $50\%$ molar fraction.} \label{fig:cond_sat_50} \end{figure} When injected mixed with the produced gas, $C_1$ and $N_2$ were rather ineffective to reduce the accumulated condensate in the porous medium. At the highest evaluated pressure of $22 MPa$, both gases even enlarged the liquid content in the networks, as seen in Figure \ref{fig:cond_sat_50}(a). While the injection of the $C_1$ mixture led to an increase of $25.69\%$ in the liquid saturation in the network, the $N_2$ mixture enlarged it by $76.26\%$. This result is related to the negative effect of $C_1$ and $N_2$ on the reservoir mixture's liquid dropout at high pressures, as shown in Figure \ref{fig:LDO}(b). Yet, even at lower pressures, where the effects of $C_1$ and $N_2$ on condensate dropout become positive, very high liquid saturations remained in the networks after gas injection. This suggests that, to be successful as a condensate recovery method, the concentration of $C_1$ and $N_2$ flowing in porous media should be kept high, as the effects of mixing with the reservoir fluids can significantly reduce their ability to recover liquid. Contrarily, the results obtained with the injection of the $C_2$ and $CO_2$ mixtures showed very little sensitivity to the dilution with $50\%$ of the produced gas, especially at high pressures. \begin{figure}[H] \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/SL_C1.png} \caption{$C_1$ Injection} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/SL_C2.png} \caption{$C_2$ Injection} \end{subfigure} \end{minipage} \hfill \begin{minipage}[l]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/SL_CO2.png} \caption{$CO_2$ Injection} \end{subfigure} \end{minipage} \hfill{} \begin{minipage}[r]{0.45\textwidth} \centering \begin{subfigure}{1\textwidth} \includegraphics[width=7cm]{Figures/SL_N2.png} \caption{$N_2$ Injection} \end{subfigure} \end{minipage} \hfill \caption{Condensate saturation reductions after the injection of different gases, both pure or mixed with $50\%$ in moles with the produced gas.} \label{fig:SL_50_99} \end{figure} \subsection{Recovery of heavy components} \label{sec:rec_comp} \begin{figure}[H] \centering \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_99_C6.png} \caption{$C_6$ Recovery} \label{fig:C6_99} \end{subfigure} \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_99_C10.png} \caption{$C_{10}$ Recovery} \label{fig:C10_99} \end{subfigure} \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_99_C16.png} \caption{$C_{16}$ Recovery} \label{fig:C16_99} \end{subfigure} \caption{Recovery per mixture component. Injection of gases at $99\%$ molar fraction.} \label{fig:comp_99} \end{figure} Ideally, a gas mixture injected in a gas-condensate reservoir should be able to re-vaporize not only light, but also medium and heavy components accumulated in the porous medium during condensate banking. For this reason, the recoveries of the three heaviest components of the gas-condensate fluid used in this study, namely hexane, $C_6$, decane, $C_{10}$ and hexadecane, $C_{16}$, were quantified for all tested gas injection scenarios. The recoveries obtained with the injection of $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas are presented in Figure \ref{fig:comp_99}, while the recoveries obtained by injecting mixtures of these gases with the produced gas are shown in Figure \ref{fig:comp_50}. The results in Figure \ref{fig:comp_99} suggest that, when flowing at sufficiently high concentrations, $C_1$, $C_2$ and $CO_2$ are able to recover the three heaviest components evenly. For these cases, the recoveries of each analyzed component can be directly related to the reduction in liquid saturation shown in Figure \ref{fig:SL_50_99}. During the injection of $N_2$, however, the recovery of hexadecane was considerably lower than the recoveries of hexane and decane. Therefore, in this case, during the re-vaporization of condensate, the remaining liquid in the porous medium becomes particularly rich in $C_{16}$, impeding its recovery. This indicates that, even when flowing at high concentrations, nitrogen may be unable to retrieve the heaviest components accumulated in gas-condensate reservoirs. Finally, among the tested gases, the lowest recoveries of $C_6$, $C_{10}$ and $C_{16}$ were obtained with the injection of produced gas. In this case, even at high pressures, when the liquid saturations could be significantly reduced after gas flooding, valuable heavier components remained trapped in the porous medium. \begin{figure}[H] \centering \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_50_C6_gas.png} \caption{$C_6$ Recovery} \label{fig:C6_50} \end{subfigure} \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_50_C10_gas.png} \caption{$C_{10}$ Recovery} \label{fig:C10_50} \end{subfigure} \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Recovery_50_C16_gas.png} \caption{$C_{16}$ Recovery} \label{fig:C16_50} \end{subfigure} \caption{Recovery per mixture component. Injection of gases at $50\%$ molar fraction.} \label{fig:comp_50} \end{figure} Mixing $C_1$, $C_2$, $CO_2$ or $N_2$ with the produced gas at equal molar fractions before injection impacted significantly the recovery of heavy components, as shown in Figure \ref{fig:comp_50}. The injection of the mixture of $C_1$ and produced gas resulted in superior recoveries of hexane then those obtained with the injection of produced gas only, at all tested pressures. The same effect was observed for the recovery of decane, at pressures above $22 MPa$, and hexadecane, at pressures above $21 MPa$. When compared to the injection of pure $C_1$, however, the mixture of $C_1$ and produced gas led to significant lower recoveries of heavy components. Mixing $N_2$ with the produced gas led to even less favorable results. In these cases, the recoveries of heavy components were not only significantly lower than those obtained with the injection of pure $N_2$, but also, in most cases, than those achieved after the injection of produced gas only. Additionally, at high pressures, injecting the mixture of $N_2$ and produced gas led to an increased amount of trapped $C_{10}$ and $C{16}$ in the porous medium, even for the cases where the liquid saturation was reduced ($P=21.5 MPa$ and $P=21 MPa$). Therefore, in these cases, instead of re-vaporizing heavier components, the presence of $N_2$ in the injected mixture prompted a migration of $C_{10}$ and $C{16}$ from the gas to the liquid phase. The injection of the gas mixtures rich in $C_2$ and $CO_2$ displayed overall the best results among the tested cases. With the exception of the injection at the lowest tested pressure, adding $CO_2$ and $C_2$ to the produced gas increase significantly the recovery of the heavier components accumulated in the network. This positive outcome reinforces the hypothesis arisen in section \ref{sec:cond_sat} that $C_2$ and $CO_2$ are more suitable candidates for condensate enhanced recovery than $C_1$ and $N_2$. \subsection{Gas Relative Permeability} As a way of directly quantifying the gas flow improvement after gas injection, in this section, we compared the gas relative permeabilities before and after the treatment. Figure \ref{fig:krg} presents the gas relative permeabilities calculated after the flow of 25 PV of the gas-condensate fluid (labeled as GC Mixture) through the network and also after the 25 PV of gas flooding, using the different tested compositions. As can be seen in Figure \ref{fig:krg_99}, after the injection of pure $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas, the gas relative permeability through the network increased significantly, at all testes pressures. At $P\geq 19.5 MPa$, injecting $C_2$ and $CO_2$ almost recovered completely the medium's damage due to condensate banking. As for the injection of $C_1$, $N_2$ and produced gas, very high values of gas relative permeability, superior to $k_{rg}=0.8$, were achieved at $P\geq 21 MPa$. Even for the two lowest tested pressures, in which cases the liquid saturation could not be reduced to values below $20\%$, the gas relative permeabilities underwent at least a tenfold increase after gas flooding. \begin{figure}[H] \centering \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Krg_99.png} \caption{Gas relative permeabilities before and after the injection of 25 PV of $C_1$, $C_2$, $CO_2$, $N_2$ or produced gas.} \label{fig:krg_99} \end{subfigure} \begin{subfigure}[t]{0.75\textwidth} \includegraphics[width=100mm]{Figures/Krg_50.png} \caption{Gas relative permeabilities before and after the injection of 25 PV of $C_1$, $C_2$, $CO_2$, $N_2$ mixed with the produced gas (50\% in moles).} \label{fig:krg_50} \end{subfigure} \caption{Gas relative permeabilities before and after gas injection.} \label{fig:krg} \end{figure} In Figure \ref{fig:krg_50} we can see the gas relative permeabilities before and after the injection of $C_1$, $C_2$, $CO_2$ or $N_2$ mixed with he produced gas. At high injection pressures, mixtures of $C_2$ or $CO_2$ with the produced gas could still revert successfully the damage caused by condensate accumulation, leading to $k_{rg}\approx 1$. Yet, at the same high pressures, the injection of mixtures of $C_1$ and $N_2$ with the produced gas was not as beneficial to the gas flow. At $P=22 MPa$, the $C_1$ and $N_2$ mixtures reduced the gas relative permeability from $k_{rg}=0.757$ to $k_{rg}=0.435$ and $k_{rg}=0.0417$, respectively. These negative results were expected, as the injection of these mixtures increased the liquid saturation in the porous medium at the highest tested pressure (seen in Fig. \ref{fig:SL_50_99}b and d), due to their tendency to prompt an early condensation when mixed with the reservoir fluid (seen in Fig. \ref{fig:LDO}). At $P=21.5 MPa$ and $P=21 MPa$, however, the mixture of $N_2$ and produced gas still impacted negatively the gas flow, even though the condensate saturation in the porous medium was reduced after gas flooding. We attribute this gas flow hindrance to the effect of $N_2$ on the interfacial tension of the reservoir fluid's gas and liquid phases, explained next. Injecting gas on the reservoir after condensate accumulation affects not only the phases bulk properties (e.g. saturation, as seen in section \ref{sec:cond_sat}, and composition, section \ref{sec:rec_comp}), but also interfacial properties. Considering the potential impacts on relative permeability curves \citep{al2010phase,al2011effect,al2012mobility}, these effects should be taken into account when choosing a gas mixture composition for injection in gas-condensate reservoirs. Figure \ref{fig:ift} presents the interfacial tension for the mixtures containing $50\%$ $C_1$, $C_2$, $CO_2$ and $N_2$ and $50\%$ the reservoir fluid, in moles, calculated with the correlation proposed by \citet{WK}. The results obtained with the correlation indicate that, for all evaluated pressures, mixing $C_1$ and $N2$ with the reservoir fluid leads to an increase in the interfacial tension between gas and condensate. $C_2$, on the other hand, reduces the interfacial tension, while $CO_2$ has little effect on it. \begin{figure}[H] \centering \includegraphics[width=80mm]{Figures/IFT.png} \caption{Calculated interfacial tension for mixtures of the reservoir fluid with $C_1$, $C_1$, $CO_2$ or $N_2$ } \label{fig:ift} \end{figure} Therefore, the significant increase in interfacial tension observed with the addition of nitrogen to the reservoir fluid mixture can strengthen the mechanism behind condensate blockage, overriding the positive effects on flow achieved with the reduction of liquid saturation. These results are particularly relevant considering that most field scale numerical studies neglect the possible effects of the injected gas composition on the micro-scale gas-condensate displacement. With this oversight, estimated recoveries obtained with $C_1$ and, especially, $N_2$ injection in gas-condensate reservoirs \citep{linderman2008feasibility,taheri2013miscible,fath2016investigation} might have been overestimated. For this reason, further studies concerning the effects of interfacial tension alteration during gas injection for condensate enhanced recovery are highly recommended. \section{Discussion} \label{disc} The presented results emphasize the relevance of the injected gas composition and depletion stage in the reservoir for the success of gas injection as a condensate enhanced method. The findings suggest that $CO_2$ and $C_2$ are promising candidates for the studied method. Both gases displayed the overall highest liquid reduction potential, recovered efficiently heavy components and induced improvement in the gas-condensate relative permeability. Therefore, the use of $CO_2$ and $C_2$, either pure or mixed with another components due to cost and availability restrictions, should be further investigated for applications in partial pressure maintenance or huff-n-puff injection schemes. Pure $C_1$ injection also presented rather positive results and should be considered for injection aiming full or partial pressure maintenance. Relatively slow re-vaporization rate of condensate and potential increase in both interfacial tension and dew point pressure could, however, be a concern for the applications of $C_1$ flooding. Produced gas flooding led to similar liquid saturation reductions and gas relative permeability improvements as observed for the $C_1$ injection, but could not efficiently recover trapped heavy components from the porous medium, being considered, therefore, a slightly inferior option for condensate recovery. As for $N_2$ injection, given the feeble condensate re-vaporization tendency when mixed with the produced gas, low ability to recover heavy components and significant increase in interfacial tension, it should be carefully evaluated before being considered as a candidate for gas-condensate enhanced recovery. The relatively low injection costs \citep{linderman2008feasibility} might be canceled out by early condensation, poor two-phase flow performance and entrapment of heavy components in the porous medium. The level of depletion in the reservoir previous to the gas injection also affected notably the results. For the evaluated gas-condensate fluid, performing gas injection below the pressure associated with the maximum liquid dropout in the reservoir could not enhance significantly condensate recovery, for any tested gas composition. For this reason, the implementation of the EOR method in reservoirs at advanced stages of production might result in limited production improvement. The generalizability of the presented results is, however, bounded by some modeling limitations and particularities of the studied cases. First, the observed recoveries stemmed from mixing injected and reservoir fluids may depend upon the composition chosen to represent gas-condensate fluids. The extension of the analyses to different gas-condensate compositions could lead to variation in the results and, therefore, should be carried out. Additionally, porous media morphology can impact the performance of gas injection for condensate recovery, especially at low pressures, where the injected gas miscibility is limited. More heterogeneous media than the evaluated sandstone, for instance, may provide preferential paths for gas flow that deter the method's success, while very regular media could lead to increased recoveries. Finally, further studies should be performed to investigate the effects of gas injection rate on condensate recovery. As for the model limitations, the used compositional pore-network model does not take into account molecular diffusion. It has been pointed out in the literature \citep{taheri2013miscible,shtepani2006co2} that the effects of molecular diffusion during gas injection in gas-condensate reservoirs are not significant. Yet, for the analyses at low pressures, in which condensate recovery was low, implementing molecular diffusion in the model could produce more favorable results. Also, the implemented compositional formulation assumes thermodynamic equilibrium in each pore at every simulation time step. For this reason, non-equilibrium effects in the gas-condensate flow are not taken into consideration. Further investigation should be carried out on gas injection parameters, e.g. high flow rates, that may call for the incorporation of non-equilibrium effects in the model. \section{Conclusions} The present study provided a pore-scale evaluation of gas injection as a condensate enhanced recovery method. By using a compositional pore-network model, the effects of injected composition and pressure could be investigated by quantifying liquid saturation reduction, heavy component recovery and the impact on gas relative permeabilities. With these criteria, the performances of injecting $C_1$, $C_2$, $CO_2$, $N_2$, produced gas or their mixtures to recover the condensate accumulated in a sandstone based pore-network at different depletion stages were compared. The results indicated that gas injection can produce substantial flow improvement in damaged gas-condensate reservoirs, given that the injected gas composition and pressure for the treatment are adequately determined. Injecting $C_2$ and $CO_2$ produced the most favorable results among the tested gases, while $C_1$ and produced gas exhibited moderate positive effects on flow and $N_2$ displayed overall a less beneficial performance for condensate recovery. As a preliminary investigation of gas injection in gas-condensate reservoirs at the pore-scale, this work exposed how changing the phases bulk and interfacial properties can impact significantly the two-phase flow during condensate recovery and, consequently, the method's efficiency. Interfacial tension effects, often overlooked in the field literature, showed particularly relevance in gas flow performance after gas injection. By neglecting the potential negative effects of increase in interfacial tension during the injection of $C_1$ and $N_2$, condensate recovery predictions obtained with reservoir-scale models may be overestimated. As future work, a systematic pore-scale investigation of the parameters affecting condensate recovery with gas injection, as flow rate, gas-condensate fluid composition and porous media heterogeneity should be carried out. With that, data for up-scaling pore-scale effects pertaining to particular gas injection scenarios could be generated for reservoir-scale modeling. This could lead to more realistic recovery estimations and benefit gas-condensate fields development planning. \bibliographystyle{elsarticle-num-names}
\section{Introduction}\label{sec:1} Determining the forces acting on particles moving parallel to a wall in a shear flow is of primary importance to understand and predict many features of wall-bounded particle-laden flows. In particular, the wall-normal force component governs crucial phenomena characterizing the dynamics and transfer properties in these flows, such as particle deposition, resuspension, saltation and near-wall preferential concentration. This force, albeit usually small in magnitude, plays a central role in separation techniques involving nearly neutrally buoyant particles, such as field-flow fractionation or crossflow filtration. Considering very dilute suspensions in which inter-particle or wall-particle collisions and direct hydrodynamic interactions play little role, quantitative predictions of how the particles move within the fluid and how in turn their presence possibly affects the flow require accurate expressions for the forces acting on an isolated particle to be available. The present work aims at contributing to this goal by considering a variety of near-wall configurations and flow regimes, identifying the dominant physical mechanisms at play in each of them, and providing accurate fits for the drag and lift components of the force acting on a spherical particle translating with respect to the wall and obeying either a non-rotating or a torque-free condition Due to its symmetrical shape and to the reversibility of Stokes equations, a sphere does not experience any lift force in the creeping-flow regime \citep{1962_Bretherton}. Therefore, this force arises through inertial effects associated with the ambient shear and/or the sphere translation and/or rotation with respect to the ambient flow. In a fluid with kinematic viscosity $\nu$, inertial effects associated with these three contributions become comparable to viscous effects at a distance $r$ from the sphere center such that \begin{equation} r\sim\textit{O} (\widetilde L_u)\,, \quad r\sim\textit{O} (\widetilde L_\omega)\,, \quad r\sim\textit{O} (\widetilde L_\Omega)\,, \label{eq:inert_length} \end{equation} respectively. In \eqref{eq:inert_length}, $\widetilde L_u=\nu/|U_\text{rel}|$, $\widetilde L_\omega=(\nu/\gamma)^{1/2}$ and $\widetilde L_\Omega=(\nu/\Omega)^{1/2}$ are the so-called Oseen, Saffman and Magnus lengths, respectively, $U_\text{rel}$, $\gamma$ and $\Omega$ denoting the relative (or slip) velocity between the sphere and fluid, the shear rate in the undisturbed flow, and the norm of the sphere rotation rate $\boldsymbol{\Omega}$, respectively. In an unbounded shear flow, the vorticity generated at the sphere surface is advected asymmetrically in the wake by the ambient shear, yielding a transverse pressure gradient at distances of $\mathcal{O}(\widetilde L_\omega)$ downstream from the sphere, which results in a lift force directed toward the high- (low-) velocity side if the sphere lags behind (leads) the fluid. A similar mechanism is involved at distances of $\mathcal{O}(\widetilde L_\Omega)$ in the wake of a spinning sphere translating in a fluid at rest, and results in a Magnus or spin-induced lift force. A closed-form expression was obtained for this force in \cite{1961_Rubinow}, assuming the slip and rotation Reynolds numbers to be small. If the sphere obeys a torque-free condition, as freely moving particles usually do if they do not collide with another particle or a wall, the spinning rate remains slow, implying $ \widetilde L_\Omega > \max(\widetilde L_u,\widetilde L_\omega) $. In this case, the parameter $ \varepsilon=\widetilde L_u/\widetilde L_\omega$ determines whether inertial effects are rather dominated by the ambient shear ($\varepsilon>1$) or the particle slip ($\varepsilon<1$). Saffman \citep{1965_Saffman, 1968_Saffman} considered a small sphere translating in an unbounded linear shear flow and obtained the shear-induced lift force in closed form in the limit $ \varepsilon \gg1 $, assuming the slip and shear Reynolds numbers based on the sphere radius to be small. His prediction was extended to finite $ \varepsilon $ in \cite{1989_Asmolov} and \cite{1991_McLaughlin}, the results revealing that the lift force strongly decreases as the relative influence of the sphere translation increases, i.e. as $ \varepsilon$ decreases. Experiments \cite{1994b_Cherukat} and simulations \cite{1999_Cherukat} have confirmed these predictions down to $\varepsilon\approx0.4$ for particles with slip Reynolds numbers up to unity. Further insight into the shear-induced lift force in an unbounded fluid at higher Reynolds number was obtained through numerical studies \cite{1999_Kurose,2002_Bagchi_2}, revealing in particular that the distribution of the viscous stresses in the recirculating flow region at the back of the sphere makes this force reverse beyond a slip Reynolds number of some tens. Influence of the sphere rotation on the drag and lift forces in inertia-dominated regimes has also been examined, both for an imposed spinning motion and a torque-free condition \cite{1999_Kurose,2002_Bagchi}.\\ \indent When the flow is bounded by a single flat wall, the separation distance $ \widetilde L $ from the sphere center to the wall competes with the above three visco-inertial length scales through the ratios \begin{equation} L_u=\widetilde L / \widetilde L_u=\frac{\widetilde L|U_\text{rel}| }{\nu}\,,\quad L_\omega=\widetilde L / \widetilde L_\omega=\frac{\widetilde L\gamma^{1/2}}{\nu^{1/2}}\,,\quad L_\Omega=\widetilde L / \widetilde L_\Omega=\frac{\widetilde L\Omega^{1/2}}{\nu^{1/2}}\,, \end{equation} which may be thought of as Reynolds numbers based on $ \widetilde L $ rather than on the particle size. In the sense of matched asymptotic expansions, the wall is located in the inner region of the disturbance if $ \max(L_u,L_\omega,L_\Omega)<1 $ (strictly speaking $\ll1$), while it stands in the outer region otherwise. Fundamental results were established by Cox \& Brenner \cite{1968_Cox} in the former case, showing in particular that, owing to the screening effect exerted by the wall, the leading-order estimate of the lift force may then be obtained through a regular expansion procedure. This work also enlightened the manner in which the generalized reciprocal theorem may be employed to obtain the lift force in the form of a volume integral solely involving creeping-flow solutions past the sphere. Asymptotic predictions for the slip-induced lift force acting on rigid spheres sedimenting close to a vertical wall in a fluid at rest in the low-Reynolds-number regime were obtained in \cite{1977_Cox} (based on the results of \cite{1968_Cox}) and \cite{1977_Vasseur}, assuming that the wall lies in the inner and outer regions of the disturbance, respectively. In this configuration, the lift force always tend to repel the particle from the wall and decreases gradually with increasing $L_u$. Considering the physical origin of the wall-particle interaction responsible for this force, which directly stems from wall-induced corrections to the flow in the wake region, the prediction of \cite{1977_Vasseur} was extended in a semiempirical manner up to slip Reynolds numbers of $\mathcal{O}(100)$, based on experiments performed with contaminated nearly-spherical air bubbles \citep{2003_Takemura}. Fully resolved simulations \citep{2005_Zeng,2009_Zeng} subsequently confirmed this semiempirical prediction. Still in the low-but-finite Reynolds number regime, predictions for the shear-induced lift force in the presence of a wall standing in the inner region of the disturbance were also obtained in \cite{1977_Cox}, both for neutrally buoyant and negatively or positively buoyant particles. These results were then extended to the case of a wall standing in the outer region, first in the limit $\varepsilon\gg1$ \cite{1989_Asmolov}, then for arbitrary $\varepsilon$ \cite{1990_Asmolov,1993_McLaughlin}. These predictions were found to be valid up to slip Reynolds numbers of order unity in experiments performed under conditions $\varepsilon\lesssim1$ \cite{2009_Takemura_a,2009_Takemura_b}. They bridge the gap between those of \cite{1977_Cox} and \cite{1991_McLaughlin} (hence \cite{1965_Saffman} in the limit $\varepsilon\gg1$), the latter being recovered in the limit where the wall is moved to infinity. While the slip-induced and shear-induced contributions to the lift superimpose linearly when the wall stands in the inner region, they are intrinsically coupled otherwise, owing to the nonlinear nature of the Oseen equation. Both contributions are directed away from the wall if the sphere lags behind the fluid, which is the case for a negatively (positively) buoyant particle in an upward (downward) shear flow near a vertical wall. Conversely, if the sphere leads the fluid, as for a light (heavy) particle in an upward (downward) shear flow, the shear-induced contribution tends to attract it toward the wall. In this case, the total lift force is attractive for large enough separations, but becomes repulsive again for short separations. This is because the wall influence gradually weakens the shear-induced contribution as the separation decreases, making the slip effect eventually dominant very close to the wall. In the above studies, the wall was considered sufficiently distant from the particle for the latter to be shrunk to a point. Obviously, this approximation is not tenable when the separation becomes of the order of a few sphere radii or less. Higher-order corrections accounting for the sphere finite size were obtained through the `reflection' technique \cite{2003_Magnaudet} (see also appendix A of \cite{1994_Cherukat}), but this approach cannot deal with situations in with the gap is less than typically the sphere radius. The combined use of exact creeping-flow solutions based on bi-spherical coordinates and the generalized reciprocal theorem allowed rational fits for the various contributions to the lift force to be obtained down to very small separations for both non-rotating and torque-free spheres \cite{1994_Cherukat, 1995_Cherukat,2010_Yahiaoui}. The limit case of a sphere held fixed on the wall, and that of a freely sliding and rolling sphere were worked out in \cite{1985_Leighton} and \cite{1995_Krishnan}, respectively.\\ \indent Numerical studies of hydrodynamic forces in near-wall configurations are quite scarce, presumably because they demand accurate boundary-fitted grids or refined immersed boundary techniques to properly capture the flow within the wall-particle gap. Variations of the slip- and shear-induced drag and lift forces in the low-but-finite Reynolds number regime with the wall located in either region of the disturbance were recently explored for both neutrally buoyant particles \cite{2020_Ekanayake_a} and arbitrarily buoyant particles \cite{2020_Ekanayake_b}. The characteristics of the slip-induced lift force in a wall-bounded fluid at rest were examined in detail in \cite{2005_Zeng} and \cite{2009_Zeng} down to small gaps and from Reynolds numbers of $\mathcal{O}(1)$ up to a few hundred. The same range of separations and Reynolds numbers was considered in \cite{2009_Zeng} for a sphere held fixed with respect to the wall in a linear shear flow, a very specific choice corresponding to $L_u=L_\omega^2$. Near-wall forces acting on a sphere forced to spin in a fluid at rest were determined in \cite{2010_Lee} over a quite similar range of parameters, together with those experienced by a sphere immersed in a shear flow which either slides on the wall or spins very close to it.\\ \indent From the above review it appears that no study has considered inertia-dominated regimes for an arbitrarily translating and possibly freely rotating rigid sphere immersed in a wall-bounded shear flow, a situation of particular relevance to the widely encountered case of buoyant particles moving near a vertical wall. This is the problem addressed in the present work. The same problem was recently considered in \cite{2020_Shi_a} for spherical bubbles with a clean, i.e. shear-free, surface. Compared to the rigid sphere case, this difference in the dynamic boundary condition at the particle surface is known to affect the magnitude of the wall-induced forces in the low-Reynolds-number regime, but not the manner they vary with the flow parameters \cite{2003_Magnaudet}. This is no longer the case beyond Reynolds numbers of a few units, due to the much larger amount of vorticity produced at the sphere surface when the no-slip condition applies. In particular this difference results in the fact that the flow does not separate past a spherical bubble even at large Reynolds number while it does past a rigid sphere beyond a Reynolds number of $\mathcal{O}(10)$. In what follows we report on the results of fully resolved simulations of the flow past a freely translating and possibly rotating sphere. The sphere is immersed in a wall-bounded linear shear flow, may either lead the fluid or lag behind it, and obeys a non-rotating or a torque-free condition. In Sec. \ref{sec:2} we formulate the problem, specify the considered range of parameters and outline the numerical approach which is essentially similar to that employed in \cite{2020_Shi_a}. Section \ref{sec:3} summarizes theoretical and semiempirical expressions for the forces acting on a sphere in an unbounded shear flow and in wall-bounded configurations. Numerical results are first used in Sec. \ref{sec:4} to examine the physical mechanisms induced by the presence of the wall and the corresponding alterations of the near-sphere flow in the various regimes. Variations of the drag and lift forces with the flow parameters are analyzed in Sec. \ref{sec:5}. Empirical fits reproducing the observed variations in specific regimes or throughout the entire parameter range of the simulations are established. A summary of the main outcomes, especially regarding these empirical fits of direct interest in applications, is provided in Sec. \ref{sec:6}. \section{Statement of the problem and outline of the simulation approach}\label{sec:2} We define a Cartesian coordinate system $(Oxyz)$ with the origin located at the center of the sphere, as illustrated in Fig. \ref{fig:schem_bub_mov}. We assume that the sphere moves parallel to a single planar wall with a translational velocity $\boldsymbol{V}=V\boldsymbol{e}_z$ and a rotational velocity $\boldsymbol{\Omega}=-\Omega\boldsymbol{e}_y$. The wall is located at $x=-\widetilde L$ and $\boldsymbol{e}_x$ denotes the wall-normal unit vector pointing into the fluid. In the reference frame translating with the sphere, the undisturbed flow is a one-dimensional linear shear flow with a velocity profile $\boldsymbol{u}_\infty=[\gamma(\widetilde L+x)-V]\boldsymbol{e}_z$ and a spanwise vorticity $\boldsymbol{\omega}_\infty=-\gamma \boldsymbol{e}_ {y}$. The relative (or slip) velocity of the fluid with respect to the sphere is then $\boldsymbol{U}_\text {rel}=(\gamma\widetilde L-V)\boldsymbol{e}_z$. The fluid velocity and pressure fields in the presence of the sphere are denoted by $\boldsymbol{u}$ and $p$, respectively, and $\boldsymbol\omega={\nabla}\times\boldsymbol{u}$ denotes the vorticity. \begin{figure} \centerline{\includegraphics[scale=1]{schem_bub_mov.eps}} \caption{Schematic of a sphere moving in a wall-bounded linear shear flow.} \label{fig:schem_bub_mov} \end{figure} Assuming the fluid to be Newtonian and considering the flow as incompressible, the continuity and Navier-Stokes equations read \refstepcounter{equation} $$ \nabla\cdot \boldsymbol{u}=0\,; \quad {\frac{\partial \boldsymbol{u}}{\partial t}+\boldsymbol{u}\cdot \nabla\boldsymbol{u}=-\frac{1}{\rho } \nabla p+ \nu\nabla^2\boldsymbol{u}}\,, \eqno{(\theequation{\text{a},\text{b}})} \label{eq:ns} $$ with $\rho$ and $\nu$ the fluid density and kinematic viscosity, respectively. Boundary conditions at the sphere surface, at the wall, and in the far field read, respectively \begin{equation} \boldsymbol{u}=\left\{ \begin{array}{ll} \boldsymbol{\Omega} \times \boldsymbol{r} & \mbox{for}\quad r=d/2\,, \\[2pt] -V\boldsymbol{e}_z & \mbox{for}\quad x=-\widetilde L\,, \\[2pt] \boldsymbol{u}_\infty=[\gamma (\widetilde L+x)-V]\boldsymbol{e}_z & \mbox{for}\quad r\to \infty\,, \end{array} \right. \label{eq:BC1} \end{equation} where $r=(x^2+y^2+z^2)^{1/2}$ denotes the distance to the sphere center, and $d$ is the sphere diameter. With the above boundary conditions, the steady flow field past the sphere depends on four characteristic parameters, namely the slip Reynolds number, $\text{Re}$, the dimensionless shear rate, $\text{Sr}$, the dimensionless sphere rotation rate, $\text{Rr}$, and the normalized wall distance, $L_\text{R}$. These control parameters are defined as \begin{equation} \text{Re}=\frac{|U_\text {rel}|d}{\nu}, \quad \text{Sr}=\frac{\gamma d}{U_\text {rel}}, \quad \text{Rr}=\frac{\Omega d}{U_\text {rel}}, \quad L_\text{R}=\frac{2\widetilde L}{d}, \label{eq:def_var} \end{equation} with $U_\text {rel}=\boldsymbol{U}_\text {rel}\cdot \boldsymbol{e}_ {z}$ and $\Omega=-\boldsymbol{\Omega}\cdot \boldsymbol{e}_ {y}$. Under the torque-free condition, $\text{Rr}$ is entirely determined by the other three parameters and is no longer an independent control parameter. A positive (negative) $\text{Sr}$ indicates that the sphere lags (leads) the fluid, the former case corresponding to the flow configuration sketched in Fig. \ref{fig:schem_bub_mov}. In most of this work, $\text{Re}$, $\text{Sr}$, and $L_\text{R}$ are varied in the range $[0.1, 250]$, $ [-0.5, 0.5]$, and $[1.5, 8]$, respectively. Hence $\varepsilon$ is up to $2.2$ for $\text{Re}=0.1$ and becomes less than $1$ as soon as $\text{Re}>0.5$, and even less than $0.1$ beyond $\text{Re}=50$. In an unbounded fluid, the shear-induced transverse force is proportional to $\text{Sr}$, so that its sign changes with that of $U_\text {rel}$. In the presence of a nearby wall, three different regimes are encountered. If $\text{Sr}\ll1$, the transverse force results primarily from the particle relative translation with respect to the wall, which at low-but-finite Reynolds number makes it proportional to $\text{Re}$. In contrast, when $\text{Sr}\gg1$, i.e. the slip velocity is small compared to the shear-induced velocity variation at the particle scale, the dominant contribution to the transverse force is proportional to $\text{Sr}^2$. This regime, relevant to small nearly neutrally buoyant particles, will not be considered here (it was recently specifically examined in \cite{2018_Asmolov, 2020_Ekanayake_b} in the low-$\text{Re}$ range, with applications to inertial microfluidics in mind). The near-wall transverse force does not change sign with $U_\text {rel}$ in the above two regimes, being repulsive in both cases. In contrast, it may change sign when $\text{Sr}\lesssim1$, which is the regime we are primarily interested in.\\ \indent Let us briefly illustrate some flow configurations covered by the above parameter range. Consider for instance a $1\,$mm-diameter particle sedimenting in water and assume the particle is twice as dense as the fluid. Then the standard drag law predicts that its slip Reynolds number is approximately $115$. With $|\text{Sr}|=0.5$, this yields $\gamma\approx57\,\text{s}^{-1}$. This is for instance the near-wall shear rate in the laminar flow in a $15\,$mm-high plane channel, the corresponding Reynolds number $\text{Re}_\text{H}$ based on the depth-averaged velocity being $\text{Re}_\text{H}\approx2200$. In the same configuration, a particle ten times smaller ($d=0.1\,$mm) has a slip Reynolds number close to $0.55$ and the shear rate corresponding to $|\text{Sr}|=0.5$ is $27\,\text{s}^{-1}$, the near-wall value reached in a $1.5\,$mm-high channel with $\text{Re}_\text{H}\approx10$. Consider now that the largest of the above two particles is immersed in a vertical turbulent boundary layer and stands $1\,$mm apart from the wall (which corresponds to $L_\text{R}=2$) in the logarithmic region. Then, equating $\gamma$ to the local time-averaged shear rate $u^*/(\kappa L_\text{R})$, with $\kappa=0.4$ the von K\'arm\'an constant, the associated friction velocity $u^*$ is close to $2.25\,\text{cm.s}^{-1}$, which corresponds to an outer velocity close to $0.6\,\text{m.s}^{-1}$, i.e. $\text{Re}_\text{H}\approx3\times10^4$ if the flow takes place in a $5\,$cm-high channel. Still with $L_\text{R}=2$, the $d=0.1\,$mm particle rather stands within the viscous sublayer. There, the time-averaged shear rate corresponding to $|\text{Sr}|=0.5$ is $\gamma=u*^2/\nu\approx27\,\text{s}^{-1}$, which yields $u^*\approx5.2\,\text{mm.s}^{-1}$, hence an outer velocity close to $15\,\text{cm.s}^{-1}$ corresponding to $\text{Re}_\text{H}\approx7500$. \indent In the present problem, the drag force parallel to $\boldsymbol{U}_\text {rel}$, $F_\text D$, the lift force parallel to $\boldsymbol{e}_x$, $F_\text L$, and the torque antiparallel to $\boldsymbol{e}_y$, $M$, acting on the sphere are defined as \begin{equation} F_\text D=\frac{\boldsymbol{U}_\text {rel}}{||\boldsymbol{U}_\text {rel}||}\cdot \int_\Gamma \boldsymbol{\Sigma} \cdot \boldsymbol{n}\:\mathrm{d} \Gamma, \quad F_\text L=\boldsymbol{e}_x \cdot \int_\Gamma \boldsymbol{\Sigma} \cdot \boldsymbol{n}\:\mathrm{d} \Gamma, \quad M=-\boldsymbol{e}_y \cdot \int_\Gamma \boldsymbol{r}\times (\boldsymbol{\Sigma} \cdot \boldsymbol{n}) \:\mathrm{d} \Gamma, \label{eq:def_force} \end{equation} where $\boldsymbol{\Sigma}$ is the stress tensor and $\boldsymbol{n}$ denotes the outward unit normal to the sphere surface $\Gamma$. Results concerning the two force components will be expressed in terms of the lift and drag coefficients, $C_\text L$ and $C_\text D$, obtained by dividing the corresponding force by $\pi d^2\rho U_\text {rel}^2/8$. According to the above definition, a negative (positive) $C_\text L$ corresponds to a force directed toward (away from) the wall. In the case of a non-rotating sphere, results concerning the hydrodynamic torque will be expressed using the torque coefficient $C_\text M=M/(\pi d^3\rho U_\text {rel}^2/16)$. We use the notations $C_\text D^\text W$ ($C_\text L^\text W$) and $C_\text D^\text U$ ($C_\text L^\text U$) to denote the drag (lift) coefficients in wall-bounded and unbounded flows, respectively. Situations where the wall lies in the inner or outer region of the disturbance will be distinguished by superscripts $\text{W-in}$ and $\text{W-out}$, respectively. Results for the drag coefficient are usually given in the form of the relative wall-induced change $\Delta C_\text D=(C_\text D^\text W-C_{\text D0}^\text U)/C_{\text D0}^\text U$, with $C_{\text D0}^\text U$ denoting the drag coefficient on a sphere translating in an unbounded uniform fluid. Drag (lift) contributions corresponding to the slip-induced effect are denoted with the subscript $\text Du$ ($\text Lu$), while those corresponding to the shear-induced effect are denoted with the subscript $\text D\omega$ ($\text L\omega$). Similar conventions are applied to the rotation rate, $\text{Rr}$. The three-dimensional flow field past the sphere is computed with the JADIM code developed at IMFT. The sphere center stands on the axis of a large cylindrical computational domain, one base of which coincides with the wall. The reader is referred to \cite{2020_Shi_a} for numerical aspects concerning the specificities of the code, the size of the computational domain (varied with $\text{Re}$ so as to minimize confinement effects in all flow regimes), the grid system and number of nodes in each direction (which also varies with $\text{Re}$, to ensure that the boundary layer and the near wake are properly resolved), and the boundary conditions. Comparison with available data and asymptotic predictions may be found in the same reference, together with grid convergence tests. To achieve the torque-free condition, the sphere rotation rate $\text{Rr}$ is computed through an iterative approach. First, the steady flow around a non-rotating sphere is determined to obtain the corresponding torque coefficient, $C_\text {M,0}$. Then the rotation rate is updated as $\text{Rr}_1 = \text{Rr}_0+C_\text {M,0}\text{Re}/16$ and the corresponding steady flow field is determined to obtain the new torque coefficient, $C_\text {M,1}$. This procedure is continued until the torque coefficient becomes less than $0.05C_\text {M,0}$. \section{Analytical solutions and empirical predictions}\label{sec:3} \subsubsection{Unbounded linear shear flow}\label{sec:3.1} \indent At low-but-finite Reynolds number, the presence of a uniform shear in an unbounded flow domain results in a transverse or lift force on a sphere in the direction of $\boldsymbol{U}_\text {rel}\times\boldsymbol{\omega}$. For $\text{Sr}\gg1$, the leading-order force is proportional to $(|\text{Sr}|/\text{Re})^{1/2}$. In the case of a non-rotating sphere, the corresponding lift coefficient takes the form \citep{1965_Saffman, 1991_McLaughlin} \refstepcounter{equation} $$ C_{\text L\omega}^\text U(\text{Re}\ll1)=\frac{18}{\pi^2}\sgn(\text{Sr})\varepsilon J_\text L(\varepsilon) \quad\mbox{with}\quad J_\text L(\varepsilon)\approx2.254(1+0.2\varepsilon^{-2})^{-3/2}\,, \eqno{(\theequation{\text{a},\text{b}})}\label{eq:U_low_Re} $$ where $\varepsilon=\widetilde L_u/\widetilde L_\omega=(|\text{Sr}|/\text{Re})^{1/2}$ is the ratio of the Oseen and Saffman lengths, and $\sgn(\text{Sr})=\text{Sr}/|\text{Sr}|$. Assuming $\text{Re}$ and $\text{Re}\text{Rr}$ to be small, a rotating sphere translating in a fluid at rest experiences a transverse force $\frac{\pi}{8} \rho d^3 \boldsymbol{\Omega}\times\boldsymbol{U}_\text {rel}$ \citep{1961_Rubinow}, which yields a lift coefficient $C_{\text L\Omega}^\text U[\text{Re}\ll1]=\text{Rr}$. When ambient shear and rotation act together, the total lift force including $\mathcal{O}(\text{Rr})$- and $\mathcal{O}(\text{Sr})$-effects is the sum of the two individual contributions, and involves a second-order shear-induced contribution lowering the lift coefficient by $-\frac{11}{8}\text{Sr}$ in the limit $|\text{Sr}|\gg1$ \citep{1965_Saffman}. Therefore, the total lift coefficient takes the form \begin{equation} C_{\text L\omega}^\text U(\text{Re}\ll1)\approx\frac{18}{\pi^2}\sgn(\text{Sr})\varepsilon J_\text L(\varepsilon)-\frac{11}{8}\text{Sr}+\text{Rr}\,, \label{eq:U_low_Re_tf} \end{equation} If the torque-free condition holds, the leading-order sphere rotation rate in the low-$\text{Re}$ regime is half the undisturbed flow vorticity, i.e. \begin{equation} \text{Rr}=\text{Rr}^\text U(\text{Re}\ll1)\approx \frac{1}{2}\text{Sr} \,. \label{eq:spin_rate_u_lowRe} \end{equation} Consequently, the rotation-induced and second-order shear-induced lift forces combine in a correction of $-\frac{7}{8}\text{Sr}$ to (\ref{eq:U_low_Re}) \citep{1965_Saffman}. \\ At low-to-moderate Reynolds numbers, the shear-induced lift force predicted by \eqref{eq:U_low_Re} agrees well with numerical data for non-rotating spheres up $\text{Re}\approx10$ \citep{1999_Kurose}. Increasing $\text{Re}$, this force first exhibits weak positive values up to $\text{Re}\approx50$. Beyond this range, it changes sign, owing to the influence of the standing eddy on the stress distribution at the rear of the sphere. For $\text{Re}\gtrsim50$, the numerical results of \cite{1999_Kurose} and \cite{2002_Bagchi} are adequately fitted by the empirical correlation \cite{2008_Loth} \begin{equation} C_{\text L\omega}^\text U[\text{Re}=\mathcal{O}(100)]\approx -\sgn(\text{Sr})|\text{Sr}|^{1/3}\left\{0.0525+0.0575\tanh\left[11.5\log\left(\frac{\text{Re}}{120}\right)\right]\right\}\,. \label{eq:lift_loth} \end{equation} The spin-induced lift coefficient $C_{\text L\Omega}^\text U(\text{Re})$ remains linearly proportional to the rotation rate at moderate Reynolds number. Setting $C_{\text L\Omega}^\text U(\text{Re})=c_{\text L\Omega}^\text U(\text{Re})\text{Rr}$, the coefficient $c_{\text L\Omega}^\text U$ is found to be smaller than unity and nearly independent of the Reynolds number for $\text{Re}\gtrsim1$. According to \citep{2002_Bagchi}, one has at moderate $\text{Re}$ \begin{equation} c_{\text L\Omega}^\text U[\text{Re}=\mathcal{O}(1-100)]\approx 0.55\,. \label{eq:spin_lift_u} \end{equation} In the same range of Reynolds number, the torque-free spin rate normalized by the ambient rotation rate is found to depend only on $\text{Re}$ in the form \citep{2002_Bagchi} \begin{equation} \text{Rr}=\text{Rr}^\text U [\text{Re}=\mathcal{O}(1-100)]\approx f_{\Omega}^\text U(\text{Re})\frac{\text{Sr}}{2} \label{eq:spin_rate_ua} \end{equation} with \begin{equation} f_{\Omega}^\text U(\text{Re})\approx1-0.0364\text{Re}^{0.95}\quad\mbox{for}\quad 0.5\leq\text{Re}\leq5\quad\mbox{and}\quad f_{\Omega}^\text U(\text{Re})\approx1-0.0755\text{Re}^{0.455}\quad \mbox{for}\quad\text{Re}>5 \,. \label{eq:spin_rate_ub} \end{equation} Available DNS results for torque-free rotating spheres suggest that contributions of shear and rotation still superpose linearly in the lift force up to $\text{Re}=100$ \citep{2019_Shi}. \subsubsection{Low-$Re$ wall-bounded shear flow}\label{sec:3.2} The presence of a nearby wall results in a drag increase, while for reasons mentioned above it may either increase or decrease the transverse force, depending on the sign of $\text{Sr}$. For $\text{Re}\ll1$, situations where the wall lies in the inner region of the disturbance, i.e. $\max{(L_u, L_\omega, L_\Omega)} \ll1$, were investigated in \cite{1967_Goldman_a,1967_Goldman_b,1977_Cox,1994_Cherukat, 2003_Magnaudet}. In the case of a non-rotating sphere, the results of \cite{1994_Cherukat} indicate that the lift coefficient is approximately \footnote{ In (\ref{eq:CLWin}), pre-factors expressed in fractional form were derived analytically by Lovalenti in an appendix to \cite{1994_Cherukat}, while those expressed in decimal form originate from the fitted value of the force computed in the form of a volume integral in the same reference.} \begin{eqnarray} \begin{aligned} C_\text L^\text{W-in}(\text{Sr},L_\text{R})&= \underbrace{\frac{9}{8}\left(1+\frac{1}{8}L_\text{R}^{-1}-0.413L_\text{R}^{-2}+0.270L_\text{R}^{-3} \right) }_{C_{\text Lu}^\text{W-in}} \\&+ \underbrace{ \frac{33}{32}\left(L_\text{R}+\frac{17}{48}+0.643L_\text{R}^{-1}-0.280L_\text{R}^{-2} \right)\text{Sr}+\frac{61}{192}\left(1+0.527L_\text{R}^{-1}-1.200L_\text{R}^{-2}+0.657L_\text{R}^{-3}\right)\text{Sr}^2}_{C_{\text L\omega}^\text{W-in}}\,. \label{eq:CLWin} \end{aligned} \end{eqnarray} Similarly, in the case of a torque-free rotating sphere, one has \begin{eqnarray} \begin{aligned} C_\text L^\text{W-in}(\text{Sr},L_\text{R})&= \underbrace{\frac{9}{8}\left(1+\frac{3}{16}L_\text{R}^{-1}-0.511L_\text{R}^{-2}+0.287L_\text{R}^{-3} \right) }_{C_{\text Lu}^\text{W-in}} \\&+ \underbrace{ \frac{33}{32}\left(L_\text{R}+\frac{443}{528}+0.258L_\text{R}^{-1}-0.145L_\text{R}^{-2}\right)\text{Sr}+\frac{55}{192}\left(1+\frac{9}{16}L_\text{R}^{-1}-1.090L_\text{R}^{-2}+0.568L_\text{R}^{-3}\right)\text{Sr}^2}_{C_{\text L\omega}^\text{W-in}}\,. \label{eq:CLWin_tf} \end{aligned} \end{eqnarray} The difference between \eqref{eq:CLWin} and \eqref{eq:CLWin_tf} indicates an increase of the lift coefficient by $\frac{1}{2}\text{Sr}$ and a decrease by $-\frac{1}{32}\text{Sr}^2$ for large $L_\text{R}$, when switching from the zero-rotation condition to the zero-torque one. The $\frac{1}{2}\text{Sr}$-increase is in line with the contribution of the torque-free rotation to the lift force found in the unbounded case.\\ \indent Still for a torque-free sphere, the dimensionless rotation rate is approximately \citep {1967_Goldman_a,1967_Goldman_b,2003_Magnaudet} \begin{equation} \text{Rr}^\text{W-in}(\text{Sr},L_\text{R})\approx\underbrace{- \frac{3}{16}L_\text{R}^{-4}\left(1-\frac{3}{8}L_\text{R}^{-1}\right) }_{\text{Rr}_u^\text{W-in}} +\underbrace{\frac{1}{2}\left(1-\frac{5}{16}L_\text{R}^{-3}\right)\text{Sr} }_{\text{Rr}_ \omega^\text{W-in}}\,, \label{eq:spin_rate_w} \end{equation} while the variation of the drag force is \citep{2003_Magnaudet} \begin{eqnarray} \begin{aligned} \Delta C_\text D^\text{W-in}(\text{Sr},L_\text{R})&= \underbrace{ \left( \frac{9}{16}L_\text{R}^{-1}-\frac{1}{8}L_\text{R}^{-3}+\frac{45}{256}L_\text{R}^{-4}+\frac{1}{16}L_\text{R}^{-5} \right) \left( 1-\frac{9}{16}L_\text{R}^{-1}+\frac{1}{8}L_\text{R}^{-3}-\frac{45}{256}L_\text{R}^{-4}-\frac{1}{16}L_\text{R}^{-5} \right)^{-1} }_{\Delta C_{\text Du}^\text{W-in}} \\& - \underbrace{ \frac{5}{32} \left( L_\text{R}^{-2}+\frac{9}{16}L_\text{R}^{-3} \right)\text{Sr}\,, }_{\Delta C_{\text D\omega}^\text{W-in}}\, \label{eq:CDWin_tf} \end{aligned} \end{eqnarray} where $\Delta C_\text D^\text{W-in}(\text{Sr},L_\text{R})=\left(C_\text D^\text{W-in}(\text{Sr},L_\text{R})-C_\text {D0}^\text U(\text{Re}\rightarrow0)\right)/C_\text {D0}^\text U(\text{Re}\rightarrow0)$, with $C_\text {D0}^\text U(\text{Re}\rightarrow0)=24/\text{Re}$ the drag coefficient in the creeping flow limit. Since the leading contribution of the particle rotation to the drag force is known to be proportional to $L_\text{R}^{-4}\text{Rr}$ \citep {1967_Goldman_a}, the above $\mathcal{O}(L_\text{R}^{-5})-\mathcal{O}(L_\text{R}^{-3}\text{Sr})$ approximation for $\Delta C_\text D^\text{W-in}(\text{Sr},L_\text{R})$ also holds for a non-rotating sphere. When the wall lies in the outer region of the disturbance, the relative length scales $L_u$, $L_\omega$, and $L_\Omega$ are no longer small. Hence, in addition to $L_\text{R}$, the drag and lift forces depend on these three visco-inertial length scales. This situation was investigated in the shearless non-rotating case ($L_\omega \to 0$, $L_\Omega \to 0$) in \cite{1977_Vasseur}, neglecting the finite size of the particle. The relevant solutions were obtained in the form of double integrals which can be approximated as \citep{2020_Shi_a} \begin{equation} \frac{16}{9}L_\text{R}\Delta C_{\text Du}^\text{W-out}(\text{Re}\lesssim1)= f_\text D^{\prime}(L_u)\approx\frac{1}{1+0.16L_u(L_u+4)}\,, \label{eq:fD_prime} \end{equation} and \begin{equation} \frac{8}{9} C_{\text Lu}^\text{W-out}(\text{Re}\lesssim1)=f_\text L^{\prime}(L_u)\approx\left\{ \begin{array}{ll} [1+0.13L_u(L_u+0.53)]^{-1} & \mbox{for}\quad L_u\leq10\,, \\[2pt] 7.95L_u^{-2.09} & \mbox{for}\quad L_u>10\,, \end{array} \right. \label{eq:fL_prime} \end{equation} with $\Delta C_{\text Du}^\text{W-out}(\text{Re}\ll1)=\left(C_{\text Du}^\text{W-out}(L_u,L_\text{R})-C_{\text D0}^\text U(\text{Re}\rightarrow0)\right)/C_{\text D0}^\text U(\text{Re}\rightarrow0)$. The two functions $f_\text D^{\prime}$ and $f_\text L^{\prime}$ describe how the wall-induced drag modification and the transverse force decay as inertial effects in the bulk become dominant compared to the wall influence. In the presence of shear, the case of a non-rotating sphere close to a wall standing in the outer region of the disturbance was worked out in \cite{1993_McLaughlin}. Again, the solution was obtained in the form of a volume integral in Fourier space. The value of this integral cannot be obtained in closed form but was tabulated for various values of $L_\omega$ and $ \varepsilon=\widetilde L_u/\widetilde L_\omega$. These results were fitted in \cite{2009_Takemura_a} to obtain tractable estimates of the lift force. This fit was further modified in \cite{2020_Shi_a} to take into account the effects of the finite particle size, which tend to lower the transverse force when the particle gets very close to the wall. The same argument was used to derive an empirical expression for the drag variation. Making use of the approximate expression (\ref{eq:U_low_Re}) for $C_{\text L\omega}^\text U(\text{Re}\ll1)$ and of the expression for $C_{\text Lu}^\text{W-in}$ in (\ref{eq:CLWin}), the final expression for the lift force in the case of a non-rotating sphere takes the form \begin{equation} C_\text L^\text{W}(\text{Re}\lesssim1)\approx f_\text L(L_\omega,\varepsilon) f_\text L^{\prime}(L_u) C_{\text Lu}^\text{W-in} + h_\text L(L_\omega,\varepsilon) C_{\text L\omega}^\text U(\text{Re}\ll1)\,, \label{eq:CWlowRe} \end{equation} with $f'_\text{L}(L_u)$ as given in (\ref{eq:fL_prime}) and \refstepcounter{equation} $$ f_\text L(L_\omega,\varepsilon) = \exp{^{-0.22\varepsilon^{0.8} L_\omega^{2.5}}} \quad\mbox{and}\quad h_\text L(L_\omega,\varepsilon) =1-\exp{^{-\frac{11}{96} \pi^2 \frac{ L_\omega}{J_\text L(\varepsilon)} (1+\frac{17}{48}L_\text{R}^{-1}+0.643L_\text{R}^{-2}-0.280L_\text{R}^{-3})}}\,. \eqno{(\theequation{\text{a},\text{b}})}\label{eq:fhL0} $$ Thanks to these empirical pre-factors, (\ref{eq:CWlowRe}) approaches the inner solution (\ref{eq:CLWin}) when $L_u \to 0$ and $L_\omega \to 0$, with the exception of the $\text{Sr}^2$-term, usually much smaller than the $\text{Sr}$-term as far as $|\text{Sr}|\lesssim1$. Similarly, making use of (\ref{eq:CDWin_tf}) and (\ref{eq:fD_prime}), the total slip-induced near-wall correction to the drag taking into account the finite size of the sphere may be approximated as \begin{equation} \Delta C_\text D^\text{W}(\text{Re}\lesssim1)\approx f_\text D^{\prime}(L_u) \Delta C_{\text D}^\text{W-in}\,. \quad \label{drag_fin} \end{equation} \subsubsection{Approximate expression for the slip-induced transverse force in a fluid at rest at moderate-to-large \text{Re}}\label{sec:3.3} No theoretical solution for the hydrodynamic loads can be found when inertial effects are dominant. However, reliable empirical extensions of the low-Reynolds-number predictions may be achieved based on accurate data. Several experimental and numerical studies \citep{2003_Takemura,2005_Zeng,2009_Zeng} examined the motion of a rigid sphere close to a wall in a quiescent fluid. They revealed that the transverse force exhibits a faster decay with increasing $L_u$ than predicted by the low-but-finite $\text{Re}$ solution. In \cite{2003_Takemura}, experimental observations were performed with fully contaminated spherical bubbles rising near a wall in a liquid at rest under conditions $\text{Re}\lesssim100$; such bubbles behave essentially as rigid torque-free spheres. Theoretical considerations about the nature of the particle-wall interaction were summarized through the semi-empirical expression for the transverse force coefficient \begin{equation} C_{\text Lu}^\text W [\text{Re}=\mathcal{O}(1-100)] \approx a^2(\text{Re}) (L_\text{R}/3)^{g(\text{Re})}C_{\text Lu}^\text{W-out}(\text{Re}\lesssim1)\,, \label{eq:CLuW_moderRe} \end{equation} with \refstepcounter{equation} $$ a(\text{Re}) = 1+0.6\text{Re}^{0.5}-0.55\text{Re}^{0.08} \quad\mbox{and}\quad g(\text{Re})=-2.0\tanh (0.01\text{Re})\,. \eqno{(\theequation{\text{a},\text{b}})}\label{eq:a0} $$ \section{Flow field and fundamental mechanisms}\label{sec:4} \subsection{Non-rotating sphere}\label{sec:4.1} Figure \ref{fig:disturbVel}(a) shows how the distribution of the streamwise velocity disturbance along the line ($y = 0$, $z = 0$) perpendicular to the wall, i.e. the $x$-axis, varies with flow conditions in the case of a sphere translating in a stagnant fluid. The sphere leading the fluid, $U_\text{rel}$ is negative, so that negative (positive) normalized velocities correspond to an upward (downward) fluid motion. At high Reynolds number ($\text{Re}=200$), the no-slip condition induces a thin boundary layer around the sphere, within which the disturbance is always negative. Outside this boundary layer, the fluid is accelerated by the sphere motion, making the disturbance become positive on both sides. Owing to the finite-gap offered to the fluid, this acceleration is more pronounced on the wall-facing side and the maximum velocity increases as the wall-sphere separation decreases. In this high-$\text{Re}$ configuration, the velocity disturbance outside the boundary layer remains positive throughout the gap. Wall-proximity effects sharply decrease as the gap widens and are almost negligible for $L_\text R\gtrsim4$. The boundary layer thickens as $\text{Re}$ decreases and viscous effects increasingly control the flow in the gap. For instance, the velocity disturbance keeps a negative sign throughout the gap for $L_\text{R}=1.5$ when $\text{Re}=10$, and only passes through a tiny positive maximum for $L_\text{R}=2$ before returning to zero at the wall. In such cases, the fluid in the gap is essentially entrained by the sphere translation. For each $L_\text{R}$, the velocity disturbance at a given distance from the sphere surface is seen to reach larger negative values on the wall-facing side compared to the `free' side, illustrating the enhancement of viscous effects in the gap due to the nearby wall. \begin{figure} \centerline{\includegraphics[scale=0.85]{disturbVel}} \caption{ Distribution of the streamwise velocity disturbance $ (\boldsymbol{u}-\boldsymbol{u}_\infty)\cdot \boldsymbol{e}_z/U_\text{rel} $ along the $x$-axis (to magnify the flow in the gap, the $]-1,+1[$ part of the axis has been cut, so that the sphere is shrunk to a point). (a) Stagnant fluid ($\text{Sr} = 0$) for different separation distances; (b) linear shear flow for $L_\text R=2$. The wall stands at $2x/d=-1.5$, $-2$, and $-4$ for $L_\text{R}=1.5$, $2$, and $4$, respectively.} \label{fig:disturbVel} \end{figure} The influence of the shear on the disturbance flow is illustrated in Fig. \ref{fig:disturbVel}(b), based on the results obtained with two opposite relative shear rates, $\text{Sr}=\pm 0.5$, for a separation distance $L_\text R=2$. In the moving frame, the presence of a positive (negative) shear, corresponding to the configuration where the sphere lags (leads) the fluid, accelerates (decelerates) the flow on the wall-facing side, while it decelerates (accelerates) it on the opposite side. Consequently, compared to the un-sheared situation, the fluid acceleration is enhanced (reduced) on the wall-facing side by a positive (negative) shear when $\text{Re}$ is large (\text{Re}=100 or 200 in Fig. \ref{fig:disturbVel}(b)), while the opposite takes place on the `free' side. At moderate Reynolds number ($\text{Re}=10$), shear-induced acceleration/deceleration effects remain significant within the boundary layer and extend beyond it ($x/d>1$) on the `free' side. The shear-induced asymmetry is still present throughout the flow at low Reynolds number ($\text{Re}=0.1$), the disturbance velocity remaining negative everywhere (i.e. directed upstream of the local carrying flow) in this case. \begin{figure} \centerline{\includegraphics[scale=0.85]{spanwiseVor}} \caption{ Iso-contours of the normalized spanwise vorticity disturbance $d/(2U_\text{rel})(\boldsymbol{\omega}-\boldsymbol{\omega}_\infty) \cdot \boldsymbol{e}_y$ in the symmetry plane $y = 0$ for $L_\text R=2$. Left column: $\text{Sr}=-0.5$ ($U_\text{rel}<0$); central column: $\text{Sr}=0$ ($U_\text{rel}<0$); right column: $\text{Sr}=0.5$ ($U_\text{rel}>0$). The wall stands at the bottom of each panel. The relative flow with respect to the sphere is from left to right, i.e. in the $z$-direction for $\text{Sr}=0.5$ and in the $-z$-direction for $\text{Sr}=0$ and $-0.5$.} \label{fig:spanwiseVor} \end{figure} The distribution of the spanwise component of the vorticity disturbance in the symmetry plane $y = 0$ is displayed in Fig. \ref{fig:spanwiseVor} for the specific separation $L_\text{R}=2$. Vorticity is generated both at the sphere surface and at the wall, owing to the no-slip condition on both surfaces. We refer to the corresponding two contributions in the vorticity field as the `surface' vorticity and `wall' vorticity, respectively. When the fluid is at rest at infinity, the surface vorticity is advected asymmetrically, preferentially towards the wall at high Reynolds number (Fig. \ref{fig:spanwiseVor}(k)). A thin layer of wall vorticity, the strength of which increases with $\text{Re}$, takes place in the lower part of the gap. In the same panel, it may be noticed that the stagnation point at the back of the sphere stands slightly below the plane $x=0$, i.e. it is shifted towards the wall compared to unbounded flow configuration, in agreement with previous observations \cite{2005_Zeng}. When the Reynolds number decreases, the thickness of the two boundary layers increases (e.g. $\text{Re}=50$ in Fig. \ref{fig:spanwiseVor}(h)), reinforcing their interaction. At lower Reynolds number ($\text{Re}=10$ and 0.1, Figs. \ref{fig:spanwiseVor}(e) and \ref{fig:spanwiseVor}(b)), diffusion in the crosswise ($x$) direction is sufficiently efficient to allow the surface vorticity to control the wall region, except in the narrowest part of the gap ($|z|/d\ll1$). In this regime, the vorticity distribution is essentially similar to that observed in \cite{2020_Shi_a} with a spherical bubble, up to a factor $3/2$ resulting from the difference in the magnitude of the Stokeslet (hence the drag force) associated with the two types of bodies. Thus, the mechanisms responsible for the drag enhancement and the transverse force are similar to those discussed in \cite{2020_Shi_a}. In particular, the gradual slowing down of the fluid displaced by the sphere along the wall as the downstream distance increases induces a small transverse flow correction directed away from the wall, which is responsible for the repulsive transverse force acting on the sphere.\\ \indent In the presence of an ambient shear, a shear-flow type correction has to take place within the boundary layer for the no-slip condition to be satisfied at the sphere surface, yielding a negative correction in the spanwise vorticity therein when the sphere lags the fluid. Hence this correction enhances the primary negative vorticity on the `free' side ($x>0$), while it lowers the primary positive vorticity in the part of the boundary layer facing the wall ($x<0$), as Fig. \ref{fig:spanwiseVor}(i) confirms. The process reverses when the sphere leads the fluid, in agreement with Fig. \ref{fig:spanwiseVor}(g). The wall vorticity in the gap is also modified by the shear: it increases (decreases) for $\text{Sr}>0$ ($\text{Sr}<0$), owing to the acceleration (deceleration) of the fluid on the wall-facing side caused by the positive (negative) shear, as Figs. \ref{fig:spanwiseVor}(l) and (j) confirm. \begin{figure} \centerline{\includegraphics[scale=1]{streamwise_Vor_wb}} \caption{ Iso-surfaces $d/(2|U_\text{rel}|)\boldsymbol{\omega} \cdot \boldsymbol{e}_z=\pm0.25$ of the streamwise vorticity in the wake of a sphere moving parallel to a wall at $\text{Re} = 200$ (the black thread corresponds to positive values). Left column: $\text{Sr}=-0.5$ ($U_\text{rel}<0$); central column: $\text{Sr}=0$ ($U_\text{rel}<0$); right column: $\text{Sr}=0.5$ ($U_\text{rel}>0$). The flow with respect to the sphere is from left to right, i.e. in the $z$-direction for $\text{Sr}=0.5$ and in the $-z$-direction for $\text{Sr}=0$ and $-0.5$. Since $(x,y,z)$ is right-handed, the wall stands at the back of the sphere for $\text{Sr}=0.5$ and at its back for $\text{Sr}=0$ and $-0.5$.} \label{fig:streamwise_Vor_wb} \end{figure} The near-wall situation makes the flow past the sphere intrinsically three-dimensional, even when the fluid is at rest at infinity. Consequently, the streamwise component of the vorticity, $\omega_z=\boldsymbol{\omega} \cdot \boldsymbol{e}_z$, is nonzero in the wake, unlike in the axisymmetric configuration prevailing in the unbounded case at low and moderate $\text{Re}$. The $\omega_z$-distribution in the un-sheared case is shown in Figs. \ref{fig:streamwise_Vor_wb}(b) and \ref{fig:streamwise_Vor_wb}(e) at $\text{Re} = 200$ for the two separations $L_\text{R}=1.5$ and $L_\text{R}=2.0$, respectively. The streamwise vorticity is concentrated within two elongated vortices standing on both sides of the symmetry plane $y=0$. The fluid located in between the two vortex threads is entrained downwards, bending the iso-contours of the spanwise vorticity towards the wall, as seen in Fig. \ref{fig:spanwiseVor}(k). Three-dimensional effects sharply decrease as $L_\text{R}$ increases, and so does the strength of $\omega_z$ as shown by Fig. \ref{fig:streamwise_Vor_wb}(e). In an unbounded flow, the axial symmetry in the wake of a sphere is known to break down at a critical Reynolds number $\text{Re}^{SS}\approx212.6$ through a stationary bifurcation \citep{1993_Natarajan,2012_Fabre}, leading to a stationary flow with a double-threaded wake structure qualitatively similar to that depicted in Fig. \ref{fig:streamwise_Vor_wb}(b), and a symmetry plane whose orientation is selected by some initial disturbance. \begin{figure} \centerline{\includegraphics[scale=1]{streamwise_Vor_wb2}} \caption{ Same as Fig. \ref{fig:streamwise_Vor_wb} for $\text{Re} = 250$.} \label{fig:streamwise_Vor_wb2} \end{figure} In the presence of a nearby wall, the flow structure observed for $\text{Re}\gtrsim \text{Re}^{SS}$ results from the combination of the above two mechanisms, the presence of the wall dictating the orientation of the symmetry plane \citep{2005_Zeng}. The corresponding wake structure is illustrated in Fig. \ref{fig:streamwise_Vor_wb2}(e) for $\text{Re} = 250$ and two separations, $L_\text{R}=1.5$ and $8$. Now, the strength of the streamwise vortices is significant even for $L_\text{R}=8$, owing to the intrinsic instability of the axisymmetric wake. At such large separations and Reynolds number, the sign of the streamwise vorticity in each vortex thread is dictated by the slight acceleration of the fluid in the gap: based on Bernoulli's theorem, this acceleration is seen to imply a pressure minimum there, forcing the fluid located within the symmetry plane $y=0$ (i.e. in between the two streamwise vortices) to be deviated toward the wall. Continuity then implies that the fluid must go away from the wall on the outer side of the streamwise vortices, yielding a transverse force toward $x>0$. Consequently, the wall-interaction and the intrinsic wake instability mechanisms cooperate when the separation distance decreases, enhancing the strength of the streamwise vortices, as the comparison between Fig. \ref{fig:streamwise_Vor_wb2}(b) and Figs. \ref{fig:streamwise_Vor_wb2}(e) and \ref{fig:streamwise_Vor_wb}(b) confirms. \begin{figure} \centerline{\includegraphics[scale=0.85]{streamwise_Vor_ub}} \caption{ Iso-surfaces of the streamwise vorticity in the wake of a sphere moving in an unbounded linear shear flow with $\text{Sr} = 0.5$ (the black thread corresponds to the positive value). (a) $\text{Re}=50$, $d/(2|U_\text{rel}|)\boldsymbol{\omega} \cdot \boldsymbol{e}_z=\pm0.1$; (b) $\text{Re} = 200$, $d/(2|U_\text{rel}|)\boldsymbol{\omega} \cdot \boldsymbol{e}_z=\pm0.25$. The relative upstream flow is from left to right and the free vorticity $-\gamma$ lies along the $y$-direction. } \label{fig:streamwise_Vor_ub} \end{figure} In the presence of a mean shear, the `free' vorticity $\boldsymbol{\omega}_\infty=\nabla\times\boldsymbol{u}_\infty=-\gamma \boldsymbol{e}_ {y}$ comes into play. In an unbounded flow domain, it yields the classical shear-induced lift force associated with the lift coefficient (\ref{eq:U_low_Re}) in the low-$\text{Re}$ regime. In the case of a rigid non-rotating sphere, a remarkable feature is that this force changes sign for $\text{Re}\gtrsim50$ \citep{1999_Kurose,2002_Bagchi}, mostly because of the nearly-uniform shear stress distribution within the recirculation attached to the rear part of the sphere. This change of sign, which follows that of the streamwise vorticity within each vortex thread, is confirmed in Fig. \ref{fig:streamwise_Vor_ub}. In the presence of a nearby wall, a consequence of this change of sign is that, provided $\text{Re}\gtrsim50$, the shear-induced and slip-induced mechanisms cooperate when $\text{Sr}$ is negative and act in an antagonistic manner when $\text{Sr}$ is positive, while the reverse happens for $\text{Re}\lesssim50$. The influence of the sign of $\text{Sr}$ in the former case is confirmed in Fig. \ref{fig:streamwise_Vor_wb} (\text{Re}=200), since the trailing vortices observed when $\text{Sr}<0$ (Figs. \ref{fig:streamwise_Vor_wb}(a) and \ref{fig:streamwise_Vor_wb}(d)) are thicker than in the unbounded case (Fig. \ref{fig:streamwise_Vor_ub}(b)), while they are thinner when $\text{Sr}>0$ (Figs. \ref{fig:streamwise_Vor_wb}(c) and \ref{fig:streamwise_Vor_wb}(f)). The presence of the double-threaded wake and the variation of its strength with the sign of $\text{Sr}$ have a direct influence on the advection of the surface vorticity downstream of the sphere. Indeed, according to the direction of the streamwise vorticity in each vortex thread, this wake structure entrains the fluid standing close to the mid-plane $y=0$ towards (away from) the wall when $\text{Sr}<0$ ($\text{Sr}>0$). Since the streamwise vortices are stronger in the former case, so is the resulting bending of the wake towards the wall (Fig. \ref{fig:spanwiseVor}(j)), as compared to its bending toward the fluid interior when $\text{Sr}$ is positive (Fig. \ref{fig:spanwiseVor}(l)).\\ \begin{figure} \centerline{\includegraphics[scale=1]{streamwise_Vor_wb3}} \caption{Same as Fig. \ref{fig:streamwise_Vor_wb2}(a) and (c) for $\text{Sr}=\pm0.2$.} \label{fig:streamwise_Vor_wb3} \end{figure} \indent For supercritical Reynolds numbers, i.e. $\text{Re}>\text{Re}^{SS}$, the above picture still holds when $\text{Sr}$ is negative, since all mechanisms involved in the generation of the streamwise vorticity cooperate. The only difference is that the magnitude of $\omega_z$ is increased compared to subcritical conditions, since the wake instability contributes to reinforce this vorticity component (compare the diameters of the $\omega_z$-iso-surfaces corresponding to $\text{Re} = 200$ and $250$ in Figs. \ref{fig:streamwise_Vor_wb}(a) and \ref{fig:streamwise_Vor_wb2}(a)). In contrast, when $\text{Sr}$ is positive, the mechanism associated with the free vorticity and those related to the wall proximity and wake instability act in an antagonistic manner. Therefore, the resulting sign of the streamwise vorticity in each vortex thread depends on the magnitude of $\text{Sr}$. For large enough relative shear rates, this sign follows that found in the unbounded configuration. As the comparison between Figs. \ref{fig:streamwise_Vor_wb2}(c) and \ref{fig:streamwise_Vor_ub}(b) shows, this is the case with $\text{Sr}=0.5$ at $\text{Re}=250$. In contrast, mechanisms related to the wall proximity and wake instability dominate when the ambient shear is weak enough. This situation is illustrated in Fig. \ref{fig:streamwise_Vor_wb3}(b) ($\text{Sr} = 0.2$), where the sign of $\omega_z$ in each vortex thread is seen to be opposite to that found in Fig. \ref{fig:streamwise_Vor_wb2}(c) with $\text{Sr}=0.5$ at the same Reynolds number and separation from the wall.\\ \indent As the Reynolds number decreases, shear-induced advective effects in the wake weaken and vorticity diffusion across the wall-particle gap becomes increasingly important. For instance, bending of the surface vorticity toward or away from the wall is no longer observed in Figs. \ref{fig:spanwiseVor}(g-i) at $\text{Re}=50$. At $\text{Re} = 10$, the boundary layer is thick enough for the positive vorticity disturbance generated on the wall-facing part of the sphere surface to interact directly with the negative wall vorticity disturbance, similar to the un-sheared case. As $\text{Re}$ further decreases, viscous diffusion becomes so strong that the surface vorticity virtually controls the entire wall region. Nevertheless, influence of the ambient shear is still present, favoring (reducing) the diffusion of the surface vorticity toward the wall when $\text{Sr}$ is negative (positive), as the iso-contours in Figs. \ref{fig:spanwiseVor}(a-c) reveal. The surface vorticity being enhanced (reduced) on the wall-facing side for negative (positive) $\text{Sr}$, the drag acting on the sphere is increased (reduced), which is reflected in the last term in the right-hand side of \eqref{eq:CDWin_tf}. The wall- and shear-induced mechanisms both yield a transverse force directed toward $x > 0$ if $\text{Sr}$ is positive in the low-but-finite $\text{Re}$ regime. Hence they act together to produce an enhanced repulsive force in this configuration, as reflected in (\ref{eq:CLWin}), whereas their antagonistic action yields a reduced transverse force when $\text{Sr}$ is negative. \subsection{Torque-free sphere}\label{sec:4.2} \begin{figure} \centerline{\includegraphics[scale=0.85]{disturbVel_tf}} \caption{ Influence of the sphere rotation on the distribution of the streamwise velocity disturbance $(\boldsymbol{u}-\boldsymbol{u}_\infty)\cdot \boldsymbol{e}_z/U_\text{rel}$ along the $x$-axis for $L_\text R=2$. (a) $\text{Sr} = -0.5$; (b) $\text{Sr} = 0.5$. The wall stands at position $2x/d=-2$ and the interval $]-1\leq2x/d\leq+1[$ has been cut. The magnitude of the normalized sphere rotation rate $2\text{Rr}/\text{Sr}=2\Omega/\gamma$ in the torque-free case is indicated in each panel.} \label{fig:disturbVel_tf} \end{figure} \indent Figure \ref{fig:disturbVel_tf} compares the profiles of the streamwise velocity disturbance along the $x$-axis in the case of a torque-free sphere with that of a non-rotating sphere, both with $\text{Sr}=\pm 0.5$ and $L_\text R=2$. Values of the normalized rotation velocity $2\text{Rr}/\text{Sr}=2\Omega/\gamma$ indicated in each panel reveal a significant decrease of the rotation rate as $\text{Re}$ increases, $\text{Rr}$ typically reducing by a factor of five from $\text{Re}=0.1$ to $\text{Re}=200$. A similar tendency has been reported in the unbounded case \citep{2002_Bagchi,2013_Homann}. Rotation being clockwise for $\text{Sr}>0$, the streamwise velocity is found to decrease on the wall-facing side and increase on the opposite side; the reverse happens when $\text{Sr}$ is negative. However the corresponding changes are minimal and vanish beyond a distance to the sphere surface of the order of its radius. Analyzing the spatial distribution of the spanwise vorticity disturbance (not shown) leads to the same conclusion.\\%onset of torque-free rotation tends to decrease the disturbance on the retreating side where the sphere surface moves with the flow, i.e. at $2x/d=1$ (resp. $2x/d=-1$) when the shear rate is positive (resp. negative), while the change reverses on the advancing side (the sphere surface moves against the flow), i.e. at $2x/d=-1$ (resp. $2x/d=1$). Taken together with the insights into the disturbance caused by the presence of the shear outlined in the last section, it may be stated that the onset of torque-free rotation weakens the shear-induced disturbance irrespective of the sign of the shear. \begin{figure} \centerline{\includegraphics[scale=0.85]{streamwise_Vor_wb_tf}} \caption{ Iso-surfaces $d/(2|U_\text{rel}|)\boldsymbol{\omega} \cdot \boldsymbol{e}_z=\pm0.25$ of the streamwise vorticity around a torque-free sphere for $L_\text R=2$ and $|\text{Sr}| = 0.5$. } \label{streamwise_Vor_wb_tf} \end{figure} \indent Things differ at high Reynolds number for the streamwise vorticity component. Figure \ref{streamwise_Vor_wb_tf} shows the structure of the $\omega_z$-field in the wake of a torque-free sphere for $\text{Sr}=\pm0.5$ and a separation distance $L_\text{R}=2$. The aforementioned rotation-induced changes in the fluid velocity at the particle surface lower the actual shear `felt' by the sphere whatever the sign of $\text{Sr}$. Therefore the source term responsible for the generation of the streamwise vorticity is lowered by the rotation, resulting in a weaker pair of vortex threads compared to the non-rotating configuration. Comparing Fig. \ref{streamwise_Vor_wb_tf} with its counterpart in the case of a non-rotating sphere (Figs. \ref{fig:streamwise_Vor_wb}(d) and (f)) confirms this conclusion. In contrast, under supercritical conditions, the generation of $\omega_z$ for similar levels of $|\text{Sr}|$ is essentially governed by the wake instability, not by the shear around the particle. Consequently, little change is expected between the non-rotating and torque-free configurations, which Figs. \ref{streamwise_Vor_wb_tf}(c)-(d) confirm. \section{Hydrodynamic forces}\label{sec:5} We now discuss the variations of the computed drag and lift forces acting on the sphere with the various control parameters. Most results were obtained by considering the parameter range $0.1\le \text{Re}\le250$ and $|\text{Sr}|\le0.5$, within which the flow field in the particle frame is steady for all considered $L_\text{R}$. Numerical data are systematically used to derive empirical or semiempirical force models. Most of these models are valid only within a specific $\text{Re}$-range but we frequently combine them to obtain empirical fits valid throughout the considered range of Reynolds number. \subsection{Fluid at rest at infinity}\label{sec:5.1} \subsubsection{Drag}\label{sec:5.1.1} It is known since Faxén's pioneering work \citep{1965_Happel} that the presence of a wall increases the drag in the low-$\text{Re}$ limit. This increase, say, $\Delta C_{\text Du}^\text W=(C_{\text Du}^\text W-C_{\text D0}^\text U)/C_{\text D0}^\text U$, with $C_{\text D0}^\text U$ the drag coefficient on a sphere translating in an unbounded uniform flow, is displayed in Fig. \ref{fig:drag_sr0_low-and-high-Re}(a) for $0.1\leq \text{Re} \leq 20$ and various separation distances. Most results were obtained by considering a non-rotating sphere but data corresponding to the torque-free condition are also included for $\text{Re}\leq1$. No discernible difference is found between the two configurations, confirming the vanishingly small effect of the rotation induced by the torque-free condition on the drag in the range of separations considered here, in line with a previous remark on the asymptotic prediction (\ref{eq:CDWin_tf}). Numerical results closely approach this prediction (solid lines in Fig. \ref{fig:drag_sr0_low-and-high-Re}(a)) at $\text{Re}=0.1$. Inertial effects become increasingly important as the Oseen-length-based separation $L_u$ increases, making the drag increase depart from (\ref{eq:CDWin_tf}). The decrease in $\Delta C_{\text Du}^\text W$ as $\text{Re}$ increases is well captured by the low-but-finite-$\text{Re}$ expression \eqref{drag_fin} up to $\text{Re} = 1$. Following \cite{2003_Takemura}, this expression may be extended semi-empirically to moderate Reynolds numbers by noting that the drag increase in this regime is proportional to the square of the maximum surface vorticity. Variations of this quantity with $\text{Re}$ based on the results of \cite{1995_Magnaudet} are expressed by the fitting function $a(\text{Re})$ in (\ref{eq:a0}a). We performed specific runs in an unbounded uniform flow to check this expression and found that, for $\text{Re}\lesssim10$, these variations are more accurately approached by the fit $a(\text{Re}) \approx (1-0.12\text{Re}^{1/2}+0.37\text{Re})^{1/2}$ which recovers the leading-order $0.6\text{Re}^{1/2}$-term of (\ref{eq:a0}a) at high Reynolds number. However, compared with the unbounded situation, the presence of a nearby wall tends to decrease the surface vorticity on the wall-facing side, as Fig. \ref{fig:spanwiseVor}(e) indicates. For this reason, we found that a more accurate estimate of the variations of the maximum surface vorticity in the near-wall configuration at moderate $\text{Re}$ is provided by \begin{equation} a^\text W(\text{Re},L_\text{R}) \approx \left\{1+\text{tanh}(0.05\text{Re} L_\text{R}^2)(0.37\text{Re}-0.12\text{Re}^{1/2})\right\}^{1/2}\,. \label{eq:aW} \end{equation} Making use of \eqref{eq:aW}, which tends toward the above expression for $a(\text{Re})$ at large distances from the wall, the low-but-finite-$\text{Re}$ wall-induced drag correction (\ref{drag_fin}) may be extended toward moderate Reynolds numbers in the form \begin{equation} \Delta C_{\text Du}^\text W[\text{Re}\lesssim10)]\approx f_\text D^{\prime}(L_u) [a^\text W(\text{Re},L_\text{R})]^2 \Delta C_{\text Du}^\text{W-in}(L_\text{R})\,, \label{eq:Wu-drag-low-to-mo-Re} \end{equation} where $\Delta C_{\text Du}^\text{W-in}$ corresponds to the low-$\text{Re}$ asymptotic prediction \eqref{eq:CDWin_tf} for $\text{Sr}=0$ and $f_\text D^{\prime}$ is given by \eqref{eq:fD_prime}. As the dashed lines in Fig. \ref{fig:drag_sr0_low-and-high-Re}(a) show, \eqref{eq:Wu-drag-low-to-mo-Re} accurately captures the variations of $\Delta C_{\text Du}^\text W$ revealed by the simulations whatever $L_\text{R}$ up to $\text{Re} = 20$. \begin{figure} \centerline{\includegraphics[scale=0.9]{drag_sr0_low-and-high-Re} \caption{Relative wall-induced drag increase $\Delta C_{\text Du}^\text W$ for a sphere moving parallel to a wall in a fluid at rest. (a) Low-to-moderate-$\text{Re}$ regime. (b) High-$\text{Re}$ regime. $\square$ and $+$: numerical data corresponding to a non-rotating and a torque-free sphere, respectively; solid lines in (a): zero-$\text{Re}$ asymptotic prediction \eqref{eq:CDWin_tf}; dotted lines: low-but-finite-$\text{Re}$ prediction (\ref{drag_fin}); dashed lines: low-to-moderate-$\text{Re}$ semiempirical prediction \eqref{eq:Wu-drag-low-to-mo-Re}; solid lines in (b): high-$\text{Re}$ expression \eqref{eq:Wu-drag-high-Re}.}. \label{fig:drag_sr0_low-and-high-Re} \end{figure} According to \eqref{eq:Wu-drag-low-to-mo-Re}, the wall-induced drag increase is vanishingly small beyond $\text{Re} \approx 100$. However, as Fig. \ref{fig:drag_sr0_low-and-high-Re}(b) reveals, numerical data in this regime indicate that this increase is still significant when the particle is close enough to the wall. Within the considered Reynolds number range ($100\leq \text{Re}\leq250$), this increase is found to depend only weakly on $\text{Re}$. In contrast, it varies dramatically with the inverse of the separation distance, increasing from $5\%$ for $L_\text{R}=2$ to $20\%$ for $L_\text{R}=1.25$. Fitting the results corresponding to $\text{Re} = 250$ yields \begin{equation} \Delta C_{\text Du}^\text W [\text{Re}=\mathcal{O}(100)] \approx 0.4L_\text{R}^{-3}\,. \label{eq:Wu-drag-high-Re} \end{equation} Figure \ref{fig:drag_sr0_low-and-high-Re}(b) shows that \eqref{eq:Wu-drag-high-Re} captures the observed drag increase well for $\text{Re}\gtrsim100$. The $-3$ exponent in \eqref{eq:Wu-drag-high-Re} is readily understood by noting that there is little direct interaction between the near-sphere and near-wall vortical regions in this regime (see Fig. \ref{fig:spanwiseVor}(k)). Therefore, the sphere-wall interaction has an almost inviscid nature, meaning that the sphere perceives the wall essentially as a free-slip plane and the latter perceives the sphere as an irrotational dipole (associated with its finite size). The image dipole required to satisfy the non-penetration condition on a nearby plane is known to induce an $\mathcal{O}(L_\text{R}^{-3})$-increase in the relative velocity of the fluid at the sphere center, which in turn increases the viscous dissipation resulting from the sphere motion by a similar amount \citep{2003_Legendre}. Equating the dissipation rate with the rate of work of the drag force then implies that $\Delta C_{\text Du}^\text W$ is proportional to $L_\text{R}^{-3}$. \begin{figure} \centerline{\includegraphics[scale=0.9]{drag_sr0_low-to-high-Re} \caption{Wall-induced drag correction $\Delta C_{\text Du}^\text W$ for a non-rotating sphere translating parallel to a wall in a fluid at rest in the range $0.1\leq\text{Re}\leq250$. Symbols: numerical data; solid lines: high-$\text{Re}$ correction (\ref{eq:Wu-drag-high-Re}); dashed lines: low-to-moderate-$\text{Re}$ correction \eqref{eq:Wu-drag-low-to-mo-Re}; dotted lines: composite fit (\ref{eq:Wu-drag}).} \label{fig:drag_sr0_low-to-high-Re} \end{figure} Figure \ref{fig:drag_sr0_low-to-high-Re} compares the predictions provided by expressions (\ref{eq:Wu-drag-low-to-mo-Re}) and (\ref{eq:Wu-drag-high-Re}) with the numerical data obtained throughout the $\text{Re}$-range investigated. Obviously none of them is appropriate in the intermediate range $20\lesssim \text{Re}\lesssim100$. For practical purposes, an empirical fit resulting from the combination of the two models is desirable. Noting that the drag excess predicted by (\ref{eq:Wu-drag-low-to-mo-Re}) becomes vanishingly small when the Reynolds number exceeds a few tens, a linear combination of (\ref{eq:Wu-drag-low-to-mo-Re}) and (\ref{eq:Wu-drag-high-Re}) with a suitable pre-factor of the latter ensuring that its effect vanishes at low Reynolds number appears to be convenient. Calibrating this pre-factor in the intermediate $\text{Re}$-range, we obtained \refstepcounter{equation} $$ \Delta C_{\text Du}^\text W(\text{Re})\approx\Delta C_{\text Du}^\text W[\text{Re}\lesssim10]+c_{Du\infty}(\text{Re})\Delta C_{\text Du}^\text W[\text{Re}=\mathcal{O}(100)]\,, \quad\mbox{with}\quad c_{Du\infty}(\text{Re})=1-\exp^{-0.035\text{Re}^{0.75}}\,. \eqno{(\theequation{\text{a},\text{b}})} \label{eq:Wu-drag} $$ As the dotted lines in Fig. \ref{fig:drag_sr0_low-to-high-Re} show, this composite expression correctly reproduces the observed wall-induced drag increase whatever the Reynolds number. \subsubsection{Transverse force}\label{sec:5.1.2} Figure \ref{fig:lift_sr0_low-and-high-Re}(a) shows the numerical data obtained for the wall-induced transverse force in the range $0.1\leq \text{Re}\leq150$ for a non-rotating sphere. Data corresponding to a torque-free sphere obtained at small wall distances and Reynolds numbers less than unity are also shown. Given the vanishingly small difference between the results corresponding to these two configurations at small $\text{Re}$ and the similar behavior observed in the moderate-to-high $\text{Re}$ regime in \cite{2005_Zeng}, it may be concluded that the sphere rotation associated with the torque-free condition has a negligible effect on the wall-induced transverse force. Although this effect is reflected in the difference among the pre-factors involved in \eqref{eq:CLWin} and \eqref{eq:CLWin_tf}, the overall difference between the two predictions amounts only to $0.3\%$ for $L_\text{R}=1.5$ and $0.4\%$ for $L_\text{R}=1.25$, confirming the above statement. Numerical results at $\text{Re}=0.1$ are in good agreement with these asymptotic predictions, beyond which the transverse force gradually decreases as inertial effects increase, making the wall move from the inner region of the disturbance to the outer region. This decrease is well captured by \eqref{eq:fL_prime} up to $\text{Re}\approx1$. Further increasing $\text{Re}$ reveals that the force predicted by this low-but-finite $\text{Re}$ approximation decreases too fast. A similar trend was noticed in \cite{2003_Takemura}, leading to the semiempirical extension \eqref{eq:CLuW_moderRe} of the previous prediction. This extension was obtained by noting that, similar to the wall-induced drag increase, the transverse force at low-to-moderate $\text{Re}$ is proportional to the square of the maximum vorticity at the sphere surface, and the dependence of this force with respect to $L_u$ varies from $L_u^{-2}$ for $\text{Re}\lesssim1$ to $L_u^{-4}$ for $\text{Re}\gg1$. In \cite{2005_Zeng} and \cite{2009_Zeng}, this extended prediction was found to be in good agreement with numerical results up to $L_u=100$ for $1.5\leq L_\text{R}\leq8$. \begin{figure} \centerline{\includegraphics[scale=0.9]{lift_sr0_low-and-high-Re} \caption{Lift coefficient (divided by $L_\text{R}$ in (a) for a better readability) on a sphere translating parallel to a wall in a fluid at rest. (a) regime $0.1\leq\text{Re}\leq100$. (b) high-$\text{Re}$ regime $\text{Re}\geq100$. $\square$ and $+$: numerical data for a non-rotating and a torque-free sphere, respectively; dotted lines in (a): leading-order term of asymptotic expressions (\ref{eq:CLWin}) and (\ref{eq:CLWin_tf}); dashed lines: approximate low-but-finite expression \eqref{eq:fL_prime}; solid lines: low-to-moderate $\text{Re}$ prediction \eqref{eq:CLuW_moderRe} with $a(\text{Re})$ substituted with $a^W(\text{Re})$ as given by (\ref{eq:aW}); dotted line in (b): prediction \eqref{eq:CL_Bi} for the lift force in an unbounded fluid beyond the stationary bifurcation.} \label{fig:lift_sr0_low-and-high-Re} \end{figure} Predictions of \eqref{eq:CLuW_moderRe}, with the slight change from $a(\text{Re})$ to $a^\text{W}(\text{Re})$ as given in \eqref{eq:aW} are shown in Fig. \ref{fig:lift_sr0_low-and-high-Re}(a). They are seen to capture the variations of the transverse force well up to $\text{Re}\approx100$ for $L_\text{R}<4$. At larger $L_\text{R}$, they tend to underestimate the actual force for $\text{Re}\gtrsim20$. However, under such conditions, the residual values of the force are less than $1\%$ of the low-$\text{Re}$ value, making this underestimate of little significance. \\ \indent Figure \ref{fig:lift_sr0_low-and-high-Re}(b) shows how $C_{\text Lu}^\text{W}$ behaves for $\text{Re}\geq100$. For large enough wall-particle separations, typically $L_\text{R}\gtrsim4$, the transverse force is virtually zero up to $\text{Re}\approx200$. In this situation, the sphere is immersed in an almost uniform flow, so that its wake is essentially axisymmetric. The axial symmetry breaks down when the Reynolds number exceeds the critical value $\text{Re}=\text{Re}^{SS}$, giving rise to a nonzero transverse force at larger Reynolds numbers. The wall plays no role in the occurrence of this force, nor in its intensity. However it selects the orientation of the symmetry plane that characterizes the wake beyond the threshold Reynolds number, hence that of the transverse force, according to the mechanism discussed in Sec. \ref{sec:4.1}. The corresponding imperfect bifurcation being supercritical and of pitchfork type \cite{2016_Citro}, it gives rise to a force growing as the square root of $\text{Re}-\text{Re}^{SS}$ close to the threshold. The associated pre-factor ($\approx2.95$) was computed exactly through a weakly nonlinear approach in the case of a translating sphere subject to a slow rotation in a fluid at rest, this rotation being responsible for the imperfect nature of the bifurcation \citep{2016_Citro}. An empirical extension of this prediction to non-negligible $\text{Re}-\text{Re}^{SS}$ gaps was proposed in \citep{2019_Shi} in the form \begin{equation} C_\text{L}^{\text{Re}>\text{Re}^{SS}} \approx2.95 \left(\frac{\text{Re}^{SS}}{\text{Re}}\right)^{1.5}\left[(\text{Re}^{SS})^{-1}-\text{Re}^{-1}\right]^{1/2} \,. \label{eq:CL_Bi} \end{equation} Figure \ref{fig:lift_sr0_low-and-high-Re}(b) shows that present results corresponding to $L_\text{R}=8$ follow closely this prediction up to $\text{Re}=250$, i.e. nearly $20\%$ beyond the threshold. As the wall-sphere separation decreases, the situation becomes less clear-cut because the flow `felt' by the sphere remains significantly anisotropic, even for $\text{Re}\gtrsim100$. Hence the transverse force maintains a significant nonzero value throughout the range $100\lesssim\text{Re}\lesssim\text{Re}^{SS}$. For low enough separations, the force exhibits little variation with the Reynolds number in that range and even up to $\text{Re}=250$. For instance, $C_{\text Lu}^\text{W}$ only varies by $\pm5\%$ about a mean value close to $0.1$ for $L_\text{R}=1.5$. Under such conditions, no stationary bifurcation takes place, the wake structure having reached some kind of `asymptotic' state that breaks down only at much higher Reynolds number with the occurrence of unsteady effects. The case $L_\text{R}=2$ represents an intermediate situation in which the transverse force is seen to increase significantly beyond $\text{Re}=150$, almost doubling its value at $\text{Re}=250$. This variation suggests that the wake structure changes significantly within this range. This was confirmed in \cite{2005_Zeng}, where it was shown that the size of the double-threaded wake structure grows dramatically from $\text{Re}=100$ to $\text{Re}=200$ (their figure 12). Since the streamwise vortices act to deflect the fluid toward the wall in the symmetry plane, the wake it more vigorously tilted in that direction as $\text{Re}$ increases, a trend confirmed by the comparison of panels (h) and (k) in Fig. \ref{fig:spanwiseVor}. This in turn increases the fluid velocity directed toward the fluid interior on the outer side of the streamwise vortices, hence the repelling transverse force. \subsection{Linear shear flow} \label{sec:5.2} \subsubsection{Drag on a non-rotating sphere} \label{sec:5.2.1} The drag change ratio $\Delta C_{\text D}^\text W=(C_{\text D}^\text W-C_{\text D0}^\text U)/C_{\text D0}^\text U$ is reported in Fig. \ref{fig:drag_sr05_low-to-mo-Re} for different separation distances and dimensionless shear rates. Let us first consider results obtained in the low-to-moderate Reynolds number regime ($0.1\leq \text{Re} \leq 20$) with a dimensionless shear rate $\text{Sr}=\pm0.5$ (Fig. \ref{fig:drag_sr05_low-to-mo-Re}(a)). For $L_\text{R}\leq4$, the shear-induced drag modification is negligibly small compared with that resulting from the presence of the wall. In contrast, for the smallest two separations, the shear is found to increase (decrease) the drag when the sphere leads (lags) the fluid, which is supported by the qualitative discussion at the end of Sec. \ref{sec:4.1}. The asymptotic prediction \eqref{eq:CDWin_tf}, which is valid in the low-$\text{Re}$ limit provided the wall stands in the inner region of the disturbance, is in good agreement with numerical results at $\text{Re}=0.1$. Compared with the un-sheared case, the corresponding relative variation of $\Delta C_{\text D}^\text W$ is approximately $8\%$ for $\text{Sr}=\pm0.5$. No explicit theoretical solution for $\Delta C_{\text D}^\text W$ is available for $\text{Sr}\neq0$ when the wall stands in the outer region of the disturbance. However the relative influence of the shear is always small under the conditions considered here, and the decrease of $\Delta C_{\text D}^\text W$ up to $\text{Re} = 1$ is satisfactorily captured by (\ref{drag_fin}), as the solid lines in Fig. \ref{fig:drag_sr05_low-to-mo-Re} show. To extend this estimate to Reynolds numbers of $\mathcal{O}(10)$, we merely duplicate the arguments that led to \eqref{eq:Wu-drag-low-to-mo-Re} in the un-sheared case. The empirical counterpart of \eqref{eq:Wu-drag-low-to-mo-Re} is thus \begin{figure} \centerline{\includegraphics[scale=0.9]{drag_sr05_low-to-mo-Re} \caption{Relative near-wall drag increase $\Delta C_\text D^\text W$ for a non-rotating sphere translating parallel to a wall in a linear shear flow. (a): low-to-moderate Reynolds number regime for $\text{Sr}=\pm0.5$; (b): moderate-to-high Reynolds number regime for $\text{Sr}=\pm0.2$ and $\pm0.5$. Symbols in (a): numerical results for $\text{Sr}=0.5$ ($+$) and $\text{Sr}=-0.5$ ($\times$). Dashed lines: asymptotic prediction \eqref{eq:CDWin_tf} corresponding to conditions $L_u\ll1,\,L_\omega\ll1$; solid lines: low-but-finite-$\text{Re}$ semiempirical expression (\ref{drag_fin}); dotted lines: low-to-moderate-$\text{Re}$ semiempirical expression \eqref{eq:Wshear-drag-Re1}. Thick (thin) lines correspond to positive (negative) $\text{Sr}$.} \label{fig:drag_sr05_low-to-mo-Re} \end{figure} \begin{equation} \Delta C_\text D^\text W [\text{Re}\lesssim10] \approx f_\text D^{\prime}(L_u) [a^\text W(\text{Re},L_\text{R})]^2 \Delta C_{\text D}^\text{W-in}(L_\text{R}, \text{Sr})\,, \label{eq:Wshear-drag-Re1} \end{equation} with $\Delta C_{\text D}^\text{W-in}(L_\text{R},\text{Sr})$, $f_\text D^\prime(L_u)$, and $a^\text{W}(\text{Re},L_\text{R})$ as given in (\ref{eq:CDWin_tf}), (\ref{eq:fD_prime}), and \eqref{eq:aW}, respectively. The dotted lines in Fig. \ref{fig:drag_sr05_low-to-mo-Re} confirm that the corresponding predictions properly reproduce the variations of the numerical data up to $\text{Re}\approx10$.\\ \begin{figure} \centerline{\includegraphics[scale=0.85]{drag-ub} \caption{Relative drag variation $\Delta C_{\text D\omega}^\text U$ on a sphere translating at moderate-to-high Reynolds number in an unbounded shear flow, with respect to the drag in a uniform stream. Symbols: numerical results for $\text{Sr}>0$ ($\square$), and $\text{Sr}<0$ (+). Lines: prediction of \eqref{eq:U-drag-high-Re}.} \label{fig:drag-ub} \end{figure} \indent Figure \ref{fig:drag_sr05_low-to-mo-Re}(b) displays the drag force computed for $\text{Re}\geq50$. While the drag still decreases with the Reynolds number up to $\text{Re}=100$, a systematic increase is observed at higher $\text{Re}$ whatever the distance to the wall. Moreover, in the same high-$\text{Re}$ regime, drag variations are found to be virtually independent of the sign of $\text{Sr}$. However, for $\text{Sr}=\mathcal{O}(1)$, the magnitude of the shear, \text{i.e.} the norm of $\text{Sr}$, has a significant influence on the drag, with for instance a $45\%$ increase of $\Delta C_\text D^\text W$ at $\text{Re}=250$ from $\text{Sr}=\pm0.2$ to $\pm0.5$. To better analyze these results, it is appropriate to consider the unbounded configuration first, in order to examine the relative drag change $\Delta C_{\text D\omega}^\text U(\text{Re},\,\text{Sr})=\left(C_{\text D\omega}^\text U(\text{Re},\,\text{Sr})-C_{\text D0}^\text U(\text{Re})\right)/C_{\text D0}^\text U(\text{Re})$ due solely to the influence of the ambient shear. Figure \ref{fig:drag-ub} shows how $\Delta C_{\text D\omega}^\text U(\text{Re},\,\text{Sr})$ varies with both the Reynolds number and the dimensionless shear rate. An obvious symmetry argument indicates that $\Delta C_{\text D\omega}^\text U(\text{Re},\,\text{Sr})$ cannot depend on the sign of $\text{Sr}$, a constraint confirmed by numerical results. To magnify the shear-induced drag variations, specific runs were carried out for $\text{Sr} = 1$. While only marginal for $|\text{Sr}|=0.2$, the relative shear-induced drag increase is found to reach approximately $20\%$ at $\text{Re}=250$ with $|\text{Sr}|=1$. Within the considered ranges of $\text{Sr}$ and $\text{Re}$, $\Delta C_{\text D\omega}^\text U$ depends almost linearly on $\text{Sr}$ and $\text{Re}$ beyond $\text{Re} \approx 150$, in agreement with the tendency observed in \cite{1999_Kurose}. Fitting the results obtained at $\text{Re} = 250$ yields \begin{equation} \Delta C_{\text D\omega}^\text U [\text{Re}=\mathcal{O}(100)] \approx 7.5\times10^{-4} |\text{Sr}| \text{Re}\,, \label{eq:U-drag-high-Re} \end{equation} an estimate seen to properly capture the dominant trend revealed by numerical results for $\text{Re}\gtrsim200$, although it over-estimates the drag increase at lower Reynolds numbers. A quantitative comparison with the findings reported in \cite{1999_Kurose} reveals that present values for $\Delta C_{\text D\omega}^\text U$ are typically twice as large. We investigated the possible origin of such a large difference, suspecting in particular that results may be contaminated by artificial confinement effects induced by the outer boundary of the computational domain, especially in the wake region. To check this possibility, we re-ran the simulations corresponding to $\text{Re}=200$ on a domain twice as large as the standard one, \text{i.e.} with the outer boundary located $40d$ from the sphere center instead of $20d$, the resolution being kept unchanged close to the sphere, especially within the boundary layer, by increasing the number of nodes. The drag was found to vary by less than $0.3\%$ in all cases, inducing variations of $\Delta C_{\text D\omega}^\text U$ not exceeding $2\%$. These tests make us confident that present results for the high-$\text{Re}$ shear-induced drag increase are robust, being especially almost independent of the position of the outer boundary of the domain. In contrast, we suspect that this issue may have affected the results reported in \cite{1999_Kurose}, as that study made use of an ellipsoidal grid extending only to $10d$ upstream and downstream of the sphere and $5d$ in the direction perpendicular to the incoming flow. \\ \begin{figure} \centerline{\includegraphics[scale=0.9]{drag_wall-shear-interact} \caption{Comparison for $\text{Sr}=\pm0.5$ of the measured near-wall drag increase $\Delta C_{\text D}^\text{W}$ in the high-Reynolds-number regime with the prediction $\Delta C_{\text Du}^\text W [\text{Re}=\mathcal{O}(100)]+\Delta C_{\text D\omega}^\text W [\text{Re}=\mathcal{O}(100)]$ provided by the empirical models (\ref{eq:Wu-drag-high-Re}) and (\ref{eq:W-drag-highRe}). } \label{fig:drag_wall-shear-interact} \end{figure} \begin{figure} \centerline{\includegraphics[scale=0.9]{drag_low-to-high-Re} \caption{Relative near-wall drag increase $\Delta C_\text D^\text W(\text{Re},\text{Sr},L_\text{R})$ for a non-rotating sphere translating parallel to a wall in a linear shear flow, throughout the $\text{Re}$-range investigated numerically. (a) $\text{Sr}=\pm0.2$; (b) $\text{Sr}=\pm0.5$. $\square$ and $\ocircle$: numerical data for $\text{Sr}>0$ and $\text{Sr}<0$, respectively. Thick solid lines: high-$\text{Re}$ model based on the sum of (\ref{eq:Wu-drag-high-Re}) and (\ref{eq:W-drag-highRe}); thick (thin) dashed lines: low-to-moderate-$\text{Re}$ expression \eqref{eq:Wshear-drag-Re1} for positive (negative) $\text{Sr}$; thick (thin) dotted lines: composite fit (\ref{eq:W-drag}) for positive (negative) $\text{Sr}$.} \label{fig:drag_low-to-high-Re} \end{figure} \indent Coming back to the near-wall situation, we first evaluated how the observed drag variation, $\Delta C_{\text D}^\text{W}$, compares with the sum of the slip effect in the shearless case, $\Delta C_{\text Du}^\text{W}$, and the shear effect in the unbounded configuration, $\Delta C_{\text D\omega}^\text U$, as given by (\ref{eq:Wu-drag-high-Re}) and (\ref{eq:U-drag-high-Re}), respectively. It turned out that this sum consistently over-estimates $\Delta C_{\text D}^\text{W}$, and the shorter the wall-particle separation the larger the over-estimate. This finding implies that the shear-induced drag correction observed in the unbounded case is actually reduced by the presence of the wall, owing to the modifications the latter imposes on the wake structure. Keeping $\text{Re}$ and $\text{Sr}$ fixed and varying $L_\text{R}$, we observed that the excess quantity $\Delta C_{\text Du}^\text{W}+\Delta C_{\text D\omega}^\text U-\Delta C_{\text D}^\text{W}$ varies as the inverse of the separation. Introducing the shear-induced drag modification in the presence of the wall, $\Delta C_{\text D\omega}^\text W$, such that $\Delta C_{\text D}^\text{W}=\Delta C_{\text Du}^\text{W}+\Delta C_{\text D\omega}^\text W$, and fitting the numerical data yields \begin{equation} \Delta C_{\text D\omega}^\text W [\text{Re}=\mathcal{O}(100)] \approx \left(1-0.54L_\text{R}^{-1}\right)\Delta C_{\text D\omega}^\text U [\text{Re}=\mathcal{O}(100)]\,, \label{eq:W-drag-highRe} \end{equation} with $\Delta C_{\text D\omega}^\text U [\text{Re}=\mathcal{O}(100)]$ as given by (\ref{eq:U-drag-high-Re}).\\ \indent The relative difference between the observed drag variation $\Delta C_{\text D}^\text{W}$ and the prediction corresponding to the sum of (\ref{eq:Wu-drag-high-Re}) and (\ref{eq:W-drag-highRe}) is shown in Fig. \ref{fig:drag_wall-shear-interact} for $\text{Sr}=\pm0.5$. It is seen that, beyond $\text{Re}\approx100$, this difference never exceeds $7\%$, confirming that the above empirical model properly captures the near-wall drag variations in the high-$\text{Re}$ regime. Numerical results obtained throughout the range $0.1\leq \text{Re}\leq250$, together with the corresponding predictions based on the semiempirical expressions established above, are displayed in Fig. \ref{fig:drag_low-to-high-Re}. In a way similar to \eqref{eq:Wu-drag}, a purely empirical expression combining linearly the models previously established in the low-to-moderate Reynolds number regime [Eq. \eqref{eq:Wshear-drag-Re1}] and high-Reynolds number regime [Eqs. \eqref{eq:Wu-drag-high-Re}, \eqref{eq:U-drag-high-Re} and \eqref{eq:W-drag-highRe}] may be designed to improve the estimate of the drag increase in the intermediate range $10\leq \text{Re}\leq100$. As the dotted lines in Fig. \ref{fig:drag_low-to-high-Re} show, the composite expression \begin{equation} \Delta C_\text D^\text W \approx \Delta C_\text D^\text W [\text{Re}=\mathcal{O}(1-10)]+ c_{D\omega\infty}\left\{\Delta C_{\text Du}^\text W[\text{Re}=\mathcal{O}(100)]+\Delta C_{\text D\omega}^\text W[\text{Re}=\mathcal{O}(100)]\right\}\quad\mbox{with}\quad c_{D\omega\infty}=1-\exp^{-0.035\text{Re}^{0.75}}\, \label{eq:W-drag} \end{equation} correctly fits the numerical data throughout the entire range of Reynolds number. \subsubsection{Lift on a non-rotating sphere}\label{sec:5.2.2} Figure \ref{fig:lift_low-Re} shows the computed lift coefficient $C_{\text L}^\text W(\text{Re},\text{Sr},L_\text{R})$ up to $\text{Re}=2$ for various normalized shear rates and separation distances. Variations of $C_{\text L}^\text W$ with increasing $\text{Re}$ and $L_\text{R}$, as well as the form of the interplay between the shear- and slip-induced contributions, are consistent with those observed with clean spherical bubbles in \cite{2020_Shi_a}. For this reason, the reader is referred to section 6.2.2 of that reference for a discussion of the physical mechanisms governing the variations of the lift force with $\text{Re}$, $\text{Sr}$ and $L_\text{R}$ revealed by Fig. \ref{fig:lift_low-Re}. The reason why the lift force acting on a rigid sphere or a clean spherical bubble behave similarly in this regime has been established in \cite{1997_Legendre} and extended to near-wall configurations in \cite{2002_Takemura,2003_Magnaudet}. Specifically, these analyses indicate that, to leading order, shear-, wall-, and the combined lift forces acting on a rigid sphere in the low-but-finite Reynolds number regime differ from those on a clean spherical bubble only by a pre-factor of $(3/2)^2$, $3/2$ being the strength ratio of the respective Stokeslets. That the lift force on a rigid sphere at a given $\text{Sr}$ and $L_\text{R}$ is larger than that on a clean bubble by a factor of $(3/2)^2=2.25$ may be confirmed by comparing present data at $\text{Re} = 0.1$ with their counterparts in figure 18 of \cite{2020_Shi_a}. \begin{figure} \centerline{\includegraphics[scale=0.9]{lift_low-Re} \caption{Variations of the lift coefficient $C_\text L^\text W(\text{Re},\text{Sr},L_\text{R})$ for a non-rotating sphere translating parallel to a wall in a linear shear flow at $\text{Re}\leq2$. (a) $\text{Sr}=\pm0.2$; (b) $\text{Sr}=\pm0.5$. $\square$ and $\ocircle$: numerical data for $\text{Sr}>0$ and $\text{Sr}<0$, respectively. Dashed lines: inner solution \eqref{eq:CLWin} corresponding to conditions $L_u\ll1,\,L_\omega\ll1$; solid lines: finite-$\text{Re}$ expression (\ref{eq:CWlowRe}) with $f_\text L$ and $h_\text L$ as given by (\ref{eq:fhL0}a) and (\ref{eq:fhL0}b), respectively.} \label{fig:lift_low-Re} \end{figure} As expected, the dashed lines in Fig. \ref{fig:lift_low-Re} indicate that the asymptotic expression \eqref{eq:CLWin} corresponding to situations in which the wall stands in the inner region of the disturbance predicts the computed lift force well for small enough $L_\text{R}$ and $\text{Re}$, typically $L_\text{R}<4$ and $\text{Re}\leq0.2$ for both shear rates. When $L_\text{R}$ or $\text{Re}$ increases, the wall shifts to the outer region of the disturbance and \eqref{eq:CLWin} fails to capture the variations of the lift coefficient. In contrast, the finite-$\text{Re}$ expression (\ref{eq:CWlowRe}) (along with (\ref{eq:fhL0}a) and (\ref{eq:fhL0}b) for $f_\text L$ and $h_\text L$, respectively) (solid lines in Fig. \ref{fig:lift_low-Re}) properly accounts for these effects up to $\text{Re} = 2$. \begin{figure} \centerline{\includegraphics[scale=0.9]{lift_low-to-mo-Re} \caption{Lift coefficient $C_\text L^\text W(\text{Re},\text{Sr},L_\text{R})$ for a non-rotating sphere translating parallel to a wall in a linear shear flow at $\text{Re}\leq150$. (a) $\text{Sr}=\pm0.2$; (b) $\text{Sr}=\pm0.5$. $\square$ and $\ocircle$: numerical data for $\text{Sr}>0$ and $\text{Sr}<0$, respectively. Dashed lines: finite-$\text{Re}$ prediction (\ref{eq:CWlowRe}); dotted lines: prediction \eqref{eq:CLWmoderRe}; black solid lines: lift coefficient $C_{\text L\omega}^\text U$ in an unbounded shear flow; red solid lines: lift coefficient $C_{\text Lu}^\text W$ at $L_\text{R}=1.5$ in a wall-bounded fluid at rest.} \label{fig:lift_low-to-mo-Re} \end{figure} Figure \ref{fig:lift_low-to-mo-Re} summarizes the behavior of $C_\text L^\text W(\text{Re},\text{Sr},L_\text{R})$ for $0.1\leq \text{Re}\leq150$ at various normalized shear rates and separation distances. The lift force is seen to vary sharply with both the Reynolds number and the separation distance for $\text{Re}\lesssim10$, while at higher Reynolds number substantial variations only subsist for $L_\text{R}\lesssim2$. For larger separations, the magnitude of the lift force gets close to that found in an unbounded flow (black solid lines in Fig. \ref{fig:lift_low-to-mo-Re}). Indeed, at such Reynolds numbers the thickness of the boundary layer around the sphere is small enough for the vortical interaction with the wall to have only a secondary influence on the lift force (see Fig. \ref{fig:spanwiseVor}). Effects caused by the shear may be qualitatively estimated by comparing $C_\text L^\text W(\text{Re},\text{Sr},L_\text{R})$ with its counterpart in the shearless situation, $C_{\text Lu}^\text W(\text{Re},L_\text{R})$, shown in Fig. \ref{fig:lift_low-to-mo-Re} for $L_\text{R}=1.5$ (red solid lines). Clearly, the slip effect dominates for $\text{Re}\gtrsim10$. Influence of the shear becomes more pronounced or even dominant at lower Reynolds numbers. For large separations, it increases (decreases) the total lift force well beyond (below) the level reached in the shearless case for $\text{Sr}>0$ ($\text{Sr}<0$). The influence of $\text{Sr}$ weakens as $L_\text{R}$ decreases, the presence of the wall inhibiting the development of the wake. Selecting for instance $L_\text{R} = 1.5$, $\text{Re} = 1$, and $\text{Sr}= 0.5$, the difference between $C_\text L^\text W$ and $C_{\text Lu}^\text W$ is $0.66$, three times less than the lift coefficient $C_{\text L\omega}^\text U=1.93$ in the unbounded case. Based on the above observations, and disregarding the small shear-induced contribution to the lift beyond $\text{Re}\approx10$, the finite-$\text{Re}$ expression (\ref{eq:CWlowRe}) may be extended to moderate Reynolds numbers in the form \\ \begin{eqnarray} \label{eq:CLWmoderRe} C_\text L^\text W[\text{Re}=\mathcal{O}(1-100)] &\approx& g_\text L C_{\text Lu}^\text W [\text{Re}=\mathcal{O}(1-100)]+h_\text LC_{\text L\omega}^\text{U}(\text{Re}\ll1)\,,\\ \label{gl} \mbox{with}\quad g_\text L(L_\omega,\varepsilon,\text{Re}) &=&\exp^{-0.22\varepsilon^{0.8}L_\omega^{2.5}\text{exp}(-0.01\text{Re}^2)}\,, \\\nonumber \end{eqnarray} and $C_{\text Lu}^\text W [\text{Re}=\mathcal{O}(1-100)]$, $h_\text L$ and $C_{\text L\omega}^\text{U}(\text{Re}\ll1)$ as provided by \eqref{eq:CLuW_moderRe}, (\ref{eq:fhL0}b) and \eqref{eq:U_low_Re}, respectively. Note that, similar to expressions \eqref{eq:CWlowRe} and (\ref{eq:fhL0}a) in the low-but-finite Reynolds number regime, \eqref{eq:CLWmoderRe} and \eqref{gl} indicate that the wall and shear effects do not superimpose linearly, as the pre-factor $g_\text{L}$ for the former involves $\text{Sr}$ through the presence of $\varepsilon$ and $L_\omega$. As shown in Fig. \ref{fig:lift_low-to-mo-Re}, \eqref{eq:CLWmoderRe} fits all numerical predictions well throughout the range $0.1\leq \text{Re}\leq100$ for $L_\text{R}\leq8$. \vspace{1mm}\\ \begin{figure} \centerline{\includegraphics[scale=0.65]{lift_high-Re} \caption{Variations of the lift coefficient $C_\text L^\text W(\text{Re},\text{Sr},L_\text{R})$ in the range $100\leq\text{Re}\leq250$ for a non-rotating sphere translating parallel to a wall in a linear shear flow. ${\color{green}{\blacksquare}}: \text{Sr}=+0.2$, ${\color{green}{\medbullet}}: \text{Sr}=-0.2$, ${\color{red}{\blacksquare}}: \text{Sr}=+0.5$, ${\color{red}{\medbullet}}: \text{Sr}=-0.5$. ${\color{red}+}$ (${\color{green}+}$): $\text{Sr}=+0.5$ ($+0.2$) in the unbounded configuration; same with ${\color{red}\times}$ (${\color{green}\times}$) for $\text{Sr}=-0.5$ ($-0.2$). Black solid line: $\text{Sr}=0$; green solid (dashed) line: prediction of \eqref{eq:lift_highRe} for $\text{Sr}=+0.2$ ($-0.2$); same with the red solid (dashed) line for $\text{Sr}=+0.5$ ($-0.5$).} \label{fig:lift_high-Re} \end{figure} \indent We now turn to the high-Reynolds-number regime, say $\text{Re}\gtrsim100$. At such Reynolds numbers, the shear-induced lift force observed in the unbounded case has changed sign, as illustrated in Fig. \ref{fig:streamwise_Vor_ub}. For small separations, typically $L_\text{R}\lesssim2$, the slip-induced transverse force discussed in Sec. \ref{sec:5.1.2} remains non-negligible up to $\text{Re} = 200$. When the two effects combine, the streamwise vorticity distribution illustrated in Fig. \ref{fig:streamwise_Vor_wb} reveals that the two mechanisms act in an antagonistic (cooperative) manner when $\text{Sr}$ is positive (negative). This is confirmed in Fig. \ref{fig:lift_high-Re}, where, taking the results corresponding to $\text{Sr} = 0$ (black line) as reference, a negative $\text{Sr}$ is seen to contribute positively to the lift force and \textit{vice versa}, unlike the low-to-moderate Reynolds number phenomenology. Moreover, slip- and shear-induced effects combine in a strongly nonlinear manner. Indeed, for a given magnitude of $\text{Sr}$ and a decreasing $L_\text{R}$, the shear-induced variation, $|C_\text L^\text W-C_{\text Lu}^\text W|$, is seen to become significantly larger when $\text{Sr}$ is positive (compare in particular the data pairs corresponding to $\text{Sr} = \pm0.5$ and $L_\text{R}=1.5$). For $\text{Re}\gtrsim 200$ and $\text{Sr}=0$, the stationary imperfect bifurcation discussed in Sec. \ref{sec:4.1} takes place when the separation is large enough, causing a sharp increase in the transverse force, as the black lines in Fig. \ref{fig:lift_high-Re} confirm for $L_\text{R}\geq4$. For smaller separations, or for arbitrary separations in the presence of shear, no bifurcation takes place in the wake in this $\text{Re}$-range, since the flow past the sphere is fully three-dimensional whatever $\text{Re}$. This is the reason why the increase in the magnitude of $C_\text L^\text W$ with $\text{Re}$ is much more gradual in such situations. As the comparison with data corresponding to the unbounded sheared configuration (crosses) reveals, the wall no longer influences the lift force for $L_\text{R}\gtrsim4$. Conversely, for smaller separations, the lift force found for $\text{Sr}>0$ ($\text{Sr}<0$) reduces (increases) gradually compared to its value in an unbounded flow as $L_\text{R}$ decreases. \\ \indent We sought a correlation capable of reproducing the above trends. For this purpose, since the shear-induced lift in an unbounded flow changes sign for $\text{Re}\approx50$, we used the expression provided in \eqref{eq:lift_loth} for $C_{\text L\omega}^\text{U}[\text{Re}=\mathcal{O}(100)]$. Then, Fig. \ref{fig:lift_sr0_low-and-high-Re}(b) suggests that the slip-induced contribution $C_{\text Lu}^\text W$ is almost constant beyond $\text{Re}=100$ when no stationary bifurcation takes place in the wake (see the data set corresponding to $L_\text{R}=1.5$). This situation also holds when $\text{Sr}\neq0$, since the wake is three-dimensional whatever $\text{Re}$, similar to the configuration $\text{Sr}=0$ when $L_\text{R}$ is small. Therefore it sounds reasonable to assume that, at a given separation, $C_{\text Lu}^\text W(\text{Sr}\neq0,\text{Re}\geq100)$ is close to $C_{\text Lu}^\text W(\text{Re}=100)$ for $\text{Sr}=0$, as provided by \eqref{eq:CLuW_moderRe} for $\text{Re}=100$. Last, $C_{\text L\omega}^\text{U}[\text{Re}=\mathcal{O}(100)]$ has to be weighted by a pre-factor $k_\text{L}(L_\text{R},\text{Re})$, in order to mimic the increasingly asymmetric magnitude of the lift force according to the sign of $\text{Sr}$ when $L_\text{R}$ becomes small. We finally obtained \begin{eqnarray} \label{eq:lift_highRe} C_\text L^\text W[\text{Re}=\mathcal{O}(100)] &\approx& C_{\text Lu}^\text W (\text{Re}=100)+ k_\text{L}C_{\text L\omega}^\text{U}[\text{Re}=\mathcal{O}(100)]\,,\\ \label{eq:coeffhighRe} \mbox{with}\quad k_\text{L}(L_\text{R},\text{Re})&=&1- \exp(-0.034 L_\text{R}^{6}|\text{Sr}|^{0.75}) + (1+\sgn(\text{Sr}))\exp(-0.048 L_\text{R}^{4.5}|\text{Sr}|^{-1})\exp^{-(0.009 \text{Re})^{-4}} \,, \end{eqnarray} with $C_{\text Lu}^\text W (\text{Re}=100)$ and $C_{\text L\omega}^\text{U}[\text{Re}=\mathcal{O}(100)]$ as provided by \eqref{eq:CLuW_moderRe} and \eqref{eq:lift_loth}, respectively. The solid and dashed lines in Fig. \ref{fig:lift_high-Re} confirm that this correlation properly captures the dramatic variations induced by the wall on the lift force, including the asymmetry observed between negative and positive relative shear rates. \subsubsection{Effects of sphere rotation}\label{sec:5.2.3} \begin{figure} \centerline{\includegraphics[scale=0.7]{spin-rate_sr0} \caption{Variations with $\text{Re}$ and $L_\text{R}$ of the rotation rate $\text{Rr}^\text{W}$ of a torque-free sphere translating parallel to a wall in a fluid at rest. Symbols: numerical results; dashed lines: asymptotic prediction \eqref{eq:spin_rate_w} corresponding to the condition $L_u\ll1$; solid lines: empirical extension (\ref{eq:spin_rate_w0}) of \eqref{eq:spin_rate_w} based on the exact zero-$\text{Re}$ prediction of \citep{1964_ONeill,1967_Goldman_a}.} \label{fig:spin-rate_sr0} \end{figure} The rotation rate of a torque-free sphere translating parallel to the wall in a fluid at rest is shown in Fig. \ref{fig:spin-rate_sr0} for the shortest two separations, $L_\text{R}=1.5$ and $\,2$, over the range $0.1\leq \text{Re}\leq250$. $\text{Rr}^\text{W}$ is seen to change from negative at low Reynolds number (in agreement with Faxén's prediction \eqref{eq:spin_rate_w} \cite{1965_Happel}) to positive beyond a critical $\mathcal{O}(1)$-Reynolds number, $\text{Re}_{c_T}$. This critical value depends on $L_\text{R}$, and numerical results indicate $\text{Re}_{c_T}\approx4$ for $L_\text{R}=1.5$ and $\text{Re}_{c_T}\approx2$ for $L_\text{R}=2$. The low-$\text{Re}$ numerical values are found to exceed those predicted by \eqref{eq:spin_rate_w}, especially for $L_\text{R}=1.5$. We compared the exact creeping-flow values provided in \cite{1967_Goldman_a} (recomputed from the exact solution of \cite{1964_ONeill}) with Faxén's approximate prediction \eqref{eq:spin_rate_w} and found that the latter significantly under-estimates the former for $L_\text{R}\lesssim2$. A significantly better approximation, reproducing the exact prediction down to $L_\text{R}\approx1.1$, is provided by the semiempirical extension of \eqref{eq:spin_rate_w} \begin{equation} \text{Rr}^\text{W}(L_\text{R}, \text{Re}\ll1)\approx- \frac{3}{16}L_\text{R}^{-4}\left(1-\frac{3}{8}L_\text{R}^{-1}+0.9L_\text{R}^{-3}\right)\,, \label{eq:spin_rate_w0} \end{equation} suggesting that higher-order corrections neglected in Faxén's solution are required to accurately estimate $\text{Rr}^\text{W}$ at such small separations. As the solid lines in Fig. \ref{fig:spin-rate_sr0} indicate, numerical results at $\text{Re}=0.1$ are in close agreement with (\ref{eq:spin_rate_w0}). For $\text{Re}>\text{Re}_{c_T}$, the rotation rate first increases up to a maximum ($\text{Rr}^\text{W}\approx0.01$ at $\text{Re}\approx5$ for $L_\text{R}=2$, $\text{Rr}^\text{W}\approx0.029$ at $\text{Re}\approx20$ for $L_\text{R}=1.5$), before exhibiting non-monotonic variations with both the Reynolds number and the separation distance, especially beyond $\text{Re}=100$. A qualitatively similar behavior has been reported in \citep{2005_Zeng} for the torque on a non-rotating sphere in the same range of separations. We hypothesize that subtle variations in the flow structure in the sphere vicinity (see figure 3 in \citep{2005_Zeng}) are responsible for this complex behavior.\\ \indent Figure \ref{fig:spin-rate} summarizes the normalized rotation rate $2\text{Rr}^\text{W}/\text{Sr}$ corresponding to the torque-free condition, as computed for $0.1\leq \text{Re}\leq250$ at various separation distances. Only the `strong' relative shear rate $|\text{Sr}|=0.5$ is considered, so as to obtain sizeable effects of the sphere rotation. At low Reynolds numbers and small separations ($0.1\leq \text{Re}\lesssim5$, $L_\text{R}\leq2$), numerical data indicate that spheres moving under $\text{Sr}<0$-conditions rotate faster than those moving with $\text{Sr}>0$. This difference is the consequence of the opposite signs of the shear-induced and slip-induced contributions to the sphere rotation in the low-Reynolds number regime, as is apparent in \eqref{eq:spin_rate_w} (in the configuration of Fig. \ref{fig:schem_bub_mov}, these two contributions yield clockwise and counter-clockwise rotations, respectively). This asymptotic prediction (solid lines in Fig. \ref{fig:spin-rate}) is in good agreement with the numerical data up to $\text{Re} = 0.5$. A slight under-estimate (over-estimate) is noticed when $L_\text{R}=1.5$ for $\text{Sr}<0$ ($\text{Sr}>0$), in line with the aforementioned under-estimate of the slip effect by \eqref{eq:spin_rate_w} at short separations. The influence of the sign of $\text{Sr}$ on the magnitude of $\text{Rr}^\text{W}$ is seen to reverse at somewhat higher $\text{Re}$, the rotation rate becoming larger for positive relative shear rates than for negative ones when the Reynolds number exceeds the critical value $\text{Re}\approx6$ ($\text{Re}\approx3$) for $L_\text{R}=1.5$ ($L_\text{R}=2$). This change is a direct consequence of the change of sign of the slip-induced rotation in a fluid at rest, as described above. Thus, when the sphere is allowed to rotate in the moderately inertial regime, the direction of the slip-induced rotation is opposite to that found in the low-$\text{Re}$ regime, leading to a cooperative (antagonistic) effect with the shear when $\text{Sr}$ is positive (negative). Beyond $L_\text{R}=2$, the normalized rotation rates obtained with positive and negative $\text{Sr}$ are virtually identical, suggesting that the slip effect has become negligible at such separations compared to that of the shear. Comparing the two panels at $L_\text{R}=4$ and $L_\text{R}=8$ indicates that the shear effect itself is barely affected by the presence of the wall at such separations, the rotation rates found at a given $\text{Re}$ being very close for both values of $L_\text{R}$. This conclusion is reinforced by the good agreement between present results for $L_\text{R}\geq4$ and the fit \eqref{eq:spin_rate_ua}-\eqref{eq:spin_rate_ub} provided in \cite{2002_Bagchi} (black dashed lines in Fig. \ref{fig:spin-rate}), which is based on numerical results obtained in an unbounded shear flow. Both sets of results show that the rotation rate gradually decreases as the Reynolds number increases, and is reduced to approximately $40\%$ ($20\%$) of the low-$\text{Re}$ value $\text{Rr}=\frac{1}{2}\text{Sr}$ at $\text{Re}=100$ ($200$). Remarkably, results at the lowest two separations reveal that the rotation rate is altered by the presence of the wall in a very dissimilar manner depending on the sign of $\text{Sr}$ in the moderate-to-large Reynolds number regime, say $\text{Re}\gtrsim10$: while $\text{Rr}^\text{W}$ is significantly larger than the rotation rate found in an unbounded shear flow when $\text{Sr}$ is positive (even for $\text{Re}\gtrsim100$), the wall does not seem to have any significant effect for $\text{Re}\geq10$ when $\text{Sr}$ is negative.\\ \begin{figure} \centerline{\includegraphics[scale=0.65]{spin-rate} \caption{Variations with $\text{Re}$ and $L_\text{R}$ of the normalized rotation rate $2\text{Rr}^\text{W}/\text{Sr}$ of a torque-free sphere translating parallel to a wall in a linear shear flow with $|\text{Sr}|=0.5$. {\color{red}{$\square$}} and {\color{red}{$\ocircle$}}: numerical data for $\text{Sr}>0$ and $\text{Sr}<0$, respectively. Solid lines: inner solution \eqref{eq:spin_rate_w} corresponding to conditions $L_u\ll1,\,L_\omega\ll1$; black dashed lines: empirical prediction \eqref{eq:spin_rate_ua}-\eqref{eq:spin_rate_ub} from \cite{2002_Bagchi} in an unbounded shear flow; red dashed lines: empirical fit \eqref{eq:spin_rate_w2}. Thick and thin lines refer to predictions for $\text{Sr}=+0.5$ and $\text{Sr}=-0.5$, respectively.} \label{fig:spin-rate} \end{figure} \indent To account for these various effects, we sought an empirical fit tending toward \eqref{eq:spin_rate_w} when $\text{Re}\rightarrow0$ (with the empirical modification introduced in \eqref{eq:spin_rate_w0}) and toward \eqref{eq:spin_rate_ua}-\eqref{eq:spin_rate_ub} when $L_\text{R}\rightarrow\infty$, while taking into account the aforementioned asymmetric $\sgn(\text{Sr})$-dependent influence of the wall at moderate-to-large $\text{Re}$. We found that the best fit satisfying these requirements is \begin{equation} \text{Rr}^\text{W} \approx - \frac{3}{16}f_\text L^{\prime}L_\text{R}^{-4}\left\{1-\frac{3}{8}L_\text{R}^{-1}+0.9L_\text{R}^{-3}\right\}+\left\{f_{\Omega}^\text U+0.5L_\text{R}^{-4}\tanh(\frac{\text{Re}}{2})(1+\sgn(\text{Sr})) \right\}\left\{1-\frac{5}{16}L_\text{R}^{-3}\exp(-0.5\text{Re})\right\}\frac{\text{Sr}}{2}\,, \label{eq:spin_rate_w2} \end{equation} with $f_\text L^{\prime}$ and $f_{\Omega}^\text U$ as given in \eqref{eq:fL_prime} and \eqref{eq:spin_rate_ub}, respectively. As the dashed lines in Fig. \ref{fig:spin-rate} show, \eqref{eq:spin_rate_w2} satisfactorily matches the numerical data throughout the considered range of $\text{Re}$ and $L_\text{R}$. \begin{figure} \centerline{\includegraphics[scale=0.8]{drag_spin}} \caption{Influence of the sphere rotation induced by the torque-free condition on the relative drag increase for $|\text{Sr}|=0.5$. Symbols $\square$ and $\ocircle$ refer to $\text{Sr}=+0.5$ and $\text{Sr}=-0.5$, respectively.} \label{fig:drag_spin} \end{figure} The difference $\Delta C_{\text D \Omega}^\text W$ between the relative drag variations $\Delta C_{\text D}^\text W$ respectively found in the torque-free and non-rotating near-wall configurations for a given set of $(\text{Re},\text{Sr},L_\text{R})$ is shown in Fig. \ref{fig:drag_spin}. Throughout the considered range of parameters, $\Delta C_{\text D \Omega}^\text W$ is less than $2\%$, indicating that the sphere rotation has only a marginal effect on the drag. Note that $\Delta C_{\text D \Omega}^\text W$ is even less than $1\%$ for $\text{Re}<100$, the largest influence of the rotation being observed in the high-Reynolds-number regime. This weak change in the drag force confirms the findings of \cite{2005_Zeng}. It is in line with the comments made in Sec. \ref{sec:4.2} regarding the tiny changes induced in the spanwise vorticity field by the sphere rotation resulting from the torque-free condition. At low Reynolds number, it is also in line with the theoretical predictions \eqref{eq:spin_rate_w} and \eqref{eq:CDWin_tf} which indicate that the drag force is affected by the particle rotation only at $\mathcal{O}(L_\text{R}^{-8})$. \begin{figure} \centerline{\includegraphics[scale=0.7]{lift_spin}} \caption{Influence of the sphere rotation induced by the torque-free condition on the lift force for $|\text{Sr}|=0.5$ and $0.1\leq \text{Re}\leq150$. Closed and open symbols refer to the lift coefficient for torque-free and non-rotating spheres, respectively. Solid lines: asymptotic prediction \eqref{eq:CLWin_tf} corresponding to conditions $L_u\ll1,\,L_\omega\ll1,\,L_\Omega\ll1$; dashed lines: empirical prediction \eqref{eq:lift_tf}.} \label{fig:lift_spin} \end{figure} Things are somewhat different regarding the lift force. As seen in Fig. \ref{fig:lift_spin}, the lift force in the torque-free case (closed symbols) slightly but consistently differs from its counterpart in the non-rotating case (open symbols) for large enough relative shear rates (here $|\text{Sr}|=0.5$). The rotation provides a positive contribution when the sphere lags the fluid ($\text{Sr}>0$) and \textit{vice versa}. Whatever the sign of $\text{Sr}$, this effect reduces as $\text{Re}$ increases, in a manner consistent with the variation of the torque-free rotation rate observed in Fig. \ref{fig:spin-rate}. The asymptotic prediction \eqref{eq:CLWin_tf} derived under conditions $L_u\ll1,\,L_\omega\ll1,\,L_\Omega\ll1$ is in good agreement with the data obtained at $\text{Re} = 0.1$ up to $L_\text{R}\approx2$ for $\text{Sr}>0$, and $L_\text{R}\approx4$ for $\text{Sr}<0$. That the range of accuracy of the asymptotic prediction is somewhat larger for negative relative shear rates is a property shared with the non-rotating case (compare the left and right panels in Fig. \ref{fig:lift_low-Re}). This is presumably because the nonlinear interaction between the slip-induced and shear-induced mechanisms contributing to the lift force is somewhat weaker when the two mechanisms are antagonistic, i.e. when $\text{Sr}<0$. \\ \indent To extend empirically the validity of \eqref{eq:CLWin_tf} toward moderate Reynolds numbers, the change $C_{\text L\Omega}^\text W$ in the lift force specifically due to the torque-free rotation, which may be thought of as a Magnus lift component, must first be examined in detail. As Fig. \ref{fig:lift_spin-coef} shows, when normalized by the rotation rate $\text{Rr}^\text{W}$, this change only weakly depends on $\text{Re}$, especially for small separations. A similar behavior was observed in \cite{2002_Bagchi} in an unbounded shear flow. The rough approximation $C_{\text L\Omega}^\text U/\text{Rr} \approx 0.55$ provided in this reference is in reasonable agreement with present data beyond $\mathcal{O}(1)$-Reynolds numbers, as the solid lines in Fig. \ref{fig:lift_spin-coef} show (the difference is larger at low $\text{Re}$, as expected from the difference between \eqref{eq:CLWin_tf} and \eqref{eq:CLWin} which predicts $C_{\text L\Omega}^\text U/\text{Rr} \approx 1-\frac{1}{8}\text{Rr}$ for large separations). Based on this finding, one can expect the total lift force acting on a torque-free rotating sphere with $\text{Re}\gtrsim1$ to be correctly estimated by superposing linearly the force found in the non-rotating case as given by \eqref{eq:CLWmoderRe} and the spin-induced contribution discussed above. This superposition yields \begin{figure} \centerline{\includegraphics[scale=0.65]{lift_spin-coef}} \caption{Change in the lift coefficient due to the sphere rotation induced by the torque-free rotation. Values of $C_{\text L\Omega}^\text W$ are divided by the rotation rate $\text{Rr}$ to provide a better collapse. $\square$ and $\ocircle$ symbols refer to numerical data for $\text{Sr}>0$ and $\text{Sr}<0$, respectively. Solid lines: approximation $C_{\text L\Omega}^\text U/\text{Rr} \approx 0.55$ established in \citep{2002_Bagchi} in an unbounded shear flow.} \label{fig:lift_spin-coef} \end{figure} \begin{figure} \centerline{\includegraphics[scale=0.65]{lift_spin-high-Re}} \caption{Influence of the torque-free rotation on the lift force in the high-Reynolds-number regime for $|\text{Sr}|=0.5$. Closed and open symbols refer to data obtained with torque-free and non-rotating spheres, respectively. Solid and dashed lines correspond to the prediction of \eqref{eq:lift_highRe_rot} for the torque-free and non-rotating cases, respectively. The horizontal black dashed line materializes the dividing line $C_\text L^\text W=0$. } \label{fig:lift_spin-high-Re} \end{figure} \begin{equation} C_\text L^\text W[\text{Re}=\mathcal{O}(1-100)] \approx g_\text L C_{\text Lu}^\text W [\text{Re}=\mathcal{O}(1-100)]+h_\text LC_{\text L\omega}^\text{U}(\text{Re}\ll1)+0.55\text{Rr}^\text{W}\,, \label{eq:lift_tf} \end{equation} with $\text{Rr}^\text{W}$ as provided in \eqref{eq:spin_rate_w2}. The dashed lines in Fig. \ref{fig:lift_spin} confirm that this linear superposition fits the numerical data well up to $\text{Re}\approx 100$, even in the low-Reynolds-number range provided the separation is not `too' large.\\ \indent In the high-$\text{Re}$ regime $\text{Re}>100$, the total lift force is small, with lift coefficients typically of $\mathcal{O}(0.1)$, \text{i.e.} one order of magnitude smaller than in the low-$\text{Re}$ regime. However, the relative contribution of the change $C_{\text L\Omega}^\text W$ caused by the torque-free rotation in the total lift force remains significant, as Fig. \ref{fig:lift_spin-high-Re} shows. Again, for a given Reynolds number and separation distance, $C_{\text L\Omega}^\text W$ is seen to be larger when $\text{Sr}$ is positive, especially for $L_\text{R}\leq2$. Moreover, the qualitative influence of the sphere rotation is found to depend crucially on the separation distance. Indeed, for $\text{Re}\geq150$, the torque-free condition is seen to decrease the magnitude of the total lift force irrespective of its sign for $L_\text{R}\geq4$. This is no longer the case at the smallest two separations, for which lift forces corresponding to $\text{Sr}<0$ are still reduced by the rotation while those associated with positive $\text{Sr}$ are enhanced, especially for $L_\text{R}=1.5$. To approach the observed behaviors, we again considered that rotation-induced effects combine linearly with the slip- and shear-induced contributions predicted by \eqref{eq:lift_highRe}, assuming that the empirical expression \eqref{eq:spin_rate_w2} for the rotation rate derived at moderate Reynolds number remains valid up to the upper bound ($\text{Re}=250$) of the regime considered here. Figure \ref{fig:lift_spin-coef} indicates that the ratio $C_{\text L\Omega}^\text W/\text{Rr}^\text W$ is still close to $0.55$ in this regime, although it seems to rise to slightly larger values ($\approx0.7$) for positive $\text{Sr}$ when the separation becomes small. Keeping this ratio unchanged, we obtain \begin{equation} C_\text L^\text W[\text{Re}=\mathcal{O}(100)] \approx C_{\text Lu}^\text W (\text{Re}=100)+k_{\text L}C_{\text L\omega}^\text{U}[\text{Re}=\mathcal{O}(100)]+0.55\text{Rr}^\text{W}\,. \label{eq:lift_highRe_rot} \end{equation} As Fig. \ref{fig:lift_spin-high-Re} shows, this fit reproduces the observed trends well throughout the considered Reynolds number range, although the influence of the torque-free rotation appears to be slightly under-estimated at small separations when $\text{Sr}$ is positive. This successful extension of \eqref{eq:lift_highRe} indicates that effects of slip, shear and torque-free rotation may still be considered to contribute separately to the lift force even for $\mathcal{O}(100)$-Reynolds numbers, provided of course the influence of the nearby wall is properly accounted for in the magnitude of each contribution. \section{Summary}\label{sec:6} We computed the flow and the hydrodynamic forces acting on a rigid sphere moving along the planar wall bounding a linear shear flow over a wide range of Reynolds number and separation distance, with the sphere either lagging or leading the fluid. We considered both non-rotating and torque-free spheres in order to quantify effects of the rotation induced by the torque-free constraint obeyed by freely moving particles. To reveal the slip-wall and shear-wall interaction mechanisms at stake, we examined several characteristic features of the flow field, especially the spatial distribution of the spanwise and streamwise vorticity disturbances, before focusing on their influence on the drag and lift forces. \\ \indent When the sphere moves in a fluid at rest, low-Reynolds-number asymptotic solutions indicate an increase of the drag due to the presence of the wall. Additionally, a repulsive transverse force arises, due to the interaction between the wall and the wake resulting from the vorticity generated at the sphere surface by the no-slip condition. For a given separation distance, the magnitude of this repulsive force decreases with the Reynolds number when the wall lies in the outer region of the disturbance, in line with the conclusions of previous studies. At low-but-finite Reynolds number, both the drag increase and the transverse force are proportional to the square of the maximum vorticity at the sphere surface, which increases with the Reynolds number. Present results confirm these predictions, and support the model \eqref{eq:CLuW_moderRe} proposed in \cite{2003_Takemura} for the transverse force up to $\mathcal{O}(100)$-Reynolds numbers, albeit with a slight change in the evaluation of the surface vorticity aimed at accounting for the influence of the nearby wall. At larger Reynolds number, the behavior of the transverse force depends crucially on the separation. For $L_\text{R}\geq4$, this force is nearly zero from Reynolds numbers of some tens up to the critical value $\text{Re}^{SS}\approx210$ corresponding to the onset of a stationary non-axisymmetric wake. Although the wall is not responsible for this change in the wake structure, it selects the direction of the corresponding lift force, which again tends to repel the sphere into the fluid for $\text{Re}>\text{Re}^{SS}$. Up to $\text{Re}=250$, the magnitude of this force is accurately estimated by the heuristic extension \eqref{eq:CL_Bi} of the theoretical prediction derived from a weakly nonlinear analysis. For smaller separations, the flow past the sphere remains anisotropic whatever the Reynolds number, making the transverse force keep significant values throughout the $\text{Re}$-range explored numerically. In this situation, the force does not change much beyond $\text{Re}=100$ when the separation is small ($L_\text{R}=1.5$), while a mixed situation in which the force increases significantly with the Reynolds number in the range $150\lesssim\text{Re}\lesssim250$ takes place at intermediate separations ($L_\text{R}=2$) At low Reynolds number, asymptotic predictions with the wall standing in the inner region of the disturbance predict that the shear tends to decrease (increase) the drag when the sphere lags (leads) the fluid, while the reverse holds for the transverse force. For this reason, the latter may switch from positive to negative at a given separation if the sphere leads the fluid and the relative magnitude of the shear is large enough. These predictions are confirmed, both qualitatively and quantitatively, by present numerical results. When the wall stands in the outer region of the disturbance, the semiempirical expressions of \cite{2020_Shi_a} taking into account finite-size effects are found to provide reliable predictions for both the drag variation and the lift force irrespective of the wall position up to $\text{Re}=2$. Whatever $\text{Sr}$ and $L_\text{R}$, the magnitude of the lift force sharply decreases as the Reynolds number increases in the range $1\lesssim\text{Re}\lesssim10$. For $L_\text{R}\gtrsim2$, only a weak lift force, with a magnitude close to that found in an unbounded flow, subsists in the moderate-to-high Reynolds number regime $10\lesssim\text{Re}\lesssim100$. This force keeps significantly larger values at smaller separations, being dominated by the slip effect rather than the influence of the shear in this $\text{Re}$-range. Numerical results allowed us to obtain the empirical prediction \eqref{eq:CLWmoderRe} for the lift force extending the finite-$\text{Re}$ prediction \eqref{eq:CWlowRe} up to $\text{Re}\lesssim100$.\\ \indent At $\mathcal{O}(100)$-Reynolds numbers, considering the unbounded sheared configuration first was found useful to quantify specific effects induced by the wall. Present results confirm the well-established reversal of the shear-induced lift beyond $\text{Re}\approx50$ \cite{1999_Kurose}. Variations of this `reversed' lift force with $\text{Re}$ and $\text{Sr}$ agree well with those reported in the literature, as summarized in \cite{2008_Loth}. In the same regime, the drag force is found to increase linearly with $\text{Re}$ and $|\text{Sr}|$ beyond $\text{Re}\approx150$, leading to a substantial increase ($\approx20\%$) at $\text{Re}=250$ for $|\text{Sr}|=1$. When a nearby wall is involved, the above reversal makes the slip- and shear-related mechanisms contributing to the lift act in an antagonistic (cooperative) manner for positive (negative) $\text{Sr}$, unlike the situation encountered at lower Reynolds numbers. Moreover, these mechanisms interact in a highly nonlinear manner, the shear-induced variation to the lift force observed for a given magnitude of the relative shear rate being significantly larger when $\text{Sr}$ is positive. We could summarize the effect of these complex interactions into the empirical prediction \eqref{eq:lift_highRe}-\eqref{eq:coeffhighRe} which provides an accurate estimate of the near-wall lift force up to $\text{Re}=250$.\\ \indent Only small changes are observed in the flow structure when the sphere rotates in order to satisfy a torque-free condition. The corresponding rotation rate decreases drastically as $\text{Re}$ increases, similar to the tendency already reported in an unbounded shear flow. However, these small changes subtly modify the shear stress distribution at the sphere surface, hence the torque acting on it. For this reason, they are sufficient to make the variations of the rotation rate with respect to $\text{Re}$ and $\text{Sr}$ nontrivial in near-wall configurations. First, the slip-induced rotation in a fluid at rest is found to change sign beyond a critical separation-dependent $\mathcal{O}(1)$-Reynolds number. Then, for small enough separations and Reynolds numbers $\gtrsim10$, the rotation rate is influenced by the shear in a very asymmetric manner, depending on the sign of $\text{Sr}$. Indeed, while the rotation is almost identical to its counterpart in an unbounded shear flow when $\text{Sr}$ is negative, it is significantly larger when $\text{Sr}$ is positive, even for Reynolds numbers of $\mathcal{O}(100)$. These findings are summarized in the fit \eqref{eq:spin_rate_w2} which predicts the rotation rate well irrespective of the sign of $\text{Sr}$ and throughout the range of Reynolds number explored in this investigation. Finally, present results show that the spin-induced contribution to the near-wall lift in the torque-free configuration is directly proportional to the rotation rate. Remarkably, the corresponding pre-factor ($\approx0.55$) only weakly varies with the Reynolds number and is similar to that previously determined in an unbounded shear flow \cite{2002_Bagchi}. These findings allow the fits predicting the lift force on a non-rotating sphere to be extended easily to a torque-free sphere in the form \eqref{eq:lift_tf} for moderate Reynolds numbers and \eqref{eq:lift_highRe_rot} for $\text{Re}\geq100$.\\ \section*{Acknowledgements} This work was supported by the Chinese Scholarship Council (CSC). We thank Anna\"ig Pedrono for her intensive help and support with the JADIM code and the grid generator. \begin{comment}
\section{Introduction} In this note we develop theory of optimal transport of vector measures. Let us first briefly describe the topic of classical optimal transport. \subsection{Optimal transport}\label{ssec:ot} In 1781 Gaspard Monge (see \cite{Monge}) asked the following question: given two probability distributions $\mu,\nu$ on a metric space $(X,d)$, how to transfer one distribution onto the other in an optimal way. The criterion of optimality was to minimise the average transported distance. Since then the topic has been developed extensively and much of this development has been done recently. We refer the reader to the books of Villani (see \cite{Villani2} and \cite{Villani1}) and to the lecture notes of Ambrosio (see \cite{Ambrosio3}) for a thorough discussion, history and applications of the optimal transport problem. The modern mathematical treatment of the problem has been initiated in 1942 by Kantorovich \cite{KantorovichURSS}, \cite{Kantorovich}. He proposed to consider a relaxed problem of optimising \begin{equation*} \int_{X\times X}d(x,y)d\pi(x,y) \end{equation*} among all transference plans $\pi$ between $\mu$ and $\nu$, i.e., the set $\mathrm{\Pi}(\mu,\nu)$ of Borel probability measures on $X\times X$ with respective marginal distributions equal to $\mu$ and to $\nu$. The existence of an optimal transference plan is a straightforward consequence of the Prokhorov's theorem, provided that $X$ is separable. The main question that has attracted a lot of attention is whether there exists an optimal transport plan, i.e., a Borel map $T\colon X\to X$ such that $T_{\#}\mu=\nu$ and the integral \begin{equation*} \int_Xd(x,T(x))d\mu(x) \end{equation*} is minimal. If we knew that an optimal transference plan is concentrated on a graph of a Borel measurable function then we could infer the existence of an optimal transport plan. The first complete answer on Euclidean space, under regularity assumptions on the considered measures, was presented in a seminal paper \cite{Evans-Gangbo} of Evans and Gangbo. However, before that, Sudakov in \cite{Sudakov} presented a solution of the problem that contained a flaw. The flaw has been remedied by Ambrosio in \cite{Ambrosio3} and later by Trudinger and Wang in \cite{Trudinger} for the Euclidean distance and by Caffarelli, Feldman and McCann in \cite{Caffarelli} for distances induced by norms that satisfy certain smoothness and convexity assumptions. In \cite{Caravenna1} Caravenna has carried out the original strategy of Sudakov for general strictly convex norms and eventually Bianchini and Daneri in \cite{Bianchini1} accomplished the plan of a proof of Sudakov for general norms on finite-dimensional normed spaces. Let us describe briefly the strategy of Sudakov in the context of Euclidean spaces. We assume that the two Borel probability measures $\mu,\nu$ on $\mathbb{R}^n$ are absolutely continuous with respect to the Lebesgue measure. Let us recall that the paramount Kantorovich--Rubinstein duality formula tells that \begin{equation}\label{eqn:kr} \sup\Big\{\int_{\mathbb{R}^n}u d(\mu-\nu)\mid u\text{ is }1\text{-Lipschitz}\Big\} \end{equation} is equal to \begin{equation}\label{eqn:krrhs} \inf\Big\{\int_{\mathbb{R}^n\times\mathbb{R}^n}\norm{x-y}d\pi(x,y)\mid \pi\in\mathrm{\Pi}(\mu,\nu)\Big\}. \end{equation} Let us take an optimal $u$ and an optimal $\pi$ in the two above optimisation problems. We may infer that \begin{equation}\label{eqn:mb} u(x)-u(y)=\norm{x-y}\text{ for }\pi\text{-almost every }(x,y)\in X\times X. \end{equation} Consider the maximal sets on which $u$ is an isometry, called the \emph{transport rays}. We see that all transport has to occur on these sets. Careful analysis of the Lipschitz function $u$ shows that the transport rays form a foliation of the underlying space $\mathbb{R}^n$ into line segments, up to Lebesgue measure zero. Moreover, the so-called mass balance condition holds true. This is to say, for any Borel set $A$ that is a union of some collection of transport rays there is $\mu(A)=\nu(A)$; see e.g. \cite{Evans-Gangbo}. Using the mass balance condition, we may construct an optimal transport by gluing together optimal maps for each of the transport rays; see e.g. \cite{Ambrosio3}. This is one of the important observations that is employed in the localisation technique, which allows to reduce the dimension of a considered problem; see a paper of Klartag \cite{Klartag} for application of the technique to weighted Riemannian manifolds satisfying the curvature-dimension condition in the sense of Bakry and \'Emery \cite{Bakry1}, \cite{Bakry} and papers of Cavalletti, Mondino \cite{Cavalletti3}, \cite{Cavalletti2} for application in the setting of metric measure spaces. The localisation technique stems from convex geometry, but its generalisations have been employed to prove many novel results concerning functional inequalities, e.g. isoperimetric inequality in the metric measure spaces satisfying the synthetic curvature-dimension condition (see \cite{Cavalletti3}, \cite{Cavalletti2}). The latter notion was introduced in the foundational papers by Sturm \cite{Sturm1}, \cite{Sturm2} and by Lott and Villani \cite{Villani3} and allowed for development of a far-reaching, vast theory of metric measure spaces. We refer the reader to \cite{Ciosmak2} and references therein for a broader description of the localisation technique and its history. \subsection{Optimal transport of vector measures} The purpose of this article is to investigate multi-dimensional generalisation of the optimal transport problem and its connections with the localisation technique, as proposed by Klartag in \cite[Chapter 6]{Klartag}. We shall consider finite-dimensional linear spaces equipped with Euclidean norm and $1$-Lipschitz maps $u\colon\mathbb{R}^n\to\mathbb{R}^m$. A leaf $\mathcal{S}$ of a $1$-Lipschitz map $u\colon\mathbb{R}^n\to\mathbb{R}^m$ is a maximal set, with respect to the order induced by inclusion, such that the restriction $u|_{\mathcal{S}}$ is an isometry. This is to say, $\mathcal{S}$ is a leaf, whenever for any $x,y\in\mathcal{S}$ there is \begin{equation*} \norm{u(x)-u(y)}=\norm{x-y} \end{equation*} and for any $z\notin\mathcal{S}$ there exists $x\in\mathcal{S}$ such that \begin{equation*} \norm{u(x)-u(z)}<\norm{x-z}. \end{equation*} The notion of leaves is a multi-dimensional generalisation of the notion of transport rays, see Subsection \ref{ssec:ot}, of the one-dimensional optimal transport theory. We refer the reader to \cite{Ciosmak2} for a thorough study of such leaves. Let us mention that such leaves form a convex partition of $\mathbb{R}^n$, up to Lebesgue measure zero. Moreover, any two such leaves may intersect only by their relative boundaries; see \cite{Ciosmak2} for the proofs. Suppose now that we are given a Borel probability measure $\mu$ on $\mathbb{R}^n$, absolutely continuous with respect to the Lebesgue measure, that satisfies $m$ linear constrains. This is to say, \begin{equation}\label{eqn:const} \int_{\mathbb{R}^n}fd\mu=0 \end{equation} for some integrable function $f\colon\mathbb{R}^n\to\mathbb{R}^m$ with finite first moments, i.e., \begin{equation*} \int_{\mathbb{R}^n}\norm{f(x)}\norm{x}d\mu(x)<\infty. \end{equation*} Let $u\colon\mathbb{R}^n\to\mathbb{R}^m$ be a $1$-Lipschitz map such that \begin{equation}\label{eqn:maxx} \int_{\mathbb{R}^n}\langle u,f\rangle d\mu=\sup\Big\{\int_{\mathbb{R}^n}\langle v,f\rangle d\mu\mid v\colon\mathbb{R}^n\to\mathbb{R}^m \text{ is }1\text{-Lipschitz}\Big\}. \end{equation} Existence of $u$ follows by the Arzel\`a--Ascoli theorem. A Borel subset $A$ of $\mathbb{R}^n$ shall be called a \emph{transport set} associated to $u$, whenever for any $x\in A$ that belongs to a unique leaf of $u$ and any $y\in\mathbb{R}^n$ such that \begin{equation*} \norm{x-y}=\norm{u(x)-u(y)}, \end{equation*} there is $y\in A$. In other words, a transport set is a Borel union of a collection of leaves of $u$. In \cite[Chapter 6]{Klartag} it is conjectured that for any transport set $A$ of $u$ \begin{equation}\label{eqn:mass} \int_A fd\mu=0. \end{equation} This is a generalisation of the mass balance condition, mentioned in Subsection \ref{ssec:ot}. The affirmative answer to the conjecture would imply that one may decompose any Borel probability measure $\mu$, satisfying $m$ linear constraints of the form (\ref{eqn:const}), into a mixture of measures, concentrated on pairwise disjoint convex subsets of $\mathbb{R}^n$ of dimension at most $m$, satisfying the same linear constraints; see also \cite{Ciosmak2} for a discussion of the decomposition. If $m=1$ then (\ref{eqn:maxx}) is precisely the dual problem to the optimal transport problem for measures $\rho_1, \rho_2$ given by formulae $d\rho_1=f_+d\mu$ and $d\rho_2=f_-d\mu$. As we see in (\ref{eqn:kr}), the dual problem, depends merely on the difference of measures, and therefore, it makes sense to consider the optimal transport for signed measures with total mass zero. Inspired by this observation, in Section \ref{sec:transport} we develop a theory of optimal transport with metric cost of vector measures of total mass zero and study its basic properties. The r\^ole of a vector measure in the problem considered above is played by the measure with density $f$ with respect to the measure $\mu$. The precise formulation of the optimal transport problem for an $\mathbb{R}^m$-valued measure $\eta$ on a metric space $(X,d)$ that we deal with is as follows: \begin{equation}\label{eqn:vectortr} \inf\Big\{\int_{X\times X} d(x,y) d\norm{\pi}(x,y)\mid \mathrm{P}_1\pi-\mathrm{P}_2\pi=\eta\Big\}. \end{equation} Here $\mathrm{P}_1\pi$ and $\mathrm{P}_2\pi$ stand for the first and the second marginal of the $\mathbb{R}^m$-valued measure $\pi$ respectively. The assumption on $\eta$ is that \begin{equation*} \int_Xd(x,x_0)d\norm{\mu}(x)<\infty\text{ for some }x_0\in X\text{ and }\eta(X)=0. \end{equation*} The above problem for $m=1$ simplifies to the original optimal transport problem, as follows readily by the Kantorovich--Rubinstein formula. We prove that for $m>1$ an analogue of this formula holds with (\ref{eqn:kr}) replaced by \begin{equation}\label{eqn:lip} \sup\Big\{\int_{X}\langle u,d\eta\rangle\mid u\colon X\to\mathbb{R}^m\text{ is }1\text{-Lipschitz}\Big\} \end{equation} and with (\ref{eqn:krrhs}) replaced by (\ref{eqn:vectortr}). This is a content of Theorem \ref{thm:lip}. We also develop a theory of the Wasserstein space $\mathcal{W}(X,\mathbb{R}^m)$ of vector-valued measures. We identify its dual space as the space of vector-valued Lipschitz maps; see Theorem \ref{thm:reciprocals}. Theorem \ref{thm:ae} provides an analogue of (\ref{eqn:mb}) in the new setting. The conjecture of Klartag (see \cite[Chapter 6]{Klartag}) in the language of our theory of optimal transport of vector measures may be restated as follows. Suppose that we are given a vector measure $\mu$ on $\mathbb{R}^n$, with $\mu(\mathbb{R}^n)=0$, which is absolutely continuous with respect to Lebesgue measure. Let $u\colon\mathbb{R}^n\to\mathbb{R}^m$ be a $1$-Lipschitz map, with respect to Euclidean norms, that attains the supremum \begin{equation}\label{eqn:lipr} \sup\Big\{\int_{\mathbb{R}^n}\langle v,d\mu\rangle\mid v\colon\mathbb{R}^n\to\mathbb{R}^m\text{ is }1\text{-Lipschitz}\Big\}. \end{equation} It is claimed in \cite{Klartag} that the following mass balance condition holds true \begin{equation}\label{eqn:massbalance} \mu(A)=0\text{ for any Borel set }A\text{ that is a union of a family of leaves of }u. \end{equation} Using the developed theory, in Section \ref{sec:counter} we resolve the conjecture in the affirmative, provided that there exists an optimal transport with marginals of its total variation that are absolutely continuous with respect to the Lebesgue measure; see Theorem \ref{thm:balance}. Note that in the one-dimensional setting, the existence of such optimal transport is clear; see (\ref{eqn:kr}) and (\ref{eqn:krrhs}). We provide a counterexample to the conjecture, for the case $m>1$; see Theorem \ref{thm:nonzero}. It shows that, in general, the mass balance condition (\ref{eqn:massbalance}) fails to be true. It follows that it may happen that an optimal transport with absolutely continuous marginals do not exist, unlike in the one-dimensional case. More generally, let $\mathcal{F}$ be any subset of $1$-Lipschitz maps that is locally uniformly closed. We prove that the mass balance condition (\ref{eqn:massbalance}) fails to be true, even when the variational problem (\ref{eqn:lipr}) is replaced by \begin{equation} \sup\Big\{\int_{\mathbb{R}^n}\langle v,d\mu\rangle \mid v\in\mathcal{F}\Big\}, \end{equation} unless $\mathcal{F}$ is trivial, i.e. consists merely of affine maps. This is shown for also any norm on $\mathbb{R}^n$ and any strictly convex norm on $\mathbb{R}^m$; see Theorem \ref{thm:affine}. Note that the outline of a proof of the conjecture suggested in \cite{Klartag} has a gap, as follows by the results of \cite{Ciosmak}. Let us mention here that in \cite{Ciosmak2} the generalisation of the localisation technique to multiple constraints is studied. In there, a partition associated to any $1$-Lipschitz map $u\colon\mathbb{R}^n\to\mathbb{R}^m$, $m\leq n$, is studied thoroughly. It is established that any log-concave measure on $\mathbb{R}^n$ may be disintegrated with respect to this partition and that the resulting conditional measures, associated to leaves of maximal dimension, are again log-concave. This result is also presented in the context of spaces satisfying the curvature-dimension condition $CD(\kappa,N)$, thus partially confirming another conjecture of Klartag \cite[Chapter 6]{Klartag}. Let us also mention the existence of another approach to optimal transport of vector measures that differs from ours developed by Chen, Georgiou, Tannenbaum, Tyu, Li, Osher, Haber, Yamamoto (see \cite{Chen1}, \cite{Chen3} and \cite{Chen2}). \subsection{Outline of the paper} Section \ref{sec:transport} is devoted to development and study of the optimal transport theory of vector measures. We define a Wasserstein space and in Theorem \ref{thm:reciprocals} we identify its dual. Theorem \ref{thm:lip} provides an analogue of the Kantorovich--Rubinstein duality formula. In Section \ref{sec:counter} we study the mass balance condition for vector measures. In Theorem \ref{thm:balance} we answer in the affirmative the a conjecture of Klartag, provided there exists an optimal transport with absolutely continuous marginals of its total variation. In Theorem \ref{thm:nonzero} we provide a counterexample to the conjecture, in the Euclidean setting. In Theorem \ref{thm:affine} we resolve the conjecture in the negative in the general setting. \section{Optimal transport of vector measures}\label{sec:transport} In this section we develop the theory of optimal transport of vector measures. Let $X$ be a metric space with metric $d$. Let $\mu$ be $\mathbb{R}^m$-valued Borel measure on $X$. If $\pi$ is a $\mathbb{R}^m$-valued Borel measure on $X\times X$, we write $\mathrm{P}_1\pi$ for the first \emph{marginal} of $\pi$, i.e. the measure given by \begin{equation*} \mathrm{P}_1\pi(A)=\pi(A\times X), \end{equation*} for all Borel $A\subset X$, and $\mathrm{P}_2\pi$ for the second \emph{marginal} of $\pi$, \begin{equation*} \mathrm{P}_2\pi(B)=\pi(X\times B), \end{equation*} for all Borel $B\subset X$. We shall consider a variational problem \begin{equation}\label{eqn:KR} \mathcal{I}(\mu)=\inf\bigg\{{\int_{X\times X}}d(x,y) d\norm{\pi}(x,y)\mid \pi\in \Gamma(\mu) \bigg\}. \end{equation} Here $\Gamma(\mu)$ is the set of all $\mathbb{R}^m$-valued Borel measures $\pi$ on $X\times X$ such that \begin{equation*} \mu=\mathrm{P}_1\pi -\mathrm{P}_2\pi . \end{equation*} To check whether (\ref{eqn:KR}) defines a meaningful quantity, we have to check whether $\Gamma(\mu)$ is non-empty. We shall need the following definition. \begin{definition}\label{defin:prod} Let $\sigma$ be an $\mathbb{R}^m$-valued Borel measure on $X$ and let $\theta$ be a Borel signed measure on $X$. A unique Borel $\mathbb{R}^m$-valued measure $\sigma\otimes \theta $ such that \begin{equation*} \langle \sigma\otimes\theta,v\rangle= \langle \sigma, v\rangle \otimes \theta \end{equation*} for all $v\in\mathbb{R}^m$ we shall call a \emph{product measure}. Here $\langle \sigma,v \rangle \otimes \theta$ is the usual product measure of $\mathbb{R}$-valued measures. \end{definition} \begin{remark} It is clear that the product measure exists. Analogously we define the product measure $\theta\otimes \sigma$ for a Borel signed measure $\sigma$ and a Borel $\mathbb{R}^m$-valued measure $\theta$. \end{remark} \begin{proposition} $\Gamma(\mu)$ is non-empty if and only if \begin{equation}\label{eqn:equam} \mu(X)=0. \end{equation} \end{proposition} \begin{proof} Clearly, if there exists $\pi\in\Gamma(\mu)$, then \begin{equation*} \mu(X)=\mathrm{P}_1\pi(X)-\mathrm{P}_2\pi(X)=\pi(X\times X)-\pi(X\times X)=0, \end{equation*} so the condition (\ref{eqn:equam}) is satisfied. Conversely, assume that (\ref{eqn:equam}) holds true. Let $\nu$ be any Borel probability measure on $X$. Set \begin{equation*} \pi=\mu\otimes \nu. \end{equation*} Here $\mu\otimes \nu$ is the product measure; see Definition~\ref{defin:prod}. Then for any Borel set $A\subset X$ and any vector $v\in\mathbb{R}^m$, we have \begin{equation*} \langle \pi(A\times X)-\pi(X\times A),v\rangle=\langle \mu(A),v\rangle -\langle \mu(X),v\rangle \nu(A)=\langle\mu(A),v\rangle. \end{equation*} This is to say, $\mathrm{P}_1\pi-\mathrm{P}_2\pi=\mu$. \qed \end{proof} The quantity defined by (\ref{eqn:KR}) we shall call the Kantorovich--Rubinstein norm of $\mu$. \begin{proposition} Assume that $\mu(X)=0$. Then $\mathcal{I}(\mu)<\infty$ provided that \begin{equation}\label{eqn:moment} \int_{\mathbb{R}^n}d(x,x_0)d\norm{\mu}(x)<\infty \end{equation} for some (equivalently: any) $x_0\in X$. \end{proposition} \begin{proof} Define \begin{equation*} \pi=\mu\otimes \delta_{x_0}. \end{equation*} Here $\delta_{x_0}$ is a probability measure such that $\delta_{x_0}(\{x_0\})=1$. Then $\pi\in\Gamma(\mu)$ and \begin{equation}\label{eqn:finite} \int_{X\times X}d(x,y)d\norm{\pi}(x,y)\leq \int_{X}d(x,x_0)d\norm{\mu}(x). \end{equation} This shows that $\mathcal{I}(\mu)<\infty$, provided that (\ref{eqn:moment}) is satisfied. The equivalence of finiteness of \begin{equation*} \int_{\mathbb{R}^n}d(x,y)d\norm{\mu}(x)<\infty \end{equation*} for any $y\in X$ follows by the triangle inequality. \qed \end{proof} \begin{definition} We define the \emph{Wasserstein space} $\mathcal{W}(X,\mathbb{R}^m)$ of all Borel measures $\mu$ on $X$ with values in $\mathbb{R}^m$ such that \begin{equation*} \mu(X)=0 \text{ and } \int_{X}d(x,x_0)d\norm{\mu}(x)<\infty \end{equation*} for some $x_0\in X$. We endow it with a norm $\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=\mathcal{I}(\mu)$. \end{definition} Before we proceed let us recall the following definition. We say that a non-negative Borel measure $\mu$ on $X$ is \emph{inner regular} if for any Borel set $B\subset X$ we have \begin{equation*} \mu(B)=\sup\{\mu(K)\mid K\subset B, K \text{ is a compact set}\}. \end{equation*} Let us note that Ulam's lemma tells that any finite Borel measure on a Polish space is inner regular. \begin{lemma}\label{lem:lips} Suppose that $X$ is a Polish space. Let $\mu$ be a $\mathbb{R}^m$-valued Borel measure in $\mathcal{W}(X,\mathbb{R}^m)$. Suppose that for any Lipschitz function $u\colon X\to\mathbb{R}^m$ \begin{equation*} \int_{X}\langle u, d\mu\rangle =0. \end{equation*} Then $\mu=0$. \end{lemma} \begin{proof} We may assume that $m=1$. Let $\mu=\mu_+-\mu_-$ be the Hahn--Jordan decomposition of $\mu$. There exists two disjoint, Borel sets $A,B\subset X$ with $\mu_+(A^c)=0$ and $\mu_-(B^c)=0$. Choose any Borel set $E\subset A$. As any finite measure on $X$ is inner regular, for any $\epsilon>0$, there exists a compact set $K\subset E$ such that \begin{equation*} \mu_+(E)\leq \mu_+(K)+\epsilon. \end{equation*} Define a function $u_{\epsilon}$ by the formula \begin{equation*} u_{\epsilon}(x)=(1-\frac{1}{\epsilon}\mathrm{dist}(x,K))\vee 0. \end{equation*} Then $u_{\epsilon}$ is Lipschitz, equal to one on $K$ and equal to zero on the complement of \begin{equation*} K_{\epsilon}=\{x\in X\mid\mathrm{dist}(x,K)\leq \epsilon\}. \end{equation*} Thus \begin{equation*} 0=\int_{X}u_{\epsilon}d\mu=\mu_+(K)+\int_{K_{\epsilon}\setminus K}u_{\epsilon}d\mu, \end{equation*} Therefore, by the above, \begin{equation*} \mu_+(E)\leq \epsilon+\mu_+(K)\leq \epsilon+\mu_-(K_{\epsilon}\setminus K). \end{equation*} Letting $\epsilon$ tend to zero, we get $\mu_+(E)=0$. It follows that $\mu_+=0$. Analogously, $\mu_-=0$. This is to say, $\mu=0$.\qed \end{proof} \begin{remark} In what follows, we shall always assume that underlying space $X$ is a Polish space. \end{remark} \begin{proposition} The function $\mathcal{W}(X,\mathbb{R}^m)\ni\mu\mapsto\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}\in\mathbb{R}$ is a norm. \end{proposition} \begin{proof} Let us first check that \begin{equation}\label{eqn:nondeg} \norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=0 \text{ if and only if } \mu=0. \end{equation} If $\mu=0$, then $\pi=0$ belongs to $\Gamma(\mu)$, so $\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=0$. Conversely, assume that $\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=0$. Choose any $L$-Lipschitz function \begin{equation*} u\colon X\to\mathbb{R}^m. \end{equation*} Then for any $\pi\in\Gamma(\mu)$ we have \begin{equation*} \Big\lvert\int_{X}\langle u, d\mu\rangle\Big\rvert= \Big\lvert\int_{X\times X}\langle u(x)-u(y), d\pi(x,y)\rangle\Big\rvert\leq L \int_{X\times X}d(x,y)d\norm{\pi}(x,y). \end{equation*} Therefore if $\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=0$, then \begin{equation*} \int_{X}\langle u, d\mu\rangle=0. \end{equation*} It follows by Lemma \ref{lem:lips}, that $\mu=0$. Homogeneity of $\norm{\cdot}_{\mathcal{W}(X,\mathbb{R}^m)}$ is clear. Let us show that the triangle inequality holds. For this choose measures $\mu,\nu\in \mathcal{W}(X,\mathbb{R}^m)$ and any measures $\pi\in \Gamma(\mu)$ and $\rho\in\Gamma(\nu)$. Then \begin{equation*} \mu+\nu=\mathrm{P}_1(\pi+\rho)-\mathrm{P}_2(\pi+\rho), \end{equation*} so that $\pi+\rho\in\Gamma(\mu+\nu)$. It follows that \begin{equation*} \begin{aligned} \norm{\mu+\nu}_{\mathcal{W}(X,\mathbb{R}^m)}&\leq \int_{X\times X}d(x,y)d\norm{\pi+\rho}(x,y)\leq\\ &\leq \int_{X\times X}d(x,y)d\norm{\pi}(x,y)+ \int_{X\times X}d(x,y)d\norm{\rho}(x,y). \end{aligned} \end{equation*} Taking infimum over all $\pi,\rho$ we see that the triangle inequality holds true.\qed \end{proof} \begin{proposition}\label{pro:density} The linear space $\mathcal{U}$ of measures of the form \begin{equation*} \sum_{i=1}^n \delta_{x_i} v_i \end{equation*} for $x_i\in X$ and $v_i\in\mathbb{R}^m$, $i=1,\dotsc,n$, such that $\sum_{i=1}^n v_i=0$, is dense in $\mathcal{W}(X,\mathbb{R}^m)$. \end{proposition} \begin{proof} Choose any measure $\mu\in\mathcal{W}(X,\mathbb{R}^m)$. Choose any $\epsilon>0$. Choose any point $x_0\in X$ and a compact set $K$ such that \begin{equation*} \int_{K^c}d(x,x_0)d\norm{\mu}(x)\leq \epsilon. \end{equation*} Choose pairwise disjoint Borel sets $A_1,A_2,\dotsc,A_k \subset K$ such that the diameter of each is at most $\epsilon$ and \begin{equation*} K=\bigcup_{i=1}^kA_i. \end{equation*} Consider the restrictions $\mu_i=\mu|_{A_i}$ of the measure $\mu$ to the sets $A_i$, $i=1,2,\dotsc,k$. Choose any points $x_i\in A_i$. Then, as \begin{equation*} \pi_i=\mu_i\otimes\delta_{x_i}\in\Gamma(\mu_i-\mu_i(X)\delta_{x_i}), \end{equation*} we have \begin{equation*} \norm{\mu_i- \mu_i(X) \delta_{x_i}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq \int_{X}d(y,x_i)d\norm{\mu_i}(y)\leq \epsilon \norm{\mu}(A_i). \end{equation*} Let $A_0=K^c$ and let $\mu_0=\mu|_{A_0}$. Then \begin{equation*} \pi_0=\mu_0\otimes \delta_{x_0}\in\Gamma(\mu_0-\mu_0(X)\delta_{x_0}), \end{equation*} so \begin{equation*} \norm{\mu_0-\mu_0(X)\delta_{x_0}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq \int_{X}d(x,x_0)d\norm{\mu_0}(x)\leq \epsilon. \end{equation*} Set \begin{equation*} \nu=\sum_{i=0}^k\mu(A_i)\delta_{x_i}. \end{equation*} Then $\nu\in \mathcal{U}$. By the triangle inequality \begin{equation*} \begin{aligned} &\norm{\mu-\nu}_{\mathcal{W}(X,\mathbb{R}^m)}\leq \sum_{i=0}^k \norm{\mu_i-\mu_i(X)\delta_{x_i}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq\\ &\leq \epsilon \sum_{i=1}^k\norm{\mu(A_i)}+\epsilon \leq \epsilon ( \norm{\mu}(X)+1). \end{aligned} \end{equation*} This concludes the proof. \qed \end{proof} \begin{corollary} If $X$ is separable, then so is the Wasserstein space $\mathcal{W}(X,\mathbb{R}^m)$. \end{corollary} \begin{proof} Fix $n\in\mathbb{N}$. Choose a countable dense subset $A\subset X$ and a set \begin{equation}\label{eqn:dense} B\subset \Big\{(w_1,\dotsc,w_n)\in\mathbb{R}^m\times\dotsc\mathbb{R}^m\mid \sum_{i=1}^nw_i=0\Big\} \end{equation} which is countable and dense in the set on the right-hand side of (\ref{eqn:dense}). Consider a measure $\mu$ given by \begin{equation*} \mu=\sum_{i=1}^n \delta_{x_i} v_i \end{equation*} for $x_i\in X$ and $v_i\in\mathbb{R}^m$, $i=1,\dotsc,n$, such that $\sum_{i=1}^n v_i=0$. Choose $\epsilon>0$ and $\tilde{x}_i\in A$, $i=1,\dotsc,n$, and $(\tilde{v}_i)_{i=1}^n\in B$, such that for $i=1,\dotsc,n$ \begin{equation*} d(x_i,\tilde{x}_i)<\epsilon \text{ and }\norm{v_i-\tilde{v}_i}<\epsilon \text{ and } \sum_{i=1}^n\tilde{v}_i=0. \end{equation*} Set \begin{equation*} \tilde{\mu}=\sum_{i=1}^n \delta_{\tilde{x}_i} \tilde{v}_i. \end{equation*} Then \begin{equation*} \norm{\mu-\tilde{\mu}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq \Big\lVert \sum_{i=1}^n \delta_{x_i}(v_i-\tilde{v}_i)\Big\rVert_{\mathcal{W}(X,\mathbb{R}^m)}+\Big\lVert \sum_{i=1}^n (\delta_{x_i}-\delta_{\tilde{x}_i})v_i\Big\rVert_{\mathcal{W}(X,\mathbb{R}^m)} \end{equation*} Choose any $x_0\in X$. Taking \begin{equation*} \pi=\sum_{i=1}^n \delta_{x_i} \otimes \delta_{x_0}(v_i-\tilde{v}_i)\text{ and } \rho=\sum_{i=1}^n (\delta_{x_i}\otimes \delta_{\tilde{x}_i})v_i \end{equation*} we see that \begin{equation*} \Big\lVert \sum_{i=1}^n \delta_{x_i}(v_i-\tilde{v}_i)\Big\rVert_{\mathcal{W}(X,\mathbb{R}^m)}\leq \epsilon \sum_{i=1}^nd(x_i,x_0) \end{equation*} and \begin{equation*} \Big\lVert \sum_{i=1}^n (\delta_{x_i}-\delta_{\tilde{x}_i})v_i\Big\rVert_{\mathcal{W}(X,\mathbb{R}^m)}\leq \epsilon \sum_{i=1}^n\norm{v_i}. \end{equation*} The conclusion follows now from Proposition \ref{pro:density}.\qed \end{proof} \begin{definition} Choose any $x_0\in X$. Define \begin{equation*} \mathcal{L}(X,\mathbb{R}^m)=\{u\colon X\to\mathbb{R}^m\mid u \text{ is Lipschitz and } u(x_0)=0\}, \end{equation*} i.e. the Banach space of $\mathbb{R}^m$-valued Lipschitz functions on $X$ taking value zero at $x_0$, with norm \begin{equation*} \norm{u}_{\mathcal{L}(X,\mathbb{R}^m)}=\sup\bigg\{\frac{\norm{u(x)-u(y)}}{d(x,y)}\mid x,y\in X, x\neq y\bigg\}. \end{equation*} \end{definition} \begin{theorem}\label{thm:reciprocals} Define \begin{equation*} T\colon\mathcal{L}(X,\mathbb{R}^m)\to\mathcal{W}(X,\mathbb{R}^m)^* \end{equation*} and \begin{equation*} S\colon\mathcal{W}(X,\mathbb{R}^m)^*\to \mathcal{L}(X,\mathbb{R}^m) \end{equation*} by \begin{equation}\label{eqn:isodual} T(u)(\mu)=\int_{X}\langle u,d\mu\rangle \end{equation} and \begin{equation}\label{eqn:dualiso} \langle S(\lambda)(x),w\rangle=\lambda((\delta_x-\delta_{x_0})w), \end{equation} for any $w\in\mathbb{R}^m$. Then $S, T$ are mutual reciprocals and establish an isometric isomorphism of $\mathcal{L}(X,\mathbb{R}^m)$ and $\mathcal{W}(X,\mathbb{R}^m)^*$. \end{theorem} \begin{proof} Choose any $\pi\in\Gamma(\mu)$. Then $\mathrm{P}_1\pi-\mathrm{P}_2\pi=\mu$. Thus, if $u$ is a Lipschitz map, then \begin{equation*} \bigg\lvert \int_X\langle u, d\mu \rangle \bigg\rvert=\bigg\lvert \int_X\langle u(x)-u(y), d\pi(x,y) \rangle \bigg\rvert\leq \norm{u}_{\mathcal{L}(X,\mathbb{R}^m)}\int_X d(x,y) d\norm{\pi}(x,y). \end{equation*} Taking infimum over all $\pi\in\Gamma(\mu)$, we see that \begin{equation*} \bigg\lvert \int_X\langle u, d\mu \rangle \bigg\rvert\leq \norm{u}_{\mathcal{L}(X,\mathbb{R}^m)}\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}. \end{equation*} The above calculation shows that the formula (\ref{eqn:isodual}) defines a continuous functional of norm at most $\norm{u}_{\mathcal{L}(X,\mathbb{R}^m)}$. If $w\in\mathbb{R}^m$ if of norm one and $x,y\in X$, $x\neq y$, then for \begin{equation}\label{eqn:mu} \mu_{x,y,w}=\frac{\delta_x-\delta_y}{d(x,y)}w \end{equation} we have $\norm{\mu_{x,y,w}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq 1$ and for any $u\in\mathcal{L}(X,\mathbb{R}^m)$ \begin{equation*} \int_{\mathbb{R}^n}\langle u,d\mu_{x,y,w}\rangle=\frac{\langle w, u(x)-u(y)\rangle}{d(x,y)}. \end{equation*} Thus \begin{equation*} \norm{u}_{\mathcal{L}(X,\mathbb{R}^m)}=\norm{T(u)}. \end{equation*} We shall now show that $T\circ S=\mathrm{Id}$. Take any functional $\lambda\in\mathcal{W}(X,\mathbb{R}^m)^*$. Set \begin{equation*} \sigma_{x,w}=(\delta_x-\delta_{x_0}) w. \end{equation*} Then $S(\lambda)\colon X\to\mathbb{R}^m$ is defined by the formula \begin{equation*} \langle S(\lambda)(x),w\rangle=\lambda(\sigma_{x,w}). \end{equation*} It is clear that the above formula defines $S(\lambda)$ uniquely. Then we claim that map $v=S(\lambda)$ is $\norm{\lambda}$-Lipschitz. Indeed \begin{equation*} \norm{v(x)-v(y)}=\sup\{\langle v(x)-v(y),w\rangle \mid w\in\mathbb{R}^m, \norm{w}=1\}, \end{equation*} and as \begin{equation*} \langle v(x)-v(y),w\rangle = \lambda (\sigma_{x,w}-\sigma_{y,w})\leq \norm{\lambda}\norm{\sigma_{x,w}-\sigma_{y,w}}_{\mathcal{W}(X,\mathbb{R}^m)} \end{equation*} we see that \begin{equation*} \norm{v(x)-v(y)}\leq\norm{\lambda}d(x,y), \text{ since } \norm{\sigma_{x,w}-\sigma_{y,w}}_{\mathcal{W}(X,\mathbb{R}^m)}\leq d(x,y). \end{equation*} Suppose that $\nu=(\delta_x-\delta_y)z$. We compute \begin{equation*} T(v)(\nu)=\int_X\langle v,d\nu\rangle=\int_X\langle v,z\rangle d(\delta_x-\delta_y)= \lambda (\sigma_{x,z}-\sigma_{y,z})=\lambda(\nu). \end{equation*} We see that $T(S(\lambda))$ and $\lambda$ are equal on the set spanned by $(\delta_x-\delta_y)z$, where $x,y\in X$, $z\in\mathbb{R}^m$. By Proposition \ref{pro:density}, we see that $T(S(\lambda))$ and $\lambda$ are equal on $\mathcal{W}(X,\mathbb{R}^m)$. Let us show also that $S\circ T=\mathrm{Id}$. Choose any $w\in\mathbb{R}^m$ and any map $u\in\mathcal{L}(X,\mathbb{R}^m)$. Then \begin{equation*} \langle S(T(u))(x),w\rangle = T(u)((\delta_x-\delta_{x_0})w)=\int_X\langle u, d(\delta_x-\delta_{x_0})w\rangle=\langle u(x),w\rangle, \end{equation*} as $u(x_0)=0$. Therefore $S(T(u))=u$.\qed \end{proof} \begin{theorem}\label{thm:lip} For any $\mu\in \mathcal{W}(X,\mathbb{R}^m)$ \begin{equation}\label{eqn:Kantorovich-Rubinsetin} \sup\bigg\{\int_X\langle u, d\mu \rangle \mid u\colon X\to\mathbb{R}^m \text{ is } 1\text{-Lipschitz}\bigg \}=\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}. \end{equation} Moreover, there exists $1$-Lipschitz function $u_0$ such that \begin{equation}\label{eqn:maxip} \sup\bigg\{\int_X\langle u, d\mu \rangle \mid u\colon X\to\mathbb{R}^m \text{ is } 1\text{-Lipschitz}\bigg \}=\int_X\langle u_0, d\mu\rangle. \end{equation} \end{theorem} \begin{proof} Notice first that the left-hand side of (\ref{eqn:Kantorovich-Rubinsetin}) is clearly at most the right-hand side of (\ref{eqn:Kantorovich-Rubinsetin}). Take any $\mu\in\mathcal{W}(X,\mathbb{R}^m)$. Then by the Hahn--Banach theorem there exists a continuous linear functional $\lambda$ of norm one such that \begin{equation*} \lambda(\mu)=\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}. \end{equation*} By Theorem \ref{thm:reciprocals}, we know that $\lambda$ is of the form \begin{equation*} \lambda(\mu)=\int_X\langle u_0,d\mu\rangle \end{equation*} for some Lipschitz map $u_0$. The Lipschitz constant of $u_0$ is equal to one, as \begin{equation*}\norm{u_0}_{\mathcal{L}(X,\mathbb{R}^m)}=\norm{\lambda}=1. \end{equation*} This completes the proof.\qed \end{proof} \begin{definition} Any $1$-Lipschitz function $u\colon X\to\mathbb{R}^m$ such that (\ref{eqn:maxip}) holds we shall call an \emph{optimal potential} of measure $\mu$. \end{definition} \begin{definition} A measure $\pi\in \Gamma(\mu)$ such that \begin{equation*} \norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}=\int_{X\times X}d(x,y)d\norm{\pi}(x,y) \end{equation*} we shall call an \emph{optimal transport} for $\mu$. \end{definition} \begin{theorem}\label{thm:ae} Let $\mu\in\mathcal{W}(X,\mathbb{R}^m)$. Let $u\in\mathcal{L}(X,\mathbb{R}^m) $ be a $1$-Lipschitz map. Let $\pi\in\Gamma(\mu)$. The following conditions are equivalent: \begin{enumerate}[i)] \item\label{i:opti} \begin{equation*} \int_X \langle u,d\mu\rangle=\int_{X\times X}d(x,y)d\norm{\pi}(x,y)=\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)} , \end{equation*} \item\label{i:borel} \begin{equation*} \int_A \langle u(x)-u(y),d\pi(x,y) \rangle=\int_A d(x,y)d\norm{\pi}(x,y) \end{equation*} for any Borel set $A\subset X\times X$, \item \label{i:eren} \begin{equation*} \int_X \langle u,d\mu\rangle=\int_{X\times X} d(x,y)d\norm{\pi}(x,y), \end{equation*} \item\label{i:optopt} $u$ is an optimal potential for $\mu$ and $\pi$ is an optimal transport for $\mu$. \end{enumerate} Moreover, if the above conditions hold, then \begin{equation*} \norm{u(x)-u(y)}=d(x,y) \end{equation*} $\norm{\pi}$-almost everywhere. \end{theorem} \begin{proof} Assume that \ref{i:eren}) holds. Observe that \begin{equation*} \int_X\langle u, d\mu\rangle=\int_{X\times X} \langle u(x)-u(y),d\pi(x,y) \rangle. \end{equation*} As \begin{equation*} \int_X\langle u, d\mu\rangle\leq \norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}\leq \int_{X\times X}d(x,y)d\norm{\pi}(x,y), \end{equation*} then by \ref{i:eren}) we see that in the above inequalities we have equalities. This is to say, \ref{i:opti}) holds true. Suppose now that \ref{i:opti}) holds. Clearly \begin{equation*} \int_A \langle u(x)-u(y),d\pi(x,y) \rangle\leq\int_A d(x,y)d\norm{\pi}(x,y). \end{equation*} If we had strict inequality in \ref{i:borel}) for some Borel set $A\subset X\times X$, then the above computations show that we would get strict inequality in \ref{i:opti}). Condition \ref{i:optopt}) is reformulation of \ref{i:opti}). The last part of the theorem follows readily from \ref{i:borel}).\qed \end{proof} We say that a measure $\mu\in\mathcal{M}(Z,\mathbb{R}^m)$ is \emph{concentrated} on a subset $X\subset Z$ if there is $\norm{\mu}(Z\setminus X)=0$. \begin{proposition}\label{pro:concent} Assume that $\mathbb{R}^n,\mathbb{R}^m$ are equipped with Euclidean norms. Let $\mu\in \mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$ be concentrated on a set $X\subset\mathbb{R}^n$. Then \begin{equation*} \norm{\mu}_{\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)}=\norm{\mu}_{\mathcal{W}(X,\mathbb{R}^m)}. \end{equation*} \end{proposition} \begin{proof} The assertion is that \begin{equation*} \sup\Big\{\int_{\mathbb{R}^n}\langle u,d\mu\rangle\mid u\colon\mathbb{R}^n\to\mathbb{R}^m\text{ is }1\text{-Lipschitz}\Big\} \end{equation*} is equal to \begin{equation*} \sup\Big\{\int_X\langle u,d\mu\rangle\mid u\colon X\to\mathbb{R}^m\text{ is }1\text{-Lipschitz}\Big\}. \end{equation*} By the Kirszbraun theorem (see e.g. \cite{Kirszbraun}) any $1$-Lipschitz function $u\colon X\to\mathbb{R}^m$ extends to a $1$-Lipschitz function $\tilde{u}\colon\mathbb{R}^n\to\mathbb{R}^m$. Clearly, for any such extension \begin{equation*} \int_{\mathbb{R}^n}\langle \tilde{u},d\mu\rangle=\int_X\langle u,d\mu\rangle. \end{equation*} The assertion follows.\qed \end{proof} \section{Mass balance condition}\label{sec:counter} Let us first provide an affirmative answer to the conjecture of Klartag, under the provision of the existence of optimal transport with absolutely continuous marginals of its total variation. \begin{definition} A leaf $\mathcal{S}$ of a $1$-Lipschitz map $u\colon\mathbb{R}^n\to\mathbb{R}^m$ is a maximal set, with respect to the order induced by inclusion, such that the restriction $u|_{\mathcal{S}}$ is an isometry. This is to say, $\mathcal{S}$ is a leaf, whenever for any $x,y\in\mathcal{S}$ there is \begin{equation*} \norm{u(x)-u(y)}=\norm{x-y} \end{equation*} and for any $z\notin\mathcal{S}$ there exists $x\in\mathcal{S}$ such that \begin{equation*} \norm{u(x)-u(z)}<\norm{x-z}. \end{equation*} \end{definition} It is proven in \cite{Ciosmak2} that leaves of a map $u$ that is $1$-Lipschitz with respect to Euclidean norms are closed and convex sets. Two distinct leaves may intersect at most by their relative boundaries. \begin{definition} Let $u\colon\mathbb{R}^n\to\mathbb{R}^m$ be a $1$-Lipschitz map of Euclidean spaces. We say that a Borel set $A\subset\mathbb{R}^n$ is a \emph{transport set} associated with $u$ if it enjoys the following property: if $x\in A$ is contained in a unique leaf of $u$ and $y\in\mathbb{R}^n$ is such that \begin{equation*} \norm{u(x)-u(y)}=\norm{x-y}, \end{equation*} then $y\in A$. \end{definition} Let us remark that a Borel set $A\subset\mathbb{R}^n$ that is a union of leaves of $u$ is a transport set. We shall denote by $B(u)$ the set of all points $x\in\mathbb{R}^n$ such that there exist at least two distinct leaves $\mathcal{S}_1,\mathcal{S}_2$ of $u$ such that $x\in\mathcal{S}_1\cap\mathcal{S}_2$. In \cite[Corollary 2.15]{Ciosmak2} it is proven that $B(u)$ is of Lebesgue measure zero. Suppose that $\mu\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$. The following theorem shows that if there exists an optimal transport for $\mu$ such that its total variation has absolutely continuous marginals, then the conjecture of Klartag holds true. Note that such existence is clear for $m=1$, whenever $\mu$ is absolutely continuous with respect to the Lebesgue measure $\lambda$. \begin{theorem}\label{thm:balance} Assume that $\mathbb{R}^n,\mathbb{R}^m$ are equipped with Euclidean norms. Suppose that $\mu\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$. Let $u$ be an optimal potential for $\mu$. Suppose that there exists an optimal transport $\pi$ of $\mu$ such that \begin{equation}\label{eqn:abs} \mathrm{P}_1\norm{\pi}\ll, \mathrm{P}_2\norm{\pi} \ll\lambda. \end{equation} Then for any transport set $A$ associated with $u$: \begin{enumerate}[i)] \item\label{i:mass} $\mu(A)=0$, \item\label{i:transport} $\pi|_{A\times A}\in \Gamma(\mu|_A)$ is an optimal transport of $\mu|_A$ \item\label{i:potential} $u$ is an optimal potential of $\mu|_A$. \end{enumerate} \end{theorem} \begin{proof} By \cite[Corollary 2.15]{Ciosmak2} it follows that \begin{equation*} \lambda(B(u))=0. \end{equation*} Suppose that (\ref{eqn:abs}) holds true. Then \begin{equation*} \norm{\pi}\big(B(u)\times \mathbb{R}^n \big)=0\text{ and }\norm{\pi}\big( \mathbb{R}^n\times B(u) \big)=0. \end{equation*} Let \begin{equation*} I=\big\{(x,y)\in\mathbb{R}^n\times\mathbb{R}^n\mid \norm{u(x)-u(y)}=\norm{x-y}\big\}. \end{equation*} By Theorem \ref{thm:ae}, $\norm{\pi}(I^c)=0$. Thus $\pi$ is concentrated on the set \begin{equation*} C=I\cap\big( B(u)^c\times B(u)^c\big). \end{equation*} Suppose that $(x,y)\in C$. Then, as $A$ is a transport set, by the definition of $B(u)$, \begin{equation}\label{eqn:equiv} x\in A \text{ if and only if }y\in A. \end{equation} Let $\eta=\pi|_{A\times A}$. To prove \ref{i:transport}), it is enough to show that $\eta$ is an optimal transport and that \begin{equation*} \eta\in\Gamma(\mu|_{A}). \end{equation*} For this, let $D\subset \mathbb{R}^n$ be any Borel set. Using the fact that $\pi\in\Gamma(\mu)$ and the fact that $\norm{\pi}(C^c)=0$ and (\ref{eqn:equiv}), we have \begin{equation*} \begin{aligned} &\mu(A\cap D)=\int_{\mathbb{R}^n\times\mathbb{R}^n}\Big(\mathbf{1}_{A\cap D}(x)-\mathbf{1}_{A\cap D}(y)\Big)d\pi(x,y)=\\ &=\int_{\mathbb{R}^n\times\mathbb{R}^n}\mathbf{1}_{A\times A}(x,y)\Big(\mathbf{1}_D(x)-\mathbf{1}_D(y)\Big)d\pi(x,y)=\\ &=\int_{\mathbb{R}^n\times\mathbb{R}^n}\Big(\mathbf{1}_D(x)-\mathbf{1}_D(y)\Big)d\eta(x,y)=\mathrm{P}_1\eta(D)-\mathrm{P}_2\eta(D). \end{aligned} \end{equation*} It follows that $\pi|_{A\times A}\in\Gamma(\mu|_A)$. Then \begin{equation}\label{eqn:comput} \int_{A}\langle u,d\mu\rangle =\int_{\mathbb{R}^n\times\mathbb{R}^n} \mathbf{1}_C(x,y)\Big\langle \mathbf{1}_A(x) u(x)-\mathbf{1}_A(y)u(y),d\pi(x,y)\Big\rangle . \end{equation} Therefore, by (\ref{eqn:equiv}), \begin{equation*} \int_{A}\langle u,d\mu\rangle =\int_{\mathbb{R}^n\times\mathbb{R}^n}\mathbf{1}_{A\times A}(x,y)\Big\langle u(x)-u(y),d\pi(x,y)\Big\rangle . \end{equation*} By condition \ref{i:borel}) of Theorem \ref{thm:ae} we see that \begin{equation*} \int_{A}\langle u,d\mu\rangle=\int_{A\times A}\norm{x-y}d\norm{\pi}(x,y). \end{equation*} Theorem \ref{thm:ae}, condition \ref{i:eren}), tells us that $\pi|_{A\times A}$ is an optimal transport and $u$ is an optimal potential. Also $\mu(A)=0$, as $\pi|_{A\times A}\in\Gamma(\mu|_A)$. This completes the proof. \qed \end{proof} We shall now provide necessary tools for the aforementioned counterexample to the conjecture of Klartag. In fact we shall provide a more general theorem for which we shall consider locally uniformly closed subsets subsets $\mathcal{F}$ of $1$-Lipschitz maps of $\mathbb{R}^n$ to $\mathbb{R}^m$ endowed with norms which are not necessarily Euclidean. Suppose that a measure $\mu$ belongs to $\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$. We consider supremum of integrals \begin{equation}\label{eqn:maxil} \int_{\mathbb{R}^n}\langle u,d\mu\rangle \end{equation} taken over all $u\in\mathcal{F}$. An optimal $u_0\in\mathcal{F}$, i.e. the map that satisfies \begin{equation*} \int_{\mathbb{R}^n}\langle u_0,d\mu\rangle=\sup\Big\{\int_{\mathbb{R}^n}\langle u,d\mu\rangle\mid u\in\mathcal{F}\Big\}, \end{equation*} we shall call an $\mathcal{F}$-optimal potential of $\mu$. \begin{lemma}\label{lem:attain} Let $X\subset\mathbb{R}^n$ be a compact set. Suppose that $(\mu_k)_{k=1}^{\infty}\subset\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$ are all supported on $X$ and converge weakly* to $\mu_0\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$, i.e. for any continuous and bounded function $g\colon \mathbb{R}^n\to\mathbb{R}^m$ we have \begin{equation*} \lim_{k\to\infty}\int_{\mathbb{R}^n}\langle g,d\mu_k\rangle=\int_{\mathbb{R}^n}\langle g,d\mu_0\rangle. \end{equation*} Suppose that for $k=1,2,\dotsc,$ $u_k\in\mathcal{F}$ is an $\mathcal{F}$-optimal potential of $\mu_k$ and that $u_k$ converge locally uniformly to $u_0\colon \mathbb{R}^n\to\mathbb{R}^m$. Then $u_0$ is an $\mathcal{F}$-optimal potential of $\mu_0$. \end{lemma} \begin{proof} By the assumption, for any continuous and bounded map $g\colon \mathbb{R}^n\to\mathbb{R}^m$, we have \begin{equation*} \lim_{k\to\infty}\int_{\mathbb{R}^n}\langle g,d(\mu_k-\mu_0)\rangle=0. \end{equation*} In particular, as $\mu_k$ are all supported on $X$, we have \begin{equation*} \lim_{k\to\infty}\int_{\mathbb{R}^n}\langle u_0,d(\mu_k-\mu_0)\rangle=0. \end{equation*} By the Banach--Steinhaus theorem, the sequence $(\mu_k)_{k=1}^{\infty}$ is bounded in the total variation norm. Hence, by uniform convergence on $X$, \begin{equation*} \lim_{k\to\infty}\int_{\mathbb{R}^n}\langle u_k-u_0,d\mu_k\rangle=0. \end{equation*} It follows that \begin{equation*} \int_{\mathbb{R}^n}\langle u_k,d\mu_k\rangle=\int_{\mathbb{R}^n}\langle u_0,d\mu_k\rangle+\int_{\mathbb{R}^n}\langle u_k-u_0,d\mu_k\rangle \end{equation*} converges to $\int_{\mathbb{R}^n}\langle u_0,d\mu_0\rangle$. As for any $1$-Lipschitz map $h\in\mathcal{F}$ we have \begin{equation*} \int_{\mathbb{R}^n}\langle h,d\mu_k\rangle\leq \int_{\mathbb{R}^n}\langle u_k,d\mu_k\rangle. \end{equation*} we also have \begin{equation*} \int_{\mathbb{R}^n}\langle h,d\mu_0\rangle\leq \int_{\mathbb{R}^n}\langle u_0,d\mu_0\rangle. \end{equation*} The proof is complete.\qed \end{proof} Below we shall denote by $B(x,\epsilon)$ an open ball of radius $\epsilon>0$ centred at $x\in\mathbb{R}^n$. \begin{lemma}\label{lem:non-trivial} Let $m\leq n$. Let $\mu\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$ and let $u$ be an optimal potential of $\mu$. Let $A$ be the union of all leaves of dimension at least one. Then $A$ is Borel measurable. Suppose that there exists an optimal transport $\pi$ for $\mu$ or that any transport set of $u$ is of $\mu$-measure zero. Then \begin{equation*} \norm{\mu}(A^c)=0. \end{equation*} \end{lemma} \begin{proof} Observe that \begin{equation*} A=\bigcup_{n=1}^{\infty}\Big\{x\in\mathbb{R}^n\mid \sup\Big\{\frac{\norm{u(x)-u(y)}}{\norm{x-y}}\mid y\in \mathrm{cl}B(x,n)\setminus B(x,1/n)\Big\}=1\Big\}. \end{equation*} The function \begin{equation*} \mathbb{R}^n\ni x\mapsto \sup\Big\{\frac{\norm{u(x)-u(y)}}{\norm{x-y}}\mid y\in \mathrm{cl}B(x,n)\setminus B(x,1/n)\Big\}\in \mathbb{R} \end{equation*} is lower semi-continuous, hence Borel measurable. Thus, $A$ is Borel measurable. Suppose that there exists an optimal transport $\pi$ for $\mu$. By Theorem \ref{thm:ae}, $\pi$ is supported on the set \begin{equation*} I=\big\{(x,y)\in\mathbb{R}^n\times\mathbb{R}^n \mid \norm{u(x)-u(y)}=\norm{x-y}\big\}. \end{equation*} As $\mu=\mathrm{P}_1\pi-\mathrm{P}_2\pi$, for any Borel set $B\subset A^c$, we have \begin{equation*} \mu(B)=\pi(B\times\mathbb{R}^n)-\pi(\mathbb{R}^n\times B)=0, \end{equation*} for if $B\subset A^c$, then \begin{equation*} \big(B\times\mathbb{R}^n\big)\cap I\subset \{(x,x)\mid x\in\mathbb{R}^n\}\text{ and }\big(\mathbb{R}^n\times B\big) \cap I\subset \{(x,x)\mid x\in\mathbb{R}^n\}. \end{equation*} Suppose now that any transport set for $u$ is of $\mu$ measure zero. Observe that any Borel set $B\subset A^c$ is a transport set. The conclusion follows.\qed \end{proof} In the theorem below we shall provide a counterexample to the conjecture of Klartag. \begin{theorem}\label{thm:nonzero} Assume that $m>1$. There exists an absolutely continuous measure $\mu\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$ for which there exists a transport set associated with an optimal potential of $\mu$ with non-zero measure $\mu$. In particular, there is no optimal transport $\pi$ for $\mu$ such that \begin{equation*} \mathrm{P}_1\norm{\pi}\ll\lambda \text{ and }\mathrm{P}_2\norm{\pi}\ll\lambda. \end{equation*} \end{theorem} \begin{proof} Choose any $v_1,\dotsc,v_{m+1}\in\mathbb{R}^m$ such that \begin{equation*} \sum_{i=1}^{m+1}v_i=0 \end{equation*} and that are affinely independent. For $\epsilon>0$ set \begin{equation*} \mu_{\epsilon}=\frac1{\lambda(B(0,\epsilon))}\sum_{i=1}^{m+1} \lambda|_{B(x_i,\epsilon)}v_i, \end{equation*} where $x_1,\dotsc,x_{m+1}\in\mathbb{R}^n$ are pairwise distinct points to be specified later. Here $\lambda$ denotes the Lebesgue measure on $\mathbb{R}^n$. Then $\mu_{\epsilon}\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$. Suppose that for some sequence $(\epsilon_k)_{k=1}^{\infty}$ converging to zero there is \begin{equation*} \mu_{\epsilon_k}(C_k)=0 \end{equation*} for any transport set $C_k$ of $u_k$, where $u_k\colon\mathbb{R}^n\to\mathbb{R}^m$ is an optimal potential of $\mu_{\epsilon_k}$. For $k\in\mathbb{N}$ and $i=1,\dotsc,m+1$ consider the union $N_{ik}$ of all non-trivial leaves of $u_k$ -- i.e. of dimension at least one -- that intersect $\mathrm{cl}B(x_i,\epsilon_k)$. Then $N_{ik}$ is a transport set. Its Borel measurability follows by Lemma \ref{lem:non-trivial}. Indeed, denote $B=\mathrm{cl}B(x_i,\epsilon_k)$; then the function \begin{equation*} \mathbb{R}^n\setminus B\ni x\mapsto \sup\Big\{\frac{\norm{u_k(x)-u_k(y)}}{\norm{x-y}}\mid y\in B\Big\}\in\mathbb{R} \end{equation*} is lower semi-continuous and therefore \begin{equation*} N_{ik}=\Big\{x\in \mathbb{R}^n\setminus B\mid\sup\Big\{\frac{\norm{u_k(x)-u_k(y)}}{\norm{x-y}}\mid y\in B\Big\}=1\Big\}\cup \big(B\cap A_k\big) \end{equation*} is a Borel set. Here $A_k$ is a set of all leaves of dimension at least one corresponding to $u_k$, c.f. Lemma \ref{lem:non-trivial}. Thus $\mu_{\epsilon_k}(N_{ik})=0$. Hence, \begin{equation}\label{eqn:sum} \sum_{j=1}^{m+1}v_j\lambda(B(x_j,\epsilon_k)\cap N_{ik})=0. \end{equation} As $\mu_{\epsilon_k}$, by Lemma \ref{lem:non-trivial}, is concentrated on non-trivial leaves of $u_k$, we have for \begin{equation*} \frac{\lambda(B(x_i,\epsilon_k)\cap N_{ik})}{\lambda(B(0,\epsilon_k))}v_i=\mu_{\epsilon_k}(B(x_i,\epsilon_k)\cap N_{ik})=\mu_{\epsilon_k}(B(x_i,\epsilon_k))=v_i. \end{equation*} By (\ref{eqn:sum}) and assumption on the vectors $v_1,\dotsc,v_{m+1}$ \begin{equation*} \lambda(B(x_j,\epsilon_k)\cap N_{ik})=\lambda(B(0,\epsilon_k)) \text{ for all }j=1,\dotsc,m+1. \end{equation*} Thus we infer that for any $k\in\mathbb{N}$ and for all $r,s=1,\dotsc,m+1$, $r\neq s$, there exist points \begin{equation*} (x_{rs}^k,x_{sr}^k)\in B(x_r,\epsilon_k)\times B(x_s,\epsilon_k) \end{equation*} such that \begin{equation*} \norm{u_k(x_{rs}^k)-u_k(x_{sr}^k)}=\norm{x_{rs}^k-x_{sr}^k}. \end{equation*} Using Arzel\`a--Ascoli theorem and passing to a subsequence we may assume that maps $u_k$ converge locally uniformly to some $1$-Lipschitz map $u_0$. Observe now that \begin{equation*} x_{rs}^k\text{ converges to }x_r\text{ for all }r,s=1,\dotsc,m+1. \end{equation*} Thus, by the locally uniform convergence, $u_0$ is an isometry on $\{x_1,\dotsc,x_{m+1}\}$. Observe that \begin{equation*} \mu_{\epsilon_k}\text{ converges weakly* to }\mu_0=\sum_{i=1}^{m+1}\delta_{x_i}v_i. \end{equation*} Now, Lemma \ref{lem:attain} tells us that $u_0$ is an optimal potential of $\mu_0$. Suppose that points $x_1,\dotsc,x_{m+1}$ are such that for $i\neq j$, $i,j=1,\dotsc,m$, \begin{equation}\label{eqn:inequality} \Big\langle\frac{x_i-x_{m+1}}{\norm{x_i-x_{m+1}}} , \frac{x_j-x_{m+1}}{\norm{x_j-x_{m+1}}}\Big\rangle< \Big\langle\frac{v_i}{\norm{v_i}},\frac{v_j}{\norm{v_j}}\Big\rangle. \end{equation} Then if we define $h\colon\{x_1,\dotsc,x_{m+1}\}\to\mathbb{R}^m$ by \begin{equation*} h(x_{m+1})=0\text{, }h(x_i)=\norm{x_i-x_{m+1}}\frac{v_i}{\norm{v_i}}\text{ for }i=1,\dotsc,m, \end{equation*} then $h$ is $1$-Lipschitz. By the Kirszbraun theorem we may assume that $h$ is defined on the entire space. Moreover for \begin{equation*} \pi=\sum_{i=1}^{m+1}v_i\delta_{(x_i,x_{m+1})} \end{equation*} we have \begin{equation*} \mathrm{P}_1\pi-\mathrm{P}_2\pi=\mu_0 \end{equation*} and \begin{equation*} \pi=\sum_{i=1}^{m}\frac{h(x_i)-h(x_{m+1})}{\norm{x_i-x_{m+1}}}\norm{v_i}\delta_{(x_i,x_{m+1})} \end{equation*} Theorem \ref{thm:ae} yields that $h$ is an optimal potential and $\pi$ is an optimal transport. It follows that \begin{equation*} \norm{\mu_0}_{\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)}=\sum_{i=1}^m\norm{v_i}\norm{x_i-x_{m+1}}. \end{equation*} Theorem \ref{thm:ae} tells us that also \begin{equation*} \pi=\sum_{i=1}^{m}\frac{u_0(x_i)-u_0(x_{m+1})}{\norm{x_i-x_{m+1}}}\norm{v_i}\delta_{(x_i,x_{m+1})} \end{equation*} As $u_0$ is an isometry on $\{x_1,\dotsc,x_{m+1}\}$, it follows that for $i,j=1,\dotsc,m$ \begin{equation*} \norm{h(x_i)-h(x_j)}=\norm{x_i-x_j} \end{equation*} which is not true, as the inequalities in (\ref{eqn:inequality}) are strict. The obtained contradiction shows that there is no such sequence $(\epsilon_k)_{k=1}^{\infty}$, i.e. there exists $\epsilon_0>0$ such that for all $\epsilon\in (0,\epsilon_0)$ there exists a transport set with non-zero measure $\mu_{\epsilon}$ for any optimal potential of $\mu_{\epsilon}$. By Theorem \ref{thm:balance} it follows that for such $\epsilon$ there is is no optimal transport with absolutely continuous marginals for $\mu_{\epsilon}$. \qed \end{proof} The proof of the following theorem is based on the same idea as the proof of Theorem \ref{thm:nonzero}. Note that we do not require below that the norms on $\mathbb{R}^n$ and on $\mathbb{R}^m$ are Euclidean. For a $1$-Lipschitz map $u\colon\mathbb{R}^n\to\mathbb{R}^m$ a leaf of $u$ is a maximal, with respect to the order induced by inclusion, set $\mathcal{S}$ such that $u|_{\mathcal{S}}$ is an isometry. A transport set is defined as a set $A$ that enjoys the property that if $x\in A$ belongs to a unique leaf of $u$, then for any $y\in\mathbb{R}^n$ such that $\norm{u(y)-u(x)}=\norm{y-x}$ there is $y\in A$. This is to say, the leaves and transport sets are defined as in the Euclidean case. \begin{theorem}\label{thm:affine} Let $m\leq n$. Suppose that the norm on $\mathbb{R}^m$ is strictly convex. Suppose that $\mathcal{F}$ is a locally uniformly closed subset of $1$-Lipschitz maps of $\mathbb{R}^n$ to $\mathbb{R}^m$. Suppose that $\mathcal{F}$ has the property that for any absolutely continuous measure $\mu\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$ and any $\mathcal{F}$-optimal potential $u_0$ of $\mu$ we have $\mu(A)=0$ for any transport set $A$ of $u_0$. Then either $m=1$ or $m>1$ and \begin{enumerate}[i)] \item\label{i:affineprim} $m=n$, any $u\in\mathcal{F}$ is affine, and there exists $u\in\mathcal{F}$ that is an isometry of $\mathbb{R}^n$ and of $\mathbb{R}^m$, \item\label{i:subspace} for any absolutely continuous $\mu$, any $\mathcal{F}$-optimal potential of $\mu$ is an isometry on a maximal subspace $V\subset\mathbb{R}^n$, so that \begin{equation}\label{eqn:condition} \mu(\{x\in\mathbb{R}^n\mid Px\in A\})=0\text{ for any Borel set }A\subset W; \end{equation} here $P$ denotes a projection onto a complement $W$ of $V$. \end{enumerate} Suppose that the norms are Euclidean. Then, if any $\mathcal{F}$-optimal potential is affine and is an isometry on a maximal subspace $V\subset\mathbb{R}^n$ such that (\ref{eqn:condition}) holds true, then $\mu(A)=0$ for any transport set of its $\mathcal{F}$-optimal potential. \end{theorem} \begin{proof} Suppose that $m>1$. Choose any pairwise distinct points $x_1,x_2,x_3\in\mathbb{R}^n$ and any affinely independent $v_1,v_2,v_3\in\mathbb{R}^m$ such that $\sum_{i=1}^3v_i=0$. Let \begin{equation*} \nu_0=\sum_{i=1}^3v_i\delta_{x_i}. \end{equation*} Then $\nu_0\in\mathcal{W}(\mathbb{R}^n,\mathbb{R}^m)$. For $\epsilon>0$ let \begin{equation*} \nu_{\epsilon}=\frac1{\lambda(B(0,\epsilon)}\sum_{i=1}^3v_i\lambda|_{B(x_i,\epsilon)} \end{equation*} Choose respective $\mathcal{F}$-optimal potentials $u_{\epsilon}$ for $\nu_{\epsilon}$. These exist as $\mathcal{F}$ is locally uniformly closed. Observe that, by the assumption, $\nu_{\epsilon}(B_{\epsilon})=0$ for any Borel set $B_{\epsilon}$ consisting of trivial leaves of $u_{\epsilon}$. Whence, $\nu_{\epsilon}$ is concentrated on non-trivial leaves of $u_{\epsilon}$. Let $N_{i\epsilon}$ denote the union of all non-trivial leaves that intersect $B_{i\epsilon}=\mathrm{cl}B(x_i,\epsilon)$ for $i=1,2,3$ and $\epsilon>0$. The map \begin{equation*} \mathbb{R}^n\setminus B_{i\epsilon}\ni x\mapsto \sup\Big\{\frac{\norm{u(x)-u(y)}}{\norm{x-y}}\mid y\in B_{i\epsilon}\Big\}\in\mathbb{R} \end{equation*} is lower semi-continuous. Note that \begin{equation*} N_{i\epsilon}=\Big\{x\in\mathbb{R}^n\setminus B_{i\epsilon}\mid \sup\Big\{\frac{\norm{u(x)-u(y)}}{\norm{x-y}}\mid y\in B_{i\epsilon}\Big\}=1\Big\}\cup(B_{i\epsilon}\cap A_{\epsilon}), \end{equation*} where $A_{\epsilon}$ denotes the union of all non-trivial leaves of $u_{\epsilon}$ and is Borel measurable by the argument of Lemma \ref{lem:non-trivial}. Hence $N_{i\epsilon}$ is Borel measurable. By the assumption, \begin{equation*} \nu_{\epsilon}(N_{i\epsilon})=0, \end{equation*} which implies, as in the proof of Theorem \ref{thm:nonzero}, that \begin{equation*} \norm{u_{\epsilon}(x^{\epsilon}_{rs})-u_{\epsilon}(x^{\epsilon}_{sr})}=\norm{x^{\epsilon}_{rs}-x^{\epsilon}_{sr}} \end{equation*} for some points \begin{equation*} (x^{\epsilon}_{rs},x^{\epsilon}_{sr})\in B(x_r,\epsilon)\times B(x_s,\epsilon), r,s=1,\dotsc,3, r\neq s. \end{equation*} By the Arzel\`a--Ascoli theorem and passing to a subsequence we may assume that $u_{\epsilon}$ converges locally uniformly to some $u_0\in\mathcal{F}$, which is an $\mathcal{F}$-optimal potential of $\nu_0$ by Lemma \ref{lem:attain}. By the uniform convergence we infer that $u_0$ is isometric on $\{x_1,x_2,x_3\}$. Let now $x_2=tx_1+(1-t)x_3$ for some $t\in (0,1)$. Then any map $f\colon\{x_1,x_2,x_3\}\to\mathbb{R}^m$ that is isometric satisfies \begin{equation}\label{eqn:cc} f(tx_1+(1-t)x_3)=tf(x_1)+(1-t)f(x_3). \end{equation} Indeed, as $f$ is isometric, \begin{equation*} \norm{f(x_2)-f(x_1)}= (1-t)\norm{x_3-x_1}\text{ and }\norm{f(x_3)-f(x_2)}= t\norm{x_3-x_1}. \end{equation*} As $\norm{f(x_3)-f(x_1)}=\norm{x_3-x_1}$ it follows that we have equality in the triangle inequality \begin{equation*} \norm{f(x_3)-f(x_1)}\leq\norm{f(x_2)-f(x_1)}+\norm{f(x_3)-f(x_2)}. \end{equation*} By the strict convexity it follows that there is $\lambda>0 $ such that \begin{equation*} f(x_2)-f(x_1)=\lambda(f(x_3)-f(x_1)). \end{equation*} Taking the norms we arrive at (\ref{eqn:cc}). A function $f$ that satisfies (\ref{eqn:cc}) may be extended to $\mathbb{R}^n$ to an affine map that has derivative of operator norm at most $m$. This follows by the Hahn--Banach theorem. As $u_0$ is isometric on $\{x_1,x_2,x_3\}$, we infer that \begin{equation*} \sum_{i=1}^3\langle u_0(x_i),v_i\rangle\ \leq \sup\Big\{\sum_{i=1}^3\langle f(x_i),v_i\rangle\mid f\colon\mathbb{R}^n\to\mathbb{R}^m \text{ is linear and }\norm{f}\leq m\Big\} \end{equation*} Note now that the set of vectors $v_1,v_2,v_3$ that sum up to zero and are affinely independent is dense in the set of vectors $v'_1,v'_2,v'_3$ that sum up to zero. Moreover, $u_0$ is an $\mathcal{F}$-optimal potential for $\nu_0$. We conclude that for any $u\in\mathcal{F}$ and any vectors $v_1,v_2,v_3$ that sum up to zero there is \begin{equation*} \sum_{i=1}^3\langle u(x_i),v_i\rangle\ \leq \sup\Big\{\sum_{i=1}^3\langle f(x_i),v_i\rangle\mid f\colon\mathbb{R}^n\to\mathbb{R}^m\text{ is linear and }\norm{f}\leq m\Big\} \end{equation*} Take now $v_2=v$, $v_1=-tv$ and $v_3=-(1-t)v$ with $t\in (0,1)$ as above and any $v\in\mathbb{R}^m$. We infer that \begin{equation*} \langle u(x_2)-tu(x_1)-(1-t)u(x_3) ,v\rangle\leq 0. \end{equation*} As this holds for any $v$ we infer that $u$ is affine. This proves part of \ref{i:affineprim}). If $u$ is affine then there exists a subspace $V\subset\mathbb{R}^n$, possibly trivial, i.e. $V=\{0\}$, such that any set of the form \begin{equation}\label{eqn:leaff} \{x\in\mathbb{R}^n\mid Px\in A\} \end{equation} for a Borel measurable set $A\subset W$ is a transport set of $u$. Here $P$ denotes a projection onto a complement $W$ of $V$. Indeed, let $V\subset\mathbb{R}^n$ be a maximal subspace such that $u|_V$ is an isometry. Suppose that $V$ is not a leaf of $u$. Then there exists $y\notin V$ such that for all $x\in V$ \begin{equation*} \norm{u(y)-u(x)}=\norm{y-x}. \end{equation*} It follows that for all non-zero $\lambda\in\mathbb{R}$ \begin{equation*} \Big\lVert u(y)-u\Big(\frac{x}{\lambda}\Big)\Big\rVert=\Big\lVert y-\frac{x}{\lambda}\Big\rVert \end{equation*} for all $x\in V$. Hence for all $\lambda\in\mathbb{R}$ we have $\norm{u(\lambda y)-u(x)}=\norm{\lambda y-x}$. As $u$ is affine, it is also an isometry on $V+\mathbb{R}y$. This contradiction shows that $V$ is a leaf of $u$. Thus \ref{i:subspace}) is proven. We shall now provide an example of a vector measure $\mu$ such that for any proper subspace $V$ and any $x_0$ there is $c>0$ such that \begin{equation}\label{eqn:mum} \mu\Big(\big\{x\in\mathbb{R}^n\mid \norm{P(x-x_0)}\leq c\big\}\Big)\neq 0. \end{equation} Choose any $x_1,\dotsc,x_{m+1}\in\mathbb{R}^n$ affinely independent. Let $\epsilon>0$ be a number such that any set $\{y_1,\dotsc,y_{m+1}\}$, with $y_i\in B(x_i,\epsilon)$, $i=1,\dotsc,m+1$, is affinely independent. Choose vectors $v_1,\dotsc,v_{m+1}\in\mathbb{R}^m$ that add up to zero and are affinely independent. Let \begin{equation*} \mu=\sum_{i=1}^{m+1}v_i\lambda|_{B(x_i,\epsilon)}, \end{equation*} where $\lambda$ denotes the Lebesgue measure. Choose any proper affine subspace $V\subset\mathbb{R}^n$. Then $V$ intersects at most $m$ of the balls $B(x_i,\epsilon)$, $i=1,\dotsc,m+1$. So does the set \begin{equation*} \big\{x\in\mathbb{R}^n\mid \norm{P(x-x_0)}\leq c\big\} \end{equation*} provided that $c>0$ is sufficiently small. Thus (\ref{eqn:mum}) follows. It implies, by \ref{i:subspace}), that $V=\mathbb{R}^n$. We have shown that any $\mathcal{F}$-optimal potential of $\mu$ has to be an isometry. Hence $m= n$ and the proof of \ref{i:affineprim}) is complete. To prove the last part of the theorem, it is enough to prove that the translates of $V$ are the only leaves of an affine map. This holds true, since any point in $\mathbb{R}^n$ is covered by a translate of $V$ and the leaves of a map foliate $\mathbb{R}^n$, up to Lebesgue measure zero, if the considered norms are Euclidean, c.f. \cite{Ciosmak2}.\qed \end{proof} \bibliographystyle{spmpsci}
\section{Introduction} Modern Knowledge Graphs (KGs) are increasingly focused on improving their coverage of instances and statements and enhancing their expressivity in order to support application needs such as question answering and entity linking. As a result, Wikidata~\cite{vrandevcic2014wikidata}, a popular and representative Knowledge Graph, contains nearly 95 million entities described with over 1.3 billion statements.\footnote{\url{https://grafana.wikimedia.org/d/000000175/wikidata-datamodel-statements}} Wikidata is also highly expressive, using a reification model where each statement includes qualifiers (e.g., to indicate temporal validity) and references (which provide the source(s) from which the statement comes from). Application developers today have three choices for exploiting the knowledge present in Wikidata. They can download the Wikidata dumps in JSON or RDF \cite{rdf} format, they can use the Wikidata API to get data about individual entities, or they can use the Wikidata SPARQL \cite{sparql} endpoint for more elaborate and complex queries.\footnote{\url{https://query.wikidata.org/}} The public Wikidata SPARQL endpoint restricts queries to 5 minutes, returning an error when a query exceeds (or plans to exceed) that time. To mitigate the time-limit restriction, developers can load the massive Wikidata RDF dump on their own servers, a relatively complex process that requires a large server and several days. This paper introduces \texttt{Kypher}, the query language and processor of the KGTK Knowledge Graph Toolkit~\cite{ilievski2020kgtk}, which allows creating personalized variants of Wikidata on a laptop, and enables running analytic queries faster than a Wikidata SPARQL endpoint. Because Kypher uses the KGTK representation, it is not restricted to Wikidata, and can be used to query RDF KGs such as DBpedia~\cite{auer2007dbpedia}. The key advantages of Kypher over existing tooling are: \begin{enumerate} \item Ability to extract large amounts of data from Wikidata. \item Ability to execute queries that retrieve large portions of the full Wikidata. \item Ability to build personalized versions of Wikidata, and extending it with other datasets for specific use cases. \item Easy installation as there are no databases to set up or administer. \item Minimal hardware requirements, as Kypher can be used to query Wikidata and DBpedia on a laptop. \end{enumerate} The rest of the paper is structured as follows. Section~\ref{sec:background} describes the KGTK toolkit, and section~\ref{sec:kypher} presents an introduction to the Kypher query language. Section~\ref{sec:usecases} introduces five representative use cases to illustrate the benefits of Kypher, and section~\ref{sec:experiments} reports the times needed to address the use cases using Kypher queries on a laptop; SPARQL queries on a clone of the Wikidata endpoint; and SPARQL queries on on the public Wikidata endpoint. Section~\ref{sec:discussion} presents conclusions, discussion of the results and directions for future work. \section{Background \label{sec:background} The Knowledge Graph Toolkit (KGTK)~\cite{ilievski2020kgtk} is a comprehensive framework for the creation and exploitation of large hyper-relational KGs, designed for ease of use, scalability, and speed. KGTK represents KGs in tab-separated (TSV) files with four columns: edge-identifier, head, edge-label, and tail. All KGTK commands consume and produce KGs represented in this format, so they can be composed into pipelines to perform complex transformations on KGs. KGTK provides a suite of import commands to import Wikidata, RDF and popular graph representations into the KGTK format. A rich collection of transformation commands make it easy to clean, union, filter, and sort KGs; graph combination commands support efficient intersection, subtraction, and joining of large KGs; graph analytics commands support scalable computation of centrality metrics such as PageRank, degrees, connected components and shortest paths; advanced commands support lexicalization of graph nodes, and computation of multiple variants of text and graph embeddings over the whole graph. In addition, a suite of export commands supports the transformation of KGTK KGs into commonly used formats, including the Wikidata JSON format, RDF triples, JSON documents for ElasticSearch indexing and graph-tool.\footnote{\url{https://graph-tool.skewed.de}} Finally, KGTK allows browsing KGs in a UI using a variant of SQID;\footnote{https://sqid.toolforge.org/} and includes a development environment using Jupyter notebooks that provides seamless integration with Pandas \cite{reback2020pandas,mckinney-proc-scipy-2010}. KGTK can process Wikidata-sized KGs, with billions of edges, on a laptop. Kypher (\texttt{kgtk query}) is one of 55 commands available in KGTK. \section{Kypher query language and processor} \label{sec:kypher} Kypher stands for \emph{KGTK Cypher}. Cypher \cite{francis2018cypher} is a declarative graph query language originally developed at Neo4j. OpenCypher\footnote{\url{https://opencypher.org/}} is a corresponding open-source development effort for Cypher which forms the basis of the new Graph Query Language (GCL).\footnote{\url{https://www.gqlstandards.org/home}} We chose Cypher since its ASCII-art pattern language makes it easy even for novices to express complex queries over graph data. Kypher adopts many aspects of Cypher's query language, but has some important differences. Most notably, KGTK and therefore Kypher do not use the property graph data model assumed by Cypher. Kypher only implements a subset of the Cypher commands (for example, no update commands) and has some minor differences in syntax, for example, to support naming and querying over multiple graphs. Kypher also does not yet support certain features such as path-range patterns, subqueries or unions which are planned as future extensions To implement Kypher queries, we translate them into SQL and execute them on SQLite, a lightweight file-based SQL database. Kypher queries are designed to look and feel very similar to other file-based KGTK commands. They take tabular file data as input and produce tabular data as output. There are no servers and accounts to set up, and the user does not need to know that there is in fact a database used underneath to implement the queries. A cache mechanism makes multiple queries over the same KGTK files very efficient. Kypher has been successfully tested on Wikidata-scale graphs with 1.5B edges where queries executing on a standard laptop run in milliseconds to minutes depending on selectivity and result sizes. Additional information about Kypher and its capabilities can be found online. \footnote{\url{https://kgtk.readthedocs.io/en/latest/transform/query/\#overview}} \section{Use Cases} \label{sec:usecases} This section presents five use cases that illustrate different ways to exploit the data in Wikidata. We show how the use cases can be implemented using Kypher queries and executed on a laptop. The equivalent implementations of the queries in SPARQL have been tested against the public Wikidata SPARQL endpoint, and against a large server with a 24 hour time out limit. The use cases have been implemented in Python for Kypher (using a Jupyer Notebook) and SPARQL (using a script) and are available online.\footnote{\url{https://github.com/usc-isi-i2/kgtk-at-2021-wikidata-workshop/}} All input datasets are available in Zenodo under a public DOI \cite{szekely_pedro_2021_5139550}. In the paper we illustrate each use case using one Kypher query from the notebook. \subsection{Retrieval of large amounts of data from Wikidata} \label{ssec:names} John is doing research on the popularity of first names to improve his entity resolution algorithm for people. He sees that Wikidata contains about 9 million people, so he wants to get the distribution of counts of first names from Wikidata. He writes a SPARQL query, but it times out, so he downloads the Wikidata KGTK files on his laptop and writes a Kypher query. The query, shown in Figure~\ref{fig:john}, retrieves all instances of human (Q5), gets their first names using the P735 property (first name) and returns the counts. \begin{figure}[hb] \begin{verbatim} !$kypher -i items -i p31 -i labels --match ' p31: (person)-[:P31]->(:Q5), # Q5 is person items: (person)-[:P735]->(given_name), # P735 is first name labels: (given_name)-[:label]->(given_name_label)' --return 'distinct given_name as node1, count(given_name) as node2, given_name_label as `node1;label`, "count_names" as label' --order-by 'node2 desc' -o "$OUT"/given-names.tsv node1 node2 node1;label label Q4925477 120416 'John'@en count_names Q12344159 74235 'William'@en count_names Q4927937 59298 'Robert'@en count_names Q16428906 57107 'Thomas'@en count_names Q677191 52568 'James'@en count_names \end{verbatim} \vspace{-0.2in} \caption{Query to count first names in Wikidata (top) and first 5 of 53,253 results (bottom). Runtime: 8.28 minutes.} \label{fig:john} \end{figure} John chooses standard KGTK names for the headers to generate the data as a KGTK graph so that the output of the query is in the same format as all other KGTK files and can be used as input in future queries. In KGTK, triples are represented using \texttt{node1}, \texttt{label} (i.e., property), and \texttt{node2} headings. It is also possible to include triples about \texttt{node1} and \texttt{node2} as additional columns by using the semicolon notation. For example, \texttt{node1;label} represents the \texttt{label} property of \texttt{node1} (in KGTK we represent the Wikidata label attribute using the \texttt{label} property). This type of example computes results over a large number of entities producing a potentially large set of results. This use case cannot be implemented using the public Wikidata endpoint because the query times out, but the Kypher query runs on a laptop (8 minutes, 16 seconds). The companion Jupyter notebook illustrates how this query can be extended to measure the popularity of first names over time. \subsection{Analytics on the full Wikidata} \label{ssec:class_inst} Jessica is working with John on the entity resolution algorithm and her job is to use the number of instances of each class in Wikidata as a feature. Jessica just needs to count the number of instances of each class, summing over the instances of all subclasses. She knows that there are over 1 million classes in Wikidata (entities with a \texttt{P279} property), so she knows it will not run on the public SPARQL endpoint. Jessica copies the SQLite database from John so that she does not have to wait the 98 minutes John had to wait to load the needed Wikidata files on her laptop. \begin{figure}[tbh] \begin{verbatim} !$kypher -i p31 -i p279star --match ' p31: (entity)-[:P31]->(class), p279star: (class)-[:P279star]->(super_class)' --return 'distinct super_class as node1, count(distinct entity) as node2, "entity_count" as label' --order-by 'node2 desc, node1' -o "$OUT"/class.count.tsv.gz node1 node2 label Q35120 88859643 entity_count Q99527517 74418826 entity_count Q488383 73704542 entity_count \end{verbatim} \vspace{-0.2in} \caption{Kypher query to count the instances of every class, including instances of the subclasses (top) and the first 3 rows of the result file (bottom). Runtime: 88.97 minutes. } \label{fig:jessica} \end{figure} The query (Figure~\ref{fig:jessica}) uses two files from the KGTK distribution of Wikidata. The \texttt{p31} file records the class of every instance, and the \texttt{p279star} file records all the super-classes of every class using a new property called \texttt{P279star}. These properties are commonly used so they are provided as separate files for the convenience of users. The query retrieves the class from every entity from the \texttt{P31} file, retrieves all the super-classes of every class, and returns the entity count for every super-class. \begin{figure}[tbh] \begin{verbatim} !$kypher -i p279star -i labels -i "$OUT"/class.count.tsv.gz --as count --match ' p279star: (class)-[]->(:Q11424), # Q11424 is film count: (class)-[:entity_count]->(count), labels: (class)-[:label]->(class_label)' --return 'class as node1, class_label as `node1;label`, count as node2' --order-by 'cast(count, integer) desc' --limit 10 node1 node1;label node2 Q11424 'film'@en 314889 Q24862 'short film'@en 33733 Q506240 'television film'@en 17310 \end{verbatim} \vspace{-0.2in} \caption{Kypher query to output the counts of all subclasses of file, including indirect subclasses (top) and the top 3 results (bottom). Runtime: 2.4 seconds.} \label{fig:jessica2} \end{figure} After coming back from lunch, the file is ready. The Kypher query ran in 88.97 minutes on Jessica's laptop, and contains data for 75K classes, as there are many classes that do not have instances. The equivalent SPARQL query timed out on the public SPARQL endpoint and did not complete after 24 hours on our private SPARQL endpoint (see below for the reason why). Jessica is curious about the data, and wants to know the instance count for all subclasses of film (\texttt{Q11424}). Jessica could modify the query above to include only instances of film with \texttt{p31: (entity)-[:P31]->(:Q11424)}, and the query would return the counts. However, the output file she already computed has all the data she needs, and it is a valid KGTK graph, so Jessica writes a query to pick out the subset that she is interested in (Figure~\ref{fig:jessica2}). She writes a query that uses the output of the previous query (\texttt{class.count.tsv.gz}) as input, uses the \texttt{p279star} file to get all the subclasses of film including indirect subclasses, and fetches the count from the counts file. The query returns results in 2.4 seconds, illustrating how Kypher makes it easy to chain the results of queries, avoiding recomputation of expensive queries to get results. The film version of the query times out on the public SPARQL endpoint and takes 114 seconds on the private SPARQL endpoint as there is no easy way to reuse the results of the previous computation in a new query. Jessica's Kypher query is efficient because she built a personalized version of Wikidata on her laptop, choosing to add the \texttt{entity\_count} property to her KG to make other queries run quickly. Using the file as input to her query was all that Jessica had to do to add the data to her personalized version of Wikidata. Kypher automatically loaded and indexed the data; in addition, Kypher will check whether the files on disk have changed every time it runs a query that uses the file, and will automatically reload and re-index the data as necessary. This use case is a further example of the previous use case where users want to derive new data from Wikidata using queries that involves a large proportion of the entities in Wikidata. KGTK supports these use cases by making it possible to decompose complex use cases into independent queries, and allowing users to build personalized versions of Wikidata where they extend Wikidata with the results of previous queries. The \texttt{p27star} file that KGTK provides is also an example of this capability, and is the reason why the instances query can run in 80 minutes on a laptop but cannot produce results after 24 hours on a large 256GB server running SPARQL. \subsection{Extraction of new graphs from Wikidata} \label{ssec:author} Bill is working on a project to find networks of researchers working on specific topics. He wants to use publication data to find relationships among authors. Bill knows that he can get lots of publication data from Pubmed or Microsoft Academic graph, but wants to give Wikidata a try as he heard that Wikidata has close to 40 million publications, and that in Wikidata publications have links to other entities such as main subjects. \begin{figure}[tbh] \begin{verbatim} !$kypher -i p31 -i p279star -i items -i time -i labels --match ' p31: (pub)-[:P31]->(class), p279star: (class)-[:P279star]->(:Q591041), # node for scientific publication items: (pub)-[:P50]->(author1), # P50 is author items: (pub)-[:P50]->(author2)' --where 'author1 > author2' --return 'distinct author1 as node1, "Pcoauthor" as label, author2 as node2, count(distinct pub) as count_publications' --order-by 'count_publications desc' -o "$TEMP"/coauthors.2019.tsv.gz \end{verbatim} \vspace{-0.2in} \caption{Kypher query to build a network of co-authors of publications. Runtime: 66.39 minutes.} \label{fig:bill} \end{figure} Bill decides that the simplest experiment to try first is to build a network of authors of publications in Wikidata: he wants to create a graph of people in Wikidata who authored papers, to put a link between two people if they coauthored a paper, and to add a qualifier with the count of papers they coauthored. He knows the computation is expensive as there are around 40 million papers in Wikidata, so the network will be large. He doesn't even try to write a SPARQL query because he knows it will time out. Bill downloads the KGTK files and writes the query shown in Figure~\ref{fig:bill}. The query reuses the \texttt{p31} and \texttt{p279star} files to retrieve all publications that are instances of of any subclass of \texttt{Q591041} (scientific publication). He uses the \texttt{P50} property to retrieve the authors and uses two variables (\texttt{author1} and \texttt{author2}) to retrieve multiple authors if they are present. A \texttt{where} clause ensures that the variables are bound to different authors, and the \texttt{return} clause constructs the output edges and qualifier. Bill uses the standard \texttt{node1} and \texttt{node2} headings to construct triples, using a new property \texttt{Pcoauthor}. He also invents a new qualifier \texttt{count\_publications} and includes the labels of the authors so that he can read the output. \begin{figure}[tb] \begin{verbatim} !$kypher -i p31 -i p279star -i items -i labels --match ' p31: (pub)-[:P31]->(class), p279star: (class)-[:P279star]->(:Q591041), # scientific publication items: (pub)-[:P50]->(author1), # P50 is author items: (pub)-[:P50]->(author2), items: (pub)-[:P921]->(cancer_type), # P921 is main subject p279star: (cancer_type)-[:P279star]->(:Q12078), # Q12078 is cancer labels: (author1)-[:label]->(author1_label), labels: (author2)-[:label]->(author2_label)' --where 'author1 > author2' --return ' distinct author1 as node1, "Pcoauthor" as label, author2 as node1, count(distinct pub) as count_publications, author1_label as `node1;label`, author2_label as `node2;label`' --order-by 'count_publications desc' -o "$TEMP"/coauthors.cancer.tsv.gz node1 label node2 count node1;label node2;label Q60320900 Pcoauthor Q60394812 396 'Jorge ...'@en 'Hagop Kan ...'@en Q60394812 Pcoauthor Q66370727 236 'Hagop ...'@en 'Susan O'Brien'@en Q40614280 Pcoauthor Q60394812 186 'Farha ...'@en 'Hagop Kan ...'@en \end{verbatim} \vspace{-0.2in} \caption{Kypher query to build a network of co-authors of publications about cancer (top) and the top 3 results (bottom). Runtime: 2.62 minutes} \label{fig:bill2} \end{figure} Bill continues his investigation. He is interested in cancer research, so he wants to build the same network but using only the papers about cancer. He extends the query using the \texttt{P921} property to retrieve the main subjects of a paper, and again uses the \texttt{p279star} file to select subjects that are below cancer (\texttt{Q12078}). He expects the query to be much faster because now it has strong restrictions, so he gives it a try. The query, shown in Figure~\ref{fig:bill2}, takes 2.62 minutes and produces a network with close to half a million edges. \subsection{Queries combining multiple resources} \label{ssec:ulan} Abigail is working on a cultural heritage project, collaborating with the Getty Research Institute who gave her a file with 27 thousand identifiers of artists that she is interested in; the file has one identifier per line. The Getty uses ULAN identifiers\footnote{\url{https://www.getty.edu/research/tools/vocabularies/ulan/}}, and Abigail has a database indexed using VIAF identifiers.\footnote{\url{http://viaf.org}} Abigail needs to map the ULAN identifiers to VIAF identifiers so that she can use her database. She puts one of the ULAN identifiers in the Wikidata search box and discovers that Wikidata has both ULAN and VIAF identifiers for many artists, so she needs to write a query that retrieves artists using the ULAN identifiers and returns the VIAF identifier when it is available in Wikidata. Abigail considers using SPARQL as it is easy to write a query to retrieve the VIAF identifier given a ULAN identifier. This solution would require sending 27,000 queries to Wikidata (or 27 queries binding 1000 identifiers), and would involve writing a script. She writes a SPARQL query that binds all 27,000 identifiers, but the query is too large and it is rejected in the public SPARQL endpoint. \begin{figure}[tb] \begin{verbatim} !$kypher -i items -i external_ids -i labels -i "$OUT"/ulan.tsv --match ' ulan: (ulan_id)-[]->(), # P214 is VIAF ID, P245 is Union List of Artist Names ID external_ids: (viaf_id)<-[:P214]-(artist)-[:P245]->(ulan_id), labels: (artist)-[]->(artist_label)' --return ' artist as node1, viaf_id as node1;P214, ulan_id as node1;P245, artist_label as node1;label' -o "$OUT"/ulan-to-viaf.tsv node1 node1;P214 node1;P245 node1;label Q1000596 "20822441" "500072302" 'Noémi Ferenczy'@en Q1001063 "96418002" "500099612" 'Olga Fialka'@en Q100156272 "309815799" "500335625" 'Gloria López Córdova'@en \end{verbatim} \vspace{-0.2in} \caption{Kypher query to retrieve VIAF identifiers for a file with 27,000 ULAN identifiers. Runtime: 11.8 seconds.} \label{fig:abigail} \end{figure} Abigail solves the problem using Kypher. She first renames the heading of the \texttt{ulan.tsv} file to \texttt{node1}, so the file is now a valid KGTK graph file because in KGTK any value can be used as \texttt{node1} (subject). Her ULAN KGTK graph contains 27,000 nodes and no edges for any node. She writes the Kypher query shown in Figure~\ref{fig:abigail}. The query uses the \texttt{ulan.tsv} file as input, thereby personalizing the Wikidata graph to include the ULAN identifier nodes. The query binds the \texttt{ulan\_id} variable to the nodes in the \texttt{ulan.tsv} graph. The next clause uses the \texttt{external\_ids} graph from the KGTK distribution of Wikidata to map the ULAN ids to VIAF ids. She returns the data by using standard KGTK headers so that she can use the resulting file in other queries. The query runs in 11.8 seconds and retrieves 8,116 VIAF ids. Wikidata has become a hub for identifiers as it contains a large number of identifiers for entities (over 160 million identifiers). Abigail's use case is an example of a common use case to exploit the Wikidata identifiers: a researcher has an external source that contains identifiers present in Wikidata and wants to retrieve the entities or map one type of identifier to another. Kypher queries address this use case as external resources can be easily converted to KGTK graphs and used in queries. \subsection{Combination of Wikidata and DBpedia} \label{ssec:dbpedia} After mining her VIAF database, Abigail realizes that she needs more data and wants to exploit the Wikipedia infoboxes. Abigail considers using SPARQL federated queries~\cite{quilitz2008querying} to combine Wikidata and DBpedia, but she faces the same problem as before in that she has 27,000 identifiers and may need to issue a large number of queries. Abigail downloads the DBpedia infobox data in RDF format from the DBpedia Databus\footnote{\url{https://databus.dbpedia.org/dbpedia/}} and uses KGTK commands to convert the data to KGTK format. The resulting KGTK file contains close to 100 million edges but the data is noisy as illustrated in the following excerpt. Abigail expects the \texttt{node2} column for these properties to contain Wikidata q-nodes, but sees that often, literals are present. {\footnotesize \begin{verbatim} node1 label node2 Q466241 property:almaMater Q2746779 Q466241 property:occupation 'Fashion designer'@en Q466241 property:spouse 'Patrick Robyn'@en \end{verbatim} } \begin{figure}[tbh] \begin{verbatim} !$kypher -i infobox -i p31 -i labels --match ' infobox: (artist)-[:`property:spouse`]->(spouse), p31: (spouse)-[]->(:Q5)' --opt 'labels: (spouse)-[:label]->(spouse_label)' --return 'artist as node1, "P26" as label, spouse as node2, spouse_label as `node2;label`' -o "$OUT"/spouses.dbpedia.qnodes.tsv node1 label node2 node2;label Q268177 P26 Q1000505 'Bud Lee'@en Q673856 P26 Q1000682 'Fernando Carrillo'@en Q1325720 P26 Q1000874 'Thomas Montacute, 4th Earl of ...'@en \end{verbatim} \vspace{-0.2in} \caption{Kypher query to retrieve spouse statements from DBpedia and verify that the spouses are instances of human in Wikidata. Runtime: 3.4 minutes.} \label{fig:abigail-db} \end{figure} Abigail is interested in the spouse data for her artists and writes the query shown in Figure~\ref{fig:abigail-db}. The query uses as input an external file (\texttt{infobox}) and a Wikidata file (\texttt{p31}), retrieves the spouse from the DBpedia file and verifies that the value of spouse is and instance of human (\texttt{Q5}). Kypher loads the 100 million edge DBpedia file in 10.6 minutes and runs the query in $3.4$ minutes, a fast time considering that there are $322,599$ spouse edges in the DBpedia graph, and all must be checked to be instances of human (\texttt{Q5}). The query identifies $7,325$ high quality spouse statements in DBpedia infoboxes that are not present in Wikidata. This use case illustrates building a personalized Wikidata extension that augments Wikidata with noisy data and then uses Kypher to extract clean data. \section{Experiments} \label{sec:experiments} \begin{table}[b] \centering \label{tab:experiments} \caption{Comparison of execution times (minutes) of queries in use cases. (*) submitting over $5,000$ ULAN identifiers produces an error due to the length of the query.} \label{tab:time} \begin{tabular}{| l | c | c | c | c |} \hline \bf{Query} & \bf Kypher & \bf Kypher & \bf SPARQL & \bf SPARQL \\ & \bf 16GB & \bf 32GB & \bf local (256GB)& \bf public \\ \hline First names & 24.37 & 8.28 & 31.05 & time out\\ Class instances & 104.97 & 88.97 & $>$24 hours & time out \\ Film instances & 0.03 & 0.04 & 1.91 & time out \\ Author network & 61.55 & 66.39 & $>$24 hours & time out\\ Cancer network & 3.18 & 2.62 & 40.19& time out \\ ULAN identifiers & 0.56 & 0.20 & 1.08 & * \\ DBpedia spouses & 3.92 & 3.43 & n/a & n/a \\ \hline \end{tabular} \end{table} We performed experiments to compare the execution times of the Kypher and SPARQL implementations of the queries for the use cases presented in this paper. We used two configurations for Kypher, MacBook Pro laptops with 16GB memory/256GB SSD disk and 32 GB memory/1TB SSD. We used two configurations for SPARQL, the public Wikidata SPARQL endpoint and a local clone of Wikidata (June 2019) running on a server with 24 Intel Xeon cores and 256 GB of memory and SSD. For the Kypher queries we used the Wikidata February 15, 2021 distribution converted to KGTK format. For the Wikidata clone we used the RDF dump from the June 15, 2019 distribution (we did not load the February 15, 2021 distribution as it takes several days to load, and for the purpose of our experiments the earlier dump is adequate as it is smaller). The Jupyter notebook for the Kypher queries was run twice. The first run of the notebook with an empty SQLite database took $349$ minutes in the 32GB laptop, and the second run of the notebook, after the data was loaded and indices were built, took $164$ minutes. The difference, $185$ minutes includes $98$ minutes to load the Wikidata data, $10$ minutes to load the DBpedia infobox data, and the rest, $77$ minutes is time that Kypher used to build database indices. Table~1 shows the runtimes of the queries presented in the use cases. The times are from the second run of the notebook after the data was loaded in the Kypher SQLite database and indices had been created. \section{Discussion and Conclusions} \label{sec:discussion} The main objective of KGTK and Kypher is to democratize the exploitation of Wikidata so that anyone with modest computing resources can take advantage of the vast amounts of knowledge present in Wikidata. Our tools focus on use cases that use large portions of Wikidata to distill new knowledge. The experiments show how expensive queries (e.g., class instances use case, Section~\ref{ssec:class_inst}) that cannot run in one day on a powerful server, complete in about one hour on a laptop. Analytic queries (first names use case, Section~\ref{ssec:names}) become possible on a laptop in a few minutes, and distillation of knowledge for analysis (author and cancer network use case, Section~\ref{ssec:author}) become practical. Kypher enables users to easily combine Wikidata with external sources to extract relevant Wikidata knowledge (ULAN use case, Section~\ref{ssec:ulan}), or to enhance Wikidata with knowledge from external sources (DBpedia use case, Section~\ref{ssec:dbpedia}). Kypher is not meant to address use cases that require the most up-to-date data in Wikidata. KGTK uses the Wikidata JSON dumps published every few days, and the KGTK workflow to process the JSON dump takes one day. The comparison with the Wikidata SPARQL endpoints is preliminary as we have not controlled for caching in the triple store and in the operating system, or performed systematic variations of the complexity of the queries. A more detailed and controlled comparison is reserved for a future paper. Here we speculate on the reasons why Kypher seems to perform significantly better than the Wikidata SPARQL endpoints on the presented use cases: \begin{enumerate} \item \textit{Compact data model:} the KGTK data model allows us to translate 1.2B Wikidata statements very directly into 1.2B edges, while the RDF translation requires reification and generates \textit{O}(10B) triples. KGTK also does not require the use of namespaces which makes data values more compact. \item \textit{Smaller database size:} more compact data translates directly into smaller database sizes, for example, 142GB for the Kypher graph cache vs. 718GB for the local Wikidata endpoint. This gives generally better locality for table and index lookups and better caching of data pages. \item \textit{Specialized tables:} representing specialized data slices such as \texttt{P279star} in their own graph tables makes their reuse very efficient and their indexes more focused, compact, and cache-friendly. \item \textit{Read-only processing:} Kypher does not need to support fine-grained updates of tables and indexes, which need to be supported by the public Wikidata endpoint. This requires additional machinery that slows down performance. \item \textit{Use case selection:} triple stores and databases are optimized to support a large number of use cases. Our set of use cases samples a small slice of that space, and performance might be very different for other types of queries. \end{enumerate} The contribution of this paper is to show that KGTK and Kypher are effective tools for complex analytic use cases. The paper demonstrates that Kypher supports a variety of use cases cases that are impractical with existing tooling. Kypher allows researchers and developers to investigate use cases on their own laptop, exploring extensions of Wikidata that would not be possible on shared resources, with minimal setup, using a simple query language. {\bf Acknowledgements:} This material is based on research sponsored by Air Force Research Laboratory under agreement number FA8750-20-2-10002. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of Air Force Research Laboratory or the U.S. Government. \bibliographystyle{splncs04}
\section{Introduction} In recent years, with the growing popularity of computer vision, and the increased performance of computational systems \cite{feng}, more complex algorithms can be run at record speeds. Following that growth and the importance of traffic management due to population growth, even more in developing countries, there has been increased interest in road traffic surveillance and monitoring sytems \cite{AICity}. Vehicle counting is an integral part of susch systems and methods have been proposed that achive remarkable accuracy \cite{wang, yu}. In the AI City Challenge Workshop at CVPR (henceforth AICity), many methods for vehicle counting are presented each year \cite{AICity}. Most follow a similar three-step strategy of vehicle detection, vehicle tracking, and movement assignment from trajectory modeling and classification. These methods leverage pre-trained object detections and multi-object tracker models. In recent years, object detection has made significant progress, and models such as YOLOv4 \cite{bochkovskiy2020yolov4} provide remarkable runtime efficiency and accuracy. Multi-object tracking methods, especially those that rely on a backbone of an object detector such as DeepSORT \cite{deepSORT}, have likewise matured in performance and are frequently used for vehicle counting methods \cite{AICity}. With regards to the movement assignmet of vehicles, most of the existing methods manually define the ROI and/or Movements of Interest (MOI) as single zones, pair of entering/exit zones, or lines \cite{yu,Abdelhalim,survey,AICity}. Unfortunately, this approach limits the use of these vehicle counting methods to stationary cameras where the MOI and ROI are known a priori and do not change. \begin{figure*}[ht!] \begin{center} \centerline{\includegraphics[width=0.8\textwidth]{./framework.pdf}} \vskip -0.1in \caption{The two-module framework of our system.} \label{framework} \end{center} \vskip -0.2in \end{figure*} Recently, \cite{Youssef} proposed the use of a Region-based CNN and Feature Pyramid Networks to count vehicles and automatically determines the ROI from aerial video footage. While they showed promising results at counting vehicles and detecting the ROI, they were not able to detect unique MOI since they focused on counting all vehicles in footage without specifying how many vehicles were on a given driving trajectory. By leveraging existing computer vision models and techniques, this work introduces a system for vehicle counting that automatically identifies the ROI and MOI from a traffic video footage and the vehicle count of all the driving trajectories shown in the video. The method does not require any additional user input besides the video camera footage (i.e., no ROI, MOI, or points/lines of reference). This method could find wider uses among existing traffic cameras and even work on Pan-Tilt-Zoom cameras, which are frequently used in developing countries. Hence, traffic management technology that rely on vehicle counts could benefit from this work. \section{Method} The proposed method utilizes two distinct modules that run in a sequential unsupervised manner. An overview is illustrated in Figure \ref{framework}. An input video is fed into the Object Detector, and its detections are used for both the first-module, which determines the ROI, and the second-module, which determines vehicle counts in driving-trajectory. \subsection{Object Detection} Prior research suggested that YOLOv4 provides the optimal trade-offs between speed and accuracy with a $43.5\% AP\ (65.7\% AP_{50}$) on the MS COCO dataset at a real-time speed of $\sim 65$ FPS on Tesla V100 \cite{bochkovskiy2020yolov4}. In this work, both cars and trucks detections found using the default YOLOv4 confidence threshold of $\lambda_1 = 0.25$ were combined into just a vehicle detection class. YOLOv4 outputs bounding boxes along with confidence values for each object detected in the camera frame used in the next step. \subsection{ROI Determination Module} The main assumption this works makes is that the camera is positioned such that it has maximal clarity of the ROI the user of the camera is interested in. It follows that objects detected in the ROI would have high detector confidence values compared to objects farther away from or not in the ROI. \subsubsection{Average Grid Confidence} Once all objects in a sequence of video frames are detected, the footage area is divided into square grids of size $max((median(obj\_widths), median(obj\_heights)),$ where object widths and heights refer to the bounding box width and height for all detections throughout the video. For every grid in the image, the average detector confidence value for the center of detection lying in the given grid is calculated. All grids above a threshold value $\lambda_2 = 0.75$, are selected for the next step. Detections are averaged out over a whole grid due to increased computational efficiency achieved by storing bounding box centers and then approximating their area instead of computing average confidence values at each pixel. \subsubsection{Clustering of Grids} Subsequently, all grids of average confidence exceeding $\lambda_2$ are clustered using a simple Depth-First search (DFS) where each grid is considered to be connected to the 9 grids around it. This results in many connected components of grids within the video footage area. Each cluster represents a broad region with a sizable flow of traffic where the detector has high confidence. \subsubsection{Outlier Removal} Sometimes, a few vehicles may be detected at the edges of the camera frame without much movement (e.g. parked vehicles) but with high confidence. Clusters with area under $\lambda_3 = 0.25$ of the average cluster size are removed from future calculations. \subsubsection{Aggregation of Clusters} Finally, for each of the clusters, grid cells lying on their extreme edges are searched for. The four vertices of each grid cells are then used to find the convex hull that encloses all the clusters. This represents the total ROI of this position of the camera frame where the detector has sufficient accuracy and confidence. Figure \ref{counted_cam_1} show an example of the output of the ROI Determination module were the ROI is estimated based on the confidence of the objects detected. This ROI, along with the output of the object detector, are used in the subsequent Vehicle Counting module. \subsection{Vehicle Counting Module} This module only considers detections within the estimated ROI from the first-module. Using the object detections, the object tracker stitches together trajectories for all vehicles passing through the ROI. Trajectories are then clustered, and a representative driving trajectory is obtained for each cluster. Finally, the number of vehicles in each of those clusters is counted. \subsubsection{Object Tracking} To stitch together individual object detections to an object's track across multiple frames of the video, the DeepSORT \cite{deepSORT} object tracker with a YOLOv4 backbone is used with default parameters, except $max\_iou\_distance = 0.7$ was increased to $\lambda_4 = 0.9$ to minimize ID switches, which occur when the tracker incorrectly believes a vehicle has gone out of the frame and assigns the same vehicle a new ID. Once all trajectories are obtained, they are clustered. \subsubsection{Trajectory Clustering} In this work, the $k$-means clustering algorithm is used with $k \in \{2,\dots, 15\}.$ Any video can expect to have at least 2 lanes (i.e. MOIs) and it is assumed most intersections would not have over 15 MOIs. A silhouette-index with a Euclidean distance measure is used and the $k$ with the maximum silhouette-index is chosen. Each vehicle track is clustered using its first and last coordinates, the difference between those two, and the angle between those two multiplied by a factor $\lambda_5 = 100$ (i.e. clustering based on position and the displacement vector ). Clusters with less than $\lambda_6 = 3$ tracks are removed, each track is deleted, and all tracks are re-clustered with the new $k$-value. \subsubsection{Representative Trajectory Determination} Having obtained $k$-clusters with each object's track, they are 'averaged' out to find the representative driving trajectory for the cluster. In this work, a modified version of the method introduced by \cite{traclus} for determining the representative trajectories is implemented. Specifically, a double-sweep method is used to compute two average $y$-values, one for vectors pointing in the same direction as $\vec{V}$ (the average vector for all segments of the cluster), and the other for the opposite direction. In a regular curve, this would provide two distinct averages for when the $x$-value intersects two distinct paths of the cluster thereby providing the true representative path in most cases. The modified implementation uses Quad-Trees to efficiently work with 2D coordinates. Only vectors having $x'$ such that $|x' - x| < ((\lambda_7 = 5) \times grid\_size),$ are searched for potential intersections with the sweep line. The minimum number of lines required to intersect with a single $x$-value to be considered part of the representative path is set to $\lambda_8 = max\{5,0.05 \times num\_tracks\_in\_cluster\}.$ The hyperparameter is a proportion of the number of tracks as longer videos may have a higher proportion of outliers. Paths in both directions of the representative path with less than $\lambda_9 = 3$ points are removed. For a smooth path, the minimum distance between consecutive $x$-values is set to $\gamma = grid\_size$. \subsubsection{Post-processing and Counting} Next, outlier tracks that jump across the camera frame are removed by comparing each track with the representative path for that trajectory. When a significant deviation from the representative path occurs, (i.e., when at least one point on the vehicle's trajectory is further than $(\lambda_7 = 5) \times grid\_size$ from any point on the representative path), the track is deleted from the cluster. After the removals, the tracks are re-clustered and representative paths are re-calculated. Finally, the number of tracks in each cluster is calculated. \begin{figure}[t] \begin{center} \centerline{\includegraphics[width=0.83\columnwidth]{./counts_cam_1_0_1.png}} \vskip -0.1in \caption{Final vehicle counts and rep paths for cam\_1.} \label{counted_cam_1} \end{center} \vskip -0.4in \end{figure} \section{Experimental Evaluation} In this work, pre-trained YOLOv4 and DeepSORT models were used to perform the experiments. All experiments were ran on Google Colab notebooks with a two-thread Xeon Haswell CPU with 2.3 GHz, 12GB of RAM, and a Tesla T4 with 16GB VRAM, and are based on a subset of the AICity 2020 Track1 dataset \cite{AICity}. The hyperparameters chosen for the experiments were based on a qualitative understanding of the models and their applications, and not on any quantitative data or tunning. \begin{table}[b] \vskip -0.2in \caption{Summary of MAE and IoU scores on the validation set.} \label{summary} \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Camera Num & No.of MOIs & MAE & IoU \\ \midrule 1 & 4 & 4.55\% & 61.54\% \\ 2 & 4 & 19.83\% & 28.76\% \\ 4 & 12 & 29.95\% & 41.25\% \\ 5 & 12 & 26.85\% & 46.77\% \\ 8 & 6 & 13.16\% & 55.28\% \\ 10 & 3 & 21.26\% & 32.98\% \\ 11 & 3 & 15.87\% & 84.32\% \\ 14 & 2 & 4.65\% & 72.38\% \\ 15 & 2 & 34.58\% & 66.00\% \\ 16 & 2 & 3.70\% & 81.24\% \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} Table \ref{summary} shows the the Mean Absolute Error (MAE) for the vehicle counting of each video tested, as well as the Intersection-over-Union (IoU) between the ROI estimated and the ground truth ROI provided by AICity. The results show that, on average, the proposed method achieved an IoU score of \textbf{57.07\%} and an MAE of \textbf{17.44\%}. For example, Figure \ref{counted_cam_1} shows the IoU and the MAE calculation for 'cam\_1' of the dataset. \begin{figure}[h] \begin{center} \centerline{\includegraphics[width=0.8 \columnwidth]{./counts_cam_5_0_1.png}} \caption{Rep paths for cam\_5. True $k = 12$, predicted $k = 10$.} \label{counted_cam_5} \end{center} \vskip -0.3in \end{figure} The low IoU scores could be explained by the assumption made in this work for estimating the ROI which is not necessarily followed by the ROI provided by AICity. For example, Fig \ref{counted_cam_1} compares the ROI estimated in this work and that in AICity. In some cases the ROI provided by AICity doesn’t have enough footage for certain paths or cover non-driving areas (e.g., grass), hence resulting in differing outcomes. Moreover, most counting false negatives occur due to missed object detections and false positives due to ID switches, which are a result of the under-performance of DeepSORT and may require advanced methods to alleviate, as presented in AICity\cite{wang, yu}. A preliminary overview suggests that most of counting errors stem from miscalculated $k$ for the $k$-means clustering (see Figure \ref{counted_cam_5}). The method currently runs at approximately $11$ FPS (object detection at approx. 20 FPS, object tracking at 28 FPS, ROI at 581 FPS, clustering at 822 FPS) on the current system configuration (note that object detection can reach speeds of $65$ FPS \cite{bochkovskiy2020yolov4} on ideal system configurations), but would see much higher speeds with better processing power. \section{Conclusion and Further Work} This paper proposes a method of vehicle counting that is capable of automatically estimating the Region-of-Interest and driving-trajectories of vehicles without any information about the traffic footage. While the results are promising, given that the method achieved an average MAE of 17.44\% without using any a priori information about the footage, several limitations and areas of improvement still exist. As shown in Table \ref{summary}, the method's performance has high variability across videos, possibly indicating poor generalizability. Analysing the impact of the different hyperparameters used, and tuning the hyperparameters on the validation set could greatly improve generalizability and performance. Clustering algorithms specifically suited for working on vehicle trajectories could also prove useful. Future work could also explore the possibility of allowing the model to work in real-time and update its ROI, MOIs, and vehicle count as new video frames are provided. \section{Introduction} In recent years, with the growing popularity of computer vision, and the increased performance of computational systems \cite{feng}, more complex algorithms can be run at record speeds. Following that growth and the importance of traffic management due to population growth, even more in developing countries, there has been increased interest in road traffic surveillance and monitoring sytems \cite{AICity}. Vehicle counting is an integral part of susch systems and methods have been proposed that achive remarkable accuracy \cite{wang, yu}. In the AI City Challenge Workshop at CVPR (henceforth AICity), many methods for vehicle counting are presented each year \cite{AICity}. Most follow a similar three-step strategy of vehicle detection, vehicle tracking, and movement assignment from trajectory modeling and classification. These methods leverage pre-trained object detections and multi-object tracker models. In recent years, object detection has made significant progress, and models such as YOLOv4 \cite{bochkovskiy2020yolov4} provide remarkable runtime efficiency and accuracy. Multi-object tracking methods, especially those that rely on a backbone of an object detector such as DeepSORT \cite{deepSORT}, have likewise matured in performance and are frequently used for vehicle counting methods \cite{AICity}. With regards to the movement assignmet of vehicles, most of the existing methods manually define the ROI and/or Movements of Interest (MOI) as single zones, pair of entering/exit zones, or lines \cite{yu,Abdelhalim,survey,AICity}. Unfortunately, this approach limits the use of these vehicle counting methods to stationary cameras where the MOI and ROI are known a priori and do not change. \begin{figure*}[ht!] \begin{center} \centerline{\includegraphics[width=0.8\textwidth]{./framework.pdf}} \vskip -0.1in \caption{The two-module framework of our system.} \label{framework} \end{center} \vskip -0.2in \end{figure*} Recently, \cite{Youssef} proposed the use of a Region-based CNN and Feature Pyramid Networks to count vehicles and automatically determines the ROI from aerial video footage. While they showed promising results at counting vehicles and detecting the ROI, they were not able to detect unique MOI since they focused on counting all vehicles in footage without specifying how many vehicles were on a given driving trajectory. By leveraging existing computer vision models and techniques, this work introduces a system for vehicle counting that automatically identifies the ROI and MOI from a traffic video footage and the vehicle count of all the driving trajectories shown in the video. The method does not require any additional user input besides the video camera footage (i.e., no ROI, MOI, or points/lines of reference). This method could find wider uses among existing traffic cameras and even work on Pan-Tilt-Zoom cameras, which are frequently used in developing countries. Hence, traffic management technology that rely on vehicle counts could benefit from this work. \section{Method} The proposed method utilizes two distinct modules that run in a sequential unsupervised manner. An overview is illustrated in Figure \ref{framework}. An input video is fed into the Object Detector, and its detections are used for both the first-module, which determines the ROI, and the second-module, which determines vehicle counts in driving-trajectory. \subsection{Object Detection} Prior research suggested that YOLOv4 provides the optimal trade-offs between speed and accuracy with a $43.5\% AP\ (65.7\% AP_{50}$) on the MS COCO dataset at a real-time speed of $\sim 65$ FPS on Tesla V100 \cite{bochkovskiy2020yolov4}. In this work, both cars and trucks detections found using the default YOLOv4 confidence threshold of $\lambda_1 = 0.25$ were combined into just a vehicle detection class. YOLOv4 outputs bounding boxes along with confidence values for each object detected in the camera frame used in the next step. \subsection{ROI Determination Module} The main assumption this works makes is that the camera is positioned such that it has maximal clarity of the ROI the user of the camera is interested in. It follows that objects detected in the ROI would have high detector confidence values compared to objects farther away from or not in the ROI. \subsubsection{Average Grid Confidence} Once all objects in a sequence of video frames are detected, the footage area is divided into square grids of size $max((median(obj\_widths), median(obj\_heights)),$ where object widths and heights refer to the bounding box width and height for all detections throughout the video. For every grid in the image, the average detector confidence value for the center of detection lying in the given grid is calculated. All grids above a threshold value $\lambda_2 = 0.75$, are selected for the next step. Detections are averaged out over a whole grid due to increased computational efficiency achieved by storing bounding box centers and then approximating their area instead of computing average confidence values at each pixel. \subsubsection{Clustering of Grids} Subsequently, all grids of average confidence exceeding $\lambda_2$ are clustered using a simple Depth-First search (DFS) where each grid is considered to be connected to the 9 grids around it. This results in many connected components of grids within the video footage area. Each cluster represents a broad region with a sizable flow of traffic where the detector has high confidence. \subsubsection{Outlier Removal} Sometimes, a few vehicles may be detected at the edges of the camera frame without much movement (e.g. parked vehicles) but with high confidence. Clusters with area under $\lambda_3 = 0.25$ of the average cluster size are removed from future calculations. \subsubsection{Aggregation of Clusters} Finally, for each of the clusters, grid cells lying on their extreme edges are searched for. The four vertices of each grid cells are then used to find the convex hull that encloses all the clusters. This represents the total ROI of this position of the camera frame where the detector has sufficient accuracy and confidence. Figure \ref{counted_cam_1} show an example of the output of the ROI Determination module were the ROI is estimated based on the confidence of the objects detected. This ROI, along with the output of the object detector, are used in the subsequent Vehicle Counting module. \subsection{Vehicle Counting Module} This module only considers detections within the estimated ROI from the first-module. Using the object detections, the object tracker stitches together trajectories for all vehicles passing through the ROI. Trajectories are then clustered, and a representative driving trajectory is obtained for each cluster. Finally, the number of vehicles in each of those clusters is counted. \subsubsection{Object Tracking} To stitch together individual object detections to an object's track across multiple frames of the video, the DeepSORT \cite{deepSORT} object tracker with a YOLOv4 backbone is used with default parameters, except $max\_iou\_distance = 0.7$ was increased to $\lambda_4 = 0.9$ to minimize ID switches, which occur when the tracker incorrectly believes a vehicle has gone out of the frame and assigns the same vehicle a new ID. Once all trajectories are obtained, they are clustered. \subsubsection{Trajectory Clustering} In this work, the $k$-means clustering algorithm is used with $k \in \{2,\dots, 15\}.$ Any video can expect to have at least 2 lanes (i.e. MOIs) and it is assumed most intersections would not have over 15 MOIs. A silhouette-index with a Euclidean distance measure is used and the $k$ with the maximum silhouette-index is chosen. Each vehicle track is clustered using its first and last coordinates, the difference between those two, and the angle between those two multiplied by a factor $\lambda_5 = 100$ (i.e. clustering based on position and the displacement vector ). Clusters with less than $\lambda_6 = 3$ tracks are removed, each track is deleted, and all tracks are re-clustered with the new $k$-value. \subsubsection{Representative Trajectory Determination} Having obtained $k$-clusters with each object's track, they are 'averaged' out to find the representative driving trajectory for the cluster. In this work, a modified version of the method introduced by \cite{traclus} for determining the representative trajectories is implemented. Specifically, a double-sweep method is used to compute two average $y$-values, one for vectors pointing in the same direction as $\vec{V}$ (the average vector for all segments of the cluster), and the other for the opposite direction. In a regular curve, this would provide two distinct averages for when the $x$-value intersects two distinct paths of the cluster thereby providing the true representative path in most cases. The modified implementation uses Quad-Trees to efficiently work with 2D coordinates. Only vectors having $x'$ such that $|x' - x| < ((\lambda_7 = 5) \times grid\_size),$ are searched for potential intersections with the sweep line. The minimum number of lines required to intersect with a single $x$-value to be considered part of the representative path is set to $\lambda_8 = max\{5,0.05 \times num\_tracks\_in\_cluster\}.$ The hyperparameter is a proportion of the number of tracks as longer videos may have a higher proportion of outliers. Paths in both directions of the representative path with less than $\lambda_9 = 3$ points are removed. For a smooth path, the minimum distance between consecutive $x$-values is set to $\gamma = grid\_size$. \subsubsection{Post-processing and Counting} Next, outlier tracks that jump across the camera frame are removed by comparing each track with the representative path for that trajectory. When a significant deviation from the representative path occurs, (i.e., when at least one point on the vehicle's trajectory is further than $(\lambda_7 = 5) \times grid\_size$ from any point on the representative path), the track is deleted from the cluster. After the removals, the tracks are re-clustered and representative paths are re-calculated. Finally, the number of tracks in each cluster is calculated. \begin{figure}[t] \begin{center} \centerline{\includegraphics[width=0.83\columnwidth]{./counts_cam_1_0_1.png}} \vskip -0.1in \caption{Final vehicle counts and rep paths for cam\_1.} \label{counted_cam_1} \end{center} \vskip -0.4in \end{figure} \section{Experimental Evaluation} In this work, pre-trained YOLOv4 and DeepSORT models were used to perform the experiments. All experiments were ran on Google Colab notebooks with a two-thread Xeon Haswell CPU with 2.3 GHz, 12GB of RAM, and a Tesla T4 with 16GB VRAM, and are based on a subset of the AICity 2020 Track1 dataset \cite{AICity}. The hyperparameters chosen for the experiments were based on a qualitative understanding of the models and their applications, and not on any quantitative data or tunning. \begin{table}[b] \vskip -0.2in \caption{Summary of MAE and IoU scores on the validation set.} \label{summary} \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Camera Num & No.of MOIs & MAE & IoU \\ \midrule 1 & 4 & 4.55\% & 61.54\% \\ 2 & 4 & 19.83\% & 28.76\% \\ 4 & 12 & 29.95\% & 41.25\% \\ 5 & 12 & 26.85\% & 46.77\% \\ 8 & 6 & 13.16\% & 55.28\% \\ 10 & 3 & 21.26\% & 32.98\% \\ 11 & 3 & 15.87\% & 84.32\% \\ 14 & 2 & 4.65\% & 72.38\% \\ 15 & 2 & 34.58\% & 66.00\% \\ 16 & 2 & 3.70\% & 81.24\% \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} Table \ref{summary} shows the the Mean Absolute Error (MAE) for the vehicle counting of each video tested, as well as the Intersection-over-Union (IoU) between the ROI estimated and the ground truth ROI provided by AICity. The results show that, on average, the proposed method achieved an IoU score of \textbf{57.07\%} and an MAE of \textbf{17.44\%}. For example, Figure \ref{counted_cam_1} shows the IoU and the MAE calculation for 'cam\_1' of the dataset. \begin{figure}[h] \begin{center} \centerline{\includegraphics[width=0.8 \columnwidth]{./counts_cam_5_0_1.png}} \caption{Rep paths for cam\_5. True $k = 12$, predicted $k = 10$.} \label{counted_cam_5} \end{center} \vskip -0.3in \end{figure} The low IoU scores could be explained by the assumption made in this work for estimating the ROI which is not necessarily followed by the ROI provided by AICity. For example, Fig \ref{counted_cam_1} compares the ROI estimated in this work and that in AICity. In some cases the ROI provided by AICity doesn’t have enough footage for certain paths or cover non-driving areas (e.g., grass), hence resulting in differing outcomes. Moreover, most counting false negatives occur due to missed object detections and false positives due to ID switches, which are a result of the under-performance of DeepSORT and may require advanced methods to alleviate, as presented in AICity\cite{wang, yu}. A preliminary overview suggests that most of counting errors stem from miscalculated $k$ for the $k$-means clustering (see Figure \ref{counted_cam_5}). The method currently runs at approximately $11$ FPS (object detection at approx. 20 FPS, object tracking at 28 FPS, ROI at 581 FPS, clustering at 822 FPS) on the current system configuration (note that object detection can reach speeds of $65$ FPS \cite{bochkovskiy2020yolov4} on ideal system configurations), but would see much higher speeds with better processing power. \section{Conclusion and Further Work} This paper proposes a method of vehicle counting that is capable of automatically estimating the Region-of-Interest and driving-trajectories of vehicles without any information about the traffic footage. While the results are promising, given that the method achieved an average MAE of 17.44\% without using any a priori information about the footage, several limitations and areas of improvement still exist. As shown in Table \ref{summary}, the method's performance has high variability across videos, possibly indicating poor generalizability. Analysing the impact of the different hyperparameters used, and tuning the hyperparameters on the validation set could greatly improve generalizability and performance. Clustering algorithms specifically suited for working on vehicle trajectories could also prove useful. Future work could also explore the possibility of allowing the model to work in real-time and update its ROI, MOIs, and vehicle count as new video frames are provided.
\section{Introduction} With the rapid development of the Internet, the explosive growth of multimedia data poses huge challenges to accurate nearest-neighbor based searching methods. Instead, due to its high efficiency, the approximate nearest neighbor~(ANN)~\cite{indyk1998approximate} based search methods have attracted increasing attention. Among them, hashing technologies contribute remarkably to their fast query speed and low storage overhead. To be specific, hashing techniques can be divided into supervised and unsupervised categories. Supervised hashing~\cite{ shen2015supervised, shen2015supervised, kang2016column, gui2017fast, jiang2017asymmetric, luo2018fast, chen2019deep, tu2021partial, tu2020deep} methods use the label information to train hashing models, which achieve fine performance. However, the annotations are highly time-consuming and also expensive to collect, which limits these methods in many practical applications. Due to this scenario, unsupervised hashing methods~\cite{salakhutdinov2009semantic, kong2012isotropic, gong2012iterative, he2013k, wang2018deep, he2019k} have drawn a large amount of attention. Many unsupervised hashing methods have been proposed in the past decade, including Spectral Hashing (SH)~\cite{weiss2009spectral}, Hashing with Graphs (AGH) \cite{liu2011hashing}, Iterative Quantization (ITQ)~\cite{gong2012iterative}, Stochastic Generative Hashing (SGH)~\cite{dai2017stochastic} , etc. The previous unsupervised hashing methods have made progress in this area, however, they normally adopt shallow architectures and severely depend on hand-crafted features~(such as SIFT features~\cite{lowe1999object}), which degrade the learning performance. In recent years, numerous deep learning techniques have been introduced into unsupervised hashing methods~\cite{lin2016learning,li2017deeps, tu2018object} due to their powerful feature representation capability. With the lack of labels, most of the unsupervised deep hashing methods construct a pairwise similarity matrix with pre-trained deep features. For example, ~\citet{yang2018semantic} compute the similarity matrix based on the observation that the distribution of the cosine distance for point pairs can be estimated by two half Gaussian distributions. Once the similarity matrix is built, in most of the existing methods, it will be fixed to guide the hash code learning process. However, such a similarity matrix may be unreliable because it is computed with the pre-trained deep features and ignores the semantic information in the downstream retrieval task. To tackle this issue, ~\citet{shen2018unsupervised} employ a straightway by reconstructing a similarity graph with the fine-tuning features through the Gaussian kernel. However, such specific construction schemes mainly focus on the local structure, which limits the model performance, and also, the reconstruction strategy suffers from high computational costs. In addition, most of the existing methods~\cite{xia2014supervised, cao2016deep, deng2019unsupervised} ignore the semantic importance of data pairs during their design of the similarity-preserving loss function. As such data pairs are treated equivalently in the learning process. A few of works~\cite{yang2018semantic, zhang2020deep, zhangz2020deep, qin2020unsupervised} primitively divide the data pairs into different types like confident or unconfident, they still fail to provide a fine-grained measurement of the importance of different data pairs. The pairs in the same class are still treated equivalently. However, the priority of different data pairs should be different. Intuitively, the dissimilar data pairs might contain more discriminative information, and be more informative for model training. Otherwise, the informative data pairs will be buried by large number of less-informative training pairs and decline hash learning. To deal with the aforementioned issues, we propose a novel \textbf{Deep Self-Adaptive Hashing~(DSAH)} method to adaptively explore the semantic information under training, and provide two innovative components. The pipeline is shown in Figure~\ref{pipeline}. In particular, to overcome the disadvantage of fixed pre-computed similarity, we adopt an \textbf{Adaptive Neighbor Discovery~(AND)} technique, which mines underlying neighbor relationships behind the fine-tuning features gradually during training, and update the initial similarity graph continuously. Further, we introduce an adjustable pairwise weight term \textbf{Pairwise Information Content~(PIC)} to distinguish the different importance of data pairs. In this way, the data pairs with more information would gain greater weights and contribute more to model learning. These two techniques enable DSAH to fully explore the semantic information behind the data pairs and learn better hash codes in a self-adaptive manner. The main contributions of this paper can be summarized as follows: \begin{itemize} \item We propose a novel \textbf{DSAH} method to yield better hash codes in a self-adaptive manner with the full exploration of semantic information behind the data pairs. \item We propose the \textbf{AND} technique to refine the pre-computed similarity matrix with the fine-tuned representations during the learning process, which can adaptively capture the implicit neighbor relationships and improve the hash learning performance. \item We propose the \textbf{PIC} to measure the importance of different data pairs and use it to weigh them during training, where more dissimilar data pairs will be assigned larger weights to augment their discriminative power. These weights are further adaptively updated with the pairwise similarity distribution when the training iterates. \item The extensive experiments on several benchmark datasets show that our DSAH is indeed effective and achieves superior performance, which achieves 6.2\%, 8.7\%, 2.7\% improvement over the best baseline on CIFRA-10, FLICKR25K, and NUS-WIDE datasets, respectively. \end{itemize} \begin{figure*}[!t] \centering \includegraphics[width=0.9\linewidth]{demo/pipeline} \caption{The pipeline of the proposed {Deep Self-Adaptive Hashing~(DSAH)}. First, we initialize a similarity matrix based on the original features and extract the image features via VGG-19 to compute the pairwise similarity. Next, we provide two novel technologies: (i) We introduce {PIC} (Upper branch) to augment the priority of informative data pairs. (ii) We propose AND (Down branch) to refine the initialized similarity matrix and mine the implicit neighbors' relationships with learned representation. These two components assist DSAH to learn hash codes in a self-adaptive manner.} \label{pipeline} \end{figure*} \section{Notation and Problem Definition} Let us introduce some notations for this paper. We use boldface uppercase letters $\mathbf{A}$ to represent a matrix, in which $\mathbf{a}_i$ represents the $i$-th row of $\mathbf{A}$, $a_{ij}$ represents the element of $\mathbf{A}$ which is in the $i$-th row and the $j$-th column. $\|\cdot\|$ denotes the L2 norm and $\|\cdot\|_F$ represents the Frobenius norm. $\mathbf{1}(\cdot)$ is the indicator function. $\tanh(\cdot)$ is the hyperbolic tangent function. $\sign(\cdot)$ is the sign function, which outputs $+1$ for positive numbers, or $-1$ otherwise. \begin{equation} \sign(x)=\left\{ \begin{aligned} 1,\quad x \geq 0 \\ -1,\quad x< 0 \\ \end{aligned} \right. \label{sign} \end{equation} Given a dataset contain $n$ samples $\mathbf{X}=\{\mathbf{x}_1,\mathbf{x}_2, \cdots, \mathbf{x}_n\}\in\mathbb{R}^{d\times n}$ without human annotations, where $d$ is the dimension of samples. The goal of hashing is to learn a function ${\mathcal{H}}: \mathbf{x}_i\rightarrow \mathbf{b}_i$ that maps the dataset $\mathbf{X}$ into a set of compact binary hash codes $\mathbf{B}=\{\mathbf{b}_1, \mathbf{b}_2, \cdots, \mathbf{b}_n\}\in\{+1,-1\}^{l\times n}$ where $l$ is the length of codes. \section{Related Work} In this section, we briefly review the traditional shallow hashing methods and recent deep hashing methods. These methods can be divided into supervised and unsupervised categories, and we mainly focus on unsupervised hashing methods. \subsection{Shallow Hashing} Generally, traditional shallow hashing methods can be classified into two categories: data-independent hashing methods and data-dependent methods. Data-independent hashing methods \cite{gionis1999similarity, andoni2006near, kulis2009kernelized} typically use random projection to generate binary code. Locally Sensitive Hashing~(LSH)~\cite{andoni2006near} is a representative data-independent hashing method, which enables similar data to share similar hash codes in Hamming space. However, data-independent hashing methods require longer binary codes to achieve higher accuracy, which also results in higher storage costs. The data-dependent hashing methods \cite{weiss2009spectral, liu2011hashing, gong2012iterative, dai2017stochastic} have also received increasing attention in recent years, which aim to learn compact and high-quality binary codes from specific data. One of the most classical data-dependent hashing methods is Spectral Hashing (SH) \cite{weiss2009spectral}, which was developed to learn binary codes by preserving local manifold structures. The objective function of SH can be written as: \begin{equation} \begin{gathered} \min_\mathbf{B }\sum_{ij}w_{ij}\|\mathbf{b}_i - \mathbf{b}_j\|^2 \\ s.t. \mathbf{b}_i\in\{-1,+1\}^l,\quad \sum_i \mathbf{b}_i=0,\quad \frac{1}{n}\sum_i \mathbf{b}_i\mathbf{b}_i^T=I \end{gathered} \label{SH} \end{equation} where $w_{ij}=\exp(-\|\mathbf{x}_i-\mathbf{x}_j\|^2/\varepsilon)$ is the similarity weight between $x_i$ and $x_j$. $\varepsilon$ is the balance parameter. The optimization of Eq. \ref{SH} is equivalent to balanced graph partitioning and is an NP-hard problem. SH solves this problem by introducing spectral relaxation, which removes the discrete constraint. The objective function of SH is to binarize the input so that the Hamming distance approximates the Euclidean distance. Generally, the shallow hashing methods usually encode the input images with hand-crafted features~(e.g, $\|\mathbf{x}_i-\mathbf{x}_j\|^2$ of $w_{ij}$), which is insufficient to characterize the semantic information of data and thus degrade the performance. \subsection{Deep Hashing} Recently, deep hashing methods~\cite{li2015feature, erin2015deep,li2017deep, qiu2017deep1, cao2017hashnet, liu2019cross, yang2019distillhash} show promising performance compared with the shallow hashing methods. ~\citet{xia2014supervised} is one of the earliest works that introduces the deep neural networks into hashing function learning, where the hash codes are learned by minimizing the following loss function \begin{equation} \mathcal{L}_0 = \sum_{i=1}^n \sum_{j=1}^n\left( s_{ij}-w_{ij}\right) ^2\\ \label{CNNH} \end{equation} where $s_{ij}=\frac{1}{l}\mathbf{z}_i^T\mathbf{z}_j$ is the inner product between deep features. $\mathbf{z}_i\in [-1,+1]^l$ is the relaxation of hash codes $\mathbf{b}_i$ since it is difficult to directly optimize the discrete variables. Suggested by ~\citet{cao2016deep}, cosine similarity might be a better choices to mitigate the diversity of code lengths and improve the performance, which defined as: \begin{equation} s_{ij} = cos(\mathbf{z}_i, \mathbf{z}_j) = \frac{\mathbf{z}_i^T\mathbf{z}_j}{\| \mathbf{z}_i \| \| \mathbf{z}_j \|}\\ \label{sij} \end{equation} where $w_{ij}$ of Eq.\ref{CNNH} is the binary pairwise similarity, which is equal to $+1$ if $\mathbf{x}_i$ and $\mathbf{x}_j$ are semantically similar, or $-1$ otherwise. In supervised cases, $w_{ij}$ is constructed according to labels. But in the unsupervised settings, the labels are unavailable. To tackle this problem, ~\citet{yang2018semantic} empirically study the deep feature statistics and estimate two half Gaussian distributions to calculate the similarity. ~\citet{song2018binary} employs the $k$ Nearest Neighborhoods~($k$-NN) to compute a binary similarity with pre-trained features. While ~\citet{zhang2020deep} construct a hybrid-similarity matrix in advance. ~\citet{tu2020mls3rduh} utilizes the local manifold structure to construct the similarity graph. However, in these methods, the semantic similarity matrix is pre-computed on the original feature space and is separated from the hash learning process. Intuitively, a good similarity representation is beneficial to hashing function learning, and also, hashing function might provide meaningful feedback to similarity representation. Therefore we hope that the similarity matrix and hashing function can be learned simultaneously, which inspires us to design an adaptive similarity updating method rather than reconstructing a similarity structure based on the updated features~\cite{shen2018unsupervised}. Moreover, the existing similarity-preservation loss function (e.g, Eq.\ref{CNNH}) usually neglects the priorities between different data pairs in the learning process. Though several works~\cite{cao2017hashnet, yang2018semantic, zhang2020deep, qin2020unsupervised} divide the data pairs into different groups based on their pairwise similarity, these partitions are also pre-defined and fail to capture the fine-grained priority between data pairs since the pairs within the same group are still treated fairly. Thus the informative data pairs may be buried in a large number of uninformative training pairs. \section{Methodology} In this section, we develop our Deep Self-Adaptive Hashing model. The overall architecture of DSAH is illustrated in Figure~\ref{pipeline}, which contains three modules: Feature Extraction, Adaptive Neighbor Discovery and Pairwise Information Content. We will demonstrate each module in the following section in detail. \subsection{Feature Extraction} We apply the VGG-19~\cite{simonyan2014very} for hash function learning and denote it as $\mathcal{F}(\cdot, \Theta)$ with network parameters $\Theta$. VGG-19 contains five convolutional layers and three fully-connected layers, to make the network suitable for hash learning, we replace the last layers with a fully-connected layer with 1000 hidden units and followed by a hash layer, in which the number of neurons is equal to hash codes length $l$. To resolve the ill-posed gradient of $\sign(\cdot)$, we adopt the $\tanh(\cdot)$ as the activation function of the hash layer and then we get the approximation of hash code $\mathbf{b}_i$ as follows: \begin{equation} \mathbf{z}_i=\tanh(\mathcal{F}(\mathbf{x}_i;\Theta))\in [-1,+1]^l \label{zij} \end{equation} Once we finish the training process, we can obtain the discrete hash code $\mathbf{b}_i$ as follows: \begin{equation} \mathbf{b}_i=\sign(\mathcal{F}(\mathbf{x}_i;\Theta))\in \{-1,+1\}^l \label{bij} \end{equation} \subsection{Adaptive Neighbor Discovery} In this subsection, we propose the AND, which consists of two steps: similarity matrix initialization and updating. \subsubsection{Initialization} \label{Initialization} Recent works~\cite{song2018binary, yang2018semantic,zhang2020deep, tu2020mls3rduh} have shown that the rich semantic structure can be captured via an elaborately designed similarity matrix. In our AND, we construct an initial similarity matrix at the beginning based on $k$-NN. We first extract deep features from the relu-7 layer of a pre-trained VGG-19 model and then select $k_1$ images with the highest cosine similarity as the neighbors of each image. Then we construct a \textit{Low-order} similarity matrix $\mathbf{W}_L$ as follows: \begin{equation} (\mathbf{W}_L)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $\mathbf{x}_j$ is $k_1$-NN of $\mathbf{x}_i$} ,\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{wL} \end{equation} Notably, we consider that if the neighbors of two images are highly similar, then these two images should also be very similar. Thus we calculate the similarity of two images neighbors using the expression $\frac{1}{1 + \| (\mathbf{W}_L)_i - (\mathbf{W}_L)_j \|}$. Then we select the top $k_2$ samples to construct a \textit{High-order} similarity matrix $\mathbf{W}_H$ as: \begin{equation} (\mathbf{W}_H)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $\mathbf{x}_j$ is $k_2$-NN of $\mathbf{x}_i$} ,\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{wH} \end{equation} In order to take full advantage of these two similarity matrices, we define our initial similarity matrix $\mathbf{W}^0$ by combining $\mathbf{W}_L$ and $\mathbf{W}_H$ together, which is based on the assumption that two similar images should not only be similar in feature space but also share similar neighbors. \begin{equation} (\mathbf{W}^0)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $(\mathbf{W}_L)_{ij}$ = +1 and $(\mathbf{W}_H)_{ij}$ = +1}\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{w0} \end{equation} However, a drawback of $\mathbf{W}^0$ is that it is built with the pre-trained features, which might contain noisy data. Ideally, we hope that the similarity maintains consistency with the fine-tuning features, while the reconstruction is time-consuming. Hence, we next propose an efficient updating strategy to refine the $\mathbf{W}^0$. \subsubsection{Updating} AND provides a progressive mechanism for similarity updating. Given a similarity matrix $\mathbf{W}^r$ in the $r$-th round~(or $\mathbf{W}^0$ in beginning), we first use it to update the model parameters $\Theta$. (e.g, Optimizing the $\mathcal{L}_0$ in Eq.~\ref{CNNH}). Next, we measure the pairwise cosine similarity $\mathbf{S}^r=\{s^r_{ij}\}\in \mathbb{R}^{n\times n}$ over the training data pairs through Eq.\ref{sij} and estimate a threshold $m^r$ by \begin{equation} m^r = \mu^r + \gamma \cdot \sigma^r \label{mr} \end{equation} where the $\mu^r$ and $\sigma^r$ denote the mean and standard derivation of cosine similarity $s^r_{ij}$ for those data pairs with $w^r_{ij}=+1$, which is defined as: \begin{equation} \left\{ \begin{aligned} \mu^r&=\frac{\sum_{i=1}^n \sum_{j=1}^n s^r_{ij}\cdot \mathbf{1}(w_{ij}^{r}=+1) }{n_+ }\\ \sigma^r&=\left( \frac{\sum_{i=1}^n \sum_{j=1}^n \left( s^r_{ij} -\mu^r \right)^2\cdot \mathbf{1}(w_{ij}^{r}=+1) }{n_+ } \right) ^{\frac{1}{2}}\\ \end{aligned} \right. \end{equation} where $n_+$ is equal to $\sum_{i=1}^n\sum_{j=1}^n \mathbf{1}(w_{ij}^{r}=1)$, which counts the number of neighbors in $\mathbf{W}^r$. $\gamma$ is a hyper-parameter that control the threshold. Finally, we renew the $\mathbf{W}^{r}$ as follows: \begin{equation} w^{r+1}_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if } w^r_{ij}=-1 \text{ and } s^r_{ij}\geq m^r, \\ w^r_{ij},&\quad \text{otherwise}. \end{aligned} \right. \label{update} \end{equation} \textbf{Analysis}. The AND is motivated by the prediction interval, aiming to design a dynamic criterion~Eq.\ref{mr} based on the global distribution of learned features. The tuition behind Eq.\ref{update} is that these dissimilar data pairs with similarity $s_{ij}$ higher than average similarity $\mu$ of similar pair sets could probably be treated as candidate similar data pairs in next epoch, where $\gamma$ controls the tolerance, a larger $\gamma$ is more serious while a smaller $\gamma$ is looser. The reason why we focus on similar pairs instead of dissimilar pairs is that the neighborhoods-based $\mathbf{W}^0$ contains only a few similar pairs~($n_+\ll n^2$). There is still a lot of information (e.g, neighbors) worth mining in a large number of dissimilar pairs, as the model capacity increases, this information would be better distinguished. Therefore, AND is able to adaptively adjust the similarity $\mathbf{W}^0$ according to the learned representation, in a progressive mechanism. \subsection{Pairwise Information Content} In PIC, we discuss the priority of different data pairs for model training. Though Eq.~\ref{CNNH} provides a scheme to learn hash codes from similarity matrix $\mathbf{W}$, it neglects the importance of different data pairs. All the data pairs with their similarities are treated fairly when calculating loss, so that some informative data pairs may be buried in a large number of samples. To tackle this issue, we propose the PIC, which assigns an adaptive weight for each data pair. If a data pair is more important, it will receive a larger weight and contribute more to hashing function learning. So, we define the following loss function: \begin{equation} \mathcal{L}_1=\sum_{i=1}^n\sum_{j=1}^n a_{ij}\left( s_{ij}-w_{ij}\right) ^2 \label{l1} \end{equation} where $a_{ij}$ is the weight for the data pair $(i,j)$ which represents the importance of this data pair. According to the information theory~\cite{shannon1948mathematical}, given an event $\Phi$ with probability $p(\Phi)$, its \textit{information content} is defined as the negative log-likelihood: \begin{equation} I(\Phi) = -\log p(\Phi) \label{ic} \end{equation} If an event $\Phi$ has a probability 1 of occurring, then its information content is $-\log(1)=0$ and yields no information. While an event with probability 0, its information content is $+\infty$. Inspired by Eq.~\ref{ic}, we design the following definition: \begin{definition} Given a data pair $(i,j)$, we define an event $\Phi_{ij}$ with probability $p_{ij}$. The $\Phi_{ij}$ indicates that the image $j$ is the top-1 retrieval result of the given query image $i$, which is an optimum matching of image retrieval. Based on this, we define the \textbf{pairwise information content} $a_{ij}$ as: \begin{equation} \label{def_a} a_{ij} = I(\Phi_{ij}) = -\log (p_{ij}) \end{equation} \end{definition} Typically, if an image $j$ is the top-1 retrieval result of the query image $i$, then $i$ and $j$ should be the most similar. Therefore probability $p_{ij}$ can be expressed as a measure of relative similarity between image $i$ and image $j$, and we define $p_{ij}$ as \begin{equation} p_{ij}=\frac{\exp (s_{ij} /\tau)}{\sum_{g=1}^{n}\sum_{k=1}^n \exp (s_{gk}/\tau) \label{pij} \end{equation} where $\tau$ is a temperature parameter and $s_{ij}$ is the pairwise cosine similarity in Eq.~\ref{sij}. \textbf{Analysis}. Given a data pair $(i,j)$, if $p_{ij}$ is higher, then the information content $I(\Phi_{ij})$ that the image $j$ can be retrieved through the image $i$ is lower. (A special case is to use an image to retrieve itself, then $I(\Phi_{ij})$ should be lowest or close to 0.) On the contrary, retrieving an image via a highly dissimilar query would bring a lot of information. Figure.\ref{pic_fig} shows an example, given a query image of \textit{Dog}, if we retrieve a \textit{Car}, we would be more surprised than retrieving a \textit{Cat}. So that we have $I(\Phi_{Dog, Car}) > I(\Phi_{Dog, Cat})$ while $sim({Dog}, {Car}) < sim({Dog}, {Cat})$, where $sim$ denotes the pairwise similarity. The tuition behind PIC can work is that a data pair contains highly dissimilar images would provide richer distinctive information, so it should be given a larger weight contributing to the hashing learning. The PIC is based on the pairwise similarity distribution $p_{ij}$, it is adjustable and adaptive. Moreover, our PIC could also be expressed as a kind of pairwise attention mechanism. Particularly, when $a_{ij}$ is equal to constant 1, the importance of data pairs will be the same and the Eq.~\ref{l1} will degenerate to Eq.~\ref{CNNH}. \begin{figure}[!t] \centering \includegraphics[width=0.9\linewidth]{demo/PIC} \caption{The relationship between PIC weight $a_{ij}$ and relative pairwise similarity $p_{ij}$. If a data pair is highly dissimilar, their $a_{ij}$ will be higher, otherwise, it will be smaller.} \label{pic_fig} \vspace{-2.0em} \end{figure} \subsection{Objective Function} In addition, to guarantee the quality of learned hash codes, we introduce a loss $\mathcal{L}_{2}=\|\mathbf{Z}-\mathbf{B}\|_F^2$ to minimize the quantization error between the variables $\mathbf{Z}$ and the binary codes $\mathbf{B}$. Therefore, the total loss function can be formulated as \begin{equation} \begin{aligned} \mathcal{L} &= \mathcal{L}_1 + \lambda \mathcal{L}_2\\ &=\sum_{i=1}^n\sum_{j=1}^n a_{ij}\left( s_{ij}-w_{ij}\right) ^2 + \lambda \|\mathbf{Z}-\mathbf{B}\|^2_F\\ &=\sum_{i=1}^n\sum_{j=1}^n -\log(p_{ij})\left( \frac{\mathbf{z}_i^T\mathbf{z}_j}{\|\mathbf{z}_i \| \|\mathbf{z}_j \| }-w_{ij}\right) ^2 + \lambda \|\mathbf{Z}-\mathbf{B}\|^2_F \label{l_final} \end{aligned} \end{equation} \subsection{Optimization} Our DSAH consists of two main parts and since the AND is not end-to-end, we separate the optimization process into two alternate steps. First, we fix the similarity matrix $\mathbf{W}$ and optimize the network parameter $\Theta$ by back propagation (BP) with a mini-batch sampling. \begin{equation} \Theta \leftarrow \Theta-\eta\nabla_\Theta(\mathcal{L}) \label{bq} \end{equation} where $\eta$ is the learning rate and $\nabla_\Theta$ represents a derivative of $\Theta$. Second, we fix the $\Theta$ and update the similarity matrix $\mathbf{W}$ according to Eq.~\ref{update}. Once the model training is completed, we can obtain the discrete hash code $\mathbf{B}\in \{-1,+1\}^{n\times l}$ through Eq.~\ref{bij}. The detailed algorithm of our proposed DSAH is described in Algorithm \ref{alg1}. \begin{algorithm}[!t] \caption{\textbf{Deep Self-Adaptive Hashing~(DSAH)}} \label{alg1} \begin{algorithmic}[1] \REQUIRE Image set $\mathbf{X}$, hash code length $l$, temperature $\tau$, weight coefficient $\lambda$, factor $\gamma$, rounds $R$, epochs per round $T$, learning rate $\eta$ \STATE Initialize the network parameters ${\mathcal{F}}(\cdot, \Theta)$. \STATE Initialize the semantic similarity matrices $\mathbf{W}^0\in \{+1,-1\}^{n\times n}$ by Eq.~\ref{w0}. \FOR{$r=1$ to $R$} \STATE \textit{// Hash Function Learning with PIC} \FOR{$t=1$ to $T$} \STATE Update the $\mathbf{Z}$ via Eq.~\ref{zij}. \STATE Update the $\mathbf{S}$ via Eq.~\ref{sij}. \STATE Update the $\mathbf{P}$ via Eq.~\ref{pij}. \STATE Update the $\Theta$ via Eq.~\ref{bq}. \ENDFOR \STATE \textit{// Similarity Updating by AND} \STATE Update the $\mathbf{W}^{r}$ via Eq.~\ref{update}. \ENDFOR \STATE Obtain the $\mathbf{B}$ via Eq.~\ref{bij}. \ENSURE Hash codes set $\mathbf{B}$ \end{algorithmic} \end{algorithm} \begin{table*}[!t] \small \centering \begin{tabu}{l|l|llll|llll|llll} \hline & & \multicolumn{4}{c|}{\textbf{CIFAR-10}} & \multicolumn{4}{c|}{\textbf{FLICKR25K}} & \multicolumn{4}{c}{\textbf{NUS-WIDE}} \\ \hline Method & Reference & 16 bits & 32 bits & 64 bits & 128 bits & 16 bits & 32 bits & 64 bits & 128 bits & 16 bits & 32 bits & 64 bits & 128 bits \\ \hline LSH+VGG~\cite{andoni2006near} & STOC-02 & 0.177 & 0.192 & 0.261 & 0.304 & 0.596 & 0.619 & 0.650 & 0.666 & 0.385 & 0.455 & 0.446 & 0.567 \\ SH+VGG~\cite{weiss2009spectral} & NeurIPS-09 & 0.254 & 0.248 & 0.229 & 0.293 & 0.661 & 0.608 & 0.606 & 0.614 & 0.508 & 0.449 & 0.441 & 0.505 \\ ITQ+VGG~\cite{gong2012iterative} & PAMI-13 & 0.269 & 0.295 & 0.316 & 0.350 & 0.709 & 0.696 & 0.684 & 0.720 & 0.519 & 0.576 & 0.598 & 0.651 \\ AGH+VGG~\cite{liu2011hashing} & ICML-11 & 0.397 & 0.428 & 0.441 & 0.435 & 0.744 & 0.735 & 0.771 & 0.703 & 0.563 & 0.698 & 0.725 & 0.722 \\ SP+VGG~\cite{Xia_2015_CVPR} & CVPR-15 & 0.280 & 0.343 & 0.365 & 0.406 & 0.726 & 0.705 & 0.713 & 0.703 & 0.581 & 0.603 & 0.673 & 0.681 \\ SGH+VGG~\cite{dai2017stochastic} & ICML-17 & 0.286 & 0.320 & 0.347 & 0.395 & 0.608 & 0.657 & 0.693 & 0.689 & 0.463 & 0.588 & 0.638 & 0.670 \\ \hline GH~\cite{su2018greedy} & NeurIPS-18 & 0.355 & 0.424 & 0.419 & 0.416 & 0.702 & 0.732 & 0.753 & 0.760 & 0.599 & 0.657 & 0.695 & 0.712 \\ SSDH~\cite{yang2018semantic} & IJCAI-18 & 0.241 & 0.239 & 0.256 & 0.246 & 0.710 & 0.696 & 0.737 & 0.760 & 0.542 & 0.629 & 0.635 & 0.606 \\ BGAN~\cite{song2018binary} & AAAI-18 & 0.535 & 0.575 & 0.587 & 0.591 & 0.766 & 0.770 & 0.795 & 0.802 & 0.719 & 0.745 & 0.761 & 0.759 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh} & IJCAI-20 & 0.562 & 0.588 & 0.595 & 0.582 & 0.797 & 0.809 & 0.809 & 0.804 & 0.730 & 0.754 & 0.764 & 0.769 \\ TBH~\cite{shen2020auto} & CVPR-20 & 0.432 & 0.459 & 0.455 & 0.474 & 0.779 & 0.794 & 0.797 & 0.799 & 0.678 & 0.717 & 0.729 & 0.739 \\ \hline \textbf{DSAH} & \textbf{Proposed} & \textbf{0.596} & \textbf{0.617} & \textbf{0.622} & \textbf{0.635} & \textbf{0.805} & \textbf{0.816} & \textbf{0.831} & \textbf{0.836} & \textbf{0.747} & \textbf{0.769} & \textbf{0.787} & \textbf{0.793} \\\hline \end{tabu} \caption{MAP@5000 results on CIFAR10, FLICKR25K and NUS-WIDE. The best result is shown in boldface.} \label{sota} \centering \end{table*} \section{Experiments} In this section, we conduct experiments on several public benchmark datasets and evaluate our DSAH method. Particularly, we design the experiments to study the following questions: \begin{itemize} \item \textbf{Q1}: Compared with the state-of-the-art unsupervised hashing algorithms, does our DSAH method outperform them? \item \textbf{Q2}: How do the components: PIC and AND, affect the performance of DSAH separately? How do they work? \item \textbf{Q3}: Is DSAH sensitive to hyper-parameters? \item \textbf{Q4}: How about the efficiency of DSAH? \item \textbf{Q5}: What is the qualitative result of DSAH? \end{itemize} \subsection{Datasets} Following most hashing-based retrieval methods~\cite{song2018binary, deng2019unsupervised, qin2020unsupervised}, we adopt the following three widely used public benchmark datasets to evaluate the model performance: CIFAR-10, FLICKR25K and NUS-WIDE. The basic information is listed in Table.\ref{data}, while the setting details be introduced as follows: \begin{table}[H] \footnotesize \begin{tabular}{|l|l|l|l|} \hline \textbf{Dataset} & \textbf{CIFAR-10} & \textbf{FLICKR25K} & \textbf{NUS-WIDE} \\ \hline Multi-Label & $\times$ & $\checkmark$ & $\checkmark$ \\ \hline \# Images & 60,000 & 25,000 & 269,648 \\ \hline \# Classes & 10 & 24 & 21 \\ \hline \# Train Set & 10,000 & 10,000 & 10,500 \\ \hline \# Query Set & 1,000 & 1,000 & 2,100 \\ \hline \# Retrieval Set & 59,000 & 24,000 & 267,548 \\ \hline \end{tabular} \caption{Characteristics of evaluation datasets.} \label{data} \vspace{-2.0em} \end{table} \textbf{CIFAR-10} ~\cite{krizhevsky2009learning}:~ Followed the setting of \cite{song2018binary}, we randomly selected 100 images for each class as the query set, 1,000 in total. Then we used the remaining images as the retrieval set, among them, we randomly selected 1,000 images per class as the training set. \textbf{FLICKR25K} ~\cite{huiskes2008mir}:~ We randomly selected 1000 images as query set and the remaining images were left for retrieval set. In the retrieval set, we randomly chose 10,000 images as the training set. \textbf{NUS-WIDE} ~\cite{chua2009nus}:~ According to the setting in~\cite{zhu2016deep}, we selected 21 most frequent classes from the dataset and each class contains at least 5,000 related images. We randomly selected 2100 images as the query set and the remaining images were used as a retrieval set. We also randomly selected 10,500 images for training. For the latter two multi-label datasets, if the retrieved image shares at least one label with the query image, it is considered to be associated with the query image. \subsection{Experiment Setup} \textbf{Metrics}: Similar to~\cite{wang2017survey, shen2018unsupervised, yang2018semantic}, we employed four widely used evaluation metrics to evaluate the retrieval performance, including Mean Average Precision~(\textbf{MAP}), Precision of the top N retrieved images~(\textbf{Precision@N}), Precision curve~(\textbf{Precision Curve}), and Precision-Recall curves~(\textbf{PR Curve}). For a fair comparison, all the methods used the same training and query sets. \textbf{Baseline methods}: We compared our method with eleven unsupervised hashing methods, including six shallow hashing methods: \textbf{LSH}~(\citet{andoni2006near}), \textbf{SH}~(\citet{weiss2009spectral}), \textbf{ITQ}~(\citet{gong2012iterative}), \textbf{AGH}~(\citet{liu2011hashing}), \textbf{SP}~(\citet{Xia_2015_CVPR}), \textbf{SGH}~(\citet{dai2017stochastic}) and five deep hashing methods: \textbf{GH}~(\citet{su2018greedy}), \textbf{SSDH}~(\citet{yang2018semantic}), \textbf{BGAN}~(\citet{song2018binary}), \textbf{MLS$^3$RDUH}~(\citet{tu2020mls3rduh}) and \textbf{TBH}~(\citet{shen2020auto}). The parameters and architectures of the compared methods were according to the setting provided by the original papers. For a fair comparison, all shallow hashing methods used 4096-dimensional features generated by the relu7 layer of VGG19~\cite{simonyan2014very} pre-trained on ImageNet, as same as the deep features used in the five deep hashing methods during their similarity structures construction. \textbf{Implementation details}: Our DSAH is implemented based on the Tensorflow framework, while all the experiments are conducted on a workstation with an Intel l5-8500 CPU, and an Nvidia GTX2080 GPU. In the initial similarity construction~(Sec~\ref{Initialization}), the $k_1$ and $k_2$ are set to the same value 500. When training the network, each training image was resized to $224\times 224$ as input. We set $\lambda$ equal to 10 and adopt the adam optimization with learning rate $\eta$ equal to 1e-4, and the batch size was set to 50. The $\tau$ is set to 1, while the $\gamma$ is set to \{1, 0, 1\} for CIFAR-10, FLICKR25K and NUS-WIDE datasets respectively. And the $R$ and $T$ are set to 3 and 10 respectively. \begin{figure*}[!t] \centering \subfigure[PR Curve of CIFAR-10@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_64_pr-eps-converted-to.pdf} } \subfigure[Precision Curve of CIFAR-10@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of CIFAR-10@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_128_pr-eps-converted-to.pdf} } \subfigure[Precision of CIFAR-10@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_128_pre-eps-converted-to.pdf} } \subfigure[PR Curve of FLICKR25K@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_64_pr-eps-converted-to.pdf} } \subfigure[Precision of FLICKR25K@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of FLICKR25K@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_128_pr-eps-converted-to.pdf} } \subfigure[Precision of FLICKR25K@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_128_pre-eps-converted-to.pdf} } \subfigure[PR Curve of NUS-WIDE@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_64_pr-eps-converted-to.pdf} } \subfigure[Precision of NUS-WIDE@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of NUS-WIDE@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_128_pr-eps-converted-to.pdf} } \subfigure[Precision of NUS-WIDE@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_128_pre-eps-converted-to.pdf} } \caption{Precision-Recall (PR) curves and Precision$@$N curves on the three datasets for 64 and 128 bits length.} \label{curve} \end{figure*} \subsection{Comparison Results and Discussions~(Q1)} \subsubsection{MAP \& Precision} The performance of our DSAH and baseline methods in terms of MAP@5000 are shown in Table.~\ref{sota}. We can observe that our proposed method significantly outperforms other methods on the three datasets. On CIFAR-10, DSAH obtains an increase of 6.1\% (16 bits), 4.9\% (32 bits), 4.5\% (64 bits), 9.1\% (128 bits) comparing with the best competitor MLS$^3$RDUH respectively. On FLICKR-25K and NUS-WIDE, DSAH achieves average 8.7\% and 2.7\% improvement compared to the MLS$^3$RDUH. In the practical scenarios, we pay more attention to the top retrieval responses. Thus, we further evaluate the performance on the precision of the top-100 for each method. The results are demonstrated in Table.~\ref{pre100}, where we display the result of the shortest (16 bits) and longest (128 bits) binary codes. On FLICKR25K, DSAH achieves 1.5\% (16 bits) and 2.3\% (128 bits) increases comparing with TBH. On NUS-WIDE, DSAH is improved by 1.7\% (16 bits) and 2.9\% (128 bits) compared to BGAN. Therefore, both the Table.\ref{sota} and Table.\ref{pre100} demonstrate that DSAH achieves better performance compared to previous unsupervised hashing methods. \begin{table}[!h] \footnotesize \begin{tabular}{l|ll|ll|ll} \hline \textbf{Dataset} & \multicolumn{2}{c|}{\textbf{CIFAR-10}} & \multicolumn{2}{c|}{\textbf{FLICKR25K}} & \multicolumn{2}{c}{\textbf{NUS-WIDE}} \\ \hline Methods & 16 bits & 128 bits & 16 bits & 128 bits & 16 bits & 128 bits \\ \hline LSH+VGG~\cite{andoni2006near}& 0.175 & 0.411 & 0.608 & 0.745 & 0.393 & 0.651 \\ SH+VGG~\cite{weiss2009spectral}& 0.291 & 0.446 & 0.715 & 0.700 & 0.518 & 0.625 \\ ITQ+VGG~\cite{gong2012iterative}& 0.283 & 0.458 & 0.760 & 0.818 & 0.545 & 0.739 \\ AGH+VGG~\cite{liu2011hashing}& 0.444 & 0.617 & 0.794 & 0.877 & 0.572 & 0.794 \\ SP+VGG~\cite{Xia_2015_CVPR}& 0.284 & 0.514 & 0.788 & 0.852 & 0.601 & 0.756 \\ SGH+VGG~\cite{dai2017stochastic}& 0.285 & 0.536 & 0.622 & 0.814 & 0.457 & 0.764 \\ \hline GH~\cite{su2018greedy} & 0.410 & 0.519 & 0.773 & 0.843 & 0.651 & 0.777 \\ SSDH~\cite{yang2018semantic} & 0.216 & 0.269 & 0.753 & 0.800 & 0.595 & 0.662 \\ BGAN~\cite{song2018binary}& 0.591 & 0.691 & 0.839 & 0.884 & 0.749 & 0.794 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh}& \textbf{0.618} & 0.677 & 0.851 & 0.868 & 0.748 & 0.791 \\ TBH~\cite{shen2020auto}& 0.499 & 0.586 & 0.849 & 0.877 & 0.702 & 0.775 \\ \hline \textbf{DSAH}& 0.616 & \textbf{0.691} & \textbf{0.862} & \textbf{0.897} & \textbf{0.762} & \textbf{0.817} \\ \hline \end{tabular} \caption{Precision@100 results on CIFAR10, FLICKR25K and NUS-WIDE. The best result is shown in boldface.} \label{pre100} \end{table} \subsubsection{Precision Curve \& PR Curve} To further illustrate the effectiveness of DSAH, we display the Precision curve and PR curve of 64 and 128 bits in Figure.~\ref{curve}. The PR Curve Figure.\ref{curve}~(a)(c)(e)(g)(i)(k) clearly displays the precision at different recall values, which is a good representation of overall performance. In general, a larger area under the PR curve indicates better performance. It can be seen that our PR curve covers more areas in most cases, which means that when the precision is equal, the proposed method will recall more related images; when the number of recall related images is equal, the proposed method has higher precision. Thus, DSAH yields a stable and superior performance. Similar to the PR Curve setting, we display the Precision Curves in Figure.\ref{curve}~(b)(d)(f)(h)(j)(l). It can be seen that the precisions of our methods is relatively higher than the precisions of other methods in most cases. which indicates that given a fixed number of retrieval samples, our method can obtain higher precision outperform other methods. \subsection{Ablation Study~(Q2)} Since our method consists of two major components: PIC and AND, we further verify their effectiveness. \subsubsection{Effect of PIC} In order to validate the efficiency of PIC, we design the following variants with different $a_{ij}$ in Eq.~\ref{l1}: \begin{itemize} \item \textbf{PIC$^0$}: $a_{ij}$ is equal to constant 1, and it would degenerate to Eq.~\ref{CNNH}. This could be treated as a baseline. \item \textbf{PIC}: $a_{ij}$ is equal to $-\log(p_{ij})$. This is our proposed PIC. \item \textbf{PIC$^-$}: $a_{ij}$ is equal to $-\log(1-p_{ij})$. This could be regarded as an opposite version of our PIC. \end{itemize} \begin{figure}[H] \centering \subfigure[CIFAR-10]{ \includegraphics[width=0.145\textwidth]{abalation/pic_cifar-eps-converted-to.pdf} } \subfigure[FLICKR25K]{ \includegraphics[width=0.145\textwidth]{abalation/pic_flickr-eps-converted-to.pdf} } \subfigure[NUS-WIDE]{ \includegraphics[width=0.145\textwidth]{abalation/pic_nus-eps-converted-to.pdf} } \caption{Effect of PIC on three datasets with MAP@5000, the code lengths varying from 16 to 128.} \label{Q1_pic_a} \end{figure} We report the experimental results on the three datasets in Figure \ref{Q1_pic_a}, which are evaluated with MAP@5000. As shown in Figure.~\ref{Q1_pic_a}~(a)-(c), we could observe that: Firstly, compared with baseline PIC$^0$, introducing PIC weights is able to obtain average 8.2\%, 1.2\%, 2.1\% MAP improvements on CIFAR-10, FLICKR25K and NUS-WIDE datasets, respectively. These results indicate that PIC indeed improves the discriminative power of our model. Secondly, the performance degradation of the third PIC$^-$ shows that assigning large weights to similar data pairs will degenerate the performance, which indicates that dissimilar data pairs should receive more attention rather than similar data pairs. These results validate the effectiveness of our proposed weighting method PIC. \textbf{How PIC works.} To further understand PIC, we display the heatmap of pairwise similarity $s_{ij}$ and their PIC weights $a_{ij}$ within a batch size in Figure.~\ref{Q1_pic_b}. It is shown that those data pairs with higher similarity, especially in the diagonal~(self-similar), would receive a lower weight after PIC assignment and dissimilar pairs will reach higher weights. \begin{figure}[!h] \centering \subfigure[Heatmap of $\mathbf{S}$]{ \includegraphics[width=0.2\textwidth]{abalation/map_sim-eps-converted-to.pdf} } \subfigure[Heatmap of $\mathbf{A}$]{ \includegraphics[width=0.2\textwidth]{abalation/map_pic-eps-converted-to.pdf} } \caption{The heatmap of (a)~pairwise similarity $s_{ij}$ and (b)~corresponding PIC weight $a_{ij}$ within a batch size.} \label{Q1_pic_b} \end{figure} \subsubsection{Effect of AND} To reveal the effectiveness of AND, we conduct an experiment to compare the following variants: \begin{itemize} \item \textbf{AND$^{0}$}: Training via Eq.~\ref{CNNH} with $\mathbf{W}^0$, which is baseline. \item \textbf{AND}: Training via Eq.~\ref{CNNH} with updated $\mathbf{W}^r$ via AND. \item \textbf{AND+PIC}: Training via Eq.~\ref{l1} with updated $\mathbf{W}^r$ via AND. \end{itemize} We report the results evaluated with MAP@5000 on the three datasets in Figure.~\ref{Q1_and_a}. By employing the AND, the baseline model can be generally improved, achieving 1.7\%, 1.8\%, 1.0\% average improvements on three datasets, respectively. Furthermore, the performance can be greatly improved by introducing both PIC and AND, resulting in 8.9\%, 3.4\% and 3.8\% average improvements over baseline in three datasets. The above experiments reveal the effectiveness of PIC and AND of DSAH. \begin{figure}[!h] \centering \subfigure[CIFAR-10]{ \includegraphics[width=0.145\textwidth]{abalation/and_cifar-eps-converted-to.pdf} } \subfigure[FLICKR25K]{ \includegraphics[width=0.145\textwidth]{abalation/and_flickr-eps-converted-to.pdf} } \subfigure[NUS-WIDE]{ \includegraphics[width=0.145\textwidth]{abalation/and_nus-eps-converted-to.pdf} } \caption{Effect of AND on three datasets with MAP@5000, the code length varying from 16 to 128.} \label{Q1_and_a} \end{figure} \textbf{How AND works.} To better understand the mechanism of AND, we enlarge the round $R$ to 10 and record the changing of threshold $m$ and the number of neighbors pairs ${n_+}$. Also, to monitor the quality of the updated similarity matrix $\mathbf{W}^r$, we compute an indicator matrix $\mathbf{G}\in \{-1, +1\}^{n\times n}$, which element $g_{ij}$ is equal to $+1$ iff data pairs $(i,j)$ belong to same class, otherwise equal to $-1$. Next, we treat AND as a binary classification problem and $\mathbf{G}$ as ground-truth, and then design a metric ${F}_{w}$ to measure the quality of updated matrix $\mathbf{W}^r$, which is inspired by F-score: $$ {F}_{w}=\frac{2}{\alpha^{-1}+\beta^{-1}} $$ where $\alpha$ is equal to $\frac{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=g_{ij})}{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=+1)}$, denotes the precision of updated similarity matrix $\mathbf{W}^r$. And $\beta$ denotes the recall of $\mathbf{W}^r$, defined as $\frac{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=g_{ij})}{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(g_{ij}=+1)}$. In Figure.~\ref{Q1_and_b}. We could see that in each round, additional data pairs are added to the neighbors set, and the number of similar data pairs converges eventually. This is mainly controlled by the increase of the adjustable threshold $m$. Notably, the climbing $F_w$ confirms the effect of AND, which indeed refines the quality of the similarity matrix and leads to the model's improvement, especially in the first updating. \begin{figure}[H] \centering \subfigure[$\left( n^+, m\right) $ w.r.t $R$]{ \includegraphics[width=0.22\textwidth]{abalation/AND_p1-eps-converted-to.pdf} } \subfigure[$\left( \text{MAP@5000}, F_w\right) $ w.r.t $R$]{ \includegraphics[width=0.22\textwidth]{abalation/AND_p2-eps-converted-to.pdf} } \caption{The Mechanism of AND. We monitor the AND's $\left( n_+, m, MAP, F_w\right) $ w.r.t round $R$.} \label{Q1_and_b} \end{figure} \subsection{Parameter Sensitivity~(Q3)} \subsubsection{Study of $\lambda$} In Figure.~\ref{PA}~(a), we study the influence of the quantization effect with different $\lambda$ over three datasets, where the code length is 64. From this figure, the performance will degrade when $\lambda$ is larger than 10. And the recommended value for $\lambda$ is 10, which would bring 4.3\%, 3.1\% and 2.8\% MAP improvements in CIFAR-10, FLICKR25K and NUS-WIDE, respectively. \begin{figure}[H] \centering \subfigure[Study of the $\lambda$.]{ \includegraphics[width=0.2\textwidth]{parameter/lambda-eps-converted-to} } \subfigure[Study of the $\tau$ of PIC.]{ \includegraphics[width=0.2\textwidth]{parameter/tau-eps-converted-to} } \caption{MAP@5000 under (a)~different $\lambda$ and (b)~different $\tau$ of PIC, the code length is 64.} \label{PA} \end{figure} \subsubsection{Study of PIC} In Figure.~\ref{PA}~(b), we investigate the influence of hyper-parameter $\tau$ in PIC. It shows that the proposed method is sensitive and deteriorates when $\tau\in \{0.01, 0.1\}$. When $\tau$ is larger than 1, the model performance tends to stabilize and slightly decline, and the recommended value for $\tau$ is 1.0. \subsubsection{Study of AND} In Figue.~\ref{PA_and}, we evaluate the effectiveness of different hyper-parameters $(\gamma, R)$ in AND on (a)~CIFAR-10 and (b)~FLICKR25K datasets, where $\gamma$ from -1.0 to 1.0 with a step of 0.25 and the maximum $R$ is set to 10, the code length is 64. The diagram in Figure.~\ref{PA_and}(a) indicates that MAP will increase with $R$ increases and then converges around 3 on CIFAR-10 dataset, and a large $\gamma$ ($\geq 0$) might be a good choice. On FLICKR25K, it is noteworthy that when $\gamma$ is smaller than $-0.5$, a significant increment would happen in the second round. This is due to the increase of similar pairs, but later proved that this threshold was too loose, leading to model degradation. \begin{figure}[H] \centering \subfigure[CIFAR-10: 64 bits]{ \includegraphics[width=0.22\textwidth]{parameter/and_cifar10_5000} } \subfigure[FLICKR25K: 64 bits]{ \includegraphics[width=0.22\textwidth]{parameter/and_flickr_5000} } \caption{Parameter Sensitivity of $(\gamma,R)$ in AND. The code length is set to 64.} \label{PA_and} \end{figure} \subsection{Efficiency Analysis~(Q4)} In Table.\ref{time}, we conduct an experiment to compare the training time of different deep methods on CIFAR-10 dataset. The results indicate that DSAH is efficient and only takes nearly one-third time of the fastest baseline SSDH; Also, DSAH achieves significantly performance with only a fifth of MLS$^3$RDUH’s computation time. \begin{table}[!h] \small \begin{tabular}{l|c|c} \hline \textbf{Methods} & \textbf{MAP@5000}& \textbf{Training Time~(h)} \\ \hline SSDH~\cite{yang2018semantic} & 0.256 & 3.0 \\ BGAN~\cite{song2018binary} & 0.587& 5.0 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh} & 0.595 & 4.8 \\ DSAH & 0.622 & 1.2 \\ \hline \end{tabular} \caption{Training time comparison among the unsupervised deep hashing methods.} \label{time} \end{table} \subsection{Qualitative Result~(Q5)} \subsubsection{t-SNE visualization} To better understand the manifold structure of learned hashing code, We compare the t-SNE visualization~\cite{maaten2008visualizing} of BGAN, MLS3RDUH, and DSAH in Figure.~\ref{tsne}, in which the data points within the same colors belong to the same class. It could be visually found that DSAH shows a clearer structure, in which we can find some meaningful clusters. Those scatter points within the same class~ (color) thus own smaller hamming distances with each other. \begin{figure}[!h] \setlength{\abovecaptionskip}{0.cm} \setlength{\belowcaptionskip}{-0.cm} \centering \subfigure[BGAN~\cite{song2018binary}]{ \includegraphics[width=0.145\textwidth]{tsne/BGAN-eps-converted-to.pdf} } \subfigure[MLS$^3$RDUH~\cite{tu2020mls3rduh}]{ \includegraphics[width=0.145\textwidth]{tsne/MLS-eps-converted-to.pdf} } \subfigure[DSAH]{ \includegraphics[width=0.145\textwidth]{tsne/DSAH-eps-converted-to.pdf} } \caption{t-SNE visualization on CIFAR-10 dataset. (64 bits)} \label{tsne} \vspace{-2.0em} \end{figure} \subsubsection{Retrieval Result} In Figure~\ref{vis}, we display some retrieval examples that return the top-10 samples based on the Hamming ranking distance on the CIFAR-10 dataset (64-bit). Comparing to the best baseline, our DSAH has fewer fault images. Specially, we found that MLS$^3$RDUH confusing birds in a green scene and flags, while the high-quality prediction of DSAH demonstrates that DSAH could well-distinguish the semantic information of images rather than the low-level feature. \begin{figure}[h] \setlength{\abovecaptionskip}{0.cm} \setlength{\belowcaptionskip}{-0.cm} \centering \includegraphics[width=0.9\linewidth]{vis/vis} \caption{Top-10 retrieved results of DSAH and MLS$^3$RDUH on CIFAR-10 dataset. The green $\checkmark$ means that the retrieved samples belong to the same classes of the query images while the red $\times$ represents the returned in different classes.} \label{vis} \vspace{-2.0em} \end{figure} \section{Conclusions} In this paper, we propose a novel deep unsupervised hashing method DSAH to yield binary codes with fully exploring semantic information behind the data pairs. Particularly, DSAH provides two innovative designs: AND and PIC. To overcome the limitation of fixed semantic similarity, we adopt AND technique to refine the pre-computed similarity matrix with the learned representation and adaptively capture the implicit semantic structure behind the data distribution. Further, we employ PIC to distinguish the different importance of data pairs and assign an adjustable weight to each data pair, which fully explores the discriminative information of training data pairs. By combining PIC and AND in one framework, DSAH learns better hash codes in a self-adaptive manner. The extensive experiments on three benchmarks datasets demonstrate the effectiveness of our techniques, and DSAH can achieve competitive performance. \section{Acknowledgements} This work is jointly supported by the 2021 Tencent Rhino-Bird Research Elite Training Program, and the Major Project of the New Generation of Artificial Intelligence (No. 2018AAA0102900), NSFC under Grant No. 61773268, Natural Science Foundation of SZU (Grant No. 000346). \bibliographystyle{ACM-Reference-Format} \section{Introduction} With the rapid development of the Internet, the explosive growth of multimedia data poses huge challenges to accurate nearest-neighbor based searching methods. Instead, due to its high efficiency, the approximate nearest neighbor~(ANN)~\cite{indyk1998approximate} based search methods have attracted increasing attention. Among them, hashing technologies contribute remarkably to their fast query speed and low storage overhead. To be specific, hashing techniques can be divided into supervised and unsupervised categories. Supervised hashing~\cite{ shen2015supervised, shen2015supervised, kang2016column, gui2017fast, jiang2017asymmetric, luo2018fast, chen2019deep, tu2021partial, tu2020deep} methods use the label information to train hashing models, which achieve fine performance. However, the annotations are highly time-consuming and also expensive to collect, which limits these methods in many practical applications. Due to this scenario, unsupervised hashing methods~\cite{salakhutdinov2009semantic, kong2012isotropic, gong2012iterative, he2013k, wang2018deep, he2019k} have drawn a large amount of attention. Many unsupervised hashing methods have been proposed in the past decade, including Spectral Hashing (SH)~\cite{weiss2009spectral}, Hashing with Graphs (AGH) \cite{liu2011hashing}, Iterative Quantization (ITQ)~\cite{gong2012iterative}, Stochastic Generative Hashing (SGH)~\cite{dai2017stochastic} , etc. The previous unsupervised hashing methods have made progress in this area, however, they normally adopt shallow architectures and severely depend on hand-crafted features~(such as SIFT features~\cite{lowe1999object}), which degrade the learning performance. In recent years, numerous deep learning techniques have been introduced into unsupervised hashing methods~\cite{lin2016learning,li2017deeps, tu2018object} due to their powerful feature representation capability. With the lack of labels, most of the unsupervised deep hashing methods construct a pairwise similarity matrix with pre-trained deep features. For example, ~\citet{yang2018semantic} compute the similarity matrix based on the observation that the distribution of the cosine distance for point pairs can be estimated by two half Gaussian distributions. Once the similarity matrix is built, in most of the existing methods, it will be fixed to guide the hash code learning process. However, such a similarity matrix may be unreliable because it is computed with the pre-trained deep features and ignores the semantic information in the downstream retrieval task. To tackle this issue, ~\citet{shen2018unsupervised} employ a straightway by reconstructing a similarity graph with the fine-tuning features through the Gaussian kernel. However, such specific construction schemes mainly focus on the local structure, which limits the model performance, and also, the reconstruction strategy suffers from high computational costs. In addition, most of the existing methods~\cite{xia2014supervised, cao2016deep, deng2019unsupervised} ignore the semantic importance of data pairs during their design of the similarity-preserving loss function. As such data pairs are treated equivalently in the learning process. A few of works~\cite{yang2018semantic, zhang2020deep, zhangz2020deep, qin2020unsupervised} primitively divide the data pairs into different types like confident or unconfident, they still fail to provide a fine-grained measurement of the importance of different data pairs. The pairs in the same class are still treated equivalently. However, the priority of different data pairs should be different. Intuitively, the dissimilar data pairs might contain more discriminative information, and be more informative for model training. Otherwise, the informative data pairs will be buried by large number of less-informative training pairs and decline hash learning. To deal with the aforementioned issues, we propose a novel \textbf{Deep Self-Adaptive Hashing~(DSAH)} method to adaptively explore the semantic information under training, and provide two innovative components. The pipeline is shown in Figure~\ref{pipeline}. In particular, to overcome the disadvantage of fixed pre-computed similarity, we adopt an \textbf{Adaptive Neighbor Discovery~(AND)} technique, which mines underlying neighbor relationships behind the fine-tuning features gradually during training, and update the initial similarity graph continuously. Further, we introduce an adjustable pairwise weight term \textbf{Pairwise Information Content~(PIC)} to distinguish the different importance of data pairs. In this way, the data pairs with more information would gain greater weights and contribute more to model learning. These two techniques enable DSAH to fully explore the semantic information behind the data pairs and learn better hash codes in a self-adaptive manner. The main contributions of this paper can be summarized as follows: \begin{itemize} \item We propose a novel \textbf{DSAH} method to yield better hash codes in a self-adaptive manner with the full exploration of semantic information behind the data pairs. \item We propose the \textbf{AND} technique to refine the pre-computed similarity matrix with the fine-tuned representations during the learning process, which can adaptively capture the implicit neighbor relationships and improve the hash learning performance. \item We propose the \textbf{PIC} to measure the importance of different data pairs and use it to weigh them during training, where more dissimilar data pairs will be assigned larger weights to augment their discriminative power. These weights are further adaptively updated with the pairwise similarity distribution when the training iterates. \item The extensive experiments on several benchmark datasets show that our DSAH is indeed effective and achieves superior performance, which achieves 6.2\%, 8.7\%, 2.7\% improvement over the best baseline on CIFRA-10, FLICKR25K, and NUS-WIDE datasets, respectively. \end{itemize} \begin{figure*}[!t] \centering \includegraphics[width=0.9\linewidth]{demo/pipeline} \caption{The pipeline of the proposed {Deep Self-Adaptive Hashing~(DSAH)}. First, we initialize a similarity matrix based on the original features and extract the image features via VGG-19 to compute the pairwise similarity. Next, we provide two novel technologies: (i) We introduce {PIC} (Upper branch) to augment the priority of informative data pairs. (ii) We propose AND (Down branch) to refine the initialized similarity matrix and mine the implicit neighbors' relationships with learned representation. These two components assist DSAH to learn hash codes in a self-adaptive manner.} \label{pipeline} \end{figure*} \section{Notation and Problem Definition} Let us introduce some notations for this paper. We use boldface uppercase letters $\mathbf{A}$ to represent a matrix, in which $\mathbf{a}_i$ represents the $i$-th row of $\mathbf{A}$, $a_{ij}$ represents the element of $\mathbf{A}$ which is in the $i$-th row and the $j$-th column. $\|\cdot\|$ denotes the L2 norm and $\|\cdot\|_F$ represents the Frobenius norm. $\mathbf{1}(\cdot)$ is the indicator function. $\tanh(\cdot)$ is the hyperbolic tangent function. $\sign(\cdot)$ is the sign function, which outputs $+1$ for positive numbers, or $-1$ otherwise. \begin{equation} \sign(x)=\left\{ \begin{aligned} 1,\quad x \geq 0 \\ -1,\quad x< 0 \\ \end{aligned} \right. \label{sign} \end{equation} Given a dataset contain $n$ samples $\mathbf{X}=\{\mathbf{x}_1,\mathbf{x}_2, \cdots, \mathbf{x}_n\}\in\mathbb{R}^{d\times n}$ without human annotations, where $d$ is the dimension of samples. The goal of hashing is to learn a function ${\mathcal{H}}: \mathbf{x}_i\rightarrow \mathbf{b}_i$ that maps the dataset $\mathbf{X}$ into a set of compact binary hash codes $\mathbf{B}=\{\mathbf{b}_1, \mathbf{b}_2, \cdots, \mathbf{b}_n\}\in\{+1,-1\}^{l\times n}$ where $l$ is the length of codes. \section{Related Work} In this section, we briefly review the traditional shallow hashing methods and recent deep hashing methods. These methods can be divided into supervised and unsupervised categories, and we mainly focus on unsupervised hashing methods. \subsection{Shallow Hashing} Generally, traditional shallow hashing methods can be classified into two categories: data-independent hashing methods and data-dependent methods. Data-independent hashing methods \cite{gionis1999similarity, andoni2006near, kulis2009kernelized} typically use random projection to generate binary code. Locally Sensitive Hashing~(LSH)~\cite{andoni2006near} is a representative data-independent hashing method, which enables similar data to share similar hash codes in Hamming space. However, data-independent hashing methods require longer binary codes to achieve higher accuracy, which also results in higher storage costs. The data-dependent hashing methods \cite{weiss2009spectral, liu2011hashing, gong2012iterative, dai2017stochastic} have also received increasing attention in recent years, which aim to learn compact and high-quality binary codes from specific data. One of the most classical data-dependent hashing methods is Spectral Hashing (SH) \cite{weiss2009spectral}, which was developed to learn binary codes by preserving local manifold structures. The objective function of SH can be written as: \begin{equation} \begin{gathered} \min_\mathbf{B }\sum_{ij}w_{ij}\|\mathbf{b}_i - \mathbf{b}_j\|^2 \\ s.t. \mathbf{b}_i\in\{-1,+1\}^l,\quad \sum_i \mathbf{b}_i=0,\quad \frac{1}{n}\sum_i \mathbf{b}_i\mathbf{b}_i^T=I \end{gathered} \label{SH} \end{equation} where $w_{ij}=\exp(-\|\mathbf{x}_i-\mathbf{x}_j\|^2/\varepsilon)$ is the similarity weight between $x_i$ and $x_j$. $\varepsilon$ is the balance parameter. The optimization of Eq. \ref{SH} is equivalent to balanced graph partitioning and is an NP-hard problem. SH solves this problem by introducing spectral relaxation, which removes the discrete constraint. The objective function of SH is to binarize the input so that the Hamming distance approximates the Euclidean distance. Generally, the shallow hashing methods usually encode the input images with hand-crafted features~(e.g, $\|\mathbf{x}_i-\mathbf{x}_j\|^2$ of $w_{ij}$), which is insufficient to characterize the semantic information of data and thus degrade the performance. \subsection{Deep Hashing} Recently, deep hashing methods~\cite{li2015feature, erin2015deep,li2017deep, qiu2017deep1, cao2017hashnet, liu2019cross, yang2019distillhash} show promising performance compared with the shallow hashing methods. ~\citet{xia2014supervised} is one of the earliest works that introduces the deep neural networks into hashing function learning, where the hash codes are learned by minimizing the following loss function \begin{equation} \mathcal{L}_0 = \sum_{i=1}^n \sum_{j=1}^n\left( s_{ij}-w_{ij}\right) ^2\\ \label{CNNH} \end{equation} where $s_{ij}=\frac{1}{l}\mathbf{z}_i^T\mathbf{z}_j$ is the inner product between deep features. $\mathbf{z}_i\in [-1,+1]^l$ is the relaxation of hash codes $\mathbf{b}_i$ since it is difficult to directly optimize the discrete variables. Suggested by ~\citet{cao2016deep}, cosine similarity might be a better choices to mitigate the diversity of code lengths and improve the performance, which defined as: \begin{equation} s_{ij} = cos(\mathbf{z}_i, \mathbf{z}_j) = \frac{\mathbf{z}_i^T\mathbf{z}_j}{\| \mathbf{z}_i \| \| \mathbf{z}_j \|}\\ \label{sij} \end{equation} where $w_{ij}$ of Eq.\ref{CNNH} is the binary pairwise similarity, which is equal to $+1$ if $\mathbf{x}_i$ and $\mathbf{x}_j$ are semantically similar, or $-1$ otherwise. In supervised cases, $w_{ij}$ is constructed according to labels. But in the unsupervised settings, the labels are unavailable. To tackle this problem, ~\citet{yang2018semantic} empirically study the deep feature statistics and estimate two half Gaussian distributions to calculate the similarity. ~\citet{song2018binary} employs the $k$ Nearest Neighborhoods~($k$-NN) to compute a binary similarity with pre-trained features. While ~\citet{zhang2020deep} construct a hybrid-similarity matrix in advance. ~\citet{tu2020mls3rduh} utilizes the local manifold structure to construct the similarity graph. However, in these methods, the semantic similarity matrix is pre-computed on the original feature space and is separated from the hash learning process. Intuitively, a good similarity representation is beneficial to hashing function learning, and also, hashing function might provide meaningful feedback to similarity representation. Therefore we hope that the similarity matrix and hashing function can be learned simultaneously, which inspires us to design an adaptive similarity updating method rather than reconstructing a similarity structure based on the updated features~\cite{shen2018unsupervised}. Moreover, the existing similarity-preservation loss function (e.g, Eq.\ref{CNNH}) usually neglects the priorities between different data pairs in the learning process. Though several works~\cite{cao2017hashnet, yang2018semantic, zhang2020deep, qin2020unsupervised} divide the data pairs into different groups based on their pairwise similarity, these partitions are also pre-defined and fail to capture the fine-grained priority between data pairs since the pairs within the same group are still treated fairly. Thus the informative data pairs may be buried in a large number of uninformative training pairs. \section{Methodology} In this section, we develop our Deep Self-Adaptive Hashing model. The overall architecture of DSAH is illustrated in Figure~\ref{pipeline}, which contains three modules: Feature Extraction, Adaptive Neighbor Discovery and Pairwise Information Content. We will demonstrate each module in the following section in detail. \subsection{Feature Extraction} We apply the VGG-19~\cite{simonyan2014very} for hash function learning and denote it as $\mathcal{F}(\cdot, \Theta)$ with network parameters $\Theta$. VGG-19 contains five convolutional layers and three fully-connected layers, to make the network suitable for hash learning, we replace the last layers with a fully-connected layer with 1000 hidden units and followed by a hash layer, in which the number of neurons is equal to hash codes length $l$. To resolve the ill-posed gradient of $\sign(\cdot)$, we adopt the $\tanh(\cdot)$ as the activation function of the hash layer and then we get the approximation of hash code $\mathbf{b}_i$ as follows: \begin{equation} \mathbf{z}_i=\tanh(\mathcal{F}(\mathbf{x}_i;\Theta))\in [-1,+1]^l \label{zij} \end{equation} Once we finish the training process, we can obtain the discrete hash code $\mathbf{b}_i$ as follows: \begin{equation} \mathbf{b}_i=\sign(\mathcal{F}(\mathbf{x}_i;\Theta))\in \{-1,+1\}^l \label{bij} \end{equation} \subsection{Adaptive Neighbor Discovery} In this subsection, we propose the AND, which consists of two steps: similarity matrix initialization and updating. \subsubsection{Initialization} \label{Initialization} Recent works~\cite{song2018binary, yang2018semantic,zhang2020deep, tu2020mls3rduh} have shown that the rich semantic structure can be captured via an elaborately designed similarity matrix. In our AND, we construct an initial similarity matrix at the beginning based on $k$-NN. We first extract deep features from the relu-7 layer of a pre-trained VGG-19 model and then select $k_1$ images with the highest cosine similarity as the neighbors of each image. Then we construct a \textit{Low-order} similarity matrix $\mathbf{W}_L$ as follows: \begin{equation} (\mathbf{W}_L)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $\mathbf{x}_j$ is $k_1$-NN of $\mathbf{x}_i$} ,\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{wL} \end{equation} Notably, we consider that if the neighbors of two images are highly similar, then these two images should also be very similar. Thus we calculate the similarity of two images neighbors using the expression $\frac{1}{1 + \| (\mathbf{W}_L)_i - (\mathbf{W}_L)_j \|}$. Then we select the top $k_2$ samples to construct a \textit{High-order} similarity matrix $\mathbf{W}_H$ as: \begin{equation} (\mathbf{W}_H)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $\mathbf{x}_j$ is $k_2$-NN of $\mathbf{x}_i$} ,\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{wH} \end{equation} In order to take full advantage of these two similarity matrices, we define our initial similarity matrix $\mathbf{W}^0$ by combining $\mathbf{W}_L$ and $\mathbf{W}_H$ together, which is based on the assumption that two similar images should not only be similar in feature space but also share similar neighbors. \begin{equation} (\mathbf{W}^0)_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if $(\mathbf{W}_L)_{ij}$ = +1 and $(\mathbf{W}_H)_{ij}$ = +1}\\ -1,&\quad \text{otherwise}. \end{aligned} \right. \label{w0} \end{equation} However, a drawback of $\mathbf{W}^0$ is that it is built with the pre-trained features, which might contain noisy data. Ideally, we hope that the similarity maintains consistency with the fine-tuning features, while the reconstruction is time-consuming. Hence, we next propose an efficient updating strategy to refine the $\mathbf{W}^0$. \subsubsection{Updating} AND provides a progressive mechanism for similarity updating. Given a similarity matrix $\mathbf{W}^r$ in the $r$-th round~(or $\mathbf{W}^0$ in beginning), we first use it to update the model parameters $\Theta$. (e.g, Optimizing the $\mathcal{L}_0$ in Eq.~\ref{CNNH}). Next, we measure the pairwise cosine similarity $\mathbf{S}^r=\{s^r_{ij}\}\in \mathbb{R}^{n\times n}$ over the training data pairs through Eq.\ref{sij} and estimate a threshold $m^r$ by \begin{equation} m^r = \mu^r + \gamma \cdot \sigma^r \label{mr} \end{equation} where the $\mu^r$ and $\sigma^r$ denote the mean and standard derivation of cosine similarity $s^r_{ij}$ for those data pairs with $w^r_{ij}=+1$, which is defined as: \begin{equation} \left\{ \begin{aligned} \mu^r&=\frac{\sum_{i=1}^n \sum_{j=1}^n s^r_{ij}\cdot \mathbf{1}(w_{ij}^{r}=+1) }{n_+ }\\ \sigma^r&=\left( \frac{\sum_{i=1}^n \sum_{j=1}^n \left( s^r_{ij} -\mu^r \right)^2\cdot \mathbf{1}(w_{ij}^{r}=+1) }{n_+ } \right) ^{\frac{1}{2}}\\ \end{aligned} \right. \end{equation} where $n_+$ is equal to $\sum_{i=1}^n\sum_{j=1}^n \mathbf{1}(w_{ij}^{r}=1)$, which counts the number of neighbors in $\mathbf{W}^r$. $\gamma$ is a hyper-parameter that control the threshold. Finally, we renew the $\mathbf{W}^{r}$ as follows: \begin{equation} w^{r+1}_{ij}= \left\{ \begin{aligned} +1,&\quad \text{if } w^r_{ij}=-1 \text{ and } s^r_{ij}\geq m^r, \\ w^r_{ij},&\quad \text{otherwise}. \end{aligned} \right. \label{update} \end{equation} \textbf{Analysis}. The AND is motivated by the prediction interval, aiming to design a dynamic criterion~Eq.\ref{mr} based on the global distribution of learned features. The tuition behind Eq.\ref{update} is that these dissimilar data pairs with similarity $s_{ij}$ higher than average similarity $\mu$ of similar pair sets could probably be treated as candidate similar data pairs in next epoch, where $\gamma$ controls the tolerance, a larger $\gamma$ is more serious while a smaller $\gamma$ is looser. The reason why we focus on similar pairs instead of dissimilar pairs is that the neighborhoods-based $\mathbf{W}^0$ contains only a few similar pairs~($n_+\ll n^2$). There is still a lot of information (e.g, neighbors) worth mining in a large number of dissimilar pairs, as the model capacity increases, this information would be better distinguished. Therefore, AND is able to adaptively adjust the similarity $\mathbf{W}^0$ according to the learned representation, in a progressive mechanism. \subsection{Pairwise Information Content} In PIC, we discuss the priority of different data pairs for model training. Though Eq.~\ref{CNNH} provides a scheme to learn hash codes from similarity matrix $\mathbf{W}$, it neglects the importance of different data pairs. All the data pairs with their similarities are treated fairly when calculating loss, so that some informative data pairs may be buried in a large number of samples. To tackle this issue, we propose the PIC, which assigns an adaptive weight for each data pair. If a data pair is more important, it will receive a larger weight and contribute more to hashing function learning. So, we define the following loss function: \begin{equation} \mathcal{L}_1=\sum_{i=1}^n\sum_{j=1}^n a_{ij}\left( s_{ij}-w_{ij}\right) ^2 \label{l1} \end{equation} where $a_{ij}$ is the weight for the data pair $(i,j)$ which represents the importance of this data pair. According to the information theory~\cite{shannon1948mathematical}, given an event $\Phi$ with probability $p(\Phi)$, its \textit{information content} is defined as the negative log-likelihood: \begin{equation} I(\Phi) = -\log p(\Phi) \label{ic} \end{equation} If an event $\Phi$ has a probability 1 of occurring, then its information content is $-\log(1)=0$ and yields no information. While an event with probability 0, its information content is $+\infty$. Inspired by Eq.~\ref{ic}, we design the following definition: \begin{definition} Given a data pair $(i,j)$, we define an event $\Phi_{ij}$ with probability $p_{ij}$. The $\Phi_{ij}$ indicates that the image $j$ is the top-1 retrieval result of the given query image $i$, which is an optimum matching of image retrieval. Based on this, we define the \textbf{pairwise information content} $a_{ij}$ as: \begin{equation} \label{def_a} a_{ij} = I(\Phi_{ij}) = -\log (p_{ij}) \end{equation} \end{definition} Typically, if an image $j$ is the top-1 retrieval result of the query image $i$, then $i$ and $j$ should be the most similar. Therefore probability $p_{ij}$ can be expressed as a measure of relative similarity between image $i$ and image $j$, and we define $p_{ij}$ as \begin{equation} p_{ij}=\frac{\exp (s_{ij} /\tau)}{\sum_{g=1}^{n}\sum_{k=1}^n \exp (s_{gk}/\tau) \label{pij} \end{equation} where $\tau$ is a temperature parameter and $s_{ij}$ is the pairwise cosine similarity in Eq.~\ref{sij}. \textbf{Analysis}. Given a data pair $(i,j)$, if $p_{ij}$ is higher, then the information content $I(\Phi_{ij})$ that the image $j$ can be retrieved through the image $i$ is lower. (A special case is to use an image to retrieve itself, then $I(\Phi_{ij})$ should be lowest or close to 0.) On the contrary, retrieving an image via a highly dissimilar query would bring a lot of information. Figure.\ref{pic_fig} shows an example, given a query image of \textit{Dog}, if we retrieve a \textit{Car}, we would be more surprised than retrieving a \textit{Cat}. So that we have $I(\Phi_{Dog, Car}) > I(\Phi_{Dog, Cat})$ while $sim({Dog}, {Car}) < sim({Dog}, {Cat})$, where $sim$ denotes the pairwise similarity. The tuition behind PIC can work is that a data pair contains highly dissimilar images would provide richer distinctive information, so it should be given a larger weight contributing to the hashing learning. The PIC is based on the pairwise similarity distribution $p_{ij}$, it is adjustable and adaptive. Moreover, our PIC could also be expressed as a kind of pairwise attention mechanism. Particularly, when $a_{ij}$ is equal to constant 1, the importance of data pairs will be the same and the Eq.~\ref{l1} will degenerate to Eq.~\ref{CNNH}. \begin{figure}[!t] \centering \includegraphics[width=0.9\linewidth]{demo/PIC} \caption{The relationship between PIC weight $a_{ij}$ and relative pairwise similarity $p_{ij}$. If a data pair is highly dissimilar, their $a_{ij}$ will be higher, otherwise, it will be smaller.} \label{pic_fig} \vspace{-2.0em} \end{figure} \subsection{Objective Function} In addition, to guarantee the quality of learned hash codes, we introduce a loss $\mathcal{L}_{2}=\|\mathbf{Z}-\mathbf{B}\|_F^2$ to minimize the quantization error between the variables $\mathbf{Z}$ and the binary codes $\mathbf{B}$. Therefore, the total loss function can be formulated as \begin{equation} \begin{aligned} \mathcal{L} &= \mathcal{L}_1 + \lambda \mathcal{L}_2\\ &=\sum_{i=1}^n\sum_{j=1}^n a_{ij}\left( s_{ij}-w_{ij}\right) ^2 + \lambda \|\mathbf{Z}-\mathbf{B}\|^2_F\\ &=\sum_{i=1}^n\sum_{j=1}^n -\log(p_{ij})\left( \frac{\mathbf{z}_i^T\mathbf{z}_j}{\|\mathbf{z}_i \| \|\mathbf{z}_j \| }-w_{ij}\right) ^2 + \lambda \|\mathbf{Z}-\mathbf{B}\|^2_F \label{l_final} \end{aligned} \end{equation} \subsection{Optimization} Our DSAH consists of two main parts and since the AND is not end-to-end, we separate the optimization process into two alternate steps. First, we fix the similarity matrix $\mathbf{W}$ and optimize the network parameter $\Theta$ by back propagation (BP) with a mini-batch sampling. \begin{equation} \Theta \leftarrow \Theta-\eta\nabla_\Theta(\mathcal{L}) \label{bq} \end{equation} where $\eta$ is the learning rate and $\nabla_\Theta$ represents a derivative of $\Theta$. Second, we fix the $\Theta$ and update the similarity matrix $\mathbf{W}$ according to Eq.~\ref{update}. Once the model training is completed, we can obtain the discrete hash code $\mathbf{B}\in \{-1,+1\}^{n\times l}$ through Eq.~\ref{bij}. The detailed algorithm of our proposed DSAH is described in Algorithm \ref{alg1}. \begin{algorithm}[!t] \caption{\textbf{Deep Self-Adaptive Hashing~(DSAH)}} \label{alg1} \begin{algorithmic}[1] \REQUIRE Image set $\mathbf{X}$, hash code length $l$, temperature $\tau$, weight coefficient $\lambda$, factor $\gamma$, rounds $R$, epochs per round $T$, learning rate $\eta$ \STATE Initialize the network parameters ${\mathcal{F}}(\cdot, \Theta)$. \STATE Initialize the semantic similarity matrices $\mathbf{W}^0\in \{+1,-1\}^{n\times n}$ by Eq.~\ref{w0}. \FOR{$r=1$ to $R$} \STATE \textit{// Hash Function Learning with PIC} \FOR{$t=1$ to $T$} \STATE Update the $\mathbf{Z}$ via Eq.~\ref{zij}. \STATE Update the $\mathbf{S}$ via Eq.~\ref{sij}. \STATE Update the $\mathbf{P}$ via Eq.~\ref{pij}. \STATE Update the $\Theta$ via Eq.~\ref{bq}. \ENDFOR \STATE \textit{// Similarity Updating by AND} \STATE Update the $\mathbf{W}^{r}$ via Eq.~\ref{update}. \ENDFOR \STATE Obtain the $\mathbf{B}$ via Eq.~\ref{bij}. \ENSURE Hash codes set $\mathbf{B}$ \end{algorithmic} \end{algorithm} \begin{table*}[!t] \small \centering \begin{tabu}{l|l|llll|llll|llll} \hline & & \multicolumn{4}{c|}{\textbf{CIFAR-10}} & \multicolumn{4}{c|}{\textbf{FLICKR25K}} & \multicolumn{4}{c}{\textbf{NUS-WIDE}} \\ \hline Method & Reference & 16 bits & 32 bits & 64 bits & 128 bits & 16 bits & 32 bits & 64 bits & 128 bits & 16 bits & 32 bits & 64 bits & 128 bits \\ \hline LSH+VGG~\cite{andoni2006near} & STOC-02 & 0.177 & 0.192 & 0.261 & 0.304 & 0.596 & 0.619 & 0.650 & 0.666 & 0.385 & 0.455 & 0.446 & 0.567 \\ SH+VGG~\cite{weiss2009spectral} & NeurIPS-09 & 0.254 & 0.248 & 0.229 & 0.293 & 0.661 & 0.608 & 0.606 & 0.614 & 0.508 & 0.449 & 0.441 & 0.505 \\ ITQ+VGG~\cite{gong2012iterative} & PAMI-13 & 0.269 & 0.295 & 0.316 & 0.350 & 0.709 & 0.696 & 0.684 & 0.720 & 0.519 & 0.576 & 0.598 & 0.651 \\ AGH+VGG~\cite{liu2011hashing} & ICML-11 & 0.397 & 0.428 & 0.441 & 0.435 & 0.744 & 0.735 & 0.771 & 0.703 & 0.563 & 0.698 & 0.725 & 0.722 \\ SP+VGG~\cite{Xia_2015_CVPR} & CVPR-15 & 0.280 & 0.343 & 0.365 & 0.406 & 0.726 & 0.705 & 0.713 & 0.703 & 0.581 & 0.603 & 0.673 & 0.681 \\ SGH+VGG~\cite{dai2017stochastic} & ICML-17 & 0.286 & 0.320 & 0.347 & 0.395 & 0.608 & 0.657 & 0.693 & 0.689 & 0.463 & 0.588 & 0.638 & 0.670 \\ \hline GH~\cite{su2018greedy} & NeurIPS-18 & 0.355 & 0.424 & 0.419 & 0.416 & 0.702 & 0.732 & 0.753 & 0.760 & 0.599 & 0.657 & 0.695 & 0.712 \\ SSDH~\cite{yang2018semantic} & IJCAI-18 & 0.241 & 0.239 & 0.256 & 0.246 & 0.710 & 0.696 & 0.737 & 0.760 & 0.542 & 0.629 & 0.635 & 0.606 \\ BGAN~\cite{song2018binary} & AAAI-18 & 0.535 & 0.575 & 0.587 & 0.591 & 0.766 & 0.770 & 0.795 & 0.802 & 0.719 & 0.745 & 0.761 & 0.759 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh} & IJCAI-20 & 0.562 & 0.588 & 0.595 & 0.582 & 0.797 & 0.809 & 0.809 & 0.804 & 0.730 & 0.754 & 0.764 & 0.769 \\ TBH~\cite{shen2020auto} & CVPR-20 & 0.432 & 0.459 & 0.455 & 0.474 & 0.779 & 0.794 & 0.797 & 0.799 & 0.678 & 0.717 & 0.729 & 0.739 \\ \hline \textbf{DSAH} & \textbf{Proposed} & \textbf{0.596} & \textbf{0.617} & \textbf{0.622} & \textbf{0.635} & \textbf{0.805} & \textbf{0.816} & \textbf{0.831} & \textbf{0.836} & \textbf{0.747} & \textbf{0.769} & \textbf{0.787} & \textbf{0.793} \\\hline \end{tabu} \caption{MAP@5000 results on CIFAR10, FLICKR25K and NUS-WIDE. The best result is shown in boldface.} \label{sota} \centering \end{table*} \section{Experiments} In this section, we conduct experiments on several public benchmark datasets and evaluate our DSAH method. Particularly, we design the experiments to study the following questions: \begin{itemize} \item \textbf{Q1}: Compared with the state-of-the-art unsupervised hashing algorithms, does our DSAH method outperform them? \item \textbf{Q2}: How do the components: PIC and AND, affect the performance of DSAH separately? How do they work? \item \textbf{Q3}: Is DSAH sensitive to hyper-parameters? \item \textbf{Q4}: How about the efficiency of DSAH? \item \textbf{Q5}: What is the qualitative result of DSAH? \end{itemize} \subsection{Datasets} Following most hashing-based retrieval methods~\cite{song2018binary, deng2019unsupervised, qin2020unsupervised}, we adopt the following three widely used public benchmark datasets to evaluate the model performance: CIFAR-10, FLICKR25K and NUS-WIDE. The basic information is listed in Table.\ref{data}, while the setting details be introduced as follows: \begin{table}[H] \footnotesize \begin{tabular}{|l|l|l|l|} \hline \textbf{Dataset} & \textbf{CIFAR-10} & \textbf{FLICKR25K} & \textbf{NUS-WIDE} \\ \hline Multi-Label & $\times$ & $\checkmark$ & $\checkmark$ \\ \hline \# Images & 60,000 & 25,000 & 269,648 \\ \hline \# Classes & 10 & 24 & 21 \\ \hline \# Train Set & 10,000 & 10,000 & 10,500 \\ \hline \# Query Set & 1,000 & 1,000 & 2,100 \\ \hline \# Retrieval Set & 59,000 & 24,000 & 267,548 \\ \hline \end{tabular} \caption{Characteristics of evaluation datasets.} \label{data} \vspace{-2.0em} \end{table} \textbf{CIFAR-10} ~\cite{krizhevsky2009learning}:~ Followed the setting of \cite{song2018binary}, we randomly selected 100 images for each class as the query set, 1,000 in total. Then we used the remaining images as the retrieval set, among them, we randomly selected 1,000 images per class as the training set. \textbf{FLICKR25K} ~\cite{huiskes2008mir}:~ We randomly selected 1000 images as query set and the remaining images were left for retrieval set. In the retrieval set, we randomly chose 10,000 images as the training set. \textbf{NUS-WIDE} ~\cite{chua2009nus}:~ According to the setting in~\cite{zhu2016deep}, we selected 21 most frequent classes from the dataset and each class contains at least 5,000 related images. We randomly selected 2100 images as the query set and the remaining images were used as a retrieval set. We also randomly selected 10,500 images for training. For the latter two multi-label datasets, if the retrieved image shares at least one label with the query image, it is considered to be associated with the query image. \subsection{Experiment Setup} \textbf{Metrics}: Similar to~\cite{wang2017survey, shen2018unsupervised, yang2018semantic}, we employed four widely used evaluation metrics to evaluate the retrieval performance, including Mean Average Precision~(\textbf{MAP}), Precision of the top N retrieved images~(\textbf{Precision@N}), Precision curve~(\textbf{Precision Curve}), and Precision-Recall curves~(\textbf{PR Curve}). For a fair comparison, all the methods used the same training and query sets. \textbf{Baseline methods}: We compared our method with eleven unsupervised hashing methods, including six shallow hashing methods: \textbf{LSH}~(\citet{andoni2006near}), \textbf{SH}~(\citet{weiss2009spectral}), \textbf{ITQ}~(\citet{gong2012iterative}), \textbf{AGH}~(\citet{liu2011hashing}), \textbf{SP}~(\citet{Xia_2015_CVPR}), \textbf{SGH}~(\citet{dai2017stochastic}) and five deep hashing methods: \textbf{GH}~(\citet{su2018greedy}), \textbf{SSDH}~(\citet{yang2018semantic}), \textbf{BGAN}~(\citet{song2018binary}), \textbf{MLS$^3$RDUH}~(\citet{tu2020mls3rduh}) and \textbf{TBH}~(\citet{shen2020auto}). The parameters and architectures of the compared methods were according to the setting provided by the original papers. For a fair comparison, all shallow hashing methods used 4096-dimensional features generated by the relu7 layer of VGG19~\cite{simonyan2014very} pre-trained on ImageNet, as same as the deep features used in the five deep hashing methods during their similarity structures construction. \textbf{Implementation details}: Our DSAH is implemented based on the Tensorflow framework, while all the experiments are conducted on a workstation with an Intel l5-8500 CPU, and an Nvidia GTX2080 GPU. In the initial similarity construction~(Sec~\ref{Initialization}), the $k_1$ and $k_2$ are set to the same value 500. When training the network, each training image was resized to $224\times 224$ as input. We set $\lambda$ equal to 10 and adopt the adam optimization with learning rate $\eta$ equal to 1e-4, and the batch size was set to 50. The $\tau$ is set to 1, while the $\gamma$ is set to \{1, 0, 1\} for CIFAR-10, FLICKR25K and NUS-WIDE datasets respectively. And the $R$ and $T$ are set to 3 and 10 respectively. \begin{figure*}[!t] \centering \subfigure[PR Curve of CIFAR-10@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_64_pr-eps-converted-to.pdf} } \subfigure[Precision Curve of CIFAR-10@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of CIFAR-10@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_128_pr-eps-converted-to.pdf} } \subfigure[Precision of CIFAR-10@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/cifar_128_pre-eps-converted-to.pdf} } \subfigure[PR Curve of FLICKR25K@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_64_pr-eps-converted-to.pdf} } \subfigure[Precision of FLICKR25K@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of FLICKR25K@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_128_pr-eps-converted-to.pdf} } \subfigure[Precision of FLICKR25K@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/flickr_128_pre-eps-converted-to.pdf} } \subfigure[PR Curve of NUS-WIDE@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_64_pr-eps-converted-to.pdf} } \subfigure[Precision of NUS-WIDE@64 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_64_pre-eps-converted-to.pdf} } \subfigure[PR Curve of NUS-WIDE@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_128_pr-eps-converted-to.pdf} } \subfigure[Precision of NUS-WIDE@128 bits]{ \includegraphics[width=0.22\textwidth]{pr_pre/nus_128_pre-eps-converted-to.pdf} } \caption{Precision-Recall (PR) curves and Precision$@$N curves on the three datasets for 64 and 128 bits length.} \label{curve} \end{figure*} \subsection{Comparison Results and Discussions~(Q1)} \subsubsection{MAP \& Precision} The performance of our DSAH and baseline methods in terms of MAP@5000 are shown in Table.~\ref{sota}. We can observe that our proposed method significantly outperforms other methods on the three datasets. On CIFAR-10, DSAH obtains an increase of 6.1\% (16 bits), 4.9\% (32 bits), 4.5\% (64 bits), 9.1\% (128 bits) comparing with the best competitor MLS$^3$RDUH respectively. On FLICKR-25K and NUS-WIDE, DSAH achieves average 8.7\% and 2.7\% improvement compared to the MLS$^3$RDUH. In the practical scenarios, we pay more attention to the top retrieval responses. Thus, we further evaluate the performance on the precision of the top-100 for each method. The results are demonstrated in Table.~\ref{pre100}, where we display the result of the shortest (16 bits) and longest (128 bits) binary codes. On FLICKR25K, DSAH achieves 1.5\% (16 bits) and 2.3\% (128 bits) increases comparing with TBH. On NUS-WIDE, DSAH is improved by 1.7\% (16 bits) and 2.9\% (128 bits) compared to BGAN. Therefore, both the Table.\ref{sota} and Table.\ref{pre100} demonstrate that DSAH achieves better performance compared to previous unsupervised hashing methods. \begin{table}[!h] \footnotesize \begin{tabular}{l|ll|ll|ll} \hline \textbf{Dataset} & \multicolumn{2}{c|}{\textbf{CIFAR-10}} & \multicolumn{2}{c|}{\textbf{FLICKR25K}} & \multicolumn{2}{c}{\textbf{NUS-WIDE}} \\ \hline Methods & 16 bits & 128 bits & 16 bits & 128 bits & 16 bits & 128 bits \\ \hline LSH+VGG~\cite{andoni2006near}& 0.175 & 0.411 & 0.608 & 0.745 & 0.393 & 0.651 \\ SH+VGG~\cite{weiss2009spectral}& 0.291 & 0.446 & 0.715 & 0.700 & 0.518 & 0.625 \\ ITQ+VGG~\cite{gong2012iterative}& 0.283 & 0.458 & 0.760 & 0.818 & 0.545 & 0.739 \\ AGH+VGG~\cite{liu2011hashing}& 0.444 & 0.617 & 0.794 & 0.877 & 0.572 & 0.794 \\ SP+VGG~\cite{Xia_2015_CVPR}& 0.284 & 0.514 & 0.788 & 0.852 & 0.601 & 0.756 \\ SGH+VGG~\cite{dai2017stochastic}& 0.285 & 0.536 & 0.622 & 0.814 & 0.457 & 0.764 \\ \hline GH~\cite{su2018greedy} & 0.410 & 0.519 & 0.773 & 0.843 & 0.651 & 0.777 \\ SSDH~\cite{yang2018semantic} & 0.216 & 0.269 & 0.753 & 0.800 & 0.595 & 0.662 \\ BGAN~\cite{song2018binary}& 0.591 & 0.691 & 0.839 & 0.884 & 0.749 & 0.794 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh}& \textbf{0.618} & 0.677 & 0.851 & 0.868 & 0.748 & 0.791 \\ TBH~\cite{shen2020auto}& 0.499 & 0.586 & 0.849 & 0.877 & 0.702 & 0.775 \\ \hline \textbf{DSAH}& 0.616 & \textbf{0.691} & \textbf{0.862} & \textbf{0.897} & \textbf{0.762} & \textbf{0.817} \\ \hline \end{tabular} \caption{Precision@100 results on CIFAR10, FLICKR25K and NUS-WIDE. The best result is shown in boldface.} \label{pre100} \end{table} \subsubsection{Precision Curve \& PR Curve} To further illustrate the effectiveness of DSAH, we display the Precision curve and PR curve of 64 and 128 bits in Figure.~\ref{curve}. The PR Curve Figure.\ref{curve}~(a)(c)(e)(g)(i)(k) clearly displays the precision at different recall values, which is a good representation of overall performance. In general, a larger area under the PR curve indicates better performance. It can be seen that our PR curve covers more areas in most cases, which means that when the precision is equal, the proposed method will recall more related images; when the number of recall related images is equal, the proposed method has higher precision. Thus, DSAH yields a stable and superior performance. Similar to the PR Curve setting, we display the Precision Curves in Figure.\ref{curve}~(b)(d)(f)(h)(j)(l). It can be seen that the precisions of our methods is relatively higher than the precisions of other methods in most cases. which indicates that given a fixed number of retrieval samples, our method can obtain higher precision outperform other methods. \subsection{Ablation Study~(Q2)} Since our method consists of two major components: PIC and AND, we further verify their effectiveness. \subsubsection{Effect of PIC} In order to validate the efficiency of PIC, we design the following variants with different $a_{ij}$ in Eq.~\ref{l1}: \begin{itemize} \item \textbf{PIC$^0$}: $a_{ij}$ is equal to constant 1, and it would degenerate to Eq.~\ref{CNNH}. This could be treated as a baseline. \item \textbf{PIC}: $a_{ij}$ is equal to $-\log(p_{ij})$. This is our proposed PIC. \item \textbf{PIC$^-$}: $a_{ij}$ is equal to $-\log(1-p_{ij})$. This could be regarded as an opposite version of our PIC. \end{itemize} \begin{figure}[H] \centering \subfigure[CIFAR-10]{ \includegraphics[width=0.145\textwidth]{abalation/pic_cifar-eps-converted-to.pdf} } \subfigure[FLICKR25K]{ \includegraphics[width=0.145\textwidth]{abalation/pic_flickr-eps-converted-to.pdf} } \subfigure[NUS-WIDE]{ \includegraphics[width=0.145\textwidth]{abalation/pic_nus-eps-converted-to.pdf} } \caption{Effect of PIC on three datasets with MAP@5000, the code lengths varying from 16 to 128.} \label{Q1_pic_a} \end{figure} We report the experimental results on the three datasets in Figure \ref{Q1_pic_a}, which are evaluated with MAP@5000. As shown in Figure.~\ref{Q1_pic_a}~(a)-(c), we could observe that: Firstly, compared with baseline PIC$^0$, introducing PIC weights is able to obtain average 8.2\%, 1.2\%, 2.1\% MAP improvements on CIFAR-10, FLICKR25K and NUS-WIDE datasets, respectively. These results indicate that PIC indeed improves the discriminative power of our model. Secondly, the performance degradation of the third PIC$^-$ shows that assigning large weights to similar data pairs will degenerate the performance, which indicates that dissimilar data pairs should receive more attention rather than similar data pairs. These results validate the effectiveness of our proposed weighting method PIC. \textbf{How PIC works.} To further understand PIC, we display the heatmap of pairwise similarity $s_{ij}$ and their PIC weights $a_{ij}$ within a batch size in Figure.~\ref{Q1_pic_b}. It is shown that those data pairs with higher similarity, especially in the diagonal~(self-similar), would receive a lower weight after PIC assignment and dissimilar pairs will reach higher weights. \begin{figure}[!h] \centering \subfigure[Heatmap of $\mathbf{S}$]{ \includegraphics[width=0.2\textwidth]{abalation/map_sim-eps-converted-to.pdf} } \subfigure[Heatmap of $\mathbf{A}$]{ \includegraphics[width=0.2\textwidth]{abalation/map_pic-eps-converted-to.pdf} } \caption{The heatmap of (a)~pairwise similarity $s_{ij}$ and (b)~corresponding PIC weight $a_{ij}$ within a batch size.} \label{Q1_pic_b} \end{figure} \subsubsection{Effect of AND} To reveal the effectiveness of AND, we conduct an experiment to compare the following variants: \begin{itemize} \item \textbf{AND$^{0}$}: Training via Eq.~\ref{CNNH} with $\mathbf{W}^0$, which is baseline. \item \textbf{AND}: Training via Eq.~\ref{CNNH} with updated $\mathbf{W}^r$ via AND. \item \textbf{AND+PIC}: Training via Eq.~\ref{l1} with updated $\mathbf{W}^r$ via AND. \end{itemize} We report the results evaluated with MAP@5000 on the three datasets in Figure.~\ref{Q1_and_a}. By employing the AND, the baseline model can be generally improved, achieving 1.7\%, 1.8\%, 1.0\% average improvements on three datasets, respectively. Furthermore, the performance can be greatly improved by introducing both PIC and AND, resulting in 8.9\%, 3.4\% and 3.8\% average improvements over baseline in three datasets. The above experiments reveal the effectiveness of PIC and AND of DSAH. \begin{figure}[!h] \centering \subfigure[CIFAR-10]{ \includegraphics[width=0.145\textwidth]{abalation/and_cifar-eps-converted-to.pdf} } \subfigure[FLICKR25K]{ \includegraphics[width=0.145\textwidth]{abalation/and_flickr-eps-converted-to.pdf} } \subfigure[NUS-WIDE]{ \includegraphics[width=0.145\textwidth]{abalation/and_nus-eps-converted-to.pdf} } \caption{Effect of AND on three datasets with MAP@5000, the code length varying from 16 to 128.} \label{Q1_and_a} \end{figure} \textbf{How AND works.} To better understand the mechanism of AND, we enlarge the round $R$ to 10 and record the changing of threshold $m$ and the number of neighbors pairs ${n_+}$. Also, to monitor the quality of the updated similarity matrix $\mathbf{W}^r$, we compute an indicator matrix $\mathbf{G}\in \{-1, +1\}^{n\times n}$, which element $g_{ij}$ is equal to $+1$ iff data pairs $(i,j)$ belong to same class, otherwise equal to $-1$. Next, we treat AND as a binary classification problem and $\mathbf{G}$ as ground-truth, and then design a metric ${F}_{w}$ to measure the quality of updated matrix $\mathbf{W}^r$, which is inspired by F-score: $$ {F}_{w}=\frac{2}{\alpha^{-1}+\beta^{-1}} $$ where $\alpha$ is equal to $\frac{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=g_{ij})}{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=+1)}$, denotes the precision of updated similarity matrix $\mathbf{W}^r$. And $\beta$ denotes the recall of $\mathbf{W}^r$, defined as $\frac{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(w^t_{ij}=g_{ij})}{\sum_{i=1}^n\sum_{j=1}^n\mathbf{1}(g_{ij}=+1)}$. In Figure.~\ref{Q1_and_b}. We could see that in each round, additional data pairs are added to the neighbors set, and the number of similar data pairs converges eventually. This is mainly controlled by the increase of the adjustable threshold $m$. Notably, the climbing $F_w$ confirms the effect of AND, which indeed refines the quality of the similarity matrix and leads to the model's improvement, especially in the first updating. \begin{figure}[H] \centering \subfigure[$\left( n^+, m\right) $ w.r.t $R$]{ \includegraphics[width=0.22\textwidth]{abalation/AND_p1-eps-converted-to.pdf} } \subfigure[$\left( \text{MAP@5000}, F_w\right) $ w.r.t $R$]{ \includegraphics[width=0.22\textwidth]{abalation/AND_p2-eps-converted-to.pdf} } \caption{The Mechanism of AND. We monitor the AND's $\left( n_+, m, MAP, F_w\right) $ w.r.t round $R$.} \label{Q1_and_b} \end{figure} \subsection{Parameter Sensitivity~(Q3)} \subsubsection{Study of $\lambda$} In Figure.~\ref{PA}~(a), we study the influence of the quantization effect with different $\lambda$ over three datasets, where the code length is 64. From this figure, the performance will degrade when $\lambda$ is larger than 10. And the recommended value for $\lambda$ is 10, which would bring 4.3\%, 3.1\% and 2.8\% MAP improvements in CIFAR-10, FLICKR25K and NUS-WIDE, respectively. \begin{figure}[H] \centering \subfigure[Study of the $\lambda$.]{ \includegraphics[width=0.2\textwidth]{parameter/lambda-eps-converted-to} } \subfigure[Study of the $\tau$ of PIC.]{ \includegraphics[width=0.2\textwidth]{parameter/tau-eps-converted-to} } \caption{MAP@5000 under (a)~different $\lambda$ and (b)~different $\tau$ of PIC, the code length is 64.} \label{PA} \end{figure} \subsubsection{Study of PIC} In Figure.~\ref{PA}~(b), we investigate the influence of hyper-parameter $\tau$ in PIC. It shows that the proposed method is sensitive and deteriorates when $\tau\in \{0.01, 0.1\}$. When $\tau$ is larger than 1, the model performance tends to stabilize and slightly decline, and the recommended value for $\tau$ is 1.0. \subsubsection{Study of AND} In Figue.~\ref{PA_and}, we evaluate the effectiveness of different hyper-parameters $(\gamma, R)$ in AND on (a)~CIFAR-10 and (b)~FLICKR25K datasets, where $\gamma$ from -1.0 to 1.0 with a step of 0.25 and the maximum $R$ is set to 10, the code length is 64. The diagram in Figure.~\ref{PA_and}(a) indicates that MAP will increase with $R$ increases and then converges around 3 on CIFAR-10 dataset, and a large $\gamma$ ($\geq 0$) might be a good choice. On FLICKR25K, it is noteworthy that when $\gamma$ is smaller than $-0.5$, a significant increment would happen in the second round. This is due to the increase of similar pairs, but later proved that this threshold was too loose, leading to model degradation. \begin{figure}[H] \centering \subfigure[CIFAR-10: 64 bits]{ \includegraphics[width=0.22\textwidth]{parameter/and_cifar10_5000} } \subfigure[FLICKR25K: 64 bits]{ \includegraphics[width=0.22\textwidth]{parameter/and_flickr_5000} } \caption{Parameter Sensitivity of $(\gamma,R)$ in AND. The code length is set to 64.} \label{PA_and} \end{figure} \subsection{Efficiency Analysis~(Q4)} In Table.\ref{time}, we conduct an experiment to compare the training time of different deep methods on CIFAR-10 dataset. The results indicate that DSAH is efficient and only takes nearly one-third time of the fastest baseline SSDH; Also, DSAH achieves significantly performance with only a fifth of MLS$^3$RDUH’s computation time. \begin{table}[!h] \small \begin{tabular}{l|c|c} \hline \textbf{Methods} & \textbf{MAP@5000}& \textbf{Training Time~(h)} \\ \hline SSDH~\cite{yang2018semantic} & 0.256 & 3.0 \\ BGAN~\cite{song2018binary} & 0.587& 5.0 \\ MLS$^3$RDUH~\cite{tu2020mls3rduh} & 0.595 & 4.8 \\ DSAH & 0.622 & 1.2 \\ \hline \end{tabular} \caption{Training time comparison among the unsupervised deep hashing methods.} \label{time} \end{table} \subsection{Qualitative Result~(Q5)} \subsubsection{t-SNE visualization} To better understand the manifold structure of learned hashing code, We compare the t-SNE visualization~\cite{maaten2008visualizing} of BGAN, MLS3RDUH, and DSAH in Figure.~\ref{tsne}, in which the data points within the same colors belong to the same class. It could be visually found that DSAH shows a clearer structure, in which we can find some meaningful clusters. Those scatter points within the same class~ (color) thus own smaller hamming distances with each other. \begin{figure}[!h] \setlength{\abovecaptionskip}{0.cm} \setlength{\belowcaptionskip}{-0.cm} \centering \subfigure[BGAN~\cite{song2018binary}]{ \includegraphics[width=0.145\textwidth]{tsne/BGAN-eps-converted-to.pdf} } \subfigure[MLS$^3$RDUH~\cite{tu2020mls3rduh}]{ \includegraphics[width=0.145\textwidth]{tsne/MLS-eps-converted-to.pdf} } \subfigure[DSAH]{ \includegraphics[width=0.145\textwidth]{tsne/DSAH-eps-converted-to.pdf} } \caption{t-SNE visualization on CIFAR-10 dataset. (64 bits)} \label{tsne} \vspace{-2.0em} \end{figure} \subsubsection{Retrieval Result} In Figure~\ref{vis}, we display some retrieval examples that return the top-10 samples based on the Hamming ranking distance on the CIFAR-10 dataset (64-bit). Comparing to the best baseline, our DSAH has fewer fault images. Specially, we found that MLS$^3$RDUH confusing birds in a green scene and flags, while the high-quality prediction of DSAH demonstrates that DSAH could well-distinguish the semantic information of images rather than the low-level feature. \begin{figure}[h] \setlength{\abovecaptionskip}{0.cm} \setlength{\belowcaptionskip}{-0.cm} \centering \includegraphics[width=0.9\linewidth]{vis/vis} \caption{Top-10 retrieved results of DSAH and MLS$^3$RDUH on CIFAR-10 dataset. The green $\checkmark$ means that the retrieved samples belong to the same classes of the query images while the red $\times$ represents the returned in different classes.} \label{vis} \vspace{-2.0em} \end{figure} \section{Conclusions} In this paper, we propose a novel deep unsupervised hashing method DSAH to yield binary codes with fully exploring semantic information behind the data pairs. Particularly, DSAH provides two innovative designs: AND and PIC. To overcome the limitation of fixed semantic similarity, we adopt AND technique to refine the pre-computed similarity matrix with the learned representation and adaptively capture the implicit semantic structure behind the data distribution. Further, we employ PIC to distinguish the different importance of data pairs and assign an adjustable weight to each data pair, which fully explores the discriminative information of training data pairs. By combining PIC and AND in one framework, DSAH learns better hash codes in a self-adaptive manner. The extensive experiments on three benchmarks datasets demonstrate the effectiveness of our techniques, and DSAH can achieve competitive performance. \section{Acknowledgements} This work is jointly supported by the 2021 Tencent Rhino-Bird Research Elite Training Program, and the Major Project of the New Generation of Artificial Intelligence (No. 2018AAA0102900), NSFC under Grant No. 61773268, Natural Science Foundation of SZU (Grant No. 000346). \bibliographystyle{ACM-Reference-Format}
\section{Introduction} \label{sec:introduction} Consider the stochastic delay differential equations (SDDEs) \begin{eqnarray} \dot{x}(t) &=& v(t), \label{eq:tde2x}\\ m\dot{v}(t) &=& F(t) + F_{\rm D}(t-\tau) + \eta(t) \label{eq:tde2v} \end{eqnarray} with a nonlinear time-local force $F(t)=F(x,v,t)$ and a linear delay force ($\tau>0$) \begin{equation} F_{\rm D}(t-\tau) = - \kappa_\tau x(t-\tau) -\gamma_\tau v(t-\tau), \label{eq:DelayForce} \end{equation} with constant coefficients $\kappa_\tau$ and $\gamma_\tau$. The dynamics is \textcolor{black}{randomly driven by a possibly non-Markovian, zero-mean Gaussian stochastic noise $\eta(t)$. Intuitively, one can think of Eqs.~\eqref{eq:tde2x} and \eqref{eq:tde2v} as describing the time evolution of the position $x(t)$ and velocity $v(t)$ of a Brownian particle with mass $m$ and driven by the combined forces $\eta$, $F$, and $F_D$. These forces can arise from various origins, e.g., from the environment and the experimental apparatus, including some specifically tailored feedback mechanisms. Further specifications and various interpretations will be provided below.} Due to finite speeds of information transfer and processing and elements with slow response, such equations are ubiquitous in engineering~\cite{Kyrychko2010}, biology~\cite{Beuter1993, Yanqing1997, Novak2008} and even economics~\cite{Mackey1989, Voss2002, Stoica2005, Gao2009}. Most frequently, they are applied in modelling of feedback loops~\cite{Bechhoefer2005, Atay2010, Lakshmanan2011, Gernert2016, dissertation_of_Sarah, Baraban2013, Qian2013, Bregulla2014, Vicske2014, Mijalkov2016, Zheng2017,Zhang2017,Leyman2018, Khadka2018, Lavergne2019, Piwowarczyk2019, Bauerle2020}, neural networks~\cite{Foss1996, Marcus1989, Sompolinsky1991, Haken2007}, population dynamics~\cite{Gopalsamy2013, Mao2005}, and epidemiology~\cite{BERETTA2001,Rihan2020}. Rising interest in SDDEs among physicists~\cite{Otto2019} is driven by recent experiments. In the so-called feedback cooling experiments with Brownian particles, one employs a feedback of the particle's past velocity to achieve a more localised state~\cite{Bushev2006,li2013millikelvin,Goldwater2019,Penny2021}. In the surging field of active matter~\cite{Ramaswamy2010, Bechinger2016, Gompper2020}, inevitable time delays in the control of robotic swarms~\cite{Mijalkov2016} led to investigations of the stability and localization of many-body systems with delayed interactions~\cite{Khadka2018, Mijalkov2016, Leyman2018, Piwowarczyk2019, Geiss2019}. In agreement with engineering practice~\cite{Kyrychko2010,Atay2010, Lakshmanan2011,Fridman2016}, it was found that delay generally introduces instabilities and oscillations into the dynamics~\cite{Khadka2018,Geiss2019} and increases stability and localization only in special cases~\cite{Bechinger2016}. Similarly, inevitable instrumental and feedback delays in micro-manipulation experiments~\cite{Yonggun2012,Khadka2018} used to test stochastic thermodynamics~\cite{Sekimoto2010, Seifert2012} has triggered investigation of the thermodynamic aspects of SDDEs~\cite{Rosinberg2015, Rosinberg2017, Vu2019, Loos2019, dissertation_of_Sarah}. There are interesting consequences of the acausality of time-reversed processes in delay systems due to the tracking (future) history for the time-reversal. If interpreted as feedback-driven systems with information inflow, their total entropy production rate, $\dot{S}_{\rm tot}$, evaluated as a ratio of forward to backward path probabilities, is not just the sum, $\dot{S}_{\rm S} + \dot{S}_{\rm NM}$, of entropy fluxes into the system (S) and into the bath (B)~\cite{Munakata2014,Rosinberg2015,Rosinberg2017,Loos2019}. This means that the second law $\dot{S}_{\rm tot}\ge 0$ does not imply positivity of $\dot{S}_{\rm S} + \dot{S}_{\rm NM}$. These results are generic for the system~\eqref{eq:tde2x}--\eqref{eq:tde2v} with a Gaussian white noise $\eta(t) \propto \xi(t)$, $\left<\xi(t)\right> = 0$, $\left<\xi(t)\xi(t')\right> = \delta(t-t')$. However, explicit expressions are currently only available for linear systems \cite{Munakata2014,Rosinberg2015,Rosinberg2017,Munakata2009,Loos2019}, which fail to describe a broad range of interesting effects observed in presence of nonlinear forces~\cite{Rosinberg2015,Rosinberg2017,Loos2019}. The same can be said about the probability densities for SDDEs. They are available only for simple linear setups~\cite{Adelman1976, Fox1977, Hanggi1978, Sancho1982, Hernandez-Machado1983, Kuchler1992, Guillouzic1999, Frank2003, McKetterick2014, Giuggioli2016,Geiss2019}, and nonlinear systems have been treated by various approximate techniques~\cite{Guillouzic1999, Frank2003, Frank2005, Mijalkov2016,Loos2017, Geiss2019, Loos2019b}. \textcolor{black}{Even without time delay, an exact treatment of nonlinear systems is indeed difficult. However, their stationary and relaxation properties are known exactly in thermodynamic equilibrium. In this work, we extend this property to a certain class of SDDEs. Our results can be of interest not only to the theory of delay processes but also in applied contexts, like in control theory.} \section{Main results} \label{sec:results} As our main result, we identify a class of nonlinear delay processes that admit a standard thermodynamic description, including the second law inequality $\dot{S}_{\rm tot}=\dot{S}_{\rm S} + \dot{S}_{\rm NM} \ge 0$. If not driven, they obey Boltzmann statistics in the steady state. We therefore characterize these processes as ``equilibrium delay processes''. The key idea is to accompany the time-delayed feedback force applied to the system with a suitable colored noise $\eta_\mathrm{FB}$ and interpret the resulting overall system as a particle immersed in an equilibrium reservoir and controlled by time-local external forces. Noteworthy, such feedback noise can already be realized in state-of-the-art experimental setups~\cite{DAnna2003,Murch2012,Ferialdi2019,Penny2021}. We further point out how to interpret Eqs.~\eqref{eq:tde2x} and \eqref{eq:tde2v} as a feedback-driven system and how to apply our results therein. \textcolor{black}{Altogether, we provide three complementary interpretations for the same stochastic process: a special type of system with time-delayed forces (Sec.~\ref{sec:introduction}), system with time-local forces and a heat bath with memory (Sec.~\ref{sec:mapping}), and a feedback-driven system (Sec.~\ref{sec:EFB}). They differ just in the interpretation of the individual forces on the right hand side of Eq.~\eqref{eq:tde2v}. In Tab.~\ref{tab:interpretations}, we summarize relations between the three interpretations and the definitions of the corresponding forces. In the following, we take Boltzmann's constant $k_{\rm B}$ as our unit of entropy.} \begin{table}[] \centering \begin{tabular}{?c?} \specialrule{1pt}{1pt}{1pt} {\bf A: Delay system} \\ $m\dot{v} = F+F_{\rm D}+\eta$\\ \specialrule{1pt}{1pt}{1pt} \specialrule{1pt}{1pt}{1pt} \emph{time-local systematic force}: $F = F_{\rm E} + \kappa_\tau x(t) - \gamma_0 v(t)$\\ \hline ordinary (non-feedback) external force: $F_{\rm E} = - \partial_x U(x,t) + F_{\rm N}(x,v,t)$\\ \hline potential component of $F_{\rm E}$: $-\partial_x U(x,t)$\\ \hline non-potential component of $F_{\rm E}$: $F_{\rm N}(x,v,t)$\\ \hline \emph{time-delayed force}: $F_{\rm D} = - \kappa_\tau x(t-\tau) -\gamma_\tau v(t-\tau)$\\ \hline \emph{total coloured noise from the environment and experimental apparatus}: $\eta(t)$ \\ \specialrule{1pt}{1pt}{1pt} \end{tabular} \begin{tabular}{c} \phantom{space} \end{tabular} \begin{tabular}{?c?} \specialrule{1pt}{1pt}{1pt} { \bf B: System with non-Markovian heat bath and time-local control }\\ $m\dot{v} = F_{\rm E} + F_{\rm F}+\eta$\\ \specialrule{1pt}{1pt}{1pt} \specialrule{1pt}{1pt}{1pt} \emph{time-local external force}: $F_{\rm E}$ \\ \hline \emph{time-delayed \textcolor{black}{non-Markovian} bath friction}: \\ $F_{\rm F} = \kappa_\tau x(t) - \gamma_0 v(t) - \kappa_\tau x(t-\tau) -\gamma_\tau v(t-\tau) = \kappa_\tau x(t) - \gamma_0 v(t) + F_{\rm D}$ \\ \hline \textcolor{black}{total force from the non-Markovian heat bath at temperature $T$: $F_{\rm F} +\eta(t)$} \\ \hline \emph{coloured noise from \textcolor{black}{the non-Markovian bath}: $\eta(t)$} \\ \hline \textcolor{black}{heat flux into the system from the non-Markovian bath: $\dot{Q}_{\rm NM} = \left<(F_{\rm F} + \eta)\dot{x}\right>$} \\ \specialrule{.1em}{.2em}{.2em} \end{tabular} \begin{tabular}{c} \phantom{space} \end{tabular} \begin{tabular}{?c?} \specialrule{1pt}{1pt}{1pt} {\bf C: Feedback-driven system with Markovian heat bath} \\ $m\dot{v} = F_{\rm E} + F_{\rm FB} - \gamma_0 v(t)+\sqrt{2T_0\gamma_0}\xi(t)$\\ \specialrule{1pt}{1pt}{1pt} \specialrule{1pt}{1pt}{1pt} \emph{time-local external force}: $F_{\rm E}$\\ \hline \emph{feedback force}:\\ \textcolor{black}{$F_{\rm FB} = \kappa_\tau x(t) - \kappa_\tau x(t-\tau) -\gamma_\tau v(t-\tau) = \kappa_\tau x(t) + F_{\rm D} + \eta_{\rm FB}(t) = F_{\rm F} + \gamma_0 v(t)$} \\ \hline \textcolor{black}{non-Markovian noise exerted by the feedback loop: $\eta_{\rm FB}(t) = \eta(t) - \sqrt{2T_0\gamma_0}\xi(t)$} ~~ \\ \hline \textcolor{black}{total force from the Markovian bath at temperature $T_0$: $- \gamma_0 v(t) + \sqrt{2T_0\gamma_0}\xi(t)$} \\ \hline ~~ \emph{time-local friction \textcolor{black}{from the Markovian bath}}: $ - \gamma_0 v(t) $ ~~ \\ \hline \emph{white noise \textcolor{black}{from the Markovian bath}}: $\sqrt{2T_0\gamma_0}\xi(t)$ \\ \hline \textcolor{black}{heat flux into the system from the Markovian bath: $\dot{Q}_{\rm M} = \left<(-\gamma_0 v + \eta)\dot{x}\right>$} \\ \specialrule{1pt}{1pt}{1pt} \end{tabular} \caption{ Three interpretations of the delay Langevin equation~\eqref{eq:tde2v} employed in this paper and the corresponding forces. \textcolor{black}{The forces in the three interpretations yield the same change in the momentum $m\dot{v}$ and thus the same stochastic process. The term $\kappa_\tau x(t) - \gamma_0 v(t)$ in the force $F$ in the interpretation A is introduced to facilitate the reinterpretation of the delayed force $F_{\rm D}$ as part of the friction force $F_{\rm F}$ in B.} By ``ordinary external forces'' in A we mean time-local forces arising from physical interactions and thus not applied via a feedback loop.} \label{tab:interpretations} \end{table} \subsection{Mapping to time-local control and non-Markovian heat bath (Tab.~\ref{tab:interpretations}B)} \label{sec:mapping} \textcolor{black}{In this section, we describe the reinterpretation of the delay system (Tab.~\ref{tab:interpretations}A) as an equilibrium system with memory (Tab.~\ref{tab:interpretations}B). Consider a delay system described by Eqs.~\eqref{eq:tde2x}--\eqref{eq:tde2v} with the time-local force} \begin{equation} F(t) = F_{\rm E}(x,v,t)+ \kappa_\tau x(t) - \gamma_0 v(t). \label{eq:TotalForce} \end{equation} \textcolor{black}{ The specific form of the terms proportional to the constants $\gamma_0 > 0$ and $\kappa_\tau$ facilitates the reinterpretation of the delay force $F_D$ in Eq.~\eqref{eq:tde2v} as part of a friction force, below. The remaining force in Eq.~\eqref{eq:TotalForce},} \begin{equation} F_{\rm E}(x,v,t) = - \partial_x U(x,t) + F_{\rm N}(x,v,t) \label{eq:ExternalForce} \end{equation} is an arbitrary time-local force applied by external agents. It is composed of potential and non-potential components $- \partial_x U(x,t)$ and $F_{\rm N}(x,v,t)$. \textcolor{black}{To distinguish the force $F_{\rm E}$ from the force applied via the feedback loop in the feedback interpretation of Eqs.~\eqref{eq:tde2x}--\eqref{eq:tde2v} (Tab.~\ref{tab:interpretations}C), we call it the ``ordinary'' external force.} Equation~\eqref{eq:tde2v} now assumes the form \begin{equation} m \dot{v}(t) = F_{\rm E}(t) + F_{\rm F}(t) + \eta(t) \label{eq:vMain} \end{equation} with $ F_{\rm F}(t) \equiv \kappa_\tau[x(t) - x(t - \tau)] - \gamma_0 v(t) - \gamma_\tau v(t-\tau). $ It resembles the dynamical equation for the velocity of a particle subjected to an external force $F_{\rm E}$ and immersed in \textcolor{black}{a viscoelastic solvent} exerting on the particle the overall force $F_{\rm F} + \eta$ with systematic component (friction) $F_{\rm F}$, and stochastic component (noise) $\eta$. Such noise and friction can be interpreted to arise from an ordinary equilibrium heat \textcolor{black}{bath, i.e., a many-body system with infinite heat capacity in thermal equilibrium,} with a somewhat peculiar memory that gives rise to an ``echo'' in the noise and friction (Tab.~\ref{tab:interpretations}B). Notably, \textcolor{black}{for an equilibrium heat bath with a friction force linear in the variables $x$ and $v$, such as $F_{\rm F}$}, the time-reversal symmetry of the underlying microscopic dynamics implies that the friction and noise are interrelated by the so-called second fluctuation-dissipation theorem or fluctuation-dissipation relation (FDR)~\cite{Kubo1966,Felderhof1978,Zwanzig2001,Kubo2012} \begin{equation} \left<\eta(t)\eta(t')\right> ={T}\, \Gamma(|t-t'|). \label{eq:FDTGen} \end{equation} Here $T$ denotes the temperature and $\Gamma(t)$ is the so called friction kernel defined by the integral \begin{equation} F_{\rm F}(t) = - \int_{-\infty}^t dt'\, \Gamma(t-t')v(t'). \label{eq:friction_kernel} \end{equation} For a given friction $F_{\rm F}$, the FDR~\eqref{eq:FDTGen} might imply that the noise must be complex valued. \textcolor{black}{However, in order to admit its ordinary physical interpretation and realisability in a lab,} $\eta(t)$ is required to be a real-valued function. This condition implies that its power spectrum must be non-negative, \begin{equation} S(\omega) = \int_{-\infty}^\infty dt \left<\eta(t)\eta(0)\right> \exp(-i \omega t) \ge 0. \label{eq:PowerSpectrumGen} \end{equation} For the system of Eqs.~\eqref{eq:tde2x}--\eqref{eq:vMain}, the conditions~\eqref{eq:FDTGen} and \eqref{eq:PowerSpectrumGen} can be satisfied for a certain range of model parameters only, see Secs.~\ref{sec:PF} and \ref{sec:VF}. In this range, Eqs.~\eqref{eq:tde2x} and \eqref{eq:vMain} can be interpreted as describing a system with internal Hamiltonian $H = U(x,t) + m v^2/2$ acted upon by a non-potential force $F_{\rm N}$ and coupled to a non-Markovian ``equilibrium bath'' at temperature $T$. \textcolor{black}{Let us now review some general properties of this system.} \subsection{Properties of the mapping (Tab.~\ref{tab:interpretations}B)} \label{sec:properties} \emph{Average thermodynamics.} If the above equilibrium mapping holds, the system's thermodynamics obeys standard relations from classical~\cite{callen1985} and stochastic~\cite{Sekimoto2010,Seifert2012} thermodynamics. Namely, the average entropy flux into the non-Markovian heat bath at temperature $T$ is given by the Claussius equality \begin{equation} \dot{S}_{\rm NM} = -\dot{Q}_{\rm NM}/{T} \label{eq:SB} \end{equation} where $\dot{Q}_{\rm NM} = \left<(F_{\rm F} + \eta) \dot{x} \right>$ is the average heat flux from the heat bath into the system. It can also be interpreted as the work done by the bath on the system per unit time. Here and below we employ Stratonovich calculus. The averages $\left< \bullet \right>$ should be performed over many realizations of the stochastic process. The average heat flux is related via the first law, $d\langle H\rangle/dt = \dot{Q}_{\rm NM} + \dot{W}_{\rm E}$, to the average power input, $\dot{W}_{\rm E} = \langle \partial U/\partial t + F_{\rm N} \dot{x} \rangle$, of the system, due to external manipulations of the potential $U$ and the non-potential force $F_{\rm N}$. The sum of the rate of change of the system entropy, $\dot{S}_{\rm S}$, and the entropy influx $\dot{S}_{\rm NM}$ in Eq.~\eqref{eq:SB} is the total entropy production, which obeys the second law of thermodynamics~\cite{callen1985}: \begin{equation} \dot{S}_{\rm tot} = \dot{S}_{\rm S} + \dot{S}_{\rm NM} \geq 0. \label{eq:Stot} \end{equation} \emph{Dynamics.} Unlike a general delay system, which can exhibit over-damped, damped oscillatory, but also diverging behavior~\cite{Frank2003, McKetterick2014, Geiss2019, dissertation_of_Sarah, Atay2010, Lakshmanan2011}, systems obeying the mapping of Sec.~\ref{sec:mapping} always eventually relax into a time-independent steady state for time independent parameters, confining potential $U$, and stationary non-potential forces $F_{\rm N}$. If the latter vanishes in Eq.~\eqref{eq:ExternalForce}, the stationary probability density function (PDF) for position and velocity is given by the Gibbs canonical distribution, $p(x,v;T) = p_x(x;{T})p_v(v;{T})$, with \begin{eqnarray} p_x(x;{T}) &=& \exp[-U(x)/{T}]/Z_x({T}), \label{eq:px}\\ p_v(v;T) &=& \exp(- m v^2/(2{T}))/Z_v({T}), \label{eq:pv} \end{eqnarray} normalized by $Z_x({T}) = \int_{-\infty}^{\infty} dx\, \exp(-U(x)/{T})$ and $Z_v({T}) = \int_{-\infty}^{\infty} dv\, \exp(- m v^2/(2{T}))$. This is an equilibrium steady state and thus the corresponding entropy production rates $\dot{S}_{\rm S}$, $\dot{S}_{\rm NM}$, and $\dot{S}_{\rm tot}$ vanish. For quasi-static variations of the potential, when the system PDF evolves through a set of such states, the total entropy change $\Delta S_{\rm tot} = \int_0^t \dot{S}_{\rm tot}(t') dt'$ vanishes and the entropy change in the system, $\Delta S_{\rm S}$, is exactly balanced by the entropy change in the bath, $\Delta S_{\rm NM}$. \textcolor{black}{The relaxation process to equilibrium is always accompanied by a decrease in the free energy of the system. This functional thus represents the Lyapunov function for the relaxation process that can be easily evaluated from stochastic trajectories of the system. Even stronger restrictions on the relaxation dynamics are imposed by the Evans--Searles fluctuation theorem~\cite{Evans2009,evans2016}. In contrast, besides a limited success~\cite{Maes2011}, it is currently unknown if similar general restrictions also apply to relaxation towards non-equilibrium steady states.} The validity of these results for an arbitrary potential $U(x)$ follows from general considerations of equilibrium statistical physics~\cite{callen1985} and the FDR~\cite{Kubo1966,Felderhof1978,Zwanzig2001,Kubo2012}. However, a closed dynamical equation, e.g., of Fokker-Planck type~\cite{Risken,vanKampen}, for the PDF of a nonlinear delay process is not known~\cite{dissertation_of_Sarah} making a general direct verification difficult. In Sec.~\ref{sec:discussionA}, we provide an explicit test for the specific potential $U(x,t) = k_6 x^6/6 + k_3 x^3/3$ using Brownian dynamics (BD) simulations of Eqs.~\eqref{eq:tde2x} and \eqref{eq:tde2v}. Besides, we tested the described results for various other polynomial potentials. We stress that the described equilibrium-like properties of equilibrium delay processes do not trivialize their dynamics. \textcolor{black}{As an example, consider a situation when the force $F$ in Eq.~\eqref{eq:tde2v} is linear in $x$ and $v$ and thus the system \eqref{eq:tde2x}-\eqref{eq:tde2v} is exactly solvable. For fixed initial conditions, one finds that the average position $\langle x(t) \rangle$ and velocity $\langle v(t) \rangle$ are identical for equilibrium ($\eta_{\rm FB}$ in Tab.~\ref{tab:interpretations} determined by the conditions~\eqref{eq:FDTGen} and \eqref{eq:PowerSpectrumGen}) and standard ($\eta_{\rm FB}=0$) delay processes. The four correlation functions $\langle A(t)B(0) \rangle$ for $A,B = x,v$ may then merely differ in the stationary distribution of the initial conditions.} \emph{Fluctuation theorems.} From a stochastic-thermodynamics perspective, it is interesting to also consider a finite-speed protocol rendering the potential time-dependent. Specifically, in Sec.~\ref{sec:discussionA}, we test two fluctuation theorems for the stochastic work $w = \int_0^t \partial U(x,t')/\partial t'\, dt'$ done on the system, if $k_6 = k_6(t')$, $t' \in (0,t)$ is varied non-quasi-statically, namely the Jarzynski equality~\cite{Jarzynski1997} \begin{equation} \left< \exp(- w/{T})\right> = \exp(- \Delta F/{T}) \label{eq:Jarzynski} \end{equation} and the Crooks' fluctuation theorem~\cite{Crooks1999} \begin{equation} \rho_{\rm F}(w)/\rho_{\rm R}(-w) = \exp[(w - \Delta F)/{T}]. \label{eq:Crooks} \end{equation} Here, $\Delta F$ is the free energy difference between equilibrium states corresponding to the final and initial values of the potential, $\rho_{\rm F}$ is the probability distribution for work measured along the process when the potential changes from $U(x,0)$ to $U(x,t)$, and $\rho_{\rm R}$ is the probability distribution for work measured along the time-reversed process. For the both fluctuation theorems, the forward process departs from equilibrium. The validity of Jarzynski's equality requires the existence of initial and final Gibbs stationary states and Crooks' fluctuation theorem additionally requires the FDR and Gaussianity of the noise~\cite{Speck2007}. The described processes fulfill all these requirements and, indeed, our simulations confirm Eqs.~\eqref{eq:Jarzynski} and \eqref{eq:Crooks}. \emph{Perturbative expansions.} Even though based on an ad hoc choice of the noise our results represent first exact analytical solutions to \textcolor{black}{stationary PDFs for} a nonlinear SDDE. As such, they might pave the way for studying steady states and thermodynamic properties of systems controlled by more general nonlinear SDDEs. We show in Sec.~\ref{sec:response} that linear-response theory~\cite{Zwanzig2001} can be used to calculate time-dependent averages in perturbed (nonlinear) equilibrium delay systems. Besides such classical linear response, one can derive some explicit approximate formulas for specific perturbations on the level of moments calculated directly from the nonlinear system of SDDEs \eqref{eq:tde2x} and \eqref{eq:tde2v}. \subsection{Equilibrium feedback (Tab.~\ref{tab:interpretations}C)} \label{sec:EFB} The formal interpretation of dynamical equations~\eqref{eq:tde2x}--\eqref{eq:tde2v} as a model for a system immersed in a non-Markovian equilibrium bath and driven by a time-local force $F_{\rm E}$, in Sec.~\ref{sec:mapping}, allowed us to utilize a wealth of known results. However, in practice, these equations usually describe feedback-driven systems in contact with a Markovian heat bath exerting a memoryless friction $-\gamma_0 v$ and Gaussian white noise $\sqrt{2 T_0\gamma_0 }\xi(t)$ with $\left<\xi(t)\xi(t')\right> = \delta(t-t')$. \textcolor{black}{Usually the system's environment provides such a bath.} To investigate this ``more natural'' interpretation, we rewrite the dynamical equation for the velocity as \begin{equation} m\dot{v}(t) = F_{\rm E}(x,v,t) + F_{\rm FB} - \gamma_0 v(t) + \sqrt{2T_0\gamma_0}\xi(t) \label{eq:tde2vF} \end{equation} and interpret it as describing a system immersed in a \textcolor{black}{standard, i.e., Gaussian and Markovian, heat bath at temperature $T_0$. This system is controlled by the time-local force $F_{\rm E}$ and the feedback force} \begin{equation} F_{\rm FB} = \kappa_\tau[ x(t) - x(t-\tau) ] - \gamma_\tau v(t-\tau) + \eta_{\rm FB}(t) \label{eq:FBforce} \end{equation} composed of the systematic delayed component $F_{\rm F}$ and the ``feedback'' noise $\eta_{\rm FB}(t) \equiv \eta(t) - \sqrt{2T_0\gamma_0}\xi(t)$, see Tab.~\ref{tab:interpretations}C. Given that the conditions \eqref{eq:FDTGen} and \eqref{eq:PowerSpectrumGen} are fulfilled, we call this process an equilibrium feedback (EFB) process. Importantly, the formal results concerning the system dynamics, i.e. the stationary PDFs~\eqref{eq:px} and \eqref{eq:pv}, are valid regardless of the interpretation, and thus they apply also for EFB. This means that the EFB is ideal from the point of view of passivity-based control~\cite{Ortega2013}, which is a branch of control theory that aims to balance the power delivered into the system with its dissipation. \textcolor{black}{Generic feedback can lead to divergences and instabilities when the energy influx by the feedback gradually increases the internal energy of the system. However, EFB processes are always stable and passive in the sense that the resulting steady states are robust against perturbations and all the energy injected into the system is dissipated.} In~\ref{appx:feedback_cooling}, we moreover show that, under realistic conditions, the temperature $T$ corresponding to the Boltzmann PDF reached by the EFB is always larger than the ambient temperature $T_0$. The thermodynamics of EFB has to be treated with care. In particular, the total entropy production is interpretation-dependent. But the stochastic work done on the system by varying the potential remains the same, and the fluctuation theorems~\eqref{eq:Jarzynski} and \eqref{eq:Crooks} are still valid. Differences arise in the definitions of the remaining thermodynamic fluxes. With the present definition of the heat bath, the heat flux reads $\dot{Q}_{\rm M} = \langle (- \gamma_0 v + \sqrt{2T_0\gamma_0}\xi) \dot{x} \rangle$. And, in addition to the average power $\dot{W}_{\rm E}$ delivered to the system by the potential and non-potential force\blue{s}, one has to consider also the power $\dot{W}_{\rm FB} = \langle F_{\rm FB} \dot{x} \rangle$ associated with the feedback force $F_{\rm FB}$. In a conventional feedback process, this power is accompanied by an information influx~\cite{Munakata2014,Rosinberg2015,Rosinberg2017,Loos2019} that, for example, allows the feedback to cool the system~\cite{Bushev2006,Goldwater2019}. \textcolor{black}{The resulting (effective) temperature of the system is then smaller than the temperature of the ambient bath, implying a positive heat flux from the bath into the system, $\dot{Q}_{\rm M} > 0$. In a steady state, the conventional feedback is thus able to cool the ambient bath by extracting the power $-\dot{W}_{\rm FB} = \dot{Q}_{\rm M} > 0$ from it. However,} for an arbitrary force $F_{\rm E}$, the second law~\eqref{eq:Stot} together with the relation $\dot{Q}_{\rm NM} = \dot{Q}_{\rm M} + \dot{W}_{\rm FB} = - T \dot{S}_{\rm NM}$ imposes an upper bound $\dot{Q}_{\rm M} \le T \dot{S}_{\rm S} - \dot{W}_{\rm FB}$ on the heat delivered from the bath to the system via the EFB. And, in~\ref{appx:feedback_cooling}, we show that under equilibrium conditions, $\partial U/\partial t = F_{\rm N} = \dot{S}_{\rm S} =0$, \textcolor{black}{the EFB brings the system to an effective temperature, $T$, larger than the ambient temperature, $T_0$. Hence, the heat flux $\dot{Q}_{\rm M}$ is always negative, the EFB performs net work on the system, $\dot{W}_{\rm FB} = - \dot{Q}_{\rm M} > 0$, and it eventually heats the ambient bath.} This means that the EFB cannot be used for standard (zero non-potential force and time-independent potential) feedback cooling of the system~\cite{Bushev2006,Goldwater2019} Sections~\ref{sec:PF} and~\ref{sec:VF} clarify when EFB can be realized with time-delayed forces depending on either the earlier position or velocity\textcolor{black}{, i.e., when the corresponding feedback noise $\eta_{\rm FB}$ in Tab.~\ref{tab:interpretations}C can be constrained to be real valued}. The technical details are given in~\ref{appx:noises_in_reality}. The resulting parameter regimes where the EFB can be realized in these two situations are depicted in phase diagrams (Figs.~\ref{fig:PDx} and \ref{fig:PD}). Equilibrium feedback with time-delayed forces depending on both delayed position and velocity can be investigated in a similar manner, but the corresponding phase diagram becomes three-dimensional. In Sec.~\ref{sec:discussionA}, we verify the validity of our theoretical results by a Brownian dynamics (BD) simulation of the equilibrium velocity feedback. In Sec.~\ref{sec:response}, we discuss several perturbative expansions pushing the theory beyond the parameter regime of the equilibrium delay processes. We conclude in Sec.~\ref{sec:conclusion}. \section{Equilibrium position feedback} \label{sec:PF} Let us now consider the situation of the position-dependent feedback force ($\gamma_\tau = 0$ in Eq.~\eqref{eq:FBforce}) \begin{equation} F_{\rm FB} = \kappa_\tau[ x(t) - x(t-\tau) ] + \eta_{\rm FB}(t) = F_{\rm F} + \gamma_0 v(t) + \eta_{\rm FB}(t). \label{eq:FBforceX} \end{equation} The generalized friction force $ F_{\rm F} = \kappa_\tau[x(t) - x(t - \tau)] - \gamma_0 v(t) $ can be written using the friction kernel \begin{equation} \Gamma(t) = \left[2\gamma_0 \delta(t) - \kappa_\tau \Theta(\tau - t)\right]\Theta(t), \label{eq:Gammaxv} \end{equation} where $\Theta(.)$ denotes the Heaviside step function. This result can be verified by direct substitution into Eq.~\eqref{eq:friction_kernel} and integrating the term including velocity $v(t) = \dot{x}(t)$ by parts, cf. Eq.~(9.14) in~Ref.~\cite{dissertation_of_Sarah}. The conditions~\eqref{eq:FDTGen} and \eqref{eq:PowerSpectrumGen} on the EFB imply that the friction kernel~\eqref{eq:Gammaxv} and the total noise $\eta(t) = \eta_{\rm FB}(t)+\sqrt{2T_0\gamma_0}\xi(t)$ (see Tab.~\ref{tab:interpretations}A) must obey the FDR, \begin{equation} \left<\eta(t)\eta(t')\right>/{T} = 2 \gamma_0\delta(t-t') - {\kappa}_\tau \Theta(\tau - |t-t'|), \label{eq:noiseTCFxv} \end{equation} and that the corresponding power spectrum must be non-negative, \begin{equation} S(\omega) = 2\left[{\gamma}_0 - {\kappa}_\tau\tau \frac{\sin (\omega\tau)}{\omega\tau}\right] \ge 0. \label{eq:PSx} \end{equation} Using $\max[\sin(x)/x] = 1$ and $\min[\sin(x)/x] \approx -0.22$, this implies the inequalities \begin{equation} 0 \le \max({\kappa}_\tau, -0.22 {\kappa}_\tau) \tau \le {\gamma}_0, \label{eq:inequality_x} \end{equation} which specify the parameter regime where the noise $\eta(t)$ satisfying the FDR~\eqref{eq:noiseTCFxv} can actually be realized in the lab (for details of noise realization, see~\ref{appx:noises_in_reality}). The inequalities require non-negative $\gamma_0$ which is always fulfilled in the EFB interpretation, where $\gamma_0$ measures the strength of the background friction. For $\gamma_0\ge0$, the inequalities~\eqref{eq:inequality_x} bounds the feedback strength ${\kappa}_\tau$ as $-\gamma_0/0.22 \le {\kappa}_\tau \le \gamma_0$. \begin{figure}[t!] \centering \begin{tikzpicture} \node (img1) {\includegraphics[width=0.6 \columnwidth]{PDx.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-6.2cm,xshift=2.2cm,text width=3cm] {\bf Stable,\\ standard FDR}; \node[above=of img1, node distance=0.0cm, yshift=-8.7cm,xshift=-0.3cm,text width=3cm] {\bf \phantom{+}Stable,\\ no standard FDR}; \node[above=of img1, node distance=0.0cm, yshift=-3.8cm,xshift=-1.2cm, white] {\bf Unstable}; \end{tikzpicture} \caption{Phase diagram of the position feedback in the reduced variables $\tilde{\kappa}_\tau = \kappa_\tau/m$ and $\tilde{\gamma}_0 = \gamma_0/m$. In the FDR region, $\tilde{\gamma}_0 \ge \max(\tilde{\kappa}_\tau, -0.22 \tilde{\kappa}_\tau) \tau$ and the system has a positive relaxation time $t_R$. Then the system is stable for arbitrary delay and it is possible to drive it by an equilibrium position feedback. In the no-FDR region, $\tilde{\gamma}_0 < \max(\tilde{\kappa}_\tau, -0.22 \tilde{\kappa}_\tau) \tau$ and $t_{\rm R} > 0$, the system reaches a stable steady state, but the equilibrium position feedback cannot be realized in practice. In the unstable region ($t_{\rm R} < 0$), the velocity exhibits exponentially diverging oscillations \textcolor{black}{due to large time delays and thus no steady state exists. For $\tau=0$, the process is stable.}} \label{fig:PDx} \end{figure} Under these conditions, the equilibrium position feedback fulfills all the properties described in Sec.~\ref{sec:results}. \textcolor{black}{In particular it eventually yields the stable equilibrium distribution~\eqref{eq:px} and \eqref{eq:pv} whenever $\partial U/\partial t = F_{\rm N} = 0$. However, the time delay in a general feedback may yield diverging trajectories for certain parameter values. As an independent check that the parameter regime~\eqref{eq:inequality_x} allowing for equilibrium position feedback always leads to stable stationary solutions, we investigate the overall stability of position feedback described by Eqs.~\eqref{eq:tde2vF} and \eqref{eq:FBforceX} for the case $F_{\rm E} = 0$, which can be inspected analytically.} Specifically, the process~\eqref{eq:tde2vF} eventually reaches a stable steady state if all the corresponding relaxation times, $t_{\rm R}$, are positive. To calculate them, we substitute the feedback force~\eqref{eq:FBforceX}, $F_{\rm E} = 0$ , and $v = \dot{x}$ in Eq.~\eqref{eq:tde2vF}, set $\eta(t) = 0$, and solve the resulting equation using the exponential ansatz $x = \exp(-\lambda t/\tau)$~\footnote{One can analogously treat systems with a potential $U$, by linearising it around a (local) minimum and absorbing the resulting linear time-local force into $\kappa_\tau$.}. The obtained transcendental equation \begin{equation} m\lambda^2 = \gamma_0\tau \lambda - \kappa_\tau \tau^2 \left[\exp(\lambda) - 1 \right] \label{eq:lambda} \end{equation} can in general only be solved numerically and has infinitely many solutions. As the relaxation time of the system, $t_{\rm R}$, we identify the smallest $\tau/\Re[ \lambda]$ solving Eq.~\eqref{eq:lambda}, where $\Re[\bullet]$ denotes the real part. The system eventually relaxes into a stable steady state with $\langle v(t) \rangle=0$ if $t_{\rm R} > 0$. An approximate explicit solution to Eq.~\eqref{eq:lambda} can be obtained in the limit of small delay. Expanding the friction $F_{\rm F}$ in Eq.~\eqref{eq:FBforceX} up to the first order in $\tau$, we get \begin{equation} m\dot{v}(t) \approx - (\gamma_0 - \kappa_\tau \tau) v(t) + \sqrt{2T_0\gamma_0}\xi(t). \label{eq:approx_stable_v} \end{equation} The last two terms can be interpreted as a noise and friction from an equilibrium bath with friction coefficient $\gamma_0 - \kappa_\tau \tau$, \textcolor{black}{which yields stable dynamics where all the energy injected into the system by the feedback is dissipated (passive dynamics) if} \begin{equation}\label{eq:approx_stable_v_cond} \kappa_\tau \tau \leq \gamma_0. \end{equation} The conditions for the general case are depicted in Fig.~\ref{fig:PDx}. Indeed, the whole parameter regime where the EFB can be defined according to the FDR~\eqref{eq:noiseTCFxv} (green) is found to be stable. This shows that, as expected, EFB is passive and stable. Nevertheless, the regime of stability, $t_{\rm R}>0$, is broader (orange). Noteworthy, the system can be stable even for $\gamma_0<0$ if the feedback strength $\kappa_\tau$ is also sufficiently negative. This could have been anticipated from the approximate condition for stability~\eqref{eq:approx_stable_v_cond}, which predicts the boundary between stable and unstable regimes for $\tilde{\gamma}_0\tau \gtrapprox -2$ remarkably well. The approximate dynamics allows to define an effective FDR with an effective temperature $T_{\rm eff} = T_0/(1-\kappa_\tau \tau/\gamma_0)$. However, beyond the small delay approximation, the existence of such effective FDR is not guaranteed. For smaller values of $\tilde{\gamma}_0$, higher order terms in the delay make the system more unstable than expected from the linear analysis. In the unstable regime (blue), the mean velocity exhibits exponentially increasing oscillations~\cite{McKetterick2014,Geiss2019}. \section{Equilibrium velocity feedback} \label{sec:VF} Next, we perform the same analysis as in the previous section for the velocity-dependent feedback force ($\kappa_\tau = 0$ in Eq.~\eqref{eq:FBforce}) \begin{equation} F_{\rm FB} = - \gamma_\tau v(t-\tau) + \eta_{\rm FB} = F_{\rm F} + \gamma_0 v(t) + \eta_{\rm FB}. \label{eq:FBforceV} \end{equation} The friction $F_{\rm F} = -\gamma_\tau v(t-\tau) - \gamma_0 v(t)$ now corresponds to the friction kernel \begin{equation} \Gamma(t) = \left[2\gamma_0 \delta(t) + \gamma_\tau \delta(t-\tau)\right]\Theta(t). \label{eq:FK} \end{equation} in Eq.~\eqref{eq:friction_kernel}. The FDR relation~\eqref{eq:FDTGen} for the total noise $\eta(t)= \eta_{\rm FB}(t)+\sqrt{2T_0\gamma_0}\xi(t)$ (see Tab.~\ref{tab:interpretations}A) now reads \begin{equation} \left<\eta(t)\eta(t')\right>/{T} = 2\gamma_0\delta(t-t') + \gamma_\tau \delta(|t-t'|-\tau), \label{eq:noiseTCFv} \end{equation} and thus the condition following from the positivity of the power spectrum \eqref{eq:PowerSpectrumGen} reads \begin{equation} S(\omega) = 2\left[\gamma_0 + \gamma_\tau \cos(\omega\tau)\right] \ge 0. \label{eq:PSv} \end{equation} The equilibrium velocity feedback thus can be realized if the inequality \begin{equation} 0 \le |\gamma_\tau| \le \gamma_0, \label{eq:inequalities_gamma} \end{equation} holds (for detail of the realization, see~\ref{appx:noises_in_reality}). As we have seen for the equilibrium position feedback, $\gamma_0$ must be non-negative, which is fulfilled in the EFB interpretation. For ${\gamma}_0 \ge 0$, the inequalities~\eqref{eq:inequalities_gamma} impose that the amplitude $\gamma_\tau$ of the delayed component of the friction can not exceed that of the Markov component. Different from the corresponding inequality for $\kappa_\tau$ in the position feedback, this condition is now symmetric with respect to $\gamma_\tau = 0$. Similarly as in the case of the position feedback, we inspect the region of stability of the general linear velocity feedback for $F_{\rm E} = 0$ and compare it to the region~\eqref{eq:inequalities_gamma} allowing to realize the stable equilibrium feedback. To this end, we insert the feedback force \eqref{eq:FBforceV} and $F_{\rm E} = 0$ in Eq.~\eqref{eq:tde2vF}, set $\eta(t) = 0$, and solve the resulting equation using the exponential ansatz $v(t) = \exp(-t/t_{\rm R} + i\omega t)$, with real parameters $t_{\rm R}$ and $\omega$. Solving the resulting algebraic equation for the relaxation time $t_{\rm R}$, we find \begin{equation} t_{\rm R} = \frac{\tau}{\Re\left(\tilde{\gamma}_0 \tau - {\rm W}\left[-\tilde{\gamma}_\tau \tau \exp(\tilde{\gamma}_0 \tau)\right]\right)}, \label{eq:relax_time0} \end{equation} where ${\rm W}[.]$ stands for the Lambert ${\rm W}$ function, $\Re(.)$ denotes the real part, and $\tilde{\gamma}_0 = \gamma_0/m$ and $\tilde{\gamma}_\tau = \gamma_\tau/m$. The Lambert ${\rm W}$ function is a multivalued function and, in order to assess stability of the system, we numerically determine the smallest $t_{\rm R}$ resulting from Eq.~\eqref{eq:relax_time0}. In this case, the small-delay expansion of the friction $F_{\rm F}$ in Eq.~\eqref{eq:FBforceV} yields \begin{equation} m\dot{v}(t) \approx - (\gamma_0 + \gamma_\tau) v(t) + \gamma_\tau \tau \dot{v}(t) + \sqrt{2T_0\gamma_0}\,\xi(t) \label{eq:smallTauv} \end{equation} and thus it suggest that the system will be stable for $\gamma_\tau > - \gamma_0$ (positive effective friction coefficient) and $\gamma_\tau \tau/m < 1$ (positive effective mass). It also allows to define an effective FDR with an effective temperature $T_{\rm eff} = T_0/(1+\gamma_\tau/\gamma_0)$ valid for small delays. These formulas correctly yield the bottom boundary between the unstable and stable regions in the phase diagram generated using the exact conditions \eqref{eq:inequalities_gamma} and \eqref{eq:relax_time0} depicted in Fig.~\ref{fig:PD}. As for the position feedback, the region where the FDR~\eqref{eq:noiseTCFxv} and thus the equilibrium velocity feedback can be defined (green) is indeed stable. And the regime of stability, $t_{\rm R}>0$, is broader than the FDR regime and still extends to region of negative friction coefficients $\gamma_0<0$ (orange). In the unstable regime (blue), the mean velocity again exhibits exponentially increasing oscillations~\cite{McKetterick2014,Geiss2019}. \begin{figure}[t!] \centering \begin{tikzpicture} \node (img1) {\includegraphics[width=0.6\columnwidth]{PD.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-6.2cm,xshift=2.9cm,text width=3cm] {\bf Stable,\\ standard\\ FDR}; \node[above=of img1, node distance=0.0cm, yshift=-3.2cm,xshift=2.3cm, rotate=45,text width=5cm] {\bf Stable,\\ no standard FDR}; \node[above=of img1, node distance=0.0cm, yshift=-6.7cm,xshift=-1.3cm,white] {\bf Unstable}; \end{tikzpicture} \caption{Phase diagram of the velocity feedback in the reduced variables $\tilde{\gamma}_0 = \gamma_0/m$ and $\tilde{\gamma}_\tau = \gamma_\tau/m$. In the FDR region, $0 \le |\gamma_\tau| \le \gamma_0$ and the system has a positive relaxation time $t_R$. Then the system is stable for arbitrary delay and it is possible to drive it by an equilibrium velocity feedback (EFB). In the no-FDR region, $\gamma_0 \le |\gamma_\tau|$ and $t_{\rm R} > 0$, the system reaches a stable steady state but the EFB cannot be realized in practice. In the unstable region ($t_{\rm R} < 0$), the velocity exhibits exponentially diverging oscillations \textcolor{black}{due to large time delays} and thus no steady state exists.} \label{fig:PD} \end{figure} \section{Demonstration of equilibrium velocity feedback} \label{sec:discussionA} Let us now discuss a specific realization of the equilibrium velocity feedback and show that it indeed has all the properties described in Sec.~\ref{sec:results}. As detailed in~\ref{appx:noises_in_reality} a possible (parsimonious) form of the total noise $\eta(t) = \eta_{\rm FB}(t)+\sqrt{2T_0\gamma_0}\xi(t)$, which fulfills the FDR~\eqref{eq:noiseTCFv} for equilibrium velocity feedback, is obtained by setting $\eta_{\rm FB}(t) = \sqrt{\alpha_\tau} \xi (t-\tau)$. The parameters of the corresponding feedback force $F_{\rm FB}(t)$ \eqref{eq:FBforceV}, \begin{equation} F_{\rm FB}(t) = -\gamma_\tau v(t-\tau) + \sqrt{\alpha_\tau} \xi(t-\tau), \label{eq:GF} \end{equation} can be tuned to represent various equilibrium velocity delay process. As a benchmark for the EFB, we consider three processes distinguished by values of the coefficients $\gamma_\tau$ and $\alpha_\tau$ above: (i) equilibrium process (EQ) with $\gamma_\tau = \alpha_\tau = 0$ and thus $F_{\rm FB}(t) = 0$; (ii) non-equilibrium (generic) velocity feedback (NEFB) with $\gamma_\tau > 0$ and $\alpha_\tau = 0$ and thus $F_{\rm FB}(t) = -\gamma_\tau v(t-\tau)$; and (iii) equilibrium velocity feedback (EFB) with $\gamma_0 \ge \gamma_\tau > 0$ and $\alpha_\tau > 0$ obeying Eq.~\eqref{eq:alpha0}. The last condition is compatible with an equilibrium state at arbitrary temperature $T>T_0$, if we set \begin{eqnarray} \alpha_\tau &=& 2\gamma_0 \left(T-T_0\right), \label{eq:alphatau}\\ \gamma_\tau &=& \pm 2\gamma_0\sqrt{\frac{ T_0}{T}}\sqrt{1 - \frac{T_0}{T} } , \end{eqnarray} where $T_0/T \le 1$. Thus, in agreement with the discussion in~\ref{appx:feedback_cooling}, the additional noise present in the EFB always agitates or ``heats'' the system above the ambient temperature $T_0$. Note that the above expressions do not depend on the delay $\tau$. \subsection{Dynamics} \label{sec:performanceEVF} To gain intuition concerning the behavior of the equilibrium velocity feedback process, we now consider the specific system obeying Eqs.~\eqref{eq:tde2x} and \eqref{eq:tde2vF} with the feedback force~\eqref{eq:GF} and the force $F_{\rm E} = -\partial U/\partial x$ induced by the potential \begin{equation} U(x) = \frac{k_6}{6}x^6 + \frac{k_3}{3}x^3. \label{eq:Unonl} \end{equation} We solve the dynamical equations using BD simulations for the NEFB, EFB and EQ described above. In all our illustrations, we use $1/\tilde{\gamma}_0$ as our time unit and $\sqrt{T_0/m}$ as our length unit. Velocity is thus measured in units of $\tilde{\gamma}_0\sqrt{T_0/m}$. We show results from BD simulations for the two parameter sets $(\tilde{\gamma}_0 \tau,\tilde{\gamma}_\tau \tau) \approx (0.28,0.28)$ and $(\tilde{\gamma}_0 \tau,\tilde{\gamma}_\tau \tau) \approx (0.42,0.24)$. The first one yields fast relaxation of both feedback processes for $U = 0$. The second one is optimised to provide small velocity variance for EFB for $U=0$. For more details, see~\ref{appx:parameterChoice}. \begin{figure}[t!] \centering \begin{tikzpicture} \node (img1) {\includegraphics[width=0.52\columnwidth]{pxTime.eps}}; \node[right=of img1, node distance=0.0cm, yshift=0cm,xshift=-1.6cm] (img2) {\includegraphics[width=0.52\columnwidth]{pvTime.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-1.9cm,xshift=-2.2cm] {(a)}; \node[above=of img2, node distance=0.0cm, yshift=-1.9cm,xshift=-2.2cm] {(b)}; \end{tikzpicture} \caption{Stationary PDFs for $x$ (a) and $v$ (b) for the potential~\eqref{eq:Unonl} with $k_6=k_3=1$ in the parameter regime $\tau \approx 0.28$, $\tilde{\gamma}_\tau\tau \approx 0.28$ (optimized for relaxation times of feedback processes with $U=0$, see~\ref{appx:parameterChoice}). The data for the equilibrium process (EQ) and equilibrium velocity feedback (EFB) perfectly agree with the corresponding Boltzmann PDFs~\eqref{eq:px} and \eqref{eq:pv}. Concerning the PDFs for generic velocity feedback (NEFB), no exact analytical formula for the shown PDFs is known. For all figures, simulation data was obtained from 50000 trajectories of length 10 with time-step 0.001.} \label{fig:PdfT} \end{figure} \begin{figure}[t!] \begin{tikzpicture} \node (img1) {\includegraphics[width=0.52\columnwidth]{pxVarTime.eps}}; \node[right=of img1, node distance=0.0cm, yshift=0cm,xshift=-1.6cm] (img2) {\includegraphics[width=0.52\columnwidth]{pvVarTime.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-1.9cm,xshift=-2.2cm] {(a)}; \node[above=of img2, node distance=0.0cm, yshift=-1.9cm,xshift=-2.2cm] {(b)}; \end{tikzpicture} \caption{The same as in Fig.~\ref{fig:PdfT} in the parameter regime $\tau \approx 0.42$, $\tilde{\gamma}_\tau \tau \approx 0.24$ (optimized for velocity variance of EFB, see~\ref{appx:parameterChoice}). Other parameters are the same as in Fig.~\ref{fig:PdfT}. The insets magnify the regions around the global maxima of the PDFs. The data for the equilibrium process (EQ) and equilibrium velocity feedback (EFB) again perfectly agree with the corresponding Boltzmann PDFs~\eqref{eq:px} and \eqref{eq:pv}. } \label{fig:PdfTVar} \end{figure} \begin{figure}[t!] \begin{tikzpicture} \node (img1) {\includegraphics[width=1.0\columnwidth]{xxxvvv.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-1.9cm,xshift=-0.7cm] {(a)}; \node[above=of img1, node distance=0.0cm, yshift=-3.35cm,xshift=6.8cm] {(b)}; \node[above=of img1, node distance=0.0cm, yshift=-4.65cm,xshift=-0.7cm] {(c)}; \node[above=of img1, node distance=0.0cm, yshift=-6.15cm,xshift=6.8cm] {(d)}; \node[above=of img1, node distance=0.0cm, yshift=-8.20cm,xshift=-0.7cm] {(e)}; \node[above=of img1, node distance=0.0cm, yshift=-9.65cm,xshift=6.8cm] {(f)}; \node[above=of img1, node distance=0.0cm, yshift=-10.90cm,xshift=-0.7cm] {(g)}; \node[above=of img1, node distance=0.0cm, yshift=-12.55cm,xshift=6.8cm] {(h)}; \end{tikzpicture} \caption{Relaxation dynamics of first two central moments of velocity and position for NEFB, EFB and EQ processes departing (with certainty) from the initial condition $x=0$, $v=1$ for $t \le 0$. In (a-d) we show results for parameters used in Fig.~\eqref{fig:PdfT} and in (e-h) for those used in Fig.~\eqref{fig:PdfTVar}. The horizontal lines depict stationary values of the shown moments obtained analytically using the Boltzmann distributions \eqref{eq:px} and \eqref{eq:pv} in Figs.~\ref{fig:PdfT} and \ref{fig:PdfTVar}.} \label{fig:NonlinearCase} \end{figure} In Figs.~\ref{fig:PdfT} and \ref{fig:PdfTVar} we show the stationary PDFs for $x$ and $v$ obtained for the first and second parameter set, respectively. In both figures, the simulated PDFs for EQ and EFB perfectly overlap with the corresponding analytical Boltzmann PDFs~\eqref{eq:px} and \eqref{eq:pv} providing numerical evidence for our claims in Sec.~\ref{sec:results}. As expected, the position and velocity fluctuations are always smallest for the NEFB and largest for the EFB. To compare the relaxation dynamics of the three processes, we show in Fig.~\ref{fig:NonlinearCase} the corresponding mean values $\left<x\right>$ and $\left<v\right>$ and variances $\sigma_x^2$ and $\sigma_v^2$ as functions of time for the initial condition $(v,x)=(1,0)$ for $t \le 0$. Interestingly, the first moments corresponding to the EFB (solid yellow line) relax faster than those for the NEFB (dot-dashed blue line) and much faster than those for the EQ process (broken green line). This is clearly a nonlinear effect because, for $U = 0$, the EFB and NEFB share the relaxation time~\eqref{eq:relax_time0}. Especially for the EFB the relaxation is considerably faster for the first parameter set [panels (a)-(d)] than for the second choice [panels (e)-(h)]. This suggests that at least some intuition gained from the linear regime $U = 0$ also applies to the nonlinear dynamics. In accord with Figs.~\ref{fig:PDx} and \ref{fig:PD}, the position and velocity fluctuations are always smallest for the NEFB and largest for the EFB. Smaller velocity but also position variance for the EFB is obtained for the second parameter set. For the NEFB we were not able to analytically predict both the time evolution of the depicted variables and their asymptotic values. To solve the full transient dynamics for the EQ and EFB is also a difficult problem. However, Fig.~\ref{fig:NonlinearCase} shows that the moments in question converge to the values calculated from the corresponding Boltzmann distributions \eqref{eq:px} and \eqref{eq:pv} with temperatures ${T}_0$ (EQ) and ${T}>{T}_0$ (NEQ), which provides further numerical evidence for our claims in Sec.~\ref{sec:results}. \subsection{Heat flux} \begin{figure}[t!] \centering \includegraphics[width=0.6\columnwidth]{dq.eps} \caption{Heat fluxes $\dot{Q}_{\rm M}$ from the (proper) Markovian bath into the system for NEFB, EFB, and EQ processes discussed in Fig.~\ref{fig:PdfTVar} (e) -- (h). \textcolor{black}{The horizontal lines depict the stationary values of the corresponding heat fluxes. For the EQ process, the stationary value is 0. For the EFB process, it is given by Eq.~\eqref{eq:dotQr}. For the NEFB, we have no universally valid prediction for the stationary value of $\dot{Q}_{\rm M}$. However, the small-$\tau$ expansion~\eqref{eq:smallTauv} leads to $T_{\rm eff} < T_0$ and thus it suggests a positive value of $\dot{Q}_{\rm M}$.}} \label{fig:dq} \end{figure} Let us now investigate the heat flux $\dot{Q}_{\rm M} = \left< (- \gamma_0 v + \sqrt{2T_0\gamma_0}\xi) \dot{x} \right>$ from the ``proper'' Markovian bath into the system due to the feedback, see Tab.~\ref{tab:interpretations}C and Sec.~\ref{sec:EFB}. In~\ref{appx:feedback_cooling}, we show that for a general EFB with a positive delay time $\tau$ the heat flux always reads \begin{equation} \dot{Q}_{\rm M}^{\rm EFB} = \gamma_0 \left( (\sigma_v^{\rm EQ})^2 - (\sigma_v^{\rm EFB})^2\right) = \frac{2\gamma_0}{m }\left({T}_0-{T}\right) < 0. \label{eq:dotQr} \end{equation} The EFB thus always performs work on the system, which is eventually dissipated in the bath. Figure~\ref{fig:dq} displays how the heat flux in the system evolves during the relaxation processes for EQ, EFB and NEFB discussed in Fig.~\ref{fig:NonlinearCase} (e)--(h). After the initial transient period, the heat flux for EFB converges to the negative value given by Eq.~\eqref{eq:dotQr} and thus it heats both the system, as the corresponding stationary variances are larger than for the EQ process, and the proper bath. For EQ, the stationary heat flux is zero as imposed by the second law. For NEFB, the heat flux converges to a positive value. Thus the NEFB cools the system while absorbing heat from the proper bath. The result~\eqref{eq:dotQr} applies for arbitrarily small positive delay $\tau$. The specific form of the feedback force~\eqref{eq:GF} allows us to also inspect what happens for vanishing delay. Then the system is still in the Boltzmann equilibrium state~\eqref{eq:px}--\eqref{eq:pv} with temperature ${T}$. However, the corresponding total noise $\eta(t) = (\sqrt{2\gamma_0{T}_0} + \sqrt{\alpha_\tau}) \xi(t)$ and friction $F_{\rm F} = -(\gamma_0 +\gamma_\tau)v(t)$ can now be interpreted as a joint influence of the standard heat bath at temperature $T_0$ and an additional `feedback heat bath' at temperature $T_{\rm F} = \alpha_\tau/2\gamma_{\tau} = \sqrt{{T}/{T}_0-1}\,{T}/2$. The laws of thermodynamics imply that heat flows from hot to cold and thus $\dot{Q}_{\rm M}$ is positive for $T_{\rm F}/T_0 > 1$ which occurs for $T > 2 T_0$. Further, the heat flow is zero for $T = 2 T_0$, where $T_{\rm F} = T_0$ and thus there is one global temperature only, and negative otherwise. \textcolor{black}{Evaluating the heat flux $\dot{Q}_{\rm M}^{\rm EFB}$ from Eqs.~\eqref{eq:tde2vF} and \eqref{eq:GF} with $\tau = 0$ using the approach of \ref{appx:feedback_cooling}, we find the expression \begin{equation} \dot{Q}_{\rm M}^{\rm EFB} = \frac{\gamma_0 T_0}{m}\sqrt{\frac{T}{T_0}-1} \left(1- \sqrt{\frac{T}{T_0}-1} \right) \label{eq:QrEFB0} \end{equation} which indeed obeys the described properties.} Since $\dot{Q}_{\rm M}^{\rm EFB}$ is strictly negative for $\tau > 0$ and can be both positive and negative for $\tau = 0$, it exhibits a discontinuity at vanishing delay, in accord with the results described in Ref.~\cite{Loos2019}. Note that the presented situation with $\tau = 0$ is physically weird since it seems impossible to record the noise and feed it back into the system without any delay. \textcolor{black}{It also yields a strange behavior as the heat flux vanishes at the point where temperatures $T_{\rm F}$ and $T_0$ are equal but $T = 2 T_0$. This means that we constructed a bath at temperature $T > T_0$ by using two strictly identical reservoirs at same the temperature $T_0$ to which the system couples via different friction coefficients. The two baths provide the same realizations of the white noise $\xi(t)$, and thus the total noise intensity is given by the sum $\sqrt{2\gamma_0T_0}+\sqrt{{\alpha_\tau}}$ of the intensities of the two noises. In contrast, connecting a system to two standard heat reservoirs always leads to equilibrium (vanishing heat flux) when the temperatures of the two baths are equal. The mathematical reason is that different reservoirs necessarily correspond to different noise realizations, regardless of their temperatures. As an example, consider heat baths A and B with friction and noise forces given by $-\gamma_{\rm A,B} v$, $\sqrt{2 \gamma_{\rm A,B} T_0} \xi_{\rm A,B}(t)$, with independent Gaussian white noises $\xi_{\rm A,B}(t)$. Then the joint action of these baths is described by the total friction $-(\gamma_{\rm A} + \gamma_{\rm B}) v$ and noise $\sqrt{2 (\gamma_{\rm A} + \gamma_{\rm B}) T_0} \xi(t)$, where $\xi(t)$ is a unit variance Gaussian white noise (correlated with $\xi_{\rm A,B}(t)$). To sum up, the formal identification of the feedback force $F_{\rm FB}$ and noise $\eta_{\rm FB}$ for $\tau=0$ as effects of a standard heat bath correctly determines the sign of the heat flux $\dot{Q}_{\rm M}$ in Eq.~\eqref{eq:QrEFB0}, but it is physically problematic.} \subsection{Fluctuation theorems} \label{sec:fluctuations} We conclude the numerical part of the paper by testing the work fluctuation theorems~\eqref{eq:Jarzynski} and \eqref{eq:Crooks}. To this end, we let the system relax into the steady state corresponding to the parameter regime of Fig.~\ref{fig:PdfTVar} (e) -- (h) and then we switch on the time-symmetric protocol \begin{equation} k_6 = 1 + 0.9\sin(\pi t) \label{eq:k6prot} \end{equation} with $t \in (0,1)$ for the potential~\eqref{eq:Unonl}. During the time-dependent driving, we measure the stochastic work \begin{equation} w = \int_0^1 dt\, \frac{\partial{U}[x(t),t]}{\partial t} = \int_0^1 dt\, \dot{k}_6 x^6(t)/6 \end{equation} and sample its PDF $\rho(w)$. Due to the symmetry of the protocol, the time-reversed process (R) and the forward process (F) in the fluctuation theorems~\eqref{eq:Jarzynski} and \eqref{eq:Crooks} coincide and the free energy difference $\Delta F$ vanishes. Validity of the Crooks fluctuation theorem~\eqref{eq:Crooks} for the acquired PDFs thus implies that \begin{equation} C(w) \equiv \log \left[ \frac{\rho(w)}{\rho(-w)} \exp(w/{T}) \right] = 0. \label{eq:CrooksC} \end{equation} In Fig.~\ref{fig:rhow}~(a) we show the resulting PDFs for work obtained for the NEFB, EFB, and EQ processes. The panels (b) -- (d) then show that from the three processes only the EFB (c) and EQ (d) yield $C(w) = 0$ and thus fulfill the Crooks fluctuation theorem~\eqref{eq:CrooksC}. The validity of the Jarzynski equality is tested in Fig.~\ref{fig:Jarzynski}, where we show values of averages $\left< \exp(- \beta_{\rm X} w)\right>$ over the sample PDFs for work as functions of the parameter $\beta_{\rm X}$. For EFB and EQ, we find that the average equals to one for $\beta_{\rm X} = {1/T}$ and $1/{T}_0$, respectively, proving the validity of Jarzynski equality~\eqref{eq:Jarzynski} with $\Delta F = 0$ in these cases. For the NEFB, the system starts out of equilibrium so that it is not clear which (inverse) temperature should be used in~Eq.~\eqref{eq:Jarzynski}. In the figure, we at least tested that choosing the temperature obtained form the variance of the velocity, $1/{\beta}_{\rm X} = 2\sigma_v^2$, does not yield $\left< \exp(- \beta_{\rm X} w)\right> = 1$. \begin{figure}[t!] \centering \begin{tikzpicture} \node (img1) {\includegraphics[width=1.0\columnwidth]{rhoW.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-2.00cm,xshift=-5.3cm] {(a)}; \node[above=of img1, node distance=0.0cm, yshift=-2.00cm,xshift=2.5cm] {(b)}; \node[above=of img1, node distance=0.0cm, yshift=-6.9cm,xshift=-5.3cm] {(c)}; \node[above=of img1, node distance=0.0cm, yshift=-6.9cm,xshift=2.5cm] {(d)}; \end{tikzpicture} \caption{Test of the Crooks fluctuation theorem. (a) Probability densities for work for NEFB, EFB and EQ processes departing from the stationary state of Fig.~\ref{fig:PdfTVar} and driven with a time symmetric protocol~\eqref{eq:k6prot} for the potential~\eqref{eq:Unonl}. The remaining panels show the function~\eqref{eq:CrooksC} for NEFB (b), EFB (c), and EQ (d). The data suggest that the theorem holds for EFB and EQ, where $C(w) \approx 0$. The shown results were obtained from $5\times 10^6$ runs of BD simulation with time-step $dt = 10^{-3}$. Except for the time-dependent driving, all parameters are the same as in Fig.~\ref{fig:PdfTVar}.} \label{fig:rhow} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=0.6\columnwidth]{Jarzynski.eps} \caption{Test of the Jarzynski equality for work PDFs from Fig.~\ref{fig:rhow}. The vertical lines for the individual processes correspond to temperatures evaluated from the stationary variance of the velocity as $1/\beta_X = m \left<v^2\right>$ assuming equipartition theorem. For the EFB and EQ this temperature equals to the temperature measured in any other way (e.g., from position or velocity PDF). The NEFB in general induces a non-equilibrium steady state and thus corresponding temperatures measured in different ways are in general different~\cite{Cugliandolo2011,Holubec2020}.} \label{fig:Jarzynski} \end{figure} \section{Beyond equilibrium feedback} \label{sec:response} In this section, we discuss possible analytical extensions of the equilibrium delay processes that might help to better understand general delay processes. \subsection{Classical linear response theory} \label{sec:clresponse} Any Langevin equation where the friction and noise obey the FDR~\eqref{eq:FDTGen} can be thought of as a result of coarse-graining the full set of Hamiltonian equations for the system of interest and the corresponding bath over the bath degrees of freedom. This means that, the system with equilibrium delay can be regarded as a standard Hamiltonian system, which implies applicability of the classical linear response theory~\cite{Kubo1966,Kubo2012,Zwanzig2001}. It states that the time-evolution of the mean value $\left< A(t) \right>$ induced by perturbations of the equilibrium system with Hamiltonian $H= U + mv^2/2$ in the form $H + \varepsilon f(t) B$ starting at time $t=0$ reads~\cite{Zwanzig2001} \begin{equation} \left<A(t) \right>_1 = \left<A(t) \right>_0 + \frac{\varepsilon}{T} \int_0^t ds\, f(s) \left<A(t-s) \dot{B}(0)\right>_0. \label{eq:lin_resp} \end{equation} One assumes that the averages in the perturbed system can be expanded as $\left<\dots\right> = \left<\dots\right>_0 + \varepsilon \left<\dots\right>_1 + \dots$, where the subscript 0 denotes average taken over the unperturbed Boltzmann PDF corresponding to Hamiltonian $H$~\eqref{eq:px} and \eqref{eq:pv}, the subscript 1 denotes averages taken over the exact PDF up to the order $\varepsilon$, and so on. We test the linear response theory using the specific equilibrium velocity feedback system discussed in Sec.~\ref{sec:discussionA}. We perturb the Hamiltonian by the term $\varepsilon f(t) x$. This term corresponds to a homogeneous time-dependent force $- \varepsilon f(t)$ and thus the dynamical equation for velocity reads \begin{equation} m\dot{v}(t) = -\frac{\partial{U}}{\partial{x}} + F_{\rm FB} - \gamma_0 v(t) + \sqrt{2T_0\gamma_0}\xi(t) -\varepsilon f(t). \end{equation} The potential $U$ is given by Eq.~\eqref{eq:Unonl} and the feedback force by Eq.~\eqref{eq:GF}. We consider the parameter regime of Fig.~\ref{fig:PdfTVar} and the specific perturbation \begin{eqnarray} \varepsilon f(t)= \varepsilon \sin(\pi t/10). \label{eq:forceLR} \end{eqnarray} In Figs.~\ref{fig:LRT} (a)-(d) we show the time correlation functions $\left<A(t)\dot{x}(0)\right>_0 = \left<A(t)v(0)\right>_0$, $A = x, v, x^2, v^2$ obtained using BD simulations of this system with $\varepsilon = 0$. The first two central moments of velocity and position obtained using Eq.~\eqref{eq:lin_resp} with force~\eqref{eq:forceLR} via these time correlation functions are depicted in Figs.~\ref{fig:LRT} (e)-(h) together with the corresponding quantities obtained from BD simulation of the perturbed system. The figures show good agreement between simulations and linear response theory, which improves for smaller $\varepsilon$. The validity of the linear response theory can be rationalized as follows. Even though we do not have an exact dynamical equation for the PDF for the equilibrium delay system, we know that the PDF for system and bath obeys a Liouville equation. The corresponding Liouville operator is composed of the system Hamiltonian $H$, the bath Hamiltonian, and the system-bath interaction energy. Even though it is hard to identify the latter two, one can rely on this Liouville equation as a starting point for perturbation theories around the parameter regime of the equilibrium delay. \textcolor{black}{For example, one can derive Eq.~\eqref{eq:lin_resp} using the textbook approach of Ref.~\cite{Zwanzig2001}}. \begin{figure}[t!] \begin{tikzpicture} \node (img1) {\includegraphics[trim=0 20 0 0, width=1.0\columnwidth]{linear_response_time.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-2.1cm,xshift=-1.15cm] {(a)}; \node[above=of img1, node distance=0.0cm, yshift=-2.1cm,xshift=6.7cm] {(b)}; \node[above=of img1, node distance=0.0cm, yshift=-4.1cm,xshift=-1.15cm] {(c)}; \node[above=of img1, node distance=0.0cm, yshift=-4.9cm,xshift=6.7cm] {(d)}; \node[above=of img1, node distance=0.0cm, yshift=-7.3cm,xshift=-1.15cm] {(e)}; \node[above=of img1, node distance=0.0cm, yshift=-6.48cm,xshift=6.7cm] {(f)}; \node[above=of img1, node distance=0.0cm, yshift=-9.1cm,xshift=-1.15cm] {(g)}; \node[above=of img1, node distance=0.0cm, yshift=-9.1cm,xshift=6.7cm] {(h)}; \end{tikzpicture} \caption{Linear response theory: (a)-(d) response functions from BD simulations used to evaluate the time evolution of the first two central moments of velocity and position (e)-(h) in the equilibrium system of Fig.~\ref{fig:PdfTVar} perturbed by the time-dependent force~\eqref{eq:forceLR}. As expected, agreement between the approximate theory (dashed lines) and simulation (noisy solid lines) is better for smaller $\epsilon = 0.1$ (black and gray lines) than for the larger one $\epsilon = 0.2$ (pink and orange lines).} \label{fig:LRT} \end{figure} \subsection{Langevin equation} \label{sec:AppFromLangevin} The \textcolor{black}{classical linear response theory~\eqref{eq:lin_resp} applies} only for perturbations that can be subsumed into the Hamiltonian \textcolor{black}{of the system}. Other perturbations \textcolor{black}{can be treated, e.g., on the footing of linear irreversible thermodynamics~\cite{callen1985} or directly on the level of the Langevin equations~\eqref{eq:tde2x} and \eqref{eq:tde2v}. In order to present two simple examples of the latter type}, we write these equations in the form of the equilibrium interpretation of Tab.~\ref{tab:interpretations}B \begin{equation} \dot{x} = v, \quad m\dot{v} = \left(-\frac{\partial U}{\partial x} + F_{\rm F} + \eta \right) + \varepsilon g, \label{eq:vexp} \end{equation} where the term proportional to $\varepsilon$ is a perturbation. Perturbations dependent on time and/or time-delayed variables again require evaluation of time-correlation functions, which can rarely be obtained analytically. Perturbations that depend only on position can be absorbed into the potential, and the stationary PDF can be evaluated exactly. To obtain non-trivial analytical results, we will investigate two properties of steady states induced by perturbations of the form $g = g[v(t)]$, i.e. which depend solely on velocity. \textcolor{black}{However, the obtained general restrictions \eqref{eq:VirialE1} and \eqref{eq:48} on the system dynamics apply for an arbitrary function $g$. In particular, $g$ can, for these expressions, be a nonlinear function of position and velocity in the past. In such a case, the resulting process~\eqref{eq:vexp} is a truly nonlinear delay differential equation.} \emph{Virial theorem:} The viral theorem states that twice the average kinetic energy of a system equals to the virial $-\left<F x\right>$~\cite{goldstein2002}. For the system at hand, the total force $F$ is given by the right-hand side (R.H.S.) of Eq.~\eqref{eq:vexp}. For the unperturbed system, this implies that \begin{equation} m \left<v^2\right> = -\left< \left(-\frac{\partial U}{\partial x} + F_{\rm F} + \eta \right) x\right> \label{eq:VirialE0} \end{equation} as can be checked directly from the Langevin equations after multiplying Eq.~\eqref{eq:tde2x} by $x$, Eq.~\eqref{eq:vexp} with $\varepsilon = 0$ by $v$, summing the result, and taking the stationary ensemble average so that the time derivative of the cross-correlation $\left<xv\right>$ vanishes. Repeating this procedure for nonzero perturbation in Eq.~\eqref{eq:vexp}, we find that if $\left<g(v) \right>_0 = 0$ the unperturbed virtial theorem~\eqref{eq:VirialE0} remains valid up to first order in $\varepsilon$ because $\left<x g(v) \right>_0 = \left<x\right>_0 \left<g(v) \right>_0$. More generally, we find that \begin{equation} m \left<v^2\right>_n + \left< \left(-\frac{\partial U}{\partial x} + F_{\rm F} + \eta \right) x\right>_n = - \varepsilon \left<x g(v) \right>_{n-1} \label{eq:VirialE1} \end{equation} holds for all corrections of order $n\ge 1$. Even though this result cannot be evaluated explicitly for $n>1$ since $ \varepsilon^{n} \left<x g(v) \right>_1$ is unknown, it can provide a stringent consistency check for simulations. \emph{Power:} The power $\left<F v\right>$ exerted by the total force $F$ on the R.H.S. of Eq.~\eqref{eq:vexp} vanishes in the steady state of the unperturbed system since the time-derivative of $\left<v^2\right>$ vanishes. With the perturbation switched on, we find \begin{equation} \left< \left(-\frac{\partial U}{\partial x} + F_{\rm F} + \eta \right) v\right>_n = - \varepsilon \left<v g(v)\right>_{n-1}. \label{eq:48} \end{equation} Besides providing another set of expressions useful as consistency checks in simulations, this equation provides an explicit non-trivial result for $n=1$. Then the R.H.S. $- \varepsilon \left<v g(v)\right>_{0}$ is in general non-zero and can be evaluated as average over the PDF~\eqref{eq:pv}. For example, for $g(v) = v$, we find \begin{equation} \dot{\tilde{W}} \equiv \left< \left(-\frac{\partial U}{\partial x} + F_{\rm F} + \eta \right) v\right>_n = - \varepsilon T. \label{eq:Papprox} \end{equation} Figure~\ref{fig:PR} verifies this approximate result by BD simulations for $n=1$ and $n=3$ and the same unperturbed dynamics as in Sec.~\ref{sec:clresponse} above. \begin{figure}[t!] \centering \begin{tikzpicture} \node (img1) {\includegraphics[trim=0 20 0 0, width=1.0\columnwidth]{power_PL.eps}}; \node[above=of img1, node distance=0.0cm, yshift=-2.30cm,xshift=-0.6cm] {(a)}; \node[above=of img1, node distance=0.0cm, yshift=-2.30cm,xshift=7.0cm] {(b)}; \end{tikzpicture} \caption{Test of the explicit result~\eqref{eq:Papprox} (dashed lines) against the simulation (solid line). (a) $\varepsilon = 0.2$ and $n=1$. (b) $\varepsilon = 0.01$ and $n=3$. Other parameters are the same as in Fig.~\ref{fig:PdfTVar}.} \label{fig:PR} \end{figure} \section{Conclusion} \label{sec:conclusion} Using the second FDR, we have identified situations where one can interpret time-delayed feedback forces proportional to velocity or position in Langevin equations as friction forces imposed by an equilibrium bath. Our analysis reveals a previously unnoticed class of nonlinear stochastic delay differential equations, which can be treated analytically. They describe processes that obey standard thermodynamic constraints. In particular, their long-time distributions are of Gibbs canonical form and they obey standard fluctuation theorems. From the point of view of control theory, especially passivity-based control, the corresponding equilibrium feedback processes are automatically stable and passive. However, their dynamics retains the full complexity of generic delay processes. One disadvantage is that the equilibrium feedback always heats up the system and thus, unlike generic feedback protocols, cannot be used for standard feedback cooling. As a practical demonstration, we have realized the equilibrium velocity feedback using Brownian dynamics simulations and shown that it exhibits all the formally derived properties. For so-called equilibrium velocity feedback, not only the velocity at an earlier time but also the noise at that time are used to drive the system at present. \textcolor{black}{Such feedback can nowadays be realized in practice in feedback experiments~\cite{Gernert2016} with Brownian particles \cite{Baraban2013,Qian2013,Bregulla2014,Khadka2018,Lavergne2019,Bauerle2020,Penny2021} or robots~\cite{Mijalkov2016,Leyman2018,Piwowarczyk2019}. In particular, the so-called velocity damping protocols for feedback cooling of trapped microscopic particles record the particle velocity and later, after an experimental latency, apply to the particle a force proportional to that velocity~\cite{Ferialdi2019,Penny2021}. Assuming that the position and velocity dependence of the systematic force in the dynamical equation for particle motion is known, measuring both its velocity and position at time $t$ allows to determine the thermal noise, which can then be applied to the particle in the future, similarly as the velocity-dependent force. The potential drawback of this approach is that the measured noise will be affected by measurement uncertainties and finite measurement time resolution. The latter means that the obtained noise will effectively be integrated (low-pass filtered) over one measurement frame, which is however also the case in our BD simulations. Other promising setups, where the equilibrium feedback might be realised are state-of-the-art bath engineering experiments~\cite{Murch2012}. Finally, equilibrium feedback of the same type as in our computer simulations can be realised in experimental setups where artificial noise completely overshadows thermal noise. An example is shaken granular matter~\cite{DAnna2003}, where the noise is realised by shaking the granular system.} From a theoretical perspective, we believe that our results will shed further light on investigations of the dynamics and thermodynamics of nonlinear stochastic delay differential equations, which are known to be immensely resistant to analytical treatments. For example, the known stationary distributions for the equilibrium delay processes can serve as starting points of new perturbation theories valid for arbitrarily large delays. And, the known thermodynamics of the equilibrium delay processes can help to better understand the individual contributions to the total entropy production derived for nonlinear stochastic delay differential equations as studied in Refs.~\cite{Munakata2014,Rosinberg2015,Rosinberg2017}. \section*{Acknowledgments} We acknowledge funding through a DFG-GACR cooperation by the Deutsche Forschungsgemeinschaft (DFG Project No 432421051) and by the Czech Science Foundation (GACR Project No 20-02955J). VH gratefully acknowledges support by Humboldt foundation. \section*{References} \bibliographystyle{iopart-num}
\section{Cosmic-Ray Physics at the South Pole} \label{sec:info} Experimental cosmic-ray (CR) research aims to determine the energy spectrum, the elemental composition, and the arrival direction distribution of incoming cosmic particles. Such measurements are essential for understanding the sources, acceleration, and propagation of these energetic particles of cosmic origin. At energies above $10^{14}\,$eV, the characteristics of these particles are mostly determined indirectly from measured properties of the extensive air showers (EAS) induced by primary cosmic rays in Earth's atmosphere. \begin{wrapfigure}{l}{0.45\textwidth} \begin{center} \includegraphics[width=0.43\textwidth]{Figures/Figure_IceCube_EAS.pdf} \end{center} \caption{Scheme of air-shower measurements at the IceCube Neutrino Observatory~\cite{Verpoest:2021icrc}} \label{fig1} \end{wrapfigure} IceCube's surface array, IceTop~\cite{IceCube:2012nn}, has proven over the past decade to be a very valuable detector component not only for the calibration of IceCube, but also in combination with the unique cube-kilometer-sized in-ice muon detector as a cosmic ray observatory (Fig.~\ref{fig1}). It is providing veto and calibration functionality for the in-ice neutrino measurements~\cite{Tosi:2019nau}, as well as measurements of the primary cosmic-ray spectrum and mass-composition from 1 PeV to about 1 EeV~\cite{IceCube:2019hmk}. The latter is -- beside knowledge gain in the PeV to EeV primary energy range of cosmic rays -- essential to reduce systematic uncertainties on the atmospheric backgrounds of astrophysical neutrinos in the ice~\cite{Gaisser:2016obt}. Any progress in the research field depends on the validity of hadronic interaction models required for the interpretation of EAS measurements. Hence, it is important to reduce the uncertainties by improving hadronic interaction models and enhancing air-shower arrays to perform hybrid measurements of the various EAS components. Moreover, IceTop contributes to IceCube's multi-messenger mission in particular regarding Galactic sources: searches for photons~\cite{Aartsen:2012gka}, and measurements of the anisotropy of Galactic cosmic rays~\cite{IceCube:2013mar}. IceCube and other experiments have contributed to today's knowledge of Galactic cosmic rays (GCR) which can be summarised as follows. The all-particle spectrum has a steep power-law like behaviour with features known as `knee', 'second knee' and `ankle' at $2$-$5\cdot10^{15}\,$eV, $1$-$3\cdot10^{17}\,$eV and $2$-$8\cdot10^{18}\,$eV, respectively. Whereas at the knee and the second knee the spectrum steepens, the ankle is characterised by a flattening of the spectrum. Cosmic rays below the knee are of galactic origin and cosmic rays above the ankle are most probably of extra-galactic origin. Somewhere in the energy range from $10^{16}\,$eV to a few $10^{18}\,$eV the transition of cosmic rays from galactic to extra-galactic origin is expected. There are, however, still major issues regarding the highest energy GCR: (i) The most powerful accelerators of cosmic rays in our Milky Way have not yet been revealed. (ii) The maximum energies of various possible acceleration mechanisms and sources are uncertain. (iii) The Galactic extra-galactic transition and features in the CR energy spectrum are not well understood. These questions can be addressed through improved measurements of the energy dependent composition of GCR in conjunction with gamma-ray and neutrino observations. It means that we must bring multi-messenger astrophysics to maturity not only at the ultra-high energy range, but also for the Galactic scenario at lower energies. In this contribution we summarise the recent achievements and future plans for air-shower measurements by the IceCube collaboration, which are described in more detail in further papers for this conference. \section{Recent Results} \label{sec:recent} \begin{wrapfigure}{r}{0.55\textwidth} \begin{center} \includegraphics[width=0.53\textwidth]{Figures/figure14.pdf} \end{center} \caption{Measured muon density at 600 m (circles) and 600 m (squares) lateral distance. Error bars indicate the statistical, brackets the systematic uncertainty. Shown for comparison are the corresponding simulated densities for proton and iron (red and blue lines)~\cite{Soldin:2021icrc}.} \label{fig2} \end{wrapfigure} Important for understanding GCR is first and foremost a precise knowledge of the all-particle energy spectrum and the elemental composition of cosmic rays in the entire transition range from 100 TeV to 10 EeV of primary energy. IceCube has delivered important milestones, first with the composition paper~\cite{IceCube:2019hmk} from three years of data taking and now recently with the reconstruction of the lower energy spectrum in the 100 TeV - 1 PeV range~\cite{IceCube:2020yct}. With a new trigger that selects events in closely spaced detectors in the center of the array, the IceTop energy threshold has been lowered by almost an order of magnitude below its previous threshold of 2 PeV. New machine-learning methods were developed to deal with events with very few detectors hit. In Figure~\ref{fig:spectrum} the results are compared with previous measurements by IceTop and other experiments. However, the results also show that there is still a long way to go to understand high-energy GCR. In particular, both the statistical and systematic uncertainties need to be reduced, and the analyses need to be extended to a coherent determination of the elemental composition and possible small and large scale anisotropies in a wide energy range. In addition, the understanding of shower development needs to be further improved. For this, IceCube offers the best prerequisites: a total of 9 years of data are now available, new (machine learning) methods have been developed and are being applied, and with new detector components the phase space as well as the accessible energy ranges will be extended to higher and lower energies in the future. The following chapters give an overview of the current activities related to the surface component of IceCube. \section{Current Analyses} \label{sec:analysis} A unique feature of IceCube is the measurement of the (muonic) shower nucleus with the in-ice instrumentation, where shower muons above 0.5$\,$TeV reach the in-ice detector and can be detected. The 3-dimensional structure of the in-ice Cherenkov light measured in the sensors is analyzed and used as a mass-sensitive parameter, in particular in correlation with the density of all charged particles of the shower at the surface measured with IceTop. The results contain a large uncertainty first due to the shower-to-shower fluctuations, and secondly due to shortcomings of the Monte Carlo simulations in the description of the EAS evolution, especially for the muons. It has been shown that a dedicated measurement of the muon densities at different energy thresholds can significantly improve the situation~\cite{Meurer:2005dt}. Therefore, analyses of the IceTop data focus on a possible identification of the shower muons. For that, at IceTop, a determination is made of the fraction of the measured detector signal produced by secondary muons. Here, nature, or better the shower development, helps in the way that the lateral distribution of the muons is flatter than that of the electrons, so that with larger distance to the shower core the relative signal fraction of muons becomes dominant. However, the total number of particles decreases quickly in the lateral direction, so that fewer particles are measured per shower. It was also shown that the ratio of GeV muons to TeV muons is an important parameter for the cross-check of the hadronic interaction models~\cite{Engel:2019dsgf}. \\ For these reasons, recent analyses at IceTop have focused on determining the GeV muon density in detected air showers. A first analysis (fig.~\ref{fig2}) determines the mean muon density at large distances and correlates it with the energy of the primary particles~\cite{Soldin:2021icrc}. The measured densities are not coherently consistent with predicted muon densities obtained from the hadronic interaction models. \\ For a determination of the elemental composition, however, it is advantageous if the muon number or a muon density can be determined on the basis of individual events~\cite{Kang:2021icrc}. The paper suggests how promising this can be for determining the composition. \\ The selection of muons in air showers improves when examining more horizontally incident primary particles, since here the electromagnetic components are already attenuated by the larger path length through the atmosphere. Therefore, the analysis of air showers up to 60 degrees zenith angle aims to check and verify the elemental composition of cosmic rays at IceCube with an independent set of events and thus to gain better determination of systematic uncertainties~\cite{Balagopal:2021icrc}. \\ The extracted muon density is also used in an analysis which focuses on the comparison, test and validity studies of hadronic interaction models~\cite{Verpoest:2021icrc}. IceCube has the capability to measure simultaneously the electromagnetic, GeV muon and TeV muon components of air showers. In that work, tests of various hadronic interaction models are presented by comparing data to proton and iron simulations for three different composition sensitive variables. If the models give a realistic description of experimental data, the composition interpretation of all variables should be consistent. However, IceTop indicates inconsistencies between different components, notably between the slope of the lateral distribution of the charged particles and the low-energy muons in all models. \\ In another analysis air-shower signals seen in IceTop are used to determine a real-time veto for astronomical neutrino alerts sent out in order to trigger multi-messenger campaigns. From June 19, 2019 to December 31, 2020, IceCube sent 45 public alerts to the multi-messenger community. In this list, 6 alerts were for down-going ($\theta<82^\circ$) events including the four events with reconstructed energies above 1 PeV. IceTop data is used to tag cosmic ray induced event when there is a significant number of correlated IceTop pulses recorded with the in-ice muons within a time residual window of 0 to 1 $\mu$s. A count of at least 2 stations or 6 tanks of IceTop correlated in-time with the in-ice event marks IceTop activity. So far, using IceTop information, one alert event was cautioned as being of cosmic-ray origin and two high-energy events were retracted. \\ Finally, improved analysis methods are applied to make more efficient use of the various air shower observables of the hybrid detector system IceCube. These are based in particular on machine learning and show promising preliminary results~\cite{Koundal:2021icrc}. \section{Future Instrumentation} \label{sec:future} \subsection{Surface Array Enhancement} IceTop measures cosmic rays in the transition region from galactic to extra-galactic sources. However, the non-uniform snow accumulation on the installed ice-Cherenkov tanks leads to a non-uniform attenuation of the electromagnetic component which results in an increased uncertainty on the reconstruction of the air-shower parameters. Therefore, an upgrade of IceTop with an array of scintillator panels is under construction~\cite{Haungs:2019ylq}. The enhancement foresees the deployment of 32 stations of 8 detectors and 3 radio antennas, read out by a central station DAQ, each within the present IceTop area~\cite{Oehler:2021icrc} (fig.~\ref{fig:surface_layout}). Taking advantage of the infrastructure that the scintillator array will provide, installation of radio antennas is also underway~\cite{Coleman:2021icrc}. These only moderate additional efforts will make the surface array to a multi-component detector. Furthermore, the collaboration has examined the possibility of adding Cherenkov telescopes (IceAct) to the surface instrumentation~\cite{Paul:2021icrc} that would measure the electromagnetic component of particularly lower energy air-showers as another complementary building block towards a hybrid cosmic-ray observatory. \begin{figure}[t] \centering \includegraphics[height=6cm]{Figures/IceTopEnhancementStationLayoutICRC2019.pdf} \hspace{1cm} \includegraphics[height=5cm]{Figures/ScintillatorRadioPrototypes.jpg} \caption{(Left) Layout of a surface station for the enhancement of IceTop, which is also the baseline design for the Gen2 surface array. (Right) Corresponding prototype detectors at IceTop; both the scintillators and radio antennas are deployed on stands that can be lifted to avoid snow management.} \label{fig:surface_layout} \end{figure} The proposed detector types are optimized to serve the following general goals: \begin{itemize}[itemsep=0pt,topsep=-1pt] \item Cross-calibration: The coincident detection of air showers and muons deep in the ice will allow for an improved calibration of the in-ice detector and IceTop. \item Improved capabilities for studying cosmic rays: The detection of comic rays through several independent detection channels will enhance the capabilities of In-ice IceCube and it's surface component IceTop to measure the mass composition of cosmic rays as well as allowing for composition dependent anisotropy studies. \item Lowering the threshold for air-shower observations: The higher density of detectors will allow accurate reconstruction of air showers for energies below 1 PeV, i.e.\ the full energy range of the knee will be covered. \item Better understanding of hadronic interaction models: The measurements of air showers through several detection channels will improve the understanding of hadronic interactions. \item Improved sensitivity to primary gamma rays: For the gamma-ray detection from possible UHE sources a larger energy range and a larger exposure will be available. \item Improvement of surface veto capabilities for atmospheric neutrinos: The energy threshold for vetoing the background to astrophysical neutrinos in IceCube will be lowered. \end{itemize} \begin{wrapfigure}{l}{0.45\textwidth} \begin{center} \includegraphics[width=0.43\textwidth]{Figures/IceCubeGen2-1.pdf} \end{center} \caption{Surface array of IceCube-Gen2 (darker colors) and IceTop enhancement (lighter colors) consisting of hybrid stations with eight scintillation detectors and three radio antennas. In addition IceTop tanks are shown.} \label{fig:gen2layout} \end{wrapfigure} Two R\&D scintillator stations with different designs were deployed in January 2018 and performed well. One of these stations was upgraded with two radio antennas in January 2019~\cite{Oehler:2021icrc}. Using these experiences, a new prototype station combining and improving the previous iterations was designed. This prototype station was deployed at the South Pole in January 2020, replacing the old stations. With it, the first coincident measurements of cosmic-ray air-showers using scintillation detectors, radio antennas and IceTop were obtained~\cite{Dujmovic:2021icrc}. Furthermore two prototype air-Cherenkov telescope are in operation at the South pole and have reported hybrid events detected with IceCube and IceTop~\cite{Paul:2021icrc}. At this conference we present the hardware design and the performance of the prototype station as well as the plans for the full deployment. \subsection{IceCube-Gen2 Surface Array} The conceptual design of the surface instrumentation for IceCube-Gen2~\cite{Kowalski:2021icrc} will be similar to the enhancement planned for IceTop with correspondingly larger spacing. The baseline design assumes a station on top of each new in-ice string of IceCube-Gen2 (fig.~\ref{fig:gen2layout}). With a spacing of $\sim$240\,m, such a surface array would provide hybrid measurements of the primary spectrum and mass composition from PeV to several EeV. A few additional stations between the current IceTop and the new surface array will guarantee a smooth coverage, enabling a consistent analysis of both surface arrays. Moreover, a small overlap with the Gen2 in-ice radio array will allow for the calibration of the cosmic-ray signals detected by the in-ice antennas. This overlap will ensure that all detector components of IceCube and Gen2 will share the same absolute energy scale by cross-calibration against the same air-shower array on the surface~\cite{Schroder:2021icrc}. \begin{figure}[t] \centering \includegraphics[width=0.9\textwidth]{Figures/spectrum1.png} \caption{The energy spectrum of cosmic rays with indications (the yellow bands show the respective energy range) of the rich physics program of the IceCube and IceCube-Gen2 surface instrumentation~\cite{Schroder:2021icrc}.} \label{fig:spectrum} \end{figure} With the larger area and the larger accessible angular range available, the acceptance for coincident measured surface and in-ice events increases by a factor of more than 30 compared to IceCube. This leads to the unique possibility of an array with large acceptance for events in which the air shower at the surface and the bundle of $\sim$~TeV muons in the deep array are detected in coincidence. The design will furthermore allow for selecting individual unaccompanied high-energy muons which can be used to calibrate the in-ice reconstruction of muons. In addition, the TeV muons will provide information on the mass composition and on hadronic interactions in the air showers complementary to low-energy muons at the surface. This is important to better understand the flux of atmospheric leptons creating background for the astrophysical neutrino measurements. In addition, the drastically increased aperture for coincident events with the in-ice detectors increases the potential to directly discover nearby sources by PeV photons accordingly. A surface detector also opens up the possibility of vetoing the background of cosmic-ray muon and even atmospheric neutrinos. With hundreds of coincident events per year above one EeV, such a detector would allow for an unprecedented measurement of the evolution of the primary composition in the region where a transition from Galactic to extra-galactic cosmic rays is predicted~\cite{Leszczynska:2021icrc}. \section{Summary} \label{sec:summary} IceCube with its surface array IceTop covers the complete range of high-energy GCRs from below 1~PeV to beyond 1~EeV. The simultaneous measurement of low-energy particles at the surface and high-energy muons in the ice offers unique opportunities for the study of hadronic interactions, and, in addition, also allows an improved search for PeV photons. A planned enhancement by a scintillator-radio hybrid array will significantly increase the accuracy and sky coverage of IceTop. Air-Cherenkov detectors can further enhance its accuracy around a few PeV and below. Finally, a planned expansion of IceCube to IceCube-Gen2 with a corresponding surface instrumentation will increase the exposure by an order of magnitude and will open a new window in studying the highest energy Galactic cosmic rays. \bibliographystyle{ICRC} \begin{small}
\section{Introduction} Urban air pollution poses a severe and global problem. The fine-grained assessment of urban air quality is crucial for both the governments and citizens to establish means to improve human health and quality of life. Monitoring stations have been established in numerous cities to continuously obtain air quality information. However, due to high construction and management costs, monitoring stations are sparsely installed and concentrated only in areas of higher importance, such as cities with large populations. As a result, it is essential to infer air quality in areas without monitoring stations. The development of neural network techniques has accelerated a neural network-based approach for inferring air quality of target locations~\cite{Zheng2013U-Air:Data,Cheng2018AStations,chang2004air}. This approach leverages available external data related to the air quality, such as point-of-interest and meteorology, to capture features of locations. The existing methods aim to infer air quality of target locations only in monitored cities (i.e., cities with monitoring stations). They do not capture the difference of features in cities, which causes the low accuracy of air quality inference. Since not all cities have monitoring stations, we cannot accurately infer the air quality of target locations within the unmonitored cities. \smallskip \noindent {\bf Problem definition and challenges}: We study a new problem, {\it air quality inference in unmonitored cities}, to globally solve the urban air pollution problem. A straightforward approach for the problem is the use of existing models that are trained by air quality data of cities in the vicinity of the target unmonitored city. However, even the state-of-the-art method ADAIN~\cite{Cheng2018AStations} deteriorates the inference accuracy in unmonitored cities, even when using air quality data of numerous monitored cities as training data (see Table~\ref{tab:beijing_dist} in experiments section). Therefore, we need a new neural network architecture in this problem. We face two challenges: (1) how to design a neural network architecture to capture the correlations of air quality between monitored and unmonitored cities and (2) how to train models without available air quality data of the unmonitored cities. For the first challenge, since features of cities differ, architectures must capture their differences and reflect them in the inference of air quality. It is difficult to select optimal monitoring stations for model training due to the absence of air quality data in unmonitored cities. For the second challenge, since we do not have air quality data of the unmonitored city, architectures must be trained only by using air quality data of monitored cities and external data. We cannot directly learn the correlations between monitored and unmonitored cities. In summery, we require a new neural network architecture that (1) can automatically capture the correlation between monitored and unmonitred cities without selecting monitoring stations and (2) can be trained in an unsupervised manner. \noindent {\bf Contributions}: We propose a novel neural network-based architecture {\it AIREX}. AIREX automatically captures the correlations between monitored and unmonitored cities. The novel design of AIREX is based on the effective combination of the mixture-of-experts~\cite{jacobs1991adaptive,masoudnia2014mixture,Guo2018Multi-sourceExperts} and attention mechanisms~\cite{bahdanau2014neural}. The mixture-of-experts approach is a machine learning technique based on the divide-and-conquer principle. This approach uses multiple models (called {\it experts}) and aggregates outputs of experts for deriving the final output. Each expert in AIREX corresponds to individual monitored cities, and thus AIREX infers air quality in unmonitored cities by aggregating air quality assessed from individual monitored cities. The attention mechanism further boosts the performance of AIREX. AIREX employs two attentions to capture the importance of monitored cities and monitoring stations individually for computing weights of influences from monitored cities to the target location. The effective combination of mixture-of-experts approach and attention mechanism achieves accurate air quality inference. For training AIREX, we develop a training method using a meta-training approach~\cite{Guo2018Multi-sourceExperts}, which is suitable for training of the mixture-of-experts approach in an unsupervised manner. In our training method, we regard one of the monitored cities as an unmonitored city at the training phase so that AIREX can be learned in an unsupervised manner. We use multi-task learning~\cite{caruana1997multitask} for training both the whole AIREX and experts with capturing the difference among cities. This training method enables to learn the correlations between monitored and unmonitored cities without air quality data of unmonitored cities. Our contributions presented in this study are as follows: \begin{itemize} \item We address a novel problem that infers air quality information in unmonitored cities by using the air quality data obtained from other cities. We show that state-of-the-art methods are not suitable for this problem. \item We propose AIREX that can accurately infer air quality information in unmonitored cities. This employs the mixture-of-experts approach and attention mechanism to capture the correlations of air quality between monitored and unmonitored cities. \item Through experiments with 20 cities in China, we show that AIREX achieves higher accuracy than the-state-of-the-art method. \end{itemize} \section{Problem Formulation} We describe the notations and definitions used in the formulation of the problem that we solve in this study. There are two types of cities, namely, target and source cities, that denote unmonitored and monitored cities, respectively. Each city $c$ has its representative specific location $l_c$ (e.g., the center of $c$). We assume that we have a single target city $c_{\mathit{tgt}}$ and a set $C_{\mathit{src}}$ of source cities. We denote the set of monitoring stations by $S$ and each monitoring station $s \in S$ has its location $l_s$, which periodically monitors a quantity of air pollutants, such as PM$_{2.5}$, over the time domain $T=\langle t_1, t_2, \ldots, t_{|T|}\rangle$. Source city $c_{k} \in C_{\mathit{src}}$ has a set of monitoring stations $S_k \subseteq S$. We denote $s_{k,i}$ as monitoring station $s_i \in S_k$. We define air pollutant data as follows: \begin{definition}[Air pollutant data] Air pollutant data $D^A$ consists of quantities of air pollutants monitored by stations, and they are time-dependent. \end{definition} Cities have characteristics that affect air quality. To infer air quality, we use three external data that were frequently employed in prior studies \cite{Xu2016WhenInference,Zheng2013U-Air:Data,Cheng2018AStations}; Point-of-interest (PoI), road network, and meteorological information. \begin{definition}[PoI data] PoI data $D^P$ consist of PoI information $p$, which is a triple of an identifier, specific location $l_p$, and category ${\upsilon_p}$ (e.g., factory). \end{definition} \begin{definition}[Road network data] A road network $D^R$ consists of road segments $r$. Each road segment includes coordinates of the start and end points, and road category $\upsilon_r$ (e.g., highway). \end{definition} \begin{definition}[Meteorology data] Meteorology data $D^M$ consist of distinct-level meteorological information. Meteorological information includes meteorological measurements, such as weather and temperature. The meteorology data are time-dependent data. \end{definition} In this study, we aim to infer spatially fine-grained air quality in the target unmonitored city. \smallskip \noindent {\bf Problem statement}. Given target city $c_{\mathit{tgt}}$, target location $l_{\mathit{tgt}}$ in $c_{\mathit{tgt}}$, a set $C_{\mathit{src}}$ of source cities, a set of monitoring stations in $C_{\mathit{src}}$, air pollutant data $D^A$, PoI data $D^P$, road network data $D^R$, and meteorology data $D^M$, we aim to infer air quality of $l_{\mathit{tgt}}$ over time domain $T$. \smallskip We focus on regression for evaluating quantities of air pollutants in this paper, but our models can be used for classification for evaluating the air quality index~\cite{Cheng2018AStations}. \section{Proposal} We present our neural network-based architecture AIREX and training method after describing our framework and feature extraction. \begin{figure}[t] \includegraphics[width=1.0\linewidth]{figures/framework-crop.pdf} \caption{Our framework for air quality inference} \label{fig:framework} \end{figure} \subsection{Framework and Design Policy} Figure~\ref{fig:framework} illustrates our framework. This framework consists of offline training and online inference. In the offline training, we build our inference model after extracting features, and in the online inference, we infer the air quality of the given target location by using the built model. We describe a design policy of the offline training. Air quality of the target location is assessed by data related to target location, monitoring station, and cities. Thus, our framework extracts features of target location, monitoring stations, and cities, from data sources. We leverage these features to capture the correlations of air quality between the target and source cities, and the target location and monitoring stations. We design our inference architecture AIREX for automatically capturing the correlations and being trained in an unsupervised manner. For this purpose, AIREX is based on the mixture-of-experts approach~\cite{Guo2018Multi-sourceExperts} and attention mechanism~\cite{bahdanau2014neural}. The mixture-of-experts approach compute the final output by aggregating the output of multiple models (i.e., {\it experts}). In AIREX, each expert is a model for inferring air quality by using data of source city. Each source city and monitoring station does not equally contribute the air quality inference in the target city, and thus we use the attention mechanism to compute the importance of cities and monitoring stations. AIREX can accurately infer the air quality in the target city by elegant combination of the mixture-of-experts approach and attention mechanism. Furthermore, AIREX can be trained in an unsupervised manner by using the meta-training approach~\cite{Guo2018Multi-sourceExperts} and multi-task learning~\cite{caruana1997multitask}. We describe the training method later. AIREX consists of three main components: encoding, attention, and aggregation. First, in the encode, it encodes raw input features to obtain latent features for capturing interactions between inferred values and raw input. Then, in the attention, AIREX computes the importance of source cities and monitoring stations for inferring air quality of the target city. Finally, in the aggregation, it computes output of experts for each source city by aggregating the transformed features and importance of monitoring stations, and then compute the final output by aggregating the outputs of experts and importance of cities. \begin{comment} \end{comment} \subsection{Feature extraction} We introduce our features for assessing air quality at $l_{\mathit{tgt}}$. We extract the three features, namely, the target location feature ${\mathbf X}^{\mathit{tgt}}$, monitoring station feature ${\mathbf X}^{\mathit{stn}}_s$, and city feature ${\mathbf X}^{\mathit{city}}$. These features comprise (1) PoI factor, (2) road network factor, (3) meteorological factor, (4) air pollutant factor, (5) station location factor, and (6) city location factor. We describe our three features after explaining how to extract each factor from the data. The PoI, road network, and meteorological factors are associated with location $l$ (e.g., locations of monitoring stations and the target location). $l$ has its own factors that are extracted from the data within affecting region $\mathcal{L}(l)$. We set $\mathcal{L}(l)$ as a circle whose center and radius are $l$ and $1$ km, respectively. \smallskip \noindent {\bf PoI factor} $X^P_l$: $X^P_l$ includes the numbers of PoIs, which represents the characteristics of locations, such as the numbers of factories and public parks. We consider a set $\Category{P}$ of PoI categories and count the number of PoIs belonging to each PoI category. Let $X^P_l=\{x_{\upsilon}^P(l) \}_{\upsilon \in \Category{P}}$ denote the PoI factor for $l$. We compute $x_{\upsilon}^P$ as follows: \begin{equation} x_{\upsilon}^{P}(l)=|\{p \in D^P | l_p \subset \mathcal{L}(l) \land \upsilon_p = \upsilon \}|. \end{equation} \noindent {\bf Road network factor} $X^R_l$: $X^R_l$ includes the numbers of road segments, which affects local air quality, as vehicles are one of the sources of air pollutants. We consider a set $\Category{R}$ of road categories and count the number of road segments belonging to each road category. Let $X^R_l=\{x_{\upsilon}^R(l) \}_{\upsilon \in \Category{R}}$ denote the road network features extracted for $l$. We define $\overline{r}$ as arbitrary points between the start and end of road segment $r$. We compute $x_{\upsilon}^R$ as follows: \begin{equation} x_{\upsilon}^{R}(l)=|\{r \in D^R | \overline{r} \subset \mathcal{L}(l) \land \upsilon_r = \upsilon \}|. \end{equation} \noindent {\bf Meteorological factors} $X^M_l$: $X^M_l$ is the sequence of meteorological measurements of $l$, such as weather and temperature, which influences the concentrations and flows of air pollutants. The meteorological measurements have two types of values; categorical values (e.g., weather and wind direction) and numerical values (e.g., temperature and wind speed). For categorical and numerical values, we adopt one-hot encoding and raw values, respectively. We denote the meteorological factor at time step $t$ as $X^{Mt}_l$. \smallskip \noindent These factors have demonstrated their usefulness in previous studies \cite{Xu2016WhenInference,Cheng2018AStations}. We normalize numerical values in factors by dividing the largest values among each factor. The monitoring and station location factors are associated with station $s$, and the city location factor is associated with city $c$. \smallskip \noindent {\bf Monitoring factor} $X^A_s$: Quantities of air pollutants monitored by station $s$ represent the most important information for inferring air quality. $X^A_s$ is the sequence of air pollutant quantities in $D^A$ of station $s$. We denote the monitoring factor at time step $t$ as $X^{At}_s$. \noindent {\bf Station location and city location factors} $X^C_c$ and $X^S_s$: The distance and direction from a location to another location are likewise important factors to measure the influence of their respective air quality levels. $X^S_s$ (resp. $X^C_c$) is the relative position that depecits the distance and angle from station $s$ (resp. source city $c$) to the target location $l_{\mathit{tgt}}$ (resp. target city $c_{\mathit{tgt}}$). \smallskip Our features combine the above factors. The target location feature ${\mathbf X}^{\mathit{tgt}}$, monitoring station feature ${\mathbf X}^{\mathit{stn}}_s$, and city feature ${\mathbf X}^{\mathit{city}}$ are given as follows: \begin{eqnarray} {\mathbf X}^{\mathit{tgt}} &=& X_{l_{\mathit{tgt}}}^{P} \cup X_{l_{\mathit{tgt}}}^{R} \cup X_{l_{\mathit{tgt}}}^{M}, \nonumber \\ {\mathbf X}^{\mathit{stn}}_s &=& \textit{X}_{l_{s}}^{P} \cup X_{l_{s}}^{R} \cup X_{l_{s}}^{M} \cup X_{s}^{A} \cup X_{s}^{S}, ~\mathrm{and} \nonumber \\ {\mathbf X}^{\mathit{city}} &=& \cup_{c \in C_{\mathit{src}}}\{X_{c}^{C}\}. \nonumber \end{eqnarray} Here, since the air quality changes time by time, it is preferable that all factors are time-dependent. Due to limited data sources, it is necessary to support both time-independent and time-dependent data. \subsection{Inference architecture} We introduce our inference architecture AIREX. Figure \ref{fig:airex} shows components of AIREX. AIREX has three input types: ${\mathbf X}^{\mathit{tgt}}$, ${\mathbf X}^{\mathit{stn}}_s$ for $\forall s \in S$, and ${\mathbf X}^{\mathit{city}}$, and it contains five layers: encode, station-based attention, city-based attention, experts, and mixture layers. We describe each layer in the following. \begin{figure}[t] \includegraphics[width=1.0\linewidth]{figures/airex-crop.pdf} \caption{Neural network structure of AIREX} \label{fig:airex} \end{figure} \begin{comment} \noindent \end{comment} \smallskip \noindent {\bf Encode layer}: The encode layer transforms ${\mathbf X}^{\mathit{tgt}}$ and ${\mathbf X}^{\mathit{stn}}_s$. Each feature includes time-independent (e.g., PoI) and time-dependent (e.g., meteorology) data. We transform time-dependent and time-independent factors by LSTM and FC, respectively~\cite{Cheng2018AStations}. We use different models for ${\mathbf X}^{\mathit{tgt}}$ and ${\mathbf X}^{\mathit{stn}}_s$ because they include different factors; however, we use the same LSTM and FC for all monitoring stations to increase generalization ability. We first explain models for time-depending factors in ${\mathbf X}^{\mathit{stn}}_s$. $X_{l_{s}}^{M}$ and $X_{l_{s}}^{A}$ at time step $t$ are transformed into $\textit{\textbf{h}}_{s}^{t}$ as follows: {\small \begin{eqnarray} \textbf{i}_{s}^{t} &\!\!\!\!\!\!=&\!\!\!\!\!\! \sigma(\textbf{W}_{ix}\textit{(X}_{l_{s}}^{Mt}\oplus\textit{X}_{l_{s}}^{At})+\textbf{W}_{ih}\textbf{h}_{s}^{t-1}+\textbf{W}_{ic}\odot\textbf{c}_{s}^{t-1}+\textbf{b}_{i}) \nonumber \\ \textbf{f}_{s}^{t} &\!\!\!\!\!\!=&\!\!\!\!\!\! \sigma(\textbf{W}_{fx}\textit{(X}_{l_{s}}^{Mt}\oplus\textit{X}_{l_{s}}^{At})+\textbf{W}_{fh}\textbf{h}_{s}^{t-1}+\textbf{W}_{fc}\odot\textbf{c}_{s}^{t-1}+\textbf{b}_{f}) \nonumber \\ \textbf{c}_{s}^{t} &\!\!\!\!\!\!=&\!\!\!\!\!\! \textbf{f}_{s}^{t}\odot\textbf{c}_{s}^{t-1}+\textbf{i}_{s}^{t}\odot tanh(\textbf{W}_{cx}\textit{(X}_{l_{s}}^{Mt}\oplus\textit{X}_{l_{s}}^{At})+\textbf{W}_{ch}\textbf{h}_{s}^{t-1}+\textbf{b}_{c}) \nonumber \\ \textbf{o}_{s}^{t} &\!\!\!\!\!\!=&\!\!\!\!\!\! \sigma(\textbf{W}_{ox}\textit{(X}_{l_{s}}^{Mt}\oplus\textit{X}_{l_{s}}^{At})+\textbf{W}_{oh}\textbf{h}_{s}^{t-1}+\textbf{W}_{oc}\odot\textbf{c}_{s}^{t}+\textbf{b}_{o}) \nonumber \\ \textbf{h}_{s}^{t} &\!\!\!\!\!\!=&\!\!\!\!\!\! \textbf{o}_{s}^{t}\odot tanh(\textbf{c}_{s}^{t}) \nonumber \end{eqnarray} } \noindent where, $\textit{\textbf{W}}$ is weight matrix, $\textit{\textbf{b}}$ is bias vector, and $\odot$ indicates Hadamard product. $\textit{\textbf{i}}$, $\textit{\textbf{f}}$, $\textit{\textbf{o}}$, $\textit{\textbf{c}}$, and $\textit{\textbf{h}}$ are input gate, forget gate, output gate, memory cell, and final states of hidden layer, respectively. Next, we describe models for time-independent factors. $X_{l_{s}}^{P}$, $X_{l_{s}}^{R}$, and $X_{l_{s}}^{S}$ in ${\mathbf X}^{\mathit{stn}}_s$ are translated into embedding $\textbf{z}_{s}^{(n)}$ as follows: {\small \begin{eqnarray} \textbf{z}_{s}^{(i)}= \begin{cases} ReLU(\textbf{W}_{s}^{(i)}(X_{l_s}^{P}\oplus X_{l_s}^{R} \oplus X_{l_{s}}^{S})+\textbf{b}_{s}^{(i)}), i=1 \\ ReLU(\textbf{W}_{s}^{(i)}\textbf{z}_{s}^{ni1}+\textbf{b}_{s}^{(i)}), 1 < i \leq L \\ \end{cases} \nonumber \end{eqnarray} } \noindent where $L$ denotes the number of hidden layers. ${\mathbf X}^{\mathit{tgt}}$ is transformed in the same way as ${\mathbf X}^{\mathit{stn}}_s$. The difference is the input factors. Finally, the transformed features generated by the LSTM and FC are concatenated to input another FC to obtain the features $\textbf{z}_{*}^{(n')}$ as follows: {\small \begin{eqnarray} \textbf{z}_{*}^{(i')}= \begin{cases} ReLU(\textbf{W}_{*'}^{(i')}(\textbf{z}_{*}^{L}\oplus\textbf{h}_{*}^{t})+\textbf{b}_{*'}^{(i')}), i'=L+1 \\ ReLU(\textbf{W}_{*'}^{(i')}\textbf{z}_{*}^{i'-1}+\textbf{b}_{*'}^{(i')}), i' \in [L+2,L+L'] \\ \end{cases} \nonumber \end{eqnarray} } \noindent where $*$ indicates either $l_{\mathit{tgt}}$ or $s$ and $L'$ denotes the number of hidden layers. \smallskip \noindent {\bf City-based Attention layer}: Not all source cites contribute equally to inference in the target city. AIREX automatically captures the importance of different city data by employing the attention mechanism. The city-based attention layer computes {\it city-attention factor} which represents the weights of influences of source cities to air quality in the target city. The city-attention factor $\beta_{c_{k}}$ of source city $c_k$ is computed as follows: {\small \begin{eqnarray} \textbf{z}_{\oplus k}^{(L+L')} &\!\!\!\!\!\!=&\!\!\!\!\!\! \textbf{z}_{s_{k,1}}^{(L+L')}\oplus\cdots\oplus\textbf{z}_{s_{k,n}}^{(L+L')} \nonumber \\ \beta'_{c_{k}} &\!\!\!\!\!\!=&\!\!\!\!\!\! \textbf{w}_{\beta}^{\intercal}ReLU(\textbf{W}_{\beta}(\textbf{z}_{l_{\mathit{tgt}}}^{(L+L')}\oplus\textbf{z}_{\oplus k}^{(L+L')}\oplus X_{c_{k}}^{C})+\textbf{b}_{\beta})+b_{\beta} \nonumber \\ \beta_{c_{k}} &\!\!\!\!\!\!=&\!\!\!\!\!\! \frac{exp(\beta'_{c_{k}})}{\Sigma_{c\in C_{\mathit{src}}}{exp(\beta'_{c})}} \nonumber \end{eqnarray} } \noindent {\bf Station-based Attention layer}: Each monitoring station has a different impact to the target location, as distances and angles between each monitoring station and target location are different as well as similarity of their features. In the station-based attention layer, we compute {\it station-affect factor}, which is a weight of influence of monitoring stations on the air quality of the target location. The station-affect factor $\alpha_{k, i}$ for stations $s_i$ in source city $c_k$ is calculated by the following equation: {\small \begin{eqnarray} \alpha'_{k,i} &=& \textbf{w}_{\alpha}^{\intercal}ReLU(\textbf{W}_{\alpha}(\textbf{z}_{l_{\mathit{tgt}}}^{(L+L')}\oplus\textbf{z}_{s_{k,i}}^{(L+L')})+\textbf{b}_{\alpha})+b_{\alpha} \nonumber \\ \alpha_{k,i} &=& \frac{exp(\alpha'_{k,i})}{\Sigma_{s_{i}\in S_{k}}{exp(\alpha'_{k,i})}} \nonumber \end{eqnarray} } We then compute embedding $\textit{\textbf{z}}_{c_k}$ of source city with station affect-factors as follows: \begin{eqnarray} \textit{\textbf{z}}_{c_k}=\sum_{s_{i}\in S_{k}}{\alpha_{k,i}\textbf{z}_{s_{k,i}}^{(L+L')}}. \nonumber \end{eqnarray} \noindent $\textit{\textbf{z}}_{c_k}$ represents how much is influence air quality of source city $c_k$ to the target location. \smallskip \noindent {\bf Experts layer}: The experts layer computes an inferred value on each source city. Inferred value $\tilde{y}_{c_{k}}$ of $c_k$ is computed by the following equation: {\small \begin{eqnarray} \tilde{y}_{c_{k}}=\textbf{w}_{k}^{\intercal}ReLU(\textbf{W}_{k}(\textbf{z}_{l_{\mathit{tgt}}}^{(L+L')}\oplus\textit{\textbf{z}}_{c_k}))+\textbf{b}_{k})+b_{k}. \nonumber \end{eqnarray} } This equation represents an expert model. We use this simple model for all cities to eliminate the the impact of performance of experts to the final output in this paper. \smallskip \noindent {\bf Mixture layer}: We obtain the inferred value by summing outputs of experts weighted by city attention factors as follows: {\small \begin{eqnarray} \tilde{y}=\sum_{c_{k}\in C_{\mathit{src}}}{\beta_{c_{k}}\tilde{y}_{c_{k}}}. \nonumber \end{eqnarray} } \subsection{Training method} One of the major challenges of our study is the training of AIREX because we cannot directly train our model due to missing air quality data of the target city. We develop a training method in an unsupervised manner. We describe our approach and loss function in the training phase. \smallskip \noindent {\bf Overall idea}: We employ a meta-training approach~\cite{Guo2018Multi-sourceExperts}, which supports to learn the differences between individual features and cities in an unsupervised setting. Given a set of source cities, the meat-training approach regards a single source city as a {\it temporal} target city, and then trains models using the pair of temporal target and other source cities. The temporal target and other source cities are referred to as the {\it meta-target} $c_t$ and {\it meta-sources} $c_i \in C_s$, respectively. We obtain $|C_{\mathit{src}}|$ training pairs of meta-target and meta-sources. We use a multi-task learning method with a shared encoder. We design loss functions for accurately inferring air quality and capturing the difference between source and target cities. \smallskip \noindent {\bf Loss functions}: The main objective of our training is that the final outputs are closer to the actual value. Since we have multiple experts, we additionally train them. It is not sufficient to evaluate the difference between outputs and true values because we must capture the correlations between the source and target cities. Since we do not have air quality data in the target city, we must indirectly learn the correlations. For this purpose, we use a loss for minimizing the difference between the transformed features of cities. We note that the true values in training phase are air quality of the meta-targets instead of the actual target location. The loss $\mathcal{L}_{{\mathit f}}$ is the main loss function for evaluating the inference accuracy. $\mathcal{L}_{{\mathit f}}$ is computed by the mean squared error (MSE) between the final output $\tilde{y}$ and true value $y$ as follows: {\small \begin{eqnarray} \mathcal{L}_{{\mathit f}}=\frac{1}{|\mathcal{T}|}\sum_{x \in \mathcal{T}}{(\tilde{y}(x)-y(x))^{2}} \nonumber \end{eqnarray} } \noindent where $\mathcal{T}$ denotes the set of training pairs. The loss $\mathcal{L}_{{\mathit m}}$ is one for evaluating the inference accuracy of an individual expert. $\mathcal{L}_{{\mathit m}}$ is computed by MSE between $\tilde{y}_{c_{k}}$ for source city $c_k$ of outputs of experts and $y$. {\small \begin{eqnarray} \mathcal{L}_{{\mathit m}}=\frac{1}{|C_s|}\sum_{c_{i}\in C_s}\left( \frac{1}{|\mathcal{T}|}\sum_{x \in \mathcal{T}}{(\tilde{y}_{c_{i}}(x)-y(x))^{2}}\right). \nonumber \end{eqnarray} } The loss $\mathcal{L}_{{\mathit a}}$ is for evaluating the difference of cities. It is computed based on maximum mean discrepancy (MMD)~\cite{Gretton2012ATest} as the adversary to minimize the divergence between the marginal distribution of target and source cities. MMD is known as effective distance metric measures for evaluating the discrepancy between two distributions explicitly in a non-parametric manner. {\small \begin{eqnarray} \mathcal{L}_{{\mathit a}} &=& {\mathit MMD}^{2}(\textbf{z}_{\cup c_1}\cup\cdots\cup\textbf{z}_{\cup c_{|C_s|}},\textbf{z}_{\cup c_t}), \nonumber \\ \textbf{z}_{\cup c_i} &=& \cup_{s \in S_i} \textbf{z}_{s}^{(L+L')}, \nonumber \\ {\mathit MMD}(\mathcal{X},\mathcal{X'}) &=& \bigg\rvert\bigg\rvert\frac{1}{|\mathcal{X}|}\sum_{\textbf{x}\in\mathcal{X}}{\phi(\textbf{x})}-\frac{1}{|\mathcal{X'}|}\sum_{\textbf{x}'\in\mathcal{X'}}{\phi(\textbf{x}')} \bigg\lvert\bigg\lvert_{\mathcal{H}}, \nonumber \end{eqnarray} } In MMD computation, $\mathcal{H}$ indicates the reproducing kernel Hilbert space (RKHS) and $\phi$ is the mapping function to RKHS space. In our method, we compute the MMD score by the kernel method~\cite{Bousmalis2016DomainNetworks}. The kernel method computes the MMD score as follows: {\small \begin{eqnarray} {\mathit MMD}(\mathcal{X},\mathcal{X'}) &=& \frac{1}{|\mathcal{X}|(|\mathcal{X}|-1)}\sum_{\textbf{x},\textbf{x}' \in \mathcal{X}, \textbf{x} \neq \textbf{x}'}{\mathcal{K}(\textbf{x}, \textbf{x}')} \nonumber \\ &+& \frac{1}{|\mathcal{X'}|(|\mathcal{X'}|-1)}\sum_{\textbf{x},\textbf{x}' \in \mathcal{X'}, \textbf{x} \neq \textbf{x}'}{\mathcal{K}(\textbf{x}, \textbf{x}')} \nonumber \\ &-& \frac{2}{|\mathcal{X}||\mathcal{X'}|}\sum_{\textbf{x} \in \mathcal{X}} \sum_{\textbf{x}' \in \mathcal{X}'}{\mathcal{K}(\textbf{x},\textbf{x}')} \nonumber \end{eqnarray} } where, $\mathcal{K}$ indicates a Gaussian karnel function: $\mathcal{K}(\textbf{x},\textbf{x}') = exp(-\frac{1}{2\sigma^{2}}||\textbf{x}-\textbf{x}'||^{2})$. We further use regularization of $\beta$ to avoid overfitting. The regularization computes the entropy of $\beta$ and the sum of them. {\small \begin{eqnarray} \mathcal{R} = \sum_{c_{i}\in C_s}{\beta_{c_{i}} \log \beta_{c_{i}}} \end{eqnarray} } The total loss function to be minimized in our training phase is defined as follows: \begin{eqnarray} \mathcal{L}=\lambda\cdot\mathcal{L}_{{\mathit f}}+(1-\lambda)\cdot\mathcal{L}_{{\mathit m}}+\gamma\cdot\mathcal{L}_{{\mathit a}}+\zeta\cdot\mathcal{R} \nonumber \end{eqnarray} where $\lambda$, $\gamma$, and $\zeta$ are hyper parameters. \section{Experiments} In this section, we evaluate the inference accuracy of AIREX compared with the state-of-the-art methods. We aim to validate that AIREX can accurately infer air quality in unmonitored cities and other methods cannot\footnote{Please see a supplementary file for detail implementation, data statistics, and additional results.}. \subsection{Experimental settings} \noindent {\bf Dataset}: We use data of 20 cities in China spanning four months from June 1st 2014/6/1 to September 30th 2014. We collect air quality data, road network, PoI, and meteorology data as follows. Air quality data is provided as open data by Microsoft\footnote{\url{www.microsoft.com/en-us/research/project/urban-computing/}}. We focus on inferring PM$_{2.5}$. We collect PoI data from Foursquare\footnote{\url{developer.foursquare.com}} and categorize them into ten categories according to the official categories provided by Foursquare. For road network data, we use OpenStreetMap\footnote{\url{www.openstreetmap.org/}}, and roads are categorised into three types; highway, trunk, and other. For meteorology data, we use weather, temperature, air pressure, humidity, wind speed, and wind direction, which is also provided by Microsoft. Air quality and meteorology data are sampled every hour. \smallskip \noindent {\bf Evaluation}: We select four cities as target cities; Beijing, Tianjin, Shinzhen, and Guangzhou. Beijing and Tianjin are cities in the northern area of China, whereas Shinzhen and Guangzhou are in the south. We randomly select five monitoring stations from each city for training and test data. The ratio of training and test data is $|C_{\mathit{src}}|$ to one As evaluation metrics of inference accuracy, we use the root mean squared error (RMSE) for PM$_{2.5}$, which is a standard metric \cite{Xu2016WhenInference,Cheng2018AStations}. We run three times for training by changing monitoring stations. \noindent {\bf Compared methods and hyper parameters}: We compare AIREX with three approaches: (a) k nearest neighbors (KNN): This method selects the $k$ monitoring stations closest to the target location, and compute the average air pollutant quantities from these stations as result. We set $k$ to be three in our experiments. (b) Feedforward neural networks (FNN): This method uses a simple neural network model, whose inputs are ${\mathbf X}^{\mathit{tgt}}$ and ${\mathbf X}^{\mathit{stn}}_s$ for all stations. In our experiments, the model consists of three layers with 200 units. For sequential features, we only use their values at the same time step of the inferred air quality. (c) ADAIN: This method represents the state-of-the-art neural network model for inferring air quality \cite{Cheng2018AStations}. We use two cases of source cities: ADAIN5 and ADAIN19, whose source cities are the five cities closest to the target city and all source cities, respectively. In parameter settings of AIREX and ADAIN, we follow the setting in experiments of ADAIN~\cite{Cheng2018AStations}. We construct a single basic FC layer ($L=1$) with 100 neurons and two LSTM layers with 300 memory cells per layer. We then build two layers of the high-level FC network ($L'=2$) with 200 neurons per layer. The time-dependent data is input in 24 time steps (i.e., one day). The number of epochs, the batch size, learning rate are selected from [100, 200, 300], [32, 64, 128, 256, 512], and [0.005, 0.01], respectively, by grid search. In our model, $\lambda$, $\gamma$, and $\zeta$ in AIREX are 0.5, 1.0, and 1.0, respectively. Further detail is provided in our codes. \subsection{Experimental results} Figure \ref{fig:result} shows the inference accuracy for each method. AIREX achieves the best accuracy in Tianjin and Guanzhou and the second best in Beijing and Shinzhen. Since AIREX learns the difference between target and source cities, it can accurately infer air quality without air quality data in the target city. KNN achieves the best accuracy in Beijing and Shinzhen, as these are monitoring stations that very close to the target location, whereas KNN fails the accurate inference when there are no monitoring stations close to the target location like Tianjin and Guangzhou. ADAIN and FNN do not perform well in all target cities. In particular, although ADAIN is the state-of-the-art method for inferring air quality, it does not perform well when the source and target cities are different. We further investigate the difference between AIREX and ADAIN, as ADAIN may perform well if we use optimal source cities. Table \ref{tab:beijing_dist} shows the accuracy of AIREX and ADAIN in Beijing and Guangzhou as target cities (see appendix for Tianjin and Shenzhen). In ADAIN, we use each city as the source city in addition to ADAIN5 and ADAIN19. In Beijing, ADAIN accurately infers the air quality when its source city is Beijing (i.e., target and source cities are the same). However, the accuracy of ADAIN significantly decreases when ADAIN uses different cities even when the source cities are close to Beijing. In Guangzhou, AIREX achieves better performance than ADAIN even when ADAIN uses Guangzhou as the source city. This result indicates that the use of multiple cities increases the inference accuracy if we can capture the correlations of air quality between cities. From these results, we can confirm that our mixture-of-experts approach combined with attention mechanisms performs well for accurately inferring the air quality in unmonitored cities without selecting source cities. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{figures/overview_woLI.pdf} \caption{An overview of accuracy} \label{fig:result} \end{figure} \begin{table}[t] \caption{AIREX vs ADAIN in different source cities. City names indicate the result obtained by ADAIN, where training data is the city. A distance of zero kilometers indicates that the target and source cities are the same.} \label{tab:beijing_dist} \centering \input{tables/dist_beijing} \end{table} \section{Related Work} We review neural network-based approaches for spatially fine-grained air quality inference. Numerous methods have been proposed \cite{Shad2009PredictingGIS,Hasenfratz2014PushingMaps,Xu2016WhenInference}, such that employ linear regression, matrix factorization and neural networks. For example, Zheng et al.~\cite{Zheng2013U-Air:Data} proposed U-air, which is a neural network-based classifier model that captures both spatial and temporal correlations. Hu et al.~\cite{Hu2018Real-timeOptimization} proposed an architecture that employs deep reinforcement learning for optimizing air quality sensing systems. Zhong et al.~\cite{zhong2020airrl} proposed AirRL, which consists of station selector that distills monitoring stations using reinforcement learning. Cheng et al.~\cite{Cheng2018AStations} proposed ADAIN, which employs the attention mechanism to assign weights to station-oriented features. We used ADAIN to design encode and station-based attention layers. To the best of our knowledge, we first employ a mixture-of-experts approach for air quality inference. None of them addresses the problem of air quality inference in unmonitored cities. In contrast to these studies, our method assigns weights to each city automatically, without selecting monitoring stations. \section{Conclusion} We addressed a new problem that infers air quality information in unmonitored cities. For the problem, we proposed AIREX, which can accurately infer air quality in unmonitored cities. Experimental studies using real data showed that AIREX outperforms the state-of-the-art methods. As our future works, we address air quality inference in different countries, in particular, countries across sea, and support environments that each city has different data sources. \section{Dataset statistics} Table~\ref{tb:dataset} shows data statistics of each city. Each city has a different number of stations and PM$_{2.5}$ value. We can see that statistics of PM$_{2.5}$ values are different among cities. In particular, air quality in cities placed in northern and southern areas have huge gaps. \begin{table}[!b] \centering {\scriptsize \caption{Data statistics of each city} \label{tb:dataset} \begin{tabular}{cccccc} \hline City & Area & \# of stations & Range & Average & Variance\\ \hline BeiJing & North & 36 & [2.00, 389.00] & 71.84 & 54.72\\ Tianjin & North & 27 & [1.00, 645.00] & 66.50 & 40.31\\ Shijianzhuan & North & 24 & [1.00, 816.00] & 94.09 & 60.58\\ Tangshan & North & 18 & [3.00, 617.00] & 89.86 & 54.45\\ Qinhuangdao & North & 9 & [1.00, 525.00] & 60.93 & 49.64\\ Baoding & North & 27 & [1.00, 705.00] & 93.91 & 48.17\\ Zhangjiakou & North & 19 & [1.00, 628.00] & 36.38 & 31.57\\ Chengde & North & 14 & [1.00, 462.00] & 50.72 & 38.55\\ Cangzhou & North & 16 & [1.00, 359.00] & 72.30 & 35.66\\ Langfang & North & 12 & [1.00, 496.00] & 84.60 & 55.57\\ Hengshui & North & 11 & [1.00, 1273.00] & 91.32 & 40.72\\ Zibo & North & 12 & [8.00, 275.00] & 75.63 & 26.50\\ Shenzhen & South & 11 & [1.00, 122.00] & 18.52 & 14.04\\ Guangzhou & South & 42 & [1.00, 282.00] & 34.97 & 20.44\\ Hong Kong & South & 15 & [1.00, 118.00] & 15.92 & 12.16\\ Dongguan & South & 5 & [6.00, 120.00] & 30.06 & 15.52\\ Foshan & South & 8 & [2.00, 161.00] & 28.49 & 20.81\\ Huizhou & South & 7 & [1.00, 147.00] & 23.25 & 14.87\\ Jiangmen &South & 7 & [1.00, 400.00] & 23.48 & 18.16\\ Shantou & South & 6 & [1.00, 105.00] & 21.79 & 14.73\\ \hline \end{tabular} } \end{table} \section{Training and inference time} Experiments were performed on a Linux server with 64GB of memory, an Intel(R) Xeon(R) CPU E5-2640 v4 @2.10GHz processor, and NVIDIA Tesla K40 of GPU. Our model takes 0.7 seconds for inference and 1.48 hours as training for one epoch. \section{AIREX vs ADAIN} Table 1 in the main body shows the inference accuracy in Beijing and Guanzhou. Table~\ref{tab:tianjin_dist} shows the inference accuracy in Tianjin and Shenzhen. These results are similar tendency to the result of Beijing and Guanzhou. \begin{table}[t] \caption{AIREX vs ADAIN in different source cities. City names indicate the result obtained by ADAIN, where training data is the city. A distance of zero kilometers indicates that the target and source cities are the same.} \label{tab:tianjin_dist} \centering {\scriptsize \begin{tabular}{|ll|r|r|r|r|} \hline \multicolumn{2}{|c|}{\multirow{2}{*}{Method}} & \multicolumn{2}{c|}{Tianjin} & \multicolumn{2}{c|}{Shenzhen} \\ \cline{3-6} & & \multicolumn{1}{|c|}{RMSE} & \multicolumn{1}{c|}{Dist. {[}km{]}} & \multicolumn{1}{c|}{RMSE} & \multicolumn{1}{c|}{Dist. {[}km{]}} \\ \hline \multicolumn{2}{|c|}{AIREX} &31.60& --- &10.90& ---\\\hline \multirow{21}*{\rotatebox[origin=c]{90}{ADAIN}}&5 NN cities &45.86&--- &14.99 & ---\\ &19 cities&36.76& --- &14.35& ---\\ &Beijing &50.69& 113.8 & 70.33 & 1,937.7 \\ &Langfang & 45.44 & 67.3 & 58.88& 1,900.6 \\ &Tianjin & 34.76 & 0 &46.25&1,858.1 \\ &Baoding & 54.42 & 152.2 &82.30& 1,815.5\\ &Tangshan& 41.93 & 104.0 &70.65& 1,934.4 \\ &Zhangjiakou & 57.94 & 272.2 &21.60& 2,022.3\\ &Chengde & 52.21 & 217.4 & 38.26 & 2,074.0\\ &Cangzhou & 47.87 & 92.1 & 58.91 & 1,767.4\\ &Hengshui & 50.49 & 200.4 & 64.77& 1,691.6 \\ &Shijiazhuang & 60.10 & 261.1 & 92.01& 1,718.8 \\ &Qinhuangdao& 49.78 & 227.0 & 28.14 & 1,998.2 \\ &Zibo & 50.13 & 263.0 & 69.35 & 1,628.0\\ &Shantou & 65.65 & 1,744.8 & 18.19& 283.7 \\ &Huizhou & 63.85 & 1,790.5 & 12.61 & 72.9 \\ &Guangzhou & 58.26 & 1,807.9 & 22.75 & 104.1 \\ &Dongguan & 58.50 & 1,810.8 & 16.86& 61.5 \\ &Foshan & 57.06 & 1,822.4 & 18.88 & 109.8\\ &Shenzhen & 66.61 & 1,858.1 & 10.49 & 0 \\ &Jiangmen &66.15 & 1,871.3 & 17.02&100.5 \\ &Hong Kong & 68.98 & 1,873.3 & 13.14& 17.1\\ \hline \end{tabular} } \end{table} \end{document} \section{Introduction} This short example shows a contrived example on how to format the authors' information for {\it IJCAI--21 Proceedings}. \section{Author names} Each author name must be followed by: \begin{itemize} \item A newline {\tt \textbackslash{}\textbackslash{}} command for the last author. \item An {\tt \textbackslash{}And} command for the second to last author. \item An {\tt \textbackslash{}and} command for the other authors. \end{itemize} \section{Affiliations} After all authors, start the affiliations section by using the {\tt \textbackslash{}affiliations} command. Each affiliation must be terminated by a newline {\tt \textbackslash{}\textbackslash{}} command. Make sure that you include the newline on the last affiliation too. \section{Mapping authors to affiliations} If some scenarios, the affiliation of each author is clear without any further indication (\emph{e.g.}, all authors share the same affiliation, all authors have a single and different affiliation). In these situations you don't need to do anything special. In more complex scenarios you will have to clearly indicate the affiliation(s) for each author. This is done by using numeric math superscripts {\tt \$\{\^{}$i,j, \ldots$\}\$}. You must use numbers, not symbols, because those are reserved for footnotes in this section (should you need them). Check the authors definition in this example for reference. \section{Emails} This section is optional, and can be omitted entirely if you prefer. If you want to include e-mails, you should either include all authors' e-mails or just the contact author(s)' ones. Start the e-mails section with the {\tt \textbackslash{}emails} command. After that, write all emails you want to include separated by a comma and a space, following the same order used for the authors (\emph{i.e.}, the first e-mail should correspond to the first author, the second e-mail to the second author and so on). You may ``contract" consecutive e-mails on the same domain as shown in this example (write the users' part within curly brackets, followed by the domain name). Only e-mails of the exact same domain may be contracted. For instance, you cannot contract <EMAIL>" and <EMAIL>" because the domains are different. \end{document}
\section{Introduction} Various proofs exist that hidden variables are incompatible with the principles and rules of Quantum Mechanics (see, e.g. [\cite{Nmn,Bel,Blf}]). However there are quantities that may be regarded as a sort of hidden variables of Quantum Mechanics. These quantities are the phases of wave functions. As a rule these phases do not enter the final QM expressions for the observed physical quantities though frequently they implicitly determine their values or even the very existence of QM effects. Neglecting the phase role makes inexplicable the peculiar quantum effects such as particle interference, Einstein-Podolsky-Rosen correlation and many others. To the contrary the adequate inclusion of phases into consideration reduces QM puzzles and mysteries to simple and obvious triviality. \section{Bra, Ket and Wavicle} \par Dirac in his notorious book [\cite {D}] introduced the bra and ket functions (or vectors in Hilbert space) and the corresponding expression (bracket) for the observable physical quantity. Let us consider an observable physical quantity $c$ for the simple case of a quantum particle in some space volume $V$. In the usual notations and in Dirac's notation we have: \begin{equation}\label{1} \bar{c}=\langle \psi|C|\psi\rangle\equiv\int_V d{\bf r}d{\bf r'}\psi^\dag({\bf r},t)C({\bf r}|{\bf r'})\psi({\bf r'},t) \end{equation} Three quantities stand in this expression: the bra-wave function (or bra-vector) $\langle \psi|\equiv\psi^\dag({\bf r},t)$ then the operator of physical observable $\hat{c}$ with the kernel $C({\bf r}|{\bf r'})$ and the ket-wave function (ket-vector) $|\psi\rangle\equiv \psi({\bf r'},t)$. \par The bra and ket functions are under permanent action of Hamiltonian $H$ and satisfy the equations of motion (Schr\"{o}dinger equations). We have for the ket-function \begin{equation}\label{2} (\partial_t+iH)\psi(x,t)=\psi(x,0)\delta(t) \end{equation} (for brevity we take $\hbar=1$ and do not write the vector signs for space coordinates ${\bf r}\equiv x$). The solution of the equation (\ref{2}) in the resolvent form or as the multiplicative integral is given by \begin{equation}\label{3} \psi(x,t)=\frac{1}{\partial_t+iH}\psi(x,0)\delta(t)=\Pi_0^t(1-iHdt)\psi(x,0) \end{equation} For the bra-function we have analogously \begin{equation}\label{4} \psi^\dag(x,t)=\frac{1}{\partial_t-iH}\psi^\dag(x,0)\delta(t))=\Pi_0^t(1+iHdt)\psi^\dag(x,0) \end{equation} The multiplicative integrals at right in (\ref{3}) and (\ref{4}) show how the Hamiltonian acts at the wave function changing it in every moment of time. \par For time-independent $H$ the solutions simplify: \begin{equation}\label{5} \psi(x,t)=\exp(-iHt)\psi(x,0), \quad \psi^\dag(x,t)=\exp(iHt)\psi^\dag(x,0) \end{equation} \par For the eigenfunctions of Hamiltonian $H\psi_p=\epsilon_p\psi_p$ which we take as the set the normalized and orthogonal functions $$\langle p|k\rangle=0,\quad \langle k|p\rangle=0 \quad \langle p|p\rangle=1, \quad \langle k|k\rangle=1$$ the time dependence reduces to the phase change $\psi\equiv\psi_p$: \begin{equation}\label{6} \psi^\dag_p(x,t)=e^{+i\epsilon_pt-i\varphi_p}\psi^\dag_p(x) ,\quad \psi_p(x,t)=e^{-i\epsilon_pt+i\varphi_p}\psi_p(x) \end{equation} Here $\varphi_p$ is the initial phase. \par Now let us decompose the initial wave function $\psi(x,0)\equiv\psi_0$ into a series of Hamiltonian eigenfunctions. Using (\ref{6}) we get for the bra-function $\psi^\dag(x,t)\equiv \psi^\dag(t)$ and ket-function $\psi(x,t)\equiv \psi(t)$ the expressions: \begin{equation}\label{7} \psi(t)=\sum_pa_pe^{-i\epsilon_pt+i\varphi_p}\psi_p, \quad \psi^\dag(t)=\sum_pa_p^\dag e^{+i\epsilon_pt-i\varphi_p}\psi_p^\dag \end{equation} The equations of motion for bra and ket are linear so the sum of solutions is also a solutions. The expressions for physical observable quantities are bilinear on bra and ket. This peculiarity of quantum mechanics leads to the existence of two different contributions to the value of a physical quantity. Indeed, substituting (\ref{7}) into (\ref{1}) with $C\equiv U(x)$ we obtain two parts of the observable $U$. The first part contains only diagonal matrix elements $\langle p|U|p\rangle$ of the operator of observable $U$ and does not depend on time and initial phases: \begin{equation}\label{8} \overline{U}=\sum_p\langle p|U|p\rangle |a_p|^2=\sum_p\langle p|U|p\rangle F_p \end{equation} Here $F_p$ is the occupation number (or distribution function) for the quantum state $p$. The sum of $F_p$ over $p$ is equal to the total number $N$ of quantum particles: $N=\sum_pF_p$. For one particle $F_p$ describes the probability for a particle to be in the state $p$. \par Another part of $U$ contains the non-diagonal matrix elements $\langle p|U|k\rangle$ and depends on time and initial phases. We denote it as $\Delta U(t)$: \begin{equation}\label{9} \Delta U(t)=\sum_{p\neq k}\langle p|U|k\rangle a^\dag_pa_k e^{i(\epsilon_p-\epsilon_k)t-i(\varphi_p-\varphi_k)} \end{equation} Note that this contribution vanishes after averaging over time or initial phases. \par The total observable $U(t)$ is given by the sum of (\ref{8}) and (\ref{9}): \begin{equation}\label{10} U(t)=\overline{U}+\Delta U(t), \quad \overline{\Delta U(t)}=0 \end{equation} We see that the physical quantity $U(t)$ is the sum of the constant background $\overline{U}$ and the alternating fluctuations $\Delta U(t)$ over this background with zero mean value. Note that phases explicitly enter only into the fluctuation part of observable data (\ref{9}). Implicitly the phases are contained also in the background part (\ref{8}) since the probability $F_p$ there is formed by the bra and ket with the same phases. One may say that $F_p$ is the mean number of bra and ket with the same phases. \par Since the operator $U$ can be arbitrary the state of a quantum object is determined by the bra and ket taken in one moment of time. It is reasonable to put just such bra+ket pairs (of functions or objects behind them) into correspondence to the potentially observable quantum particles. As it is known they are not waves and not corpuscles revealing nevertheless the wave and corpuscle properties. Following Eddington let us call such objects by {\it wavicles}. The bra and ket have phases and the wavicles also have phases which are equal to the bra and ket phase differences. The expressions (\ref{8} - \ref{10}) show that there are zero phase wavicles formed by bra and ket with the same phase. These wavicles contribute to the constant background of physical quantities looking like classical particles and revealing themselves as corpuscles. The wavicles with phases either initial or acquired during time evolution until the observation moment reveal themselves as quantum fluctuations. Their contributions into observable quantities depend on phases and vanish after phase averaging. Just these wavicles with phases are responsible for the wave properties of quantum particles. \section{Diagrams} \par Now let us depict all written above as quantum diagrams. The diagrams are much more transparent than letter formulae. We use the diagrams where each diagram picture has one to one correspondence to the letter formulae and one can easily write the analytical expression for a diagram picture. \par The quantum diagram pictures for the wave functions (bra and ket), the observable quantities, the occupation numbers and the action of a perturbation potential are presented in the Figure 1. \begin{figure}[htb] \begin{center} \includegraphics[width=4in]{phase1}\\ \end{center} \caption{\label{phase1} Basic diagram symbols} \end{figure}\\ Because of simplicity of these diagrams and their direct connection with analytical formulae here no rigorous derivation is necessary. (For more details see [\cite{prb,fnl10,fnl13,gan17}]). \par The diagram (F1.1) at the left represents the bra and ket by two lines with time arrows which correspond $\psi^\dag(t)$ and $\psi(t)$. The time goes from bottom $t=0$ to the top time $t$. At $t=0$ we have $\psi^\dag(0)$ for the bra and $\psi(0)$ for the ket. The line intervals between these points show time evolution and correspond the resolvents $1/(\partial_t-iH)$ for the bra and $1/(\partial_t+iH)$ for the ket. Going from top to bottom of the lines (i.e. against time) and writing consecutively all symbols we get exactly the solutions of the equations of motion (\ref{3}) and (\ref{4}). Note that the diagrams represent the solutions of the equations. \par The resolvents can be understood as the infinite series of events when the Hamiltonian $H$ acts during the time interval $(0t)$ by zero, one, two, three and more times. For the ket we have: \begin{equation}\label{11} \frac{1}{\partial_t+iH}=\frac{1}{\partial_t}+\frac{1}{\partial_t}(-iH)\frac{1}{\partial_t} +\frac{1}{\partial_t}(-iH)\frac{1}{\partial_t}(-iH)\frac{1}{\partial_t}+... \end{equation} and the analogous expression for the bra with the substitution $(-iH)\rightarrow (+iH)$. The symbols $1/\partial_t$ correspond to time integrations over intervals where nothing occur while symbols $H$ describe the momentary Hamiltonian action under which the bra or ket states abruptly change. \par The multiplicative integrals in (\ref{3}) and (\ref{4}) give another interpretation picture. At each time moment the evolution looks like some Poisson-type process with the alternative for the Hamiltonian to act or not to act. \par The right diagram (F1.5) describes the action of a perturbation potential $V$. The potential action can be represented as a series of events similar to the expression (\ref{11}). We have for the ket: \begin{equation}\label{12} \frac{1}{\partial_t+iH+iV}=\frac{1}{\partial_t+iH}+\frac{1}{\partial_t+iH}(-iV)\frac{1}{\partial_t+iH} +... \end{equation} Here events correspond only to the perturbation action while the Hamiltonian action is taken into account as the part of normal evolution. The points on the lines describes the perturbation actions. Note that after the perturbation point the bra remains bra and the ket remains ket. The $k\rightarrow p$ transition under the action of $V$ gives the usual expression of the perturbation theory. For the ket we have \begin{equation}\label{13} \langle p|\frac{1}{\partial_t+iH}(-iV)\frac{1}{\partial_t+iH}|k\rangle =\frac{1}{\partial_t+i\epsilon_p}(-i\langle p|V|k\rangle)\frac{1}{\partial_t+i\epsilon_k} \end{equation} and the similar expression for the bra. Note that in written formulae the future is at left and the past is at right, so the ordinary left to right writing order of symbols is against the diagram time direction. \par The diagram (F1.2) shows the time evolution of the wavicle for the quantum state $k$ occupied with the probability $F_k$. The wavicle is composed by the pair of bra+ket lines with the same quantum indices and initial phases. Again going from top to bottom of the diagram we get: \begin{equation}\label{14} F_k(t)=\frac{1}{\partial_t-i\epsilon_k+i\epsilon_k}F_k(0)\delta(t)=F_k(0)\frac{1}{\partial_t}\delta(t)= F_k(0)\Theta(t) \end{equation} Here $\Theta(t)=(1/\partial_t)\delta(t)$ is the step-function of Heaviside, $\Theta(t)=0$ for $t<0$ and $\Theta(t)=1$ for $t\geq 0$. The bra and ket of the wavicle have phases which are time-dependent. But the wavicle phase remains zero because of the phase equality $e^{i\epsilon_kt-i\varphi_k}e^{-i\epsilon_kt+i\varphi_k}=1$. \par The initial state occupation number $F_k(0)$ is represented by the horizontal bar at $t=0$. Such symbols and the time ordering of events (points) on the diagram lines are the main differences between our diagrams and the widely used Feynman diagrams (see, e.g. [\cite{F,BD,R}]). \par The diagram (F1.3) shows the mean contribution to the physical quantity $\overline{U}$ from the wavicles of the occupied state $k$. The value is given by the matrix element $\langle k|U|k\rangle$ which corresponds to the top point where the bra and ket lines enter. This point describes the "classical device" of Bohr needed for a measurement. Measurements really are complicated physical processes with many stages. All concrete details of such processes and the necessary averaging of final data are implicitly included in the values of corresponding matrix elements. Bohr's "classicality" of a device simply means that two undetectable elements of Quantum World (i.e. bra and ket) unite in the device to become detectable in our Classical World. \par The contribution to the fluctuation part $\Delta U$ of the observable $U$ is shown in the diagram (F1.4). This part is given by the bra and ket with different quantum indices and initial phases as it is shown in (\ref{9}). Reading the diagram we get ($t\geq t'$): \begin{equation}\label{15} \langle k|U|p\rangle\frac{1}{\partial_t-i\epsilon_k+i\epsilon_p}a^\dag_ka_p e^{-i(\varphi_k-\varphi_p)}\delta(t-t')=\langle k|U|p\rangle a^\dag_ka_p e^{i(\epsilon_k-\epsilon_p)(t-t')-i(\varphi_k-\varphi_p)} \end{equation} Let us note that the measurement points in the diagrams (F1.3) and (F1.4) differ essentially from the perturbation points in the diagram (F1.5). Perturbations points in bra and ket lines do not change their properties, i.e. the bra remains bra and ket remains ket. To the contrary the measurement points where the bra and ket line unites signify the end of normal (unitary) evolution prescribed by the motion equations. \par The bra and ket lines with different indices can be obtained by a perturbation action or by the exchange of bra or ket between the wavicles of occupied states. \section{Quantum Exchange} \par If we take at time $t$ two wavicles of the occupied states $k$ and $p$ we will get two bra and two ket with two random phases $\phi_k(t)=\epsilon_kt-\varphi_k$ and $\phi_p(t)=\epsilon_pt-\varphi_p$. (The phases $\phi(t)$ enter in phase multipliers as $e^{i\phi(t)}$ for the bra and $e^{-i\phi(t)}$ for the ket.) From these four {\it independent} objects of Quantum World we can form four wavicles potentially observable in our Classical World. Two of them have zero phase $\beta=0$ while two other have equal and sign-opposite phases $\alpha(t)$ and $-\alpha(t)$: \begin{equation}\label{16} \beta\equiv\phi_p(t)-\phi_p(t)=\phi_k(t)-\phi_k(t)=0, \quad \alpha(t)\equiv\phi_p(t)-\phi_k(t)=-[\phi_k(t) -\phi_p(t)] \end{equation} The phase $\alpha$ is always random even if $\epsilon_k=\epsilon_p$ and all contributions of such wavicles into observable quantities are random and vanish after phase averaging. \par Now let us take two independent detectors and find the observable quantities $A$ and $B$ related to the wavicles of $\beta$ and $\alpha$ types. Since for the $\alpha$-type wavicles $\overline{A}=0$ and $\overline{B}=0$ we consider the correlated values $\overline{AB}$ or $\overline{BA}$. These values taken in one time moment are depicted in the Figure 2. \begin{figure}[htb] \begin{center} \includegraphics[width=4in]{phase2}\\ \end{center} \caption{\label{faza2} Exchange correlation} \end{figure}\\ There are also analogous two diagrams with substitutions $A\rightarrow B$ and $B\rightarrow A$ which we do not depict for brevity. The diagrams correspond to the jointly averaged product of the measurement values in both detectors. \par The left diagram shows the contribution of two wavicles with zero phases. We see that no links between them exist and their contribution is simply the product of two independent values. One wavicle hits one detector while other wavicle hits another detector or vice versa. In this case either separate or joint averaging of the detector data give the same result. Reading this diagrams we have (together with analogous one) the uncorrelated detector contributions: \begin{equation}\label{17} (\overline{AB})_{uncor}=[\langle p|A|p\rangle \langle k|B|k\rangle + \langle k|A|k\rangle \langle p|B|p\rangle ]F_pF_k \end{equation} The right diagram shows the contribution of two wavicles with the same but sign opposite phases. The detector data of such wavicles contain the multipliers $\exp(i\alpha)$ and $\exp(-i\alpha)$ and therefore vanish after separate phase averaging in each detector. However, after the joint averaging the multipliers cancel each other and the joint result becomes phase independent. The corresponding contribution is given by \begin{equation}\label{18} (\overline{AB})_{cor}=\pm[\langle p|A|k\rangle\langle k|B|p\rangle+\langle k|A|p\rangle\langle p|B|k\rangle]F_p F_k \end{equation} The total average $\overline{AB}$ is the sum of the uncorrelated and correlated parts: \begin{equation}\label{19} \overline{AB}=[\langle p|A|p\rangle \langle k|B|k\rangle \pm \langle p|A|k\rangle \langle k|B|p\rangle ]F_p F_k+(A\rightleftarrows B) \end{equation} The sign of correlation contribution is negative for fermions and positive for bosons. \par We see from (\ref{19}) and the diagrams in the Figure 2 how the exchange of the bra or ket in the zero-phase wavicles produces two wavicles with the same and sign-opposite phases. These wavicles become phase correlated and any physical observable quantities from these wavicles also become correlated. They are just the so-called entangled quantum particles which are so popular in the literature. The graphic transformation of the left diagram in the Figure 2 into the right one inevitably leads to the line intersection or Schr\"{o}dinger Verschr\"{a}nkung (i.e. entanglement). The intersection results in the sign difference between bosons and fermions. (In the Figure 2 the correlation diagram is depicted without line intersection to make more transparent the origin of phase correlation). \par Let us emphasize that phase correlated (entangled) wavicles have no magic properties and any action on one of them has no influence on another. The phase correlation is the real "common cause at the past" for EPR-correlation, Hunbery Brown-Twiss effect and many other experimentally observable correlation phenomena. \par Note that such phase correlated wavicles are always present in any many-particle quantum systems. For example in many electron systems they are responsible for the appearance of exchange Coulomb energy. Two coherent charge fluctuations there have enough time to interact by the quick Coulomb potential and give the corresponding contribution to the energy. Ignoring the phase role in this effect leads to the usual explanation in QM manuals by obscure words: "It is a quantum effect with no classical analogy". \par In the same way the EPR-correlation on macroscopic distances gave rise to the multitude of similar "explanations" like nonlocality, retrocausality, multitude of worlds or other non-physical fantasies. No such fantasies are needed for the simple physical picture of quantum exchange correlation. (For the details see [\cite{gan17,gg17,gg18}]). \par The quantum exchange between two wavicles in the same state leads to the difference in the behavior of bosons and fermions. If we put $p=k$ in the formula (\ref{19}) we get $AB\equiv 0$ for fermions since the exchange contribution cancels the product of independent $A$ and $B$ contributions. In this way the Pauli prohibition for two fermions to be in the same states realizes. \par For the bosons the exchange contribution doubles the uncorrelated contribution $AB\rightarrow 2AB$. For $A=B=1$ we get the well-known formula for the occupancy number fluctuations of independent bosons and fermions: \begin{equation}\label{20} \overline{\delta F_p\delta F_k}\equiv\overline{F_pF_k}-F_pF_k=F_p(1\pm F_p)\delta_{pk} \end{equation} Here $F_p\delta_{pk}$ is the Poisson autocorrelation term. \section{Phase and Probability} We see above that the phase-independent wavicles (or $\beta$-type wavicles) form the permanent background of physical quantities. The phase-dependent wavicles (or $\alpha$-type wavicles) create fluctuations over this background with mean zero values. Now let us consider the probabilities of these physical processes. It is convenient to take as a simple example the mean value of space-position operator $U(x)=\delta(x-R)$ or the potential equal to zero except the close vicinity of space point $R$. In this point a wavicle appears in our observed Classical World when its bra and ket meet each other. For the quantum states $k$ with the wave function $\psi_k$ the wavicle background contribution (see the diagram F1.3 or the left diagrams of Fig.2) is given by: \begin{equation}\label{21} U(R)=|\psi_k(R)|^2F_k \quad \quad \overline U=\int_VU(R)dR=F_k \end{equation} These expressions have clear physical meaning. It gives the probability to find a wavicle of a given state $k$ in a given space point $R$. We see also that if the quantum state is occupied $F_k\neq 0$ its bra and ket will meet certainly somewhere in the system. For $F_k=1$ we come to the well-known Born rule to treat $|\psi(R)|^2$ as the probability for a quantum particle to be in the space point $R$. For many quantum states and $N$ quantum particles that can occupy them we have obviously \begin{equation}\label{22} U(R)=\sum_k|\psi_k(R)|^2F_k \quad \quad \overline U=\sum_kF_k=N \end{equation} Thus we see that zero-phase wavicles look like classical particles thus demonstrating corpuscular properties. However, there is a principal difference between classical particles (i.e. material points) and wavicles. The point-particles in our Classical World always exist as really observable entities whereas the wavicles appear there only after measurements (i.e. after the encounter of their bra and ket constituents). Before such encounters the wavicles are only potentially observable. \par Now let us consider the phase-dependent wavicles ($\alpha$-type wavicles) that are responsible for peculiar quantum effects. First of all note that we should have at least two quantum states for their appearance (see the diagram F1.4). At least two {\it occupied} states are needed for quantum exchange (see the diagrams of Fig.2). \par The contribution of $(kp)$-wavicles (i.e. $k$-bra and $p$-ket) is given by the non-diagonal matrix element $\langle k|U|p\rangle=\psi_k^\dag(R)\psi_p(R)$ together with the corresponding phase multipliers (\ref{15}) and the mean distribution value as $\sqrt{F_kF_p}$. The $(pk)$-wavicles give the complex-conjugated contribution. \par Thus for the phase-dependent $\alpha$-type wavicles the total contribution to the observable quantity $\Delta U(R,t)$ is given by: \begin{equation}\label{23} \Delta U(R,t)=\sum_{k\neq p}\psi_k^\dag(R) \psi_p(R)e^{i\alpha_{pk}(t)}\sqrt{F_kF_p}+c.c \end{equation} We see here the sum of contributions of various bra+ket pairs (wavicles with various phases). Their phases are random quantities (see (\ref{15})). Because of symmetry between bra and ket $\Delta U(R,t)$ is a real quantity and can be rewritten as \begin{equation}\label{24} \Delta U(R,t)=\sum_{k\neq p}|\psi_k^\dag(R)\psi_p(R)|\sqrt{F_kF_p}e^{i\Phi_{kp}(R,t)}+ c.c \end{equation} The total phase $\Phi_{kp}(R,t)$ is the sum of $\alpha_{kp}(t)$ and the phase $\gamma_{kp}(R)$ of the product $\psi_k^\dag(R)\psi_p(R)=|\psi_k^\dag(R)\psi_p(R)|e^{i\gamma_{kp}(R)}$. Note that the phase $\gamma_{kp}$ is nonzero even for real space wave functions because of their orthogonality. For two real orthogonal functions there should be a number of space points where their product changes its sign. In these points the phase $\gamma$ change by $\pm\pi$. Thus $\Delta U(R,t)$ is the sum of complex quantities $\rho e^{i\Phi}$ with $\rho>0$ and the phase $\pm\Phi$. Note that being integrated over the system volume $\Delta U(R,t)$ vanishes as well as it vanishes after phase averaging. The negative parts of $\Delta U(R,t)$ require the introduction of negative or even complex numbers in order to treat them in a probabilistic way. \par Let us divide $\rho\cos\Phi$ into two parts: \begin{equation}\label{25} \rho\cos\Phi=\rho[\cos^2(\Phi/2)-\sin^2(\Phi/2)]\equiv (+\rho)P+(-\rho)Q, \quad P+Q=1 \end{equation} One part becomes the probability of positive result $+\rho$ while other part becomes the probability of negative result $-\rho$. The total probability remains unity as it should be. For random phase we have mean zero probabilities: \begin{equation}\label{26} \overline{\cos\Phi}=\overline{\cos^2(\Phi/2)}-\overline{\sin^2(\Phi/2)}=1/2-1/2=0 \end{equation} Now let us consider the case where phase-dependent wavicles appear under perturbation action from initial zero-phase wavicles. As an example take the electron of the hydrogen atom of a stationary orbit at time t=0 (see the diagram F1.3). Then it emits or absorbs a photon and passes to another stationary orbit. To get the final orbit from the initial orbit two transitions are necessary (bra-bra) and (ket-ket) (see the diagrams F1.5). Since the bra and ket are independent objects these transitions occur randomly at different time moments $t_1$ and $t_2$. Thus we get the (kk)-wavicle before $t_1$ and the $(pp)$-wavicle after $t_2$. The intermediate (pk) or (kp) wavicles with phases $\pm\Phi(t)$ exist during random time interval $\Delta t=t_2-t_1$. They describe Bohr "quantum jumps" between stationary orbits. These "jumps" were the object of fierce disputes between Bohr and Schr\"{o}dinger in the heroic time of QM. Unfortunately both used only wave-function language (ket language) and naturally came to nothing. In the bra+ket language the inevitability of fast "jumps" between prolonged stationary orbits becomes evident. \par Now consider the action of soft potentials that unable to cause transitions between quantum states but can change wave function phases. Taking a constant perturbation potential $V$ which commutes with Hamiltonian $H$ we get according to (\ref{5}): \begin{equation}\label{27} e^{-iHt-iVt}\psi(x,0)=e^{-iVt}\psi(x,t), \quad e^{iHt+iVt}\psi^\dag(x,0)=e^{iVt}\psi^\dag(x,t) \end{equation} Neglecting switch on/off perturbations this (adiabatic) potential during its action $\Delta t$ create additional phases $\varphi=\pm V\Delta t$ for the bra and ket. Despite such perturbations the wavicle phase remains the same when the perturbation acts in the same way on its bra and ket. However, if the actions on the bra and ket are different the wavicle will acquire the additional phase. In the usual interference experiments a flow of zero-phase wavicles go through two slits or two channels. Then they are detected as screen marks or detector clicks. Thus there are two ways for a wavicle of the flow. It can go by one or another way thus revealing its "corpuscular nature" and creating the simple sum of two background pictures. Alternatively it can go through both ways (its bra goes one way while its ket another way or vice versa). In this case the wavicle acquires a phase. Then it participates in the constructive or distractive interference according to its phase (see (\ref{25})). Note that interference only redistributes background picture and does not change its intensity. The total number of events (marks or clicks) remains the same. \par The result of the two-way interference is shown in the Fig.3. The contributions of two left diagrams describe the corpuscular wavicle conduct when it passes one of possible two ways. Two right diagrams show how the wavicle reveals its wave property by passing both ways. \begin{figure}[htb] \begin{center} \includegraphics[width=4in]{phase3}\\ \end{center} \caption{\label{phase3} Two-way interference} \end{figure}\\ We see now that the great mystery of QM (i.e. quantum particle self-interference) will become an obvious triviality when we interpret the mysterious wavicle as a bra+ket pair. The necessary but puzzling wavicle passage through two slits also becomes natural. The use of the bra+ket language helps to make more transparent other interference phenomena [\cite{gg19}]. \section{Phase and Second Quantization} The second quantization is the usual and highly popular instrument of QM mathematics. But there are no phases in the forms that we use above. Of course, rightly used, the method can adequately treat all quantum effects where phases play a role. However the explicit absence of phases frequently impedes the proper interpretation of mathematical expressions and understanding of the physics of described phenomena. For instance, it is difficult to see the "common cause of the past" for the quantum exchange correlation (see the diagrams of Fig.2 and the expression (\ref{19}). Also it is not easy to treat superconduction phenomena without introduction of "anomalous averaging" which violates the formal rules of second quantization. \par Though phases are absent in the expressions of observable quantities they are present in the time-dependent amplitudes of second quantization operators. The creation and annihilation operators (better to call them the bra and ket operators) are given by \begin{equation}\label{28} a^\dag(t) = e^{iHt}a^\dag e^{-iHt}=e^{i\omega t}a^\dag \quad ,\quad a(t) = e^{iHt}ae^{-iHt}=e^{-i\omega t}a \end{equation} where $\omega\equiv\epsilon_k$ is the energy of a given state and the Hamiltonian has the form \begin{equation}\label{29} H=\sum_k\epsilon_k a^\dag_k(t) a_k(t)=\sum_k\epsilon_k a^\dag_k a_k \end{equation} The initial phases in the state occupancy can be introduced according to convention $\varphi=\omega t_0$ where $t_0$ is the time moment when the bra and ket meet to form a wavicle. \par In the second quantization mathematics the lines on the diagrams (see the figures above) correspond to the average commutators of bra and ket operators $\langle\Psi|[a(t_1)a^\dag(t_2)]_{\mp}|\Psi\rangle$ while wavicles correspond to their averaged one-time correlators $\langle \Psi|a^\dag(t)a(t)|\Psi\rangle$. \par Note that two-time correlators $\langle \Psi|a^\dag(t_2)a(t_1)|\Psi\rangle$ or $\langle \Psi|a^\dag(t_1)a(t_2)|\Psi\rangle$ represent separate bra or ket at time $t_2>t_1$ with occupancy numbers $F$ at time $t_1$. They have rapidly oscillating phase multipliers $e^{\pm i\omega (t_2-t_1)}$ and do not describe observable physical quantities. Wavicles with phases can have two different phase multipliers $e^{i\omega t}$ and $e^{-i\omega' t}$ and oscillate with frequency differences $\Delta\Omega=\omega-\omega'$ which can be small. In principle they are observable and describe time-dependent fluctuations. With implicit phase inclusion they are represented by two-particle two-time correlators of the form $\langle\Psi|a_1^\dag(t_1)a_1(t_2)a_2^\dag(t_2)a_2(t_1)|\Psi\rangle$. Such correlators correspond to mean observable quantities (see, e.g. (\ref{20})). \section{Thermal Bath and Quantum Bath} In the previous sections we did not distinguish the occupancy numbers and distribution functions. In quantum mechanics one uses the microscopic occupation numbers which for fermions are equal to $0$ or $1$ and several units for bosons. In kinetics, however, instead of them it is more convenient to use so-called "coarse-grained" distribution functions which are averaged for many adjacent quantum states or for many trials. Such functions can have arbitrary state occupation values. Among them the most important ones are the equilibrium distribution functions. They are the Fermi-Dirac distribution for fermions and the Bose-Einstein distribution for bosons as well as the Boltzman distribution for classical particles. \par The equilibrium distributions do not require concrete physical mechanisms for realizations and follow from the general thermodynamic principle of maximal entropy. To justify the application of this principle one should postulate the existence of random interactions of very small intensity between the system under consideration and its surrounding. Such interactions of various nature constitute the thermal bath (or thermostat) which ensures the equilibrium of the system and the relaxation to it after various perturbations. \par The thermostat acts on the distribution functions which are formed by zero-phase wavicles (i.e. the bra+ket pairs with equal frequencies and initial phases). These wavicles represent Bohr's stationary orbits which in many respect look as classical particles. The wavicles formed by bra and ket with largely different frequencies oscillate rapidly and serve as Bohr's quantum jumps of brief duration between the stationary orbits. The jumps occur under actions of random potentials which should be sufficiently hard to initiate transitions between the orbits. Such potentials are the parts of thermostat. \par The experience shows that bra and ket of zero-phase wavicles prefer to keep themselves together thus looking at sufficiently large space and time scales as single objects (e.g. photons in light beams). The interference shows that a wavicle can change (lose or acquire phases) under the action of soft (adiabatic) potentials (\ref{27}) when their bra or ket suffer different potential actions. If the potential changes equally the bra and ket phases the wavicle phase will remain zero. Thus the association of bra and ket of zero-phase wavicles (e.g. their going by the same path) favors the conservation of zero-phase wavicles while the dissociation reduces their number. Since this number is invariant in average (\ref{22}) the processes of losing or acquiring phases by zero-phase wavicles are similar to the establishment of equilibrium by thermostat actions. \par Taking such observations into account we come to the conclusion that phase-independent wavicles find themselves in a sort of equilibrium as compare with phase-dependent wavicles. The always existing random adiabatic potentials may act as a mechanism supporting zero-phase equilibrium for wavicles. By the analogy with thermostat (Thermal Bath) we may call these potentials by "Quantum Bath" or "quantostat". \section{Phase Origin} The bra and ket space functions can be identical and real. Then the difference between bra and ket with the same indices in this case are the rotation multipliers $e^{\pm i\omega t}$. In the diagrams (see Fig.1) the bra-multiplier $e^{+i\omega t}$ corresponds to the down-line arrow while the ket-multiplier $e^{-i\omega t}$ corresponds to the up-line arrow. The arrows means only the sign of rotation and not the evolution along or against time direction. The evolution always is going along the time according to the causality condition. It becomes obvious if we include damping into the frequency (real points in diagram lines). \par The time evolution of bra and ket $e^{\pm i\omega t}$ reminds the complex solution of the harmonic oscillator equation. The $\cos\omega t$ and $\sin\omega t$ are also solutions and they are real. But they do not satisfy the general causality condition that the variation of a quantity at the time $(t+0)$ is determined by its value at the time $(t-0)$. Two exponential solutions satisfy this condition so their use as two amplitudes in this sense is preferable. For an oscillator the classical bra and ket amplitudes ($a^\dag$ and $a$) as well as their quantum analogues include the coordinate and momentum parts. Therefore they describe simultaneously the position and the velocity. The imaginary unit permits to unite these complimentary physical quantities as a single entity at the same time retaining their separate existence. The phase $\phi(t)=\omega t$ reflects the ratio between these parts in the amplitudes and implicitly also in their product: \begin{eqnarray}\label{30} 1=e^{i\omega t}e^{-i\omega t}=(\cos\omega t + i\sin\omega t)(\cos\omega t-i\sin\omega t)=\\\nonumber \cos^2\omega t+\sin^2\omega t\equiv P+K=1 \end{eqnarray} The potential energy and position correspond to the real part of the solutions while the kinetic energy and velocity correspond to their imaginary part. At a given moment of time two relative parts of the total energy exist as the potential energy $P=\cos^2\omega t$ and the kinetic energy $K=\sin^2\omega t$. One can also consider $P$ and $K$ as the probabilities to find the energy in its potential or kinetic forms. If we accept the indivisibility of a single quantum then it will reveal itself in two incompatible events with the probabilities $P+K=1$. For $N\gg 1$ quanta they form two distinct parts as the classical potential and kinetic energies with equal mean values. \par Now divide the time interval $(0T)$ by a number of parts $\Delta t_j$. Then ignoring the state variations we can compare the unobserved quantum evolution with the corresponding potentially observed evolution as an equality: \begin{eqnarray}\label{31} 1=\Pi_0^T e^{i\omega \Delta t_j}e^{-i\omega\Delta t_j}=\Pi_0^T(\cos^2\omega \Delta t_j + \sin^2\omega\Delta t_j)=\Pi_0^T(p_j+k_j)=1 \end{eqnarray} At the left we see the bra and ket unobservable quantum evolution. At the right it transforms by possible observations into a series of incompatible events with probabilities $p_j+k_j=1$ for complimentary quantities. One can include also a possible fast quantum jumps between stationary orbits with different frequencies $\omega\rightarrow\omega_j$. This way the phases implicitly govern the results of observations. \par For non real space wave functions (i.e. for plain waves) one should add the space parts of phases to the time and initial parts of bra and ket phases. \par \section{Conclusion} The use of the bra+ket language for the interpretation of QM formulae permits to get simple and natural answers on a number of questions which "one cannot ask" in the usual (incomplete) ket-language. The bra and ket phases and the resulting wavicle phase are the necessary elements of the physical picture though as a rule they do not appear in the final expressions for the observed physical quantities. \par The quanta of energy that are the basic elements of Quantum World may be imagined as localized entities with permanent oscillations between their complimentary (potential and kinetic) components. The oscillations usually are too fast and because of this the separate bra or ket are unobservable. But their combinations in the form of wavicles have much less oscillation frequencies and emerge in our Classical World as observed quantum particles which actually become classical objects. The implicit phases of bra and ket components of wavicles cause the peculiar "non-intuitive" properties of wavicles. \par Let us emphasize that any adequate interpretation of QM mathematics is impossible without the natural physical picture of bra+ket=wavicle. \par One can compare the practice of getting reasonable explanations of quantum phenomena by the incomplete ket-language as an attempt to march using only one leg. \par As a result it inevitably leads to various non-physical fantasies grossly contradicting all established principles of Physics inherited from the past or to the capitulation "it is impossible to understand Quantum Mechanics".
\section{Introduction} The last decade has seen the advent of quantum technologies. Significant advances have paved the way for promising applications in computing, sensing or communication. The time evolution of quantum systems is governed by the Schr\"odinger equation with a time-dependent Hamiltonian \begin{equation} i \hbar \frac{d\psi}{dt} = H(t) \psi(t) \label{eq:schroedinger}. \end{equation} Efficiently solving eq.~\eqref{eq:schroedinger} is key to understanding the systems at hand, and to their successful technological application. Substantial effort has been put into simulating large quantum systems (thousands of degrees of freedom), by exploiting specific properties that allow a reduction of the Hilbert space. In addition, significant effort has been put on porting such simulations to GPUs. Nevertheless, a lot of research focusses on small to medium-sized quantum systems. Although a simulation of such systems can be easily done on modern CPUs, computational expense scales with the number of time steps. As an example, consider an electron spin simulated in the laboratory (non-rotating) frame. Here, GHz control fields are applied for multiple microseconds leading to the need for integrating over tens of thousands of time steps. Often, this problem can be tackled by a suitable approximation (e.g. the rotating frame \cite{slichter1990principles}). However, such an approximation may not always be convenient or even possible: for instance, when studying non-secular effects like the Bloch-Siegert shift, the strong driving regime, complex modulated waveforms, or when performing a validation of the control software of an experiment. Accurate simulation rather than approximations (with sometimes elusive side effects) builds extra confidence in the correctness. Efficiency is key, too: when developing new pulse sequences for quantum control, it is desirable to run simulations at interactive speeds, such that the designer can quickly iterate different parameters. Furthermore, applications in the field of quantum optimal control rely on the fast evaluation of a time-dependent Hamiltonian. With the recent advent of artificial intelligence research, new powerful tools have emerged. For suitable tasks, a modern GPU offers the computational power of a supercomputer from the mid 2000s, off-the-shelf and at a fraction of the cost. Like supercomputers, GPUs focus on massive parallelization. The implementation of matrix-matrix multiplication in suitable hardware structures, combined with fast memory access, allows for a fast and parallelized tackling of a variety of computational tasks. We present an approach for solving the time-dependent Schr\"odinger equation in a form that is frequently encountered in experimental realizations of a variety of physical quantum systems. Our approach leverages the parallelization of GPUs for integrating the steps of the time propagation in parallel and relies on a fast memory connection. We use the recently standardized Batched BLAS routines \cite{Dongarra2017} and a minimal set of custom functions. Therefore, our approach can be ported to a variety of platforms including, e.g., GPUs of other vendors or Field Programmable Gate Arrays (FPGAs). % This paper is structured as follows: First, we describe the concept of slice-wise propagation and the parallelization of the calculation. Then, we focus on the two underlying problems to be solved. This is followed by details about the implementation using the Batched BLAS functions. Furthermore, we improve the convergence order by extending the approach to a Magnus integrator. Finally, we showcase the runtime and the convergence using a suitable example of a driven two-level system. \section{Computational approach} For a system with a Hamiltonian $H = \hbar \mathcal{H}$ that is stationary in time, the exact solution of the Schr\"odinger or the von Neumann equation is given by \begin{subequations} \begin{equation} \ket{\psi(t)} = \e{-\mathrm{i} H t / \hbar} \ket{\psi(t=0)} = U(t) \ket{\psi(t=0)} \quad\text{and} \end{equation} \begin{equation} \rho(t) = U(t) \, \rho_0 \, U^\dagger(t) \text{,} \end{equation} \end{subequations} respectively. Here, $\ket{\psi}$ denotes the system state of a pure quantum system and $\rho$ the density matrix of a mixed state. One approach to treat arbitrary time-dependent Hamiltonians is to`slice' the Hamiltonian, known also as Euler's method. During the finite duration $\Delta t$ of each slice, the Hamiltonian is assumed to be stationary. For sufficiently small equidistant time steps, the sequence \begin{equation} U(t) = \lim\limits_{\Delta t \rightarrow 0} U^{(n)} \cdot U^{(n-1)} \cdot ... \cdot U^{(0)} = U(t_n)\mathrm{.} \label{eq:slices} \end{equation} with \begin{equation} U^{(n)} = \exp(-i\mathcal{H}^{(n)}\Delta t) \end{equation} converges to the true solution of the original problem. If the dimension of the Hamiltonian is large, Krylov methods can be employed to simplify the exponentiation. Here, we instead focus on small, dense matrices. The algorithm thus involves two steps: (i) calculating the matrix exponential efficiently for many matrices and (ii) executing the matrix multiplication of the individual slice-propagators. In the following subsections, we will discuss the chosen approaches for each of the two aspects. We assume that the time-dependent Hamiltonian takes the form \begin{equation} \mathcal{H}(t) = \mathcal{H}_0 + \sum_{i=1}^{N} c_i(t)\,\mathcal{H}_i \label{eq:format_control} \end{equation} where $ \mathcal{H}_0$ is typically named drift Hamiltonian and $\mathcal{H}_i$ and $c_i(t)$ denote control Hamiltonians and control coefficient array. The control terms represent the coupling of the quantum system, e.g., time-varying magnetic or electric fields (control fields). The decomposition in eq.~\ref{eq:format_control} does not trade any generality: $\mathcal{H}_i$ are simply a basis of the $\mathcal{H}(t)-\mathcal{H}_0$ space. Numerous experimental situations however conform very well to the form of eq.~\eqref{eq:format_control}, with a number $N$ of control fields that is much smaller than the total dimension of the Hamiltonian space. \begin{figure}[h] \includegraphics[width=\linewidth]{figs/scheme.pdf} \caption{Parallel time integration of the PARAMENT integrator. We upload a minimal amount of data to the GPU and propagate all time steps synchronously. The final propagator is obtained by iterative pair-wise multiplication of the slice propagators. In the case of the Magnus implementation, the expansion step also calculates the coefficients for the commutator terms.} \label{fig:scheme} \end{figure} The overall structure of the approach is shown in Figure \ref{fig:scheme}: We transfer a minimal amount of data to the GPU, the control arrays and the Hamiltonians. Then we expand the Hamiltonians for each time step in the GPU memory. Subsequently we exponentiate all slice Hamiltonians in parallel. For the final propagator, we reduce the slice propagators by repeated pair-wise matrix multiplications. \subsection{Matrix exponential} The numerical computation of the matrix exponential has been treated extensively by Moler and Van Loan in their famous `19 dubious ways' paper \cite{Moler2003}. Moler and Van Loan describe six main classes of algorithms: (1) Series-based methods relying on, e.g., Taylor or Pad\'e approximations, (2) Methods relying on ODE solvers, (3) polynomial methods which are typically not very attractive due to their high computational cost, (4) matrix decomposition methods, (5) splitting methods like the powerful scaling-and-squaring technique and (6) Krylov methods, which are interesting for large matrices. On CPUs, matrix decomposition methods are particularly powerful due to well-established implementations like the Schur decomposition in LAPACK using the ZGEES or CGEES function \cite{laug}. This approach is especially competitive for Hermitian matrices like Hamiltonians, where the decomposed matrix is always diagonal. It is used e.g. in the MATLAB software package. In general, for non-Hermitian matrices, most modern implementations (e.g. in Python and MATLAB) combine the scaling and squaring technique with a series method, either Taylor or Pad\'e. Typically the matrix is first scaled down until its norm is sufficiently small so that its exponential can be well approximated by a (reasonably) truncated Taylor or Pad\'e approximation. The exponential of the original matrix can be recovered by raising the small-norm exponential to the correct power. For our implementation of the highly-parallelized calculation of the matrix exponential we choose a different series approach based on the Chebyshev polynomials. The expansion of the matrix exponential in a Chebyshev series in the context of time propagation of quantum systems goes back to Tal-Ezer and Kosloff \cite{TalEzer1984}. The expansion of the complex exponential in a Chebyshev series can be obtained by starting with the expansion of $\e{\mathrm{i} \omega x}$ on the unit interval $x \in [-1,1]$ \begin{equation} \e{\mathrm{i} \omega x} = a_0 + 2 \sum_{k=1}^{\infty} a_k T_k(x) \qquad \text{with} \qquad a_k = \mathrm{i}^k J_k(\omega) \label{eq:chebyshev_scalar} \end{equation} where the coefficients are readily obtained from Abramovic Stegun (9.1.21) and $T_k(x)$ and $J_k(\omega)$ denote the Chebyshev polynomials and the Bessel functions of the First Kind respectively. An approximation of $\e{-\mathrm{i} \zeta}$ for the interval $\zeta \in [\alpha,\beta]$ can be obtained by a straightforward affine-linear transformation of $x$. The scalar expansion \eqref{eq:chebyshev_scalar} can be extended to matrix arguments and reads in our case for the slice propagators \cite{Lubich2008} \begin{equation} \e{-\mathrm{i} G} \approx \e{-\mathrm{i}(\alpha+\beta)/2} \left[a_0 \mathbb{I} + 2 \sum_{k=1}^{m_\mathrm{max}} a_k T_k\left(\frac{2}{\beta-\alpha}\left(G-\frac{\alpha+\beta}{2}\mathbb{I}\right)\right)\right] \text{.} \label{eq:chebychev_series} \end{equation} Here, $G=\mathcal{H} \Delta t$ is Hermitian and we suppose that the spectrum of this matrix lies between $\alpha = \lambda_\mathrm{min}(\mathcal{H}\Delta t)$ and $\beta = \lambda_\mathrm{max}(\mathcal{H}\Delta t)$. For the transformed expansion, the coefficients $a_k$ read \begin{equation} a_k = (-\mathrm{i})^k J_k\left(\frac{\beta-\alpha}{2}\right) \text{.} \end{equation} For the numerical evaluation of the matrix exponential, we will truncate the series in \eqref{eq:chebychev_series} at $m_\mathrm{max}$. Lubich \cite{Lubich2008} estimated the error for approximating the matrix exponential by using a Chebyshev series truncated after the $m$'th term to \begin{equation} \epsilon = 4 \left(\e{1-\left(\frac{\beta-\alpha}{4m+4}\right)^2}\frac{\beta-\alpha}{4m+4}\right)^{m+1} \text{.} \label{eq:error_chebychev} \end{equation} We use \eqref{eq:error_chebychev} to determine $m_\mathrm{max}$ under the requirement that $\epsilon$ is smaller than the machine precision of the respective datatype. This gives us constrains for the maximum norm that the argument can take, c.f. Table \ref{tab:norm_boundries}. \begin{table*} \resizebox{\textwidth}{!}{ \begin{tabular}{l|llllllllllll} $m_\mathrm{max}$ & 3 & 5 & 7 & 9 & 11 & 13 & 15 & 17 & 19 & 21 & 23 & 25 \\ \hline $||G||_\mathrm{max}$ FP32 & $0.033$ & $0.219$ & $0.620$ & $1.218$ & $1.980$ & $2.873$ & $3.873$ & $4.959$ & $6.118$ & $7.336$ & $8.606$ & $9.919$ \\ $||G||_\mathrm{max}$ FP64 & $2\times 10^{-4}$ & $0.008$ & $0.050$ & $0.163$ & $0.368$ & $0.677$ & $1.088$ & $1.596$ & $2.194$ & $2.874$ & $3.627$ & $4.447$ \\ \end{tabular} } \caption{Maximum norms of the exponent of a matrix exponential that guarantees machine precision when calculating the matrix exponential by using the Chebyshev expansion \eqref{eq:chebychev_series} truncated at $m_\mathrm{max}$. Here, we approximated the spectral range of $G$ with $\alpha = - ||G||$ and $\beta = ||G||$ and solved \eqref{eq:error_chebychev} for $||G||$. For calculations in single-precision floating-point format (FP32) we required $\epsilon < 2^{-24}$, for the double-precision floating-point format (FP64) $\epsilon < 2^{-53}$.} \label{tab:norm_boundries} \end{table*} \begin{algorithm}[H] \caption{Matrix exponential} \label{alg:loop} \begin{algorithmic}[1] \Require{Hamiltonian $\mathcal{H}$, time step $\Delta t$, $\qquad\qquad\qquad\quad$ spectral boundaries $\alpha,\beta$} \Ensure{Propagator $U=\e{-i\Delta t \mathcal{H}}$} \Statex \State{$X = \frac{2}{\beta-\alpha}$ $\left(\Delta t \mathcal{H} - \frac{\alpha+\beta}{2}\mathbb{I}\right)$} \State{$D_{m_{max}+2} = 0$} \State{$D_{m_{max}+1} = 0$} \For{$k = m_{max}$ downto $0$} \State {$a_k = (-\mathrm{i})^k J_k\left(\frac{\beta-\alpha}{2}\right)$} \State {$D_k = a_k \mathbb{I} + 2 X D_{k+1}-D_{k+2}$} \EndFor \State \Return {$\e{-\mathrm{i} (\alpha+\beta)/2} (D_0 - D_2)$} \end{algorithmic} \end{algorithm} The series in \eqref{eq:chebychev_series} can be efficiently computed by the Clenshaw algorithm \cite{Clenshaw1955}. The number of necessary steps (and thus the number of matrix multiplications) grows at least linearly with the matrix norm. For our application, this is not a major problem as the matrix norm per time slice $||\mathcal{H}\Delta t||$ is expected to be small if the time step is sufficiently short. In a general context, Chebyshev-series-based matrix exponentiation has been successfully combined with the powerful scaling-and-squaring approach \cite{Auckenthaler2010}. This approach brings down the number of necessary matrix multiplications to a growth that is only logarithmic in the matrix norm. It is worth noting that the Chebyshev approach is also very appealing for problems with sparse Hamiltonians, as it relies only on matrix products of the form $\mathrm{sparse} \times \mathrm{dense}$. This circumstance could be further leveraged for bigger Hamiltonians. Nonetheless, our approach requires \textit{a priori} knowledge about the expected spectrum of the Hamiltonian. As the boundaries $\alpha$ and $\beta$ of the Eigenvalue range are often not available, we estimate them by using a suitable matrix norm (Gershgorin's theorem). \subsection{Reduction by matrix multiplication} After obtaining all slice propagators, we multiply them together to obtain the full evolution, c.f.~eq.~\eqref{eq:slices}. We can again parallelize this step by leveraging the associativity of the matrix multiplication. Our slice propagators $U^{(i)}$ are all quadratic and have the same dimensions. Therefore, we simply compute pair-wise products of consecutive slice propagators: $U^{(0)}\cdot U^{(1)}, U^{(2)}\cdot U^{(3)}, ..., U^{(n-1)}\cdot U^{(n)}$. By repeating this scheme $\log_2(n)$ times, where we halve the number of remaining time slices with every round, we compute the overall product. As we will see in the next section, the pair-wise matrix multiplications can be easily parallelized using the Batched BLAS functions. Although there exist more sophisticated approaches to this problem in the literature \cite{Ladner1980,Irony2004}, during our numerical tests it turned out that this simple approach is sufficient as the major computational cost is given by the exponentiation step. \section{Implementation} The main idea of our implementation is that the computationally expensive exponentiation performed by algorithm \ref{alg:loop} is run in parallel for all time steps. As all time steps have approximately a similar spectrum we can choose global $\alpha$, $\beta$ and $m_{max}$ that are suitable across all time steps. Together with the fact that all matrices have the same shape, this makes the algorithm ideally suitable for a Single Instruction Multiple Data (SIMD) platform, such as a GPU. Furthermore, algorithm \ref{alg:loop} has been designed in a way that it can be implemented by only a small subset of the BLAS functions (batched and non-batched) which will bear the majority of the computational workload. \subsection{Batched BLAS routines} The Batched BLAS routines have been standardized in 2017 \cite{Dongarra2017} and were created with the intend to maintain high compute resource utilization when dealing with small-to-medium-sized matrices. Looking at the ubiquitous General Matrix Multiply (GEMM) routine, the batched version performs the operation \begin{equation} C[k] = \alpha\,\, A[k]\cdot B[k] + \beta \, C[k] \qquad \forall k \end{equation} for a batch of length $k$ in parallel. It is obvious that the Batched BLAS functions can be used to parallelize the matrix exponentiation step. However, the flexibility of the GEMM routine allows us to reuse the GEMM function for nearly all steps in Figure \ref{fig:scheme}. As $A$ and $B$ are pointers, the strided batched GEMM routine can also be reused for the pair-wise reduction operation, where we double the memory stride to twice the propagator size. $A$ and $B$ can point to the same region in memory with only an offset of one matrix between them. Depending on the implementation, special attention may have to be brought to possible bottlenecks induced by memory miss-alignments. However, our tests with the NVIDIA cuBLAS implementation (see below) did not reveal major negative effects. Similarly, the addition of the Bessel coefficients to the diagonal elements of the propagators during the exponentiation step (lines 5 and 6 in algorithm \ref{alg:loop}) can be implemented using the batched version of AXPY (scalar $\times$ vector multiplication, "$a\cdot x$~plus~$y$"). By this, the full integration can be done solely with BLAS routines, without any custom compute kernels required. This makes the approach easily portable to a variety of systems. \subsection{GPU implementation using NVIDIA cuBLAS} We implemented the proposed integration scheme using the CUDA platform and by using the cuBLAS library. The batched version of the AXPY routine had to be implemented by a custom CUDA kernel as it is not yet part of the cuBLAS library (as opposed to other GPU frameworks like AMD's rocm). To reduce the memory requirements for working arrays, we implemented two Chebyshev iterations per loop iteration in algorithm~\ref{alg:loop}, c.f. Appendix. The performance of the integrator benefits from the fast memory connection on the GPU and the sheer number of compute processors available. On a Quadro P2000 GPU, for 80'000 time steps and a $12\times 12$ system, the exponentiation step is by far the most time consuming ($\sim 80\%$ of the total run time). The NVIDIA visual profiler (NVVP) reports that we make good use of the available resources (a memory bus utilization of $55\%$, a compute resource utilization of $85\%$, and an occupancy of $90\%$). During the subsequent reduction step, these numbers are slightly reduced ($55\%$, $75\%$, and $35\%$). This may indicate room for optimization, but any improvements here are unlikely to improve total runtime significantly, since time expended for the reduction step is short already. It is worth noting that memory misalignment problems can decrease the efficiency of the Batched BLAS functions when e.g. setting the memory stride to unusual values. However, for the cuBLAS library we do not observe this to be a major problem. The user provides the control amplitudes as an array sampled at equidistant time points. From the control amplitude array we compute the actual exponents $-\mathrm{i} G$, optionally by averaging the control vector over three points according to Simpson's quadrature rule. This makes sense in the context of a higher-order Magnus integrator (see section~\ref{sec:magnus} below). Otherwise, we simply set $G= \mathcal{H}\Delta t$ with $\mathcal{H}$ as per equation (\ref{eq:format_control}). The exact computation of the spectral boundaries $\alpha$ and $\beta$ can be expensive. We instead use the operator norm $||G||_1$ as an inexpensive upper bound. We use a single value for $\alpha$ and $\beta$ for all time steps, so we further bound the norm by the triangle inequality: $||G||_1/\Delta t < ||\mathcal{H}_0||_1 + \sum_{i=1}^{N} |c_i(t)|\,||\mathcal{H}_i||_1$. By requiring the user to keep the control amplitudes $c_i(t) \in [-1,1]$, rescaling the control Hamiltonians if necessary, we hence define \begin{equation} - \alpha = \beta = \Delta t \sum_{i=0}^{N}||\mathcal{H}_i||_1 \text{.} \end{equation} \section{Magnus integrators} \label{sec:magnus} It can be shown that the error of the above integrator in a single time step scales as $\mathcal{O}(\Delta t^3)$, making it a second order integrator over the full integration time $T=N\Delta t$. The order of the convergence can be improved significantly by Magnus expansion \cite{Magnus1954, Blanes2009}. Magnus integrators have been successfully used for solving the Schr\"odinger equation in various implementations, including on GPUs \cite{Auer2018}. However, these typically again focus on large Hamiltonians, rather than the small to medium-sized problems with long time horizon that we are considering. Magnus proposed that the solution $U(t)$ to any time-dependent ODE (like the Schr\"oedinger equation) can indeed be written as the exponential of some matrix $\Omega(t)$. He provided a series expansion of that exponent, i.e. \begin{subequations} \label{eq:magnus} \begin{align} U(t) &= \e{\Omega(t)} \quad \text{with} \quad \Omega(t) = \sum_i\Omega_i(t) \tag{\ref{eq:magnus}} \\ \Omega_1(t) &= -\mathrm{i} \int_0^t \mathrm{d} t_1 \, \mathcal{H}(t_1) \text{,} \\ \Omega_2(t) &= -\frac{1}{2}\int_0^t \mathrm{d} t_1 \int_0^{t_1} \mathrm{d} t_2 \, [\mathcal{H}(t_1),\mathcal{H}(t_2)]_{-} \text{,}\\ \dots & \tag*{} \end{align} \end{subequations} where $[A,B]_{-} :=AB-BA$ is the commutator of the matrices $A$ and $B$. The interpretation is obvious: The term $\Omega_1(t)$ averages the Hamiltonian over the time slice. By replacing the integral with the mid-point rule, we recover the naive approach where we assume the Hamiltonian to be constant over the whole time slice. The higher-order terms $\Omega_2(t)$, $\Omega_3(t)$, ...~describe the effects when the Hamiltonian at time $t_1$ does not commute with itself at a later time $t_2$. For constructing a fourth-order integrator, it is sufficient to only include terms up to $\Omega_2$, and then to approximate the integrals with quadrature rules of sufficiently high order \cite{Blanes2000434}. The inclusion of this extra term neatly integrates with the method described above. As we will show next, including $\Omega_2$ is equivalent to simply adding extra control terms in equation (\ref{eq:format_control}). The extra terms correspond exactly to the commutators of the existing control Hamiltonians. Assume we have sampled the Hamiltonian at 3 equidistant time points, $\mathcal{H}^{(1)} = \mathcal{H}(0)$, $\mathcal{H}^{(2)} = \mathcal{H}(\Delta t)$ and $\mathcal{H}^{(3)} = \mathcal{H}(2\Delta t)$. Following Blanes et al.\footnote{c.f. eq. (256) of \cite{Blanes2009}}, we approximate the integrals in equations (\ref{eq:magnus}a) and (\ref{eq:magnus}b) by Simpson's rule and the trapezoidal rule respectively. The new exponent then reads \begin{equation} \begin{split} \Omega &= -\mathrm{i} G \\ &= -\mathrm{i} \left(\frac{\Delta t}{3}\left(\mathcal{H}^{(1)} + 4 \mathcal{H}^{(2)} +\mathcal{H}^{(3)}\right) - \mathrm{i} \frac{\Delta t^2}{3} \commie{\mathcal{H}^{(1)},\mathcal{H}^{(3)}} \right). \end{split} \end{equation} Inserting equation \ref{eq:format_control}, we find \begin{equation} \begin{split} G = 2 \Delta t\,\mathcal{H}_0 &+ \Delta t\sum_{k=1}^N \left(\frac{1}{3}c_k^{(1)}+\frac{4}{3}c_k^{(2)}+\frac{1}{3}c_k^{(3)}\right) \underbrace{\mathcal{H}_k}_* \\ &-\mathrm{i} \frac{\Delta t^2}{3} \sum_{k=1}^N \left(c_k^{(3)}-c_k^{(1)}\right) \underbrace{\commie{\mathcal{H}_0,\mathcal{H}_k}}_* \\ &-\mathrm{i} \frac{\Delta t^2}{3} \sum_{k<k'}\left(c_k^{(1)}c_{k'}^{(3)}-c_k^{(3)}c_{k'}^{(1)}\right) \underbrace{\commie{\mathcal{H}_k,\mathcal{H}_{k'}}}_*. \end{split} \label{eq:magnus_coeffs} \end{equation} The matrix $G$ is still of the same form as $\mathcal{H}$ in eq.~(\ref{eq:format_control}). The matrices marked with an asterisk now correspond to the new effective control Hamiltonians. Also note that compared to eq.~(\ref{eq:format_control}), we have now doubled the time step to $2\Delta t$. This is because Simpson's rule requires an extra sample in the middle of the interval. By exponentiating $-\mathrm{i} G$ instead of $-\mathrm{i} \mathcal{H}\Delta t$ we thus double the time step, yet also increase the order of convergence of the integrator from 2 to 4. The price to pay is that the transform introduces additional control Hamiltonians. It maps $N$ original control Hamiltonians (and their corresponding control amplitude array) to $3/2 N + N^2/2$ effective control Hamiltonians. This can be costly if the initial number of control Hamiltonians is already large. Note that the transform $\mathcal{H} \rightarrow G$ is entirely contained in the `expand' step in figure \ref{fig:scheme}. The time expended here is usually negligible though, as the computational bottleneck is the subsequent exponentiation. In practice, we find that the improved convergence allows for much fewer timesteps (for a given target accuracy), such that \emph{both} the expansion and propagation steps are proportionally faster to compute.\footnote{In reality, doubling the timestep improves the run-time by slightly less than a factor 2. This is because the exponent norm scales with the time step, so more iterations in the Chebychev expansion are required (see Table \ref{tab:norm_boundries}).} Finally, an extension to higher-order Magnus terms is possible and integrators of 6\textsuperscript{th} or 8\textsuperscript{th} order can be obtained, although the number of necessary commutator terms grows very fast. Here, the recently developed commutator-free Magnus integrators \cite{Alvermann2011} may provide an alternative. \section{Numerical experiments} We first test the performance by propagating several dense Hamiltonians as a function of matrix size. We used an NVIDIA V100 GPU. The results are shown in Figure \ref{fig:performance_size}. Next, we compare it against a fully parallelized CPU implementation, running on an Intel i9-9900 and linked against Intel MKL. The CPU implementation combines the expansion and propagation step in Fig. \ref{fig:scheme} into a single parallelized function. This improved the performance due to more efficient caching as a direct port of the GPU code would be an unfair comparison. For a $12 \times 12$ Hamiltonian system (encountered often in nitrogen vacancy research) and 80'000 time steps, we find that the GPU runs 50 times faster for single precision (FP32) and 25 times faster for double precision (FP64). \begin{figure}[h] \centering \includegraphics[width=1.05\linewidth]{figs/performance_size.pdf} \caption{Runtime vs. matrix size for 80'000 time steps on the GPU. For small matrices ($d<32$), we see a very gentle increase in runtime when increasing the matrix size. At $d=32$ the cuBLAS library switches to a different compute kernel.} \label{fig:performance_size} \end{figure} In the regime of a small number of time steps and a small matrix dimensionality, the CPU is faster as the "outsourcing" of the computation to the GPU comes with several overheads. This is highlighted in Figure \ref{fig:performance_points}. For small matrices, we see an approximately logarithmic increase in the runtime, due to the extra kernel launches required in the "reduce" step. \begin{figure}[h] \centering \includegraphics[width=1.07\linewidth]{figs/performance.pdf} \caption{Perfomance as a function of time steps for various regimes of matrix dimensions. Blue traces are single precision (FP32) and orange traces are double precision (FP64). (a) shows the run-time for a $2 \times 2$ matrix. The black trace shows the measured run-time for a propagation implemented on a CPU (FP64). (b) shows the measured run-times for $40 \times 40$ matrices and (c) for $192 \times 192$. (d) shows the intersection of the run-time curves of the CPU and the GPU in the FP64 case.} \label{fig:performance_points} \end{figure} Next, we test the rate of convergence. We used the model of a qubit driven with a circularly polarized excitation field, a problem for which an exact analytical solution exists. The studied system Hamiltonian is \begin{equation} \mathcal{H} (t) = \frac{\omega_0}{2} \sigma_z + \cos(\omega_\mathrm{rf} t) \frac{\omega_1}{2}\sigma_x + \sin(\omega_\mathrm{rf} t) \frac{\omega_1}{2}\sigma_y \text{,} \label{eq:driven_hamiltonian} \end{equation} where the $\sigma_i$ denote the Pauli matrices. Figure \ref{fig:convergence} shows the resulting accuracy when increasing the number of time steps while keeping the total evolution time fixed. We clearly observe that for both, FP32 and FP64, we achieve a better convergence when implementing a Magnus integration scheme while the computational cost per time step only increases marginally. For the sinusoidal drive, our implementation reaches machine precision for $\approx10^2$ time steps per oscillation cycle in the case of FP32, and for $\approx10^4$ time steps per cycle in the FP64 case. Furthermore, we see that when truncating the Magnus expansion at $\Omega_1$, increasing the quadrature order alone does not improve the convergence. \begin{figure}[h] \includegraphics[width=\linewidth]{figs/convergence.pdf} \caption{Convergence of the propagator for a qubit driven with a circularly polarized excitation field for various numbers of time steps (a) in case of single precision (FP32) accumulation and (b) double precision (FP64) accumulation. The parameters in \eqref{eq:driven_hamiltonian} are $\omega_0 = 1.0, \omega_1 = 0.1, \omega_\mathrm{rf} = 1.0$ and we evaluated the propagator at final time $t = 6.0$. The manually added black dashed-line indicates the same convergence order for the FP32 and the FP64 case} \label{fig:convergence} \end{figure} We observe that the error reaches a minimum after a certain number of timesteps. Finer timesteps do not improve the accuracy. Past this point, the error per time slice is limited by the machine precision, which accumulates over an increasing number of slices. With single-precision arithmetic, the achievable error is on the order of $10^{-5}$. This result might seem unsatisfying at first. However, this precision still by far exceeds the accuracy achieved in many experimental realizations of the quantum systems that the algorithm is designed to simulate. For instance, in the field of Nitrogen Vacancy (NV) center research, available Signal-to-Noise Ratio (SNR) frequently limits the practical \emph{experimental} accuracy to $\sim 1 \%$. In turn, this means that even consumer GPUs that throttle FP64 performance can provide acceptable performance. \section{The PARAMENT library} We provide the full-GPU integrator as a C library. We name the library PARAMENT (\textbf{PAR}allelized \textbf{M}atrix \textbf{E}xponentiation for \textbf{N}umerical \textbf{T}ime-evolution) and available for download\footnote{\url{https://github.com/parament-integrator/parament}}. The compiled DLL for the Windows platform and the UNIX version of the shared library can be included into a large range of applications including Python, Julia, Matlab or LabVIEW. \begin{figure}[h] \includegraphics{figs/state_machine.pdf} \caption{State-machine of the PARAMENT integrator.} \label{fig:state_machine} \end{figure} The usage model follows the steps of Figure~\ref{fig:state_machine}. First, the user initializes the integrator by calling the \texttt{Parament\_create()} function. It returns a handle to a newly created context. The context stores the state of the integrator. Multiple contexts may exist at any time, and used independently; however they are not thread-safe nor reentrant. The context must eventually be released by calling \texttt{Parament\_free()}. Next, the Hamiltonians are uploaded to the GPU using the \texttt{Parament\_setHamiltonian()} function. Here, the user also decides on the use of the Magnus expansion. When enabled, PARAMENT will then calculate the necessary commutators (effective control Hamiltonians) and upload them to the GPU as well. To obtain a propagator, the user calls the \texttt{Parament\_equiprop()} routine with the coefficient arrays. The Hamiltonians persist between propagations, so that repeated runs (e.g. with different control fields) are possible. Lastly, the implementation exposes several helper functions which allow tweaking the underlying numerics, e.g., the selection of a different $m_\mathrm{max}$. For a full description of available functions, the user is referred to the documentation of PARAMENT bundled together with the source code, or available on the project website. \subsection{Python} While written in C++, the PARAMENT library can easily be used together with other programming languages, including Matlab or LabView. For Python, we provide a reference binding, called \texttt{pyparament}. This use-case was the initial motivation for the development of PARAMENT: A fast lab-frame propagation in interactive compute sessions, e.g., during the development of new microwave control schemes, possibly in Jupyter notebooks. Applications include, for instance, testing of advanced control schemes e.g. by frequency-modulating the microwave pulses \cite{Silveri2017}. It truly embraces the mindset of `interactive super-computing' \cite{Reuther2018}. Finally, \texttt{pyparament} is also compatible with the QuTIP framework\cite{Johansson2013}. The source code is available on the PARAMENT Github, or on the PyPI package repository. \section{Applications and outlook} The presented speed-up of lab-frame simulations will facilitate testing new control schemes during the sequence design of quantum control experiments. Due to implementation with only a few BLAS functions, our scheme can be ported easily to a variety of platforms, including AMD GPUs and FPGA devices. The applications of our integration scheme, however, go beyond what it was initially designed for. It is generally suitable for studying the evolution of small-to-medium-sized quantum system under complex-modulated control fields. It can be used to quickly determine the Floquet states and quasi energies of strongly periodically driven system, by diagonalizing the propagator \cite{Creffield2003}. As the size (degrees of freedom) of the simulated system increases, the presented approach requires vastly more memory. Fortunately, modern GPUs provide ample amounts thereof. If that is insufficient, PARAMENT could easily be adapted to scale across multiple GPUs. We hope to encourage the implementation of Batched BLAS routines that natively support multi-GPU calculations via fast GPU-to-GPU buses like the NVIDIA NVLink. A more visionary application could be the verification of an experimental control software and hardware stack. The quantum system could be replaced by PARAMENT, a fast digitizer, and a fast arbitrary waveform generator (AWG). If the latter two have direct access to GPU memory, performance may be sufficient to fully emulate the quantum system in near-real time. Our approach is not limited to quantum systems. It can be applied to any differential equation that can be cast into the form of equation \eqref{eq:schroedinger}. Of course, computational efficiency is best if the problem can be formulated with only a few `control Hamiltonians', such that limited upload rate from host computer to GPU does not affect the overall computation time. Finally, the fully GPU-based integration algorithm can be used as an essential building block for fully GPU-based optimal control optimization routines like the GRAPE algorithm \cite{Khaneja2005}. The optimizer must evaluate the time-evolution operator in every step of the optimization routine. We are confident that GRAPE can be greatly accelerated if built around PARAMENT. Depending on how large the norms of the slice Hamiltonians are, here the introduction of a scaling and squaring approach might be needed.
\section{Introduction} \label{sec:intro} In quantum computing and quantum information processing, there are tasks that are ``inherently quantum'', meaning that it does not even make sense for a classical computer to perform them. Such tasks include: \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item \emph{State synthesis}: given an implicit description of a quantum state, construct the state. \item \emph{State transformations}: given an implicit description of a quantum operation (e.g.\ a unitary), perform it on a given input state. \end{itemize} Many quantum protocols and algorithms are most naturally viewed as synthesizing a state, performing a state transformation, or both. For example, primitives in quantum cryptography such as quantum money~\cite{aaronson2009quantum} or quantum pseudorandom states~\cite{ji2018pseudorandom} revolve around constructing highly entangled, difficult-to-clone states. The class of algorithms known as variational quantum eigensolvers are meant to prepare grounds states of physical systems~\cite{cerezo2020variational}. A decoder for a quantum error-correcting code transforms noise-corrupted states into noise-free states~\cite{lidar2013quantum}. This motivates the study of the complexity of state synthesis and state transformations. The central question is the following: how difficult is it to prepare a given state or perform a given unitary transformation?\footnote{We highly recommend \cite{aaronson2016complexity} for an introduction to this nascent subject.} Unlike how search and decision problems can often be reduced to each other in classical computer science, such ``inherently quantum'' tasks cannot obviously be reduced to analogous classical decision or search problems. For example, it is unknown whether the ability to decide the local Hamiltonian problem (a problem that is complete for $\class{QMA}$, the quantum analogue of $\class{NP}$) in polynomial time implies the ability to efficiently \emph{construct} ground states of local Hamiltonians on a quantum computer.\footnote{In fact there is some evidence in the form of an oracle separation that efficient search-to-decision reductions for $\class{QMA}$ do not exist~\cite{irani2021quantum}.} Part of the difficulty comes from the fact that an $n$-qubit quantum state, comprised of $2^n$ amplitudes, is an exponentially more complex object than an $n$-bit string. We investigate \emph{interactive proofs for synthesizing states and unitaries}. In traditional models of interactive proofs (even the ones associated with quantum complexity classes such as $\cc{QIP}$ and $\cc{MIP}^*$), the goal of the verifier is to solve a decision problem with the help of an all-powerful prover. We propose a model of ``inherently quantum'' interactive proofs where the verifier's goal is to synthesize a quantum state or perform a quantum operation. The challenge is for the verifier to use the help of an untrusted prover to perform these tasks in a \emph{verifiable} way. Theoretical computer science has been deeply influenced by interactive proofs. Many central concepts and subjects, ranging from zero-knowledge proofs~\cite{goldwasser1989knowledge} to hardness of approximation~\cite{arora1998proof}, came from their study. We believe that studying state synthesis and state transformation tasks in the interactive setting will similarly give us a powerful approach to understanding the complexity of quantum states and quantum operations. We first discuss interactive state synthesis, and then discuss interactive unitary synthesis in \Cref{sec:intro-transforms}. \subsection{Interactive state synthesis} \label{sec:intro-state} Consider the following state synthesis problem: given a succinct description of a quantum circuit $C$ acting on $n$ qubits with depth up to $\exp(\mathrm{poly}(n))$, generate the state $\ket{\psi} = C \ket{0^n}$. That is, construct the state that results from applying the circuit $C$ to the all-zeros state. By succinct description, we mean that there is (for example) a Turing machine $M$ that on input $1 \leq j \leq \exp(\mathrm{poly}(n))$ written in binary, uses $\mathrm{poly}(n)$ space and outputs the $j$'th gate of $C$. This state synthesis problem has a natural physics motivation. Let $H$ denote a local Hamiltonian on $n$ qubits and let $t$ be an integer that is at most $\exp(\mathrm{poly}(n))$. Letting $C = \exp(-iH t)$, the state $\ket{\psi}$ denotes the evolution of the all-zeros state with respect to the Hamiltonian $H$ for time $t$ under the Schr\"{o}dinger equation. An experimental physicist may want, for example, to get their hands on $\ket{\psi}$ in order to study the long-term dynamics of the Hamiltonian $H$ (e.g., perhaps the physicist wants to investigate the equilibration properties of the system after exponential time, or whether it exhibits certain kinds of chaotic behavior~\cite{swingle2018unscrambling}). This state synthesis problem can be solved in quantum polynomial space: a quantum computer running in exponential time but using polynomial space can generate the state $\ket{\psi}$ by simply computing the gates of $C$ and applying them one by one (and uncomputing each gate after applying it). Furthermore, this state synthesis problem is $\class{PSPACE}$-hard; it was recently shown that $\class{PSPACE}$-hard problems can be embedded into exponential-time, polynomial-space unitary computations (i.e.\ quantum computations without intermediate measurements)~\cite{fefferman2021eliminating,girish2021quantum}. Since we do not expect quantum computers to be able to solve $\class{PSPACE}$-hard problems in polynomial time, we do not expect this state synthesis problem to be solvable in polynomial time either. Here we ask whether a polynomial-time quantum computer can synthesize the state $\ket{\psi}$ with the help of an all-powerful, but untrusted, prover. We call this the \emph{Interactive State Synthesis} problem. In a sense, we are asking whether there is a ``state complexity version'' of the $\class{IP} = \class{PSPACE}$ protocol. By this we mean the following: the celebrated result $\class{IP} = \class{PSPACE}$ of~\cite{lund1992algebraic,shamir1992ip} shows that a polynomial-time \emph{classical} verifier can verify membership in any $\class{PSPACE}$ language by interacting with an all-powerful but untrusted prover. Whereas the protocol developed by~\cite{lund1992algebraic,shamir1992ip} (and what we'll henceforth call the ``$\class{IP} = \class{PSPACE}$ protocol'') is meant to verify \emph{decision problems}, it is straightforward to extend the protocol in order to solve the \emph{function} version of any $\class{PSPACE}$ problem, where the goal is to produce the output string $s \in \{0,1\}^{\mathrm{poly}(n)}$ of a polynomial-space Turing machine $M$ that has run for time $t \leq \exp(\mathrm{poly}(n))$. To do so, the verifier can treat each output bit of $s$ as the answer to a well-defined decision problem (i.e.\ ``Is the $i$'th bit of the output of $M$, when run for time $t$, equal to $1$?''), and summon the $\class{IP} = \class{PSPACE}$ protocol for each of the output bits. In our state synthesis problem, the goal is not just to produce a string $s$ on $n$ bits but an entire \emph{quantum state} on $n$ qubits. Note that by leveraging the $\class{IP} = \class{PSPACE}$ protocol, a polynomial-time verifier can compute any amplitude of the target state $\ket{\psi}$ of its choice (up to a phase). This is because (as we show in \Cref{sec:tomography}) the quantity $|\alpha_x|^2 = |\ip{x}{\psi}|^2$ can be approximated in polynomial space; since $\class{IP} = \class{PSPACE}$ a polynomial-time verifier can interact with a prover to compute such an approximation also. However, in our setting the quantum verifier wants to certify that at the end of an interaction with an untrusted prover, a specified collection of $n$ qubits in the possession of the verifier is (close to) the coherent superposition $\ket{\psi} = \sum_x \alpha_x \ket{x}$. This goal immediately raises a number of challenges: first, the verifier has to somehow obtain information about exponentially many amplitudes in polynomial time. Second, the verifier has to also check that the prover has not maliciously entangled itself with the $n$ target qubits at the end of the interaction; for example, the verifier should ensure that it doesn't have the first $n$ qubits of the entangled state $\sum_x \alpha_x \ket{x} \ket{\phi_x}$ where the states $\{ \ket{\phi_x} \}$ are in the possession of the prover. Our main result is a positive solution to the Interactive State Synthesis problem. We say that a family $( \ket{\psi_n} )_{n \in \ensuremath{\mathbb{N}}}$ of quantum states where $\ket{\psi_n}$ has $n$ qubits is in \cc{statePSPACE}\xspace if there exists a space-uniform family of quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ such that $C_n$ outputs $\ket{\psi_n}$. In turn, the circuit family $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform if $C_n$ is of size at most $\exp(\mathrm{poly}(n))$ and uses $\mathrm{poly}(n)$ qubits, and if there exists a (classical) Turing machine that on input $(1^n,j)$, outputs the $j$'th gate of $C_n$ using $\mathrm{poly}(n)$ space. \begin{thm}[Main theorem, informal] \label{thm:main-intro} Let $( \ket{\psi_n} )_{n \in \ensuremath{\mathbb{N}}}$ denote a family of quantum states in \cc{statePSPACE}\xspace. Then there exists an interactive protocol between a polynomial-time quantum verifier and an untrusted quantum prover that, on input $1^n$, constructs an approximation of $\ket{\psi_n}$. More precisely, the protocol has the following guarantees: for all $n \in \ensuremath{\mathbb{N}}$, when the verifier receives input $1^n$, \begin{itemize}[leftmargin=*] \item \emph{(Completeness)} There exists an ``honest'' prover that is accepted by the verifier with probability $1$, and for which the verifier outputs a density matrix $\rho$ such that \[ \td(\rho,\kb{\psi_n}) \leq \exp(-\Omega(n))~. \] \item \emph{(Soundness)} For all prover strategies, \[ \Pr \left\{ \text{verifier accepts and outputs $\rho$ such that $\td(\rho,\kb{\psi_n}) \geq \frac{1}{\mathrm{poly}(n)}$} \right\} \leq \exp(-\Omega(n))~. \] Here, $\td(\cdot,\cdot)$ denotes trace distance. \end{itemize} \end{thm} Intuitively, a state $\ket{\psi}$ can be synthesized via an interactive protocol between a verifier and a prover if (a) an ``honest'' prover can help the verifier synthesize $\ket{\psi}$ with high probability (i.e.\ the completeness property), and (b) for all provers, if the verifier accepts with non-negligible probability, then the output state is close to $\ket{\psi}$ (i.e.\ the soundness property). We note that \Cref{thm:main-intro} is \emph{not} implied by the result $\cc{QIP} = \class{PSPACE}$~\cite{jain2011qip}. This is because $\cc{QIP}$, though defined in terms of quantum verifiers, is still a class of decision problems, and the result does not say anything about the complexity of performing state synthesis. We do, however, use the $\cc{QIP} = \cc{PSPACE}$ protocol as a subroutine in our state synthesis protocol. See \cref{sec:state-synthesis-overview} for a detailed overview of the proof of \cref{thm:main-intro}. Our precise statement of \Cref{thm:main-intro} is formulated in terms of a \emph{state complexity class}. Unlike standard complexity classes (such as $\cc{BQP}$ and $\cc{QIP}$) which are sets of languages, a state complexity class is a set of families $(\ket{\psi_n})_n$ of quantum states.\footnote{A more general definition of state complexity classes would allow for sets of states $\{ \ket{\psi_x} \}_{x \in \cube*}$ indexed by binary strings, but for simplicity we focus on families of states indexed by $\ensuremath{\mathbb{N}}$.} We introduce the class $\cc{stateQIP}$, which consists of all state families that can be generated by interactive protocols with completeness and soundness properties like those described in \Cref{thm:main-intro}.\footnote{Actually, strictly speaking we only define $\stateQIP{c,s}$ for completeness and soundness parameters $c$ and $s$.} \Cref{thm:main-intro} can then be succinctly recast as stating that $\cc{statePSPACE}\xspace \subseteq \cc{stateQIP}$. We also prove a partial converse, which can be interpreted as ``$\cc{stateQIP} \subseteq \cc{stateEXP}$": \begin{thm}[informal] \label{thm:converse-intro} For all $(\ket{\psi_n})_n \in \cc{stateQIP}$ there exists a uniform family of exponential-size quantum circuits $Q = (Q_n)_n$ such that $Q_n$ outputs an approximation of $\ket{\psi_n}$. \end{thm} By uniform, we mean that there is an exponential-time Turing machine $M$ that on input $(1^n,j)$ outputs the $j$-th gate of the circuit $Q_n$. We note that the uniformity condition makes this theorem nontrivial: while \emph{every} quantum state on $n$ qubits has a $\exp(\mathrm{poly}(n))$-size circuit that synthesizes it,\footnote{To a good approximation, using the Solovay-Kitaev theorem~\cite{dawson2006solovay}.} it is not necessarily the case that for an arbitrary state family $(\ket{\psi_n})_n$ there is a single Turing machine that specifies \emph{all} of the exponential size circuits synthesizing each $\ket{\psi_n}$. This leaves open the intriguing question of whether a full converse can be proven. In other words, is it true that if $(\ket{\psi_n})_n$ is in $\cc{stateQIP}$, then in fact $(\ket{\psi_n})_n$ is (approximately) in \cc{statePSPACE}\xspace? This would establish a full state synthesis analogue of the $\class{IP} = \class{PSPACE}$ theorem. We also prove that $\cc{stateR} = \cc{stateQMIP}$, where $\cc{stateR}$ denotes the class of state sequences $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ such that $\ket{\psi_n}$ is on $n$ qubits and the description of an approximation of $\ket{\psi_n}$ is computable as a function of $n$, and $\cc{stateQMIP}$ is defined similarly to $\cc{stateQIP}$ but with multiple entangled provers instead of a single prover. The proof uses the result $\cc{QMIP} = \cc{RE}$~\cite{ji2020mip}, and is otherwise similar to the proof of \cref{thm:main-intro}. The reason that $\cc{stateQMIP} \subseteq \cc{stateR}$, whereas $\cc{QMIP} \nsubseteq \cc{R}$, relates to the distinction between search and decision problems. \subsection{Interactive unitary synthesis} \label{sec:intro-transforms} We now consider the following unitary synthesis problem: given a pair $(C,\ket{\phi})$ where $C$ is a succinctly-described $n$-qubit circuit with depth at most $\exp(\mathrm{poly}(n))$ and $\ket{\phi}$ is an $n$-qubit state, generate the state $C \ket{\phi}$. This problem is solvable in quantum polynomial space: an algorithm can simply take the input state $\ket{\phi}$ and apply the circuit $C$ to it. A difference between this problem and the state synthesis problem presented in \cref{sec:intro-state} is that in the latter problem, the input $C$ provides an implicit classical description of the target state $\ket{\psi} = C \ket{0^n}$. In the unitary synthesis problem, however, the input $\ket{\phi}$ to the circuit $C$ is provided \emph{in quantum form}. Even if an algorithm were given unlimited time, it would not in general be able to compute a classical description of $C \ket{\phi}$; this is because only one copy of the state $\ket{\phi}$ is provided. For this reason, the unitary synthesis problem appears more challenging than the state synthesis problem. Similarly to before, we ask whether a polynomial-time verifier can accomplish the unitary synthesis task with the help of a prover. We call this the \emph{Interactive Unitary Synthesis} problem. In addition to all of the difficulties that arise with the Interactive State Synthesis problem, here we also have to contend with the fact that the one copy of $\ket{\phi}$ is a precious resource: a verifier has to take great care to ensure that a malicious prover does not corrupt the state in an undetectable way. We are not able to give a general solution to the Interactive Unitary Synthesis problem here. However we present solutions for nontrivial cases. We denote by \cc{unitaryPSPACE}\xspace the set of space-uniform sequences $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ of unitary quantum circuits where each $C_n$ acts on $n$ qubits. The first nontrivial case deals with families $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ in $\cc{unitaryPSPACE}\xspace$ that have \emph{polynomial action}: this means that $C_n$ acts nontrivially only on a $\mathrm{poly}(n)$-dimensional subspace. Interesting families of unitaries $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ that have polynomial action include \emph{reflections} $C_n = I - 2\kb{\theta_n}$ where $( \ket{\theta_n} )_{n}$ is some family of states. These unitaries act nontrivially on a one-dimensional subspace (namely, the space spanned by $\ket{\theta_n}$). Since the states $( \ket{\theta_n} )_n$ might be extremely complicated (requiring exponential time to synthesize without the help of a prover, for example), applying the unitaries $(C_n)_{n}$ can still be quite nontrivial. \begin{thm}[Interactive synthesis of polynomial-action unitaries, informal] \label{thm:poly-action-intro} Let $( C_n )_{n \in \ensuremath{\mathbb{N}}}$ denote a family of unitaries in \cc{unitaryPSPACE}\xspace with polynomial action. Then there exists an interactive protocol between a polynomial-time quantum verifier and an untrusted quantum prover that, given input an $n$-qubit state $\ket{\phi}$, constructs an approximation of $\ket{\psi_n} = C_n \ket{\phi}$. More precisely, the protocol has the following guarantees: for all $n \in \ensuremath{\mathbb{N}}$, \begin{itemize}[leftmargin=*] \item \emph{(Completeness)} There exists an ``honest'' prover such that for all input states $\ket{\phi}$, the verifier accepts with probability $1$ and outputs a density matrix $\rho$ such that \[ \td(\rho,\kb{\psi_n}) \leq 1/\mathrm{poly}(n)~. \] \item \emph{(Soundness)} For all input states $\ket{\phi}$, for all prover strategies, \[ \Pr \left\{ \text{verifier accepts and outputs $\rho$ such that $\td(\rho,\kb{\psi_n}) \ge \frac{1}{\mathrm{poly}(n)}$} \right\} \leq \exp(-\Omega(n))~. \] \end{itemize} \end{thm} (Again, a similar statement holds with multiple entangled provers if we write $\cc{unitaryR}$ in place of $\cc{unitaryPSPACE}$.) Extending \Cref{thm:poly-action-intro} to all unitary families in \cc{unitaryPSPACE}\xspace, i.e.\ not just polynomial-action ones, is an open problem that we leave for future work. (It would even be interesting to do so using \emph{multiple} provers, either entangled or unentangled.) This question seems closely related to an open problem posed by Aaronson and Kuperberg~\cite{aaronson2007quantum}: \begin{prb}[Unitary Synthesis Problem] \label{prb:unitary-synthesis} Is it true that for every $n$-qubit unitary $U$ there exists a classical oracle $M$ such that a $\mathrm{poly}(n)$-time quantum algorithm with query access to $M$ can approximately implement $U$? \end{prb} On the other hand, the corresponding oracle result for state synthesis \emph{is} known: for every $n$-qubit state $\ket{\psi}$, there is a classical oracle $M$ that can be queried by a polynomial-time quantum algorithm to synthesize $\ket{\psi}$ (see \Cref{prop:oracle-state-synthesis}). As explained in \Cref{sec:state-synthesis-overview}, this is the starting point for our state synthesis protocol of \Cref{thm:main-intro}. Furthermore, by reducing to the case of state synthesis, \Cref{prb:unitary-synthesis} \emph{does} admit a solution when the unitary $U$ to be simulated only acts nontrivially on a polynomial-dimensional subspace --- and \Cref{thm:poly-action-intro} is the analogue of this fact in the setting of interactive unitary synthesis. We also show how to generalize \Cref{thm:poly-action-intro} beyond polynomial-action unitary families, provided that the verifier also receives a succinct description of a polynomial-dimensional subspace $S$ which contains the input state $\ket{\phi}$. By succinct description, we mean a polynomial-space Turing machine $M$ that on input $j$, outputs the $j$'th gate of a quantum circuit $P$ that implements the reflection about $S$ (i.e.\ $P = I - 2 \Pi_S$ where $\Pi_S$ is the projection onto $S$). \begin{cor}[Interactive unitary synthesis with restricted inputs, informal] \label{cor:poly-input-intro} Let $( C_n )_{n \in \ensuremath{\mathbb{N}}}$ denote a family of unitaries in \cc{unitaryPSPACE}\xspace. Then there exists an interactive protocol between a polynomial-time quantum verifier and an untrusted quantum prover that, when the verifier is given a succinctly-described subspace $S$ of $n$-qubit states and a state $\ket{\phi} \in S$ as input, constructs an approximation of $\ket{\psi_n} = C_n \ket{\phi}$. More precisely, the protocol has the following guarantees: for all polynomials $p$, for all $n \in \ensuremath{\mathbb{N}}$, \begin{itemize}[leftmargin=*] \item \emph{(Completeness)} There exists an ``honest'' prover such that for all succinctly-described subspaces $S \subset (\ensuremath{\mathbb{C}}^2)^{\otimes n}$ of dimension at most $p(n)$ and input states $\ket{\phi} \in S$, the verifier accepts with probability $1$ and outputs a density matrix $\rho$ such that \[ \td(\rho,\kb{\psi_n}) \leq 1/\mathrm{poly}(n)~. \] \item \emph{(Soundness)} For all succinctly described subspaces $S \subset (\ensuremath{\mathbb{C}}^2)^{\otimes n}$ of dimension at most $p(n)$ and input states $\ket{\phi} \in S$, for all prover strategies, \[ \Pr \left\{ \text{verifier accepts and outputs $\rho$ such that $\td(\rho,\kb{\psi_n}) \ge \frac{1}{\mathrm{poly}(n)}$} \right\} \leq \exp(-\Omega(n))~. \] \end{itemize} \end{cor} In other words, compared to \cref{thm:poly-action-intro}, this corollary trades the assumption on the family of unitaries for an assumption that the verifier has a classical description of a low-dimensional subspace which contains the input state. Similarly to our state synthesis results, the formal statements of \Cref{thm:poly-action-intro,cor:poly-input-intro} are presented in terms of a \emph{unitary complexity class} $\cc{unitaryQIP}$, which consists of all families $(U_n)_n$ of unitaries that can be synthesized via an interactive protocol with completeness and soundness properties like those described in \Cref{thm:poly-action-intro,cor:poly-input-intro}. \subsection{Open problems and future directions} \label{sec:opfd} We list some open problems: \begin{enumerate}[leftmargin=*] \item Does it hold that $\cc{stateQIP} \subseteq \cc{statePSPACE}$? In other words, if a family of states can be synthesized interactively via a $\cc{stateQIP}$ protocol, does that mean the family of states can be synthesized in polynomial space? Answering this question may be related to the next two open problems. \item The state synthesis protocol of \Cref{thm:main-intro} has \emph{state soundness error} that is $1/\mathrm{poly}(n)$. This means that, conditioned on the verifier accepting with probability at least $\exp(-\Omega(n))$, the output state of the verifier is guaranteed to be at least $1/\mathrm{poly}(n)$-close to the ideal target state $\ket{\psi_n}$. Is it possible to also get the closeness guarantee to be exponentially small, even at higher acceptance probabilities? \item A fundamental result by Watrous~\cite{watrous03pspace} is that all $\class{QIP}$ protocols with a polynomial number of rounds can be parallelized so that they require three rounds (the prover sends the first message, the verifier sends a response, and then prover sends the final message). Does this also hold for $\cc{stateQIP}$ and $\cc{unitaryQIP}$ protocols? \label{item:rr} \item Does it hold that $\cc{unitaryPSPACE} \subseteq \cc{unitaryQIP}$? In other words, if a family of unitaries can be implemented via polynomial space quantum circuits, then is there a $\cc{unitaryQIP}$ protocol for it? Can one prove this inclusion under the complexity-theoretic assumption that $\cc{P} = \cc{PSPACE}$? While $\cc{P} = \cc{PSPACE}$ implies that states in \cc{statePSPACE}\xspace can be synthesized in quantum polynomial time (without the help of a prover!), it is not obvious that this helps with synthesizing unitaries in \cc{unitaryPSPACE}\xspace. \item A potentially easier goal than the previous item is to show other interesting family of unitaries that can be interactively synthesized. For example, for which classes of Hamiltonians $H$ does the evolution operator $e^{-iHt}$ admit an interactive synthesis protocol for exponentially long $t$? This may be related to questions about ``fast-forwarding of Hamiltonians'' that were raised by~\cite{atia2017fast}. \item Can our state synthesis results be extended to synthesize families of \emph{mixed states} like those in \cc{statePSPACE}\xspace?\footnote{It would suffice to show that any such mixed state has a purification in \cc{statePSPACE}\xspace. This does not immediately follow from the results of \cite{fefferman2021eliminating,girish2021quantum} about purifying space-bounded quantum computation, because these results seem to apply only to decision problems.)} Similarly, one can generalize the task of synthesizing unitaries to synthesizing \emph{channels}. Are there special classes of channels (going beyond unitaries) which can be interactively synthesized? \item Are there interesting cryptographic applications of interactive state synthesis or unitary synthesis? For example, is there a meaningful notion of \emph{zero-knowledge} interactive state synthesis? \item Are there interesting classes of states that can be interactively synthesized with an \emph{efficient} prover? Our state synthesis protocol of \Cref{thm:main-intro} requires the honest prover to be capable of solving $\class{PSPACE}$-complete problems. In cryptography, however, interactive protocols require that the honest prover can run in polynomial time (perhaps after having received some advice) and be accepted with high probability. \item What state or unitary families can be synthesized by a verifier interacting with multiple \emph{un}entangled quantum provers? As will be explained later, the obstacles appear to be soundness amplification and obtaining an appropriate analogue of the results from \cref{sec:tomography}. \end{enumerate} Regarding Question~\ref{item:rr}, we remark that our state and unitary synthesis protocols have polynomially many rounds. However, in \cref{sec:rrsus} we sketch constant-round variants of our state and unitary synthesis protocols, and we conjecture that these constant-round variants satisfy completeness and soundness as well. The Interactive State and Unitary Synthesis problems can be seen as the confluence of two central research directions in quantum computing and quantum information. One is about investigating protocols for \emph{verification} of quantum computations, and the other is about exploring the \emph{complexity of quantum states and state transformations}. Over the past decade, the field has developed significant insight into how quantum computations can be verified, including the fact that a classical verifier can efficiently check, via an interactive proof, the results of polynomial-time quantum computations~\cite{mahadev2018classical}. The systematic study of the complexity of ``inherently quantum'' tasks is much more nascent, however. Questions about state and unitary complexity are often asked in the context of a \emph{specific} state to prepare or a \emph{specific} quantum operation to perform. There is a conspicuous lack, however, of a \emph{general} theory of quantum state and unitary complexity. We hope that our results contribute toward building such a theory. \section{Quantum Interactive Protocols and Related Complexity Classes} \label{sec:protocols} \subsection{Quantum interactive protocols} Since in quantum computing the standard model of computation is the quantum circuit model (rather than quantum Turing machines), we model the verifier in a quantum interactive protocol as a sequence of \emph{verifier circuits}, one for each input length. A verifier circuit is itself a tuple of quantum circuits that correspond to the operations performed by the verifier in each round of the protocol. More formally, a \emph{$k$-round quantum verifier circuit} $C = (C_j)_{j \in [k]}$ is a tuple of general quantum circuits that each act on a pair of registers $(\mathsf{V},\mathsf{M})$. The register $\mathsf{V}$ is further divided into disjoint sub-registers $(\mathsf{V}_\mrm{work}, \mathsf{V}_\mrm{flag}, \mathsf{V}_\mrm{out})$. The register $\mathsf V_\mrm{work}$ is the verifier circuit's ``workspace", the register $\mathsf V_\mrm{flag}$ is a single qubit indicating whether the verifier accepts or rejects, and the register $\mathsf V_\mrm{out}$ holds the verifier's output (if applicable). The register $\mathsf{M}$ is the message register. The size of a verifier circuit $C$ is the sum of the circuit sizes of the $C_j$'s. A \emph{quantum prover} $P$ for a verifier circuit $C$ is a unitary that acts on $\mathsf{M}$ as well as a disjoint register $\mathsf{P}$. Let $x \in \{0,1\}^*$ denote a string whose length is at most the number of qubits in $\mathsf{V}_\mrm{work}$. We write $C(x) \mathord{\leftrightarrows} P$ to denote the interaction between the verifier circuit $C$ and the prover $P$ on input $x$, which is defined according to the following process. The initial state of the system is $\ket{\phi_0} = \ket{x,0\cdots 0}_{\mathsf V_\mrm{work}} \ket0\cdots 0_{\mathsf{V}_\mrm{flag} \mathsf{V}_\mrm{out} \mathsf{M} \mathsf{P}}$. Inductively define $\ket{\phi_i} = P \ket{\phi_{i-1}}$ for odd $i \leq 2k$, and $\ket{\phi_i} = C_{i/2} \ket{\phi_{i-1}}$ for even $i \leq 2k$. We say that $C(x) \mathord{\leftrightarrows} P$ accepts (resp. rejects) if measuring the register $\mathsf{V}_\mrm{flag}$ in the standard basis yields the outcome $1$ (resp. $0$). We say that the \emph{output of $C(x) \mathord{\leftrightarrows} P$ conditioned on accepting} is the density matrix \[ \frac{\mathrm{tr}_{\mathsf{V} \mathsf{M} \mathsf{P} \setminus \mathsf{V}_\mrm{out}} \left( \ketbra{1}{1}_{\mathsf{V}_\mrm{flag}} \cdot \phi_{2k} \right)}{\mathrm{tr} \left( \ketbra{1}{1}_{\mathsf{V}_\mrm{flag}} \cdot \phi_{2k} \right)}~; \] in other words, it is the reduced density matrix of $\ket{\phi_{2k}}$ on register $\mathsf{V}_\mrm{out}$, conditioned on $C(x) \mathord{\leftrightarrows} P$ accepting. (If the probability of accepting is $0$, then we leave the output undefined.) A \emph{quantum verifier} $V = (V_n)_{n \in \ensuremath{\mathbb{N}}}$ is a uniform sequence of polynomial-size and polynomial-round quantum verifier circuits. \subsection{The class \texorpdfstring{$\cc{QIP}$}{QIP}} The following is the standard quantum analogue of the complexity class $\class{IP}$: \begin{dfn}[$\class{QIP}$] Let $L \subseteq \{0,1\}^*$ be a language, let $s : \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\geq 0}$ be a function, and let $V = (V_n)_{n \in \ensuremath{\mathbb{N}}}$ be a quantum verifier. Then $V$ is a \emph{$\class{QIP}[s]$ verifier for $L$} if and only if \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item \emph{Completeness:} For all $x \in L$, there exists a quantum prover $P$ (called an \emph{honest prover}) such that \begin{equation*} \pr {V_{|x|}(x) \mathord{\leftrightarrows} P \text{ accepts}} = 1. \end{equation*} \item \emph{Soundness:} For all quantum provers $P$ and all $x \notin L$, \begin{equation*} \pr {V_{|x|}(x) \mathord{\leftrightarrows} P \text{ accepts}} \leq s(|x|). \end{equation*} \end{itemize} Here, the probability is over the randomness of the interaction. Finally, let $\class{QIP}[s]$ be the set of languages $L$ such that there exists a $\class{QIP}[s]$ verifier for $L$. Let $\class{QIP} = \class{QIP}[1/2]$.\footnote{The reader may wonder whether the definition of $\class{QIP}$ here is sensitive to the assumption of perfect completeness; it is known that if we use the universal gate set $\{ H, T, \mathit{CNOT} \}$, then we can assume perfect completeness without loss of generality~\cite[Section 4.2]{vidick2016quantum}.} \end{dfn} It is known that the soundness error of $\class{QIP}$ protocols can be reduced to be exponentially small, at the cost of repeating the protocol polynomially many times. The next theorem characterizes the class $\class{QIP}$, and is a quantum analogue of the $\class{IP} = \class{PSPACE}$~\cite{lund1992algebraic,shamir1992ip} theorem: \begin{thm}[\cite{jain2011qip}] \label{thm:qip=pspace} $\class{QIP} = \class{PSPACE}$. \end{thm} \subsection{The class \texorpdfstring{$\cc{stateQIP}$}{stateQIP}} Next, we define quantum interactive proofs for state synthesis and their associated complexity class. \begin{dfn}[{$\stateQIP{c,s}$}] \label{def:stateQIP} Let $\Psi = (\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ be a family of states where $\ket{\psi_n}$ is on $n$ qubits\footnote{The assumption that $\ket{\psi_n}$ is on $n$ qubits is for convenience; this definition and our results can easily be generalized to the case where each $\ket{\psi_n}$ is a state on $\mathrm{poly}(n)$ qubits.}, let $c: \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\geq 0}$ and $s:\ensuremath{\mathbb{N}} \times [0,1] \to \ensuremath{\mathbb{R}}_{\geq 0}$ be functions, and let $V = (V_n)_{n \in \ensuremath{\mathbb{N}}}$ be a quantum verifier. Then $V$ is a \emph{$\cc{stateQIP}[c,s]$ verifier for $\Psi$} if and only if \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item \emph{Completeness:} For all $n \in \ensuremath{\mathbb{N}}$, there exists a quantum prover $P$ (called an \emph{honest prover}) such that \begin{equation*} \pr {V_n \mathord{\leftrightarrows} P \text{ accepts}} = 1 \qquad \text{and} \qquad \td(\rho, \psi_n) \leq c(n), \end{equation*} where $\rho$ is the output of $V_n \mathord{\leftrightarrows} P$ conditioned on accepting. \item \emph{Soundness:} For all $n \in \ensuremath{\mathbb{N}}$ and for all quantum provers $P$, \begin{equation*} \pr {V_n \mathord{\leftrightarrows} P \text{ accepts}} \leq s(n,\td(\rho, \psi_n)), \end{equation*} where $\rho$ is the output of $V_n \mathord{\leftrightarrows} P$ conditioned on accepting. \end{itemize} Here, the probability is over the randomness of the interaction. We call $c$ the \emph{state completeness} and $s$ the \emph{soundness} of $V$. Finally, let $\stateQIP{c,s}$ be the set of state sequences $\Psi = (\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ such that there exists a $\stateQIP{c,s}$ verifier for $\Psi$. \end{dfn} As discussed in the introduction, the class $\stateQIP{c,s}$ is a set of \emph{sequences of quantum states}, rather than languages as is typical in complexity theory. One could define $\stateQIP{c,s}$ more generally to include families of quantum states $(\ket{\psi_x})_{x \in \{0,1\}^*}$ indexed by binary strings, but for simplicity we stick with sequences of states. We call $\stateQIP{c,s}$ a \emph{state complexity class}. To keep consistent with the definition of $\class{QIP}$, we assume that $\cc{stateQIP}$ protocols have perfect protocol completeness, i.e.\ the honest prover is accepted with probability 1. However, we do not know whether this holds without loss of generality (like it does for $\class{QIP}$); we leave this as an open problem. The soundness function $s$ in \Cref{def:stateQIP} expresses how the probability of acceptance depends on the closeness of the output state (conditioned on accepting) to the target state $\ket{\psi_n}$. The next lemma shows that soundness amplification holds for $\stateQIP{c,s}$ for soundness functions $s(n,\delta)$ that for all $n \in \ensuremath{\mathbb{N}}$ are log-concave\footnote{A function $f:[0,1] \to \ensuremath{\mathbb{R}}_{> 0}$ is \emph{log-concave} if $\log f$ is concave, i.e.\ if $\log f(\alpha \delta_1 + (1 - \alpha) \delta_2) \geq \alpha \log f(\delta_1) + (1 - \alpha) \log f(\delta_2)$ for $0 \le \alpha, \delta_1, \delta_2 \le 1$.}, nonincreasing functions of $\delta$: \begin{lem}[Soundness amplification for $\cc{stateQIP}$] \label{lem:stateQIP-amplification} Let $c: \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\geq 0}$ and $s: \ensuremath{\mathbb{N}} \times [0,1] \to \ensuremath{\mathbb{R}}_{\geq 0}$ be functions, where for every $n \in \ensuremath{\mathbb{N}}$ the function $\delta \mapsto s(n, \delta)$ is log-concave and nonincreasing. Then for all polynomials $m \ge 1$, it holds that $\stateQIP{c,s} = \stateQIP{c,s^m}$, where $s^m$ denotes the function $(n,\delta) \mapsto s(n,\delta)^{m(n)}$. \end{lem} \begin{proof} First we argue that $\stateQIP{c,s^{m}} \subseteq \stateQIP{c,s}$. Fix a $\stateQIP{c,s^m}$ verifier $V$ for a state family $\Psi = (\psi_n)_{n \in \ensuremath{\mathbb{N}}}$; it suffices to prove that $V$ is also a $\stateQIP{c,s}$ verifier for $\Psi$. To this end, for an arbitrary $n \in \ensuremath{\mathbb{N}}$ and quantum prover $P$, it suffices to prove that $V_n \mathord{\leftrightarrows} P$ accepts with probability at most $q = s(n, \td(\rho, \psi_n))$ where $\rho$ is the output of $V_n \mathord{\leftrightarrows} P$ conditioned on accepting. If $q \ge 1$ then this holds vacuously (because probabilities are at most 1), and otherwise it holds because $\pr{V_n \mathord{\leftrightarrows} P \text{ accepts}} \le q^m \le q$ by the definition of $V$ and the fact that $m \ge 1$. We now argue the reverse containment $\cc{stateQIP}[c,s] \subseteq \cc{stateQIP}[c,s^{m}]$. Let $V = (V_n)_{n \in \ensuremath{\mathbb{N}}}$ be a $\stateQIP{c,s}$ verifier for a state family $\Psi = (\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$. Consider the following verifier $V' = (V_n')_{n \in \ensuremath{\mathbb{N}}}$. The verifier circuit $V_n'$ runs $m(n)$ independent instances of $V_n$ in sequence, where the $j$'th instance of $V_n$ uses output register $\mathsf{O}_j$ for $j \in [m(n)]$. If any instance of $V_n$ rejects, then $V'_n$ rejects. Otherwise, $V'_n$ samples a uniformly random $j \in [m(n)]$ and outputs the content of $\mathsf{O}_j$. This is clearly a polynomial-round, polynomial-size $\cc{stateQIP}$ verifier for $\Psi$. Completeness is straightforward: an honest prover for $V'_n$ can simulate $m(n)$ independent instances of an honest prover for $V_n$. We now prove soundness. Let $P$ denote an arbitrary prover for the verifier circuit $V_n'$. Let $\rho_j$ denote the reduced state in $\mathsf{O}_j$ at the end of the execution of the $j$'th instance, conditioned on the first $j-1$ instances accepting. Then we have that \begin{align} \pr {V_n \mathord{\leftrightarrows} P \text{ accepts}} &= \prod_{j=1}^{m(n)} \pr{\text{the $j$'th instance accepts} \mid \text{first $j-1$ instances accepted}}~ \notag \\ &\leq \prod_{j=1}^{m(n)} s(n,\td(\rho_j,\psi_n)) \label{eq:stateQIP-amp-1}, \intertext{where the first equality is by the definition of conditional probability. The second line is due to the fact that the $j$'th instance of $V_n$ was run independently of all previous instances, so we can consider the output of the previous instances (conditioned on having accepted) and the state of the prover $P$ at the beginning of the $j$'th instance of $V_n$ to form the state of a prover $P_j$ for $V_n$. So, by the soundness guarantee of $V$, the $j$'th probability of acceptance is at most $s(n,\td(\rho_j,\psi_n) )$. Using the log-concavity of $s(n,\delta)$ as a function of $\delta$, we get that~\eqref{eq:stateQIP-amp-1} can be upper-bounded by} &\leq s \left( n , \mathbb{E}_{j \sim [m(n)]} \td(\rho_j,\psi_n) \right)^{m(n)} \notag \\ \intertext{which, since trace distance is convex and $s(n,\delta)$ is a nonincreasing function of $\delta$, is at most} &\leq s \left( n , \td \left(\mathbb{E}_{j \sim [m(n)]} \rho_j,\psi_n \right) \right)^{m(n)}. \notag \end{align} The result follows, since $\mathbb{E}_{j \sim [m(n)]} \rho_j$ is the density matrix that is output by $V_n'$ conditioned on accepting all instances. \end{proof} \begin{rmk*} For functions $s: \ensuremath{\mathbb{N}} \times [0,1] \to \ensuremath{\mathbb{R}}_{\geq 0}$ that do not satisfy the preconditions of \cref{lem:stateQIP-amplification}, soundness amplification can still be achieved as follows: Find a function $s'$ that is pointwise at least $s$ and that \emph{does} satisfy the preconditions of \cref{lem:stateQIP-amplification}, and then apply soundness amplification with $s'$. For example, consider a function of the form \begin{equation*} s(n,\delta) = \left\{ \begin{array}{ll} 1 & \mbox{if } \delta \leq a(n) \\ p(n) & \mbox{otherwise} \end{array} \right., \end{equation*} for which the soundness condition has the following natural interpretation: If the verifier accepts with probability greater than $p(n)$, then the output state conditioned on accepting must be $a(n)$-close to the ideal state $\psi_n$. Then $s \le s'$ pointwise for \begin{equation*} s'(n,\delta) = \left\{ \begin{array}{ll} 1 & \mbox{if } \delta \leq a(n) \\ p(n)^{(\delta - a(n)) / (1-a(n))} & \mbox{otherwise} \end{array} \right., \end{equation*} and this function $s'$ satisfies the preconditions of \cref{lem:stateQIP-amplification}. \end{rmk*} The main result of our paper is the following theorem, which states that every family of states in \cc{statePSPACE}\xspace has a \cc{stateQIP} protocol. This was informally presented in the introduction as \Cref{thm:main-intro}. \begin{thm} \label{thm:prim-result} For every polynomial $q$, it holds that $\cc{statePSPACE}\xspace \subseteq \stateQIP{c,s}$ for \begin{align*} &c(n) = \exp(-q(n)), &s(n,\delta) = \exp \Paren{e^{-q(n)} - q(n) \cdot \delta^4}~. \end{align*} \end{thm} We prove \Cref{thm:prim-result} in \Cref{sec:synthesis}. \Cref{thm:prim-result} implies that for all polynomials $p$ and sequences $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, there exists a $\cc{stateQIP}$ verifier such that for all $n$, if the output state conditioned on accepting is further than $1/p(n)$ in trace distance from $\psi_n$, then the verifier accepts with probability less than $1/2$. We leave it as an open problem to improve this statement to negligible functions $p$: \begin{prb} Prove that $\cc{statePSPACE}\xspace \subseteq \stateQIP{c,s}$ for some functions $c$ and $s$ such that, for some function $\varepsilon(n) = n^{-\omega(1)}$, \begin{equation*} \forall n \in \ensuremath{\mathbb{N}}, \delta \in [\varepsilon(n), 1]: \ s(n,\delta) \le 1/2~. \end{equation*} \end{prb} We also show a partial converse (which was informally presented in the introduction as \Cref{thm:converse-intro}) to \Cref{thm:prim-result}: \begin{thm} \label{thm:sec-result} Let $c,e: \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\geq 0}$ and $s: \ensuremath{\mathbb{N}} \times [0,1] \to \ensuremath{\mathbb{R}}_{\geq 0}$ be functions such that $c \geq e$ and $s(n,\delta)$ is a nonincreasing function of $\delta$ for all $n \in \ensuremath{\mathbb{N}}$. Let $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ be a state family in $\cc{stateQIP}[c,s]$. Then for all polynomials $m$ there exists a polynomial $q$ and a uniform family of quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ such that each circuit $C_n$ takes in no inputs and has size at most $\exp(q(n))$, and furthermore the output $\rho_n$ of $C_n$ satisfies \[ \td(\rho_n,\psi_n) \leq \delta(n) + \exp(-m(n)) \] where $\delta: \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\ge 0}$ is a function such that $s(n,\delta(n)) \leq e(n)$. \end{thm} The theorem is phrased abstractly in terms of the completeness and state soundness functions $c$ and $s$; for intuition, suppose that $s(n,\delta)$ is a function such that for all $\delta \geq 1/\mathrm{poly}(n)$, $s(n,\delta) \leq \exp(-n)$ (which is the parameter regime of \Cref{thm:prim-result}). Then by setting $e(n)$ to be $\exp(-n)$, we get that the circuit $C_n$ synthesizes $\ket{\psi_n}$ up to $1/\mathrm{poly}(n)$ error. \begin{proof} The main idea of the proof follows the argument that $\class{QIP} \subseteq \mathsf{EXP}$. Consider the $\cc{stateQIP}[c,s]$ verifier for the state family $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$. Fix an index $n \in \ensuremath{\mathbb{N}}$, and let $k$ denote the number of rounds of the verifier on input $1^n$. There is a natural semidefinite program that captures the behavior of the interactive protocol: the program optimizes over a set of $2k$ density matrices that encode the state of the verifier and message registers at the beginning and end of each round, and checks that these density matrices are all consistent with each other. For example, in a $k=1$ round protocol, there is a density matrix $\sigma_0$ corresponding to the initial state of the verifier right before it sends its message, and there is a density matrix $\sigma_1$ that denotes the state of the verifier after the prover sends back its message, and the verifier measures $\sigma_1$ to determine whether to accept or reject. It turns out that any set of density matrices satisfying the initialization and consistency conditions corresponds to a valid interaction between the verifier and some prover (see~\cite[Section 4.3]{vidick2016quantum} for a detailed proof). The objective of the semidefinite program is to maximize the acceptance probability of the verifier. A feasible solution with value $\alpha$ is a sequence of density matrices $(\sigma_0,\sigma_1,\ldots,\sigma_{2k-1})$ where $\sigma_{2k-1}$ is the final state of the verifier, and measuring this state yields the accept state with probability $\alpha$. Suppose that $\alpha > e(n)$. Then by the soundness of the $\cc{stateQIP}$ verifier, the state $\sigma_{2k-1}$ (after being projected into the accept state) must contain in an output register a state $\sigma_{\mrm{out}}$ that is $\delta(n)$-close in trace distance to the target state $\ket{\psi_n}$. This is because $s(n, \delta(n)) \le e(n) < \alpha \le s(n, \td(\sigma_{\mrm{out}}, \psi_n))$, and because the soundness function $s(n, \delta)$ is non-increasing in $\delta$. Furthermore, since $c(n) \geq e(n)$, there must exist a feasible solution with value at least $e(n)$. Since these density matrices are on $\mathrm{poly}(n)$ qubits, the size of the semidefinite program is $\exp(\mathrm{poly}(n))$. The semidefinite program can be solved up to precision $\exp(-m(n))$ in $\exp(\mathrm{poly}(n,m(n)))$ time to obtain a feasible solution with value at least $e(n)$. Given the last density matrix $\sigma_{2k-1}$, a classical description of a $\left(\delta(n)+\exp(-m(n)) \right)$-approximation of $\ket{\psi_n}$ can be computed, and then using an algorithm like that of \Cref{alg:aaronson}, the state $\ket{\psi_n}$ can be synthesized up to $\delta(n) + \exp(-m(n))$ error. \end{proof} This leaves open the intriguing question of whether a full converse to \Cref{thm:prim-result} can be proved --- in other words, whether $\cc{stateQIP} = \cc{statePSPACE}$. \begin{prb} Show that $\cc{stateQIP}[c,s] \subseteq \cc{statePSPACE}\xspace$ for some nontrivial completeness and soundness functions $c,s$. \end{prb} \subsection{The class \texorpdfstring{$\cc{unitaryQIP}$}{unitaryQIP}} Next, we define quantum interactive proofs for unitary synthesis and their associated complexity class. In the following definition we write $V_n(\ket{\psi})$ to indicate that the input to the verifier circuit $V_n$ is an $n$-qubit state $\ket{\psi}$ rather than an $n$-bit string (as in the case of $\class{QIP}$). \begin{dfn}[{$\cc{unitaryQIP}[c,s]$}] Let $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ be a sequence of unitary transformations where $U_n$ acts on $n$ qubits, let $c: \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{R}}_{\geq 0}$ and $s:\ensuremath{\mathbb{N}} \times [0,1] \to \ensuremath{\mathbb{R}}_{\geq 0}$ be functions, and let $V = (V_n)_{n \in \ensuremath{\mathbb{N}}}$ be a quantum verifier. Then $V$ is a \emph{$\cc{unitaryQIP}[c,s]$ verifier for $U$} if and only if \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item \emph{Completeness:} For all $n \in \ensuremath{\mathbb{N}}$, there exists a quantum prover $P$ (called an \emph{honest prover}) such that for all $n$-qubit states $\ket{\psi}$, \begin{equation*} \pr {V_n(\ket{\psi}) \mathord{\leftrightarrows} P \text{ accepts}} = 1 \qquad \text{and} \qquad \td\Paren{\rho, U \psi U^\dagger} \leq c(n), \end{equation*} where $\rho$ is the output of $V_n (\ket{\psi})\mathord{\leftrightarrows} P$ conditioned on accepting. \item \emph{Soundness:} For all $n \in \ensuremath{\mathbb{N}}$, for all $n$-qubit states $\ket{\psi}$, and for all quantum provers $P$, \begin{equation*} \pr {V_n(\ket{\psi}) \mathord{\leftrightarrows} P \text{ accepts}} \leq s\Paren{n, \td \Paren{\rho, U \psi U^\dagger}}, \end{equation*} where $\rho$ is the output of $V_n (\ket{\psi}) \mathord{\leftrightarrows} P$ conditioned on accepting. \end{itemize} Here, the probability is over the randomness of the interaction. We call $c$ the \emph{unitary completeness} and $s$ the \emph{soundness} of $V$. Finally, let $\cc{unitaryQIP}[c,s]$ be the set of unitary sequences $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ such that there exists a $\cc{unitaryQIP}[c,s]$ verifier for $U$. \end{dfn} We call $\cc{unitaryQIP}$ a \emph{unitary complexity class}. One can consider variants of this definition; for example, the verifier could get multiple copies of an input state $\ket{\psi}$, which may make it easier to verifiably perform the unitary transformation on $\ket{\psi}$. One could also consider a variant where the input state $\ket{\psi}$ is sampled from some distribution; thus even an adversarial prover may not have full knowledge of $\ket{\psi}$. Each of these variations opens interesting and well-motivated questions that we leave to future work. Unlike with $\cc{stateQIP}$, we do not know analogous basic properties of $\cc{unitaryQIP}$ such as whether soundness amplification is possible, or whether the unitary families in $\cc{unitaryQIP}$ are (approximately) implementable by a family of circuits even of exponential size. As alluded to in the introduction, it appears more challenging to establish such statements because of the fragility of the quantum input to the unitary synthesis problem. For example, consider the problem of amplifying the soundness of a $\cc{unitaryQIP}$ protocol for a unitary family $(U_n)_{n \in \ensuremath{\mathbb{N}}}$. Typical approaches to soundness amplification, such as repeating the protocol a number of times, don't seem to apply here: the verifier only receives one copy of the input state $\ket{\phi}$ that it has to apply the unitary $U_n$ to, and due to the No-Cloning Theorem the verifier cannot obtain multiple copies of $\ket{\phi}$ to run independent instances of the protocol on. We thus leave the following as open questions: \begin{prb} Obtain soundness amplification for $\cc{unitaryQIP}$ (or give evidence that it is impossible). \end{prb} We note that for the aforementioned variants of the definition of $\cc{unitaryQIP}$ where the verifier has access to multiple copies of the input state, or the input state is sampled from some efficiently sampleable distribution, soundness amplification is possible. \begin{prb} Show that if a family $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ of unitaries is in $\cc{unitaryQIP}$, then there exists a space-uniform family $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ of quantum circuits that approximately implements $(U_n)_n$, in the sense that $\norm{C_n - U_n}_{\mrm{op}} \le \delta(n)$ for some function $\delta$ related to the completeness and soundness of the $\cc{unitaryQIP}$ protocol. \end{prb} \begin{prb} \label{prb:unitaryQIP} Show that $\cc{unitaryPSPACE}\xspace \subseteq \cc{unitaryQIP}[c,s]$ for nontrivial completeness and soundness functions $c,s$. \end{prb} In this paper we solve a special case of \Cref{prb:unitaryQIP}. Let $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ be a family of unitaries where $U_n$ acts on $n$ qubits. We say that $U$ has \emph{polynomial action} if for all $n \in \ensuremath{\mathbb{N}}$, the unitary $U_n$ acts nontrivially on a subspace $S_n \subset (\ensuremath{\mathbb{C}}^2)^{\otimes n}$ of dimension at most $\mathrm{poly}(n)$, and acts as the identity on the orthogonal complement of $S_n$. We show that unitary sequences in \cc{unitaryPSPACE}\xspace with polynomial action admit $\cc{unitaryQIP}$ protocols. The following theorem was informally presented as \Cref{thm:poly-action-intro} in the introduction. \begin{restatable}{thm}{polyaction} \label{thm:poly-action} Let $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ be a family in \cc{unitaryPSPACE}\xspace with polynomial action, and let $q$ be a polynomial. Then $U \in \cc{unitaryQIP}[c,s]$ for \begin{align*} &c(n) = \frac{1}{q(n)}, &s(n,\delta) = \exp \Paren{\frac{1}{q(n)} - q(n) \cdot \delta^4}~. \end{align*} \end{restatable} Note that the completeness error is larger than that of \Cref{thm:prim-result}; with the honest prover, the verifier can only guarantee that its output is $1/\mathrm{poly}(n)$-close to the target state. We prove \Cref{thm:poly-action} in \Cref{sec:transformations}. \section{Multiple Entangled Provers} \label{sec:multiple} The class $\cc{QMIP}$ is defined analogously to $\cc{QIP}$, but with multiple provers who may share arbitrarily many entangled qubits. The following theorem characterizes this class: \begin{thm}[\cite{ji2020mip}] \label{thm:qmip=re} $\cc{QMIP} = \cc{RE}$. \end{thm} Similarly, we define classes $\cc{stateQMIP}[c,s]$ and $\cc{unitaryQMIP}[c,s]$ analogously to $\stateQIP{c,s}$ and $\cc{unitaryQIP}[c,s]$ respectively, but with multiple provers who may share arbitrarily many entangled qubits. We also define the following analogues of the class $\cc{R}$ of computable languages, where by a ``computable sequence of quantum circuits" we mean a sequence in which the description of the $n$'th circuit can be computed as a function of $n$: \begin{dfn}[$\cc{stateR}$] $\cc{stateR}$ is the class of all sequences $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ such that each $\ket{\psi_n}$ is a state on $n$ qubits, and for every polynomial $q$ there exists a computable family of general quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ such that for all $n \in \ensuremath{\mathbb{N}}$, the circuit $C_n$ takes no inputs and $C_n$ outputs a density matrix $\rho$ such that $\td(\rho, \psi_n) \leq \exp(-q(n))$. \end{dfn} \begin{dfn}[$\cc{unitaryR}$] $\cc{unitaryR}$ is the class of all computable sequences $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ of unitary quantum circuits such that each $U_n$ acts on $n$ qubits. \end{dfn} We prove a statement identical to \cref{thm:prim-result} but with $\cc{stateR}$ and $\cc{stateQMIP}$ in place of $\cc{statePSPACE}$ and $\cc{stateQIP}$ respectively, and we also prove the converse statement: \begin{thm} \label{thm:qmip-prim-result} $\cc{stateR} = \bigcap_{\textnormal{polynomials $q$}} \cc{stateQMIP}[c_q, s_q]$ for \begin{align*} &c_q(n) = \exp(-q(n)), &s_q(n,\delta) = \exp \Paren{e^{-q(n)} - q(n) \cdot \delta^4}~. \end{align*} \end{thm} \begin{proof} First we prove that $\cc{stateR} \subseteq \bigcap_{\textnormal{polynomials $q$}} \cc{stateQMIP}[c_q, s_q]$. That is, given a state family $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ in $\cc{stateR}$ and a polynomial $q$, we prove that $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ is in $\cc{stateQMIP}[c_q, s_q]$. Clearly there exist functions $\mrm{cp}$ and $\mrm{ph}$ like those defined in \cref{subsec:desc-prot}, except that these functions are merely computable rather than $\class{PSPACE}$-computable. Then the associated languages $L_\mrm{cp}$ and $L_\mrm{ph}$ (again, defined in \cref{subsec:desc-prot}) are in $\cc{R}$, and hence admit $\cc{QMIP}$ verifiers $V_\mrm{cp}$ and $V_\mrm{ph}$ by \cref{thm:qmip=re} and the fact that $\cc{R} \subseteq \cc{RE}$.\footnote{We remark that with multiple \emph{un}entangled provers, obtaining the appropriate analogous statement appears to be nontrivial.} The rest of the proof is essentially the same as that of \cref{thm:prim-result}, observing that our $\cc{stateQIP}$ soundness amplification lemma (\cref{lem:stateQIP-amplification}) also holds for $\cc{stateQMIP}$ by essentially the same proof.\footnote{However, the analogous statement for multiple \emph{un}entangled provers does \emph{not} obviously hold, because during the first iteration of the soundness amplification procedure the provers could obtain entangled qubits for use in future iterations.} Now we prove that $\bigcap_{\textnormal{polynomials $q$}} \cc{stateQMIP}[c_q, s_q] \subseteq \cc{stateR}$. Let $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ be a state family in $\bigcap_{\textnormal{polynomials $q$}} \cc{stateQMIP}[c_q, s_q]$, and let $p$ be an arbitrary polynomial. By the definition of $\cc{stateR}$, it suffices to prove that there exists a computable family of general quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ such that for all $n \in \ensuremath{\mathbb{N}}$, the circuit $C_n$ takes no inputs and $C_n$ outputs a density matrix $\rho$ such that $\td(\rho, \psi_n) \leq \exp(-p(n))$. Let $q(n) = 4p(n) + 10$. The circuit $C_n$ does the following, where $V$ is a $\cc{stateQMIP}[c_q, s_q]$ verifier: \begin{enumerate}[leftmargin=*] \item Brute force over a discretization of the set of all provers for a $\cc{stateQMIP}[c_q, s_q]$ verifier, until finding a prover $P$ that $V_n$ accepts with probability at least $\exp\Paren{-e^{-q(n)}}$. \item Output the state $\rho$ produced by $V_n \mathord{\leftrightarrows} P$ conditioned on accepting. \end{enumerate} Such a prover $P$ can be found because there exists an ``honest" prover that $V_n$ accepts with probability 1, and there exists an arbitrarily good approximation of the honest prover in the discretization of the set of provers.\footnote{For comparison, the fact that $\cc{QMIP} \subseteq \cc{RE}$ also follows by brute-forcing over a discretization of the set of all provers. But unlike the state synthesis algorithm described above, this $\cc{QMIP} \subseteq \cc{RE}$ algorithm is not guaranteed to terminate, which is why \cref{thm:qmip-prim-result} is not directly analogous to \cref{thm:qmip=re}.} By the soundness guarantee of $\cc{stateQMIP}[c_q, s_q]$ verifiers it holds that \begin{equation*} \exp\Paren{-e^{-q(n)}} \le \PR{\text{$V_n$ accepts $P$}} \le s_q\Paren{n, \td\Paren{\rho, \psi_n}} = \exp \Paren{e^{-q(n)} - q(n) \cdot \td\Paren{\rho, \psi_n}^4}~. \end{equation*} Rearranging yields \begin{equation*} \td\Paren{\rho, \psi_n} \le \Paren{\frac{2 e^{-q(n)}}{q(n)}}^{1/4} \le 2^{1/4} \exp(-q(n)/4) \le \exp(-p(n)) \end{equation*} as required. \end{proof} We also prove a statement identical to \cref{thm:poly-action} but with $\cc{unitaryR}$ and $\cc{unitaryQMIP}$ in place of $\cc{unitaryPSPACE}$ and $\cc{unitaryQIP}$ respectively: \begin{restatable}{thm}{qmip-polyaction} \label{thm:qmip-poly-action} Let $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ be a family in $\cc{unitaryR}$ with polynomial action, and let $q$ be a polynomial. Then $U \in \cc{unitaryQMIP}[c,s]$ for \begin{align*} &c(n) = \frac{1}{q(n)}, &s(n,\delta) = \exp \Paren{\frac{1}{q(n)} - q(n) \cdot \delta^4}~. \end{align*} \end{restatable} \begin{proof} The proof is essentially the same as that of \cref{thm:poly-action}, except that the natural analogue of \cref{lem:helper-7p1} (i.e.\ with ``$\cc{stateR}$" in place of ``$\cc{statePSPACE}\xspace$" and with ``computable" in place of ``$\class{PSPACE}$-computable") holds trivially, and one should apply \cref{thm:qmip-prim-result} in place of \cref{thm:prim-result}. \end{proof} \section{Technical Overview} \label{sec:overview} \subsection{State synthesis} \label{sec:state-synthesis-overview} \subsubsection{State synthesis with a \emph{trusted} prover} The starting point for our proof of \Cref{thm:main-intro} is a solution to an \emph{oracle} version of the state synthesis problem, due to Aaronson~{\cite[Proposition 3.3.5]{aaronson2016complexity}}:\footnote{Aaronson's argument also appears implicitly in \cite{grover2002creating} in the case where $\ket{\psi} = \sum_{x \in \cube n} \alpha_x \ket{x}$ for nonnegative real numbers $\alpha_x$.} \begin{prp}[\cite{aaronson2016complexity,grover2002creating}, informal] \label{prop:oracle-state-synthesis} For all $n$-qubit states $\ket{\psi}$ there exists a classical oracle $M$ and a $\mathrm{poly}(n)$-size quantum circuit $C$ with oracle access to $M$ such that $C^M \ket{0^n} \approx \ket{\psi}$. \end{prp} We can equivalently view \Cref{prop:oracle-state-synthesis} as stating that there is an efficient synthesis protocol with a \emph{trusted} prover (namely, the oracle). The proof is as follows. Write the state $\ket{\psi}$ as $\sum_{x \in \{0,1\}^n} \alpha_x \ket{x}$. For all prefixes $y \in \{0,1\}^{\leq n}$, define $p_y$ do be the probability that measuring the first $|y|$ qubits of $\ket{\psi}$ yields the string $y$. For all $1 \leq k \leq n$ define the intermediate states \begin{equation} \label{eq:intermediate-state} \ket{\psi^{(k)}} = \sum_{\mathclap{y \in \{0,1\}^k}} \sqrt{p_y} \,\, \ket{y}~. \end{equation} Note that $\ket{\psi^{(n)}}$ is a ``phase-less'' version of the original state $\ket{\psi}$, in that $\ket{\psi^{(n)}} = \sum_{x \in \{0,1\}^*} |\alpha_x| \, \ket{x}$. We now define the corresponding classical oracle $M$ as follows: for all $x \in \{0,1\}^{\leq n}$, \begin{equation*} M(x) = \begin{cases} p(x0)/p(x) & \text{if } |x|<n, \\ \alpha_x/|\alpha_x| &\text{if } |x|=n~. \end{cases} \end{equation*} (In the definition of $M$ we use the convention that if the denominator $p(x)$ or $|\alpha_x|$ is $0$, then the quotient is defined to be $1$.) In other words, on a prefix $x$ that is less than $n$ bits long, the oracle $M$ outputs the conditional probability that measuring the first $|x|+1$ qubits of $\ket{\psi}$ yields the string $x0$ (i.e.\ $x$ appended with $0$), \emph{conditioned} on the first $|x|$ qubits measuring to $x$. If $x$ is the empty string then $M(x) = p(0)$. When given an $n$-bit string $x$ as input, the oracle $M$ outputs the phase $\alpha_x/|\alpha_x|$ (which is a unit-norm complex number). In \Cref{alg:aaronson} we describe the circuit $C$ that, given oracle access to $M$, synthesizes the state $\ket{\psi}$. In the description, the notation $\mathsf{A}_{[k]}$ denotes the concatenation of registers $\mathsf A_1, \dotsc, \mathsf A_k$. Note that the oracle $M$ is queried \emph{in superposition} in each iteration. \begin{algorithm} \caption{Constructing $\ket{\psi}$ with access to a trusted oracle $M$} \label{alg:aaronson} \begin{algorithmic}[1] \State Initialize one-qubit registers $\mathsf A_1, \dotsc, \mathsf A_n$ each to $\ket0$, and initialize an ancilla register $\mathsf{D}$ to all zeros. \For{$k=0$ to $n$} \Ctrl{the state $\ket x$ of $\mathsf A_{[k]}$ where $x \in \cube k$,} \State Call the oracle $M$ on input $x$, and save the output $M(x)$ in register $\mathsf{D}$. \Ctrl{the state $\ket m$ of $\mathsf D$ where $m \in \cube{\mathrm{poly}(n)}$ encodes a number,} \If{$k < n$} construct $\sqrt{m} \ket 0 + \sqrt{1-m} \ket 1$ in register $\mathsf A_{k+1}$. \ElsIf{$k=n$} apply the phase $m$. \EndIf \EndCtrl \State Call the oracle $M$ to uncompute $M(x)$ in register $\mathsf{D}$. \hlabel{line:au} \EndCtrl \EndFor \State \Return $\mathsf A_{[n]}$. \end{algorithmic} \end{algorithm} For this discussion and for the rest of the overview, we ignore issues of precision for the sake of simplicity. By induction, it is easy to see that the state in $\mathsf A_{[k]}$ at the end of the $k$'th iteration is $\ket{\psi^{(k+1)}}$ if $0 \le k < n$, and $\ket{\psi}$ if $k=n$, which implies \cref{prop:oracle-state-synthesis}. It is important that the oracle output $M(x)$ is uncomputed in \Cref{line:au} because otherwise the register $\mathsf{A}_{[n]}$ (which is supposed to hold the state $\ket{\psi}$ at the end) will be entangled with the ancilla register $\mathsf{D}$. \subsubsection{First attempt at state synthesis with an \emph{untrusted} prover} \label{sec:fassup} \label{sec:flawed} In this section we describe a first attempt at converting \Cref{alg:aaronson} into an interactive protocol for state synthesis, assuming that the state $\ket{\psi}$ is in $\cc{statePSPACE}$. Although this first attempt does not work, its shortcomings will illustrate the challenges that need to be overcome. We first argue that (an approximation of) the function $M$ defined above can be computed via a classical interactive proof. Given an input $x \in \{0,1\}^{\leq n}$, a quantum polynomial-space algorithm can sample a $\mrm{Bernoulli}(p_x)$ random variable by constructing $\ket{\psi}$ (which can be synthesized in polynomial space by assumption), and performing the two-outcome projective measurement $\{\kb x, I - \kb x\}$ on the first $|x|$ qubits. By repeating this procedure exponentially many times and averaging the results, a polynomial-space\footnote{We assume that we are working with \emph{general} quantum circuits, which allow for non-unitary operations such as tracing out registers and initializing new ones; thus the space used to construct and measure $\ket{\psi}$ can be reused.} quantum algorithm can estimate $p_x$ with high accuracy. Using that $\cc{BQPSPACE} = \class{PSPACE}$~\cite{watrous03complexity}, it follows that $p_x$ can also be approximated by a polynomial-space (classical) Turing machine. This immediately implies that $M(x)$ can be approximated in $\class{PSPACE}$ when $|x|<n$, and the case where $|x|=n$ can be handled similarly. Finally, by the function version of the $\class{IP} = \class{PSPACE}$ theorem, it follows that (an approximation of) $M$ is in the function version of $\class{IP}$. By this, we mean that there is an interactive protocol between a verifier (who receives input $x$) and an untrusted prover, where at the end of the interaction the verifier either rejects with high probability, or outputs an approximation of $M(x)$. This suggests the following approach to state synthesis with an untrusted prover: the verifier simulates \cref{alg:aaronson}, but instead of querying $M$, the verifier runs the $\class{IP} = \class{PSPACE}$ protocol \emph{in superposition} to compute the $M(x)$ values. This approach is described in \cref{alg:flawed}. \begin{algorithm} \caption{First attempt at interactive synthesis of $\ket{\psi}$ with an untrusted prover} \label{alg:flawed} \begin{algorithmic}[1] \State Initialize registers $\mathsf A_1, \dotsc, \mathsf A_n$ each to $\ket0$. \For{$k=0$ to $n$} \Ctrl{the state $\ket x$ of $\mathsf A_{[k]}$ where $x \in \cube k$,} \hlabel{line:ff1} \State Run the $\class{IP} = \class{PSPACE}$ protocol to compute $M(x)$, and write the output to a \hlabel{line:ff2} \Statex \hspace{\algorithmicindent} $\ \ \ \, $ fresh register $\mathsf{D}_k$. \EndCtrl \hlabel{line:ff3} \State Perform the two-outcome projective measurement $\{\kb{R}, I - \kb{R}\}$ on $\mathsf D_k$, and \hlabel{line:fm} \Statex \hspace{\algorithmicindent} reject if the outcome ``$R$" occurs. \Ctrl{the state $\ket m$ of $\mathsf D_k$ where $m \in \cube{\mathrm{poly}(n)}$ encodes a number,} \If{$k < n$} construct $\sqrt{m} \ket 0 + \sqrt{1-m} \ket 1$ in $\mathsf A_{k+1}$. \ElsIf{$k=n$} apply the phase $m$. \EndIf \EndCtrl \State Reverse the computations in \cref{line:ff1,line:ff2,line:ff3}. \hlabel{line:fr} \EndFor \State \Return $\mathsf A_{[n]}$. \end{algorithmic} \end{algorithm} We model the verifier in the $\class{IP} = \class{PSPACE}$ protocol for $M$ as a sequence of unitary circuits, and at the end of the interaction it outputs outputs ``R'' (for ``reject'') or a string that is supposed to encode the value $M(x)$ (if the input to the verifier was $x$). In \Cref{line:ff1,line:ff2,line:ff3} the $\class{IP} = \class{PSPACE}$ verifier is executed in superposition over different inputs $x \in \{0,1\}^k$. In \cref{line:fr}, we mean that if in \cref{line:ff1,line:ff2,line:ff3} the verifier applies a sequence of unitaries $U_1,\ldots,U_\ell$, then the reverse sequence $(\adj U_\ell, \dotsc, \adj U_1)$ is applied. It is easy to show that \cref{alg:flawed} satisfies completeness: an honest prover simulates an honest prover for the $\class{IP} = \class{PSPACE}$ protocol in \cref{line:ff1,line:ff2,line:ff3} (i.e.\ ``the forward direction of $\class{IP} = \class{PSPACE}$"), and simulates the ``reverse" of that same honest prover in \cref{line:fr} (``the backward direction of $\class{IP} = \class{PSPACE}$"). Between the forward and backward directions of $\class{IP} = \class{PSPACE}$, controlled on the state $\ket x$ of $\mathsf A_{[k]}$ where $x \in \cube k$, the register $\mathsf D_k$ is in the state $\ket{M(x)}$ (since the prover is honest) and the rest of the argument is similar to that for \cref{alg:aaronson}. However, \cref{alg:flawed} is not sound. Although the measurement in \cref{line:fm} guards against the prover performing \emph{classical} cheating attacks in the forward direction of the $\class{IP} = \class{PSPACE}$ protocol (by which we mean convincing the verifier on input $x$ to accept a value different from $M(x)$), there is nothing preventing the prover from mounting \emph{quantum} attacks on the protocol. More specifically, in what is supposed to be the reverse direction of $\class{IP} = \class{PSPACE}$, the prover need not actually reverse what it did in the forward direction. This allows the prover to entangle itself with the register $\mathsf A_{[n]}$, causing the verifier to output the first $n$ qubits of an entangled state of the form $\sum_{x \in \cube n} \alpha_x \ket{x} \otimes \ket{\phi_x}$ where the $\{ \ket{\phi_x} \}$ states are in the possession of the prover. If the states $\ket{\phi_x}$ are all orthogonal, for example, then the verifier's output is the density matrix $\sum_{x \in \cube n} |\alpha_x|^2 \, \kb{x}$. We call this an \emph{entanglement attack} by the prover. Even if the prover does not keep any qubits at the end of the interaction, the prover can still introduce ``spurious phases'' into the state; for example during the forward direction of $\class{IP} = \class{PSPACE}$ in the final iteration, controlled on the input $x$, the prover can apply a phase $\gamma_x$, and do everything else honestly. The resulting state of the verifier will be $\sum_{x \in \cube n} \gamma_x \, \alpha_x \, \ket{x}$, which could even be orthogonal to $\ket{\psi}$. We call this a \emph{phase attack}. \subsubsection{Defending against quantum attacks} \label{sec:daqa} In order to defend against quantum attacks there needs to be an inherently quantum test. Our next protocol, described in \Cref{alg:good}, augments the protocol of \Cref{alg:flawed} with the simple but powerful \emph{swap test}. The swap test is a quantum algorithm that, given a bipartite state on two registers $\mathsf{A}, \mathsf{B}$ of the same size, performs the two-outcome measurement $\{S,I - S\}$ where $S$ is the projector onto the symmetric subspace of the two registers. To get some intuition for why the swap test is useful, observe that if one of the registers (say $\mathsf{B}$) is in a pure state $\ket{\phi}$, but the other register is in a mixed state $\rho$ (because it may be entangled with an external system), then the swap test will reject with probability $\frac{1}{2} - \frac{1}{2} \bra{\phi} \rho \ket{\phi}$, which is large if $\rho$ is more mixed (i.e.\ more entangled with the external system). The swap test only accepts with high probability if $\rho$ is close to being the pure state $\ket{\phi}$. \Cref{alg:good} is similar to \cref{alg:flawed}, but keeps \emph{two} copies of the state under construction and uses swap tests to guard against the entanglement and phase attacks. There are $3n$ rounds\footnote{The choice of $3$ is arbitrary; the protocol works as long as the number of rounds is $(2 + c)n$ for any constant $c > 0$.} in the protocol, and each round is randomly chosen to be either a ``test'' round or a ``grow'' round. What type the $h$-th round is supposed to be is indicated by the bit $b_h$. The ``grow counter'' $k$ specifies how many qubits have been grown so far by the protocol. The invariant that is (intended to be) maintained is that the registers $\mathsf{A}_{[k]}$ and $\mathsf{B}_{[k]}$ each contain a copy of the intermediate state $\ket{\psi\uppart{k}}$ defined in~\eqref{eq:intermediate-state}. \begin{algorithm}[t] \caption{Interactive synthesis of $\ket{\psi}$ with an untrusted prover (informal)} \label{alg:good} \begin{algorithmic}[1] \State Initialize registers $\mathsf A_1, \dotsc, \mathsf A_n$ and $\mathsf B_1, \dotsc, \mathsf B_n$ each to $\ket0$. \State $k \gets 0$. \For{$h=1$ to $3n$} \IIf{$k = n+1$} go to \Cref{line:g-end}. \EndIIf \Ctrl{the state $\ket x$ of $\mathsf A_{[k]}$ where $x \in \cube k$,} \hlabel{line:gf1} \State Run the $\class{IP} = \class{PSPACE}$ protocol to compute $M(x)$, and write the output to a \hlabel{line:gf2} \Statex \hspace{\algorithmicindent} $\ \ \ \, $ fresh register $\mathsf{D}_h$. \EndCtrl \hlabel{line:gf3} \State Sample a uniformly random $b_h \in \{0,1\}$. \If{$b_h = 1$} \State Perform the two-outcome projective measurement $\{\kb{R}, I - \kb{R}\}$ on $\mathsf D_h$, \Statex \hspace{\algorithmicindent} $\ \ \ \, $ and reject if the outcome ``$R$" occurs. \Ctrl{the state $\ket m$ of $\mathsf D_h$ where $m \in \cube{\mathrm{poly}(n)}$ encodes a number,} \If{$k < n$} construct $\sqrt{m} \ket 0 + \sqrt{1-m} \ket 1$ in $\mathsf A_{k+1}$. \hlabel{line:grow-k-small} \ElsIf{$k=n$} apply the phase $m$. \EndIf \EndCtrl \EndIf \State Reverse the computations in \cref{line:gf1,line:gf2,line:gf3}. Then announce $b_h$ to the prover. \hlabel{line:gr} \State $r \gets \min(k+b_h,n)$. \IIf{$b_h = 1$} send the register $\mathsf B_{[r]}$ to the prover, and receive it back. \EndIIf \hlabel{line:gift} \State Perform the swap test between $\mathsf A_{[r]}$ and $\mathsf B_{[r]}$, and reject if this fails. \hlabel{line:swap-ov} \State $k \gets k + b_h$. \EndFor \State \Return $\mathsf A_{[n]}$. \hlabel{line:g-end} \end{algorithmic} \end{algorithm} This protocol is complete: if the prover is honest, then at the beginning of the $h$'th iteration with $k = b_1 + \dotsb + b_{h-1} \le n$, the registers $\mathsf A_{[k]}$ and $\mathsf B_{[k]}$ each hold copies of the intermediate state $\ket{\psi\uppart{k}}$, and similarly once $k$ reaches $n+1$ the registers $\mathsf A_{[n]}$ and $\mathsf B_{[n]}$ each hold copies of $\ket{\psi}$. The honest prover behaves similarly to the honest prover from \cref{sec:flawed}: if $h$ is a grow round (i.e.\ $b_h=1$) then the verifier grows the state in register $\mathsf{A}_{[k+1]}$ by one qubit to get $\ket{\psi\uppart{k+1}}$ (or if $k=n$, applies the phases to the state in $\mathsf{A}_{[n]}$ to get $\ket{\psi}$). In a grow round, in \cref{line:gift} the prover receives the register $\mathsf{B}_{[k+1]}$, replaces its contents with $\ket{\psi\uppart{k+1}}$, and sends the register back (or if $k=n$, replaces $\mathsf{B}_{[n]}$ with $\ket{\psi}$). Thus both registers $\mathsf{A}_{[r]}$ and $\mathsf{B}_{[r]}$ with $r = \min(k+b_h,n)$ have the same pure state, and thus pass the swap test. On the other hand, if it is a test round (i.e.\ $b_h = 0$), then the $h$'th iteration has no effect -- the honest prover performs the $\class{IP} = \class{PSPACE}$ protocol both forwards and then reverses its actions. The swap test still passes because the registers $\mathsf{A}_{[r]}$ and $\mathsf{B}_{[r]}$ still have the same state. By a Chernoff bound, the counter $k$ reaches $n+1$ after $3n$ rounds with high probability, which establishes completeness. Now we give some intuition for why soundness holds. A malicious prover cannot perform either entanglement or phase attacks in the $\class{IP} = \class{PSPACE}$ protocols without being caught with some probability. This is because the prover does not know whether it is a test or grow round. If it is a test round (which happens with probability $1/2$), then an entanglement (or phase) attack would introduce an asymmetry between registers $\mathsf A_{[k]}$ and $\mathsf B_{[k]}$, which would be exposed by the swap test. Similarly, a malicious prover cannot cheat in the grow round in \Cref{line:gift} either, because if it replaces the register $\mathsf{B}_{[r]}$ with anything other than a copy of the state in $\mathsf{A}_{[r]}$, then it would again be detected by the swap test. We obtain our final $\cc{stateQIP}$ protocol for synthesizing $\ket{\psi}$ by \emph{amplifying} the protocol given in \Cref{alg:good}. In the amplified protocol, polynomially many instances of \Cref{alg:good} are executed, and the verifier accepts only if all instances accept. In that case, the output state of a random instance is returned as output. A simpler candidate approach (that does not work) would be for the prover to send the verifier a register $\mathsf A$ which allegedly holds a copy of $\ket\psi$, and then for the verifier to perform \cref{alg:flawed} with output register $\mathsf B$ and afterwards perform the swap test on registers $\mathsf A$ and $\mathsf B$. This would guard against some entanglement attacks, but would not guard against phase attacks, because the prover could ensure that $\mathsf A$ and $\mathsf B$ both hold copies of the same state $\sum_x \gamma_x \alpha_x \ket x$ for arbitrary phases $(\gamma_x)_x$. \subsection{Unitary synthesis} We now discus the Interactive Unitary Synthesis problem in the special case of unitary families with polynomial action. The proof of \Cref{thm:poly-action-intro} proceeds via reduction to the Interactive State Synthesis problem. We observe that every unitary $U$ that acts nontrivially on a subspace of dimension $d$ can be expressed as the \emph{Hamiltonian evolution} $e^{i \rho t}$ of a mixed state $\rho$ for time $t \le O(d)$. Furthermore, using the Hamiltonian simulation algorithm of Lloyd, Mohseni and Rebentrost~\cite{lloyd2014quantum}, the evolution operator $e^{i \rho t}$ can be efficiently implemented using $\mathrm{poly}(t)$ copies of the state $\rho$. We call the states $\rho$ \emph{program states}, as they represent the ``quantum program'' $U$ in quantum state form. We then show that a family $(C_n)_{n \in \ensuremath{\mathbb{N}}} \in \cc{unitaryPSPACE}\xspace$ of circuits with polynomial action induces a family of states $(\ket{\rho_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, where $\ket{\rho_n}$ has $\mathrm{poly}(n)$ qubits\footnote{This is a slight abuse of notation, since the definition of \cc{statePSPACE}\xspace requires that the $n$'th state in each sequence have exactly $n$ qubits.} and the reduced state on the first $n$ qubits is the program state $\rho_n$ associated with the circuit $C_n$ (i.e.\ $\ket{\rho_n}$ is a \emph{purification} of $\rho_n$). Furthermore, the time $t_n$ associated with $\rho_n$ can be computed in space $\mathrm{poly}(n)$ as well. Thus, to implement the circuit $C_n$ on an input state $\ket{\phi}$, the verifier simply needs to run the state synthesis protocol of \Cref{thm:main-intro} for the state family $(\ket{\rho_n})_n$ to synthesize $\mathrm{poly}(n)$ copies of $\ket{\rho_n}$ and compute $t_n$, and then use the Hamiltonian simulation algorithm of~\cite{lloyd2014quantum} to approximately implement $e^{i \rho_n t_n}$ on $\ket{\phi}$. \subsection{Candidate constant-round protocols for state and unitary synthesis} \label{sec:rrsus} As promised in \cref{sec:opfd}, here we sketch constant-round variants of our state and unitary synthesis protocols, which we conjecture to satisfy completeness and soundness as well. In fact, a constant-round unitary synthesis protocol follows immediately from a constant-round state synthesis protocol, because all interaction between the verifier and prover in our unitary synthesis protocol occurs during the reduction to state synthesis. Thus, all that remains is to sketch a constant-round state synthesis protocol. Recall the intermediate states $\ket{\psi \uppart 1}, \dotsc, \ket{\psi \uppart n}$ defined in \cref{sec:state-synthesis-overview}. First the prover sends registers $\mathsf R_1, \dotsc, \mathsf R_n, \mathsf S_1, \dotsc, \mathsf S_n, \mathsf S_{n+1}$ to the verifier, where each register $\mathsf R_j$ or $\mathsf S_j$ is on $j$ qubits, except for $\mathsf S_{n+1}$ which is on $n$ qubits. If the prover is honest, then each register $\mathsf R_j$ or $\mathsf S_j$ holds a copy of $\ket{\psi \uppart j}$, except for $\mathsf S_{n+1}$ which holds a copy of $\ket\psi$. Then the verifier proceeds as follows: Sample $k \in [n]$ uniformly at random, and perform the swap test on $\mathsf R_k$ and $\mathsf S_k$. If the swap test fails then reject, otherwise perform a single iteration of the for loop from \cref{alg:good} with this parameter $k$, with the following two modifications: First, substitute $\mathsf R_k$ for $\mathsf A_{[k]}$ on \cref{line:gf1}. Second, in place of \cref{line:gift,line:swap-ov}, if this is a ``test round" ($b_h = 0$) then perform the swap test on $\mathsf R_k$ and $\mathsf S_k$, and if this is a ``grow round" ($b_h = 1$) then perform the swap test on $\mathsf R_k \mathsf A_{k+1}$ and $\mathsf S_{k+1}$, where $\mathsf R_k \mathsf A_{k+1}$ denotes the concatenation of registers $\mathsf R_k$ and $\mathsf A_{k+1}$. Again, reject if this swap test fails. If the verifier has not yet rejected, then the verifier accepts and outputs $\mathsf S_{n+1}$. Finally, our soundness amplification procedure can be parallelized in a natural way as well. \section{Preliminaries} \label{sec:prelims} Let $\cube{\le n} = \bigcup_{0 \le k \le n} \cube k$ and $\cube{<n} \bigcup_{0 \le k < n} \cube k$ (where $\cube0$ contains the empty string), and let $\cube* = \cube{<\infty}$. For a string $x = (x_1, \dotsc, x_n) \in \cube n$, let $|x| = n$ denote its length, let $\mrm{hw}(x) = \sum_j x_j$ denote its Hamming weight, let $x_{\le k} = (x_1, \dotsc, x_k)$ (for $0 \le k \le n$), and let $x_{<k} = (x_1, \dotsc, x_{k-1})$ (for $1 \le k \le n+1$). For strings $x,y \in \cube*$ let $xy$ denote their concatenation. For a finite set $S$, we write $x \sim S$ to denote that $x$ is sampled uniformly at random from $S$. When we refer to polynomials, we mean time-constructible functions $p : \ensuremath{\mathbb{N}} \to \ensuremath{\mathbb{N}}$ (with inputs represented in unary) for which there exists a constant $c$ such that for all $n \in \ensuremath{\mathbb{N}}$ it holds that $p(n) \le cn^c$. For polynomials $p,q$ we write $p \leq q$ if $p(n) \leq q(n)$ for all $n \in \ensuremath{\mathbb{N}}$. Throughout this paper, our algorithms represent real numbers using \emph{dyadic rationals}. For $m \in \ensuremath{\mathbb{N}}$ let \begin{equation*} \D{m} = \{k2^{-m} : k \in \ensuremath{\mathbb{N}}, 0 \le k < 2^m\} \subset \ensuremath{\mathbb{Q}} \cap [0,1)~. \end{equation*} A number $k2^{-m} \in \D{m}$ can be encoded as a string in $\cube m$ via the standard binary representation of $k$. We will use the fact that for all $x \in [0,1]$, there exists $r \in \D{m}$ such that $|x - r| \le 2^{-m}$. Also for $m \in \ensuremath{\mathbb{N}}$ let \newcommand*{\U}[1]{\mathbb U_{#1}} \begin{equation*} \U m = \{\exp(2\pi i r) : r \in \D m\}, \end{equation*} i.e.\ $\U m$ is a discretization of the set of complex numbers with magnitude 1. A number $\exp(2\pi i r) \in \U m$ can be encoded as a string in $\cube m$ via the aforementioned encoding of $r$. We use the fact that for $a,b \in \ensuremath{\mathbb{R}}$, \begin{equation} \label{eq:integral} \left| e^{ib} - e^{ia} \right| \le |b-a|, \end{equation} which holds because if $a \le b$ then by the triangle inequality \begin{equation*} \left| e^{ib} - e^{ia} \right| = \left| \int_a^b i e^{ix} dx \right| \le \int_a^b \left| i e^{ix} \right| dx = b-a, \end{equation*} and the case $b \ge a$ is symmetric. We also use the following fact: \begin{lem} \label{lem:4p} If $a,b,c$ are real numbers satisfying \begin{align*} &0 \le a \le 1, &b \ge 0, &&c \ge a-b, \end{align*} then $c^4 \ge a^4 - 4b$. \end{lem} \begin{proof} If $a \ge b$ then \begin{equation*} c^4 \ge (a-b)^4 = a^4 \Paren{1 - \frac{b}{a}}^4 \ge a^4 \Paren{1 - 4\frac{b}{a}} = a^4 - 4ba^3 \ge a^4 - 4b~. \end{equation*} Alternatively, if $a \le b$ then \begin{equation*} c^4 \ge 0 \ge a-b \ge a^4 - 4b~. \end{equation*} Either way the claim holds. \end{proof} \paragraph{Turing Machines} In this paper all Turing machines have an input tape, a work tape, and an output tape, where the output tape head is not allowed to move left. We say that a Turing machine on an input $x$ uses space $s$ if the number of non-blank squares on its work tape at any point in the computation is at most $s$ (the input and output tapes do not count toward its space usage). We say that $M$ is a polynomial-space Turing machine if there exists a polynomial $p$ such that on every input $x \in \cube*$, the machine $M$ uses at most $p(|x|)$ space. \paragraph{Quantum Information Theory} A \emph{register} $\mathsf{R}$ is a named finite-dimensional complex Hilbert space. If $\mathsf{A}, \mathsf{B}, \mathsf{C}$ are registers, for example, then the concatenation $\mathsf{A} \mathsf{B} \mathsf{C}$ denotes the tensor product of the associated Hilbert spaces. For a linear transformation $L$ and register $\mathsf R$, we sometimes write $L_{\mathsf R}$ to indicate that $L$ acts on $\mathsf R$, and similarly we sometimes write $\rho_{\mathsf R}$ to indicate that a state $\rho$ is in the register $\mathsf R$. We write $\mathrm{tr}(\cdot)$ to denote trace, and $\mathrm{tr}_{\mathsf R}(\cdot)$ to denote the partial trace over a register $\mathsf R$. For a pure state $\ket\varphi$, we write $\varphi$ to denote the density matrix $\kb\varphi$. Let $I$ denote the identity transformation, and let $\ket+, \ket-$ denote the Hadamard basis states. Let $\norm\cdot$ denote the vector 2-norm, let $\norm\cdot_1$ denote the vector 1-norm, and let $\norm\cdot_{\mrm{op}}$ denote the operator 2-norm (i.e.\ the maximum singular value of the matrix). Let $\td(\rho,\sigma)$ denote the trace distance between two density matrices $\rho,\sigma$, i.e.\ $\td(\rho, \sigma) = \max_{0 \le P \le I} \mathrm{tr}((\rho - \sigma)P)$. Trace distance is symmetric (i.e., $\td(\rho,\sigma) = \td(\sigma,\rho)$), convex (i.e., $\td(\alpha_1 \rho_1 + \alpha_2 \rho_2, \sigma) \leq \alpha_1 \td(\rho_1, \sigma) + \alpha_2 \td(\rho_2, \sigma)$ where $\alpha_1,\alpha_2$ are probabilities summing to $1$), and satisfies the triangle inequality (i.e., $\td(\rho,\sigma) \leq \td(\rho,\tau) + \td(\tau,\sigma)$). For a pure state $\ket\varphi$ and mixed state $\sigma$, it holds that $\td(\varphi, \sigma) \le \sqrt{1 - \bra\varphi \sigma \ket\varphi}$~\cite[Chapter 9]{nielsen2000quantum}, and therefore \begin{equation} \label{eq:td-fid} \td(\varphi, \sigma) \le \sqrt{2\Paren{1 - \sqrt{\bra\varphi \sigma \ket\varphi}}}~. \end{equation} As a corollary, if $\sigma = \kb{\sigma}$ is a pure state, then \begin{equation} \label{eq:td-fid2} \td(\varphi, \sigma) \leq \norm{\ket{\varphi} - \ket{\sigma}}~. \end{equation} \paragraph{Families of Quantum Circuits and States} For convenience we assume that all quantum circuits use gates from the universal gate set $\{ H, \mathit{CNOT}, T \}$~\cite[Chapter 4]{nielsen2000quantum} (although our results hold for any universal gate set consisting of gates with algebraic entries). A \emph{unitary quantum circuit} is one that consists only of gates from this gate set. A \emph{general quantum circuit} is a quantum circuit that can additionally have non-unitary gates that (a) introduce new qubits initialized in the zero state, (b) trace them out, or (c) measure them in the standard basis. We say that a general quantum circuit uses space $s$ if the total number of qubits involved at any time step of the computation is at most $s$. The description of a general quantum circuit is a sequence of gates (unitary or non-unitary) along with a specification of which qubits they act on. \begin{dfn}[Polynomial size and space circuit families] We say that $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ is a family of \emph{polynomial-size general quantum circuits} if there exists a polynomial $p$ such that $C_n$ has size at most $p(n)$. We say that $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ is a family of \emph{polynomial-space general quantum circuits} if there exists a polynomial $p$ such that $C_n$ uses at most $p(n)$ space. \end{dfn} \begin{dfn}[Uniform circuit families] We say that a family $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ of polynomial-size general quantum circuits is \emph{time-uniform} (or simply \emph{uniform}) if there exists a polynomial-time Turing machine that on input $1^n$ outputs the description of $C_n$. Similarly, we say that a family $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ of polynomial-space general quantum circuits is \emph{space-uniform} if there exists a polynomial-space Turing machine that on input $1^n$ outputs the description of $C_n$. \end{dfn} We define the following ``state complexity class" and ``unitary complexity class": \begin{dfn}[\cc{statePSPACE}\xspace] \cc{statePSPACE}\xspace is the class of all sequences $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ such that each $\ket{\psi_n}$ is a state on $n$ qubits, and for every polynomial $q$ there exists a space-uniform family of general quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ such that for all $n \in \ensuremath{\mathbb{N}}$, the circuit $C_n$ takes no inputs and $C_n$ outputs a density matrix $\rho$ such that $\td(\rho, \psi_n) \leq \exp(-q(n))$. \end{dfn} \begin{dfn}[\cc{unitaryPSPACE}\xspace] \cc{unitaryPSPACE}\xspace is the class of all space-uniform sequences $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ of unitary quantum circuits such that each $U_n$ acts on $n$ qubits. \end{dfn} The error term $\exp(-q(n))$ in the definition of \cc{statePSPACE}\xspace is necessary for our reduction from unitary synthesis to state synthesis. \section{Interactive State Synthesis} \label{sec:synthesis} Let $\Psi = (\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ be a family of quantum states in \cc{statePSPACE}\xspace, and let $q$ be a polynomial. In this section we prove that $\Psi \in \stateQIP{c,s}$ with completeness $c(n) = \exp(-q(n))$ and soundness \[ s(n,\delta) = \exp \Paren{-\frac{ \delta^4 - \exp(-q(n))}{\Delta(n)}} \] for some polynomial $\Delta$. For every fixed $n$, this soundness function is log-concave and nonincreasing as a function of $\delta$. So by \cref{lem:stateQIP-amplification} applied with the polynomial $m(n) = \Delta(n) \cdot q(n)$, it follows that $\Psi \in \stateQIP{c,s'}$ with the same completeness $c$ and with soundness \[ s'(n,\delta) = \exp \Paren{-q(n) \cdot (\delta^4 - \exp(-q(n)))} = \exp \Paren{q(n) e^{-q(n)} - q(n) \cdot \delta^4}~. \] This establishes \Cref{thm:prim-result}, because for every polynomial $p$ there exists a polynomial $q \ge p$ such that $q(n) e^{-q(n)} \le e^{-p(n)}$ for all sufficiently large $n$. \subsection{Description of the protocol} \label{subsec:desc-prot} Before describing the $\cc{stateQIP}$ protocol for the state family $\Psi$, we first describe some of its subroutines: \paragraph{Interactive protocols for quantum state tomography.} For $n \in \ensuremath{\mathbb{N}}, x \in \cube{\le n}$ let \begin{equation*} p_{n}(x) = \norm{(\bra{x} \otimes I) \ket{\psi_n}}^2, \end{equation*} i.e.\ $p_{n}(x)$ is the probability that measuring the first $|x|$ qubits of $\ket{\psi_n}$ yields the string $x$. And for $n \in \ensuremath{\mathbb{N}}, x \in \cube{n}$ let \begin{equation*} \alpha_x = \ip{x}{\psi_n}~. \end{equation*} Let $m$ be a sufficiently large polynomial, to be specified later. By \cref{cor:tomog-relative-weight} there exists a $\class{PSPACE}$-computable function $\mrm{cp}$ and a polynomial $\ell_\mrm{cp}$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{<n}$ it holds that $\mrm{cp}(1^n,x) \in \D{\ell_\mrm{cp}(n)}$ and \begin{equation} \label{eq:cp1} \left|p_n(x) \cdot \mrm{cp}(1^n,x) - p_n(x0) \right| \le 2^{-m(n)}, \end{equation} or equivalently \begin{equation} \label{eq:cp2} \left|p_n(x) \cdot (1-\mrm{cp}(1^n,x)) - p_n(x1) \right| \le 2^{-m(n)}~. \end{equation} Similarly, by \cref{cor:tomog-phase} there exists a polynomial $\ell_\mrm{ph}$, a sequence of unit-magnitude complex numbers $(\gamma_n)_{n \in \ensuremath{\mathbb{N}}}$, and a $\class{PSPACE}$-computable function $\mrm{ph}$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube n$ it holds that $\mrm{ph}(x) \in \U{\ell_\mrm{ph} (n)}$ and \begin{equation} \label{eq:ph} \left| \mrm{ph}(x) \cdot \gamma_n \cdot \sqrt{p_n(x)} - \alpha_x \right| \le 2^{-m(n)} \end{equation} where we used that $\sqrt{p_n(x)} = |\alpha_x|$. Assume without loss of generality that $\ell_\mrm{ph} = \ell_\mrm{cp} = \ell$ for some polynomial $\ell$. Define languages \begin{align*} &L_\mrm{cp} = \{(1^n, x, \mrm{cp}(1^n, x)) : n \in \ensuremath{\mathbb{N}}, x \in \cube{<n}\}, &L_\mrm{ph} = \{(x,\mrm{ph}(x)) : x \in \cube*\}~. \end{align*} Since the functions $\mrm{cp}$ and $\mrm{ph}$ are computable in $\class{PSPACE}$, the languages $L_\mrm{cp}$ and $L_\mrm{ph}$ are in $\class{PSPACE}$, so by \cref{thm:qip=pspace} there exist $\class{QIP}[1/2]$ verifiers $V_\mrm{cp}$ and $V_\mrm{ph}$ for $L_\mrm{cp}$ and $L_\mrm{ph}$ respectively. Without loss of generality, these verifiers may be assumed to be unitary except for the measurement of the accept/reject qubit at the end. \paragraph{The swap test.} The \emph{swap test}~\cite{buhrman2001quantum} is a procedure that takes in as input two registers $\mathsf{A}$ and $\mathsf{B}$ that have the same number of qubits, and performs the two-outcome projective measurement $\{ S_{\mathsf{AB}}, A_{\mathsf{AB}} \}$ where $S_{\mathsf{AB}}$ is the projector onto the \emph{symmetric subspace} and $A_{\mathsf{AB}} = I - S_{\mathsf{AB}}$ is the projector onto the \emph{antisymmetric subspace} of registers $\mathsf{A}, \mathsf{B}$. The projectors $S_{\mathsf{AB}}, A_{\mathsf{AB}}$ can alternatively be expressed as \begin{align*} &S_{\mathsf{AB}} = \frac{I + \mai{Swap}_{\mathsf{AB}}}2, &A_{\mathsf{AB}} = \frac{I - \mai{Swap}_{\mathsf{AB}}}2, \end{align*} where $\mai{Swap}_{\mathsf{AB}}$ is the Hermitian unitary that swaps the contents of registers $\mathsf{A}$ and $\mathsf{B}$. \begin{clm} \label{clm:swap-test} There is a uniform family of polynomial-size general quantum circuits, where the $n$'th circuit takes $2n$ input qubits partitioned into $n$-qubit registers $\mathsf A$ and $\mathsf B$, and performs the two-outcome projective measurement $\{ S_{\mathsf{AB}}, A_{\mathsf{AB}} \}$ on the input. \end{clm} \begin{proof} The circuit first applies a controlled-$\mai{Swap}_{\mathsf{AB}}$ gate, where the control qubit is an ancilla initialized in the $\ket+$ state. (This can be done by a circuit of linear size, because $\mai{Swap}_{\mathsf{AB}}$ is the tensor product of $n$ two-qubit swap transformations.) On input $\ket{\phi}_{\mathsf{AB}}$, the resulting state is \begin{equation*} \frac1{\sqrt2} \ket0 \otimes \ket{\phi} + \frac1{\sqrt2} \ket1 \otimes \mai{Swap} \ket{\phi} = \ket+ \otimes S\ket{\phi} + \ket- \otimes A\ket{\phi}, \end{equation*} so it suffices to measure the ancilla qubit in the Hadamard basis. \end{proof} If $\mathsf A$ and $\mathsf B$ are zero-qubit registers, then $\mai{Swap}_{\mathsf{AB}} = I_{\mathsf{AB}}$ and $S_{\mathsf{AB}} = I_{\mathsf{AB}}, A_{\mathsf{AB}} = 0_{\mathsf{AB}}$, so in this case the measurement from \cref{clm:swap-test} vacuously outputs ``$S$" with probability 1. \paragraph{The verifier.} Let $t$ be a sufficiently large polynomial, to be specified later. In the rest of \cref{sec:synthesis} we fix $n$ and write $\ket\psi = \ket{\psi_n}$. \cref{alg:main} describes a $\cc{stateQIP}$ verifier for synthesizing $\ket\psi$. The verifier's workspace includes the following disjoint registers, which are initialized to the all-zeros state: \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item registers $\mathsf A_1, \dotsc, \mathsf A_n$ each consisting of a single qubit; \item registers $\mathsf B_1, \dotsc, \mathsf B_n$ each consisting of a single qubit; \item registers $\mathsf D_1, \dotsc, \mathsf D_{t(n)}$ each consisting of $\ell(n)$ qubits; \item registers $\mathsf W_1, \dotsc, \mathsf W_{t(n)}$ each consisting of $\mathrm{poly}(n)$ qubits. \end{itemize} For $0 \le k \le n$ we write $\mathsf A_{[k]}$ to denote the concatenated register $\mathsf A_1 \mathsf A_2 \dotsb \mathsf A_k$, and similarly for $\mathsf B_{[k]}$. For future convenience we also define zero-qubit registers $\mathsf A_{n+1}$ and $\mathsf B_{n+1}$, and write $\mathsf A_{[n+1]} = \mathsf A_{[n]}$ and $\mathsf B_{[n+1]} = \mathsf B_{[n]}$. \begin{algorithm}[th!] \caption{Interactive synthesis of $\ket{\psi}$ with an untrusted prover.} \label{alg:main} \begin{algorithmic}[1] \State Set $k=0$, and sample $b = \Paren{b_1, \dotsc, b_{t(n)}} \sim \cube{t(n)}$. \For{$h = 1$ to $t(n)$} \IIf{$k = n + 1$} go to \Cref{line:m-end}. \EndIIf \Ctrl{the state $\ket x$ of $\mathsf A_{[k]}$ where $x \in \cube k$,} \hlabel{line:m1a} \Comment{\emph{start of ``forward-QIP"}} \State Send a copy of $x$ to the prover, and then let the prover act on $\mathsf D_h$. \hlabel{line:msendx-sec6} \Ctrl{the state $\ket\eta$ of $\mathsf D_h$ where $\eta \in \cube{\ell(n)}$,} \State Copy $(x,\eta)$ into a sub-register of $\mathsf W_h$, and then perform the following in $\mathsf W_h$:\hlabel{line:mcopyx-sec6} \If{$k<n$} unitarily simulate the verifier $V_\mrm{cp}$ on input $(1^n, x, \eta)$, \hlabel{line:mqip1} \ElsIf{$k=n$} unitarily simulate the verifier $V_\mrm{ph}$ on input $(x, \eta)$, \hlabel{line:mqip2} \EndIf \EndCtrl \EndCtrl \hlabel{line:m1b} \Comment{\emph{end of ``forward-QIP"}} \If{$b_h = 1$} \hlabel{line:m2a} \Comment{\emph{start of ``A-grow"}} \State Measure the flag qubit in $\mathsf W_h$ in the standard basis. Reject if the outcome is $0$. \hlabel{line:mmeas} \Ctrl{the state $\ket\eta$ of $\mathsf D_h$ where $\eta \in \cube{\ell(n)}$,} \If{$k < n$} interpreting $\eta$ as an element of $\D{\ell(n)}$, construct the state \Statex \hspace{\algorithmicindent} \qquad \qquad $\sqrt\eta \ket0 + \sqrt{1-\eta} \ket1$ in $\mathsf A_{k+1}$. \ElsIf{$k=n$} interpreting $\eta$ as an element of $\U{\ell(n)}$, apply the phase $\eta$. \EndIf \EndCtrl \EndIf \hlabel{line:m2b} \Comment{\emph{end of ``A-grow"}} \State Run the forward-QIP step ``in reverse". \hlabel{line:m3} \Comment{\emph{``backward-QIP"}} \State Send the value of $b_h$ to the prover. \IIf{$b_h = 1$} let the prover act on $\mathsf B_{[k + b_h]}$. \EndIIf \hlabel{line:m4} \Comment{\emph{``B-grow"}} \State Perform the swap test on registers $\mathsf{A}_{[k+b_h]} \mathsf{B}_{k+b_h}$, and reject if the outcome is the \Statex \hspace{\algorithmicindent} \qquad antisymmetric subspace. \State $k \gets k + b_h$. \EndFor \State \Return $\mathsf A_{[n]}$. \hlabel{line:m-end} \end{algorithmic} \end{algorithm} We define the following groups of lines in \cref{alg:main} for future convenience: the ``forward-QIP step" refers to lines~\ref{line:m1a} to \ref{line:m1b}, the ``A-grow step" refers to lines~\ref{line:m2a} to \ref{line:m2b}, the ``backward-QIP step" refers to line~\ref{line:m3}, and the ``B-grow step" refers to line~\ref{line:m4}. Rather than referring to an explicit message register, we model the interaction between the verifier and prover as follows: If the verifier owns a $\kappa$-qubit register $\mathsf R$, then we write ``the verifier lets the prover act on $\mathsf R$" to denote that first the verifier swaps $\mathsf R$ with the first $\kappa$ qubits of the message register, then the prover acts on the message register, and finally the verifier swaps the first $\kappa$ qubits of the message register with $\mathsf R$. Finally, we clarify the following lines of \cref{alg:main}: \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item In \cref{line:msendx-sec6} ``send a copy of $x$ to the prover" means the following: Write a copy of $x$ (encoded in some reasonable way as a string of length depending only on $n$) to a sub-register of $\mathsf W_h$ that will not be used for anything else, and then let the prover act on this sub-register. \item In \cref{line:mqip1,line:mqip2} ``unitarily simulate" means to simulate using only unitary transformations, and in particular to not measure the flag (accept/reject) qubit at the end. \item In \cref{line:mmeas} the ``flag qubit in $\mathsf W_h$" refers to the flag qubit from the simulation of a $\class{QIP}[1/2]$ verifier in \cref{line:mqip1,line:mqip2}. \item In the backward-QIP step we mean the following: If the precise specification of the forward-QIP step is to successively apply unitaries $V_1, V_2, \dotsc, V_\kappa$ interspersed with actions by the prover, then now apply $\adj V_\kappa, \adj V_{\kappa-1}, \dotsc, \adj V_1$ interspersed with actions by the prover. \end{itemize} \subsection{Proof of completeness} \label{subsec:proof-comp} For $x \in \cube{<n}$ define approximate conditional probabilities \begin{align*} &\wt g_{x0} = \mrm{cp}(1^n, x), &\wt g_{x1} = 1-\mrm{cp}(1^n,x), \end{align*} and for $x \in \cube{\le n}$ define the approximate marginal probability \begin{equation*} \wt{p}(x) = \prod_{j=1}^{|x|} \wt g_{x_{\leq j}} \end{equation*} (recall that $x_{\leq j}$ denotes the first $j$ bits of $x$). For $0 \le k \le n$ define the approximate intermediate state \begin{equation*} \ket{\wt{\psi}\uppart{k}} = \sum_{\mathclap{x \in \cube k}} \sqrt{\wt{p}(x)} \, \ket{x}, \end{equation*} and define the approximate target state \begin{equation*} \ket{\wt{\psi}} = \ket{\wt{\psi}\uppart{n+1}} = \sum_{\mathclap{x \in \cube{n}}} \mrm{ph}(x) \sqrt{\wt{p}(x)} \, \ket{x}~. \end{equation*} (The amplitudes of $\wt{\psi}$ are exponentially close to those of the ideal target state $\psi$, because of the exponentially small error induced by the $\class{PSPACE}$ algorithms for tomography.) The following honest prover helps the verifier synthesize $\ket{\wt{\psi}}$ exactly: \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item In the forward-QIP step of iteration $h$, controlled on receiving $x$ from the verifier, \begin{itemize} \item[*] If $|x|<n$, then write $\mrm{cp}(1^n,x)$ to $\mathsf D_h$, and then simulate an honest prover corresponding to $V_\mrm{cp}$ on input $(1^n, x, \mrm{cp}(1^n, x))$. \item[*] If $|x|=n$, then write $\mrm{ph}(x)$ to $\mathsf D_h$, and then simulate an honest prover corresponding to $V_\mrm{ph}$ on input $(x, \mrm{ph}(x))$. \end{itemize} \item In the backward-QIP step of iteration $h$, run the above bullet point ``in reverse", i.e.\ if the precise specification of the above bullet point is to successively apply unitaries $P_1, P_2, \dotsc, P_\kappa$ interspersed with actions by the verifier, then now apply $\adj P_\kappa, \adj P_{\kappa-1}, \dotsc, \adj P_1$ interspersed with actions by the verifier. \item In the B-grow step of iteration $h$ when $b_h = 1$, swap a copy of $\ket{\wt\psi \uppart{k+1}}$ into $\mathsf B_{[k+1]}$, where $k = \mrm{hw}(b_{<h})$ (recall that $\mrm{hw}(\cdot)$ denotes Hamming weight). \end{itemize} With this prover, it is easy to see by induction on $h$ that conditioned on the random string $b \in \cube{t(n)}$, for all $h \in [t(n)]$ with $k = \mrm{hw}(b_{<h}) \le n$, the state of the register $\mathsf A_{[k+b_h]} \mathsf B_{[k+b_h]}$ at the end of iteration $h$ is $\ket{\wt\psi \uppart{k+b_h}}^{\otimes 2}$. Furthermore, the verifier never rejects.\footnote{If the verifier uses the Solovay-Kitaev theorem~\cite{dawson2006solovay} to implement the unitary from the A-grow step \emph{approximately} over a finite gate set rather than exactly, then at the B-grow step when $b_h = 1$, the honest prover should provide in $\mathsf B_{[k+b_h]}$ a copy of the \emph{actual} state in $\mathsf A_{[k+b_h]}$ rather than $\ket{\wt\psi \uppart{k+b_h}}$. Then the verifier still accepts with probability exactly 1.} Thus, averaging over the random string $b \in \cube{t(n)}$, the output state $\rho$ of the verifier after $t(n)$ rounds is \begin{equation*} \rho = \PR{\mrm{hw}(b) \le n} \cdot \sigma + \PR{\mrm{hw}(b) \ge n+1} \cdot \wt\psi \end{equation*} for some mixed state $\sigma$. By the convexity of trace distance, it follows that \begin{align*} \td(\rho, \psi) &\le \PR{\mrm{hw}(b) \le n} \cdot \td(\sigma, \psi) + \PR{\mrm{hw}(b) \ge n+1} \cdot \td\Paren{\wt\psi, \psi} \\ &\le \PR{\mrm{hw}(b) \le n} + \td\Paren{\wt\psi, \psi}~. \end{align*} Along with \cref{lem:term-whp,lem:psi-approx} (stated below), this implies that $\td(\rho, \psi) \le \exp(-q(n))$ as desired, where we take $t(n) = 18q(n) + 3n + 54$ and $m(n) = 4q(n) + 12n$: \begin{lem} \label{lem:term-whp} $\PR{\mrm{hw}(b) \le n} \le \frac1{12} \cdot \exp(-q(n))$. \end{lem} \begin{proof} By a Chernoff bound, \begin{align*} \PR{\mrm{hw}(b) \le n} &= \PR{\mrm{Binomial}(t(n), 1/2) \le n} \le \exp\Paren{-2 \cdot t(n) \cdot \Paren{\frac12 - \frac{n}{t(n)}}^2} \\ &\le \exp\Paren{-2 \cdot (18q(n) + 54) \cdot \Paren{\frac12 - \frac{n}{3n}}^2} = \exp(-q(n) - 3) \\ &< \frac{1}{12} \cdot \exp(-q(n))~. \qedhere \end{align*} \end{proof} \begin{lem} \label{lem:psi-approx} $\td\Paren{\wt\psi, \psi} \le \frac1{12} \cdot \exp(-q(n))$. \end{lem} \begin{proof} Recall the definitions of $\alpha_x, p_n(x), \gamma_n$ from \cref{subsec:desc-prot}, and write $p(\cdot) = p_n(\cdot)$ and $\gamma = \gamma_n$. Since $\gamma \wt\psi \gamma^* = \wt\psi$ (because $\gamma$ has unit magnitude) and then using \eqref{eq:td-fid2}, we have \begin{equation*} \td\Paren{\wt\psi, \psi} = \td\Paren{\gamma \wt\psi \gamma^*, \psi} \leq \Norm{\gamma \ket{\wt\psi} - \ket\psi} \le \Norm{\gamma \ket{\wt\psi} - \ket\psi}_1 = \sum_{\mathclap{x \in \cube n}} \left|\gamma \cdot \mrm{ph}(x) \cdot \sqrt{\wt{p}(x)}- \alpha_x\right|~. \end{equation*} Fix $x \in \cube n$. By the triangle inequality and \eqref{eq:ph}, we have \begin{align*} \left|\gamma\cdot \mrm{ph}(x) \cdot \sqrt{\wt{p}(x)} - \alpha_x\right| &= \left|\gamma \cdot \mrm{ph}(x)\cdot \Paren{\sqrt{\wt{p}(x)} - \sqrt{p(x)}} + \Paren{\gamma \cdot \mrm{ph}(x) \cdot \sqrt{p(x)} - \alpha_x} \right| \\ &\le \left|\sqrt{\wt{p}(x)} - \sqrt{p(x)} \right| + 2^{-m(n)}~. \end{align*} Furthermore, \begin{align*} \left|\sqrt{p(x)} - \sqrt{\wt{p}(x)}\right| &= \left| \sqrt{p(x)} - \prod_{j=1}^n \sqrt{\wt{g}_{x_{\leq j}}} \right| \\ &= \left| \sum_{j = 1}^n \Paren{\sqrt{p(x_{\le j})} - \sqrt{p(x_{\le j - 1}) \cdot \wt{g}_{x_{\leq j}}}} \cdot \prod_{i=j+1}^n \sqrt{\wt{g}_{x_{\leq i}}} \right| \\ &\le \sum_{j = 1}^n \left| \sqrt{p(x_{\le j})} - \sqrt{p(x_{\le j - 1}) \cdot \wt{g}_{x_{\leq j}} } \right| \\ &\le \sum_{j=1}^n \sqrt{\left| p(x_{\le j}) - p(x_{\le j - 1}) \cdot \wt{g}_{x_{\leq j}} \right|} \\ &\le n 2^{-m(n)/2}, \end{align*} where the first line is by the definition of $\wt{p}(x)$, the second line is by a telescoping sum, the third line is by the triangle inequality and fact that $\wt g_y \le 1$ for all $y$, the fourth line is by the fact that $|a - b|^2 \leq |a^2 - b^2|$ for nonnegative $a,b$, and the last line is by \eqref{eq:cp1} and \eqref{eq:cp2}. Therefore \begin{equation*} \td\Paren{\wt\psi, \psi} \le 2^n (n+1) 2^{-m(n)/2}, \end{equation*} from which the result follows by the definition of $m$. \end{proof} \subsection{Proof of soundness} \label{subsec:proof-sound} Throughout this subsection we fix an arbitrary prover, and let $b = \Paren{b_1, \dotsc, b_{t(n)}} \sim \cube{t(n)}$ denote the random string used by the verifier as described in \cref{subsec:desc-prot}. Let $\rho$ denote the output state conditioned on accepting, and for $d \in \cube{t(n)}$ let $\rho_d$ denote the output state conditioned on $b=d$ and on accepting. For $h \in [t(n)], a \in \cube{h}$ define \begin{equation*} r_a = \PR{\text{verifier rejects in iteration $h$} \mid b_{\leq h} = a}~. \end{equation*} The crux of the proof of soundness is the following lemma, which given a fixed string $d \in \cube{t(n)}$ of random choices of the verifier, relates the distance between the output state at the end of the protocol (conditioned on accepting) and the ideal state to the rejection probabilities at each iteration of the protocol. Recall the definition of $\ket{\wt\psi}$, which is the state synthesized by the verifier and the honest prover from \cref{subsec:proof-comp}. \begin{lem} \label{lem:main-sound} Let $d \in \cube{t(n)}$ be a string such that $\mrm{hw}(d) \ge n+1$. Then \begin{equation*} \td\Paren{\rho_d, \wt\psi} \le 4 \cdot \left( t(n) \cdot \sum_{h=1}^{t(n)} \left(r_{d_{< h} 0} + r_{d_{< h} 1} \right) \right)^{1/4}~. \end{equation*} \end{lem} \noindent We defer the proof of \cref{lem:main-sound} to \cref{sssec:narrow}, and we first prove the soundness of the protocol assuming it. Recall that our goal is to prove that \begin{equation} \label{eq:sound-remind} \pr{\text{verifier accepts}} \le \exp\Paren{- \frac{\td(\rho, \psi)^4 - \exp(-q(n))} {\mathrm{poly}(n)}}~. \end{equation} \begin{proof}[Proof of soundness assuming \cref{lem:main-sound}] We proceed by upper-bounding $\td(\rho, \psi)$. By the triangle inequality and \cref{lem:psi-approx}, \begin{equation*} \td\Paren{\rho, \psi} \le \td\Paren{\rho, \wt\psi} + \td\Paren{\wt\psi, \psi} \le \td\Paren{\rho, \wt\psi} + \frac{1}{12} \cdot \exp(-q(n))~. \end{equation*} For $d \in \cube{t(n)}$ let \begin{equation*} \mu(d) = \pr{b=d \mid \text{verifier accepts}}~. \end{equation*} By the convexity of trace distance, \begin{equation*} \td\Paren{\rho, \wt\psi} = \td\Paren{\sum_d \mu(d) \rho_d, \, \wt\psi} \le \sum_d \mu(d) \td\Paren{\rho_d, \wt\psi}, \end{equation*} so \begin{equation*} \td\Paren{\rho, \psi} \le \sum_d \mu(d) \td\Paren{\rho_d, \wt\psi} + \frac{1}{12} \cdot \exp(-q(n))~. \end{equation*} We now establish a similar statement for $d$ over the \emph{uniform} distribution rather than $\mu$, under the assumption that the verifier accepts with probability at least $1/2$. (If this assumption is not satisfied, then for all sufficiently large $n$ we have that \begin{equation*} \pr{\text{verifier accepts}} \le 1/2 \le \exp\Paren{- \frac{1 - \exp(-q(n))} {\mathrm{poly}(n)}} \le \exp\Paren{- \frac{\td(\rho, \psi)^4 - \exp(-q(n))} {\mathrm{poly}(n)}} \end{equation*} and thus \eqref{eq:sound-remind} holds vacuously.) By Bayes' rule, for $d \in \cube{t(n)}$ it holds that \begin{equation*} \mu(d) = \frac{\pr{\text{verifier accepts} \mid b=d} \cdot \pr{b=d}} {\pr{\text{verifier accepts}}} \le 2 \, \pr{b=d}, \end{equation*} and therefore \begin{equation*} \td\Paren{\rho, \psi} \le 2 \, \mathbb{E} \td\Paren{\rho_b, \wt\psi} + \frac{1}{12} \cdot \exp(-q(n)) \end{equation*} (where $b \sim \cube{t(n)}$ is uniform random). By \cref{lem:main-sound,lem:term-whp} and Jensen's inequality, \begin{align*} \mathbb{E} \td\Paren{\rho_b, \wt\psi} &= \mathbb{E} \left[ \td\Paren{\rho_b, \wt\psi} \Ind{\mrm{hw}(b) \le n} \right] + \mathbb{E} \left[ \td\Paren{\rho_b, \wt\psi} \Ind{\mrm{hw}(b) > n} \right] \\ &\le \PR{\mrm{hw}(b) \le n} + \mathbb{E} \left[4 \cdot \left( t(n) \cdot \sum_{h=1}^{t(n)} \left(r_{b_{< h} 0} + r_{b_{< h} 1} \right) \right)^{1/4} \right] \\ &\le \frac1{12} \exp(-q(n)) + 4 \cdot t(n)^{1/4} \cdot \mathbb{E} \left[\sum_{h=1}^{t(n)} \left(r_{b_{< h} 0} + r_{b_{< h} 1} \right) \right]^{1/4}~. \end{align*} Furthermore, recalling that $b$ is uniform random, we have that \begin{align*} \mathbb{E} \sum_{h=1}^{t(n)} \left(r_{b_{< h} 0} + r_{b_{< h} 1} \right) &= 2 \sum_{h=1}^{t(n)} \mathbb{E} \left[ r_{b_{\le h}} \right] = 2 \sum_{h=1}^{t(n)} \pr{\text{verifier rejects in iteration $h$}} \\ &= 2 \, \pr{\text{verifier rejects}} \end{align*} where the first equality holds by linearity of expectation, the second equality holds by the definition of $r_{b_{\le h}}$, and the last equality holds because the verifier can reject in at most one iteration in any execution of the protocol. Recalling that $t$ is a polynomial, it follows that \begin{equation*} \td\Paren{\rho, \psi} \le \frac14 \cdot \exp(-q(n)) + \mathrm{poly}(n) \cdot \pr{\text{verifier rejects}}^{1/4}~. \end{equation*} Rearranging yields \begin{equation*} \pr{\text{verifier rejects}}^{1/4} \geq \frac{\td\Paren{\rho, \psi} - \frac14 \cdot \exp(-q(n))} {\mathrm{poly}(n)}, \end{equation*} and by \cref{lem:4p} it follows that \begin{equation*} \pr{\text{verifier rejects}} \geq \frac{\td\Paren{\rho, \psi}^4 - \exp(-q(n))} {\mathrm{poly}(n)}~. \end{equation*} Finally, \eqref{eq:sound-remind} follows because \begin{align*} \pr{\text{verifier accepts}} &= 1 - \pr{\text{verifier rejects}} \le \exp(-\pr{\text{verifier rejects}}) \\ &\le \exp\Paren{-\frac{\td\Paren{\rho, \psi}^4 - \exp(-q(n))} {\mathrm{poly}(n)}}~. \qedhere \end{align*} \end{proof} \subsubsection{Proof of \texorpdfstring{\cref{lem:main-sound}} {Lemma 6.4}} \label{sssec:narrow} Fix a string $d \in \cube{t(n)}$ with $\mrm{hw}(d) \ge n+1$, and for $a \in \cube{< t(n)}$ let \begin{equation*} u_a = r_{a0} + r_{a1}~. \end{equation*} Recall that our goal is to prove that \begin{equation*} \td\Paren{\rho_d, \wt\psi} \le 4 \cdot \left( t(n) \cdot \sum_{h=1}^{t(n)} u_{d_{< h}} \right)^{1/4}~. \end{equation*} Below we prove that \begin{equation} \label{eq:soundness-ip} 1 - \sqrt{\bra{\wt\psi} \rho_d \ket{\wt\psi}} \le 6 \sum_{h=1}^{t(n)} \sqrt{u_{d_{< h}}}, \end{equation} from which \Cref{lem:main-sound} follows because by \eqref{eq:td-fid} and Cauchy-Schwarz, \begin{equation*} \td\Paren{\rho_d, \wt\psi} \le \sqrt{2 \Paren{1 - \sqrt{\bra{\wt\psi} \rho_d \ket{\wt\psi}}}} \le \sqrt{12 \sum_{h=1}^{t(n)} \sqrt{u_{d_{< h}}}} \le 4 \cdot \Paren{t(n) \cdot \sum_{h=1}^{t(n)} u_{d_{<h}}}^{1/4}~. \end{equation*} Observe that the (pure) state of the entire system (i.e.\ both the verifier's and prover's registers) at any point in the protocol depends only on $b$ and on the verifier's measurement outcomes, since the prover is unitary. For $h \in [t(n)]$ and $a = (a_1, \dotsc, a_h) \in \cube{h}$, let \begin{equation*} \pi(a) = \PR{\text{verifier has not rejected by the end of iteration $h$} \mid b_{\le h} = a}, \end{equation*} and let $\ket{\varphi_a}/\sqrt{\pi(a)}$ denote the state of the system at the end of iteration $h$, conditioned on $b_{\leq h} = a$ and the verifier not having rejected yet. Note that $\ket{\varphi_a}$ may be \emph{subnormalized}, or in other words $\norm{\ket{\varphi_a}} = \sqrt{\pi(a)}$ may be less than 1. Clearly \begin{equation*} \sqrt{\bra{\wt\psi} \rho_d \ket{\wt\psi}} = \frac{1}{\sqrt{\pi(d)}} \Norm{\bra{\wt\psi}_{\mathsf A_{[n]}} \ket{\varphi_d}} \geq \Norm{\bra{\wt\psi}_{\mathsf A_{[n]}} \ket{\varphi_d}}~. \end{equation*} (To clarify the notation, if we group together all registers except for $\mathsf A_{[n]}$ into a register $\mathsf{R}$, then the notation $\bra{\wt\psi}_{\mathsf A_{[n]}} \ket{\varphi_d}$ indicates a (subnormalized) state vector in $\mathsf{R}$, because $\ket{\varphi_d}$ is a state in ${\mathsf A_{[n]}} \mathsf{R}$ and the bra operator $\bra{\wt\psi}_{\mathsf A_{[n]}}$ implicitly acts as the identity on $\mathsf{R}$.) Thus to establish \eqref{eq:soundness-ip} it suffices to prove that \begin{equation}\label{eq:soundness-goal-1} 1 - \Norm{\bra{\wt\psi}_{\mathsf A_{[n]}} \ket{\varphi_d}} \le 6 \sum_{h=1}^{t(n)} \sqrt{u_{d_{<h}}}~. \end{equation} Recall the definitions of states $\ket{\wt \psi\uppart k}$ for $0 \le k \le n+1$ from \cref{subsec:proof-comp}, and in particular that $\ket{\wt \psi \uppart{0}}$ is a phase of 1 and $\ket{\wt \psi\uppart{n+1}} = \ket{\wt\psi}$. Also let $\ket{\varphi_\emptyset}$ denote the initial state of the entire system (i.e.\ $\emptyset$ denotes the empty string here). Recalling that $\mrm{hw}(d) \ge n+1$, let $\tau$ be the least number $h \in [t(n)]$ such that $\mrm{hw} \Paren{d_{\le h}} = n+1$. Then, since the verifier does nothing after iteration $\tau$, by a telescoping sum we have that \begin{align*} 1 - &\Norm{\bra{\wt\psi}_{\mathsf A_{[n]}} \ket{\varphi_d}} \\ &= \Norm{\bra{\wt\psi \uppart{0}}_{\mathsf A_{[0]}} \ket{\varphi_\emptyset}} - \Norm{\bra{\wt\psi \uppart{n+1}}_{\mathsf A_{[n+1]}} \ket{\varphi_{d_{\le \tau}}}} \\ &= \sum_{h=1}^\tau \Paren{ \Norm{\bra{\wt\psi \uppart{\mrm{hw} \Paren{d_{< h}}}}_{\mathsf A_{\left[\mrm{hw} \Paren{d_{< h}}\right]}} \ket{\varphi_{d_{< h}}}} - \Norm{\bra{\wt\psi \uppart{\mrm{hw} \Paren{d_{\leq h}}}}_{\mathsf A_{\left[ \mrm{hw} \Paren{d_{\leq h}} \right]}} \ket{\varphi_{d_{\leq h}}}}}~. \end{align*} Thus to establish~\eqref{eq:soundness-goal-1} it suffices to prove the following claim: \begin{clm} \label{clm:sound-progress} For all $a \in \cube{<\tau}$ and $c \in \{0,1\}$, \begin{equation*} \Norm{\bra{\wt\psi \uppart{\mrm{hw}(a)}}_{\mathsf A_{[\mrm{hw}(a)]}} \ket{\varphi_{a}}} - \Norm{\bra{\wt\psi \uppart{\mrm{hw}(ac)}}_{\mathsf A_{[\mrm{hw}(ac)]}} \ket{\varphi_{ac}}} \le 6\sqrt{u_a}~. \end{equation*} \end{clm} Intuitively, this claim states that if $a$ denotes the random choices of the verifier up to some iteration $h < \tau$ and the state in $\mathsf{A}_{[\mrm{hw}(a)]}$ is close to $\ket{\wt \psi \uppart{\mrm{hw}(a)}}$ (which is the state that should have been synthesized up to that point), then after the next iteration (where the next random choice is the bit $c$), the state in $\mathsf{A}_{[\mrm{hw}(ac)]}$ should still be close to $\ket{\wt \psi \uppart{\mrm{hw}(ac)}}$, and the degradation in closeness is a polynomial function of the rejection probability in iteration $h$ (conditioned on the random choices $a$ up to that point). Fix a prefix $a \in \cube{<\tau}$, and let $h = |a|+1$. After introducing the necessary notation, we prove the $c=0$ and $c=1$ cases of \cref{clm:sound-progress} for this value of $a$. Specifically, we define the following states, registers, unitary transformations, and orthogonal projections: \paragraph{States.} Abbreviate $\ket{\theta_0} = \ket{\wt\psi \uppart{\mrm{hw}(a)}}$ and $\ket{\theta_1} = \ket{\wt\psi \uppart{\mrm{hw}(a)+1}}$. \paragraph{Registers.} Recalling the definitions of registers from \cref{subsec:desc-prot}, let $\mathsf A = \mathsf A_{[\mrm{hw}(a)]} = \mathsf A_{[\mrm{hw}(a0)]}$ and $\mathsf{A^+} = \mathsf A_{[\mrm{hw}(a1)]}$, and similarly let $\mathsf B = \mathsf B_{[\mrm{hw}(a)]} = \mathsf B_{[\mrm{hw}(a0)]}$ and $\mathsf{B^+} = \mathsf B_{[\mrm{hw}(a1)]}$. Also let $\mathsf D = \mathsf D_h$ (for ``dyadic") and $\mathsf W = \mathsf W_h$ (for ``workspace"). Let $\mathsf P$ (for ``prover's workspace, among other things") be the register consisting of all qubits not in $\mathsf{A^+ B^+ D W}$. \paragraph{Unitaries.} Consider the unitary operations applied in iteration $h$ of the protocol. Let $F$ (for ``forward'') denote the unitary jointly applied by the verifier and prover in the forward-QIP step, which acts on $\mathsf{ADWP}$. Let $G$ (for ``grow'') be the unitary applied by the verifier in the A-grow step (when $b_h = 1$), which acts on $\mathsf{A^+} \, \mathsf{D}$. Let $R$ (for ``reverse'') denote the unitary jointly applied by the verifier and prover in the backward-QIP step, which acts on $\mathsf{ADWP}$. Let $C$ (for ``copy'') denote the unitary applied by the prover in the B-grow step (when $b_h = 1$), which acts on $\mathsf{B^+} \, \mathsf{P}$. \paragraph{Projections.} Let $Y$ (for ``yes'') denote the projection $\kb1$ acting on the flag qubit of $\mathsf W$ (which indicates whether the $\class{QIP}[1/2]$ verifier accepts or rejects). Let $S$ denote the projection onto the symmetric subspace between $\mathsf{A}$ and $\mathsf{B}$, and similarly let $S^+$ denote the projection onto the symmetric subspace between $\mathsf{A^+}$ and $\mathsf{B^+}$. Let $A = I - S$ and $A^+ = I - S^+$. Define projections \begin{align*} T &= \begin{cases} \sum_{x \in \cube{\mrm{hw}(a)}} \kb{x}_{\mathsf A} \otimes \kb{\mrm{cp}(x)}_{\mathsf D} &\text{if } \mrm{hw}(a) < n, \\ \sum_{x \in \cube{\mrm{hw}(a)}} \kb{x}_{\mathsf A} \otimes \kb{\mrm{ph}(x)}_{\mathsf D} &\text{if } \mrm{hw}(a) = n, \end{cases} \\ L &= I - T \end{align*} (for ``truth" and ``lie" respectively) acting on $\mathsf{AD}$. The operator $T$ projects onto the unique correct ``answers'' of the $\class{QIP}[1/2]$ protocols. \paragraph{} It follows from the definition of the protocol that \begin{equation} \label{eq:varphi_a0_def} \ket{\varphi_{a0}} = SRF \ket{\varphi_a}~. \end{equation} This is because $\ket{\varphi_a}/\sqrt{\pi(a)}$ is the state of the system at the beginning of iteration $h$ conditioned on not having rejected yet, and if iteration $h$ is a ``test round'' (i.e. $c = 0$) then the verifier and prover first perform the forward-QIP step (thus applying the unitary $F$), the backward-QIP step (thus applying the unitary $R$), and then the verifier performs a swap test and accepts if the projection onto $S$ succeeds. Therefore \begin{equation*} \pi(a0) = \pi(a) \cdot \Norm{ SRF \frac{\ket{\varphi_a}}{\sqrt{\pi(a)}} }^2 = \| SRF \ket{\varphi_a} \|^2, \end{equation*} which implies~\eqref{eq:varphi_a0_def} with the correct normalization factor. Similarly, for the $c = 1$ case, the subnormalized state $\ket{\varphi_{a1}}$ can be written as \begin{equation} \label{eq:varphi_a1_def} \ket{\varphi_{a1}} = S^+ C R G Y F \ket{\varphi_a}~. \end{equation} We prove the following claim using the fact that $S$ (and $S^+$) projects onto the symmetric subspace: \begin{clm} \label{clm:symmetric-states} The states $\ket{\varphi_a}, \ket{\varphi_{a0}}, \ket{\varphi_{a1}}$ satisfy \begin{gather*} \ket{\varphi_a} = \mai{Swap} \cdot \ket{\varphi_a} \\ \ket{\varphi_{a0}} = \mai{Swap} \cdot \ket{\varphi_{a0}} \\ \ket{\varphi_{a1}} = \mai{Swap}^+ \cdot \ket{\varphi_{a1}} \end{gather*} where $Swap$ (resp. $Swap^+$) denotes the swap unitary between registers $\mathsf{A}$ and $\mathsf{B}$ (resp.\ $\mathsf{A^+}$ and $\mathsf{B^+}$). \end{clm} \begin{proof} By definition $S = \frac{I + \mai{Swap}} 2$, so $S = \mai{Swap} \cdot S$ and therefore $\ket{\varphi_{a0}} = \mai{Swap} \cdot \ket{\varphi_{a0}}$. Similarly it holds that $\ket{\varphi_{a1}} = \mai{Swap}^+ \cdot \ket{\varphi_{a1}}$. If $|a| > 0$ then we can write $a = a' c'$ for some string $a' \in \cube{|a|-1}$ and bit $c' \in \{0,1\}$, and then similar reasoning implies that $\ket{\varphi_a} = \mai{Swap} \cdot \ket{\varphi_a}$. Alternatively, if $a$ is the empty string then $\mathsf A$ and $\mathsf B$ are zero-qubit registers, so $\mai{Swap}$ is the identity operator and therefore $\ket{\varphi_a} = \mai{Swap} \cdot \ket{\varphi_a}$. \end{proof} Recall that we define \begin{equation*} r_{ac} = \pr{\text{verifier rejects in iteration $h$} \mid b_{\le h} = ac} \end{equation*} for $c \in \{0,1\}$. We now prove the $c=0$ case of \cref{clm:sound-progress}, i.e.\ that \begin{equation*} \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_{a0}}} \le 6\sqrt{u_a}, \end{equation*} via applications of \cref{clm:symmetric-states}. \begin{proof}[Proof of the $c=0$ case of \cref{clm:sound-progress}] By the symmetry of $\ket{\varphi_{a0}}$ (\cref{clm:symmetric-states}) and \eqref{eq:varphi_a0_def}, we have \begin{align*} \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_{a0}}} &= \norm{\bra{\theta_0}_{\mathsf A} \, Swap \, \ket{\varphi_{a0}}} = \norm{\bra{\theta_0}_{\mathsf B} \ket{\varphi_{a0}}} = \norm{\bra{\theta_0}_{\mathsf B} SRF \ket{\varphi_a}} \\ &= \norm{\bra{\theta_0}_{\mathsf B} (I - A)RF \ket{\varphi_a}} \ge \norm{\bra{\theta_0}_{\mathsf B} RF \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf B} ARF \ket{\varphi_a}}, \end{align*} where the last inequality is by the triangle inequality. By Cauchy-Schwarz, \begin{equation*} \norm{\bra{\theta_0}_{\mathsf B} ARF \ket{\varphi_a}} \le \norm{ARF \ket{\varphi_a}} = \sqrt{r_{a0}} \le \sqrt{u_a} \le 6 \sqrt{u_a}~. \end{equation*} Furthermore, \begin{equation*} \norm{\bra{\theta_0}_{\mathsf B} RF\ket{\varphi_a}} = \norm{\bra{\theta_0}_{\mathsf B} \ket{\varphi_a}} = \norm{\bra{\theta_0}_{\mathsf B} \cdot Swap \cdot \ket{\varphi_a}} = \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}}, \end{equation*} where the first equality holds because $RF$ is unitary and does not act on the register $\mathsf B$ (which is what $\bra{\theta_0}$ acts on), and the second equality holds by the symmetry of $\ket{\varphi_a}$ (\cref{clm:symmetric-states}). Therefore $\norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_{a0}}} \ge \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}} - 6\sqrt{u_a}$, and rearranging gives the desired inequality. \end{proof} Now we prove the $c=1$ case of \cref{clm:sound-progress}, i.e.\ that \begin{equation*} \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}} - \norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} \le 6\sqrt{u_a}~. \end{equation*} Since the proof of the $c=1$ case is longer than that of the $c=0$ case, we break the proof of the $c=1$ case into a series of claims. The first claim, at a high level, relates $\norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}}$ to the scenario where we assume that the prover computes the conditional probabilities/phases honestly (i.e.\ we project the state of the protocol onto $T$): \begin{clm} \label{clm:start} $ \norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} \ge \norm{\bra{\theta_1}_{\mathsf A^+} RGYTF \ket{\varphi_a}} - \norm{YLF \ket{\varphi_a}} - \sqrt{r_{a1}}$~. \end{clm} \begin{proof} By \eqref{eq:varphi_a1_def}, the fact that $S^+ + A^+ = I$, and the triangle inequality, we have \begin{align*} \norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} &= \norm{\bra{\theta_1}_{\mathsf A^+} S^+ C R G Y F \ket{\varphi_a}} \ge \norm{\bra{\theta_1}_{\mathsf A^+} C R G Y F \ket{\varphi_a}} - \norm{\bra{\theta_1}_{\mathsf A^+} A^+ C R G Y F \ket{\varphi_a}}~. \end{align*} By Cauchy-Schwarz, we have \begin{align*} \norm{\bra{\theta_1}_{\mathsf A^+} A^+ C R G Y F \ket{\varphi_a}}^2 \le \norm{ A^+ C R G Y F \ket{\varphi_a}}^2 \le r_{a1}, \end{align*} where the last inequality follows from the fact that $\norm{ A^+ C R G Y F \ket{\varphi_a}}^2$ denotes the probability that, conditioned on the random choices being $a1$, in iteration $h$ the verifier accepts the $\class{QIP}[1/2]$ protocols (thus the $Y$ projector) but rejects in the swap test (thus the $A^+$ projector). This is at most the probability of rejecting in iteration $h$ overall, conditioned on the random choices $a1$ (which is $r_{a1}$). Next, since the unitary $C$ acts on $\mathsf{B^+ P}$ but not on $\mathsf A^+$, it holds that \begin{align*} \norm{\bra{\theta_1}_{\mathsf A^+} C R G Y F \ket{\varphi_a}} &= \norm{\bra{\theta_1}_{\mathsf A^+} RGYF \ket{\varphi_a}} \\ &= \norm{\bra{\theta_1}_{\mathsf A^+} RGY (T + L)F \ket{\varphi_a}} \\ &\geq \norm{\bra{\theta_1}_{\mathsf A^+} RGYTF \ket{\varphi_a}} - \norm{\bra{\theta_1}_{\mathsf A^+} RGYLF \ket{\varphi_a}} \\ &\geq \norm{\bra{\theta_1}_{\mathsf A^+} RGYTF \ket{\varphi_a}} - \norm{YLF \ket{\varphi_a}} \end{align*} where the last inequality follows from Cauchy-Schwarz. Combining these inequalities yields the claim. \end{proof} The next claim is proved using the soundness guarantee of the $\class{QIP}[1/2]$ verifiers $V_\mrm{cp}$ and $V_\mrm{ph}$: \begin{clm} \label{clm:qip-sound} $ \Norm{Y LF \ket{\varphi_a}}^2 \le \frac{1}{2} \cdot {\Norm{LF \ket{\varphi_a}}}^2 $. \end{clm} \begin{proof} Write $F = F^{(2)}_{\mathsf{WP}} F^{(1)}_{\mathsf{ADWP}}$, where $F^{(1)}$ consists of the ``pre-processing stage" (Lines~\ref{line:msendx-sec6} through~\ref{line:mcopyx-sec6} of the protocol: the verifier sends $x$, receives $\eta$ from the prover, and copies $(x,\eta)$ into $\mathsf W$) and $F^{(2)}$ consists of the $\class{QIP}[1/2]$ protocol itself. Then since $L$ (which acts on $\mathsf{AD}$) commutes with $F^{(2)}$, we have that \begin{equation*} \Norm{Y LF \ket{\varphi_a}}^2 = \Norm{Y F^{(2)} \ket{\zeta}}^2 \quad \text{for} \quad \ket{\zeta} = L F^{(1)} \ket{\varphi_a}~. \end{equation*} By the definition of the ``lie'' projection $L$, we can write \begin{equation*} \ket{\zeta} = \sum_{\mathclap{\text{bad } (x,\eta)}} \kappa_{x,\eta} \, \ket{x,\eta}_{\mathsf{A} \mathsf{D}} \otimes \ket{x,\eta,0\cdots 0}_{\mathsf{W}_h} \otimes \ket{\zeta_{x,\eta}} \end{equation*} where $\kappa_{x,\eta}$ are complex numbers, $\ket{\zeta_{x,\eta}}$ are unit-length vectors, and we call $(x,\eta)$ \emph{bad} if $\eta \neq \mrm{cp}(x)$ (in the case that $\mrm{hw}(a) < n$) or if $\eta \neq \mrm{ph}(x)$ (in the case that $\mrm{hw}(a) = n$). In other words, the workspace register contains a superposition ``no'' instances of the $\class{QIP}$ language $L_\mrm{cp}$ or $L_\mrm{ph}$. Thus the $\class{QIP}[1/2]$ verifiers $V_\mrm{cp}$ or $V_\mrm{ph}$, when run on these bad instances, will accept with probability at most $1/2$ (by the soundness property of the $\class{QIP}[1/2]$ protocols). Since $Y F^{(2)}$ acts on the register $\mathsf{WP}$, which is disjoint from $\mathsf{AD}$, it follows that \[ \Norm{Y F^{(2)} \ket\zeta}^2 = \sum_{\mathclap{\text{bad } (x,\eta)}} |\kappa_{x,\eta}|^2 \cdot \Norm { YF^{(2)} \ket{x,\eta,0\cdots 0}_{\mathsf{W}_h} \ket{\zeta_{x,\eta}} }^2 \leq \sum_{\mathclap{\text{bad } (x,\eta)}} |\kappa_{x,\eta}|^2 \cdot \frac{1}{2} = \frac{1}{2} \cdot \Norm{ \ket{\zeta} }^2~. \] Finally, since $F^{(2)}$ is unitary and commutes with $L$, we have \begin{equation*} \Norm{ \ket{\zeta} }^2 = \Norm{ L F^{(1)} \ket{\varphi_a}}^2 = \Norm{ L F^{(2)} F^{(1)} \ket{\varphi_a}}^2 = \Norm{ L F \ket{\varphi_a}}^2~. \end{equation*} Combining these (in)equalities yields the claim. \end{proof} Roughly speaking, the next claim says that if the prover behaves honestly at the beginning of iteration $h$, then the verifier grows the state by a qubit (or if $\mrm{hw}(a) = n$, applies a phase) in the correct way: \begin{clm} \label{clm:grow} $ \Norm{\bra{\theta_1}_{\mathsf A^+} RG YTF \ket{\varphi_a}} = \Norm{\bra{\theta_0}_{\mathsf A} RYTF\ket{\varphi_a}} $. \end{clm} \begin{proof} Define a unitary $\wt G$ acting on $\mathsf A^+$ as follows: If $\mrm{hw}(a) < n$ then \begin{equation*} \wt G = \sum_{\mathclap{x \in \cube{\mrm{hw}(a)}}} \kb{x}_{\mathsf A} \otimes Q^{(x)}_{\mathsf A_{\mrm{hw}(a)+1}} \end{equation*} for some one-qubit unitaries $Q^{(x)}$ satisfying \begin{equation*} Q^{(x)} \ket0 = \sqrt{\mrm{cp}(x)} \ket0 + \sqrt{1-\mrm{cp}(x)} \ket1~. \end{equation*} Alternatively, if $\mrm{hw}(a) = n$ then let \begin{equation*} \wt G = \sum_{\mathclap{x \in \cube n}} \mrm{ph}(x) \kb{x}~. \end{equation*} In other words, the unitary $\wt{G}$ ``grows'' the state based on the true conditional probability or phase\footnote{Up to the overall phase $\gamma_n$ by which $\ket\psi$ differs from some close approximation of $\ket{\wt\psi}$.}, rather than based on the claimed value given by the prover (as with the unitary $G$). It follows from definitions that $GT = \wt G T$, and that $\wt G$ commutes with $R$. This latter point holds because we can write $R = \sum_{x \in \cube{\mrm{hw}(a)}} \kb{x}_{\mathsf A} \otimes U^{(x)}$ for some unitaries $U^{(x)}$ acting on $\mathsf{DWP}$, and registers $\mathsf A_{\mrm{hw}(a)+1}$ and $\mathsf{DWP}$ are disjoint. Thus, since $Y$ (which acts on $\mathsf W$) commutes with $T$ (which acts on $\mathsf{AD}$), we have \begin{align*} \Norm{\bra{\theta_1}_{\mathsf A^+} R GYTF \ket{\varphi_a}} = \Norm{\bra{\theta_1}_{\mathsf A^+} R \wt G YTF \ket{\varphi_a}} = \Norm{\bra{\theta_1}_{\mathsf A^+} \wt G R YT F \ket{\varphi_a}}~. \end{align*} Suppose that $\mrm{hw}(a) < n$. Then $\wt{G} \ket{\theta_0}_{\mathsf{A}} \ket{0}_{\mathsf{A}_{\mrm{hw}(a)+1}} = \ket{\theta_1}_{\mathsf{A^+}}$, so \begin{equation*} \Norm{\bra{\theta_1}_{\mathsf A^+} \wt G R YT F \ket{\varphi_a}} = \Norm{\bra{\theta_0,0}_{\mathsf{A^+}} RYTF \ket{\varphi_a}} = \Norm{\bra{\theta_0}_{\mathsf{A}} RYTF \ket{\varphi_a}}, \end{equation*} where the last equality holds because the register ${\mathsf{A}_{\mrm{hw}(a)+1}}$ in the state $RYTF \ket{\varphi_a}$ is in the state $\ket{0}$ (because the protocol has not acted on that register yet). Alternatively, suppose that $\mrm{hw}(a) = n$. Then $\wt{G} \ket{\theta_0}_{\mathsf{A}} = \ket{\theta_1}_{\mathsf{A}}$, so in this case it also holds that \begin{equation*} \Norm{\bra{\theta_1}_{\mathsf A^+} \wt G R YT F \ket{\varphi_a}} = \Norm{\bra{\theta_0}_{\mathsf{A}} RYTF \ket{\varphi_a}}~. \end{equation*} The claim follows from combining the above equalities. \end{proof} Finally, we combine these claims to prove the $c=1$ case of \cref{clm:sound-progress}: \begin{proof}[Proof of the $c=1$ case of \cref{clm:sound-progress}] By \cref{clm:start,clm:grow}, \begin{align*} \norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} &\ge \norm{\bra{\theta_1}_{\mathsf A^+} RG Y TF \ket{\varphi_a}} - \norm{YLF \ket{\varphi_a}} - \sqrt{r_{a1}} \\ &= \Norm{\bra{\theta_0}_{\mathsf A} RYTF \ket{\varphi_a}} - \norm{YLF \ket{\varphi_a}} - \sqrt{r_{a1}}~. \end{align*} \cref{clm:qip-sound} implies that \begin{align*} \Norm{YLF \ket{\varphi_a}}^2 \le \frac{1}{2} {\Norm{LF \ket{\varphi_a}}}^2 = \frac{1}{2}\Norm{YLF \ket{\varphi_a}}^2 + \frac{1}{2} \Norm{(I - Y) LF \ket{\varphi_a}}^2~. \end{align*} Rearranging, and then using that $(I - Y)_{\mathsf W}$ and $L_{\mathsf{AD}}$ commute and $\norm{L}_{\mrm{op}} \le 1$, we get \begin{equation} \norm{YLF \ket{\varphi_a}}^2 \le \norm{(I - Y)LF \ket{\varphi_a}}^2 = \norm{L(I - Y)F \ket{\varphi_a}}^2 \le \norm{(I - Y)F \ket{\varphi_a}}^2 \le r_{a1}~. \label{eq:c1-1} \end{equation} The last inequality holds because $\norm{(I - Y)F \ket{\varphi_a}}^2$ denotes the probability that the verifier rejects in the A-grow step of iteration $h$ (conditioned on the random choices $a1$), which is at most the probability that the verifier rejects in iteration $h$ (conditioned on the random choices $a1$), a.k.a.\ $r_a$. Thus \begin{align*} \norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} &\ge \norm{\bra{\theta_0}_{\mathsf A} R Y T F \ket{\varphi_a}} - 2\sqrt{r_{a1}} \\ &\geq \norm{\bra{\theta_0}_{\mathsf A} RYF \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf A} RYLF \ket{\varphi_a}} - 2\sqrt{r_{a1}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf A} RF \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf A} R(I - Y)F \ket{\varphi_a}} - \norm{YLF \ket{\varphi_a}} - 2\sqrt{r_{a1}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf A} RF \ket{\varphi_a}} - \norm{(I - Y) F \ket{\varphi_a}} - 3\sqrt{r_{a1}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf A}RF \ket{\varphi_a}} - 4\sqrt{r_{a1}}~. \end{align*} The second line follows from using $T = I - L$ and the triangle inequality. The third line follows from $I + (Y - I) = Y$ and the triangle inequality, as well as Cauchy-Schwarz. The fourth line follows from Cauchy-Schwarz, as well as \eqref{eq:c1-1}. The last line follows from the final inequality in \eqref{eq:c1-1} again. Finally, by reasoning similar to that in the $c=0$ case, \begin{align*} \norm{\bra{\theta_0}_{\mathsf A} RF \ket{\varphi_a}} &\ge \norm{\bra{\theta_0}_{\mathsf A} SRF \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf A} ARF\ket{\varphi_a}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf B} S RF \ket{\varphi_a}} - \norm{A RF\ket{\varphi_a}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf B} RF \ket{\varphi_a}} - \norm{\bra{\theta_0}_{\mathsf B} ARF \ket{\varphi_a}} - \sqrt{r_{a0}} \\ &\ge \norm{\bra{\theta_0}_{\mathsf B} \ket{\varphi_a}} - \norm{ARF\ket{\varphi_a}} - \sqrt{r_{a0}} \\ &= \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}} - 2\sqrt{r_{a0}}, \end{align*} so $\norm{\bra{\theta_1}_{\mathsf A^+} \ket{\varphi_{a1}}} \ge \norm{\bra{\theta_0}_{\mathsf A} \ket{\varphi_a}} - 2\sqrt{r_{a0}} - 4\sqrt{r_{a1}}$. Since $r_{a0}, r_{a1} \leq u_{a}$, this implies \cref{clm:sound-progress} in the $c=1$ case as desired. \end{proof} \section{\texorpdfstring{$\class{PSPACE}$}{PSPACE} Algorithms for Quantum State Tomography} \label{sec:tomography} In this section we give polynomial-space algorithms for tomography of states in \cc{statePSPACE}\xspace. This plays a role in our interactive state synthesis protocol, as discussed in \cref{sec:fassup}. The results needed for our state synthesis protocol are proved in \cref{subsec:sa}, as corollaries of a more general result proved in \cref{subsec:gf}. \subsection{General framework} \label{subsec:gf} \begin{thm}\label{tomog-0} Let $\ell, m$ be polynomials, and let $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ be a space-uniform family of general quantum circuits such that each $C_n$ has $\ell(n)$ input qubits and one output qubit. Then there exists a $\class{PSPACE}$-computable function $f$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{\ell(n)}$ it holds that $f(1^n, x) \in \D{m(n)}$ and \begin{equation*} \left|f(1^n, x) - \bra1 C_n(x) \ket1\right| \le 2 \cdot 2^{-m(n)}~. \end{equation*} \end{thm} The proof of \Cref{tomog-0} uses the following special case of a result of Watrous~\cite{watrous03complexity}:\footnote{Watrous's result applies only to circuit families over a finite gate set in which the entries of all gates are algebraic numbers. This is why we imposed a similar requirement in our definition of space-uniform circuit families.} \begin{thm}[{\cite{watrous03complexity}}] \label{thm:watrous03} Let $\ell$ be a polynomial, and let $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ be a space-uniform family of general quantum circuits such that each $C_n$ has $\ell(n)$ input qubits and one output qubit. Then the language \begin{equation*} \left\{(1^n, x) : n \in \ensuremath{\mathbb{N}}, x \in \{0,1\}^{\ell(n)}, \, \bra{1} C_n (x) \ket{1} > 1/2 \right\} \end{equation*} is in $\class{PSPACE}$. \end{thm} \begin{proof}[Proof of \cref{tomog-0}] The circuit $A_n$ defined in \cref{alg:An} uses $\mathrm{poly}(n)$ space, because it takes $\mathrm{poly}(n)$ space to store the value of $k$ and (by assumption) to apply $C_n$, and because all qubits introduced in an iteration of the for loop are traced out by the end of that iteration. By similar reasoning, the description of $A_n$ can be computed in space $\mathrm{poly}(n)$. Therefore $(A_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, so by \cref{thm:watrous03} the language \begin{equation*} L = \left\{(1^n, x, r): n \in \ensuremath{\mathbb{N}}, x \in \cube{\ell(n)}, r \in \D{m(n)}, \, \bra1 A_n(x,r) \ket1 > 1/2\right\} \end{equation*} is in $\class{PSPACE}$. Let $k_n(x)$ be a binomial random variable with parameters $t_n$ and $p_n(x) = \bra1 C_n(x) \ket1$, and observe that \begin{equation*} \bra1 A_n(x,r) \ket1 = \PR{|k_n(x)/t_n - r| \le 3/2 \cdot 2^{-m(n)}}~. \end{equation*} \begin{algorithm} \caption{The circuit $A_n$} \label{alg:An} \begin{algorithmic}[1] \Require $x \in \cube{\ell(n)}, r \in \D{m(n)}$ \State $k \gets 0$. \For{$t_n = 10 \cdot 4^{m(n)}$ times} \State Construct $C_n(x)$, and measure it in the standard basis. \IIf{the measurement outcome is 1} $k \gets k+1$. \EndIIf \State Trace out the qubit holding the measurement outcome. \EndFor \If{$|k/t_n - r| \le \frac32 \cdot 2^{-m(n)}$} \Return 1. \Else{} \Return 0. \EndIf \end{algorithmic} \end{algorithm} Let $f(1^n, x)$ be the lexicographically first number $r \in \D{m(n)}$ such that $(1^n, x, r)$ is in $L$. We first argue that $f$ is well defined, i.e.\ that for all $n,x$ there exists $r$ such that $(1^n, x, r)$ is in $L$. Given $n,x$ let $r \in \D{m(n)}$ be such that $|p_n(x) - r| \le 2^{-m(n)}$. Then, abbreviating $k_n(x), t_n, m(n), p_n(x)$ as $k,t,m,p$ respectively, by a Chernoff bound we have that \begin{align*} \pr{|k/t - r| > (3/2) \cdot 2^{-m}} &\le \pr{|k/t - p| + |p - r| > 3/2 \cdot 2^{-m}} \\ &\le \pr{|k/t - p| \cdot 2^{-m} > 3/2 \cdot 2^{-m}} \\ &= \pr{|k/t - p| > 1/2 \cdot 2^{-m}} \\ &\le 2\exp\Paren{-2t\Paren{1/2 \cdot 2^{-m}}^2} \\ &= 2\exp\Paren{-5} < 1/2, \end{align*} so $(1^n, x, r)$ is in $L$. Therefore $f$ is well defined, and since $L$ is in $\class{PSPACE}$ clearly $f$ is computable in $\class{PSPACE}$ as well. Finally, consider $n,x,r$ with $|p_n(x) - r| \ge 2 \cdot 2^{-m(n)}$. Using the same abbreviations as above, we have that \begin{align*} \pr{|k/t - r| \le 3/2 \cdot 2^{-m}} &\le \pr{|p - r| - |k/t - p| \le 3/2 \cdot 2^{-m}} \\ &\le \pr{2 \cdot 2^{-m} - |k/t - p| \le 3/2 \cdot 2^{-m}} \\ &= \pr{|k/t - p| \ge 1/2 \cdot 2^{-m}} \\ &< 1/2, \end{align*} where the last inequality holds by the same reasoning as above Therefore $(1^n, x, r)$ is not in $L$, so $r \neq f(1^n, x)$, implying that $|p_n(x) - f(1^n,x)| \le 2 \cdot 2^{-m(n)}$. \end{proof} The following is an easy consequence of \cref{tomog-0}: \begin{cor} \label{tomog} Let $\ell, m$ be polynomials, let $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ be a space-uniform family of general quantum circuits such that each $C_n$ has $\ell(n) + n$ input qubits and one output qubit, and let $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$. Then there exists a $\class{PSPACE}$-computable function $f$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{\ell(n)}$ it holds that $f(1^n, x) \in \D{m(n)}$ and \begin{equation*} |f(1^n, x) - \bra1 C_n(x, \psi_n) \ket1| \le 3 \cdot 2^{-m(n)}~. \end{equation*} \end{cor} \begin{proof} Since $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ is in \cc{statePSPACE}\xspace, there exists a space-uniform family of general quantum circuits $(D_n)_{n \in \ensuremath{\mathbb{N}}}$ such that for all $n \in \ensuremath{\mathbb{N}}$, the circuit $D_n$ takes no inputs and $D_n$ outputs a density matrix $\rho_n$ such that $\td(\rho_n, \psi_n) \le 2^{-m(n)}$. Let $B_n$ be the general quantum circuit that on input $x \in \cube{\ell(n)}$, first applies $D_n$ to construct $\rho_n$, and then applies $C_n$ on input $\kb{x} \otimes \rho_n$. The family $(B_n)_{n \in \ensuremath{\mathbb{N}}}$ is clearly space-uniform, so by \cref{tomog-0} there exists a $\class{PSPACE}$-computable function $f$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{\ell(n)}$ it holds that $f(1^n,x) \in \D{m(n)}$ and \begin{equation*} |f(1^n,x) - \bra1 B_n(x) \ket1| \le 2 \cdot 2^{-m(n)}~. \end{equation*} For all $n \in \ensuremath{\mathbb{N}}, x \in \cube{\ell(n)}$, by the definition of trace distance \begin{equation*} |\bra1 \Paren{B_n(x) - C_n(x, \psi_n)} \ket1| = |\bra1 \Paren{C_n(x, \rho_n) - C_n(x, \psi_n)} \ket1| \le \td(\rho_n, \psi_n) \le 2^{-m(n)}, \end{equation*} so by the triangle inequality \begin{align*} |f(1^n, x) - \bra1 C_n(x, \psi_n) \ket1| &\le |f(1^n,x) - \bra1 B_n(x) \ket1| + |\bra1 \Paren{B_n(x) - C_n(x, \psi_n)} \ket1| \\ &\le 3 \cdot 2^{-m(n)}. \qedhere \end{align*} \end{proof} \subsection{Specific applications} \label{subsec:sa} \newcommand{\mrm{cp}}{\mrm{cp}} \newcommand{\mrm{ph}}{\mrm{ph}} \newcommand{\mai{round}}{\mai{round}} \begin{cor}\label{cor:tomog-relative-weight} Let $m$ be a polynomial, let $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, and for $n \in \ensuremath{\mathbb{N}}, x \in \cube{\le n}$ let $p_n(x) = \norm{(\bra{x} \otimes I) \ket{\psi_n}}^2$. Then there exists a $\class{PSPACE}$-computable function $\mrm{cp}$ (for ``conditional probability") and a polynomial $\ell$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{<n}$ it holds that $\mrm{cp}(1^n, x) \in \D{\ell(n)}$ and \begin{equation*} |p_n(x) \cdot \mrm{cp}(1^n,x) - p_n(x0)| \le 2^{-m(n)}~. \end{equation*} \end{cor} The intuition behind the definitions of $p_n$ and cp is that if $\ket{\psi_n}$ is measured in the standard basis, then $p_n(x)$ is the probability that the first $|x|$ qubits measure to $x$, and $\mrm{cp}(1^n, x) \approx p_n(x0)/p_n(x)$ is approximately the probability that the $(|x|+1)$'st qubit measures to 0 conditioned on the first $|x|$ qubits measuring to $x$. \begin{proof} Let $C_n$ be the general quantum circuit that on input $\kb{x} \otimes \rho$, where $x \in \cube{\le n}$ (encoded in some reasonable way as a string of length depending only on $n$) and $\rho$ is an $n$-qubit state, does the following: measure the first $|x|$ qubits of $\rho$ in the standard basis, output 1 if the outcome $x$ occurs, and otherwise output 0. Clearly $\bra1 C_n(x, \psi_n) \ket1 = p_n(x)$ and $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, so by \cref{tomog} there exists a $\class{PSPACE}$-computable function $f$ such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube{\le n}$ it holds that $f(1^n, x) \in \D{\ell(n)}$ (we will specify the polynomial $\ell$ later) and \begin{equation*} |f(1^n, x) - p_n(x)| \le 3 \cdot 2^{-\ell(n)}~. \end{equation*} Let \begin{equation*} \mrm{cp}(1^n,x) = \mai{round}\Paren{\frac{f(1^n,x0)}{f(1^n,x)}}, \end{equation*} where the function $\mai{round}(\cdot)$ maps its argument to the nearest element of $\D{\ell(n)}$. (If $f(1^n,x) = 0$ then define $\mrm{cp}(1^n,x)$ arbitrarily.) Clearly $\mrm{cp}(\cdot)$ is computable in $\class{PSPACE}$. Fix $n \in \ensuremath{\mathbb{N}}, x \in \cube{<n}$ and let \begin{align*} a &= p_n(x0), &b&= p_n(x),& \delta &= 3 \cdot 2^{-\ell(n)},\\ \wt a &= f(1^n, x0), &\wt b&= f(1^n,x),& \mu &= \min\Paren{\wt a/\wt b, \, 1}~. \end{align*} It follows from definitions that $|\wt a - a|, |\wt b - b| \le \delta$, that $0 \le a \le b \le 1$, that $0 \le \wt a, \wt b \le 1$, and that $|\mrm{cp}(1^n,x) - \mu| \le 2^{-\ell(n)}$. By the triangle inequality, \begin{equation*} |b \cdot \mrm{cp}(1^n,x) - a| \le b \cdot |\mrm{cp}(1^n,x) - \mu| + |b\mu - a| \le 2^{-\ell(n)} + |b\mu - a|~. \end{equation*} If $b \le 3\delta$ then \begin{equation*} |b\mu - a| \le \max(b\mu, a) \le b \le 3\delta, \end{equation*} and if $b > 3\delta$ then \begin{align*} |b\mu - a| &\le \left|b \cdot \frac{\wt a}{\wt b} - a\right| = \left|\frac{b \cdot \wt a - a \cdot \wt b}{\wt b}\right| = \left|\frac{b (\wt a - a) + a (b - \wt b)}{\wt b}\right| \\ &\le \left|\frac{b (\wt a - a)}{\wt b}\right| + \left|\frac{a (b - \wt b)}{\wt b}\right| \le \frac{b\delta}{b - \delta} + \frac{a\delta}{b - \delta} \le \frac{2b\delta}{(2/3) b} = 3\delta, \end{align*} so either way it holds that $\left|b\mu - a\right| \le 3\delta$ and therefore \begin{equation*} |b \cdot \mrm{cp}(1^n,x) - a| \le 2^{-\ell(n)} + 3\delta = 10 \cdot 2^{-\ell(n)}~. \end{equation*} The result follows by taking $\ell(n) = m(n) + 4$. \end{proof} For $\ell \in \ensuremath{\mathbb{N}}$ recall that we define $\U\ell = \{\exp(2\pi i r) : r \in \D\ell\}$. \begin{cor}\label{cor:tomog-phase} Let $m$ be a polynomial, let $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, and for $n \in \ensuremath{\mathbb{N}}, x \in \cube{n}$ let $\alpha_x = \ip{x}{\psi_n}$. Then there exists a polynomial $\ell$, a sequence of unit-magnitude complex numbers $(\gamma_n)_{n \in \ensuremath{\mathbb{N}}}$, and a $\class{PSPACE}$-computable function $\mrm{ph}$ (for ``phase") such that for all $n \in \ensuremath{\mathbb{N}}, x \in \cube n$ it holds that $\mrm{ph}(x) \in \U{\ell(n)}$ and \begin{equation*} \big| \mrm{ph}(x) \cdot \gamma_n \cdot |\alpha_x| - \alpha_x \big| \le 2^{-m(n)}~. \end{equation*} \end{cor} At a high level we compute $\mrm{ph}(x)$ as follows: first estimate $\alpha_x \conj \alpha_{y_n}$ for an appropriate string $y_n$ (where $y_n$ depends only on $n$) in a manner similar to one-qubit tomography, and then normalize to unit magnitude. \begin{proof} Let $p(x) = |\alpha_x|^2$ for $x \in \cube*$. Below we define a sequence of strings $(y_n)_{n \in \ensuremath{\mathbb{N}}}$, with $y_n \in \cube n, p(y_n) \ge \frac12 \cdot 2^{-n}$ and the function $1^n \mapsto y_n$ computable in $\class{PSPACE}$. Let $\gamma_n = \alpha_{y_n} / |\alpha_{y_n}|$. Let $A_n$ be the general quantum circuit that on input $\kb{x} \otimes \rho$, where $x \in \cube n$ and $\rho$ is an $n$-qubit state, measures $\rho$ in the standard basis and then outputs 1 if the outcome $x$ occurs and 0 otherwise. Clearly $\bra1 A_n(x, \psi) \ket1 = p(x)$ and $(A_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, so by \cref{tomog} there exists a $\class{PSPACE}$-computable function $f$ such that for all for all $n \in \ensuremath{\mathbb{N}}, x \in \cube n$ it holds that $f(x) \in \D{n+4}$ and $|f(x) - p(x)| \le \frac14 \cdot 2^{-n}$. Let $y_n$ be the lexicographically first string in $\cube n$ satisfying $f(y_n) \ge \frac34 \cdot 2^{-n}$. The string $y_n$ is well defined, because there exists $x \in \cube n$ such that $p(x) \ge 2^{-n}$, and for this $x$ it holds that \begin{equation*} f(x) = p(x) + (f(x) - p(x)) \ge 2^{-n} - 1/4 \cdot 2^{-n} = 3/4 \cdot 2^{-n}~. \end{equation*} By a similar calculation, \begin{equation*} p(y_n) = f(y_n) + (p(y_n) - f(y_n)) \ge 3/4 \cdot 2^{-n} - 1/4 \cdot 2^{-n} = 1/2 \cdot 2^{-n}, \end{equation*} and the function $1^n \mapsto y_n$ is computable in $\class{PSPACE}$ because $f$ is computable in $\class{PSPACE}$. \newcommand*{U}{U} Let $U$ denote the set $\{1,i,-1,-i\}$. For $x,z \in \cube n$, \begin{align} 2 \alpha_x \conj \alpha_z &= 2\ip{x}{\psi_n} \ip{\psi_n}z \nonumber \\ &= \frac12\sum_{u \in U} \Paren{ u \ip{x}{\psi_n} \ip{\psi_n}{x} + \ip{x}{\psi_n} \ip{\psi_n}{z} + u^2 \ip{z}{\psi_n} \ip{\psi_n}{x} + u \ip{z}{\psi_n} \ip{\psi_n}{z}} \nonumber \\ &= \sum_{u \in U} u \frac{\bra{x} + u \bra{z}}{\sqrt 2} \kb{\psi_n} \frac{\ket{x} + \conj{u} \ket{z}}{\sqrt 2} \nonumber \\ &= \sum_{u \in U} u \left|\frac{\bra{x} + u \bra{z}}{\sqrt 2} \ket{\psi_n}\right|^2. \label{U4sum} \end{align} Let $W_n$ be the set of tuples $(x,z,u)$ with $x,z \in \cube n, u \in U$ such that $x \neq z$. We now prove that there is a $\class{PSPACE}$-computable function $g$ with $g(x, z, u) \in \D{\ell(n)}$ for all $(x,z,u) \in W_n$ (we will specify the polynomial $\ell$ later) such that \begin{equation} \label{gapprox} \forall (x,z,u) \in W_n: \ \left|g(x,z,u) - \left|\frac{\bra{x} + u \bra{z}}{\sqrt 2} \ket{\psi_n}\right|^2 \right| \le 3 \cdot 2^{-\ell(n)}~. \end{equation} By \cref{tomog}, it suffices to give a space-uniform family of general quantum circuits $(B_n)_{n \in \ensuremath{\mathbb{N}}}$, where $B_n$ has $3n+2$ input qubits and one output qubit, such that \begin{equation*} \forall (x,z,u) \in W_n: \ \bra1 B_n(x,z,u, \psi_n) \ket1 = \left|\frac{\bra{x} + u \bra{z}}{\sqrt 2} \ket{\psi_n}\right|^2~. \end{equation*} Our construction of $B_n$ involves the following unitary quantum circuit $C_n$, which satisfies \begin{equation*} \forall (x,z,u) \in W_n: \ C_n \ket{x,z,u, 0^{\mathrm{poly}(n)}, 0^n} = \ket{x,z,u, 0^{\mathrm{poly}(n)}} \otimes \frac{\ket x + \conj u \ket z}{\sqrt 2}, \end{equation*} and which acts on input $\ket{x,z,u, 0^{\mathrm{poly}(n)}, 0^n}$ as follows: Construct $\ket+$ in a one-qubit ancilla register $\mathsf R$; controlled on 0 in $\mathsf R$, XOR $x$ into the last $n$ qubits; controlled on 1 in $\mathsf R$, XOR $z$ into the last $n$ qubits and apply a phase of $\conj u$; and controlled on the last $n$ qubits equaling $z$, XOR 1 into $\mathsf R$. Finally, let $B_n$ act as follows on input $(x,z,u,\phi)$ where $\ket\phi$ is an $n$-qubit state: Construct $\adj C_n \ket{x, z, u, 0\cdots 0, \phi}$, measure the last $n$ qubits in the standard basis, output 1 if the outcome is all-zeros, and otherwise output 0. For $n \in \ensuremath{\mathbb{N}}$, let $\mrm{ph}(y_n) = 1$, and for $x \in \cube{n} \backslash \{y_n\}$ let \begin{equation*} \mrm{ph}(x) = \mai{round} \Paren{\frac{\sum_{u \in U} u \cdot g(x,y_n,u)} {|\sum_{u \in U} u \cdot g(x,y_n,u)|}}, \end{equation*} where the function $\mai{round}(\cdot)$ maps its argument to the nearest element of $\U{\ell(n)}$ (and $\mai{round}(0/0)$ may be defined arbitrarily). The function $\mrm{ph}(\cdot)$ is computable in $\class{PSPACE}$ because the functions $1^n \mapsto y_n$ and $g$ are computable in $\class{PSPACE}$. Fix $n \in \ensuremath{\mathbb{N}}$, and note that \begin{equation*} \big| \mrm{ph}(y_n) \, \gamma_n \, |\alpha_{y_n}| - \alpha_{y_n} \big| = |1 \cdot \alpha_{y_n} - \alpha_{y_n}| = 0 < 2^{-m(n)}~. \end{equation*} Now consider a string $x \in \cube{n} \backslash \{y_n\}$, and let \begin{align*} &\lambda = 2 \alpha_x \conj \alpha_{y_n} = 2 \alpha_x |\alpha_{y_n}| \conj \gamma_n, &\mu = \sum_{u \in U} u \cdot g(x,y_n,u). \end{align*} By \eqref{U4sum}, \eqref{gapprox} and the triangle inequality, \begin{equation*} |\lambda - \mu| = \left|\sum_{u \in U} u \cdot \Paren{\left|\frac{\bra{x} + u \bra{y_n}}{\sqrt 2} \ket{\psi_n}\right|^2 - g(x,y_n,u)}\right| \le 12 \cdot 2^{-\ell(n)}~. \end{equation*} Therefore, by the triangle inequality and \eqref{eq:integral} and recalling that $|\alpha_{y_n}| \ge \frac1{\sqrt 2} \cdot 2^{-n/2} \ge \frac12 \cdot 2^{-n/2}$, \begin{align*} \big| \mrm{ph}(x) \, \gamma_n \, |\alpha_x| - \alpha_x \big| &= \big|\mrm{ph}(x) \, |\alpha_x| - \alpha_x \, \conj \gamma_n \big| \\ &\le \left| \mrm{ph}(x) \, |\alpha_x| - \frac{\mu}{|\mu|} |\alpha_x| \right| + \left| \frac{\mu}{|\mu|} |\alpha_x| - \alpha_x \, \conj \gamma_n \right| \\ &\le \left|\mrm{ph}(x) - \frac\mu{|\mu|}\right| + \frac1{2 |\alpha_{y_n}|} \cdot \left|\frac\mu{|\mu|} |\lambda| - \lambda \right| \\ &\le 2\pi \cdot 2^{-\ell(n)} + 2^{n/2} \cdot \left|\frac\mu{|\mu|} (|\lambda| - |\mu|) + \mu - \lambda\right| \\ &\le 7 \cdot 2^{-\ell(n)} + 2^{n/2} \cdot \Paren{\big||\lambda|-|\mu|\big| + |\lambda-\mu|} \\ &\le 7 \cdot 2^{-\ell(n)} + 2^{n/2} \cdot 2|\lambda-\mu| \\ &\le 31 \cdot 2^{n/2 - \ell(n)}, \end{align*} so it suffices to take $\ell(n) = m(n) + \ceil{n/2} + 5$. \end{proof} \section{Interactive Unitary Synthesis} \label{sec:transformations} In this section we present our unitary synthesis protocol for unitaries in $\cc{unitaryPSPACE}$ with polynomial action, i.e.\ \Cref{thm:poly-action}. We also discuss a unitary synthesis protocol for general unitary families, provided that the verifier also receives a succinct description of a polynomial-dimensional subspace that contains the input state. \subsection{Protocol for unitaries with polynomial action} \label{sec:poly-action} Our unitary synthesis protocol is based on the following algorithm, which we denote $\alg{LMR}$ after Lloyd, Mohseni, and Rebentrost who formulated it~\cite{lloyd2014quantum}. \begin{thm}[\cite{lloyd2014quantum,kimmel2017hamiltonian}] \label{thm:lmr} There exists a quantum polynomial-time algorithm $\alg{LMR}$ that takes as input a state $\tau \otimes \rho^{\otimes k} \otimes \kb{t}$, where $\tau$ and $\rho$ are $n$-qubit mixed states and $t \ge 0$ is a number written in binary, and outputs an $n$-qubit mixed state $\sigma$ such that \begin{equation*} \td(\sigma, \, W \tau \adj W) \le O(t^2/k) \qquad \text{for} \qquad W = \exp(2\pi i \cdot t \cdot \rho)~. \end{equation*} \end{thm} We introduce the following notation related to \cref{thm:lmr}. If $U$ is a unitary acting on $n$ qubits, then for $t, \varepsilon \ge 0$ we call an $n$-qubit mixed state $\rho$ a \emph{program state for $U$ with evolution time $t$ and error $\varepsilon$} if for all $n$-qubit states $\ket\phi$, \begin{equation*} \td \Paren{U \phi \adj U, \, W \phi \adj W} \le \varepsilon \qquad \text{for} \qquad W = \exp(2 \pi i \cdot t \cdot \rho)~. \end{equation*} For example, if \begin{equation} \label{eq:def-U-t} U = \sum_{j=1}^{2^n} e^{2\pi i \theta_j} \kb{v_j} \end{equation} is an eigendecomposition of $U$ where $0 \le \theta_j < 1$ for all $j$, then for \begin{align} \label{eq:def-rho-t} &t = \sum_j \theta_j, &\rho = \frac1t \sum_j \theta_j \kb{v_j} \end{align} the state $\rho$ is a program state for $U$ with evolution time $t$ and error 0 (if $t>0$). We call $\rho$ and $t$ respectively the \emph{canonical program state for $U$} and the \emph{canonical evolution time for $U$}, and note that $\rho$ and $t$ do not depend on the chosen eigendecomposition of $U$. Observe that if $U$ has action $a$ (i.e.\ $U$ acts nontrivially on a subspace of dimension $a$) then the canonical evolution time for $U$ is at most $a$, because \begin{equation*} t = \sum_j \theta_j \le \sum_j \ceil{\theta_j} = a~. \end{equation*} Therefore \cref{thm:poly-action} follows from the following theorem, which is identical to \cref{thm:poly-action} but with ``canonical evolution time" in place of ``action": \begin{thm} \label{thm:main-7p1} Let $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ be a family in \cc{unitaryPSPACE}\xspace such that $U_n$ has canonical evolution time at most $\mathrm{poly}(n)$ for all $n$, and let $q$ be a polynomial. Then $(U_n)_{n \in \ensuremath{\mathbb{N}}} \in \cc{unitaryQIP}[c,s]$ for \begin{align*} &c(n) = \frac{1}{q(n)}, &s(n,\delta) = \exp \Paren{\frac{1}{q(n)} - q(n) \cdot \delta^4}~. \end{align*} \end{thm} In the rest of this subsection we prove \cref{thm:main-7p1}. In what follows we relax the definition of \cc{statePSPACE}\xspace to allow the $n$'th state in a sequence to be on $\mathrm{poly}(n)$ qubits rather than exactly $n$ qubits. Clearly our state synthesis theorem (\cref{thm:prim-result}) holds even with this more general definition, a fact which we will use. Also let $\D{m}[k]$ be the set of integer multiples of $2^{-m}$ in the interval $[0,k)$ (e.g.\ $\D{m}[1] = \D{m}$), encoded as binary strings in the natural way. Throughout this subsection, asymptotic notation hides universal constants (as opposed to constants that depend on some named polynomial or sequence of unitaries). Our proof uses the following lemma: \begin{lem} \label{lem:helper-7p1} Let $(U_n)_{n \in \ensuremath{\mathbb{N}}} \in \cc{unitaryPSPACE}\xspace$. Then there exists \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item a $\class{PSPACE}$-computable function $f$ such that $f(1^n) \in \D{\mathrm{poly}(n)}[2^n]$ and $f(1^n) \leq t_n + e^{-\Omega(n)}$, where $t_n$ is the canonical evolution time for $U_n$, \item a sequence $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, \end{itemize} such that for all $n$ the reduced state of $\ket{\psi_n}$ on the first $n$ qubits is a program state for $U_n$ with evolution time $f(1^n)$ and error $e^{-\Omega(n)}$. \end{lem} Our unitary synthesis protocol prepares copies of $\ket{\psi_n}$ and computes $f(1^n)$ (for $\ket{\psi_n}, f$ as defined in \cref{lem:helper-7p1}) using our state synthesis protocol, and then applies the $\alg{LMR}$ algorithm to the appropriate reduced state. First we prove \cref{lem:helper-7p1} in a certain special case (explained below), then we prove \cref{lem:helper-7p1} in the general case by reducing to the special case, and finally we prove \cref{thm:main-7p1} using \cref{lem:helper-7p1}. A ``problem" with the definitions of $\rho$ and $t$ in \eqref{eq:def-rho-t} is that they are sensitive to small perturbations in the unitary $U$ from \eqref{eq:def-U-t}. For example, if $\theta_j = 0$ for some $j$, then an arbitrarily small perturbation to the $j$'th eigenvalue of $U$ could change $\theta_j$ to near 1. Furthermore $\rho$ is undefined when $t=0$, and is sensitive to a slight increase in any of the $\theta_j$ when $t$ is near zero. Motivated by these concerns, we define a notion of \emph{stability} of a unitary, and first prove \cref{lem:helper-7p1} in the case where $U_n$ is stable for all $n$. \begin{dfn}[Stability of unitaries] An $n$-qubit unitary $U$ is \emph{stable} if all of its eigenvalues are of the form $e^{2 \pi i \theta}$ where $2^{-3n} \le \theta \le 1-2^{-3n}$. \end{dfn} The following equivalent definition of stability will sometimes be more convenient to work with. Define a metric $\Delta$ on the real numbers as follows: \begin{equation*} \Delta(r,s) = \min_{k \in \ensuremath{\mathbb{Z}}} |r - s + k| = \min\Paren{r - s - \floor{r-s}, \, \ceil{r-s} - (r-s)}~. \end{equation*} Intuitively, this corresponds to mapping the real line to the unit circle by identifying all integer points with each other, and measuring the distance between two points on the resulting $1$-dimensional torus. Thus, an $n$-qubt unitary $U$ is stable if all of its eigenvalues are of the form $e^{2 \pi i \theta}$ where $\Delta(\theta, 0) \ge 2^{-3n}$. \subsubsection{Proof of \texorpdfstring{\cref{lem:helper-7p1}}{Lemma 7.3} when \texorpdfstring{$U_n$}{Un} is stable} The proof is organized as follows. First we review the well-known \emph{phase estimation algorithm}. Then, using the phase estimation algorithm, we define and analyze a sequence of quantum circuits $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ which are used to define both $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ and $f$. More specifically, we define $\ket{\psi_n}$ as the output state of $C_n$ when $C_n$ accepts, and $f(1^n)$ as $2^n$ times the approximation of the acceptance probability of $C_n$ obtained using \cref{tomog-0}. Then we prove that $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ is in \cc{statePSPACE}\xspace. Finally we prove that $f$ satisfies the required properties. \paragraph{The phase estimation algorithm.} For an $n$-qubit unitary $U$ and number $m \in \ensuremath{\mathbb{N}}$, we denote by $\alg{PE}^{(U,m)}$ the instance of the phase estimation algorithm that acts on an $n$-qubit register $\mathsf A$ (the ``eigenvector register") and an $m$-qubit register $\mathsf B$ (the ``eigenvalue register") and makes oracle calls to $U_{\mathsf A}$ controlled on the content of $\mathsf B$. If $\ket v$ is an eigenvector of $U$ with eigenvalue $e^{2\pi i \theta}$, then \begin{equation*} \alg{PE}^{(U,m)} \ket{v}_{\mathsf A} \ket{0^m}_{\mathsf B} = \ket{v}_{\mathsf A} \ket\eta_{\mathsf B} \end{equation*} for some state $\ket\eta$ (depending on $\ket v, U, m$), such that if $r \in \D m$ denotes the outcome of a standard-basis measurement of $\ket\eta$ then \begin{equation} \label{eq:pe} \PR{\Delta(r,\theta) \ge \varepsilon} \le O\Paren{2^{-m} / \varepsilon} \end{equation} for all $\varepsilon>0$~\cite[Chapter 5]{nielsen2000quantum}. Let $m(n) = 9n$ and $P_n = \alg{PE}^{\Paren{U_n, m(n)}}$. Since $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, the sequence $(P_n)_{n \in \ensuremath{\mathbb{N}}}$ is also space-uniform, as can be seen by inspection of the phase estimation algorithm. \paragraph{The circuit $C_n$ and its properties.} \begin{algorithm} \caption{The circuit $C_n$} \label{alg:Cn} \begin{algorithmic}[1] \State Initialize $n$-qubit registers $\mathsf A$ and $\mathsf B$ to the maximally entangled state $\ket{\Phi_n}_{\mathsf{AB}} = 2^{-n/2} \sum_{x \in \cube n} \ket{x}_{\mathsf A} \ket{x}_{\mathsf B}$. \State Initialize an $m(n)$-qubit register $\mathsf C$ to $\ket{0^{m(n)}}$, and apply the phase estimation circuit $P_n$ with eigenvector register $\mathsf A$ and eigenvalue register $\mathsf C$. \hlabel{line:Cnl2} \State Create a one-qubit register $\mathsf D$, and controlled on the state $\ket r$ of $\mathsf C$ where $r \in \D{m(n)}$, construct the state $\sqrt{r} \ket0 + \sqrt{1-r} \ket1$ in $\mathsf D$. \hlabel{line:Cnl3} \State Measure $\mathsf D$ in the standard basis. If the measurement outcome is 0 then accept and output $\mathsf{ABC}$, otherwise reject. \end{algorithmic} \end{algorithm} The circuit $C_n$ is described in \cref{alg:Cn}; clearly $(C_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform. For a fixed $n \in \ensuremath{\mathbb{N}}$, when analyzing $C_n$ we use the following notation. Let \begin{equation*} U_n = \sum_{j=1}^{2^n} e^{2\pi i \theta_j} \kb{v_j} \end{equation*} be an eigendecomposition of $U_n$ where $0 \le \theta_j < 1$ for all $j$. (The phases $e^{2 \pi i \theta_j}$ and eigenvectors $\ket{v_j}$ depend on $n$, but for notational clarity we leave this dependence implicit.) Let \begin{align*} &t = \sum_j \theta_j, &\rho = \frac1t \sum_j \theta_j \kb{v_j} \end{align*} respectively denote the canonical evolution time and canonical program state for $U_n$. Let $\ket{\eta_j} = \sum_{r \in \D{m(n)}} \alpha_{jr} \, \ket{r}$ be the $m(n)$-qubit state such that \begin{equation*} P_n \ket{v_j} \ket{0^{m(n)}} = \ket{v_j} \ket{\eta_j}~. \end{equation*} Let $\ket{\overline v_j}$ denote the element-wise complex conjugate of $\ket{v_j}$ with respect to the standard basis. It is easily verified\footnote{E.g.\ using the fact that $(V \otimes V^*) \ket{\Phi_n} = \ket{\Phi_n}$ for all unitaries $V$ (in particular $V = \sum_j \ketbra{v_j}{j}$), where $V^*$ denotes the element-wise complex conjugate of $V$.} that \begin{equation*} \ket{\Phi_n} = 2^{-n/2} \sum_{j \in [2^n]} \ket{v_j} \ket{\overline v_j}~. \end{equation*} Therefore the state after \cref{line:Cnl2} is $2^{-n/2} \sum_j \ket{v_j} \ket{ \overline v_j} \ket{ \eta_j}$, and so the state after \cref{line:Cnl3} is \begin{equation*} 2^{-n/2} \sum_{\mathclap{j \in [2^n], r \in \D{m(n)}}} \alpha_{jr} \cdot \ket{v_j} \ket{ \overline v_j} \ket{r} \otimes (\sqrt{r} \ket0 + \sqrt{1-r} \ket1)~. \end{equation*} Define \begin{align*} &\wt\theta_j = \sum_{\mathclap{r \in \D{m(n)}}} |\alpha_{jr}|^2 \, r, &\wt t = \sum_j \wt \theta_j~. \end{align*} Then \begin{equation} \label{eq:cn_acc_prob} \pr{C_n \text{ accepts}} = 2^{-n} \cdot \wt t, \end{equation} and when accepting $C_n$ outputs the state \begin{equation*} \ket{\psi_n} = \wt{t}^{-1/2} \, \sum_{\mathclap{j \in [2^n], r \in \D{m(n)}}} \alpha_{jr} \cdot \sqrt{r} \cdot \ket{v_j} \ket{ \overline v_j} \ket{ r}~. \end{equation*} The reduced state on the first $n$ qubits of $\ket{\psi_n}$ is thus \begin{equation*} \wt\rho = \frac1{\wt t} \sum_j \wt\theta_j \kb{v_j}~. \end{equation*} Now we argue that \begin{equation} \label{eq:theta-approx} \left|\wt\theta_j - \theta_j \right| \le 2^{-4n} \end{equation} for all $j$, provided $n$ is sufficiently large. Set $\varepsilon = \frac12 \cdot 2^{-4n}$. If $r$ denotes the outcome of a standard-basis measurement of $\ket{\eta_j}$, then \begin{align*} \left| \wt\theta_j - \theta_j \right| &= | \mathbb{E}[r] - \theta_j | = |\mathbb{E}[r - \theta_j]| \le \mathbb{E}|r - \theta_j| \\ &= \mathbb{E}[|r-\theta_j| \cdot \Ind{|r - \theta_j| \le \varepsilon}] + \mathbb{E}[|r-\theta_j| \cdot \Ind{|r-\theta_j| > \varepsilon}] \\ &\le \varepsilon + \pr{|r-\theta_j| >\varepsilon} =\varepsilon + \PR{\Delta(r,\theta_j) > \varepsilon}, \end{align*} where the last equality holds because $U_n$ is stable and $\varepsilon < 2^{-3n}$. By \eqref{eq:pe} it follows that \begin{equation*} \left| \wt\theta_j - \theta_j \right| \le \varepsilon + O\Paren{2^{-m(n)} / \varepsilon} = \varepsilon + O\Paren{2^{-5n}} \le 2\varepsilon, \end{equation*} which establishes \eqref{eq:theta-approx}. \paragraph{Proof that $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}}$ is in \cc{statePSPACE}\xspace.} Let $\sigma_n$ denote the output state of the general quantum circuit $D_n$ described in \cref{alg:Dn}, and let $\ell(n) = 2^{4n}$. Observe that $(D_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform. Clearly \begin{equation*} \sigma_n = \pr{C_n \text{ rejects}}^{\ell(n)} \cdot \kb0\cdots 0 + \Paren{1 - \pr{C_n \text{ rejects}}^{\ell(n)}} \cdot \kb{\psi_n}, \end{equation*} so by the convexity of trace distance and \eqref{eq:cn_acc_prob}, \begin{align*} \td(\sigma_n, \psi_n) &\le \pr{C_n \text{ rejects}}^{\ell(n)} \td(0\cdots 0, \psi_n) \le \Paren{1 - 2^{-n} \wt t}^{\ell(n)} \le \exp\Paren{-2^{-n} \cdot \wt t \cdot \ell(n)} \\ &= \exp\Paren{-2^{3n} \cdot \wt t}~. \end{align*} By \eqref{eq:theta-approx} and the fact that $U_n$ is stable, \begin{equation} \label{eq:ttilb} \wt t = \sum_j \wt \theta_j = \sum_j \Paren{\theta_j - \Paren{\theta_j - \wt \theta_j}} \ge \sum_j (2^{-3n} - 2^{-4n}) \ge \Omega(2^{-2n}), \end{equation} so $\td(\sigma_n, \psi_n) \le \exp\Paren{-\Omega(2^n)} \le \exp\Paren{-n^{\omega(1)}}$ as desired. \begin{algorithm} \caption{The circuit $D_n$} \label{alg:Dn} \begin{algorithmic}[1] \For{$2^{4n}$ times} \State Execute $C_n$. \IIf{$C_n$ accepts} \Return the output state of $C_n$ and \textbf{abort}. \EndIIf \EndFor \State \Return $\ket0\cdots 0$. \end{algorithmic} \end{algorithm} \paragraph{The function $f$ and its properties.} Let $C'_n$ be identical to $C_n$ except that $C'_n$ only outputs an accept/reject bit (as opposed to also outputting registers $\mathsf{ABC}$). By \cref{tomog-0} applied to $(C'_n)_{n \in \ensuremath{\mathbb{N}}}$, and \eqref{eq:cn_acc_prob}, there exists a $\class{PSPACE}$-computable function $g$ such that for all $n \in \ensuremath{\mathbb{N}}$ it holds that $g(1^n) \in \D{\mathrm{poly}(n)}$ and \begin{equation*} \left| g(1^n) - 2^{-n} \wt t \right| \le 2^{-4n}~. \end{equation*} Let $f(1^n) = 2^n g(1^n)$, and observe that $f$ is computable in $\class{PSPACE}$ (since $g$ is) and that \begin{equation} \label{eq:sttil} \left|f(1^n) - \wt t \right| = 2^n \left| g(1^n) - 2^{-n} \wt t \right| \le 2^{-3n}~. \end{equation} By \eqref{eq:theta-approx}, \eqref{eq:sttil} and the triangle inequality, \begin{equation*} |f(1^n) - t| \le \left| f(1^n) - \wt t \right| + \left| \wt t - t \right| \le 2^{-3n} + \sum_j \left| \wt \theta_j - \theta_j \right| \le 2^{-3n} + 2^n \cdot 2^{-4n} = 2 \cdot 2^{-3n}, \end{equation*} so $f(1^n) \le t + e^{-\Omega(n)}$ as required. Fixing $n$, all that remains is to prove that $\wt\rho$ is a program state for $U = U_n$ with evolution time $f = f(1^n)$ and error $e^{-\Omega(n)}$. In other words, given an arbitrary $n$-qubit state $\ket\phi$, we would like to prove that \begin{equation} \label{eq:fin-goal} \td\Paren{U \phi \adj U, \, \wt U \phi \adj{\wt U}} \le e^{-\Omega(n)} \end{equation} for \begin{equation*} \wt U = \exp\Paren{2\pi i \cdot f \cdot \wt\rho} = \sum_j \exp\Paren{2\pi i \cdot f \wt\theta_j / \wt t} \kb{v_j}~. \end{equation*} By \eqref{eq:td-fid2}, \begin{equation*} \td\Paren{U \phi \adj U, \, \wt U \phi \adj{\wt U}} \le \Norm{U\ket\phi - \wt U \ket\phi} \le \Norm{U - \wt U}_{\mrm{op}}~. \end{equation*} Since $\ket{v_1}, \dotsc, \ket{v_{2^n}}$ are orthogonal and the operator norm equals the largest singular value, \begin{align*} \Norm{U - \wt U}_{\mrm{op}} &= \Norm{\sum_j \Paren{\exp\Paren{2\pi i \cdot \theta_j} - \exp\Paren{2\pi i \cdot f \wt\theta_j / \wt t}} \kb{v_j}}_{\mrm{op}} \\ &= \max_j \left| \exp\Paren{2\pi i \cdot \theta_j} - \exp\Paren{2\pi i \cdot f \wt\theta_j / \wt t} \right| \\ &\le 2\pi \max_j \left| \theta_j - f \wt\theta_j / \wt t \right|, \end{align*} where the last inequality is by \eqref{eq:integral}. Finally, for all $j$, \begin{equation*} \left| \theta_j - \frac{f \wt\theta_j} {\wt t} \right| = \left| \frac{\theta_j \Paren{\wt t - f} + f \Paren{\theta_j - \wt \theta_j}} {\wt t} \right| \le \frac{\theta_j \left|\wt t - f\right| + f \left|\theta_j - \wt\theta_j \right|} {\left| \wt t\right|} \le \frac{\left|\wt t - f \right| + 2^n \left|\theta_j - \wt\theta_j \right|} {\left| \wt t\right|}, \end{equation*} and by \eqref{eq:theta-approx}, \eqref{eq:ttilb}, \eqref{eq:sttil} it holds that \begin{equation*} \frac{\left|\wt t - f \right| + 2^n \left|\theta_j - \wt\theta_j \right|} {\left| \wt t\right|} \le O\Paren{\frac{2^{-3n} + 2^n \cdot 2^{-4n}} {2^{-2n}}} \le e^{-\Omega(n)} \end{equation*} from which \eqref{eq:fin-goal} follows. \subsubsection{Proof of \texorpdfstring{\cref{lem:helper-7p1}}{Lemma 7.3} in the general case} Again, given $n$ let $U_n = \sum_{j=1}^{2^n} e^{2\pi i \theta_j} \kb{v_j}$ be an eigendecomposition of $U_n$ where $0 \le \theta_j < 1$ for all $j$. We now consider the case where $U_n$ may not be stable for all $n$. To remedy this, we reduce to the stable case via the following claim: \begin{clm} \label{clm:712} There exists a $\class{PSPACE}$-computable function $\phi$ such that for all $n \in \ensuremath{\mathbb{N}}$ it holds that $\phi(1^n) \in \D{\mathrm{poly}(n)}, \phi(1^n) \le O\Paren{2^{-2n}}$ and the unitary $e^{2 \pi i \phi(1^n)} U_n$ is stable. \end{clm} First we prove \cref{lem:helper-7p1} assuming \cref{clm:712}, and then we prove \cref{clm:712}. \begin{proof}[Proof of \cref{lem:helper-7p1} assuming \cref{clm:712}] Let $U_n' = e^{2 \pi i \phi(1^n)} U_n$. The family $(U_n')_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, because $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform and $\phi(1^n)$ is $\class{PSPACE}$-computable.\footnote{Technically, the phase $\exp\Paren{-2\pi i \phi \Paren{1^n}}$ may not be implementable exactly using our assumed gate set; however it can be approximated with exponentially small error that does not alter the analysis. For clarity we assume that the phase $\exp\Paren{-2\pi i \phi \Paren{1^n}}$ can be implemented exactly.} Since $U_n'$ is furthermore stable for all $n$, by the special case of \cref{lem:helper-7p1} proved above there exists \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item a $\class{PSPACE}$-computable function $f$ such that $f(1^n) \in \D{\mathrm{poly}(n)}[2^n]$ and $f(1^n) \leq t_n' + e^{-\Omega(n)}$, where $t_n'$ is the canonical evolution time for $U'_n$, \item a sequence $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, \end{itemize} such that for all $n$ the reduced state of $\ket{\psi_n}$ on the first $n$ qubits is a program state for $U'_n$ with evolution time $f(1^n)$ and error $e^{-\Omega(n)}$. Since $U_n'$ and $U_n$ differ only by an overall phase, the reduced state of $\ket{\psi_n}$ on the first $n$ qubits is also a program state for $U_n$ with evolution time $f(1^n)$ and error $e^{-\Omega(n)}$. Finally, letting $t_n = \sum_j \theta_j$ denote the canonical evolution time for $U_n$, we have \begin{equation*} t_n' = \sum_j (\theta_j + \phi(1^n) - \ceil{\theta_j + \phi(1^n)}) \le \sum_j (\theta_j + \phi(1^n)) = \sum_j \theta_j + 2^n \cdot \phi(1^n) \le t_n + 2^n \cdot O\Paren{2^{-2n}}, \end{equation*} so $f(1^n) \le t_n' + e^{-\Omega(n)} \le t_n + e^{-\Omega(n)}$ as desired. \end{proof} Now we prove \cref{clm:712}. The function $\phi$ is defined relative to the circuit $E_n$ described in \cref{alg:En}. Here, $(P_n)_{n \in \ensuremath{\mathbb{N}}}$ denotes the family of phase estimation circuits (like described in the proof of the stable case of \cref{lem:helper-7p1}), where the eigenvalue register has $m(n)$ qubits for a sufficiently large polynomial $m$ to be specified later. Given an implicit parameter $n$, let $\delta = 2^{-3n}$ and $\varepsilon = 2 \cdot 2^{-3n}$. \begin{algorithm} \caption{The circuit $E_n$} \label{alg:En} \begin{algorithmic}[1] \Require $r \in \D{m(n)}$ \State Initialize $n$-qubit registers $\mathsf A$ and $\mathsf B$ to the maximally entangled state $\ket{\Phi_n}_{\mathsf{AB}} = 2^{-n/2} \sum_{x \in \cube n} \ket{x}_{\mathsf A} \ket{x}_{\mathsf B}$. \State Initialize an $m(n)$-qubit register $\mathsf C$ to $\ket{0^{m(n)}}$, and apply the phase estimation circuit $P_n$ with eigenvector register $\mathsf A$ and eigenvalue register $\mathsf C$. \hlabel{line:Enl2} \State Measure $\mathsf C$ in the standard basis, and let $s \in \D{m(n)}$ denote the measurement outcome. \State If $\Delta(s,-r) > \varepsilon$ then accept, otherwise reject. \end{algorithmic} \end{algorithm} Let $2^{-n/2} \sum_{j \in [2^n]} \ket{v_j} \ket{\overline v_j} \ket{\eta_j}$ denote the state of the circuit after \cref{line:Enl2} (where $\ket{v_j}, \ket{\overline v_j}, \ket{\eta_j}$ are defined as in the analysis of \cref{alg:Cn}). Let $s_j \in \D{m(n)}$ denote the outcome of a standard-basis measurement of $\ket{\eta_j}$; then \begin{equation*} \pr{\text{$E_n(r)$ rejects}} = \mathbb{E}_{j \sim [2^n]} \pr{\Delta(s_j,-r) \le \varepsilon}~. \end{equation*} Since $(P_n)_{n \in \ensuremath{\mathbb{N}}}$ is space-uniform, so is $(E_n)_{n \in \ensuremath{\mathbb{N}}}$, so by \cref{tomog-0} and the above equality there exists a $\class{PSPACE}$-computable function $h$ such that for all $n \in \ensuremath{\mathbb{N}}, r \in \D{m(n)}$ it holds that $h(1^n, r) \in \D{\mathrm{poly}(n)}$ and \begin{equation} \label{eq:h} \left| h(1^n, r) - \mathbb{E}_{j \sim [2^n]} \pr{\Delta(s_j, -r) \le \varepsilon} \right| < 2^{-2n}~. \end{equation} Define \begin{equation} \label{eq:phi-def} \phi(1^n) = \min \left \{r \in \D{m(n)}: h(1^n, r) < 2 \cdot 2^{-2n} \right \}~. \end{equation} (It is not immediately clear that $\phi(1^n)$ is well defined, i.e.\ that there exists $r \in \D{m(n)}$ such that $h(1^n, r) < 2 \cdot 2^{-2n}$, but we will see that this is the case.) First we prove that $\phi(1^n)$ is well defined, at most $9 \cdot 2^{-2n}$, and $\class{PSPACE}$-computable, and then we prove that $U_n' = e^{2 \pi i \phi(1^n)} U_n$ is stable, thus establishing \cref{clm:712}. \begin{proof}[Proof that $\phi(1^n)$ is well-defined, at most $9 \cdot 2^{-2n}$, and $\class{PSPACE}$-computable.] We first show by a counting argument that there exists an $r \in \D{m(n)}$ such that $r \le 9 \cdot 2^{-2n}$ and $\Delta(\theta_j, -r) > 2 \varepsilon$ for all $j$. This holds because on one hand, we have \begin{equation*} \left| \left\{r \in \D{m(n)} \mid r \le 9 \cdot 2^{-2n} \right\} \right| \ge 9 \cdot 2^{m(n) - 2n}~. \end{equation*} On the other hand, we have \begin{align*} &\left| \left\{ r \in \D{m(n)} \mid \exists j: \Delta(\theta_j,-r) \le 2 \varepsilon \right\} \right| \leq \sum_{j=1}^{2^n} \left| \left\{ r \in \D{m(n)} \mid \Delta(\theta_j, -r) \le 2 \varepsilon \right\} \right| \\ &\qquad \qquad \leq \sum_{j=1}^{2^n} \Paren{2 \cdot 2\varepsilon \cdot 2^{m(n)} + 1} = 8 \cdot 2^{m(n) - 2n} + 2^n < 9 \cdot 2^{m(n) - 2n}, \end{align*} where in the last inequality we take $m$ to be a sufficiently large polynomial. This implies the existence of such an $r$. We now prove that $h(1^n, r) < 2 \cdot 2^{-2n}$, which implies that $\phi(1^n)$ is well defined and at most $9 \cdot 2^{-2n}$ as required. By \eqref{eq:h} it holds that \begin{equation*} h(1^n, r) < \mathbb{E}_{j \sim [2^n]} \pr{\Delta(s_j, -r) \le \varepsilon} + 2^{-2n}, \end{equation*} so it suffices to prove that $\pr{\Delta(s_j,-r) \le \varepsilon} < 2^{-2n}$ for all $j$. By the definition of $r$ and the triangle inequality for $\Delta$, the event $\Delta(s_j, -r) \le \varepsilon$ implies the event \begin{equation*} 2 \varepsilon < \Delta(\theta_j, -r) \le \Delta(\theta_j, s_j) + \Delta(s_j, -r) \le \Delta(\theta_j, s_j) + \varepsilon, \end{equation*} i.e.\ $\Delta(\theta_j, s_j) > \varepsilon$. So by \eqref{eq:pe}, \begin{equation*} \pr{\Delta(s_j,-r) \le \varepsilon} \le \pr{\Delta(\theta_j, s_j) > \varepsilon} \le O\Paren{2^{-m(n)} / \varepsilon} < 2^{-2n}, \end{equation*} where the last inequality follows by taking $m$ to be a sufficiently large polynomial. Finally, since $h$ is $\class{PSPACE}$-computable, $\phi$ is as well. \end{proof} \begin{proof}[Proof that $U_n'$ is stable.] Since $U_n'$ has eigenvalues $\exp \Paren{2\pi i (\theta_j + \phi(1^n))}$, the condition that $U_n'$ is stable is equivalent to the condition that $\Delta(\theta_j + \phi(1^n),0) \geq \delta$ for all $j \in [2^n]$, which in turn is equivalent to $\Delta(\theta_j,-\phi(1^n)) \geq \delta$ for all $j$. Suppose for contradiction that there exists a $j^*$ such that $\Delta(\theta_{j^*},-\phi(1^n)) < \delta$. By the definitions of $h$ and $\phi(1^n)$ (i.e.\ \eqref{eq:h} and \eqref{eq:phi-def}), we have \begin{align*} \pr{\Delta(s_{j^*}, -\phi(1^n)) \le \varepsilon} &\le 2^n \, \mathbb{E}_{j \sim [2^n]} \pr{\Delta(s_j, -\phi(1^n)) \le \varepsilon} \le 2^n \Paren{2^{-2n} + h(1^n, \phi(1^n))} \\ &\le 2^n \Paren{2^{-2n} + 2 \cdot 2^{-2n}} = e^{-\Omega(n)}. \end{align*} On the other hand, \begin{align*} \pr{\Delta(s_{j^*},-\phi(1^n)) > \varepsilon} &\le \pr{\Delta(s_{j^*}, \theta_{j^*}) + \Delta(\theta_{j^*},-\phi(1^n)) > \varepsilon} \le \pr{\Delta(s_{j^*}, \theta_{j^*}) > \varepsilon - \delta} \\ &= \pr{\Delta(s_{j^*}, \theta_{j^*}) > 2^{-3n}} \le O\Paren{2^{-m(n) + 3n}} \le e^{-\Omega(n)}, \end{align*} where the first inequality is by the triangle inequality for $\Delta$, the second is by the definition of $j_*$, the third is by the definitions of $\delta$ and $\varepsilon$, the fourth is by \eqref{eq:pe}, and the last is by taking $m$ to be a sufficiently large polynomial. Therefore \begin{equation*} 1 = \pr{\Delta(s_{j^*}, -\phi(1^n)) \le \varepsilon} + \pr{\Delta(s_{j^*},-\phi(1^n)) > \varepsilon} \le e^{-\Omega(n)}, \end{equation*} which gives the desired contradiction. \end{proof} \subsubsection{Proof of \texorpdfstring{\cref{thm:main-7p1}}{Theorem 7.2}} By \cref{lem:helper-7p1} and the fact that $U_n$ has canonical evolution time at most $\mathrm{poly}(n)$, there exists \begin{itemize}[leftmargin=*] \renewcommand\labelitemi{--} \item a $\class{PSPACE}$-computable function $f$ such that $f(1^n) \in \D{\mathrm{poly}(n)}[\mathrm{poly}(n)]$ for all $n$, and \item a sequence $(\ket{\psi_n})_{n \in \ensuremath{\mathbb{N}}} \in \cc{statePSPACE}\xspace$, \end{itemize} such that for all $n$ the reduced state $\rho_n$ on the first $n$ qubits of $\ket{\psi_n}$ is a program state for $U_n$ with evolution time $f(1^n)$ and error $e^{-\Omega(n)}$. Assume without loss of generality that $q(n) \ge n$. Let $k$ be a sufficiently large polynomial to be chosen later, and let \begin{equation*} \ket{\varphi_n} = \ket{\psi_n}^{\otimes k(n)} \otimes \ket{f(1^n)}~. \end{equation*} It is easy to see that $(\ket{\varphi_n})_{n \in \ensuremath{\mathbb{N}}}$ is in \cc{statePSPACE}\xspace, so by \cref{thm:prim-result} there exists a $\stateQIP{c',s'}$ verifier $V$ for $(\ket{\varphi_n})_{n \in \ensuremath{\mathbb{N}}}$ where \begin{align*} &c'(n) = \exp(-q(n)), &s'(n,\delta) = \exp \Paren{e^{-q(n)} - q(n) \cdot \delta^4}~. \end{align*} Let $V_n$ be the $n$'th quantum verifier circuit in $V$ (i.e.\ the one for synthesizing $\ket{\varphi_n}$). Given $n$, let $\mathsf R$ be the register such that \begin{equation*} \mathrm{tr}_{\mathsf R} (\varphi_n) = \rho_n^{\otimes k(n)} \otimes \kb{f\Paren{1^n}}~. \end{equation*} The following describes a $\cc{unitaryQIP}[c,s]$ verifier for $(U_n)_{n \in \ensuremath{\mathbb{N}}}$ as applied to an $n$-qubit input state $\ket\theta$: Simulate $V_n$, if $V_n$ rejects then reject, and if $V_n$ accepts and outputs a state $\sigma$ then accept and output $\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma))$. (This verifier runs in polynomial time because $V$ and $\alg{LMR}$ do.) Assume for simplicity that $n$ is sufficiently large. First we argue that \begin{equation} \label{eq:asdf-sec7} \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), U_n \theta \adj U_n} \le \td(\sigma, \varphi_n) + \frac1{5 q(n)^2} \end{equation} for all $n$-qubit states $\ket\theta$ and all mixed states $\sigma$ on the same number of qubits as $\varphi_n$; we will use \eqref{eq:asdf-sec7} in the proofs of both completeness and soundness. Fix $n$, write $f = f(1^n), \rho = \rho_n$ etc.\ and let $W = \exp(2\pi i \cdot f \cdot \rho)$. By the triangle inequality, \begin{align*} &\td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), U \theta \adj U} \le \td \Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), \alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\varphi))} \\ & \qquad \qquad \qquad + \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\varphi)), W \theta \adj W} + \td\Paren{W \theta \adj W, U \theta \adj U}~. \end{align*} By the definition of trace distance \begin{equation*} \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), \alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\varphi))} \le \td(\sigma, \varphi), \end{equation*} by the definition of $\mathsf R$ and \cref{thm:lmr} \begin{equation*} \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\varphi)), W \theta \adj W} = \td\Paren{\alg{LMR}(\theta, \rho^{\otimes k}, f), W \theta \adj W} \le O(f^2/k), \end{equation*} and since $\rho$ is a program state for $U$ with evolution time $f$ and error $e^{-\Omega(n)}$ \begin{equation*} \td\Paren{W \theta \adj W, U \theta \adj U} \le e^{-\Omega(n)}, \end{equation*} so it follows that \begin{equation*} \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), U \theta \adj U} \le \td(\sigma, \varphi) + O(f^2/k) + e^{-\Omega(n)}~. \end{equation*} Therefore, since $f \le \mathrm{poly}(n)$ there exists a polynomial $k$ such that \eqref{eq:asdf-sec7} holds. Now we prove completeness. An example of an honest prover is one that simulates an honest prover in the $\stateQIP{c',s'}$ protocol. Then $V_n$ accepts with probability 1 and outputs a state $\sigma$ such that $\td(\sigma, \varphi_n) \le c'(n) \le e^{-\Omega(n)}$, so by \eqref{eq:asdf-sec7} for all $n$-qubit states $\ket \theta$ it holds that \begin{equation*} \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), U_n \theta \adj U_n} \le e^{-\Omega(n)} + \frac1{5q(n)^2} < \frac1{q(n)} = c(n)~. \end{equation*} Finally we prove soundness. Consider an arbitrary prover (which may depend on the verifier's $n$-qubit input state $\ket\theta$), let $\sigma$ denote the output state of $V_n$ conditioned on accepting, and let $\delta = \td\Paren{\alg{LMR}(\theta, \mathrm{tr}_{\mathsf R}(\sigma)), U_n \theta \adj U_n}$. By \eqref{eq:asdf-sec7} and \cref{lem:4p}, \begin{equation*} \td(\sigma, \varphi_n)^4 \ge \delta^4 - \frac45 \cdot \frac1{q(n)^2}, \end{equation*} so \begin{align*} \pr{\text{verifier accepts}} &\le s'(n, \td(\sigma, \varphi_n)) = \exp\Paren{e^{-q(n)} - q(n) \cdot \td(\sigma, \varphi_n)^4} \\ &\le \exp\Paren{e^{-q(n)} - q(n) \cdot \delta^4 + \frac45 \cdot \frac1{q(n)}} \\ &\le \exp\Paren{\frac1{q(n)} - q(n) \cdot \delta^4} = s(n, \delta)~. \qedhere \end{align*} \subsection{Protocol for general unitaries, but with restricted inputs} Let $U = (U_n)_{n \in \ensuremath{\mathbb{N}}}$ denote a family of quantum circuits in \cc{unitaryPSPACE}\xspace, not necessarily with polynomial action (i.e.\ the unitaries can act nontrivially on the entire Hilbert space). We argue that there is a $\cc{unitaryQIP}$ protocol for $U$ provided that the verifier also receives as input a \emph{succinct description} of a polynomial-dimensional subspace $S$ that contains the input state (this was presented as \Cref{cor:poly-input-intro} in the introduction). By succinct description, we mean that there is a polynomial-space Turing machine $M$ that on input $1^n$, outputs the description of a polynomial-space quantum circuit $R$ that on input $\ket{0} \otimes \ket{\phi}$ outputs $\ket{0} \otimes (I - \Pi_S) \ket{\phi} + \ket{1} \otimes \Pi_S \ket{\phi}$ (for all $n$-qubit states $\ket\phi$) where $\Pi_S$ is the projection onto $S$. In other words, the Turing machine $M$ succinctly describes a circuit $R$ that ``recognizes'' states from the subspace $S$. The protocol for applying $U$ essentially reduces to using the protocol for polynomial-action unitary families from \cref{sec:poly-action}. Consider an input $(1^n, \ket{\phi}, M)$, where $\ket{\phi}$ is an $n$-qubit state and $M$ is a succinct description of a polynomial-space quantum circuit $R$ that recognizes a polynomial-dimensional subspace $S$ that contains $\ket{\phi}$. Let $S^\prime$ be the $(n+1)$-qubit subspace spanned by $\ket\varphi \ket0$ for $\ket\varphi$ in $S$, and by $\ket\varphi \ket1$ for $\ket\varphi$ in the subspace $U_n S$. Let $V$ be the $(n+1)$-qubit unitary defined by $V \ket\varphi \ket0 = U_n \ket\varphi \otimes \ket1$ and $V \ket\varphi \ket1 = \adj U_n \ket\varphi \otimes \ket0$ (for all $n$-qubit states $\ket\varphi$) and observe that $S^\prime$ is closed under action by $V$. Furthermore, since $R$ and $U_n$ are polynomial-space quantum circuits, there clearly exists a polynomial-space quantum circuit $R^\prime$ that recognizes $S^\prime$. The verifier can run the protocol to synthesize the unitary $V$ (on an input in $S^\prime$) which acts as $U_n \otimes I$ on the subspace $S \otimes \ket0$. The key to this reduction is to show that the program state corresponding to the unitary $V$ can be generated in quantum polynomial space. We sketch an argument below. The same phase-estimation-based approach can be used, except before applying phase estimation to the $n$-qubit maximally entangled state $\ket{\Phi}$, an ancilla $\ket{0}$ qubit is adjoined and the polynomial-space circuit $R^\prime$ is run on the first $n+1$ qubits of $\ket{0} \otimes \ket{\Phi}$. Then, the first qubit is measured and the circuit post-selects on it being in the state $\ket{1}$. In other words, the maximally entangled state $\ket{\Phi}$ is projected to be supported only on the subspace $S^\prime$, and the resulting entangled state is \[ \ket{\Phi_{S}^\prime} = \frac{1}{\sqrt{\dim S^\prime}} \sum_k \ket{w_k} \otimes \ket{w_k^*} \] where $\{ \ket{w_k} \}$ is a basis for the subspace $S^\prime$ in which $V$ is diagonal (i.e.\ they are eigenvectors of $V$). All other steps of \Cref{alg:Cn}, \Cref{alg:Dn}, and \Cref{alg:En} are the same. Thus, the resulting program states represent the unitary $V$ restricted to the subspace $S^\prime$, and thus are program states for $V$. These program states can be generated in polynomial space because the post-selection probability of projecting $\ket{\Phi}$ to $\ket{\Phi_S}$ is at least $2^{-n}$ (assuming that the subspace $S$ is at least one-dimensional).
\section{Introduction} Cricket is a bat and ball game played between two teams. This was found in early 16th century. There are different formats in cricket which are the tests which consists of two innings for each team and played in five days, ODI which gives each team 50 overs to bat and finishes in one day and T20 format which gives 20 overs each for team. T20 was introduced in 2005 and became much popular among various audience. The main reasons were the small duration of the match and the rules which are more favourable to batsmen compared to other formats. Indian Premier League (IPL) is such a cricket event where different teams based on different cities in India compete each other. IPL is based on the T20 format of cricket. IPL started in 2008 and have been a celebration among cricket followers around the globe. IPL has been earning lot of profit across the years.Players from different countries have been playing for these teams which increases the entertainment value as well as quality of cricket. In the latest IPL season(2020) BCCI earned a total profit of Rs 4000 crore. Along with increasing popularity of IPL, the analysis of players as well as teams across various conditions have became important among various sections. Due to various factors like money, fan following, broadcasting, the entertainment value from matches is very important. This can be dependent on team selection, historical data of ground as well as the players, head to head to matches etc. This analysis can be used to analyse the effect of each player in a team combination with respect to opposition as well as the ground. Another similar use case of the analysis is in betting. We can find out fantasy points for each players from the model and provide good combinations to use in the betting platforms. As the entertainment value of the match highly depends on the batting performances, this analysis can help the pitch curators on making the decisions which will help them to create a bigger fan following as well in better marketing. An inherent limitation to the current machine learning literature for sports data analysis is the lack of feature representations for players that contains necessary information on inter-player and inter-team relations. In this study we explore the use of vector embedding representations and the possible mediums to evolve them efficiently. Since the task has an inherent data scarcity (in comparison to the natural scenarios in which vector embeddings are used widely), we formulate a siamese-network\cite{schroff2015facenet} based representational learning framework that could effectively handle these limitations. \section{Related Work}\label{Related Work} Data analytics is used in various aspects of cricket such as run prediction, player performance evaluation, team management, strategy formation etc.. There is a great demand for those algorithms that can perform the above tasks. IPL is a cricket event which is short in format and a lot of money involved. In India the followers of cricket are also followers of statistical records. Thus the analysis of a league like IPL becomes more important. The following are some studies related to cricket which are reported in literature. \cite{ref2}This article is concerned with the simulation of one-day cricket matches. Given that only a finite number of outcomes can occur on each ball that is bowled, a discrete generator on a finite set is developed where the outcome probabilities are estimated from historical data involving one-day international cricket matches. The simulator allows a team to easily investigate the results of making changes to the batting and bowling orders. \cite{ref1}This paper presents a mathematical model that can be used for prediction of the results of the matches prior to the match based on the knowledge of past matches, playing eleven and the toss result. In this work, three different models have been constructed based on three approaches. Machine learning techniques have been utilized with advantage for this purpose. The outcome of a match is predicted by taking a majority vote of these three models. \cite{ref3}In this paper, prediction of the performance of players as how many runs will each batsman score and how many wickets will each bowler take for both the teams is performed. Both the problems are targeted as classification problems where number of runs and number of wickets are classified in different ranges. Random Forest turned out to be the most accurate classifier for both the data-sets with an accuracy of 90.74\% for predicting runs scored by a batsman and 92.25\% for predicting wickets taken by a bowler. \cite{lamsal2020predicting}A multivariate regression based solution is proposed to calculate points for each player in the league and the overall weight of a team is computed based on the past performance of the players who have appeared most for the team. Multi-layer Perceptron model gave the highest accuracy of 71.66\% in predicting the outcome of the match. \cite{ref5}Proposed a novel Recurrent Neural Network model which can predict the win probability of a match at regular intervals given the ball-by-ball statistics. \pagebreak \section{The Proposed Method}\label{Method} We split our overall methodology into three sub-components, initially we learn the Embedding representations of players independently of other features. Next we use the learned embeddings from the model along with other commonly available pre-match data features to predict the overall run-rate. Finally we include a separate branch in the network to analyse the corresponding pre-match pitch report to investigate it's impact on overall prediction metrics. \subsection{Player Embedding Model}\label{player_emebed_Model} The model composes of two separate embedding maps that represents the batting and bowling characteristics of each player. The embedding vectors are a normalized set of size 64. We mean-pool the embeddings from each map and pass the same through a fully connected layer with ReLU activation so as to obtain a latent representation of each team's characteristics. A joint representation of the batting and bowling team corresponding to an innings is obtained by concatenating the latent vectors so obtained from each branch. The joint representation so obtained is passed through a series of fully connected layers (with ReLU non-linearity) attached to a prediction or representational head. The player embedding model is trained independently so as to avoid induced bias from other data features. \begin{figure}[!htb] \centering \includegraphics[width=\textwidth]{NN_Design__IPL____Embed.png} \caption{\textbf{Complete architecture of the player embedding model.} The final layer of the given model could change with the training setting used.} \label{fig:player_embed} \end{figure} \subsection{Prediction Model}\label{Pred_model} Since player lineups aren't the only deciding factor in predicting match metrics, we investigate the impact of other commonly available match and timeline features on match metrics. In this section we build a prediction model that bases it's prediction on the analysis of joint representations formed from the latent vectors formed from commonly available pre match data and player representations. The bowling and batting embedding matrices used are obtained from the player embedding model \ref{player_emebed_Model}, the embedding representations are frozen during training. We increase the no of fully connected layers in each branch that processes the player embeddings as compared to the player embedding model, the same is done to evaluate the generality of the embedding representations formed. \begin{figure}[!htb] \centering \includegraphics[width=1\textwidth, height=13cm]{NN_Design__IPL____Predict1.png} \caption{\textbf{Complete Architecture of the Prediction model}. The model is used as a medium for evaluating the effectiveness of the overall formulation of using embedding representations} \label{fig:prediction_model_1} \end{figure} \subsection{Prediction Model with pitch reports}\label{Pred_model_pitch} Pitch reports are an essential source of pre-match information, that could prove vital in effective overall modelling . To evaluate the impact of the same we build a separate model which incorporates information from pitch reports into the joint representations formed. The pitch reports are prepossessed using a sentence vectorizer prior to model input. \begin{figure}[!htb] \centering \includegraphics[width=1\textwidth, height=15cm]{NN_Design__IPL____Predict2.png} \caption{\textbf{Complete Architecture of the Prediction model with pitch reports}. A Joint representation is formed from the concatenation of latent vectors obtained from each of the different data branches.} \label{fig:prediction_model_2} \end{figure} \subsection{Representational Learning} Apart from using the traditional cross-entropy loss to build the classifier, we experiment with a representational learning framework which generates meaningful data representations for classification by latent vector comparisons. The objective function used is the contrastive loss \cite{schroff2015facenet}, the standard form of which is as shown in Equation \ref{eq1}. \begin{equation} L(W, (Y, \vec{X_1}, \vec{X_2})^i) = (1 - Y)L_S(D_W^i) + Y L_D(D_W^i) \label{eq1} \end{equation} \noindent $Y$ is the binary label that indicates if two data samples are acquired from a common category or not and $D_W$ is the parameterized distance function as shown in Equation \ref{eq2}. \begin{equation} D_W(\vec{X_1}, \vec{X_2}) = \left\|G_W(\vec{X_1}) - G_W(\vec{X_2}) \right\|_2 \label{eq2} \end{equation} \noindent For our purposes we choose $D_W$ as the euclidean norm, $L_S$ = $D_W^i$, and $L_D$ as the $min(m - D_W^i, m)$. Where $m$ is the margin parameter. The form of the final loss function is shown in Equation \ref{eq3}. \begin{equation} L(W, (Y, \vec{X_1}, \vec{X_2})^i) = (1 - Y)(D_W^i) + Y (min(m - D_W^i, m)) \label{eq3} \end{equation} \section{Experiments and Results}\label{Results} \subsection{Dataset} \label{Dataset} The data which contains the team lineup, venue, date and run-rate was collected from the official IPL webpage~\cite{iplt20}. It includes the innings wise data from the year 2012 to 2019. sportskeeda.com~\cite{pitch1}, espncricinfo.com~\cite{pitch2} and cricbuzz.com~\cite{pitch3} were the sources for the pitch report data. K-Means clustering~\cite{cluster} was performed on the run rate data to to divide into three classes. Elbow method~\cite{elbow} was used to find the optimal number of classes. Further Hierarchical clustering was done to obtain better class distribution, splitting the majority class into two sub classes. The following figure \ref{fig:picture} shows the average dispersion across different number of clusters. \begin{figure}[!htb] \centering \includegraphics[width=0.8\textwidth, height=6cm]{elbow_curve.png} \caption{\textbf{The Elbow curve obtained for initial clustering}. The optimal initial no of clusters to be used can be infer-ed from the shown elbow curve and can be seen to be = '3'.} \label{fig:picture2} \end{figure} \noindent Four classes were obtained after the hierarchical clustering of overall run rate per innings. The following pie diagram \ref{fig:picture} shows the individual class distributions and the centroid of respective clusters. The dataset so obtained has overall class balance. \begin{figure}[!htb] \centering \includegraphics[width=0.7\textwidth, height=5cm]{dataset.png} \caption{\textbf{Final class distribution}. The centroid of each corresponding class is as marked in the figure} \label{fig:picture} \end{figure} \noindent The testing set is randomly sampled each time during k-fold cross validation and confidence intervals estimations. The overall data distribution used in this study remains invariant. \subsection{Experimental Setup} A separate testing set was created by randomly sampling 10 data points from each run-rate class obtained post hierarchical clustering. We conduct our experiments as two separate settings, Firstly we train the player embedding model by basing it's objective to predict the relevant class using the standard cross entropy loss. The trained set of embeddings so obtained are used as inputs during the training of the prediction model, the objective function used for the same is also cross-entropy. Next we train the embedding model using the contrastive loss to enforce meaningful representations, the embedding matrix so obtained is used to train a the prediction model whose objective is also the minimization of a contrastive loss. For evaluation we perform similarity analysis between the obtained representation of a test data point and the representation matrix corresponding to the train set. Finally for both the settings given above, we add a separate branch of input in the prediction model so as to include the pre-match pitch report data. The pitch report is processed into a representational embedding using a pretrained sentence BERT model \cite{reimers2019sentence}. We thoroughly evaluate the model performance in both settings and the impact pitch-data has in predicting the overall run-rate class. All experiments were conducted in the Pytorch framework with a CUDA backend on NVIDIA Tesla V100 GPU. The prediction model is trained in batch-sizes of 64 using the Adam optimizer. The learning rate used is 10\textsuperscript{-3}, the player and pitch embedding weights are frozen during the training of the prediction models. \pagebreak \subsection{Results} \begin{figure}[!htb] \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\linewidth]{conf_sdl_pitch.png}\\ \subcaption{Confusion matrix with pitch data}\label{fig:a0} \end{minipage}% \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\linewidth]{conf_sdl.png}\\ \subcaption{Confusion matrix without pitch data}\label{fig:b0} \end{minipage} \caption{The shown confusion matrices shown are obtained after training the prediction models till point of divergence using the categorical cross entropy loss.}\label{fig5} \end{figure} \begin{figure}[!htb] \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\linewidth]{conf_rep_pitch.png}\\ \subcaption{Confusion matrix with pitch data}\label{fig:a1} \end{minipage}% \begin{minipage}[b]{0.48\textwidth} \includegraphics[width=\linewidth]{conf_rep.png}\\ \subcaption{Confusion matrix without pitch data}\label{fig:b1} \end{minipage} \caption{The shown confusion matrices shown are obtained after training the prediction models in the representational learning framework for 2000 epochs}\label{fig6} \end{figure} \noindent The training setting that used cross-entropy loss acquired an accuracy of 22.5\% (CI -95\%) when pitch report data was not included (corresponding confusion matrix shown in Figure \ref{fig:b0}), the model that based it's prediction with all of the prior's input and pitch report data achieved an accuracy of 30\% (CI -95\%) (corresponding confusion matrix shown in Figure \ref{fig:a0}). The representational learning framework showed a considerable increase in performance and achieved an accuracy of 90\% (CI -95\%) when pitch report data was not included (corresponding confusion matrix shown in Figure \ref{fig:b1}) and an accuracy of 95\% (CI -95\%) in the model setting that included pitch reports (corresponding confusion matrix shown in Figure \ref{fig:a1}). \section{Discussion}\label{Discussion} The setting that used cross-entropy loss achieved feeble accuracies as compared to the representation learning setting. We speculate the reason for the same being the inability of cross-entropy setting to learn meaningful vector embeddings for player feature representations. The model setting that included the pitch reports showed considerable increase in performance, the same maybe attributed by the similarities captured in the pitch embedding vectors. The cross-assessment of pitch properties could thus be speculated to be crucial for overall score-performance analysis. The prediction inaccuracies in intermediate classes could be associated with the lack of efficient input features to fully represent the match characteristics. \section{Future Works} Although the present work was focused entirely on efficient modeling of player representations we speculate that their might be overall bias to the current setting due to data scarcity. The semantic meanings of the player representations could be analysed and made robust by employing the same for better prediction tasks. We believe that the model architecture could be tuned further, maybe by introducing a convolutional mode of analysis for player embeddings and a relative weighted concatenation for joint representations. \section{Conclusion}\label{Conclusion} In this paper, we proposed a representational learning framework for optimal cricket data analysis. We observe that meaningful data representations could be obtained for players using the same. The performance of prediction models trained using cross entropy objective was proven to be feeble as compared to the proposed framework. We hope our work would act as a motivation for future research using deep-representational framework and learnable input representations for sports analytics tasks. \printbibliography \section*{Code Availability} The custom Python based code used in this study is available from the corresponding author upon reasonable request. Any commercial use including the distribution, sale, lease, license, or other transfer of the code to a third party, is prohibited. \end{document}
\section{Introduction} Many problems involving multiagent systems (MASs), including orientation localization \cite{Quoc2018tcns,Younghun2021CTA} and coordination control \cite{SKhoo2009,YWang2019Tcyber}, require the agents' states to reach a consensus within a finite time. Thus, finite-time control and estimation in MASs have attracted tremendous research attention in recent years \cite{LWang2010tac,XShi2019tcyber, Quoc2018tcns,Bhat2000,HWang2019Tcyb}. However, an upper bound, namely $t_f$, of the convergence time in finite-time (FT) consensus in general depends on the initial conditions and other design parameters \cite{LWang2010tac,XShi2019tcyber, Quoc2018tcns,Bhat2000,HWang2019Tcyb}, which means that $t_f$ cannot be chosen freely. Fixed-time (FxT) consensus schemes have been proposed in\cite{Polyakov2012tac,HWang2019,Mishra2020tcyber,Younghun2021CTA}. But, the bound of the settling time in fixed-time control is still dependent on the design parameters and hence cannot be assigned arbitrarily. Consensus laws with prespecified convergence time using an auxiliary time-varying gain are proposed in \cite{YWang2019Tcyber}. An extension of \cite{YWang2019Tcyber} to prespecified time bearing-only formation control is given in \cite{ZLi2020Tcyber}. Recently, free-will arbitrary time (FwAT) consensus protocols, built upon the results in \cite{AKPal2020auto}, are presented in \cite{AKPal2020Tcyb,Minh2021CTA}. In FwAT consensus, the settling time is bounded by a preset finite time $t_f$, which does not depend on the initial condition nor any system parameter. The settling time bound $t_f$ is explicitly available in the designed consensus laws and can be pre-specified arbitrarily\cite{AKPal2020Tcyb,Minh2021CTA}. Furthermore, the design and convergence analysis of FwAT consensus laws \cite{AKPal2020Tcyb,Minh2021CTA} are simpler than those in \cite{YWang2019Tcyber,ZLi2020Tcyber}. However, existing works in prespecified time consensus \cite{AKPal2020Tcyb,Minh2021CTA,YWang2019Tcyber} have been proposed for only first-order integrator dynamics. In this technical note, we first clarify a technical issue in the convergence proof of a FwAT consensus protocol proposed recently in \cite{AKPal2020Tcyb}, leaving the FwAT consensus result questionable. Our objective is then to investigate FwAT consensus schemes for systems of single- and double-integrator modeled agents, respectively. The specific contributions of this note are as follows. First, a FwAT consensus law for systems of single-integrator modeled agents is proposed to overcome the technical issue in \cite{AKPal2020Tcyb}. Second, we devise a FwAT consensus scheme for multi-agent systems with a more realistic dynamics of double-integrator, which can approximately model multicopter drones, ground vehicles, etc. In particular, we propose a FwAT tracking control scheme to reduce the second order system to the first order counterpart. We show that the agents' states are bounded during the transient time of the tracking error system. Third, all the proposed FwAT consensus protocols are smooth and distributed in the sense that information is only communicated locally between neighboring agents; unlike the average consensus in \cite{AKPal2020Tcyb} that uses a deformed Laplacian. Fourth, the bound of the convergence time of the proposed consensus schemes is explicitly available and can be chosen arbitrarily regardless of the initial condition or any other parameter. Finally, an application to FwAT formation control of mobile agents is presented and simulation results are also provided. The remainder of this note is organized as follows. Preliminaries are given in Section \ref{sec:prel}. Sections \ref{sec:single-integrator} and \ref{sec:double_integ} propose FwAT protocols for single- and double-integrator modeled agents, respectively. An application to FwAT formation control of mobile agents is presented in Section \ref{sec:application}. Section \ref{sec:conclusion} concludes this note. \section{Preliminaries}\label{sec:prel} \subsubsection*{Notation} The set of nonnegative real number is $\mb{R}_+$. Let $\mb{R}^n$ and $\mb{R}^{n\times m}$ be the $n$-dimensional Euclidean space and the $n\times m$ real matrix set, respectively. The vector of all ones is $\m{1}_n$ and the $n\times n$ identity matrix is $\m{I}_n$. For any $\m{x}=[x_1,\ldots,x_n]^\top\in \mb{R}^n$, we define $\mathrm{e}^{\m{x}}=[\mathrm{e}^{x_1},\ldots,\mathrm{e}^{x_n}]^\top$ and $\mathrm{ln}(\m{x})=[\mathrm{ln}({x}_1),\ldots,\mathrm{ln}({x}_n)]^\top$. \subsection{Graph theory} Let $\mc{G}=(\mc{V},\mc{E})$ be an undirected graph containing a node set $\mc{V}=\{1,\ldots,n\}$, and an edge set $\mc{E}\subset \mc{V}\times \mc{V}$ with the cardinality $|\mc{E}|=m$. If $(i,j)\in \mc{E}$ then agents $i$ and $j$ are neighbors. The set of neighbors of agent $i$ is denoted as $\mc{N}_i=\{j\in \mc{V}:(i,j)\in \mc{E}\}$. The Laplacian matrix $\mc{L}(\mc{G})=[l_{ij}]\in \mb{R}^{n\times n}$ associated with the graph $\mc{G}$ is defined as $l_{ij}=-1$ for $(i,j)\in \mc{E},~i\neq j$, $l_{ii}=-\sum_{j\in \mc{N}_i}l_{ij},~\forall i\in \mc{V}$, and $l_{ij}=0$ otherwise. For an undirected and connected graph $\mc{G}$, the Laplacian $\mc{L}(\mc{G})$ is symmetric, positive semidefinite with eigenvalues being $\lambda_1=0<\lambda_2\leq\ldots \leq\lambda_n$. In addition, the eigenvector corresponding to the zero eigenvalue of $\mc{L}$ is $\m{1}_n$ \cite{Saber2004tac}. \subsection{Fixed-time stability theory} Consider the following nonlinear dynamical system \begin{equation}\label{eq:nonlinear_syst} \dot{\m{x}}=\m{f}(t,\m{x},\boldsymbol\alpha),~\m{x}(t_0)=\m{x}_0, \end{equation} where $\m{x}\in \mb{R}^n$ denotes the system state, $\boldsymbol\alpha\in \mb{R}^l$ contains \textit{adjustable} parameters of \eqref{eq:nonlinear_syst}, and $\m{f}:\mb{R}_+\times \mb{R}^n\rightarrow\mb{R}^n$ is a vector of nonlinear functions. Let $\m{x}=\m{0}$ be an equilibrium point of \eqref{eq:nonlinear_syst} and $\m{x}(t,\m{x}_0)$ the solution of \eqref{eq:nonlinear_syst} starting from an initial state $\m{x}_0\in \mb{R}^n$. We now have some definitions. \begin{definition} The origin of \eqref{eq:nonlinear_syst} is said to be \begin{enumerate}[1)] \item \cite{Bhat2000} Finite-time (FT) stable if it is asymptotic stable and for any $\m{x}_0\in \mb{R}^n$ there exists $0\leq T(\m{x}_0,\boldsymbol\alpha) <\infty$, called the settling time function, such that $\m{x}(t,\m{x}_0)=\m{0}$ for all $t\geq t_0 + T(\m{x}_0,\boldsymbol\alpha)$. \item \cite{Polyakov2012tac} Fixed-time (FxT) stable if it is finite-time stable and there exists $T_{max}(\boldsymbol\alpha)< \infty$ independent of $\m{x}_0$ such that $T(\m{x}_0,\boldsymbol\alpha) \leq T_{max}(\boldsymbol\alpha)$. \item \cite{AKPal2020Tcyb} Free-will arbitrary time (FwAT) stable if it is fixed-time stable and there exists $0<T_a<\infty$, which does not depend on $\m{x}_0$ nor $\boldsymbol\alpha$ and can be arbitrarily prespecified, such that $T(\m{x}_0,\boldsymbol\alpha) \leq T_{a}$. \end{enumerate} \end{definition} The following lemmas are useful to study free-will arbitrary stability of the origin of \eqref{eq:nonlinear_syst}. \begin{Lemma}\cite[Thm. 1]{AKPal2020auto}\label{lm:free-will_convergence} Consider the nonlinear system \eqref{eq:nonlinear_syst} and let $\mc{D}\subseteq \mb{R}^n$ be a set containing the origin. Let $\beta_1(\m{x})$ and $\beta_2(\m{x})$ be two continuous positive definite functions on $\mc{D}$. Assume that there exists a real-valued continuously differential function $V(t,\m{x}):[t_0,t_f)\times \mc{D}\rightarrow \mb{R}_+$ and a constant $\eta>1$ such that \begin{enumerate}[(i)] \item $\beta_1(\m{x})\leq V(t,\m{x})\leq \beta_2(\m{x}),\forall t\in [t_0,t_f)$ \item $ V(t,\m{0})=0,\forall t\in [t_0,t_f)$ \item $\dot{V}(t,\m{x})\leq -\dfrac{\eta}{t_f-t}\big(1-\mathrm{e}^{-V(t,\m{x})}\big),\forall\m{x} \in \mc{D},\forall t\in [t_0,t_f)$ \end{enumerate} then the origin is FwAT stable and $T_a=t_f-t_0$ with $t_f$ being an arbitrary prespecified time instant. \end{Lemma} \begin{Lemma}\cite{AKPal2020Tcyb}\label{lm:decreasing_function} For any $x,y\in \mb{R}$ satisfying $0<x\leq y$, there holds \begin{equation} -x(1-\mathrm{e}^{-x}) \geq -y(1-\mathrm{e}^{-y}). \end{equation} \end{Lemma} \begin{Lemma}\cite[Lem. 1]{AKPal2020Tcyb}\label{lm:vector_inequality} For any vector $\m{x}\in \mb{R}^n$, the following holds \begin{equation}\label{eq:vector_inequality} -||\m{x}||\big(1-\mathrm{e}^{-||\m{x}||}\big) \geq -\m{x}^\top\left(\m{1}_n-\mathrm{e}^{-\m{x}}\right). \end{equation} \end{Lemma} \section{Consensus With Free-Will Arbitrary Convergence Time}\label{sec:single-integrator} In this section, we first identify a technical issue in the convergence analysis of the FwAT consensus protocol in \cite[Theorem 2]{AKPal2020Tcyb}, leaving the proof questionable. To remedy the technical issue, we then modify the consensus protocol and show that the multi-agent system achieves an average consensus in an arbitrary prespecified time. Consider a system of $n$ agents with each agent $i$ maintaining a state scalar $x_i$. Let $\m{x}=[x_1,\ldots,x_n]^\top\in \mb{R}^n$ be the stacked vector of the states of the $n$ agents. We adopt the single-integrator model for the dynamics of the agents as follows \begin{equation}\label{eq:single_integrator} \dot{\m{x}}=\m{u},~\m{x}(t_0) =\m{x}_0, \end{equation} where $\m{u}\in \mb{R}^n$ denotes the control input. We impose the following assumption on the system graph. \begin{Assumption}\label{ass:undirected_Graph} The graph $\mc{G}$ of the system is undirected and connected. \end{Assumption} In \cite{AKPal2020Tcyb} a consensus protocol is proposed as \begin{equation}\label{eq:Pal_consensus_law} \m{u}=\begin{cases} -\frac{\eta}{t_f-t}\big[ \m{I}_n-\mathrm{e}^{-\diag(\mc{L\m{x}})}\big]\m{1}_n,& \text{if}~ t_0\leq t< t_f \\ \m{0},& \text{otherwise} \end{cases} \end{equation} where $\eta$ is a positive constant such that $\eta>1/\lambda_2(\mc{L})$. \subsection{Comments on "Free-will arbitrary time consensus for multiagent systems" \cite{AKPal2020Tcyb}} It is stated in \cite[Theorem 2]{AKPal2020Tcyb} that under Assumption \ref{ass:undirected_Graph} and consensus law \eqref{eq:Pal_consensus_law}, the agents achieve a consensus at an arbitrary chosen time $t_f$. The proof of \cite[Theorem 2]{AKPal2020Tcyb} relies on the following inequality \begin{equation}\label{eq:wrong_inequality} \lambda_2||\m{x}||^2 \leq \m{x}^\top\mc{L}\m{x}. \end{equation} This inequality is however not correct since the Laplacian matrix $\mc{L}$ is only positive semidefinite. Indeed, by selecting $\m{x}=\m{1}_n$ and using the relation $\mc{L}\m{1}_n=\m{0}$, one has \begin{equation*} \lambda_2||\m{1}_n||^2=\lambda_2n > 0 = \m{1}_n^\top\mc{L}\m{1}_n, \end{equation*} which is a contradiction. If for any vector $\m{y}\in \mb{R}^n$ such that $\m{y}\perp \mathrm{null}(\mc{L})=\m{1}_n$ we can only have a corresponding relation $\lambda_2||\m{y}||^2 \leq \m{y}^\top\mc{L}\m{y}$. To achieve an average consensus, \cite{AKPal2020Tcyb} proposes an alternative consensus law in \cite[Eq. (24)]{AKPal2020Tcyb}. It is noted that the deformed Laplacian used in the average consensus law \cite[Eq. (24)]{AKPal2020Tcyb} is not for diffusive coupling. Moreover, the consensus law requires that all agents know the average of their initial states ${x}^*:=\m{1}_n^\top\m{x}(0)/n$. This requirement is restrictive since ${x}^*$ is not readily available to the agents and the initial state vector $\m{x}(0)$ might be initialized arbitrarily. The distributed nature of the average consensus scheme \cite[Eq. (24)]{AKPal2020Tcyb} is therefore questionable. Motivated by the aforementioned observations, we propose below a (\textit{distributed}) average consensus scheme with free-will arbitrary prespecified settling time. \subsection{Proposed Average Consensus Laws} We propose the following FwAT average consensus \begin{equation}\label{eq:our_consensus_law} \m{u}=\begin{cases} \frac{\eta}{t_f-t}\mc{L}\mathrm{e}^{-\mc{L\m{x}}},& \text{if}~ t_0\leq t< t_f \\ \m{0},& \text{otherwise}, \end{cases} \end{equation} for a positive constant $\eta > {1}/{\lambda_2^2}$. It can be verified that the preceding consensus law is modified from \eqref{eq:Pal_consensus_law} by left-multiplying by $\mc{L}$ on the right hand side of \eqref{eq:Pal_consensus_law}. Indeed, we have that \begin{align*} &-\tfrac{\eta}{t_f-t}\mc{L}\big( \m{I}_n-\mathrm{e}^{-\diag(\mc{L\m{x}})}\big)\m{1}_n\\ &=-\tfrac{\eta}{t_f-t}\big( \mc{L}\m{1}_n-\mc{L}\mathrm{e}^{-\diag(\mc{L\m{x}})}\m{1}_n\big)=\tfrac{\eta}{t_f-t}\mc{L}\mathrm{e}^{-\mc{L\m{x}}}, \end{align*} which is identical to \eqref{eq:our_consensus_law}. Furthermore, the control law for each agent $i$ in \eqref{eq:our_consensus_law} is explicitly given as \begin{equation*} u_i = \tfrac{\eta}{t_f-t}\sum_{j\in \mc{N}_i}\Big(\mathrm{e}^{\sum_{j\in \mc{N}_i}(x_j-x_i)}-\mathrm{e}^{\sum_{k\in \mc{N}_j}(x_k-x_j)}\Big) \end{equation*} Thus, each agent $i$ needs to communicate a sum of the relative states ${z}_i:=\sum_{j\in \mc{N}_i}(x_j-x_i)$ to its neighbors. In many coordination control scenarios related to multiagent systems, the agents sense relative states, such as relative positions and relative bearing vectors, to their neighbors. Each agent $i$ then simply broadcasts ${z}_i$ to its neighbors $j\in \mc{N}_i$ in order to carry out \eqref{eq:our_consensus_law}. Denote $\bar{x}:=\m{1}_n^\top\m{x}(0)/n$ as the average of the agents' initial states. Let $\delta_i:= \m{x}_i-\bar{x}$ and $\bs\delta:=[\delta_1,\ldots,\delta_n]^\top=\m{x}-\bar{x}\m{1}_n$. It then follows that $\dot{\m{x}}=\dot{\bs\delta}$, and $\mc{L}\bs\delta=\mc{L}(\m{x}-\bar{x}\m{1}_n)=\mc{L}\m{x}$ since $\mc{L}\m{1}_n=\m{0}$ due to Assumption 1. We study the convergence of the proposed consensus protocol in the following subsection. \subsection{Convergence analysis} We note that the average of the agent states $\m{1}_n^\top\m{x}(t)/n$ along the trajectory of \eqref{eq:our_consensus_law} is time-invariant. \begin{Lemma}\label{lm:invariant_average} Assume that Assumption \ref{ass:undirected_Graph} holds. Under the consensus law \eqref{eq:our_consensus_law}, the average of the agent states $\m{1}_n^\top\m{x}(t)/n$ is time-invariant. \end{Lemma} \begin{proof} Since $\m{1}_n^\top\mc{L}=\m{0}$ we have that $\m{1}_n^\top\dot{\m{x}}={0}$ along the trajectory of \eqref{eq:our_consensus_law}. It follows that the average of the agent states $\m{1}_n^\top\m{x}(t)/n$ is time-invariant. \end{proof} The dynamics of the error vector $\bs\delta$ is given as \begin{equation}\label{eq:delta_dynamics} \dot{\bs\delta}=\begin{cases} -\frac{\eta}{t_f-t}\mc{L}\big( \m{1}_n-\mathrm{e}^{-\mc{L}\bs\delta}\big),& \text{if}~ t_0\leq t< t_f \\ 0,& \text{otherwise} \end{cases} \end{equation} We can now prove the following result. \begin{Theorem}\label{thm:fixed_time_consensus_1} Assume that Assumption \ref{ass:undirected_Graph} holds. Under the consensus law \eqref{eq:our_consensus_law} with $\eta >1/\lambda_2^2$, $\m{x}(t)$ converges to $\m{1}_n\bar{x}$ within the chosen settling time $T_a=t_f-t_0$. \end{Theorem} \begin{proof} Consider the Lyapunov function \begin{equation}\label{eq:Lyap} V=\bs\delta^\top\bs\delta, \end{equation} which is positive definite and continuously differentiable in $t_0\leq t< t_f$. The derivative of $V$ along a trajectory of \eqref{eq:delta_dynamics} is given as \begin{align*} \dot{V}&=2\bs\delta^\top\dot{\bs\delta}\\ &=-\tfrac{2\eta}{t_f-t}\bs\delta^\top\mc{L}\big( \m{1}_n-\mathrm{e}^{-\mc{L}\bs\delta}\big)\\ &=-\tfrac{2\eta}{t_f-t}(\mc{L}\bs\delta)^\top\big( \m{1}_n-\mathrm{e}^{-\mc{L}\bs\delta}\big)\\ &\leq -\tfrac{2\eta}{t_f-t}||\mc{L}\bs\delta||\big( 1-\mathrm{e}^{-||\mc{L}\bs\delta||}\big), \numberthis \label{eq:dotV_1} \end{align*} where the third equality follows from the symmetry of Laplacian matrix $\mc{L}^\top=\mc{L}$ due to the undirected nature of the graph, and in the last inequality we have used Lemma \ref{lm:vector_inequality}. Since $\m{1}_n^\top\m{x}(t)$ is time-invariant (Lemma \ref{lm:invariant_average}) one has $\m{1}_n^\top\bs\delta = \m{1}_n^\top(\m{x}-\bar{x}\m{1}_n)= 0$ for all $t\geq 0$. In other words, $\bs\delta$ is orthogonal to the eigenvector $\m{1}_n$ corresponding to the zero eigenvalue of $\mc{L}$ for all time $t \geq 0$. Consequently, we have that \begin{align*} \lambda_2(\mc{L})||\bs\delta||^2 &\leq \delta^\top\mc{L}\bs\delta\\ &\leq ||\bs\delta||||\mc{L}\bs\delta||\\ \Leftrightarrow \lambda_2(\mc{L})\sqrt{V} &\leq ||\mc{L}\bs\delta||, \numberthis \end{align*} where the second inequality follows from Holder's inequality. From the preceding inequality, Lemma \ref{lm:decreasing_function} and \eqref{eq:dotV_1}, we obtain \begin{equation} \dot{V} \leq -\tfrac{2\eta \lambda_2}{t_f-t}\sqrt{V}\big( 1-\mathrm{e}^{-\lambda_2\sqrt{V}}\big). \end{equation} Let $\xi:=\lambda_2\sqrt{V}$. Then, one obtains \begin{equation}\label{eq:V_free_will_convergent} \dot{\xi}=\lambda_2\tfrac{\dot{V}}{2\sqrt{V}}\leq-\tfrac{\eta \lambda_2^2}{t_f-t}( 1-\mathrm{e}^{-\xi}). \end{equation} If $\eta >1/\lambda_2^2$ it then follows from \eqref{eq:V_free_will_convergent} and Lemma \ref{lm:free-will_convergence} that $\xi$ converges to zero within a free-will arbitrary settling time $T_a=(t_f-t_0)$ and so does $V$. As a result, $\bs\delta =\m{0}$ or $\m{x}=\m{1}_n\bar{x}$ for all $t\geq t_f$. \end{proof} \subsection{FwAT consensus under switching graph topologies} This subsection considers FwAT consensus of multiagent systems under switching graphs. Let us assume that the graph of the system is time-varying and is denoted by $\mc{G}_{\sigma(t)}=(\mc{V},\mc{E}_{\sigma(t)})$ with $\mc{E}_{\sigma(t)}\subset \mc{V}\times \mc{V}$ and $\sigma(t):\mb{R}^+\rightarrow\mc{P}=\{1,2,\ldots,\rho\}$ being a piecewise constant switching signal. It is assumed that there exists a sequence of time instants $\{t_k\},k\in \mb{Z}^+$ such that $\sigma(t)$ is a constant for $t_k\leq t< t_{k+1}$, $t_{k+1}-t_k>\tau_s >0,\forall t_k$. We assume the following uniform connectedness condition. \begin{Assumption}[Uniform Connectedness]\label{ass:uniform_connected} Each graph topology $\mc{G}_k,\forall k\in \mc{P}$ is undirected and connected. \end{Assumption} As a result, the Laplacian $\mc{L}_{\sigma(t)}$ associated with the graph $\mc{G}_{\sigma(t)}$ remains positive semidefinite with $\lambda_2(\mc{L}_{\sigma(t)})$ being strictly positive, for all $t\geq t_0$. Let $\bar{\lambda}_2:=\min\{\lambda_2(\mc{L}_\sigma)\}_{\sigma\in \mc{P}}$. Then, for any $\bs\delta\in \mb{R}^n$ such that $\delta\perp \m{1}_n$, the following holds \begin{equation*} \bar\lambda_2||\bs\delta||^2 \leq \bs\delta^\top\mc{L}_{\sigma(t)}\bs\delta,~\forall t\geq t_0. \end{equation*} Thus, we obtain the following corollary whose proof can be shown by following similar lines as in Proofs of Theorem \ref{thm:fixed_time_consensus_1}. \begin{Corollary} Consider the multi-agent system \eqref{eq:single_integrator} with switching graph topologies $\mc{G}_{\sigma(t)}$ satisfying Assumption \ref{ass:uniform_connected}. Under the consensus law \ref{eq:our_consensus_law} with $\eta >1/\bar{\lambda}_2^2$, $\m{x}(t)$ converges to $\m{1}_n\bar{x}$ in fixed time with the prespecified settling time $T_a=t_f-t_0$. \end{Corollary} Since the consensus law is fixed time convergent and $t_f$ is independent of the initial state, we may allow the graph to be empty for some time interval $[t_1, t_2]\subset [t_0, t_f)$. That is sometimes, all nodes may be disconnected from the network for a short amount of time and then reconnected. The fixed-time convergence property allows the consensus to be still achieved at some time $t \leq t_f$. \subsubsection*{Example 1} \begin{figure}[t] \centering \begin{subfigure}[b]{.5\textwidth} \centering \begin{tikzpicture}[scale=0.9]\footnotesize \tikzstyle{neuron}=[place,circle,inner sep=0,minimum size=9pt] \node[neuron] (4) at (1,0.) [] {4}; \node[neuron] (1) at (0,0) [] {1}; \node[neuron] (2) at (0,1.) [] {2}; \node[neuron] (3) at (1.,1.) [] {3}; \node[] (g1) at (.5,-0.2) [label=below:\small$\mathcal{G}_1$] {}; \draw [line width=1pt] (1)--(2) (1)--(4) (3)--(2); \node[neuron] (42) at (1+2.5,0.) [] {4}; \node[neuron] (12) at (+2.5,0) [] {1}; \node[neuron] (22) at (+2.5,1.) [] {2}; \node[neuron] (32) at (1.+2.5,1.) [] {3}; \node[] (g2) at (.5+2.5,-0.2) [label=below:\small$\mathcal{G}_2$] {}; \draw [line width=1pt] (12)--(42) (32)--(22) (32)--(42); \node[neuron] (43) at (1+5,0.) [] {4}; \node[neuron] (13) at (+5,0) [] {1}; \node[neuron] (23) at (+5,1.) [] {2}; \node[neuron] (33) at (1.+5,1.) [] {3}; \node[] (g3) at (.5+5,-0.2) [label=below:\small$\mathcal{G}_3$] {}; \draw [line width=1pt] (23)--(13) (13)--(43) (43)--(33); $$ \end{tikzpicture} \caption{Switching graphs $\mc{G}_{\sigma}$ } \label{fig:switching_graphs} \label{fig:sim_switching_graphs} \end{subfigure}\vspace{3pt} \begin{subfigure}{.5\textwidth} \centering \includegraphics[height=4cm]{state_switching} \caption{The agents' states} \label{fig:switching_agent_states} \end{subfigure} \caption{FwAT consensus under switching graphs.} \label{fig:consensus_switching_graph} \end{figure} Consider a system of four agents whose communication graph switches every $0.5$s between the three graph topologies $\{\mc{G}_\sigma\}_{\sigma=1,2,3}$ given in Fig. \ref{fig:switching_graphs}. The agents' initial states are chosen in $[0,1]$. Simulation results for FwAT consensus of the agents under the FwAT consensus law \eqref{eq:our_consensus_law} with $t_f=4$s are given in Fig. \ref{fig:switching_agent_states}. We observe that the agents achieve the average consensus within the chosen time $t_f$. \section{Double Integrator Modeled Agents}\label{sec:double_integ} This section proposes a FwAT consensus protocol for systems of double-integrator modeled agents. Consider the system of $n$ agents whose dynamics is modeled as the second order system \begin{equation}\label{eq:2nd_order} \dot{\m{x}}=\m{v},~\dot{\m{v}}=\m{u}, \end{equation} where $\m{v}\in \mb{R}^n$ denotes the velocity vector and $\m{u}\in \mb{R}^n$ is the control vector. We consider the change of variable \begin{equation}\label{eq:change_variable_x} \m{z}=\m{v}+\bs{\phi}_1, \end{equation} where $$-\bs{\phi}_1=\frac{\eta}{t_f-t}\mc{L}\mathrm{e}^{-\mc{L\m{x}}}$$ is the time-varying desired vector that we want the velocity vector $\m{v}\in \mb{R}^n$ to track. A possible approach is first steering $\m{v}(t)$ to track $-\bs{\phi}_1(t)$ in a free will arbitrary prespecified time $t_1>0$ ($t_1<t_f$), and then treating \eqref{eq:2nd_order} as the reduced single-integrator model $\dot{\m{x}}=-\bs{\phi}_1$ thereafter, provided that the system state is bounded in $t\in [t_0,t_1]$. \subsection{Proposed consensus law} To proceed, the time derivative of $\m{z}$ is given as \begin{align*} \dot{\m{z}}&=\dot{\m{v}}+\frac{\partial \bs{\phi}_1}{\partial \m{x}}\m{v}+\frac{\partial \bs{\phi}_1}{\partial t} \numberthis \label{eq:dotz}\\ &=\dot{\m{v}} +\frac{\eta}{t_f-t}\mc{L}\diag(\mathrm{e}^{-\mc{L\m{x}}})\mc{L}\m{v} -\frac{\eta}{(t_f-t)^2}\mc{L}\mathrm{e}^{-\mc{L\m{x}}}. \numberthis \label{eq:2nd_diffuse_coupling} \end{align*} We design the control input as \begin{equation}\label{eq:control_2nd} \m{u}=\begin{cases} -\frac{\partial \bs{\phi}_1}{\partial \m{x}}\m{v}-\frac{\partial \bs{\phi}_1}{\partial t}-\frac{\eta_2}{t_1-t}(\m{1}_n-\mathrm{e}^{-\m{z}}),&\text{if}~ t_0\leq t< t_1 \\ -\frac{\partial \bs{\phi}_1}{\partial \m{x}}\m{v}-\frac{\partial \bs{\phi}_1}{\partial t}, &\text{if}~t_1\leq t< t_f\\ \m{0},& \text{otherwise,} \end{cases} \end{equation} where $0<t_1<t_f$ and $\eta_2>1$. From \eqref{eq:2nd_diffuse_coupling} and \eqref{eq:control_2nd}, each agent $i$ needs to communicate the sum of the relative states $\sum_{j\in \mc{N}_i}(x_j-x_i)$ and the sum of the relative velocities $\sum_{j\in \mc{N}_i}(v_j-v_i)$ to its neighbors. Thus, the proposed consensus law \eqref{eq:control_2nd} for second order system \eqref{eq:2nd_order} is distributed. We can now state the main result of this section. \begin{Theorem}\label{thm:2nd_FwAT_consensus} Consider the system of double-integrator modeled agents \eqref{eq:2nd_order} with connected communication graph $\mc{G}$. Under the consensus law \eqref{eq:control_2nd} with $\eta >1/\lambda_2^2$ and $\eta_2>1$, $\m{v}(t)\rightarrow\m{0}$ and $\m{x}(t)$ converges to a consensus in fixed time with the settling time $T_a=t_f-t_0$. \end{Theorem} \begin{proof} Let us consider the Lyapunov function \begin{equation}\label{eq:V(z)} V_2(\m{z})=\m{z}^\top\m{z}. \end{equation} The derivative of $V_2$ along the trajectory of \eqref{eq:control_2nd} is given as \begin{align*} \dot{V}_2&=2\m{z}^\top\dot{\m{z}}\\ &=-2\frac{\eta_2}{t_1-t}\m{z}^\top(\m{1}_n-\mathrm{e}^{-\m{z}})\\&\stackrel{\eqref{eq:vector_inequality}}{\leq} -2\frac{\eta_2}{t_1-t}||\m{z}||(1-\mathrm{e}^{-||\m{z}||})\\ &\leq -2\frac{\eta_2}{t_1-t}\sqrt{V_2}(1-\mathrm{e}^{-\sqrt{V_2}}). \end{align*} Let $\xi=\sqrt{V}_2=||\m{z}||$. Then, one has \begin{equation} \dot{\xi}=\frac{\dot{V}_2}{2\sqrt{V_2}}\leq-\frac{\eta}{t_f-t}( 1-\mathrm{e}^{-\xi}), \end{equation} which implies that $\m{z}= \m{0}$ is FwAT stable (Lemma \ref{lm:free-will_convergence}) or equivalently $\m{v}(t)=-\bs{\phi}_1$ for all time $t\geq t_1$. Further, the state vector $\m{x}(t)$ is bounded for all time $t\in [t_0,t_f]$ (see Lemma \ref{lm:bounded_state} below). Therefore, the system \eqref{eq:2nd_order} is reduced to the following single-integrator dynamics \begin{equation}\label{eq:reduced_system} \dot{\m{x}}=\frac{\eta}{t_f-t}\mc{L}\mathrm{e}^{-\mc{L\m{x}}},~\forall t\geq t_1, \end{equation} of which the average of the agents' states at $t=t_1$, namely $\bar{x}:=\m{1}_n^\top\m{x}(t_1)/n$, is FwAT stable if $\eta >1/\lambda_2^2$ (Theorem \ref{thm:fixed_time_consensus_1}). Since $\m{v}(t)=-\bs{\phi}_1$ for all $t\geq t_1$, and $\bs{\phi}_1\rightarrow \m{0}$ as $\m{x}\rightarrow \bar{x}$, we conclude that $\m{v}\rightarrow\m{0}$ at the same time as $\m{x}\rightarrow \bar{x}$. \end{proof} For the sake of completeness, we clarify below that \eqref{eq:control_2nd} is smooth at $t=t_1$, and investigate the system behavior during the time interval $[t_0,t_1]$ in the following subsection. \begin{Lemma} For any $\eta_2>0$, the FwAT consensus law \eqref{eq:control_2nd} is smooth at $t=t_1$. \end{Lemma} \begin{proof} By \eqref{eq:dotz} and \eqref{eq:control_2nd} we have $\dot{\m{z}}=\bs{\psi}(t):=-\frac{\eta_2}{t_1-t}(\m{1}_n-\mathrm{e}^{-\m{z}})$ and hence $\m{z}=\mathrm{ln}(\m{1}_n+\m{c}(t_1-t)^{\eta_2})$, where $\m{c}=[c_1,\ldots,c_n]^\top:=(\mathrm{e}^{\m{z}(t_0)}-\m{1}_n)/(t_1-t_0)^{\eta_2}$. Therefore, it can be verified that \begin{align*} \bs{\dot{\psi}}(t)&=\frac{\partial \bs{\psi}}{\partial \m{z}}\dot{\m{z}}+\frac{\partial \bs{\psi}}{\partial t}\\ &=-\frac{\eta_2^2}{(t_1-t)^2}\diag(\m{1}_n-\mathrm{e}^{-\m{z}})(\m{1}_n-\mathrm{e}^{-\m{z}})\\ &=-{\eta_2^2}\Big[ \tfrac{c_1^2(t_1-t)^{2(\eta_2-1)}}{(1+c_1(t_1-t)^{\eta_2})^2},\ldots,\tfrac{c_n^2(t_1-t)^{2(\eta_2-1)}}{(1+c_n(t_1-t)^{\eta_2})^2}\Big]^\top. \end{align*} It follows that for any $\eta_2>1$, $\bs{\dot{\psi}}(t=t_1)=\m{0}$. Consequently, \eqref{eq:control_2nd} is smooth at $t=t_1$ since $\lim_{t\rightarrow t_1-}(d/dt)\m{u}(t)=\lim_{t\rightarrow t_1+}(d/dt)\m{u}(t)$. \end{proof} \subsection{Boundedness of the system state} Let us consider the following perturbed system \begin{equation}\label{eq:perturbed_syst} \dot{\m{x}}=-\bs{\phi}_1(t,\m{x}) + \m{z}(t), t\in [t_0,t_1] \end{equation} with $\m{z}(t)$ being a perturbed signal. The perturbed input $\m{z}(t)$ converges to zero in a free-will arbitrary prespecified time $t_1$ (Theorem \ref{thm:2nd_FwAT_consensus}). Thus, $||\m{z}(t)||$ is also \textit{absolutely integrable} as the area under the curve $||\m{z}(t)||$ between $t\in [t_0,t_f]$ is finite, i.e., $\int_{t_0}^t||\m{z}(\tau)||d\tau<\infty,\forall t\geq 0$. Let $\m{P}=(\m{I}_n-\m{1}_n\m{1}_n^\top/n)$ be the orthogonal projection onto $\mathrm{span}(\m{1}_n)^\perp$. Note that we can write $\m{x}=\m{P}\m{x}+(\m{I}_n-\m{P})\m{x}$. Thus, we bound these two components of $\m{x}$ in what follows. By left-multiplying by $\m{P}$ on both sides of \eqref{eq:perturbed_syst} and letting ${\m{x}}^{\parallel}=\m{Px}$, we have \begin{align*} \dot{\m{x}}^{\parallel}&=\frac{\eta}{t_f-t}\m{P}\mc{L}\mathrm{e}^{-\mc{L}\m{x}} + \m{P}\m{z}(t)\\ &= \frac{\eta}{t_f-t}\mc{L}\mathrm{e}^{-\mc{L\m{x}^{\parallel}}} + \m{P}\m{z}(t),\numberthis \label{eq:system_in_consensus_space} \end{align*} where we have used the relations $\m{P}\mc{L}=\mc{L}\m{P}=\mc{L}$. Note importantly that $\m{1}_n^\top\dot{\m{x}}^{\parallel}=0$ for all time $t$. Thus, we obtain the following lemma whose proof is given in Appendix \ref{app:bounded_x_parallel}. \begin{Lemma}\label{lm:bounded_x_parallel} The average point $\bar{\m{x}}^\parallel:=\big(\m{1}_n^\top\m{x}^\parallel(t_0)/n\big)\m{1}_n$ of the nominal system $\dot{\m{x}}^{\parallel}=-\bs{\phi}_1(t,\m{x}^\parallel)$ of \eqref{eq:system_in_consensus_space} is free-will arbitrary time stable, and the perturbed system \eqref{eq:system_in_consensus_space} is input to state stable w.r.t. the vanishing input $\m{P}\m{z}(t)$. \end{Lemma} Let $\m{x}^\perp:=(\m{I}_n-\m{P})\m{x}$. Left-multiplying by $(\m{I}_n-\m{P})$ on both sides of \eqref{eq:perturbed_syst} yields \begin{equation}\label{eq:dot_x_perp} \dot{\m{x}}^\perp=(\m{I}_n-\m{P})\m{z}, \end{equation} where we have used the relation $(\m{I}_n-\m{P})\mc{L}=\m{1}_n\m{1}_n^\top\mc{L}/n=\m{0}$. Then, it follows from the preceding equation that \begin{align*} \textstyle\int_{t_0}^t\dot{\m{x}}^\perp&=(\m{I}_n-\m{P})\textstyle\int_{t_0}^t\m{z}(\tau)d\tau\\ \m{x}^\perp(t)-\m{x}^\perp(t_0)&=(\m{I}_n-\m{P})\textstyle\int_{t_0}^t\m{z}(\tau)d\tau\\ \Leftrightarrow ||\m{x}^\perp(t)-\m{x}^\perp(t_0)||&\leq\textstyle\int_{t_0}^t||\m{z}(\tau)||d\tau<\infty. \end{align*} It follows that $\m{x}^\perp(t)$ is bounded for all time $t\in [t_0,t_1]$. Thus, the following result is obtained directly from the above analysis. \begin{Lemma}\label{lm:bounded_state} Consider the system of double-integrator modeled agents \eqref{eq:2nd_order} with connected communication graph $\mc{G}$. Under the consensus law \eqref{eq:control_2nd} with $\eta >1/\lambda_2^2$ and $\eta_2>1$, the state vector $\m{x}(t)$ is bounded for all time $t\in [t_0,t_1]$. \end{Lemma} \begin{figure*}[t] \centering \begin{subfigure}[b]{0.32\textwidth} \centering \includegraphics[width=.98\textwidth,keepaspectratio]{scalar_tracking} \caption{Tracking error vector $\m{z}(t)$} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \centering \includegraphics[width=.98\textwidth,keepaspectratio]{scalar_vel} \caption{$\m{v}(t)$} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \centering \includegraphics[width=.98\textwidth,keepaspectratio]{scalar_state} \caption{States $\m{x}(t)$} \end{subfigure} \caption{Consensus of four double-integrator modeled agents under \eqref{eq:control_2nd} with $\eta=\eta_2=2,t_1=3$s and $t_f=6$s.} \label{fig:double_integ_consensus} \end{figure*} \subsubsection*{Example 2} An example of FwAT consensus of four agents under \eqref{eq:control_2nd} with $\eta=\eta_2=2,t_1=3$s and $t_f=6$s is given in Fig. \ref{fig:double_integ_consensus}. The communication graph of the agents is a ring graph. In the simulation, the states of the agents $x_i(0),i=1,2,3,4,$ are initialized randomly in $[0,1]$ and $v_i(0),i=1,2,3,4,$ are chosen randomly in $[0,0.5]$. It is observed that the tracking vector $\m{z}=\m{v}+\bs{\phi}_1$ converges to zero within $t_1=3$s and the agent states achieve a consensus within the prespecified time $t_f=6$s. \section{Application to FwAT Formation Control of Mobile Robots}\label{sec:application} In this section, we present an application of the proposed free-will arbitrary time consensus scheme \eqref{eq:control_2nd} in formation control of mobile agents in the plane. \subsection{Two-wheeled mobile robots} \begin{figure}[t] \centering \begin{tikzpicture}[scale = .9] \node (py) at (0,2,0) [label=left:$y$]{}; \node (px) at (2.,0) [label=below:$x$]{} \node[place,scale=0.1] (pi) at (1.2,1.2){}; \node[] (pi_y) at (0.8,1.9)[]{}; \draw[black,rotate around={30:(pi)}] (0.7,0.9) rectangle (1.7,1.5); \filldraw[black,rotate around={30:(0.9+0.1,1.5-.1)}] (.8+0.1,1.4-.1) rectangle (1.1+0.1,1.6-.1) \filldraw[black,rotate around={30:(0.9+0.4,1.5-.6)}] (.8+0.4,1.4-.6) rectangle (1.1+0.4,1.6-.6) \draw[{line width=1pt}] (0,0) [frame] -- (px); \draw[{line width=1pt}] (0,0) [frame] -- (py); \draw[{line width=.5pt}] (pi) [frame] -- (2.5,1.94); \node[place,scale=0.6,fill=red] (hi) at (2.1,1.7)[label=below right:$\m{h}_i$]{}; \node[] () at (1.8,1.4)[label=above:$L_i$]{}; \draw[{line width=.5pt}] (pi) [frame] -- (pi_y); \draw[{line width=.5pt},blue, dashed] (pi) -- (0,1.2); \draw[{line width=.5pt},blue, dashed] (pi) -- (1.2,0); \node () at (0,1.2) [label=left:$y_i$]{}; \node () at (1.2,0) [label=below:$x_i$]{}; \end{tikzpicture} \caption{A mobile robot in $\mb{R}^2$.} \label{fig:unicycle} \end{figure} The motion of each mobile robot at the kinematic level is given as (see Fig. \ref{fig:unicycle}) \begin{equation}\label{eq:robot_motion} \dot{\m{p}}_i=\begin{bmatrix} \dot{x}_i \\ \dot{y}_i \end{bmatrix}=\begin{bmatrix} \cos(\theta_i)\\ \sin(\theta_i) \end{bmatrix} v_i,~\dot{\theta}_i=\omega_i, \end{equation} where $\m{p}_i=[x_i,y_i]^\top$ denotes the coordinates of the robot $i$'s center location, $\theta_i$ is the robot $i$'s heading angle, and $v_i$ and $\omega_i$ are respectively the linear and angular velocity of the robot. The hand position (or tool position) $\m{h}_i\in \mb{R}^2$ (see Fig. \ref{fig:unicycle}) is given as \begin{equation}\label{eq:hand_position} \m{h}_i=\begin{bmatrix} h_{ix}\\ h_{iy} \end{bmatrix}= \m{p}_i + \begin{bmatrix} \cos(\theta_i)\\ \sin(\theta_i) \end{bmatrix} L_i, \end{equation} where $L_i$ is the distance from the hand location to the robot $i$'s center point. The second derivative of $\m{h}_i$ can be obtained as \begin{equation} \ddot{\m{h}}_i=\begin{bmatrix} \cos(\theta_i) &-L_i\sin(\theta_i)\\ \sin(\theta_i) &L_i\cos(\theta_i) \end{bmatrix}\begin{bmatrix} \dot{v}_i\\\dot{\omega}_i \end{bmatrix} + \m{g}_i, \end{equation} where $\m{g}_i:=\begin{bmatrix} -\sin(\theta_i)v_i\omega_i -L_i\cos(\theta_i)\omega_i^2\\ \cos(\theta_i)v_i\omega_i -L_i\sin(\theta_i)\omega_i^2 \end{bmatrix}$. By using the following change of variable \cite{SKhoo2009} and feedback linearization \begin{equation} \begin{bmatrix} \dot{v}_i\\\dot{\omega}_i \end{bmatrix}=\begin{bmatrix} \cos(\theta_i) & \sin(\theta_i)\\ -\frac{1}{L_i}\sin(\theta_i)&\frac{1}{L_i}\cos(\theta_i) \end{bmatrix} (\m{u}_i-\m{g}_i), \end{equation} where $\m{u}_i\in \mb{R}^2$ is to be designed, we obtain \begin{equation}\label{eq:robot_2nd_model} \ddot{\m{h}}_i=\m{u}_i, \end{equation} which is in the form of \eqref{eq:2nd_order}. \subsection{Formation control protocol} Consider a system of four mobile robots in $\mb{R}^2$ whose local interaction is described by a ring graph $\mc{G}=(\mc{V}=\{1,2,3,4\},\mc{E}=\{(1,2),(2,3),(3,4),(4,1)\})$. The system aims to form a square of side length of $1$m, which is specified by the set of desired displacements of the robots' relative hand positions $\{\m{h}^*_{12}=\m{h}^*_{42}=[1,0]^\top,\m{h}^*_{41}=\m{h}^*_{32}=[0,1]^\top\}$, where $\m{h}^*_{ij}=\m{h}^*_{j}-\m{h}^*_{i}$. The robots start at rest and from locations chosen in $[0,3]\times [0,3]$ (m). The initial heading angles of the agents are $\theta_1=0,\theta_2=\pi/2,\theta_3=\pi/3,$ and $\theta_4=\pi/6$ (rad). Define $\m{u}=[\m{u}_1^\top,\m{u}_2^\top,\m{u}_3^\top,\m{u}_4^\top]^\top$, $\m{h}=[\m{h}_1^\top,\m{h}_2^\top,\m{h}_3^\top,\m{h}_4^\top]^\top$, \begin{equation*} \bar{\mc{L}}=\mc{L}\otimes \m{I}_2,~\bs{\phi}_1=-\tfrac{\eta}{t_f-t}\bar{\mc{L}}\mathrm{e}^{-\bar{\mc{L}}(\m{h}-\m{h}^*)}, \end{equation*} and $\m{z}=\dot{\m{h}}+\bs{\phi}_1$ with \begin{equation} \dot{\m{h}}_i=\begin{bmatrix} \cos(\theta_i) &-\sin(\theta_i)L_i\\ \sin(\theta_i) &\cos(\theta_i)L_i \end{bmatrix}\begin{bmatrix} v_i\\\omega_i \end{bmatrix}. \end{equation} Then, we design the control input as \begin{equation}\label{eq:control_mobile_robot} \m{u}=\begin{cases} -\frac{\partial \bs{\phi}_1}{\partial \m{h}}\dot{\m{h}}-\frac{\partial \bs{\phi}_1}{\partial t}-\frac{\eta_2}{t_1-t}(\m{1}_n-\mathrm{e}^{-\m{z}}),&\text{if}~ t_0\leq t< t_1 \\ -\frac{\partial \bs{\phi}_1}{\partial \m{h}}\dot{\m{h}}-\frac{\partial \bs{\phi}_1}{\partial t}, &\text{if}~t_1\leq t< t_f\\ \m{0},& \text{otherwise}, \end{cases} \end{equation} where the partial derivative terms are given as \begin{align*} &\frac{\partial \bs{\phi}_1}{\partial \m{h}}=\frac{\eta}{t_f-t}\bar{\mc{L}}\diag(\mathrm{e}^{-\bar{\mc{L}}\m{x}})\bar{\mc{L}},\\ &\frac{\partial \bs{\phi}_1}{\partial t}=-\frac{\eta}{(t_f-t)^2}\bar{\mc{L}}\mathrm{e}^{-\bar{\mc{L}}\m{x}}. \end{align*} Simulation results of formation control of four mobile robots under the control law \eqref{eq:control_mobile_robot} with $\eta=\eta_2=2,t_1=4$s and $t_f=8$s are provided in Fig. \ref{fig:robot_formation_control}. A video of the simulation can be found in \url{https://youtu.be/rVPExz7qbGk}. It can be seen that the robots' hand positions form a square within the prespecified time $t_f=8$s. \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth,keepaspectratio]{robot_sim} \caption{Formation control of four mobile robots under \eqref{eq:control_mobile_robot} with $\eta=\eta_2=2,t_1=4$s and $t_f=8$s. Trajectories of the robots (upper). Total displacement error (lower).} \label{fig:robot_formation_control} \end{figure} \section{Conclusion}\label{sec:conclusion} In this note, free-will arbitrary time consensus schemes were presented for multiagent systems with both single- and double-integrator modeled agents. The average consensus protocol for systems of single-integrator modeled agents was introduced to remedy the technical issues associated with the consensus protocol in \cite{AKPal2020Tcyb}. All the proposed consensus schemes possess distributed nature which is favored in problems related to multiagent systems where only local communication and sensing between neighboring agents are employed. Further, an application of the proposed consensus scheme in FwAT formation control of mobile agents is presented and simulation results are also provided to validate the theoretical development. \appendices \section{Proof of Lemma \ref{lm:bounded_x_parallel}}\label{app:bounded_x_parallel} The free-will arbitrary time stability of $\bar{\m{x}}^\parallel$ of the nominal system $\dot{\m{x}}^{\parallel}=-\bs{\phi}_1(t,\m{x}^\parallel)$ follows from a similar argument as in Theorem \ref{thm:fixed_time_consensus_1}. Let $\bs\delta = \m{x}^\parallel-\bar{\m{x}}^\parallel$; it follows that $\m{1}_n^\top\bs\delta=0$ along the trajectory of \eqref{eq:system_in_consensus_space}. Thus, the derivative of the Lyapunov function $V=\delta^\top\delta$ is given as \begin{align*} \dot{V}&=-\frac{2\eta}{t_f-t}\bs\delta^\top\mc{L}(\m{1}_n-\mathrm{e}^{-\mc{L\bs\delta}}) + 2\bs\delta^\top\m{P}\m{z}(t)\\ &\leq -\frac{2\eta}{t_f-t}||\mc{L}\bs\delta||(\m{1}_n-\mathrm{e}^{-||\mc{L}\bs\delta||}) + 2||\delta||||\m{z}(t)||, \numberthis \label{eq:dotV_bounded_state} \end{align*} where the inequality follows from \eqref{eq:vector_inequality} and $||\m{P}\m{z}(t)||\leq ||\m{z}(t)||$. Since $\m{1}_n^\top\bs\delta =0$ we have $\lambda_2(\mc{L})\sqrt{V} \leq ||\mc{L}\bs\delta||$. As a result, it follows from \eqref{eq:dotV_bounded_state} that \begin{align*} \dot{V}&\leq -\frac{2\eta}{t_f-t}\lambda_2\sqrt{V}(1-\mathrm{e}^{-\lambda_2\sqrt{V}}) + 2\sqrt{V}||\m{z}(t)||. \end{align*} Now, let $\xi=\lambda_2\sqrt{V}$; one has \begin{align*} \dot{\xi}&=\lambda_2{\dot{V}}/{(2\sqrt{V})}\\ &\leq-\frac{\eta \lambda_2^2}{t_f-t}( 1-\mathrm{e}^{-\xi})+\lambda_2||\m{z}(t)||. \\ &\leq \lambda_2||\m{z}(t)||. \end{align*} From the comparison lemma \cite{Khalil2002}, we have \begin{align*} \xi(t)&\leq \textstyle\int_{t_0}^t||\m{z}(\tau)||d\tau+ \xi(0)< \infty, \end{align*} for all $t\in [t_0,t_1]$. This shows that $V$ is bounded and so is $\m{x}^\parallel(t)$ for all $t\in[t_0,t_1]$. Thus, the perturbed system \eqref{eq:system_in_consensus_space} is input to state stable w.r.t. the vanishing input $\m{z}(t)$. \section*{Acknowledgment} The work of Q. V. Tran and H.-S. Ahn is supported by the National Research Foundation (NRF) of Korea under the grant NRF2017R1A2B3007034. \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran}
\section*{Introduction} \Ac{RE} ions embedded in a host crystal possess numerous interesting properties for quantum information processing. \Ac{RE} ions can have near-lifetime limited coherence times on their optical transitions \cite{thiel2011}, as long as \SI{4.4}{\milli\second} \cite{Bottger2009}, and hyperfine coherence times from seconds to hours in carefully controlled magnetic fields \cite{Zhong2015, Rancic2017}. While \ac{RE} ions have weaker oscillator strengths than other solid state optical emitters, single ion readout has been achieved in a multiple of host crystals such as \ce{YAlO_3}\cite{kolesov2012,siyushev2014}, \ce{YVO_4}\cite{kindem2020}, \ce{Y_2SiO_5}\cite{raha20, chen2020, utikal2014} and \ce{Si}~\cite{yin13}. These properties make \acs{RE} ions in solid state hosts excellent material for quantum memories\cite{zhong2017, Zhong2015} and potential candidates for future qubits~\cite{grimm2021}. The \ac{RE} ion \ce{Er} in solids most commonly has a \ce{^4I_{15/2}} ground state and a \ce{^4I_{13/2}} excited state~\cite{kenyon2005}. The optical transition from the lowest crystal field level of \ce{^4I_{15/2}} ground state to the lowest lying level of the \ce{^4I_{13/2}} excited state occurs at approximately \SI{1540}{\nano\metre}, hence within the technologically important telecom C-band. This convenient wavelength makes \ce{Er} particularly attractive for quantum communication applications, as \ce{Er}-based devices will be telecom-compatible. Incorporating \ce{Er} into \ce{Si}, by means such as ion implantation or chemical vapour deposition, allows integration into standard complementary metal-oxide-semiconductor processing and provides the ability to fabricate nanophotonic structures~\cite{weiss21}. Furthermore, \ce{Si} can be enriched to less than \num{1} ppm \ce{^{29}Si}, effectively resulting in a low magnetic noise environment \cite{steger2012, muhonen2014} which leads to linewidths as narrow as \SI{33}{\mega\hertz} for T centers \cite{bergeron2020} and \SI{5}{\mega\hertz} for the donor-bound excitons~\cite{yang2009} in silicon. \section*{Resonant photoluminescence excitation spectroscopy} \ce{Er} in \ce{Si} is able to occupy multiple classes of sites \cite{kenyon2005, przybylinska1996}, however most of the sites essential for quantum information have not been characterized thus far. The three main methods used to identify these \ce{Er}:\ce{Si} sites are namely \ac{EPR}, \ac{PL} and \ac{PLE}. Methods utilizing \Ac{EPR} rely on microwaves to probe the paramagnetic properties of electrons in closely separated levels within the $^4I_{15/2}$ state. However, the use of microwaves makes it impossible to excite from the \ce{^4I_{15/2}} ground state to the \ce{^4I_{13/2}} excited state. Both \ac{PL} and \ac{PLE} address these energy levels by using photon excitation. In a \ac{PL} experiment, above-bandgap light is used to excite the \ce{Er} ions and the photoluminescence is recorded using a spectrometer. The spectrum includes decay from the lowest \ce{^4I_{13/2}} to the multiple \ce{^4I_{15/2}} levels following the excitation of the \ce{Si} host~\cite{przybylinska1996}, where the intensity depends on the excitation transfer efficiency from the \ce{Si}~\cite{hogg1996}. The crystal field levels in the excited \ce{^4I_{13/2}} state are inaccessible in \ac{PL}, but obtainable in \ac{PLE} when using a narrow band laser to resonantly excite the population into multiple \ce{^4I_{13/2}} levels and collect the photoluminescence. In addition, less free carriers are generated that can affect the spectrum and lifetime~\cite{Palm1996}. Differences of exciting resonantly or using above-band gap excitation have been observed in \ce{Er}-doped \ce{GaAs} where \ce{Er} centers that exhibited photoluminescence only under direct \ce{4f}-shell excitation did not show photoluminescence under above-band gap excitation~\cite{takahei1995}, thus corroborating the significance of \ac{PLE} for investigating photoluminescent \ce{Er} sites and the corresponding \ce{^4I_{13/2}} crystal field levels in semiconductors. Recent \ac{PLE} experiments in \ce{Er}:\ce{Si} have shown nine narrow photoluminescence resonances associated with different \ce{Er} sites and potentially different crystal field levels of these sites~\cite{weiss20arXiv}. Our measurement of a higher density sample observed \num{7} of the previously detected resonances, marked by the $\dagger$ in Table \ref{tab:resonances}, and characterized \num{63} additional resonances. \subsection*{Experiment} In our experiment we collected the emission of \ce{Er^{3+}} ions in an \SI{1.7}{\milli\metre}$\times$\SI{1.7}{\milli\metre} \ce{Si} chip following resonant excitation with a laser. The chip was diced from a \SI{300}{\micro\metre} thick double-side-polished \ce{Si} wafer containing a background doping of \ce{P} ranging between \SIrange{0.9e15}{5e15}{\centi\metre\tothe{-3}}. To study the optical transitions without the complication of hyperfine splitting, the nuclear spin-free \ce{^{170}Er} isotope was implanted with multiple ion energies and fluences into one side of the chip to form a constant concentration profile of \SI{1e18}{\centi\metre\tothe{-3}} over a depth of \SI{0.2}{\micro\metre} to \SI{0.6}{\micro\metre}. The \ce{Er} concentration of the sample is an order of magnitude higher than the concentration used in our electrical detection experiments \cite{yin13,deboo20} to potentially increase the probability of detecting photoluminescence. In \ac{PL} experiments, co-implanting \ce{Er} with \ce{O} increases the photoluminescence \cite{michel1991,coffa1993} and leads to sharp lines in \ac{EPR} spectroscopy~\cite{carey1996}. Hence, \ce{O} was likewise implanted with multiple energies to create an overlapping profile but with a concentration of \SI{1e19}{\centi\metre\tothe{-3}}. Following implantation, the chip was annealed at \SI{700}{\celsius} for \SI{10}{\minute} in an \ce{N_2} atmosphere, which has resulted in optically active \ce{Er} ions in silicon \cite{yin13, weiss21}. Afterwards, a \SI{190}{\nano\metre} thick \ce{SiN_x} anti-reflective coating on both sides was formed using plasma-enhanced chemical vapor deposition to reduce Fabry-P\'{e}rot oscillations and enhance the optical transmission through the \ce{Si}. The implanted side was placed against the top of a \ce{WSi}-based, optical cavity-embedded \ac{SSPD} [Supplemental Material S-A]. \acp{SSPD} are able to detect single photons with high efficiency in a wide spectral range from \SI{250}{\nano\metre} \cite{wollman2017} up to \SI{7}{\micro\metre} \cite{goltsman2007,marsili2012,chen2017}. By adjusting the thickness of the optical cavity, the absorption can be tailored to a desired wavelength. We fabricated an \ac{SSPD} with a peak system detection efficiency of \SI{66.27}{\percent} at \SI{1550}{\nano\metre} including a bandwidth of approximately \SI{\pm50}{\nano\metre} for the measurement. The chip was sandwiched between the \ac{SSPD} and an optical fiber that had its core aligned with the \ac{SSPD}. The latter allowed an optical excitation of \ce{Er} ions in direct proximity to the \ac{SSPD}. The optical mode waist resulted in a tightly focused excitation spot at the \ce{Er} rich sample plane of \SI{20}{\micro\meter}, equal to the working area of the \ac{SSPD}. The experiment was operated at \SI{300}{\milli\kelvin} to ensure a low dark count rate on the \ac{SSPD}. Moreover, this temperature is low enough to minimize non-radiative recombination of the \ce{Er}~\cite{Palm1996,Taguchi1998,Priolo1998}. To excite the \ce{Er} ions, we used a semiconductor diode laser (Pure Photonics PPCL550) with an output pulse modulated by two \acp{AOM} connected in series, resulting in an extinction ratio greater than \SI{100}{\decibel}. After the excitation pulse, we recorded the number of counts from the \ac{SSPD} with a digital counter (Keysight 53131A or National Instruments PCI-6602). \subsection*{Broad spectral survey} \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{Figure_1_PL_spectrum_v7.eps} \caption{The \ac{PLE} spectrum compared with the single \ce{Er} ions found by electrical detection as function of the wavelength measured in vacuum using the wavemeter. The red lines below the plot indicate the center of optically detected resonances and the blue lines indicate the center of electrically detected resonances. Inset: a single optically detected inhomogeneous resonance centered at \SI{1539.948}{\nano\metre} which is fit with a Lorentzian line shape, resolving in a \ac{FWHM} of \SI{1.5}{\giga\hertz}. The blue lines indicate \num{6} electrically detected resonances less than \SI{5}{\giga\hertz} away from the centre. The \ac{FWHM} of the electrically detected resonances are less than \SI{100}{\mega\hertz}.} \label{fig:spectrum} \end{figure} The resonant \ac{PLE} spectrum was obtained by pulsing the laser for \SI{100}{\micro\second} and integrating the counts from \SI{10}{\micro\second} to \SI{1}{\milli\second} after the pulse [Fig. \ref{fig:spectrum}]. This was repeated \num{1000} times at each optical frequency before the excitation laser was stepped to the next optical frequency. In total, the range of \SIrange{1516}{1550}{\nano\metre} has been scanned in steps of \SI{50}{\mega\hertz} (\SI{0.4}{\pico\metre}). The laser line was broadened with a frequency modulation of \SI{60}{\mega\hertz} in order to avoid stepping over narrow resonances. The laser frequency was monitored at each step with a wavemeter (Bristol 621B). The spectrum in figure \ref{fig:spectrum} consists of \num{70} peaks which all displayed a prominence of at least \num{0.15} counts per pulse, followed a distribution profile and showed an exponential lifetime decay. The excitation wavelength, amplitude, Lorentzian \ac{FWHM} and optical lifetime of the resonances are listed in the appendix \ref{tab:resonances} and the raw data of the spectrum is provided in the Supplemental Material. These resonances are consistent with different \ce{Er} sites and may include resonances associated with excitation to higher crystal field levels of the \ce{^4I_{13/2}} manifold. Numerous sites could have been activated by the co-implanted \ce{O} due to the formation of \ce{Er}-\ce{O} complexes~\cite{kenyon2005}. The observed resonances had linewidths comparable to \ce{Er} in other host crystals\cite{dibos2018,bottger2006} and can be attributed to different environmental inhomogeneities as well as different sensitivities of the optical transition to these inhomogeneities. In Fig. \ref{fig:spectrum}, the spectrum is compared to the resonantly optically excited, electrically detected resonances of single \ce{Er} ions \cite{yin13,deboo20}, indicated by the vertical blue lines, where those excitations were detected via ionization of a nearby charge trap in a \ce{Si} \ac{FinFET} device. Electrical detection resulted in numerous detected resonances at longer wavelengths than \SI{1540}{\nano\metre} which are not observed in the \ac{PLE} spectrum of the current sample. Inherently, optical and electrical detection rely on different decay mechanisms. Optical detection favors sites with a relatively high probability of radiative decay, whereas electrical detection relies on non-radiative decay processes of \ce{Er} sites. The electrically detected spectrum is the resulting histogram from multiple \ac{FinFET} devices with varying wavelength scans, different channel dimensions, background doping, \ce{Er} densities and at temperatures ranging from \SI{20}{\milli\kelvin} to \SI{4}{\kelvin}. In total, we found \SI{5}{\percent} of the optically detected \ac{PLE} resonances are within \SI{1}{\giga\hertz} of the electrically detected resonances, which indicate that they could originate from the same site. This could be confirmed by measuring g-tensors in both sets of sites. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{Figure_4_Magnetic_field_figure_v8.eps} \caption{(a) Inhomogeneously broadened resonance at \SI{1534.194}{\nano\metre} at zero field and the splitting into multiple resonances when \SI{50}{\milli\tesla} is applied. (b) Inhomogeneously broadened resonance at \SI{1523.126}{\nano\metre} under \SIlist{-50;0;50}{\milli\tesla}. P1 indicates the polarization which resulted in a maximum intensity of the left peak at \SI{-50}{\milli\tesla} while P2 indicates the polarization which resulted in a maximum intensity of the right peak at \SI{-50}{\milli\tesla}.} \label{fig:magneticfield} \end{figure} In the next experiment, the splitting of inhomogeneously broadened resonances under an applied magnetic field was studied to understand their site symmetry. The magnetic field was applied perpendicularly to the \ac{SSPD} and sample, and was limited to \SI{60}{\milli\tesla} before the \ac{SSPD} transitioned from a superconducting to normal state. This caused the \ac{SSPD} to be incapable of detecting single photons. Under this magnetic field, the resonances presented in following section that showed a narrow spectral hole did not split sufficiently, indicating a small g-factor along the direction of the magnetic field. Two resonances are presented in Fig. \ref{fig:magneticfield}(a) and Fig. \ref{fig:magneticfield}(b) which showed different site symmetries. \ce{Er} ions in sites below cubic symmetry retain a two-fold Kramers' degeneracy in zero field, which is lifted in an applied magnetic field. This in total gives rise to four different possible optical transitions, assuming the g factors in the \ce{^4I_{15/2}} and \ce{^4I_{13/2}} differ. In the case where \ce{Er} is located in a site with a point symmetry lower than a cubic symmetry of the Si crystal, the number of magnetically inequivalent subsites can increase up to \num{24}, which corresponds to the C$_1$ point symmetry. Splitting of an inhomogeneously broadened resonance into a multiple of well distinguished lines thus confirms that the that the \ce{Er} centers reside in well defined crystallographic sites~\cite{vinh04}. In Fig. \ref{fig:magneticfield}(a) a resonance is showed which splits in six lines, which is explained by magnetically inequivalent sites at a lower site symmetry than a cubic symmetry. In Fig. \ref{fig:magneticfield}(b) a resonance at \SI{1523.199}{\nano\metre} is presented which split in two Zeeman arms with different intensities. The two Zeeman arms were broader than the resonance at zero field, indicating that the remaining two or more lines have not been split sufficiently. The split resonance showed asymmetric peak intensities, which can be attributed to different polarisation dependent oscillator strengths, rather than different Boltzmann populations of the initial states, because the relative intensities of the two peaks can be reversed by rotating the polarisation using a $\lambda/2$ waveplate. Reversing the magnetic field also reversed the peak intensities, further confirming that the difference is not due to differing Boltzmann populations. \subsection*{Homogeneous broadening} \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{Figure_3_schematics_v9.eps} \caption{(a) The pulse schematic of the pump and probe microwave sources. The top curve represents the decay signal when the probe frequency is larger than the homogeneous line width. The lower curve represents the decay signal when the probe frequency is equal to the probe frequency, effectively resulting in a pulse of \num{2}$\text{t}_\text{pump}$ at $\text{f}_\text{pump}$ which leads to a reduced decay signal. The curves have been normalized to $\rho_{res}$ which is the occupation number when the subset is resonantly excited. (b) Upper bound on the homogeneous linewidth at \SI{1538.685}{\nano\metre}. The integrated number of counts up to \SI{1}{\milli\second} after the probe pulse as function of $\text{f}_\text{probe} - \text{f}_\text{pump}$. The data is fitted with a Lorentzian distribution, resulting in a FWHM of \SI{1.5}{\mega\hertz}.} \label{fig:HL} \end{figure} The homogeneous linewidth was investigated using transient spectral hole burning~\cite{Szabo1975}. The method relied on the saturation of the fluorescence of an optical transition when the excitation pulse length exceeds the dephasing time due to the saturation of the atomic transition. The optical laser frequency was modulated using an \ac{EOM}, creating two sidebands \SI{5}{\giga\hertz} apart while suppressing the carrier. The high frequency sideband is centered on the inhomogeneous peak and excites the ensemble for \SI{20}{\micro\second} followed by a \SI{20}{\micro\second} excitation at a detuned laser frequency ($\Delta f$), referred to as the pump and probe pulse respectively. For an equal pump and probe time, the occupation number of the excited state at the end of both pulses is given by \begin{equation} \rho_{ee}(2t_\text{p}) = \begin{cases} \rho_{res}(2t_p) & \text{for } \Delta f = 0\\ 2\rho_{res}(t_p)(1-\frac{1}{2}e^{-t_p/\tau}) & \text{for } \Delta f \gg \gamma_D \end{cases}, \end{equation} where $t_p$ is the pump time, $\rho_{res}$ is the occupation number when excited on resonance, $\tau$ the optical lifetime and $\gamma_D$ the homogeneous linewidth. The excitation and probe pulse length were chosen to be sufficiently short compared to the optical lifetime resulting in $\rho_{ee}(2t_\text{pump}) \approx 2\rho_\text{res}(t_\text{pump}) > \rho_{res}(2t_\text{pump})$ whenever $\Delta f \gg \gamma_D$. The repetition time of \SI{3}{\milli\second} was chosen to be twice the optical lifetime, ensuring the majority of excited \ce{Er} ions have decayed into the ground states. To ensure that the off-resonant low frequency sideband did not affect the spectral hole width, the homogenenous broadening was remeasured while the carrier was present. The results present a comparable width when the carrier is present, concluding that hole width is unaffected by the off-resonant light. Under \SI{360}{\nano\watt} of excitation power, a spectral hole was visible at \SI{1538.685}{\nano\metre} and \SI{1532.254}{\nano\metre}. The data is fitted with a Lorentzian distribution resulting in a \ac{FWHM} of \SI{1.5}{\mega\hertz} [Fig. \ref{fig:HL}(b)] for \SI{1538.685}{\nano\metre} and \SI{2.8}{\mega\hertz} at \SI{1532.254}{\nano\metre}. The upper bound on the homogeneous linewidth is given by half of the spectral hole linewidth~\cite{moerner1988}, thus leading to a maximum homogeneous linewidth of \SI{0.75}{\mega\hertz} (\SI{3.1}{\nano\electronvolt}) and \SI{1.4}{\mega\hertz} (\SI{5.8}{\nano\electronvolt}) for \SI{1538.685}{\nano\metre} and \SI{1532.254}{\nano\metre}, respectively. To study the effect of instantaneous spectral diffusion on the spectral hole, the same measurement was carried out using pump and probe widths of \SI{10}{\micro\second} each. The measurement was also repeated with a \SI{90}{\micro\second} delay between the pump and probe width. The choice of delay was limited by the optical lifetime of the resonance, as a longer delay results in a loss of spectral hole visibility. As can be found in Supplemental Material S-E, a delay of \SI{90}{\micro\second} did not affect the hole width and hence instantaneous spectral diffusion does not play a significant role in the spectral hole linewidth on this timescale. \subsection*{Lifetime} \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{Figure_2_Time_resolved_traces_v2.eps} \caption{(a) Photoluminescence decay curve for the resonance at \SI{1527.565}{\nano\metre} and the background at \SI{1527.461}{\nano\metre}. (b) Fit result of the lifetime for \num{70} resonances. Errorbars show the standard error of the fit. } \label{fig:lifetime} \end{figure} In the following measurement, the optical lifetime of the \num{70} resonances was measured. The lifetime of \ce{Er} varies according to the radiative lifetime of the transition as well as the background doping of silicon~\cite{Priolo1998}. In addition, in this type of fluorescence measurement, the lifetime measured is typically that of the lowest \ce{^4I_{13/2}} level, regardless of which crystal field level was excited, because higher crystal field levels rapidly decay non-radiatively to the lowest state~\cite{Huang2001}. In principle, this means that lines with identical fluorescence lifetimes should be associated with the same site. To measure the fluorescence lifetime, the number of single photon events was repeatedly recorded for \SI{5}{\milli\second} after a \SI{100}{\micro\second} excitation pulse centered on the inhomogeneous peak. The signal decay after the excitation pulse did not follow a single exponential curve, but instead was a combination of the resonant signal and a background signal. To separate this background decay, it was measured at an optical frequency where the photoluminescence resonance was absent. It was found to be wavelength independent and consists of a fast (\SI{\sim 200}{\micro\second}) and a slow (\SI{\sim 800}{\micro\second}) exponential decay [Fig. \ref{fig:lifetime}(a)]. This biexponential decay photoluminescence has been observed in other \ce{Er}:\ce{SI} systems in the past, in \acs{PL} experiments \cite{Coffa1994,Priolo1995,Wu1997,Vinh2005} as well as electroluminescence experiments \cite{Palm1996}. These components are related to the radiative decay of excitons and indirectly excited \ce{Er} ions, respectively. The background is thus attributed to a non-competitive process and can be subtracted from the resonance decay signal. To get a better estimate on the lifetimes, a nearby background decay approximately two times the \ac{FWHM} at the side was measured at every resonance [Supplemental Material S-D]. The difference between the two followed a single exponential decay for most of the resonances, where the largest amplitude decay trace is shown in Fig. \ref{fig:lifetime}(a). A number of resonances show a biexponential decay, marked by $*$ in Table \ref{tab:resonances} and presented in the Supplemental Material S-D. A summary of the lifetimes is presented in Table \ref{tab:resonances}. The optical lifetimes ranged from \SI{0.5}{\milli\second} to \SI{1.5}{\milli\second}, similar to lifetimes found in various \acs{PL} and \acs{PLE} experiments~\cite{Coffa1994,Wu1997,Priolo1998,Taguchi1998,weiss20arXiv} as well as what is expected on theoretical grounds for magnetic dipole transitions~\cite{dodson12}. Compared to the \acs{PLE} results in Ref. \cite{weiss20arXiv}, for the seven resonances that are found in both experiments we found a shorter lifetime for each resonance, with the average difference being \SI{250}{\micro\second}. This reduction in lifetime can be explained by an extra non-radiative mechanism in our crystal, activated by the different geometry or sample parameters. The distribution of lifetime fits and standard errors [Fig. \ref{fig:lifetime}(b)] does not show separated groups with equal lifetimes, thus it is difficult to associate different peaks within the same site based on the lifetime alone. \section*{Discussion} In photonic cavities, the maximum Purcell factor $F = 2g/(\gamma_\text{bulk})$ is determined by the optical transition-cavity mode coupling strength $g$ and is achieved for the cavity mode damping rate, i.e. at the transition between weak and strong coupling regimes~\cite{yamaguchi2008}. Because of the measured sub-megahertz dephasing ($\gamma_\text{D}$) and emission rates ($\gamma_\text{sp}$) of the measured \ce{Er} transitions, the damping rate can be reduced to $\kappa = 4g$. Consequently, the maximum Purcell enhancement is solely defined by the cavity design and the corresponding cavity mode volume $V_\text{m} = 3\lambda^2c/(2\pi n^3F^2\gamma_\text{bulk})$. The \num{6} orders of magnitude Purcell factor required to match state-of-the-art single photon brightness\cite{weiss21} sets an upper bound on the cavity mode volume of $V_\text{m} = 0.1(\lambda/n)^3$ assuming \ce{Er} spontaneous emission rate in \ce{Si} $\gamma_\text{bulk} = \SI{1}{\kilo\hertz}$. Such an ultrasmall cavity mode volume can be achieved in nanobeam \ce{Si} photonic cavities\cite{zhou2019,miura2014} that also provide the required quality factor $Q = 10^5$ ($\kappa = \SI{2}{\giga\hertz}$). The homogeneous linewidth of an \ce{Er} in a nanobeam cavity will be solely limited by the radiative broadening and will exceed the dephasing rate by \num{3} orders of magnitude making \ce{Er} in \ce{Si} a promising platform for carving single photon sources with state-of-the-art brightness and record single photon indistinguishability. Various sample parameters can be investigated and optimized such as the varying the \ce{O} and \ce{Er} concentration, isotopically purifying \ce{Si} and fine-tuning the annealing processes for the purpose of narrowing linewidths, relating to long coherence times. By reducing the \ce{O} concentration for future samples, the \ce{Er}-only sites can be extracted. These sites reside in higher symmetry sites since the lattice is undisturbed by the \ce{O}. Likewise, for \ce{Er}-\ce{O} complexes, the inhomogeneity in the environment is affected at different \ce{O} concentrations and thus could alter the linewidths. The current \ac{SNR} of the \ac{PLE} spectrum suggests that the \ce{Er} concentration can be diminished by up to two orders of magnitude without increasing the repetition number to detect the resonances. A reduced ion concentration leads to less ion-ion interactions, potentially narrowing the homogeneous linewidth and increasing the coherence times. Another realization to reduce inhomogeneities in the environment is to use isotopically enriched $^{28}$\ce{Si} and by optimizing the annealing procedure. \section*{Conclusion} In this paper we use a novel in situ \ac{PLE} method to study in detail the inhomogeneous linewidths and lifetimes of \num{70} resonances, \num{7} of which have been observed in Ref. \cite{weiss21} and \num{63} which have not been resolved in \ac{EPR}, \ac{PL} and \ac{PLE} experiments before. The homogeneous linewidth of a resonance at \SI{1538.685}{\nano\metre} and at \SI{1532.254}{\nano\metre} were studied using transient spectral hole burning and we extracted a homogeneous linewidth of \SI{0.75}{\mega\hertz} and \SI{1.4}{\mega\hertz}, respectively. The technique presented \SI{300}{\milli\kelvin} allows the characterization of samples on a relatively short timescale and thus measuring the dependence on the parameters discussed previously is an accessible realization. Finally, this in situ method can also be applied to optically active dopants in other thin transparent films such as \ce{LiNbO_3} and \ce{SiO_2}. \begin{acknowledgments} We acknowledge the AFAiiR node of the NCRIS Heavy Ion Capability for access to ion-implantation facilities. This work was supported by the ARC Centre of Excellence for Quantum Computation and Communication Technology (Grant CE170100012) and the Discovery Project (Grant DP150103699). We thank Dr. Sae Woo Nam for kind support to establish the \ac{SSPD} fabrication process at the University of New South Wales, Sydney. \end{acknowledgments} \section*{Appendix} \beginappendix \subsection{Detected Er resonances} \begin{longtable}{ >{\RaggedRight}p{0.24\columnwidth} >{\RaggedRight}p{0.24\columnwidth} >{\RaggedRight}p{0.24\columnwidth} >{\RaggedRight}p{0.24\columnwidth}} \caption{Overview table}\label{tab:resonances}\\ \toprule \thead{Wavelength\\(\si{\nano\metre})}& \thead{Linewidth\\(\si{\giga\hertz})}& \thead{Lifetime\\(\si{\milli\second})}& \thead{Amplitude\\(counts/pulse)}\\ \midrule \num{1539.949} &\num{2.82} & \num{1.05} & \num{0.59}\\ \num{1538.685}$^\dagger$ &\num{1.02} &\num{0.764} & \num{4.06}\\ \num{1538.242} &\num{1.81}&\num{0.810} & \num{1.73}\\ \num{1537.851} &\num{3.5}&\num{1.1} & \num{0.26}\\ \num{1537.652} &\num{1.95}&\num{0.70} & \num{0.57}\\ \num{1537.220} &\num{2.5}&\num{1.26} & \num{0.31}\\ \num{1536.762} &\num{0.40}&\num{0.72} & \num{1.29}\\ \num{1536.708} &\num{0.94}&\num{1.11} & \num{0.84}\\ \num{1536.687} &\num{1.5}&\num{0.97} & \num{1.13}\\ \num{1536.518} &\num{0.5}&\num{1.52} & \num{0.25}\\ \num{1536.489} &\num{1.30}&\num{1.10} & \num{0.95}\\ \num{1536.215}$^{*\dagger}$ &\num{1.64}&\num{0.708} & \num{2.39}\\ \num{1536.137} &\num{1.7}&\num{0.97} & \num{0.61}\\ \num{1535.899} &\num{0.83}&\num{1.19} & \num{1.40}\\ \num{1535.199} &\num{0.34}&\num{0.94} & \num{0.45}\\ \num{1534.924} &\num{4.8}&\num{0.81} & \num{0.25}\\ \num{1534.796} &\num{0.42}&\num{1.19} & \num{0.27}\\ \num{1534.672} &\num{4.7}&\num{0.88} & \num{0.57}\\ \num{1534.506} &\num{1.3}&\num{0.84} & \num{0.36}\\ \num{1534.469} &\num{3.2}&\num{0.86} & \num{0.31}\\ \num{1534.371}$^\dagger$ &\num{2.17}&\num{0.575} & \num{1.00}\\ \num{1534.195}$^{*\dagger}$ &\num{1.76}&\num{0.788} & \num{15.96}\\ \num{1534.080} &\num{1.26}&\num{1.20} & \num{1.41}\\ \num{1533.985} &\num{2.3}&\num{1.04} & \num{0.30}\\ \num{1533.885} &\num{2.08}&\num{1.48} & \num{0.80}\\ \num{1533.087} &\num{3.2}&\num{0.90} & \num{0.30}\\ \num{1532.792}$^\dagger$ &\num{1.6}&\num{0.49} & \num{0.41}\\ \num{1532.254}$^{*\dagger}$ &\num{1.208}&\num{0.682} & \num{10.63}\\ \num{1531.886} &\num{0.47}&\num{0.670} & \num{1.83}\\ \caption[]{(continued)}\\ \toprule \thead{Wavelength\\(\si{\nano\metre})}& \thead{Linewidth\\(\si{\giga\hertz})}&\thead{Lifetime\\(\si{\milli\second})}&\thead{Amplitude\\(counts/pulse)}\\ \midrule \num{1530.062} &\num{1.69}&\num{1.15} & \num{0.77}\\ \num{1530.034} &\num{4.5}&\num{1.04} & \num{0.78}\\ \num{1529.955} &\num{3.5}&\num{1.32} & \num{0.95}\\ \num{1529.916}$^{*\dagger}$ &\num{0.97}&\num{0.557} & \num{1.61}\\ \num{1529.657} &\num{1.68}&\num{0.793} & \num{3.31}\\ \num{1528.380} &\num{3.9}&\num{1.14} & \num{1.53}\\ \num{1527.963} &\num{3.9}&\num{0.86} & \num{0.69}\\ \num{1527.851} &\num{6.9}&\num{0.97} & \num{0.41}\\ \num{1527.735} &\num{3.11}&\num{1.31} & \num{1.06}\\ \num{1527.565} &\num{1.43}&\num{0.807} & \num{25.0}\\ \num{1526.776} &\num{4.9}&\num{1.20} & \num{0.52}\\ \num{1526.572}$^*$ &\num{1.70}&\num{0.712} & \num{3.84}\\ \num{1526.171} &\num{1.74}&\num{0.93} & \num{0.69}\\ \num{1526.088} &\num{1.86}&\num{1.07} & \num{1.75}\\ \num{1525.885} &\num{1.8}&\num{1.03} & \num{0.24}\\ \num{1525.848} &\num{3.5}&\num{0.6} & \num{0.15}\\ \num{1525.751} &\num{2.9}&\num{0.98} & \num{0.29}\\ \num{1525.677} &\num{1.4}&\num{1.1} & \num{0.28}\\ \num{1525.513} &\num{2.8}&\num{1.56} & \num{0.32}\\ \num{1524.577} &\num{2.32}&\num{1.17} & \num{3.18}\\ \num{1524.360}$^*$ &\num{1.09}&\num{0.578} & \num{2.41}\\ \num{1523.753} &\num{3.2}&\num{1.3} & \num{0.39}\\ \num{1523.535} &\num{3.8}&\num{1.11} & \num{0.85}\\ \num{1523.126}$^*$ &\num{2.07}&\num{0.689} & \num{7.45}\\ \num{1523.050} &\num{2.9}&\num{0.9} & \num{0.27}\\ \num{1522.917} &\num{2.6}&\num{0.79} & \num{0.81}\\ \num{1522.835} &\num{1.1}&\num{0.76} & \num{0.49}\\ \num{1522.797}$^*$ &\num{0.74}&\num{0.531} & \num{2.61}\\ \num{1522.399} &\num{1.0}&\num{0.82} & \num{0.24}\\ \num{1522.291} &\num{3.6}&\num{0.57} & \num{0.39}\\ \num{1522.114} &\num{1.0}&\num{0.8} & \num{0.19}\\ \num{1522.085} &\num{1.18}&\num{0.53} & \num{0.63}\\ \num{1522.025} &\num{1.13}&\num{0.97} & \num{0.48}\\ \num{1521.994} &\num{1.2}&\num{0.83} & \num{0.26}\\ \num{1521.816} &\num{2.7}&\num{0.54} & \num{0.45}\\ \num{1521.409} &\num{0.65}&\num{1.03} & \num{1.25}\\ \num{1520.926} &\num{3.6}&\num{1.03} & \num{0.24}\\ \num{1520.412} &\num{2.5}&\num{0.83} & \num{0.35}\\ \num{1520.094} &\num{9.1}&\num{0.72} & \num{0.86}\\ \num{1519.793} &\num{2.2}&\num{0.99} & \num{0.56}\\ \num{1518.042} &\num{5.3}&\num{1.15} & \num{0.61}\\ \bottomrule \end{longtable} \noindent$\dagger$ Observed in Ref. \cite{weiss20arXiv}.\\ \noindent* Biexponential decay. \bibliographystyle{apsrev4-2}
\section{Introduction} After prediction of black holes evaporation in presence of quantum matter field by Hawking \cite{Ha} and the black hole entropy by Bekenestein \cite{bec1} which is related to surface gravity of the black hole, Susskind and t'Hooft stated that the theory of quantum gravity within any region is encoded on the surface of that region \cite{Ho,Suss} which is called now as the holographic principle. The best successful theory so far for the holographic principle is the Anti de Sitter-conformal field theory (AdS/CFT) correspondence which is proposed by Maldacena \cite{Mal} for the first time. This correspondence has two consequences such that the quantum gravity in each slice of AdS spacetime is explained by the data on the boundary slice and information which lives on the boundary evolves between the slices of the AdS spacetime by the Hamiltonian of conformal invariant quantum fields. The study of AdS black holes in $d<4$ dimensions are conducted in a variety of ways \cite{btz} \cite{kleber}. For instance one can see \cite{son,abdal} for understanding of the dual field theory in the context of AdS/CFT correspondence and \cite{Kiselev,ours1,ours2,ours3,Chen,olov} for studying of effects of the quintessence fields in 1+2 dimensional black holes spacetimes. Compared to 4D case, BTZ black hole has certain good theoretical properties, e.g. this is just an example, not proposal: turning on angular momentum is simpler compared to 4D case, and something new may be checked by utilizing it. \\ Deep neural network which is known as deep structured learning is part of a broader family of machine learning methods based on artificial neural networks with representation learning. This is shown that is extended to be applicable for more branches of physical science such as the gravitational and the cosmological context (see \cite{Car} for a good review). For instance one can see some published works about application of deep learning method related with gravity as follows: Yong Yang et al used deep learning method to determine atmospheric parameters of white dwarf stars recently \cite{YY}. Christopher J. Shallue and Andrew Vanderburg also used deep learning method to identify exoplanets \cite{Chri}. Matsuoka et al, apply the deep learning method to estimate parameters of atmospheric gravity wave in reanalysis data sets \cite{Matsu}. In fact, neural networks that work according to the laws of physics are called physics-informed neural networks (see \cite{Geo} and references therein). This kind of learning algorithm is inspired by information processing and it is distributed by communication nodes in biological systems. Artificial neural networks models have been used since the 1950s \cite{rosenblatt} and flourished in the 2000s \cite{Hinton}. It is composed of multiple layers to progressively extract higher-level features from the raw input and delivering an output. With respect to the task at hand, the output could be have discrete value or continuous value \cite{Hinton,LeCun}. Recent breakthrough results in computer vision, natural language processing speech recognition, biomedicine and many other domains have produced a massive interest in this direction \cite{vision,bio,speech,nlp}. Hashimoto et al \cite{Has} in their work presented recently a deep neural network representation for the AdS/CFT correspondence. They demonstrated the emergence of the bulk metric function via the learning process for given data sets of response in boundary quantum field theories. In this approach the emergent radial (holographic) direction of the bulk is identified with the depth of the layers, and the network itself is interpreted as a bulk geometry. They showed their network provides a data-driven holographic modeling of strongly coupled systems. By using $\phi^4$ scalar potential for a minimally coupling dynamical scalar field with mass parameter $m$ moving on curved spacetimes with a black hole horizon they demonstrated their deep learning (DL) framework determine the background metric by fitting given response data. Their proposal has two steps as follows: At first step they showed that, from boundary data generated by the AdS Schwarzschild spacetime, the network can reproduce the metric. At the second step they demonstrated that the network with experimental data as an input can determine the bulk metric, the mass and the quadratic coupling of the holographic model. In the paper \cite{Has} they studied also the experimental data of magnetic response of a strongly correlated material Sm0.6Sr0.4MnO3 which has strong quantum fluctuations. At last they showed that their AdS/DL correspondence not only enables gravity modeling of strongly correlated systems, but also sheds light on a hidden mechanism of the emerging space in both AdS and DL. Precedence and novelty of their work is because that for a quantum system given we do not know whether its gravity dual exists and how we can construct a holographic model? In fact for phenomenology, the holographic modelings were successful only for restricted class of systems in which symmetries are manifest, mainly because the mechanism of how the holography works is still unknown. While conventional holographic modeling starts with a given bulk gravity metric, Hashimoto et al novel DL method \cite{Has} solves the inverse problem which means data of a boundary QFT calculates a suitable bulk metric function by assuming the existence of a black hole horizon. To do so we should provide a deep neural network representation of a scalar field equation moving in curved spacetime. The discretized holographic AdS radial direction is the deep layers. The weights of the neural network are identified with metric of the curved spacetime. The input response data is at the boundary of AdS, and the output binomial data is the black hole horizon condition. Therefore, a successful machine learning results in a concrete metric of a holographic modeling of the system measured by the experiment. This is all which is called as AdS/DL correspondence of a deep neural network by Hashimoto et al. When stress tensor of scalar field has zero barotropic index $w=0$ then the 3D black hole reads as planar BTZ black hole while with non vanishing barotropic index $-1<w\leq-\frac{1}{3}$ the 3D black hole is called as quintessence black hole which we like to produce them by using method of Hashimoto et al. The paper is organized as follows:\\ In section 2 we present brief review of architecturing deep neural network and developing deep neural learning model. In section 3 we provide a brief review of 1+2 dimensional BTZ black hole metric solution. Then we investigate correspondence between metric components and parameters of deep neural network for the BTZ planar black hole such that the black hole could feed with in input layer by corresponding boundary data which is labeled with respect to the horizon boundary conditions. Then when data is propagating towards the black hole horizon, the spacetime metric is being reproduced. Section 4 is dedicated to the network architecture, training implementation and data setting. In the last section we investigate conclusion and outlook of the work. \section{Artificial neural network} A neural network, also sometimes is called an artificial neural network, is a kind of processing structure which their name and structure are inspired by the human brain, mimicking the way where the biological neurons signal to one another. Basic building block of a neural network is made in fact by a neuron. We show schematic diagram of a simple neural network in figure \ref{z}. In this figure the artificial neuron takes all the inputs $x_{1,2}$, weights $W$ (shown with solid lines) which is a linear transformation between vector components of the neuron as $x_i\to \Sigma_jW_{ij}x_j$, aggregates (not shown) and an activation function $x_i\to \varphi(x_i)$ which is usually a nonlinear transformation on the vector components of the neuron $x_i$ such that it should deliver the output of the neuron at each layer. In fact the activation function controls value of the output when the neuron is activated. A row of neurons is called layer and a network can have multiple layers. Input layer receives data $x_i$ and delivers output to next layer via two above mentioned transformations as $x_k\to\varphi(W_{kl}x_l)$ and final layer is responsible for delivering values which correspond to result demanded for the problems such that regression, classification and etc. Layers located between first and last ones are called hidden layers. In general for N layers a deep feed-forward neural network can be constructed as follows. \begin{equation} y(x^{(1)})=f_i \varphi (W_{ij}^{(N-1)}\varphi (W_{jk}^{(N-2)}\cdots \varphi (W_{lm}^{(1)}x_m^{(1)}))) \label{ff} \end{equation} where $f_i$ means activation function $x_i\to\varphi(x_i)$ but at last layer which delivers to the target $y(x^{(1)})$. In the learning process, the variables of the Network $(f_i,W_{ij}^{(n)})$ for $n=1,2,\cdots N-1$ are updated by a gradient descent method with a given loss or error function \begin{equation} E=\sum_{data}|y(\bar{x}^{(1)})-\bar{y}|+E_{reg}(W).\label{loss11} \end{equation} Here the sum is over the whole set of pairs $\{(\bar{x}^{(1)},\bar{y})\}$ of the input data $\bar{x}^{(1)}$ and the output data $\bar{y}.$ The regularization penalty term $E_{reg}$ is introduced to require expected properties for the wight \cite{bio}. The equation (\ref{loss11}) can be evaluated by different optimizing methods such as gradient descent, Adam and etc which in fact is an iterative method for optimization of a function. By moving data from input layers to final layer via feed-forward algorithm with suitable smoothness properties it demonstrates how much predicted values are far from values of ground truth $\bar{y}$? This error is then propagated back through the network by applying back propagation algorithm so that the weights are updated according to the amount that they contributed to the error \cite{Rumelhart}. Predictions are made by providing the input to the network and by performing a forward pass and then by generating an output. In this view the architecture means how a model can be constructed from two dimensional input data and one dimensional output feature. With respect to the context of our problem this architecture can be extended to more layers and neurons with various kind of activation functions and operations of between layers \cite{vision,speech,nlp,bio}. In the following section we investigate correspondence between the BTZ black hole metric and neural network components. \begin{figure}[tbp] \centering \includegraphics[scale=1]{1.eps \caption{\label{z} Schematic diagram of a simple neural network in which activation function is shown with the colors so that pink, blue and violet correspond with input, hidden and output neuron layers respectively. Weights are shown with solid lines. Input data is $x_{1,2}$ and output one is $y_1.$ } \end{figure} \section{Neural network for planar BTZ Black holes} In 1992 Baados, Teitelboim and Zanelli investigated and obtained a 3D planer black hole which is called now BTZ black hole solution \cite{btz}.In absence of the cosmological constant, there is no black hole containing event horizons in 3D curved spacetimes but thanks to the negative cosmological constant there is BTZ black hole metric solution which provides properties similar to ones which are appeared for 4D Schwarzschild black holes. By considering planar topology, general form of metric field in 1+2 dimensional black hole spacetimes is \begin{equation}{\label{metrica1}} ds^{2}=-f(r)dt^{2}+f(r)^{-1}dr^{2}+r^{2}dx^{2}, \end{equation} where $x$ is a planar coordinate, $r$ is the radial coordinate and $f(r)$ stand for the blacking functions. Einstein's field equations can be written as \begin{equation}{\label{eq}} R_{ab}-\frac{1}{2}g_{ab}R-\frac{1}{L^{2}}g_{ab}=8\pi T_{ab}, \end{equation} where $a,b=1,2,3$ in 3D spacetimes and $L$ is the AdS radius. The right side stress tensor is assumed to be perfect non viscous fluid such that \begin{equation}\label{energymomentum} T^{t}_{t}=T^{r}_{r}=-\rho, \hspace{0.3cm} T^{x}_{x}=(2w+1)\rho, \end{equation} where $\rho$ and $w$ are energy density and the state parameter of the fluid respectively \cite{btz,Kiselev}. By substituting the stress tensor (\ref{energymomentum}) and by solving the Einstein's equations (\ref{eq}) with respect to the line element (\ref{metrica1}) we obtain \begin{equation}\label{solucaometrica} ds^{2}=-\frac{r^{2}}{L^{2}}f(r)dt^{2}+\frac{L^{2}}{r^{2}}f(r)^{-1}dr^{2}+\frac{r^{2}}{L^2}dx^2, \end{equation} where blacking function takes on the following form. \[ f(r)=1-\left(\frac{r_{+}}{r}\right)^{\sigma}, \hspace{0.3cm} \sigma=2(1+w_{q}), \] in which $r_+$ is radius of the black hole event horizon and for BTZ model $\sigma=2$ can be written versus the ADM mass of the black hole $M$ and the AdS radius $L$ such that $r_{+}=\left(M L^2 \right)^{1/2}$ \cite{btz,Kiselev}. In fact the BTZ 1+2 dimensional black hole in a Schwarzschild coordinates is stationary and axially symmetric because it has two Killing vectors $J^t\partial_t$ and $J^\varphi\partial_{\varphi}$ and generically has no other symmetries for which the event horizon is determined by $M, L, J^\varphi$. In the above planner line element we eliminated axially symmetric property of the BTZ black hole by using the planner symmetry and so the constant angular momentum $J^\varphi$ is negligible. The case $w=0$ corresponds to the non-quintessence BTZ black hole and $-1<w<-\frac{1}{3}$ corresponds to quintessence black hole, which in this paper we are interested for particular choices $w=\{0,-\frac{1}{2},-\frac{3}{4}\}$ and design artificial neural networks in order to represent scalar field in background of them.\\ In order to facilitate designing neural network architecture we use the following conformal transformation for $r$ coordinate. \begin{equation} dz=f^{-\frac{1}{2}}dr, \end{equation} in which $z$ is holographic direction and by integrating of the above transformation we have \begin{align} r=r_+\cosh\left(\frac{z}{L}\right). \end{align} By substituting this into the line element (\ref{metrica1}) we obtain \begin{align} ds^2=-f(z) dt^2 + dz^2 + g(z)dx^2 \label{genericm} \end{align} where the BTZ metric components are given versus the holographic $z$ parameter as follows. \begin{align}{\label{metrica2}} f(z)\equiv \frac{r_+^2}{L^2}\! \left(\sinh \frac{z}{L}\right)^{2}, \quad g(z) \equiv \frac{r_+^2}{L^2} \left(\cosh \frac{z}{L}\right)^{2}. \end{align} In this conformal frame the boundary of the AdS is located at infinity $z\to\infty$ for which $f(z)\to g(z)\approx (r_+^2/4L^2)\exp(2z/L)\to\infty$ while the black hole horizon lives at $z_h=0$ for which $f(z)=0$ and $g(0)=(r_+^2/L^2)$. As an application of neural network model we like to study interaction of a scalar field with the BTZ black hole metric as follows. We consider a minimally coupling massive scalar field with self interaction potential $V(\phi)$ which is propagated in the spacetime (\ref{genericm}). Dynamics of this field is described by the following Lagrangian density. \begin{equation}\label{Lag} \mathcal{L}=\sqrt{g}\bigg\{\frac{1}{2}g^{\mu\nu}\partial_\mu\phi\partial_{\nu}\phi-\frac{1}{2}m^2\phi^2-V(\phi)\bigg\}, \end{equation} in which $g=|\det{g_{\mu\nu}}|$ is absolute value of determinant of the metric field $g_{\mu\nu}$ and by varying with respect to the field $\phi$ the corresponding Euler Lagrange equation reads \begin{equation} \square\phi+m^2\phi+\frac{\delta V}{\delta \phi}=0,~~~\square\equiv g^{-\frac{1}{2}}\partial_\mu(g^\frac{1}{2}g^{\mu\nu}\partial_\nu) \end{equation} which for (\ref{genericm}) can be written as the following first order differential equation. \begin{equation} \partial_z\pi+R(z)\pi+m^2\phi+\frac{\delta V[\phi]}{\delta\phi}=0,\label{eom} \end{equation} where $\pi\equiv \frac{\partial \phi(z)}{\partial z}$ is canonical momenta of the field $\phi$ and \begin{equation} \label{pot}R(z)=\frac{1}{2}\frac{d\ln(f(z)g(z))}{dz}=\frac{\sigma-2+2\cosh\big(\frac{2z}{L}\big)}{L\sinh\big(\frac{2z}{L}\big)}\end{equation} is an effective potential. This potential is singular on the black hole horizon $z_h=0$ but has finite value $R(\pm\infty)=\pm\frac{2}{L}$ on the AdS boundary. The equation (\ref{eom}) together with $\pi\equiv \frac{\partial \phi(z)}{\partial z}$ can be solved via neural network system by discretization method. To do so the strategy should be providing a manifestation of scalar field equation in deep neural network scheme \cite{Has} where holographic direction $z$ mimics the deep layers and the neurons are shown with 2 components vectors $(\phi(z),\pi(z))$. Correspondence of the field equation with the neural network system is possible by discretizing the equation of motion in holographic direction $z$ such that \cite{Has} \begin{gather} \phi(z+\Delta z)=\phi(z)+\Delta z\pi(z), \notag \\ \pi(z+\Delta z)=\pi(z)-\Delta z\bigg(R(z)\pi(z)+m^2\phi(z)+\frac{\delta V(\phi)}{\delta\phi(z)}\bigg), \label{Discretization} \end{gather} which can be written with matrix form as follows. \begin{equation}\label{Mat1}\left \begin{array}{c} \phi(z+\Delta z) \\ \pi(z+\Delta z) \\ \end{array \right)=\left \begin{array}{cc} 1 & \Delta z \\ -m^2\Delta z & 1-R(z)\Delta z \\ \end{array \right)\left \begin{array}{c} \phi(z) \\ \pi(z) \\ \end{array \right)+\left \begin{array}{c} 0 \\ -\frac{\delta V(\phi(z))}{\delta \phi(z)}\Delta z \\ \end{array \right)\end{equation}where $\Delta z$ is distance of adjacent points in discrete coordinate system with $z^{(n)}\equiv(N-n+1)\Delta z$, and $N$ is total number of neural network layers. According to the figure 1 for the equations (\ref{Mat1}) we can use $x_1\equiv\phi(z)$ and $x_2=\pi(z)$ for components of the vector neurons $(\phi(z),\pi(z)).$ Regarding these and linear affine transformation $x_{i}\to \sum_j W_{ij}x_{j}$ one can obtain weights matrix $W_{ij}$ for the equations (\ref{Mat1}) as \begin{equation}\label{Mat2} W^{(n)}=\begin{pmatrix} 1&\Delta z\\ -m^2\Delta z &1-\Delta z R(z^{(n)}) \end{pmatrix} \end{equation} for $n$ layers and by regarding the nonlinear transformations $x_{i}\to\varphi(x_{i})$ for each layer one can obtain activation function for output data on each layer as follows. \begin{equation}\label{f} \begin{cases} \varphi_1(x_1)=x_1 \\ \varphi_2(x_2)\to x_2-\Delta z\frac{\delta V(x_1)}{\delta x_1}. \end{cases} \end{equation} In fact the definitions (\ref{Mat2}) and (\ref{f}) bring the scalar field system in curved geometry (\ref{Lag}) into the form of neural network (\ref{ff}) \cite{Has}. Thus one can infer that architect of a neural network system in this paper corresponds to scalar field equation in BTZ black hole spacetime in which the weights of network play role of the BTZ black hole metric, $\varphi_{1,2}$ take on role of the activation functions and holographic direction should mimic depth of the network. For simplicity, in the rest of the paper we set $L=1$, $m=1$ and $V[\phi]=\frac{\lambda\phi^4}{4}$ (the Higgs potential) with $\lambda=1$ and number of hidden layers to be 8 which yields to $\Delta z=-0.1,$ $z_{b}=1$ and $z_{h}=0.1$ (the horizon cut off frequency) which is used to regularization of interacting quantum scalar fields. In fact input data for $\phi$ originates from quantum fluctuations of the field (see Eq. 9 in ref. \cite{Has}) which whose frequencies approach to infinite value on the black hole horizon and they should be regularized. In the following section we investigate numerical processing to produce output data or target. \section{The network architecture, training implementation and data setting } The architectures of our neural network setup with total 10 layers is shown schematically in figure \ref{q} and corresponding data are collected in the table 1 by designing as 8 hidden layers with two input and output layers. \begin{figure}[!htbp] \centering \includegraphics[scale=0.9]{2.eps} \caption{The architectures of our neural network setup composed with 8 hidden layers consists of two neurons in each input and hidden layers and one neuron in output layer respectively. } \label{q} \end{figure} The architecture is implemented via PyTorch ecosystem \cite{Paszke} in GPU mode. The dataset can be randomly produced by drawing values of independent variables $\phi$ and $\pi$ in AdS boundary $z=1$ for domains $\phi\in[0, 1.5]$ and $\pi\in[-0.2, 0.2]$ respectively and transform them to the black hole horizon $z_{h}=0$ by applying the equation of motion (\ref{Discretization}) for metric potential (\ref{pot}) (see figure \ref{3}). To do so we choose 1000 positive value data which can be identified by \newcommand*\abs[1]{\lvert#1\rvert} $\abs{F}<0.1$ as cut off on the horizon and 1000 negative value data corresponding to $\abs{F}>0.1$ which are labeled with $y_+=0$ and $y_-=1$ respectively. In fact the boundary condition at the horizon can be used as a classifier to categorize generated dataset into binary classes such that for some positive input data the output at the final layer should satisfy \begin{equation} 0=F\equiv\left[\frac{2}{\eta}\pi+m^2\phi+\frac{\delta V(\phi)}{\delta\phi}\right]_{z_{fin}} \label{boundary_condition} \end{equation} in which $z=z_{fin}<<1$ is the horizon cutoff. Dataset will be injected into the neural network in 200 batches. In other words we choose 100 batches for positive and 100 batches for negative value data respectively which they propagate through the neural network from visible layer ($z_{h}$) to the final layer ($z_{fin}$) via equation of motions. Our final layer is defined by the map $F$ such that the output data is $y_+=0$ for a positive answer response data originated from quantum fluctuations of the field \cite{Has}. In fact for limits $z_{fin}=0$ the condition (\ref{boundary_condition}) reads $\pi(z=0)=0.$ Now we can make the deep neural network to learn the metric component function $h(z)$, the mass parameter of the field $m$ and the interaction potential $V(\phi)$. The training is done by the loss function (\ref{loss11}). In fact experiments provide only positive answer data with $y_+=0,$ while for the training we need also negative answer data which is to generate false response data and so we assign output $y_-=1$ for the latter case. By according to choice given by \cite{Has} we use a function $\tanh|F|$ for the final layer rather than just $F$, because $\tanh|F|$ provides $y\to1$ for any negative input. By regarding these choices the final output of the neural network is made as binary. In this view the activation function of final layer for cases $w=0,~w=-\frac{1}{2}$ and $w=-\frac{3}{4}$ can respectively given by \cite{Has}, \begin{equation} f(F)=1+0.5\tanh[100(F-0.1)]-0.5\tanh[100(F+0.1)], \label{af1} \end{equation} \begin{equation} f(F)=1+0.5\tanh[Q(F-0.1)]-0.5\tanh[0.6 (F+0.1)]. \label{af2} \end{equation} and \begin{equation} f(F)=1+0.5\tanh[1.1(F-0.1)]-0.5\tanh[P(F+0.1)]. \label{af3} \end{equation}where $Q=\{0.6,0.9,1.1\}$ and $P=\{0.6,0.8,0.9\}.$ Looking at the figures 10 and 12 one can infer that the best fit is happened for $Q=0.6$ and $P=0.9$. and to choose physically sensible metric among other learned metrics we use lose function (\ref{loss11}) and the penalty or regularization term given by the discrete form of the metric potential (\ref{pot}) as $E_{reg}=3\sum_{n=1}^{N-1}(z^i)^4(R(z^{i+1})-R(z^{i}))^2$ to plot variation of loss function versus the leaning rate in figure 4. This diagram shows minimum variant of the error function is happened for learning rate $0.1$ approximately. In the error function (\ref{loss11}) the quantities ${(\bar{x}_i, y_i(\bar{x}))}$ are the training dataset and $\bar{y}$ is ground-truth y. The produced errors by loss function can be saved up across all of the training examples and the network can be updated at the end. \begin{figure}[!htbp] \centering \includegraphics[scale=1]{3.eps} \caption{ The data generated by the discretized BTZ metric (\ref{pot}) to visualize how numerical values should be used as data processing. The green points correspond to the positive data $y_+ =0$ and the red points correspond to the negative data $y_-=1$. This diagram is produced for non quintessence BTZ black hole $w=0$ and for quintessence cases $w=-\frac{1}{2}, -\frac{3}{4}$ we will have similar diagrams (not shown).} \label{3} \end{figure} The hyperparameters or training parameters which we used in this work are as follows: The batch size namely number of training samples which is used to compute the gradient at each update is 10 for non-quintessence case $w=0$ and 100 for quintessence cases $w=-\frac{1}{2}, -\frac{3}{4}$. The optimum learning rate hyperparameter is chosen with numeric values $0.0001 $ and $0.01$ for non-quintessence and quintessence cases respectively. (These values for learning rate can be detected by design an algorithm which lead us to an optimal learning rate for making the model. In the following subsection we will be talking about the procedure of finding optimum learning rate). Looking at the figures 5 one can infer that presence of an suitable penalty or regularization term is crucial to choose well learned metric among other learned metrics. In figures 5 and 6 by using tuned values of learning rate and batch size we have illustrated the impact of epochs on performance of model. It can be seen in figure 6 with 50,000 epochs in which the emerged metric mimics ground-truth metric pretty well. To check how well the model is learned \cite{lr}, the optimization learning curves and the performance learning curves are plotted for epoches 10,000, 30,000 and 50,000 respectively in figures 7, 8 and 9 respectively . In fact these learning curves are as diagnostic tools for plot of model learning optimization, performance over experience or times.Looking at these diagrams one can infer that it is vivid the model which learned with 50,000 epochs behaves better. \subsection{The dynamics of learning rate} The learning rate hyperparameter controls the speed at which the model learns. A large learning rate allows the model to learn faster and a small learning rate may allow the model to learn better but the price has to be paid is longer learning time. A learning rate that is too large could result in large weight updates which causes the objective function of the model shows an oscillation behavior with respect to the training epochs. The source of oscillating behavior gets back to weights that are diverging. On the other hand, a learning rate that is too small may get stuck on a suboptimal solution. Diagnostic plots can be used to investigate how the learning rate impacts learning dynamics of the model. This is investigated by Leslie N. Smith in \cite{lrn} in depth. He has demonstrated that if a model be trained initially by a low learning rate and then it get increased exponentially or linearly at each iteration a good learning rate candidate could be achieved but if we monitor the learning at each iteration and then plot the logarithm of learning rate versus loss function, there will be spotted as the learning rate increases and a point is appeared where the loss decreases to stops emerges and then starts to increase again. This minimum point is the point we will be choosing the as the learning rate hyperparameter of our model. In order to find minimum value of the error function we utilized \textsc{Adam} optimizer \cite{adam} with starting learning rate $0.1$ and corresponding exponential decay as $\beta_1=0.05$. In fact the \textsc{Adam} optimizer is an adaptive learning rate optimization algorithm where momentum instead of the gradient of current step is applied to guide the search. In other words it is combined directly as an estimate of the first order moment of the gradient and accumulates the gradient of the past steps to determine the direction to go. By conducting experiment base on what explained above in order to find optimum learning rate we obtain diagram of figure 4-a for non quintessence case and figure 4-b for quintessence case where in both of them a quick drop can be observed in the loss function. In fact increasing the learning rate further will cause an increase in the loss and even diverge from the minimum because of the parameter updates. \section{conclusion} In this paper by leveraging correspondence of AdS/CFT and AdS/SL we design deep neural network architecture for 3D planar BTZ and quintessence black holes to learn boundary data which lives on conformal field theory side. To do so we saw that the weights of network play the role of metric and holographic direction mimics the depth of network. Such that data propagates from boundary to horizon of black hole and cause to produce the background metric. We have considered a penalty regularization term for loss function such that to be only sensible with respect to the reality metric to be chosen among other learned metrics. In order to achieve a high-performing model, hyperparameters tuning has been conducted. We have noticed loss function convergence heavily depends on the number of epochs and learning rate. Finding faster convergence for loss function motives us to investigate the impact of learning rate on neural network performance by performing an experiment where we gradually increase exponentially the learning rate to observe for steepest drop in loss function which has guided us to pick up suitable learning rate parameter. The message of our paper is that the emerged spacetime could be a more universal phenomenon and helps to understand emergence of spacetime in holographic three dimensions. In this case one can infer that the ADS/DL correspondence and neural network data processing paradigm could be an applicable model instead of the unknown pure quantum gravity theory. Such that it can say us what is happening at Planck scale of the nature? As we saw, the error function has an integral relationship with the emergent metric function, so the physical parameters of the assumed black hole, such as electric charge, angular momentum, or other physical quantities, (for instance quintessence effect which is considered here ), will play an important role to form the loss function and so correspondence of two emergent metric and ground truth metric. Checking of the work for angular momentum effect of the BTZ black hole via deep learning and neural network data processing, is needed more time to produce the numerical processing which we intend to do in the next work. \vspace{0.5cm} \centering \begin{tabular}{|c|c|c|c|} \hline Layer & Transformation & Output & dimension \\ \hline $h_0$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_1$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_2$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_3$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_4$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_5$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_6$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_7$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_8$ & affine linear & $(\phi_1,\phi_2)$ & $ 2 $ \\ $h_{9}$ & linear & f(F) & $ 1 $ \\ \hline \end{tabular} \begin{center} Table 1. Architecture used in the networks with batch size 10. \end{center} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{4}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{lrn}} \hspace{3mm} \caption{Behavior of the loss function versus the learning rates: (a) is plotted for non-quintessence $(w=0)$ which shows for small learning rates the iterations become large and so minimum of the loss function is happened at long times. (b) is plotted for quintessence $(w=-\frac{1}{2},-\frac{3}{4})$ and it shows for large learning rates the loss function pass far from the observed steepest gradient point (red dot) and so the ADAM optimizer does not never obtain minimum value for the loss function. But if we choose best value for the learning rates equal to the steepest gradient point the loss function reaches to its minimum value as soon.} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{5}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{6}} \hspace{3mm} \caption{The emerged metric and the ground-truth metric has been portrayed with and without the penalty term respectively at (a) and (b) after $10000$ epochs for non quintessence case $w=0$ .} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{7}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{8}} \hspace{3mm} \caption{For case of non quintessence $w=0,$ the emerged metric and the ground-truth metric penalty term has been portrayed at (a) and (b) after $30000$ and $50000$ epochs respectively.} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{9}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{10}} \hspace{3mm} \caption{The loss and statistical R-Squared accuracy over $10000$ epochs. Each iteration corresponds to the number of epochs to be over $15$. This diagrams are plotted for non quintessence case $w=0.$} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{11}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{12}} \hspace{3mm} \caption{The loss and statistical R-Squared accuracy over $30000$ epochs. Each iteration corresponds to the number of epochs to be over $15$. This diagrams are plotted for non quintessence case $w=0.$} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{13}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.5\textwidth]{14}} \hspace{3mm} \caption{The loss and statistical R-Squared accuracy over $50000$ epochs. Each iteration corresponds to the number of epochs to be over $15$. This diagrams are plotted for non quintessence case $w=0.$} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{117}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{116}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{115}} \hspace{3mm} \caption{The learned metric with 1000 epochs with learning rate 0.01 with quintessence case $w=-\frac{1}{2}$ for different activation functions of last neurons given by the equation (\ref{af2}) at (a) for $Q=0.6$, (b) for $Q=0.9$ and (c) for $Q=1.1$ respectively.} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{117loss}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{116loss}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{115loss}} \hspace{3mm} \caption{ The behavior of the loss functions with confidence interval $95$ percent for 1000 epochs with learning rate 0.01 and quintessence $w=-\frac{1}{2}$ for different activation functions of last neurons given by the equation (\ref{af2}): (a) for $Q=0.6$, (b) for $Q=0.9$ and (c) for $Q=1.1$ respectively.} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1106}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1108}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1109}} \hspace{3mm} \caption{ The learned metric with 1000 epochs with learning rate 0.01 for quintessence $w=-\frac{3}{4}$ for different activation functions of last neurons given by the equation (\ref{af3}) at (a) for $P=0.6$, (b) for $P=0.8$ and (c) for $P=0.9$ respectively.} \end{figure} \begin{figure}[ht] \centering \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1106L}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1108L}} \hspace{3mm} \subfigure[{}]{\label{1} \includegraphics[width=0.45\textwidth]{1109L}} \hspace{3mm} \caption{The behavior of the loss functions with confidence interval $95$ percent for 1000 epochs with learning rate 0.01 and quintessence $w=-\frac{3}{4}$ for different activation functions of last neurons given by the equation (\ref{af3}): (a) for $P=0.6$, (b) for $P=0.8$ and (c) for $P=0.9$ respectively.} \end{figure} \noindent
\subsection{Multilingual Modeling} \subsection{Task and Dataset Selection} It is important to select suitable tasks for our MTG\xspace benchmark to make it diverse and challenging. Thus, we define several criteria during the task selection procedure: \noindent \textbf{Task Definition} Tasks should be well-defined, which means that humans can easily determine whether the generated results meet the task requirements. \noindent \textbf{Task Difficulty} Tasks should be solvable by most college-educated speakers. In the meantime, they should be challenging to current models, the performance of which in various test scenarios falls short of human performance. \noindent \textbf{Task Diversity} Tasks should cover a wide range of generation challenges that allow for findings to be as general as possible. \noindent \textbf{Input Format} The input format of the tasks needs to be as simple as possible to reduce the difficulty of data processing. Besides, it should not contain anything but text (e.g., without any images or videos). In order to meet the above criteria, 8 domain experts are asked to vote from 10 typical generation tasks\footnote{These generation tasks are story generation, commonsense generation, style transfer, question generation, question answering, dialogue generation, title generation, text summarization, image caption, and data-to-text generation.}. Finally, four generation tasks are selected for MTG\xspace, which are story generation, question generation, title generation and text summarization. \textbf{Story generation} (SG) aims to generate the end of a given story context, which requires the model to understand the story context and generate a reasonable and fluent ending~\cite{guan2019story}. \textbf{Question generation} (QG) targets at generating a correct question for a given passage and its answer~\cite{duan2017question}. For the same passage with different answers, the system should be able to generate different questions. \textbf{Title generation} (TG) converts a given article into a condensed sentence while preserving its main idea~\cite{jin2002new}. The title should be faithful to the original document and encourage users to read the news at the same time. \textbf{Text summarization} (Summ) aims to condense the source document into a coherent, concise, and fluent summary~\cite{mani2001automatic}. It is similar to title generation but the output of text summarization is relatively longer. These four tasks focus on different generative abilities and realize different goals. After confirming the tasks, the next step is to choose the dataset for each task. The two selection principles are listed as follows:(1) \textbf{License:} Task data must be available under licenses that allow using and redistributing for research purposes. The dataset should be free and available for download. (2) \textbf{Quality:} The dataset size should be as large as possible and the quality should be checked. English datasets are chosen as the initial datasets because they are more accessible in all four tasks and have relatively larger size compared with datasets in other languages. We choose ROCStories~\cite{mostafazadeh2016corpus} for story generation, SQUAD $1.0$~\cite{rajpurkar2016squad} for question generation, ByteCup \footnote{https://www.biendata.xyz/competition/bytecup2018/} for title generation and CNN/DailyMail~\cite{nallapati2016abstractive} for text summarization. These datasets are popular in the corresponding fields and have been verified to be high-quality by many works. Moreover, they are all under a permissive license. An overview of all task datasets is shown in Table \ref{tab:tasks}. \subsection{Language Selection} The original datasets are in \textbf{English} (en) only and we want to extend them into a multiway parallel form. This means that all English texts should be translated into other languages, which will lead to high annotation costs. Thus, a state-of-the-art translator is leveraged to do the translation and then annotators are asked to correct the translated text. Considering this construction method, MTG\xspace should contain languages that (1) have good English-to-X translators and (2) are diverse in language family. Finally, \textbf{German} (de), \textbf{French} (fr), \textbf{Spanish} (es) and \textbf{Chinese} (zh) are chosen. German is from the same language branch as English while French and Spanish are from different ones. Chinese is more distant from the rest of languages in the language family tree. \input{tabs/dataset.tex} \input{tabs/correlation_and_ensemble_choose.tex} \subsection{Data Collection} \label{sec: data collection} After determining the tasks and languages, we introduce the data collection process to get the MTG\xspace. The Google Translate\footnote{https://translate.google.com/} is used to translate the English datasets to the selected languages. To control the quality of translated texts, we back translate the text to English and filter the samples whose n-gram overlap ratios with the original English texts are lower than a certain threshold. Different threshold values (from $0.3$ to $0.6$ with $0.1$ as step length) are tested and if it is set to $0.6$, the training data size of QG will drop more than $60\%$. Thus we decide to use $0.5$ as the threshold number to improve the quality of the filtered data while still maintaining more than $70\%$ of the original training data.\footnote{The detailed sizes of the filtered datasets with respect to different thresholds are included in appendix \ref{sec:back translation threshold}.} Samples in four languages are aligned to ensure that the dataset is multiway parallel. $20,000$ samples of each task and language are randomly selected for annotation under the premise of ensuring inter-language alignment. The annotators are required to further check the translated results based on the following rules: (1) \textbf{Semantic aligned} Whether the target text is meaningful and is fully semantic aligned with the source text. (2) \textbf{Fluency} Whether the translated text is grammatically correct. (3) \textbf{Style} Whether the translation follows the norms of local culture, language conventions, and gender-related words. If the translated text contradicts any of the above rules, annotators will correct it accordingly. The annotated data is then split to $15$k/$2$k/$3$k as training/development/test subsets. A team of 10 full-time experts\footnote{There are 3 language experts for German, 3 for French, 4 for Spanish and 4 for Chinese} are hired to do the annotation, who are paid daily. Some part-time workers\footnote{There are 16 part-time workers who are participated in the German annotation, 39 for French, 4 for Spanish and 15 for Chinese.} are also employed to increase the annotation throughput, who are paid by the number of annotations. Each annotator is an expert in at least two languages (English and another target language). They are trained to correct translation errors according to the above rules, first a small number of samples for trial, these annotation results are re-checked by us and feedback is given to the annotators to help them understand the tasks better. After this annotation training process, the annotators start to annotate the dataset. For quality control, we sample $2\%$ from the annotations and arrange for 9 experts to double-check them. Each example is assigned to two other experts and the data is qualified only if both of them agree on the annotation\footnote{The grammar, expressions, and punctuation of the annotated text are completely correct and the expressions are in accordance with the foreign language.}. If more than $5\%$ of the annotations fail, then all the data of that annotator for that day will be re-checked. Then the multiway parallel generation benchmark MTG\xspace is finally completed. It contains four different generation tasks in five languages and its quality is improved by the incorporation of human annotation. However, the number of human-annotated data is still small due to cost concerns. Introducing more human-annotated data or carrying out extra filtering for machine-translated data can be future directions to further improve the quality of MTG\xspace. The statistics of MTG\xspace is shown in Table \ref{tab:dataset}. \subsection{Baseline Models} \label{sec:models} The performance of the following four popular multilingual pretrained models is explored\footnote{Detailed descriptions for models are included in Appendix \ref{sec:experimental settings}.}: \textbf{M-BERT} Multilingual BERT (M-BERT)~\cite{devlin2019bert} is a language model pretrained from monolingual corpora in $104$ languages using Masked Language Modeling (MLM) task. \textbf{XLM} The Cross-Lingual Language Model (XLM)~\cite{lample2019cross} is pretrained with Masked Language Modeling (MLM) task using monolingual data and Translation Language Modeling (TLM) task using parallel data. \textbf{mBART} Multilingual BART (mBART)~\cite{liu2020multilingual} is a pretrained encoder-decoder model using denoising auto-encoding objective on monolingual data over $25$ languages. \textbf{mT$5$} Multilingual T$5$ (mT$5$)~\cite{xue2020mt5} is a multilingual variant of T$5$~\cite{2020t5} formatting all tasks as text-to-text generation problems. mT$5$ is pretrained on a span-corruption version of Masked Language Modeling objective over $101$ languages. \subsection{Evaluation Metrics} In order to fully understand the model performance, the quality of generated texts is evaluated from different aspects, including metrics measuring the relevance between outputs and references (e.g., BLEU, ROUGE, and BERTScore) and metrics measuring the diversity of the generated texts (e.g., Distinct). Moreover, we propose a new ensemble metric leveraging relevance metrics to measure how close the generated text is to human writing. It not only has higher correlation scores with human judgments but also is capable of measuring model performances fairly between languages. \textbf{N-gram based Metrics} N-gram based metrics evaluate the text-overlapping scores between the outputs and references. The following three metrics are used: (1) \textbf{BLEU}~\cite{papineni2002bleu} is a popular metric that calculates the word-overlap scores between the generated texts and gold-standard ones. We use the BLEU-4, which is the average score for unigram, bigram, trigram, and 4-gram. (2) \textbf{ROUGE}~\cite{lin2004rouge} is a recall-oriented metric that counts the number of overlapping units such as n-gram and word sequences between the produced texts and gold-standard ones. (3) \textbf{METEOR}~\cite{banerjee2005meteor} relies on semantic features to predict the similarity scores between system hypotheses and human references. \input{tabs/monoVSmulti.tex} \textbf{Embedding based Metrics} The embedding-based metrics can, to a large extent, capture the semantic-level similarity between the generated text and the ground truth. \textbf{BERTScore}~\cite{zhang2019bertscore} computes the similarity of candidate and reference as a sum of cosine similarities of tokens using BERT contextual embeddings. \textbf{Diversity Metrics} We also employ the distinct metric~\cite{li2016diversity}, which calculates the proportion of the distinct n-grams in all the system hypotheses and can be used to evaluate the diversity of the generated texts. \textbf{Human Evaluation} Human evaluation is also leveraged to better estimate the quality of model outputs. Specifically, $30$ cases are randomly sampled from the test set for each task and language while ensuring all $30$ cases are aligned among five languages, and then they are presented to human annotators with the model outputs. The generated texts are evaluated under task-agnostic and task-specific aspects. Task-agnostic aspects include \textbf{Grammar}, \textbf{Fluency}, \textbf{Relevance} and \textbf{Language Fusion}. The former three aspects are scored from $1$ to $5$ while the language fusion score is set to $1$ if all tokens of a model-generated text are in the target language and $0$ otherwise. Besides task-agnostic aspects, the generated text is also evaluated under task-specific aspects. For title generation and summarization, coverage measures the degree to which the generated text covers the main content of the document. Correspondence for question generation measures the extent to which the generated question is matched with both document and answer. For story generation, we further evaluate whether the generated story is logically feasible. All task-specific aspects are scored from $1$ to $5$. \textbf{Ensemble Metric} Some N-gram based metrics such as BLEU and ROUGE largely depend on the tokenizer for specific languages. For example, BLEU scores for Chinese outputs are relatively high because it simply uses a character-level tokenizer. This causes unfair comparison between different languages. To this end, we propose an ensemble metric that evaluates the degree to which a piece of text resembles manual writing. It not only enables fair comparison between languages but is also proved to have a better correlation with human-annotated scores at the end of this subsection. We first average the grammar, fluency and relevance scores as targets, then normalize the automatic metrics and human scores among every language to eliminate the score discrepancy between languages. Three relevance metrics (BLEU, ROUGE-L, and BERTScore-F1) are gathered as features. The samples are split into training, development and test sets. After comparing different regression models' performance as shown in the upper part of Table \ref{tab:correlation all} , we finally choose bagging regression model~\cite{breiman1996bagging} as the ensemble metric. Moreover, the bagging ensemble metric shows a higher correlation with human-annotated scores compared with other relevance automatic metrics as shown in the lower part of Table \ref{tab:correlation all}. \subsection{Evaluation Scenarios} \label{sec:scenarios} To validate the effect of different experimental settings on model performance, several state-of-the-art multilingual models are studied under four evaluation scenarios. \textbf{Monolingual fine-tuning} The pretrained model is tuned for a downstream task using the training data for a specific language and evaluated on the test set for the same language. \textbf{Multilingual fine-tuning} The pretrained model is jointly fine-tuned with data in all languages for a specific task. Different from the monolingual fine-tuning setting, there is only one model for each downstream task, which can serve all languages. \textbf{Cross-lingual generation} Since MTG\xspace is multiway parallel, it can be reorganized to create input-output pairs that belong to different languages. In this paper, we make use of the multiway parallel data to do the supervised cross-lingual training, e.g., for English centric cross-lingual training, we take the English source as the input and the parallel German, French, Spanish, Chinese target as the output. Then we evaluate the model on same setting (en->de, en->es, en->fr, en->zh). The cross-lingual generation performances on all $5*4$ directions are evaluated. \textbf{Zero-shot transfer} We also try to explore the zero-shot ability of multilingual pretrained models on the four tasks. The model is fine-tuned on a specific task with English input and output. Then it is used to generate output in other languages with a given language tag. \input{tabs/zeroshot_vs_crosslingual_xlm.tex} \section{Results} \subsection{Monolingual and Cross-lingual} This section displays the monolingual and cross-lingual model comparison to explore their performances in different tasks and languages. Figure \ref{fig:crosslingual} contains the five language-centric cross-lingual and monolingual results. Several conclusions can be drawn from the results: \textbf{The performance of Cross-lingual is better than monolingual in some cases. } As shown in Figure \ref{fig:crosslingual}, model performances on ensemble scores in cross-lingual setting exceed those in monolingual setting frequently (e.g., the monolingual result of French underperforms the English to French cross-lingual result in Figure \ref{fig:SG XLM} ). This is because the cross-lingual models are trained with more data (e.g., the English centric cross-lingual model is trained with en->de, en->fr, en->es, en->zh data), and the data from different cross-lingual directions can sometimes benefit from each other thus improving the model performance. \textbf{Chinese text generation is challenging in cross-lingual setting.} As illustrated in Figure \ref{fig:crosslingual}, nearly all models obtain inferior scores when generating Chinese text. Also, model results on Chinese inputs are usually worse than results on inputs in other languages. The wide discrepancies in grammar and vocabulary between Chinese and other languages lead to the poor performance of cross-lingual generation when either the target language or source language is Chinese. \textbf{Multilingual pretrained models obtain lower scores on the Summarization task.} Compared with other tasks, summarization task requires longer output, which increases the difficulty of text generation, thus causing poor performance both in cross-lingual and monolingual settings. \subsection{Monolingual and Multilingual} \label{sec: mono vs multi} In addition to cross-lingual analysis, we also explore the performance difference between models trained in monolingual and multilingual settings. Table \ref{tab:mono vs multi} displays the monolingual and multilingual training results for four models in four tasks. \textbf{In most cases, multilingual training can improve model performance on relevance.} As shown in Table \ref{tab:mono vs multi}, $75$ out of $96$ multilingual results outperform the monolingual counterparts on various relevance metrics in different tasks. The reason is that the multilingual data in MTG\xspace is fully parallel across all five languages and every sample has semantically aligned counterparts in other languages. It makes better semantic fusion among different languages, thus boosting the multilingual training performance. \textbf{The advantages of multilingual training are not obvious on diversity measured by distinct-$1$.} Especially in the story generation task, $3$ out of $4$ models obtain better distinct-1 scores in monolingual setting than in multilingual one. Diversity can not be improved by semantic sharing across languages especially when the samples of them are multiway parallel. This is because the multiway parallel dataset with the semantic aligned samples repeating in different languages encourages models to generate similar texts to some extent. \begin{figure} \centering \includegraphics[width=0.75\linewidth]{./standalone/stage1VSstage2_V2} \caption{The different stage performances averaged across five languages of XLM in summarization under various settings. Here stage1 represents models trained only on rough training data while stage2 represents models further trained on human-annotated training data based on models in stage1.} \label{fig:diss1} \end{figure} \subsection{Zero-shot results} To test the cross-lingual generation ability of multilingual pretrained models when no direct cross-lingual training data are provided, we evaluate the zero-shot cross-lingual generation performance. Table \ref{tab:zeroshot_vs_crosslingual} presents the zero-shot results for XLM in four tasks. It demonstrates that the multilingual pretrained model XLM still lacks the ability to generate high-quality cross-lingual output in zero-shot scenario. \textbf{Moreover, English to Chinese and French zero-shot generation shows inferior performance.}\footnote{Zero-shot results show the same trend as shown in Table \ref{tab:zero all} in Appendix.} The performance decline is rather salient when generating Chinese text. This is because Chinese and French (especially Chinese) are distant from English in the language family tree. \textbf{On the other hand, zero-shot results underperform cross-lingual results} which further emphasizes the importance of direct cross-lingual training data for cross-lingual text generation. \subsection{Pseudo and Annotated Data} \textbf{To answer the question ``Does the 400k annotated training data help the model generate better? '',} we use the rough training data filtered by back translation for the first stage fine-tuning and the annotated training data for the second stage. The ablation study results on the two-step fine-tuning in summarization under all evaluation scenarios with XLM are illustrated in Figure \ref{fig:diss1}. The extra human-annotated data boost model performance by at least $3.8\%$ on the ensemble metric. We also make a T-test and prove that the improvement of annotated training data is significant in all settings.\footnote{The t-test details are shown in Appendix~\ref{sec:stag1 vs stage2 significant test}.} \textbf{It demonstrates that although the number of annotated data is small, it can significantly improve the performance.} It also highlights the necessity of human-annotated multilingual data compared with pseudo-parallel data via machine translation. \input{tabs/human_v2.tex} \subsection{Human evaluation} Table \ref{tab:human} presents the human evaluation scores for mBART in four tasks. Multilingual training results can surpass the monolingual results in QG, TG and Summ on relevance. In terms of task-specific score, multilingual results are also superior in SG and QG. This is consistent with the conclusion in Sec. \ref{sec: mono vs multi}. On the other hand, language fusion scores in zero-shot setting are extremely low, indicating the pretrained models still lack the ability to generate texts in correct language in zero-shot setting. \section{Annotation Process} \section{Back Translation Threshold Testing} \label{sec:back translation threshold} The detailed data sizes of back translation filtered datasets for different tasks are presented in Table \ref{tab:threshold testing}. \section{Experimental settings} \label{sec:experimental settings} The overall statistics for multilingual pretrained models are presented in Table \ref{tab:model statistics} and the detailed descriptions for them are as follows: 1\textbf{M-BERT} Multilingual BERT (M-BERT)~\cite{devlin2019bert} is a single language model pre-trained from monolingual corpora in $104$ languages using Masked Language Modeling (MLM) task. M-BERT leverages a shared vocabulary of $110$k WordPiece tokens and has $12$ layers with $172$M parameters totally. \textbf{XLM} The Cross-Lingual Language Model (XLM)~\cite{lample2019cross} is pre-trained simultaneously with Masked Language Model (MLM) task using monolingual data and Translation Language Model (TLM) task using parallel data. XLM has a shared vocabulary of $200$k byte-pair encoded (BPE) subwords~\cite{sennrich2016neural} and $16$ layers totaling $570$M parameters. 1\textbf{mBART} Multilingual BART (mBART)~\cite{liu2020multilingual} is a pre-trained encoder-decoder model using denoising auto-encoding objective on monolingual data over $25$ languages. mBART has a shared vocabulary of $250$k tokens leveraging Sentence Piece tokenization scheme. mBART consists of $12$-layer encoder and $12$-layer decoder with a total of $680$M parameters. \textbf{mT$5$} Multilingual T$5$ (mT$5$)~\cite{xue2020mt5} is a multilingual variant of T$5$~\cite{2020t5} leveraging a text-to-text format. mT$5$ is pre-trained on a span-corruption version of Masked Language Modeling objective over $101$ languages. It is composed of $24$-encoder layers and $24$ decoder layers with $13$B parameters. We use the encoder-decoder architecture for our generation tasks. Among the models described above, mBART and mT5 have been pretrained for generation tasks, but M-BERT and XLM are only pretrained for encoder representations. Therefore, we initialize the decoder with the encoder parameters for M-BERT and XLM. During the pretraining phase, there are no language tags in M-BERT and mT5. Thus we manually add the language tag at the beginning of the source and target for M-BERT and add the target language tag to the beginning of source for mT5. We adjust the input format for each task. For QG, we append the answer to the passage and insert a special token to separate them. For SG, we take the beginning four sentences as the source and make the last sentence as the target. We take a two-step finetuning to make full use of our MTG\xspace benchmark. We first use the large rough parallel training data to train our models on the downstream tasks for 20 epochs, and then finetune the models on the small annotated training data to further improve the generation performance for 10 epochs. We evaluate the model for every 2000 steps and use the loss on development to choose the best model. The batch size is 32. The learning rate and optimizer parameters are set to the default parameters for each model. All models are trained with 32GB Tesla-V100. \input{tabs/threshold.tex} \input{tabs/model_statistics.tex} \begin{table}[htbp] \centering \footnotesize \begin{tabular}{clcccc} \toprule \multicolumn{2}{c}{\textbf{Tasks}} & \textbf{Mono} & \textbf{Multi} & \textbf{Cross} & \textbf{Zero} \\ \midrule \multirow{3}[2]{*}{SG} & stage1 & 0.268 & 0.270 & 0.258 & 0.125 \\ & stage2 & \textbf{0.284 } & \textbf{0.284 } & \textbf{0.289 } & \textbf{0.167 } \\ \cmidrule{2-6} & p-value & 0.000 & 0.000 & 0.000 & 0.000 \\ \midrule \multirow{3}[2]{*}{QG} & stage1 & 0.286 & 0.287 & 0.279 & 0.235 \\ & stage2 & \textbf{0.301 } & \textbf{0.300 } & \textbf{0.295 } & \textbf{0.258 } \\ \cmidrule{2-6} & p-value & 0.000 & 0.000 & 0.000 & 0.000 \\ \midrule \multirow{3}[2]{*}{TG} & stage1 & 0.257 & 0.270 & 0.268 & 0.223 \\ & stage2 & \textbf{0.288 } & \textbf{0.291 } & \textbf{0.289 } & \textbf{0.232 } \\ \cmidrule{2-6} & p-value & 0.000 & 0.000 & 0.000 & 0.003 \\ \midrule \multirow{3}[2]{*}{Summ} & stage1 & 0.186 & 0.187 & 0.181 & 0.161 \\ & stage2 & \textbf{0.193 } & \textbf{0.208 } & \textbf{0.207 } & \textbf{0.168 } \\ \cmidrule{2-6} & p-value & 0.001 & 0.000 & 0.000 & 0.004 \\ \bottomrule \end{tabular}% \caption{The average ensemble metric scores for XLM for stage1 and stage2 in four tasks in four settings and the corresponding t test p-values. Here stage1 represents models trained only on rouge training data while stage2 represents models further trained on human-annotated training data based on models in stage1. The bold cell means the significantly higher score between stage1 and stage2 scores.} \label{tab:significant test pvalue}% \end{table}% \section{Significant Test Results} \label{sec:stag1 vs stage2 significant test} The average ensemble metric scores for stage1 and stage2 in four tasks and the corresponding significant test p-values are displayed in Table \ref{tab:significant test pvalue}. As it shows, adding human-annotated training data can always improve the model performance under different settings. The improvements are significant in all settings. \section{Experimental Results} We present detailed experimental results of our four baseline models under four different evaluation settings here. \input{tabs/extab/mono.tex} \input{tabs/extab/multi.tex} \input{tabs/extab/cross_en.tex} \input{tabs/extab/cross_de.tex} \input{tabs/extab/cross_fr.tex} \input{tabs/extab/cross_es.tex} \input{tabs/extab/cross_zh.tex} \input{tabs/extab/zero.tex} \section{Introduction} \input{02introduction.tex} \section{Related Work} \input{03releated.tex} \section{Dataset Collection and Methodology} \input{04dataset.tex} \section{Experiments} \input{05experiments.tex} \section{Discussions} \input{06discussion.tex} \section{Conclusion} \input{07conclusion.tex} \section{Ethics Consideration} \input{08ethic.tex}